diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json new file mode 100644 index 0000000000..786e569307 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json @@ -0,0 +1,42 @@ +{ + "name": "iron-a11y-announcer", + "version": "1.0.1", + "description": "A singleton element that simplifies announcing text to screen readers.", + "keywords": [ + "web-components", + "polymer", + "a11y", + "live" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-a11y-announcer.git" + }, + "main": "iron-a11y-announcer.html", + "license": "http://polymer.github.io/LICENSE.txt", + "dependencies": { + "polymer": "polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "paper-button": "polymerelements/paper-button#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "web-component-tester": "*" + }, + "homepage": "https://github.com/polymerelements/iron-a11y-announcer", + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "699697fe8935400ab11e3e33cd6a5a54d762300e" + }, + "_source": "git://github.com/polymerelements/iron-a11y-announcer.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/iron-a11y-announcer" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/.gitignore b/dashboard-ui/bower_components/iron-a11y-announcer/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json new file mode 100644 index 0000000000..cbe80e0a6b --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json @@ -0,0 +1,32 @@ +{ + "name": "iron-a11y-announcer", + "version": "1.0.1", + "description": "A singleton element that simplifies announcing text to screen readers.", + "keywords": [ + "web-components", + "polymer", + "a11y", + "live" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-a11y-announcer.git" + }, + "main": "iron-a11y-announcer.html", + "license": "http://polymer.github.io/LICENSE.txt", + "dependencies": { + "polymer": "polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "paper-button": "polymerelements/paper-button#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "web-component-tester": "*" + } +} diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html b/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html new file mode 100644 index 0000000000..d9e939c56b --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/demo/index.html @@ -0,0 +1,40 @@ + + + + + + + + + + + iron-a11y-announcer demo + + + + + + + + + +
+
+
+ Note: in order to hear the announcements, be sure to turn on your favorite screen reader! + Hello, my name is Ava. + This true sentence is false. + Are you paying attention? +
+
+
+ + diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/demo/x-announces.html b/dashboard-ui/bower_components/iron-a11y-announcer/demo/x-announces.html new file mode 100644 index 0000000000..404f7c09b5 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/demo/x-announces.html @@ -0,0 +1,50 @@ + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/index.html b/dashboard-ui/bower_components/iron-a11y-announcer/index.html new file mode 100644 index 0000000000..1f8889a8da --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/index.html @@ -0,0 +1,28 @@ + + + + + + + iron-a11y-announcer + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-a11y-announcer/iron-a11y-announcer.html b/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html similarity index 100% rename from dashboard-ui/thirdparty/iron-a11y-announcer/iron-a11y-announcer.html rename to dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/test/index.html b/dashboard-ui/bower_components/iron-a11y-announcer/test/index.html new file mode 100644 index 0000000000..c65b8014a6 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/test/index.html @@ -0,0 +1,26 @@ + + + + + + + iron-a11y-announcer tests + + + + + + + diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/test/iron-a11y-announcer.html b/dashboard-ui/bower_components/iron-a11y-announcer/test/iron-a11y-announcer.html new file mode 100644 index 0000000000..f73cf6fdd9 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-announcer/test/iron-a11y-announcer.html @@ -0,0 +1,59 @@ + + + + + + iron-a11y-announcer + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json new file mode 100644 index 0000000000..a89dba3ec8 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json @@ -0,0 +1,42 @@ +{ + "name": "iron-a11y-keys-behavior", + "version": "1.0.3", + "description": "A behavior that enables keybindings for greater a11y.", + "keywords": [ + "web-components", + "web-component", + "polymer", + "a11y", + "input" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-a11y-behavior.git" + }, + "main": "iron-a11y-keys-behavior.html", + "license": "http://polymer.github.io/LICENSE.txt", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "PolymerElements/paper-styles#^1.0.2", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", + "_release": "1.0.3", + "_resolution": { + "type": "version", + "tag": "v1.0.3", + "commit": "85609bfee93654cfe7be0bcf4cde169411ba535f" + }, + "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/iron-a11y-keys-behavior" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.gitignore b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json new file mode 100644 index 0000000000..fa1428985d --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/bower.json @@ -0,0 +1,32 @@ +{ + "name": "iron-a11y-keys-behavior", + "version": "1.0.3", + "description": "A behavior that enables keybindings for greater a11y.", + "keywords": [ + "web-components", + "web-component", + "polymer", + "a11y", + "input" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-a11y-behavior.git" + }, + "main": "iron-a11y-keys-behavior.html", + "license": "http://polymer.github.io/LICENSE.txt", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "PolymerElements/paper-styles#^1.0.2", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/index.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/index.html new file mode 100644 index 0000000000..2c3fec7c59 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/index.html @@ -0,0 +1,24 @@ + + + + + + Iron A11y Keys Behavior demo + + + + + +
+ +
+ + diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html new file mode 100644 index 0000000000..a7f3205d15 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html @@ -0,0 +1,91 @@ + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/index.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/index.html new file mode 100644 index 0000000000..e533e79ce2 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/index.html @@ -0,0 +1,24 @@ + + + + + + iron-a11y-keys-behavior + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html similarity index 100% rename from dashboard-ui/thirdparty/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html rename to dashboard-ui/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/basic-test.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/basic-test.html new file mode 100644 index 0000000000..8e50c92b40 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/basic-test.html @@ -0,0 +1,248 @@ + + + + + + + iron-a11y-keys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/index.html b/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/index.html new file mode 100644 index 0000000000..24f9e35ff9 --- /dev/null +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/test/index.html @@ -0,0 +1,29 @@ + + + + + + + Tests + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json new file mode 100644 index 0000000000..bf8b6cf30f --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -0,0 +1,40 @@ +{ + "name": "iron-behaviors", + "version": "1.0.4", + "description": "Provides a set of behaviors for the iron elements", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-behaviors.git" + }, + "main": [ + "iron-button-state.html", + "iron-control-state.html" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/PolymerElements/iron-behaviors", + "_release": "1.0.4", + "_resolution": { + "type": "version", + "tag": "v1.0.4", + "commit": "8792edd457de697a74f398c09b67df30adf7d866" + }, + "_source": "git://github.com/PolymerElements/iron-behaviors.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/iron-behaviors" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-behaviors/.gitignore b/dashboard-ui/bower_components/iron-behaviors/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-behaviors/bower.json b/dashboard-ui/bower_components/iron-behaviors/bower.json new file mode 100644 index 0000000000..6a18575581 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/bower.json @@ -0,0 +1,30 @@ +{ + "name": "iron-behaviors", + "version": "1.0.4", + "description": "Provides a set of behaviors for the iron elements", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-behaviors.git" + }, + "main": [ + "iron-button-state.html", + "iron-control-state.html" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-behaviors/demo/index.html b/dashboard-ui/bower_components/iron-behaviors/demo/index.html new file mode 100644 index 0000000000..4001664dfa --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/demo/index.html @@ -0,0 +1,47 @@ + + + + + + + + + + simple-button + + + + + + + + + +
+

Normal

+ + Hello World + +

Toggles

+ + Hello World + +

Disabled

+ + Hello World +
+ + diff --git a/dashboard-ui/bower_components/iron-behaviors/demo/simple-button.html b/dashboard-ui/bower_components/iron-behaviors/demo/simple-button.html new file mode 100644 index 0000000000..ab6432b6c9 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/demo/simple-button.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-behaviors/index.html b/dashboard-ui/bower_components/iron-behaviors/index.html new file mode 100644 index 0000000000..220deb0034 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/index.html @@ -0,0 +1,27 @@ + + + + + + Iron Behaviors + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-behaviors/iron-button-state.html b/dashboard-ui/bower_components/iron-behaviors/iron-button-state.html similarity index 98% rename from dashboard-ui/thirdparty/iron-behaviors/iron-button-state.html rename to dashboard-ui/bower_components/iron-behaviors/iron-button-state.html index 9c666c6adf..fc52e172f9 100644 --- a/dashboard-ui/thirdparty/iron-behaviors/iron-button-state.html +++ b/dashboard-ui/bower_components/iron-behaviors/iron-button-state.html @@ -16,7 +16,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN /** * @demo demo/index.html - * @polymerBehavior + * @polymerBehavior Polymer.IronButtonState */ Polymer.IronButtonStateImpl = { @@ -177,7 +177,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }; - /** @polymerBehavior Polymer.IronButtonState */ + /** @polymerBehavior */ Polymer.IronButtonState = [ Polymer.IronA11yKeysBehavior, Polymer.IronButtonStateImpl diff --git a/dashboard-ui/thirdparty/iron-behaviors/iron-control-state.html b/dashboard-ui/bower_components/iron-behaviors/iron-control-state.html similarity index 100% rename from dashboard-ui/thirdparty/iron-behaviors/iron-control-state.html rename to dashboard-ui/bower_components/iron-behaviors/iron-control-state.html diff --git a/dashboard-ui/bower_components/iron-behaviors/test/active-state.html b/dashboard-ui/bower_components/iron-behaviors/test/active-state.html new file mode 100644 index 0000000000..bffa727b88 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/test/active-state.html @@ -0,0 +1,154 @@ + + + + + active-state + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-behaviors/test/disabled-state.html b/dashboard-ui/bower_components/iron-behaviors/test/disabled-state.html new file mode 100644 index 0000000000..af24ee250f --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/test/disabled-state.html @@ -0,0 +1,85 @@ + + + + + disabled-state + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-behaviors/test/focused-state.html b/dashboard-ui/bower_components/iron-behaviors/test/focused-state.html new file mode 100644 index 0000000000..2d3af69b32 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/test/focused-state.html @@ -0,0 +1,120 @@ + + + + + focused-state + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-behaviors/test/index.html b/dashboard-ui/bower_components/iron-behaviors/test/index.html new file mode 100644 index 0000000000..0eef4d67b1 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/test/index.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-behaviors/test/test-elements.html b/dashboard-ui/bower_components/iron-behaviors/test/test-elements.html new file mode 100644 index 0000000000..43bd8e52f0 --- /dev/null +++ b/dashboard-ui/bower_components/iron-behaviors/test/test-elements.html @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/.bower.json b/dashboard-ui/bower_components/iron-fit-behavior/.bower.json new file mode 100644 index 0000000000..2ab1f93592 --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/.bower.json @@ -0,0 +1,41 @@ +{ + "name": "iron-fit-behavior", + "version": "1.0.0", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Fits an element inside another element", + "private": true, + "main": [ + "iron-fit-behavior.html" + ], + "keywords": [ + "web-components", + "polymer", + "behavior" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-fit-behavior.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/PolymerElements/iron-fit-behavior", + "_release": "1.0.0", + "_resolution": { + "type": "version", + "tag": "v1.0.0", + "commit": "971104a539e356fc9f8d5c640fced7f1af653c15" + }, + "_source": "git://github.com/PolymerElements/iron-fit-behavior.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/iron-fit-behavior" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-fit-behavior/.gitignore b/dashboard-ui/bower_components/iron-fit-behavior/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-fit-behavior/bower.json b/dashboard-ui/bower_components/iron-fit-behavior/bower.json new file mode 100644 index 0000000000..c8f7dc8955 --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/bower.json @@ -0,0 +1,31 @@ +{ + "name": "iron-fit-behavior", + "version": "1.0.0", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Fits an element inside another element", + "private": true, + "main": [ + "iron-fit-behavior.html" + ], + "keywords": [ + "web-components", + "polymer", + "behavior" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-fit-behavior.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-fit-behavior/demo/index.html b/dashboard-ui/bower_components/iron-fit-behavior/demo/index.html new file mode 100644 index 0000000000..2caeebe9df --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/demo/index.html @@ -0,0 +1,42 @@ + + + + + + iron-fit-behavior demo + + + + + + + + + + + + + + + + centered in window + + + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/demo/simple-fit.html b/dashboard-ui/bower_components/iron-fit-behavior/demo/simple-fit.html new file mode 100644 index 0000000000..b7fddc8081 --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/demo/simple-fit.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/index.html b/dashboard-ui/bower_components/iron-fit-behavior/index.html new file mode 100644 index 0000000000..5ffa7d61ce --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/index.html @@ -0,0 +1,30 @@ + + + + + + + + + iron-fit-behavior + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/iron-fit-behavior.html b/dashboard-ui/bower_components/iron-fit-behavior/iron-fit-behavior.html new file mode 100644 index 0000000000..f072dcf406 --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/iron-fit-behavior.html @@ -0,0 +1,230 @@ + + + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/test/index.html b/dashboard-ui/bower_components/iron-fit-behavior/test/index.html new file mode 100644 index 0000000000..5c3084c677 --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/test/index.html @@ -0,0 +1,34 @@ + + + + + + iron-fit-behavior tests + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/test/iron-fit-behavior.html b/dashboard-ui/bower_components/iron-fit-behavior/test/iron-fit-behavior.html new file mode 100644 index 0000000000..3f6bd1fe4e --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/test/iron-fit-behavior.html @@ -0,0 +1,332 @@ + + + + + + iron-fit-behavior tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/test/test-fit.html b/dashboard-ui/bower_components/iron-fit-behavior/test/test-fit.html new file mode 100644 index 0000000000..b8768fe4c8 --- /dev/null +++ b/dashboard-ui/bower_components/iron-fit-behavior/test/test-fit.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-flex-layout/.bower.json b/dashboard-ui/bower_components/iron-flex-layout/.bower.json new file mode 100644 index 0000000000..cfb5824840 --- /dev/null +++ b/dashboard-ui/bower_components/iron-flex-layout/.bower.json @@ -0,0 +1,36 @@ +{ + "name": "iron-flex-layout", + "version": "1.0.2", + "description": "Provide flexbox-based layouts", + "keywords": [ + "web-components", + "polymer", + "layout" + ], + "private": true, + "license": "http://polymer.github.io/LICENSE.txt", + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-flex-layout.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/polymerelements/iron-flex-layout", + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "50bcecf40ab23caa7c2cd90030555e00c5ba7154" + }, + "_source": "git://github.com/polymerelements/iron-flex-layout.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/iron-flex-layout" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-flex-layout/.gitignore b/dashboard-ui/bower_components/iron-flex-layout/.gitignore new file mode 100644 index 0000000000..1eb1fa5e92 --- /dev/null +++ b/dashboard-ui/bower_components/iron-flex-layout/.gitignore @@ -0,0 +1,2 @@ +bower_components + diff --git a/dashboard-ui/bower_components/iron-flex-layout/bower.json b/dashboard-ui/bower_components/iron-flex-layout/bower.json new file mode 100644 index 0000000000..202fbe00af --- /dev/null +++ b/dashboard-ui/bower_components/iron-flex-layout/bower.json @@ -0,0 +1,26 @@ +{ + "name": "iron-flex-layout", + "version": "1.0.2", + "description": "Provide flexbox-based layouts", + "keywords": [ + "web-components", + "polymer", + "layout" + ], + "private": true, + "license": "http://polymer.github.io/LICENSE.txt", + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-flex-layout.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/thirdparty/iron-flex-layout/classes/iron-flex-layout.html b/dashboard-ui/bower_components/iron-flex-layout/classes/iron-flex-layout.html similarity index 100% rename from dashboard-ui/thirdparty/iron-flex-layout/classes/iron-flex-layout.html rename to dashboard-ui/bower_components/iron-flex-layout/classes/iron-flex-layout.html diff --git a/dashboard-ui/thirdparty/iron-flex-layout/classes/iron-shadow-flex-layout.html b/dashboard-ui/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html similarity index 100% rename from dashboard-ui/thirdparty/iron-flex-layout/classes/iron-shadow-flex-layout.html rename to dashboard-ui/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html diff --git a/dashboard-ui/bower_components/iron-flex-layout/demo/index.html b/dashboard-ui/bower_components/iron-flex-layout/demo/index.html new file mode 100644 index 0000000000..ea4df38362 --- /dev/null +++ b/dashboard-ui/bower_components/iron-flex-layout/demo/index.html @@ -0,0 +1,42 @@ + + + + + + + iron-flex-layout + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html b/dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html new file mode 100644 index 0000000000..489a5f5066 --- /dev/null +++ b/dashboard-ui/bower_components/iron-flex-layout/demo/x-app.html @@ -0,0 +1,118 @@ + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-flex-layout/iron-flex-layout.html b/dashboard-ui/bower_components/iron-flex-layout/iron-flex-layout.html similarity index 100% rename from dashboard-ui/thirdparty/iron-flex-layout/iron-flex-layout.html rename to dashboard-ui/bower_components/iron-flex-layout/iron-flex-layout.html diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json new file mode 100644 index 0000000000..8ce0fb37ca --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/.bower.json @@ -0,0 +1,43 @@ +{ + "name": "iron-icon", + "private": true, + "version": "1.0.2", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "An element that supports displaying an icon", + "main": "iron-icon.html", + "author": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "icon" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-icon.git" + }, + "dependencies": { + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "iron-meta": "polymerelements/iron-meta#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "iron-iconset": "polymerelements/iron-iconset#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/polymerelements/iron-icon", + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "f9246c47ecb1c682f0fb9ea48255d5f7debd1e03" + }, + "_source": "git://github.com/polymerelements/iron-icon.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/iron-icon" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icon/.gitignore b/dashboard-ui/bower_components/iron-icon/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-icon/bower.json b/dashboard-ui/bower_components/iron-icon/bower.json new file mode 100644 index 0000000000..9361b565c1 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/bower.json @@ -0,0 +1,33 @@ +{ + "name": "iron-icon", + "private": true, + "version": "1.0.2", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "An element that supports displaying an icon", + "main": "iron-icon.html", + "author": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "icon" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-icon.git" + }, + "dependencies": { + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "iron-meta": "polymerelements/iron-meta#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "iron-iconset": "polymerelements/iron-iconset#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-icon/demo/index.html b/dashboard-ui/bower_components/iron-icon/demo/index.html new file mode 100644 index 0000000000..ff712396cf --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/demo/index.html @@ -0,0 +1,48 @@ + + + + + iron-icon demo + + + + + + + + +
+

This demo is for a single <iron-icon>. If you're looking for the + whole set of available icons, check out the <iron-icons> demo.

+ +
+ + + +

<iron-icon icon="example:location">

+ + + +

<iron-icon src="location.png">

+ +
+
+ + diff --git a/dashboard-ui/bower_components/iron-icon/demo/location.png b/dashboard-ui/bower_components/iron-icon/demo/location.png new file mode 100644 index 0000000000..9bb74236b8 Binary files /dev/null and b/dashboard-ui/bower_components/iron-icon/demo/location.png differ diff --git a/dashboard-ui/bower_components/iron-icon/hero.svg b/dashboard-ui/bower_components/iron-icon/hero.svg new file mode 100644 index 0000000000..f0f58536e5 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/hero.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-icon/index.html b/dashboard-ui/bower_components/iron-icon/index.html new file mode 100644 index 0000000000..e871f17d98 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-icon/iron-icon.html b/dashboard-ui/bower_components/iron-icon/iron-icon.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icon/iron-icon.html rename to dashboard-ui/bower_components/iron-icon/iron-icon.html diff --git a/dashboard-ui/bower_components/iron-icon/test/index.html b/dashboard-ui/bower_components/iron-icon/test/index.html new file mode 100644 index 0000000000..0a56bb7693 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/test/index.html @@ -0,0 +1,31 @@ + + + + + + + + Tests + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-icon/test/iron-icon.html b/dashboard-ui/bower_components/iron-icon/test/iron-icon.html new file mode 100644 index 0000000000..3b8202f12d --- /dev/null +++ b/dashboard-ui/bower_components/iron-icon/test/iron-icon.html @@ -0,0 +1,120 @@ + + + + + + + iron-icon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-icons/.bower.json b/dashboard-ui/bower_components/iron-icons/.bower.json new file mode 100644 index 0000000000..76b9220290 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icons/.bower.json @@ -0,0 +1,46 @@ +{ + "name": "iron-icons", + "version": "1.0.2", + "description": "A set of icons for use with iron-icon", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "icon" + ], + "main": "iron-icons.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-icons" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-icons", + "dependencies": { + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-component-page": "polymerelements/iron-component-page#1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "iron-meta": "polymerelements/iron-meta#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "ignore": [ + "util", + "update-icons.sh" + ], + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "7340b4e26a0235ffdf2477299ccecd0c5d3d99e8" + }, + "_source": "git://github.com/polymerelements/iron-icons.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/iron-icons" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-icons/.gitignore b/dashboard-ui/bower_components/iron-icons/.gitignore new file mode 100644 index 0000000000..bb1944ea16 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icons/.gitignore @@ -0,0 +1,3 @@ +util/node_modules +material-design-icons +bower_components diff --git a/dashboard-ui/thirdparty/iron-icons/av-icons.html b/dashboard-ui/bower_components/iron-icons/av-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/av-icons.html rename to dashboard-ui/bower_components/iron-icons/av-icons.html diff --git a/dashboard-ui/bower_components/iron-icons/bower.json b/dashboard-ui/bower_components/iron-icons/bower.json new file mode 100644 index 0000000000..9ac5f25c87 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icons/bower.json @@ -0,0 +1,37 @@ +{ + "name": "iron-icons", + "version": "1.0.2", + "description": "A set of icons for use with iron-icon", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "icon" + ], + "main": "iron-icons.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-icons" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-icons", + "dependencies": { + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-component-page": "polymerelements/iron-component-page#1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "iron-meta": "polymerelements/iron-meta#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "ignore": [ + "util", + "update-icons.sh" + ] +} diff --git a/dashboard-ui/thirdparty/iron-icons/communication-icons.html b/dashboard-ui/bower_components/iron-icons/communication-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/communication-icons.html rename to dashboard-ui/bower_components/iron-icons/communication-icons.html diff --git a/dashboard-ui/bower_components/iron-icons/demo/index.html b/dashboard-ui/bower_components/iron-icons/demo/index.html new file mode 100644 index 0000000000..d5daf8f685 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icons/demo/index.html @@ -0,0 +1,132 @@ + + + + + + + iron-icons + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-icons/device-icons.html b/dashboard-ui/bower_components/iron-icons/device-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/device-icons.html rename to dashboard-ui/bower_components/iron-icons/device-icons.html diff --git a/dashboard-ui/thirdparty/iron-icons/editor-icons.html b/dashboard-ui/bower_components/iron-icons/editor-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/editor-icons.html rename to dashboard-ui/bower_components/iron-icons/editor-icons.html diff --git a/dashboard-ui/thirdparty/iron-icons/hardware-icons.html b/dashboard-ui/bower_components/iron-icons/hardware-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/hardware-icons.html rename to dashboard-ui/bower_components/iron-icons/hardware-icons.html diff --git a/dashboard-ui/bower_components/iron-icons/hero.svg b/dashboard-ui/bower_components/iron-icons/hero.svg new file mode 100644 index 0000000000..167321c942 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icons/hero.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-icons/image-icons.html b/dashboard-ui/bower_components/iron-icons/image-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/image-icons.html rename to dashboard-ui/bower_components/iron-icons/image-icons.html diff --git a/dashboard-ui/bower_components/iron-icons/index.html b/dashboard-ui/bower_components/iron-icons/index.html new file mode 100644 index 0000000000..95d19913a4 --- /dev/null +++ b/dashboard-ui/bower_components/iron-icons/index.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-icons/iron-icons.html b/dashboard-ui/bower_components/iron-icons/iron-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/iron-icons.html rename to dashboard-ui/bower_components/iron-icons/iron-icons.html diff --git a/dashboard-ui/thirdparty/iron-icons/maps-icons.html b/dashboard-ui/bower_components/iron-icons/maps-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/maps-icons.html rename to dashboard-ui/bower_components/iron-icons/maps-icons.html diff --git a/dashboard-ui/thirdparty/iron-icons/notification-icons.html b/dashboard-ui/bower_components/iron-icons/notification-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/notification-icons.html rename to dashboard-ui/bower_components/iron-icons/notification-icons.html diff --git a/dashboard-ui/thirdparty/iron-icons/social-icons.html b/dashboard-ui/bower_components/iron-icons/social-icons.html similarity index 100% rename from dashboard-ui/thirdparty/iron-icons/social-icons.html rename to dashboard-ui/bower_components/iron-icons/social-icons.html diff --git a/dashboard-ui/bower_components/iron-iconset-svg/.bower.json b/dashboard-ui/bower_components/iron-iconset-svg/.bower.json new file mode 100644 index 0000000000..7031e24075 --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/.bower.json @@ -0,0 +1,41 @@ +{ + "name": "iron-iconset-svg", + "description": "Manages a set of svg icons", + "version": "1.0.4", + "keywords": [ + "web-components", + "polymer", + "icon" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-iconset-svg.git" + }, + "dependencies": { + "polymer": "polymer/polymer#^1.0.0", + "iron-meta": "polymerelements/iron-meta#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "web-component-tester": "*" + }, + "homepage": "https://github.com/polymerelements/iron-iconset-svg", + "_release": "1.0.4", + "_resolution": { + "type": "version", + "tag": "v1.0.4", + "commit": "795aa82ac22971421bc4375efbd2419ebba9099f" + }, + "_source": "git://github.com/polymerelements/iron-iconset-svg.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/iron-iconset-svg" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-iconset-svg/.gitignore b/dashboard-ui/bower_components/iron-iconset-svg/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-iconset-svg/bower.json b/dashboard-ui/bower_components/iron-iconset-svg/bower.json new file mode 100644 index 0000000000..b58569cd6e --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/bower.json @@ -0,0 +1,31 @@ +{ + "name": "iron-iconset-svg", + "description": "Manages a set of svg icons", + "version": "1.0.4", + "keywords": [ + "web-components", + "polymer", + "icon" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-iconset-svg.git" + }, + "dependencies": { + "polymer": "polymer/polymer#^1.0.0", + "iron-meta": "polymerelements/iron-meta#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "web-component-tester": "*" + } +} diff --git a/dashboard-ui/bower_components/iron-iconset-svg/demo/index.html b/dashboard-ui/bower_components/iron-iconset-svg/demo/index.html new file mode 100644 index 0000000000..efe8478e90 --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/demo/index.html @@ -0,0 +1,65 @@ + + + + + + + iron-iconset-svg + + + + + + + + + +
+ + + +
+ + + diff --git a/dashboard-ui/bower_components/iron-iconset-svg/demo/svg-sample-icons.html b/dashboard-ui/bower_components/iron-iconset-svg/demo/svg-sample-icons.html new file mode 100644 index 0000000000..94c930d574 --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/demo/svg-sample-icons.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-iconset-svg/index.html b/dashboard-ui/bower_components/iron-iconset-svg/index.html new file mode 100644 index 0000000000..e871f17d98 --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-iconset-svg/iron-iconset-svg.html b/dashboard-ui/bower_components/iron-iconset-svg/iron-iconset-svg.html similarity index 99% rename from dashboard-ui/thirdparty/iron-iconset-svg/iron-iconset-svg.html rename to dashboard-ui/bower_components/iron-iconset-svg/iron-iconset-svg.html index 485285716a..3cebc2ce1d 100644 --- a/dashboard-ui/thirdparty/iron-iconset-svg/iron-iconset-svg.html +++ b/dashboard-ui/bower_components/iron-iconset-svg/iron-iconset-svg.html @@ -24,7 +24,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN * * Example: * - * + * * * * diff --git a/dashboard-ui/bower_components/iron-iconset-svg/test/index.html b/dashboard-ui/bower_components/iron-iconset-svg/test/index.html new file mode 100644 index 0000000000..db4a3f6203 --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/test/index.html @@ -0,0 +1,30 @@ + + + + + + + + Tests + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-iconset-svg/test/iron-iconset-svg.html b/dashboard-ui/bower_components/iron-iconset-svg/test/iron-iconset-svg.html new file mode 100644 index 0000000000..4af6f8becd --- /dev/null +++ b/dashboard-ui/bower_components/iron-iconset-svg/test/iron-iconset-svg.html @@ -0,0 +1,107 @@ + + + + + + + iron-iconset-svg + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-meta/.bower.json b/dashboard-ui/bower_components/iron-meta/.bower.json new file mode 100644 index 0000000000..00a15700b7 --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/.bower.json @@ -0,0 +1,38 @@ +{ + "name": "iron-meta", + "version": "1.0.2", + "keywords": [ + "web-components", + "polymer" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Useful for sharing information across a DOM tree", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-meta.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.4", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/polymerelements/iron-meta", + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "85d0258556a25a34dbe98657ce9f40d878d4c5bf" + }, + "_source": "git://github.com/polymerelements/iron-meta.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/iron-meta" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-meta/.gitignore b/dashboard-ui/bower_components/iron-meta/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-meta/bower.json b/dashboard-ui/bower_components/iron-meta/bower.json new file mode 100644 index 0000000000..6a98a88b5e --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/bower.json @@ -0,0 +1,28 @@ +{ + "name": "iron-meta", + "version": "1.0.2", + "keywords": [ + "web-components", + "polymer" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Useful for sharing information across a DOM tree", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-meta.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.4", + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-meta/demo/index.html b/dashboard-ui/bower_components/iron-meta/demo/index.html new file mode 100644 index 0000000000..3deee3cbd5 --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/demo/index.html @@ -0,0 +1,46 @@ + + + + + + + + + iron-meta + + + + + + + +
+

<iron-meta>

+ + The value stored at key="info" is . +
+ + + + + diff --git a/dashboard-ui/bower_components/iron-meta/hero.svg b/dashboard-ui/bower_components/iron-meta/hero.svg new file mode 100644 index 0000000000..ea8548dcec --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/hero.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-meta/index.html b/dashboard-ui/bower_components/iron-meta/index.html new file mode 100644 index 0000000000..c70dc6e5da --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/index.html @@ -0,0 +1,27 @@ + + + + + + + + iron-meta + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/iron-meta/iron-meta.html b/dashboard-ui/bower_components/iron-meta/iron-meta.html similarity index 86% rename from dashboard-ui/thirdparty/iron-meta/iron-meta.html rename to dashboard-ui/bower_components/iron-meta/iron-meta.html index 10addd767b..c9d16f9be9 100644 --- a/dashboard-ui/thirdparty/iron-meta/iron-meta.html +++ b/dashboard-ui/bower_components/iron-meta/iron-meta.html @@ -25,25 +25,25 @@ Examples: If I create an instance like this: - + -Note that keyUrl="foo/bar" is the metadata I've defined. I could define more +Note that value="foo/bar" is the metadata I've defined. I could define more attributes or use child nodes to define additional metadata. Now I can access that element (and it's metadata) from any iron-meta instance via the byKey method, e.g. - meta.byKey('info').getAttribute('keyUrl'). + meta.byKey('info').getAttribute('value'). Pure imperative form would be like: - document.createElement('iron-meta').byKey('info').getAttribute('keyUrl'); + document.createElement('iron-meta').byKey('info').getAttribute('value'); Or, in a Polymer element, you can include a meta in your template: ... - this.$.meta.byKey('info').getAttribute('keyUrl'); + this.$.meta.byKey('info').getAttribute('value'); @group Iron Elements @demo demo/index.html @@ -68,10 +68,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * The type of meta-data. All meta-data of the same type is stored * together. - * - * @attribute type - * @type String - * @default 'default' */ type: { type: String, @@ -81,10 +77,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * The key used to store `value` under the `type` namespace. - * - * @attribute key - * @type String - * @default '' */ key: { type: String, @@ -93,10 +85,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * The meta-data to store or retrieve. - * - * @attribute value - * @type * - * @default this */ value: { type: Object, @@ -106,10 +94,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * If true, `value` is set to the iron-meta instance itself. - * - * @attribute self - * @type Boolean - * @default false */ self: { type: Boolean, @@ -118,9 +102,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * Array of all meta-data values for the given type. - * - * @property list - * @type Array */ list: { type: Array, @@ -232,7 +213,7 @@ Or, in a Polymer element, you can include a meta in your template: - Note that keyUrl="foo/bar" is the metadata I've defined. I could define more + Note that value="foo/bar" is the metadata I've defined. I could define more attributes or use child nodes to define additional metadata. Now I can access that element (and it's metadata) from any `iron-meta-query` instance: @@ -251,10 +232,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * The type of meta-data. All meta-data of the same type is stored * together. - * - * @attribute type - * @type String - * @default 'default' */ type: { type: String, @@ -265,9 +242,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * Specifies a key to use for retrieving `value` from the `type` * namespace. - * - * @attribute key - * @type String */ key: { type: String, @@ -276,10 +250,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * The meta-data to store or retrieve. - * - * @attribute value - * @type * - * @default this */ value: { type: Object, @@ -289,9 +259,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * Array of all meta-data values for the given type. - * - * @property list - * @type Array */ list: { type: Array, @@ -304,7 +271,7 @@ Or, in a Polymer element, you can include a meta in your template: * Actually a factory method, not a true constructor. Only runs if * someone invokes it directly (via `new Polymer.IronMeta()`); */ - constructor: function(config) { + factoryImpl: function(config) { if (config) { for (var n in config) { switch(n) { @@ -337,10 +304,6 @@ Or, in a Polymer element, you can include a meta in your template: /** * Retrieves meta data value by key. - * - * @method byKey - * @param {String} key The key of the meta-data to be returned. - * @returns * */ byKey: function(key) { return this._metaData && this._metaData[key]; diff --git a/dashboard-ui/bower_components/iron-meta/test/basic.html b/dashboard-ui/bower_components/iron-meta/test/basic.html new file mode 100644 index 0000000000..c561dc3cac --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/test/basic.html @@ -0,0 +1,48 @@ + + + + + + + iron-meta-basic + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-meta/test/index.html b/dashboard-ui/bower_components/iron-meta/test/index.html new file mode 100644 index 0000000000..2b9541b73a --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/test/index.html @@ -0,0 +1,30 @@ + + + + + + + + Tests + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-meta/test/iron-meta.html b/dashboard-ui/bower_components/iron-meta/test/iron-meta.html new file mode 100644 index 0000000000..c1a40282eb --- /dev/null +++ b/dashboard-ui/bower_components/iron-meta/test/iron-meta.html @@ -0,0 +1,186 @@ + + + + + + + iron-meta + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json new file mode 100644 index 0000000000..7a37c57322 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json @@ -0,0 +1,47 @@ +{ + "name": "iron-overlay-behavior", + "version": "1.0.2", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Provides a behavior for making an element an overlay", + "private": true, + "main": [ + "iron-overlay-behavior.html" + ], + "keywords": [ + "web-components", + "polymer", + "behavior", + "overlay" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-overlay-behavior.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.0.0", + "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/PolymerElements/iron-overlay-behavior", + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "e84965cddda459c9e4a24e8d442c56ba4d5823eb" + }, + "_source": "git://github.com/PolymerElements/iron-overlay-behavior.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/iron-overlay-behavior" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.gitignore b/dashboard-ui/bower_components/iron-overlay-behavior/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json new file mode 100644 index 0000000000..de2114bf32 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json @@ -0,0 +1,37 @@ +{ + "name": "iron-overlay-behavior", + "version": "1.0.2", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Provides a behavior for making an element an overlay", + "private": true, + "main": [ + "iron-overlay-behavior.html" + ], + "keywords": [ + "web-components", + "polymer", + "behavior", + "overlay" + ], + "authors": [ + "The Polymer Authors" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-overlay-behavior.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.0.0", + "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0" + }, + "devDependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.2", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html new file mode 100644 index 0000000000..4fc6bb0aa1 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html @@ -0,0 +1,149 @@ + + + + + + simple-overlay demo + + + + + + + + + + + + + + + + + + + +
+ + + + Hello world! + + + + + +

This dialog scrolls internally.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + + + +

This dialog has a scrolling child.

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+
+ + + + +

click to open another overlay

+

+
+ + + Hi! + + + + + + Hello world! + + + + + +

Hello world!

+ + +
+ +
+ + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/demo/simple-overlay.html b/dashboard-ui/bower_components/iron-overlay-behavior/demo/simple-overlay.html new file mode 100644 index 0000000000..fbf305ed35 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/demo/simple-overlay.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/index.html b/dashboard-ui/bower_components/iron-overlay-behavior/index.html new file mode 100644 index 0000000000..d69e30442e --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/index.html @@ -0,0 +1,30 @@ + + + + + + + + + iron-overlay-behavior + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html new file mode 100644 index 0000000000..5682c28505 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html new file mode 100644 index 0000000000..c4db372082 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html @@ -0,0 +1,433 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html new file mode 100644 index 0000000000..c66f9aa77c --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html @@ -0,0 +1,107 @@ + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/test/index.html b/dashboard-ui/bower_components/iron-overlay-behavior/test/index.html new file mode 100644 index 0000000000..9041313cfc --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/test/index.html @@ -0,0 +1,34 @@ + + + + + + iron-overlay-behavior tests + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html new file mode 100644 index 0000000000..4829439f0b --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html @@ -0,0 +1,314 @@ + + + + + + iron-overlay-behavior tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/test/test-overlay.html b/dashboard-ui/bower_components/iron-overlay-behavior/test/test-overlay.html new file mode 100644 index 0000000000..96adc56929 --- /dev/null +++ b/dashboard-ui/bower_components/iron-overlay-behavior/test/test-overlay.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/.bower.json b/dashboard-ui/bower_components/iron-resizable-behavior/.bower.json new file mode 100644 index 0000000000..17f59dfe53 --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/.bower.json @@ -0,0 +1,40 @@ +{ + "name": "iron-resizable-behavior", + "version": "1.0.1", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Coordinates the flow of resizeable elements", + "private": true, + "main": "iron-resizable-behavior.html", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "iron", + "behavior" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-resizable-behavior.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/PolymerElements/iron-resizable-behavior", + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "fd3e34efaadba638c4d28af16061e4089f298c3a" + }, + "_source": "git://github.com/PolymerElements/iron-resizable-behavior.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/iron-resizable-behavior" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/.gitignore b/dashboard-ui/bower_components/iron-resizable-behavior/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/bower.json b/dashboard-ui/bower_components/iron-resizable-behavior/bower.json new file mode 100644 index 0000000000..ba1ce0bd35 --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/bower.json @@ -0,0 +1,30 @@ +{ + "name": "iron-resizable-behavior", + "version": "1.0.1", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Coordinates the flow of resizeable elements", + "private": true, + "main": "iron-resizable-behavior.html", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "iron", + "behavior" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-resizable-behavior.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/demo/index.html b/dashboard-ui/bower_components/iron-resizable-behavior/demo/index.html new file mode 100644 index 0000000000..2896c50d25 --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/demo/index.html @@ -0,0 +1,29 @@ + + + + + + + iron-resizable-behavior demo + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/demo/src/x-app.html b/dashboard-ui/bower_components/iron-resizable-behavior/demo/src/x-app.html new file mode 100644 index 0000000000..c334ad3d2f --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/demo/src/x-app.html @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/index.html b/dashboard-ui/bower_components/iron-resizable-behavior/index.html new file mode 100644 index 0000000000..b9b8809560 --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/index.html @@ -0,0 +1,25 @@ + + + + + + + iron-resizable-behavior + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/iron-resizable-behavior.html b/dashboard-ui/bower_components/iron-resizable-behavior/iron-resizable-behavior.html new file mode 100644 index 0000000000..3529b4d0ea --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/iron-resizable-behavior.html @@ -0,0 +1,139 @@ + + + + + + diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/test/basic.html b/dashboard-ui/bower_components/iron-resizable-behavior/test/basic.html new file mode 100644 index 0000000000..0ae890d3b5 --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/test/basic.html @@ -0,0 +1,263 @@ + + + + + + + iron-resizable-behavior tests + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/test/index.html b/dashboard-ui/bower_components/iron-resizable-behavior/test/index.html new file mode 100644 index 0000000000..499f18bae0 --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/test/index.html @@ -0,0 +1,31 @@ + + + + + + + + Tests + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/test/test-elements.html b/dashboard-ui/bower_components/iron-resizable-behavior/test/test-elements.html new file mode 100644 index 0000000000..c4c9eac0f6 --- /dev/null +++ b/dashboard-ui/bower_components/iron-resizable-behavior/test/test-elements.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json new file mode 100644 index 0000000000..31050826e9 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/.bower.json @@ -0,0 +1,41 @@ +{ + "name": "iron-selector", + "version": "1.0.2", + "description": "Manages a set of elements that can be selected", + "private": true, + "license": "http://polymer.github.io/LICENSE.txt", + "main": [ + "iron-selector.html" + ], + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "selector" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-selector.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/PolymerElements/iron-selector", + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "ea22d91d11ba6f72c01faa952d5e600f9d1773cf" + }, + "_source": "git://github.com/PolymerElements/iron-selector.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/iron-selector" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-selector/.gitignore b/dashboard-ui/bower_components/iron-selector/.gitignore new file mode 100644 index 0000000000..b13058c3b8 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/.gitignore @@ -0,0 +1,2 @@ +bower_components +.DS_Store diff --git a/dashboard-ui/bower_components/iron-selector/bower.json b/dashboard-ui/bower_components/iron-selector/bower.json new file mode 100644 index 0000000000..b9751df128 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/bower.json @@ -0,0 +1,31 @@ +{ + "name": "iron-selector", + "version": "1.0.2", + "description": "Manages a set of elements that can be selected", + "private": true, + "license": "http://polymer.github.io/LICENSE.txt", + "main": [ + "iron-selector.html" + ], + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "selector" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/iron-selector.git" + }, + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/iron-selector/demo/index.html b/dashboard-ui/bower_components/iron-selector/demo/index.html new file mode 100644 index 0000000000..cdb7f99e21 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/demo/index.html @@ -0,0 +1,66 @@ + + + + + + + iron-selector + + + + + + + + + + + + +

Basic

+ + +
Item 0
+
Item 1
+
Item 2
+
Item 3
+
Item 4
+
+ +

Multi-select

+ + +
Item 0
+
Item 1
+
Item 2
+
Item 3
+
Item 4
+
+ +

Example

+ + +
Foo
+
Bar
+
Zot
+
+ + + diff --git a/dashboard-ui/bower_components/iron-selector/index.html b/dashboard-ui/bower_components/iron-selector/index.html new file mode 100644 index 0000000000..741693ce70 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/index.html @@ -0,0 +1,28 @@ + + + + + + + iron-selector + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/iron-multi-selectable.html b/dashboard-ui/bower_components/iron-selector/iron-multi-selectable.html new file mode 100644 index 0000000000..ba9455ded2 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/iron-multi-selectable.html @@ -0,0 +1,120 @@ + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/iron-selectable.html b/dashboard-ui/bower_components/iron-selector/iron-selectable.html new file mode 100644 index 0000000000..f0506d58d9 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/iron-selectable.html @@ -0,0 +1,307 @@ + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/iron-selection.html b/dashboard-ui/bower_components/iron-selector/iron-selection.html new file mode 100644 index 0000000000..0ff04cfae4 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/iron-selection.html @@ -0,0 +1,115 @@ + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/iron-selector.html b/dashboard-ui/bower_components/iron-selector/iron-selector.html new file mode 100644 index 0000000000..92abe04f1b --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/iron-selector.html @@ -0,0 +1,71 @@ + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/activate-event.html b/dashboard-ui/bower_components/iron-selector/test/activate-event.html new file mode 100644 index 0000000000..8390548f46 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/activate-event.html @@ -0,0 +1,138 @@ + + + + + + + iron-selector-activate-event + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/basic.html b/dashboard-ui/bower_components/iron-selector/test/basic.html new file mode 100644 index 0000000000..602de183f8 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/basic.html @@ -0,0 +1,150 @@ + + + + + + + iron-selector-basic + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/content-element.html b/dashboard-ui/bower_components/iron-selector/test/content-element.html new file mode 100644 index 0000000000..d0cd6d7205 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/content-element.html @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/content.html b/dashboard-ui/bower_components/iron-selector/test/content.html new file mode 100644 index 0000000000..e869f98d5b --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/content.html @@ -0,0 +1,168 @@ + + + + + + + iron-selector-content + + + + + + + + + + + + + + + + +
item0
+
item1
+
item2
+
item3
+
+ + + item0 +
+ item1 + item2 +
+ item3 +
+ + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/index.html b/dashboard-ui/bower_components/iron-selector/test/index.html new file mode 100644 index 0000000000..17d7e4be57 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/index.html @@ -0,0 +1,36 @@ + + + + + + + + Tests + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/multi.html b/dashboard-ui/bower_components/iron-selector/test/multi.html new file mode 100644 index 0000000000..fdc31c716e --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/multi.html @@ -0,0 +1,135 @@ + + + + + + + iron-selector-multi + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/next-previous.html b/dashboard-ui/bower_components/iron-selector/test/next-previous.html new file mode 100644 index 0000000000..3a830c2915 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/next-previous.html @@ -0,0 +1,134 @@ + + + + + + + iron-selector-next-previous + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/selected-attribute.html b/dashboard-ui/bower_components/iron-selector/test/selected-attribute.html new file mode 100644 index 0000000000..3e1ecaf1a0 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/selected-attribute.html @@ -0,0 +1,72 @@ + + + + + + + iron-selector-selected-attribute + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/test/template-repeat.html b/dashboard-ui/bower_components/iron-selector/test/template-repeat.html new file mode 100644 index 0000000000..eae2729508 --- /dev/null +++ b/dashboard-ui/bower_components/iron-selector/test/template-repeat.html @@ -0,0 +1,110 @@ + + + + + + + iron-selector-template-repeat + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/.bower.json b/dashboard-ui/bower_components/neon-animation/.bower.json new file mode 100644 index 0000000000..9d394ec45e --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/.bower.json @@ -0,0 +1,60 @@ +{ + "name": "neon-animation", + "version": "1.0.1", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "web-animations" + ], + "main": [ + "neon-animatable-behavior.html", + "neon-animation-behavior.html", + "neon-animation-runner-behavior.html", + "neon-shared-element-animatable-behavior.html", + "neon-shared-element-animation-behavior.html", + "neon-animated-pages.html", + "neon-animatable.html", + "neon-animations.html" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/neon-animation" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/neon-animation", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-meta": "PolymerElements/iron-meta#^1.0.0", + "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0", + "iron-selector": "PolymerElements/iron-selector#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "web-animations-js": "web-animations/web-animations-js#^2.0.0" + }, + "devDependencies": { + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "paper-item": "PolymerElements/paper-item#^1.0.0", + "iron-icon": "PolymerElements/iron-icon#^1.0.0", + "iron-icons": "PolymerElements/iron-icons#^1.0.0", + "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" + }, + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "160f14c31b4692cc8073b67e8849e444b0695cde" + }, + "_source": "git://github.com/PolymerElements/neon-animation.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/neon-animation" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/neon-animation/.gitignore b/dashboard-ui/bower_components/neon-animation/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/neon-animation/animations/cascaded-animation.html b/dashboard-ui/bower_components/neon-animation/animations/cascaded-animation.html new file mode 100644 index 0000000000..9e089e99b5 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/cascaded-animation.html @@ -0,0 +1,84 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/fade-in-animation.html b/dashboard-ui/bower_components/neon-animation/animations/fade-in-animation.html new file mode 100644 index 0000000000..cdb74e3095 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/fade-in-animation.html @@ -0,0 +1,49 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/fade-out-animation.html b/dashboard-ui/bower_components/neon-animation/animations/fade-out-animation.html new file mode 100644 index 0000000000..82cc3997cf --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/fade-out-animation.html @@ -0,0 +1,49 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/hero-animation.html b/dashboard-ui/bower_components/neon-animation/animations/hero-animation.html new file mode 100644 index 0000000000..689156168e --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/hero-animation.html @@ -0,0 +1,83 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/opaque-animation.html b/dashboard-ui/bower_components/neon-animation/animations/opaque-animation.html new file mode 100644 index 0000000000..f5b60a4514 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/opaque-animation.html @@ -0,0 +1,46 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/ripple-animation.html b/dashboard-ui/bower_components/neon-animation/animations/ripple-animation.html new file mode 100644 index 0000000000..afc61f63a3 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/ripple-animation.html @@ -0,0 +1,92 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/scale-down-animation.html b/dashboard-ui/bower_components/neon-animation/animations/scale-down-animation.html new file mode 100644 index 0000000000..6dc187b317 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/scale-down-animation.html @@ -0,0 +1,65 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/scale-up-animation.html b/dashboard-ui/bower_components/neon-animation/animations/scale-up-animation.html new file mode 100644 index 0000000000..43d3d46199 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/scale-up-animation.html @@ -0,0 +1,58 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/slide-down-animation.html b/dashboard-ui/bower_components/neon-animation/animations/slide-down-animation.html new file mode 100644 index 0000000000..83c1f9bfd7 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/slide-down-animation.html @@ -0,0 +1,59 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/slide-from-left-animation.html b/dashboard-ui/bower_components/neon-animation/animations/slide-from-left-animation.html new file mode 100644 index 0000000000..d248175221 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/slide-from-left-animation.html @@ -0,0 +1,60 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/slide-from-right-animation.html b/dashboard-ui/bower_components/neon-animation/animations/slide-from-right-animation.html new file mode 100644 index 0000000000..4ebbf11b86 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/slide-from-right-animation.html @@ -0,0 +1,60 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/slide-left-animation.html b/dashboard-ui/bower_components/neon-animation/animations/slide-left-animation.html new file mode 100644 index 0000000000..7fbc446bcc --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/slide-left-animation.html @@ -0,0 +1,59 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/slide-right-animation.html b/dashboard-ui/bower_components/neon-animation/animations/slide-right-animation.html new file mode 100644 index 0000000000..e6441c4f38 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/slide-right-animation.html @@ -0,0 +1,59 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/slide-up-animation.html b/dashboard-ui/bower_components/neon-animation/animations/slide-up-animation.html new file mode 100644 index 0000000000..fdf1186d16 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/slide-up-animation.html @@ -0,0 +1,59 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/animations/transform-animation.html b/dashboard-ui/bower_components/neon-animation/animations/transform-animation.html new file mode 100644 index 0000000000..b0d7af5113 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/animations/transform-animation.html @@ -0,0 +1,61 @@ + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/bower.json b/dashboard-ui/bower_components/neon-animation/bower.json new file mode 100644 index 0000000000..4e687f6779 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/bower.json @@ -0,0 +1,51 @@ +{ + "name": "neon-animation", + "version": "1.0.1", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "web-animations" + ], + "main": [ + "neon-animatable-behavior.html", + "neon-animation-behavior.html", + "neon-animation-runner-behavior.html", + "neon-shared-element-animatable-behavior.html", + "neon-shared-element-animation-behavior.html", + "neon-animated-pages.html", + "neon-animatable.html", + "neon-animations.html" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/neon-animation" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/neon-animation", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-meta": "PolymerElements/iron-meta#^1.0.0", + "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0", + "iron-selector": "PolymerElements/iron-selector#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "web-animations-js": "web-animations/web-animations-js#^2.0.0" + }, + "devDependencies": { + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "paper-item": "PolymerElements/paper-item#^1.0.0", + "iron-icon": "PolymerElements/iron-icon#^1.0.0", + "iron-icons": "PolymerElements/iron-icons#^1.0.0", + "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0" + } +} diff --git a/dashboard-ui/bower_components/neon-animation/demo/declarative/index.html b/dashboard-ui/bower_components/neon-animation/demo/declarative/index.html new file mode 100644 index 0000000000..9385bccaa3 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/declarative/index.html @@ -0,0 +1,108 @@ + + + + + neon-animated-pages demo: declarative + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/doc/basic.html b/dashboard-ui/bower_components/neon-animation/demo/doc/basic.html new file mode 100644 index 0000000000..9e79151eea --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/doc/basic.html @@ -0,0 +1,47 @@ + + + + + neon-animation demo: basic + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/doc/my-animatable.html b/dashboard-ui/bower_components/neon-animation/demo/doc/my-animatable.html new file mode 100644 index 0000000000..ec74536fa8 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/doc/my-animatable.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/doc/my-dialog.html b/dashboard-ui/bower_components/neon-animation/demo/doc/my-dialog.html new file mode 100644 index 0000000000..64bb3003fe --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/doc/my-dialog.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/doc/types.html b/dashboard-ui/bower_components/neon-animation/demo/doc/types.html new file mode 100644 index 0000000000..3995b6c931 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/doc/types.html @@ -0,0 +1,53 @@ + + + + + neon-animation demo: basic + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/dropdown/animated-dropdown.html b/dashboard-ui/bower_components/neon-animation/demo/dropdown/animated-dropdown.html new file mode 100644 index 0000000000..87678f5c1e --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/dropdown/animated-dropdown.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/dropdown/index.html b/dashboard-ui/bower_components/neon-animation/demo/dropdown/index.html new file mode 100644 index 0000000000..34cf8219d0 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/dropdown/index.html @@ -0,0 +1,54 @@ + + + + + neon-animated-pages demo: dropdown + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/grid/animated-grid.html b/dashboard-ui/bower_components/neon-animation/demo/grid/animated-grid.html new file mode 100644 index 0000000000..af976754c1 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/grid/animated-grid.html @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/grid/fullsize-page-with-card.html b/dashboard-ui/bower_components/neon-animation/demo/grid/fullsize-page-with-card.html new file mode 100644 index 0000000000..a365394e4d --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/grid/fullsize-page-with-card.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/grid/index.html b/dashboard-ui/bower_components/neon-animation/demo/grid/index.html new file mode 100644 index 0000000000..8b34434de8 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/grid/index.html @@ -0,0 +1,70 @@ + + + + + neon-animated-pages demo: grid + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/index.html b/dashboard-ui/bower_components/neon-animation/demo/index.html new file mode 100644 index 0000000000..3198424603 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/index.html @@ -0,0 +1,6 @@ +declarative
+dropdown
+grid
+list
+load
+tiles
diff --git a/dashboard-ui/bower_components/neon-animation/demo/list/full-view.html b/dashboard-ui/bower_components/neon-animation/demo/list/full-view.html new file mode 100644 index 0000000000..817acfab9f --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/list/full-view.html @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/list/index.html b/dashboard-ui/bower_components/neon-animation/demo/list/index.html new file mode 100644 index 0000000000..4ee8337180 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/list/index.html @@ -0,0 +1,29 @@ + + + + + neon-animated-pages demo: list + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/list/list-demo.html b/dashboard-ui/bower_components/neon-animation/demo/list/list-demo.html new file mode 100644 index 0000000000..6658ebfd01 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/list/list-demo.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/list/list-view.html b/dashboard-ui/bower_components/neon-animation/demo/list/list-view.html new file mode 100644 index 0000000000..b23b00d4d0 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/list/list-view.html @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/load/animated-grid.html b/dashboard-ui/bower_components/neon-animation/demo/load/animated-grid.html new file mode 100644 index 0000000000..f43851b45b --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/load/animated-grid.html @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/load/full-page.html b/dashboard-ui/bower_components/neon-animation/demo/load/full-page.html new file mode 100644 index 0000000000..1488de19c2 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/load/full-page.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/load/index.html b/dashboard-ui/bower_components/neon-animation/demo/load/index.html new file mode 100644 index 0000000000..3c22281f60 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/load/index.html @@ -0,0 +1,45 @@ + + + + + neon-animated-pages demo: load + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/reprojection/animated-grid.html b/dashboard-ui/bower_components/neon-animation/demo/reprojection/animated-grid.html new file mode 100644 index 0000000000..e65ba51e1b --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/reprojection/animated-grid.html @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/reprojection/fullsize-page-with-card.html b/dashboard-ui/bower_components/neon-animation/demo/reprojection/fullsize-page-with-card.html new file mode 100644 index 0000000000..a365394e4d --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/reprojection/fullsize-page-with-card.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/reprojection/index.html b/dashboard-ui/bower_components/neon-animation/demo/reprojection/index.html new file mode 100644 index 0000000000..acd196eaaf --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/reprojection/index.html @@ -0,0 +1,66 @@ + + + + + neon-animated-pages demo: grid + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/reprojection/reprojected-pages.html b/dashboard-ui/bower_components/neon-animation/demo/reprojection/reprojected-pages.html new file mode 100644 index 0000000000..647289dc15 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/reprojection/reprojected-pages.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/shared.css b/dashboard-ui/bower_components/neon-animation/demo/shared.css new file mode 100644 index 0000000000..fc1011fe3c --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/shared.css @@ -0,0 +1,40 @@ +/* +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +.red-100 { + background: var(--google-red-100); +} + +.yellow-100 { + background: var(--google-yellow-100); +} + +.blue-100 { + background: var(--google-blue-100); +} + +.green-100 { + background: var(--google-green-100); +} + +.red-300 { + background: var(--google-red-300); +} + +.yellow-300 { + background: var(--google-yellow-300); +} + +.blue-300 { + background: var(--google-blue-300); +} + +.green-300 { + background: var(--google-green-300); +} diff --git a/dashboard-ui/bower_components/neon-animation/demo/tiles/circles-page.html b/dashboard-ui/bower_components/neon-animation/demo/tiles/circles-page.html new file mode 100644 index 0000000000..566d69b67f --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/tiles/circles-page.html @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/tiles/index.html b/dashboard-ui/bower_components/neon-animation/demo/tiles/index.html new file mode 100644 index 0000000000..0afec46ce4 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/tiles/index.html @@ -0,0 +1,77 @@ + + + + + neon-animated-pages demo: tiles + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/demo/tiles/squares-page.html b/dashboard-ui/bower_components/neon-animation/demo/tiles/squares-page.html new file mode 100644 index 0000000000..f417e6b9c5 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/demo/tiles/squares-page.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/guides/neon-animation.md b/dashboard-ui/bower_components/neon-animation/guides/neon-animation.md new file mode 100644 index 0000000000..7af1659a7e --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/guides/neon-animation.md @@ -0,0 +1,313 @@ +--- +title: neon-animation +summary: "A short guide to neon-animation and neon-animated-pages" +tags: ['animation','core-animated-pages'] +elements: ['neon-animation','neon-animated-pages'] +updated: 2015-05-26 +--- + +# neon-animation + +`neon-animation` is a suite of elements and behaviors to implement pluggable animated transitions for Polymer Elements using [Web Animations](https://w3c.github.io/web-animations/). + +*Warning: The API may change.* + +* [A basic animatable element](#basic) +* [Animation configuration](#configuration) + * [Animation types](#configuration-types) + * [Configuration properties](#configuration-properties) + * [Using multiple animations](#configuration-multiple) + * [Running animations encapsulated in children nodes](#configuration-encapsulation) +* [Page transitions](#page-transitions) + * [Shared element animations](#shared-element) + * [Declarative page transitions](#declarative-page) +* [Included animations](#animations) +* [Demos](#demos) + + +## A basic animatable element + +Elements that can be animated should implement the `Polymer.NeonAnimatableBehavior` behavior, or `Polymer.NeonAnimationRunnerBehavior` if they're also responsible for running an animation. + +```js +Polymer({ + is: 'my-animatable', + behaviors: [ + Polymer.NeonAnimationRunnerBehavior + ], + properties: { + animationConfig: { + value: function() { + return { + // provided by neon-animation/animations/scale-down-animation.html + name: 'scale-down-animation', + node: this + } + } + } + }, + listeners: { + // this event is fired when the animation finishes + 'neon-animation-finish': '_onNeonAnimationFinish' + }, + animate: function() { + // run scale-down-animation + this.playAnimation(); + }, + _onNeonAnimationFinish: function() { + console.log('animation done!'); + } +}); +``` + +[Live demo](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/doc/basic.html) + + +## Animation configuration + + +### Animation types + +An element might run different animations, for example it might do something different when it enters the view and when it exits from view. You can set the `animationConfig` property to a map from an animation type to configuration. + +```js +Polymer({ + is: 'my-dialog', + behaviors: [ + Polymer.NeonAnimationRunnerBehavior + ], + properties: { + opened: { + type: Boolean + }, + animationConfig: { + value: function() { + return { + 'entry': { + // provided by neon-animation/animations/scale-up-animation.html + name: 'scale-up-animation', + node: this + }, + 'exit': { + // provided by neon-animation-animations/fade-out-animation.html + name: 'fade-out-animation', + node: this + } + } + } + } + }, + listeners: { + 'neon-animation-finish': '_onNeonAnimationFinish' + }, + show: function() { + this.opened = true; + this.style.display = 'inline-block'; + // run scale-up-animation + this.playAnimation('entry'); + }, + hide: function() { + this.opened = false; + // run fade-out-animation + this.playAnimation('fade-out-animation'); + }, + _onNeonAnimationFinish: function() { + if (!this.opened) { + this.style.display = 'none'; + } + } +}); +``` + +[Live demo](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/doc/types.html) + +You can also use the convenience properties `entryAnimation` and `exitAnimation` to set `entry` and `exit` animations: + +```js +properties: { + entryAnimation: { + value: 'scale-up-animation' + }, + exitAnimation: { + value: 'fade-out-animation' + } +} +``` + + +### Configuration properties + +You can pass additional parameters to configure an animation in the animation configuration object. +All animations should accept the following properties: + + * `name`: The name of an animation, ie. an element implementing `Polymer.NeonAnimationBehavior`. + * `node`: The target node to apply the animation to. Defaults to `this`. + * `timing`: Timing properties to use in this animation. They match the [Web Animations Animation Effect Timing interface](https://w3c.github.io/web-animations/#the-animationeffecttiming-interface). The + properties include the following: + * `duration`: The duration of the animation in milliseconds. + * `delay`: The delay before the start of the animation in milliseconds. + * `easing`: A timing function for the animation. Matches the CSS timing function values. + +Animations may define additional configuration properties and they are listed in their documentation. + + +### Using multiple animations + +Set the animation configuration to an array to combine animations, like this: + +```js +animationConfig: { + value: function() { + return { + // fade-in-animation is run with a 50ms delay from slide-down-animation + 'entry': [{ + name: 'slide-down-animation', + node: this + }, { + name: 'fade-in-animation', + node: this, + timing: {delay: 50} + }] + } + } +} +``` + + +### Running animations encapsulated in children nodes + +You can include animations in the configuration that are encapsulated in a child element that implement `Polymer.NeonAnimatableBehavior` with the `animatable` property. + +```js +animationConfig: { + value: function() { + return { + // run fade-in-animation on this, and the entry animation on this.$.myAnimatable + 'entry': [ + {name: 'fade-in-animation', node: this}, + {animatable: this.$.myAnimatable, type: 'entry'} + ] + } + } +} +``` + + +## Page transitions + +*The artist formerly known as ``* + +The `neon-animated-pages` element manages a set of pages to switch between, and runs animations between the page transitions. It implements the `Polymer.IronSelectableBehavior` behavior. Each child node should implement `Polymer.NeonAnimatableBehavior` and define the `entry` and `exit` animations. During a page transition, the `entry` animation is run on the new page and the `exit` animation is run on the old page. + + +### Shared element animations + +Shared element animations work on multiple nodes. For example, a "hero" animation is used during a page transition to make two elements from separate pages appear to animate as a single element. Shared element animation configurations have an `id` property that identify they belong in the same animation. Elements containing shared elements also have a `sharedElements` property defines a map from `id` to element, the element involved with the animation. + +In the incoming page: + +```js +properties: { + animationConfig: { + value: function() { + return { + // the incoming page defines the 'entry' animation + 'entry': { + name: 'hero-animation', + id: 'hero', + toPage: this + } + } + } + }, + sharedElements: { + value: function() { + return { + 'hero': this.$.hero + } + } + } +} +``` + +In the outgoing page: + +```js +properties: { + animationConfig: { + value: function() { + return { + // the outgoing page defines the 'exit' animation + 'exit': { + name: 'hero-animation', + id: 'hero', + fromPage: this + } + } + } + }, + sharedElements: { + value: function() { + return { + 'hero': this.$.otherHero + } + } + } +} +``` + + +### Declarative page transitions + +For convenience, if you define the `entry-animation` and `exit-animation` attributes on ``, those animations will apply for all page transitions. + +For example: + +```js + + 1 + 2 + 3 + 4 + 5 + +``` + +The new page will slide in from the right, and the old page slide away to the left. + + +## Included animations + +Single element animations: + + * `fade-in-animation` Animates opacity from `0` to `1`. + * `fade-out-animation` Animates opacity from `1` to `0`. + * `scale-down-animation` Animates transform from `scale(1)` to `scale(0)`. + * `scale-up-animation` Animates transform from `scale(0)` to `scale(1)`. + * `slide-down-animation` Animates transform from `translateY(-100%)` to `none`. + * `slide-up-animation` Animates transform from `none` to `translateY(-100%)`. + * `slide-left-animation` Animates transform from `none` to `translateX(-100%)`; + * `slide-right-animation` Animates transform from `none` to `translateX(100%)`; + * `slide-from-left-animation` Animates transform from `translateX(-100%)` to `none`; + * `slide-from-right-animation` Animates transform from `translateX(100%)` to `none`; + + * `transform-animation` Animates a custom transform. + +Note that there is a restriction that only one transform animation can be applied on the same element at a time. Use the custom `transform-animation` to combine transform properties. + +Shared element animations + + * `hero-animation` Animates an element such that it looks like it scales and transforms from another element. + * `ripple-animation` Animates an element to full screen such that it looks like it ripples from another element. + +Group animations + * `cascaded-animation` Applys an animation to an array of elements with a delay between each. + + +## Demos + + * [Grid to full screen](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/grid/index.html) + * [Animation on load](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/load/index.html) + * [List item to detail](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/list/index.html) (For narrow width) + * [Dots to squares](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/tiles/index.html) + * [Declarative](http://morethanreal.github.io/neon-animation-demo/bower_components/neon-animation/demo/declarative/index.html) diff --git a/dashboard-ui/bower_components/neon-animation/index.html b/dashboard-ui/bower_components/neon-animation/index.html new file mode 100644 index 0000000000..6f5feedf45 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/index.html @@ -0,0 +1,30 @@ + + + + + + + + + neon-animation + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-animatable-behavior.html b/dashboard-ui/bower_components/neon-animation/neon-animatable-behavior.html new file mode 100644 index 0000000000..fac56f8081 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-animatable-behavior.html @@ -0,0 +1,156 @@ + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-animatable.html b/dashboard-ui/bower_components/neon-animation/neon-animatable.html new file mode 100644 index 0000000000..6db9d83d8b --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-animatable.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-animated-pages.html b/dashboard-ui/bower_components/neon-animation/neon-animated-pages.html new file mode 100644 index 0000000000..3a5259d549 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-animated-pages.html @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-animation-behavior.html b/dashboard-ui/bower_components/neon-animation/neon-animation-behavior.html new file mode 100644 index 0000000000..f3b9bc6a60 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-animation-behavior.html @@ -0,0 +1,88 @@ + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-animation-runner-behavior.html b/dashboard-ui/bower_components/neon-animation/neon-animation-runner-behavior.html new file mode 100644 index 0000000000..ce1211e466 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-animation-runner-behavior.html @@ -0,0 +1,110 @@ + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-animation.html b/dashboard-ui/bower_components/neon-animation/neon-animation.html new file mode 100644 index 0000000000..150068a3c9 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-animation.html @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-animations.html b/dashboard-ui/bower_components/neon-animation/neon-animations.html new file mode 100644 index 0000000000..f3bdf499e3 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-animations.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-shared-element-animatable-behavior.html b/dashboard-ui/bower_components/neon-animation/neon-shared-element-animatable-behavior.html new file mode 100644 index 0000000000..9d5f6e70d5 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-shared-element-animatable-behavior.html @@ -0,0 +1,37 @@ + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/neon-shared-element-animation-behavior.html b/dashboard-ui/bower_components/neon-animation/neon-shared-element-animation-behavior.html new file mode 100644 index 0000000000..88a9ccbc1a --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/neon-shared-element-animation-behavior.html @@ -0,0 +1,66 @@ + + + + + + diff --git a/dashboard-ui/bower_components/neon-animation/web-animations.html b/dashboard-ui/bower_components/neon-animation/web-animations.html new file mode 100644 index 0000000000..c871854017 --- /dev/null +++ b/dashboard-ui/bower_components/neon-animation/web-animations.html @@ -0,0 +1,11 @@ + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/.bower.json b/dashboard-ui/bower_components/paper-behaviors/.bower.json new file mode 100644 index 0000000000..7c969e4703 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/.bower.json @@ -0,0 +1,48 @@ +{ + "name": "paper-behaviors", + "version": "1.0.2", + "description": "Common behaviors across the paper elements", + "authors": [ + "The Polymer Authors" + ], + "main": [ + "paper-button-behavior.html", + "paper-radio-button-behavior.html" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "paper", + "behavior" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-behaviors" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-behaviors", + "dependencies": { + "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "paper-material": "PolymerElements/paper-material#^1.0.0", + "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "4dd226a2cc5b780a73d0058cd9998b6e0af1cb2c" + }, + "_source": "git://github.com/polymerelements/paper-behaviors.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/paper-behaviors" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-behaviors/.gitignore b/dashboard-ui/bower_components/paper-behaviors/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-behaviors/bower.json b/dashboard-ui/bower_components/paper-behaviors/bower.json new file mode 100644 index 0000000000..d4cae45d7e --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/bower.json @@ -0,0 +1,39 @@ +{ + "name": "paper-behaviors", + "version": "1.0.2", + "description": "Common behaviors across the paper elements", + "authors": [ + "The Polymer Authors" + ], + "main": [ + "paper-button-behavior.html", + "paper-radio-button-behavior.html" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "paper", + "behavior" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-behaviors" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-behaviors", + "dependencies": { + "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "paper-material": "PolymerElements/paper-material#^1.0.0", + "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-behaviors/demo/index.html b/dashboard-ui/bower_components/paper-behaviors/demo/index.html new file mode 100644 index 0000000000..d6b775b8bb --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/demo/index.html @@ -0,0 +1,57 @@ + + + + + + + + + + + paper-behaviors demo + + + + + + + + + + + +

Normal

+ + Hello World + +

Toggles

+ + Hello World + +

Disabled

+ + Hello World + +

Radio button with focus state

+ + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/demo/paper-button.html b/dashboard-ui/bower_components/paper-behaviors/demo/paper-button.html new file mode 100644 index 0000000000..c38bd00924 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/demo/paper-button.html @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/demo/paper-radio-button.html b/dashboard-ui/bower_components/paper-behaviors/demo/paper-radio-button.html new file mode 100644 index 0000000000..93af1752b5 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/demo/paper-radio-button.html @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/index.html b/dashboard-ui/bower_components/paper-behaviors/index.html new file mode 100644 index 0000000000..3e003cb3be --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/paper-behaviors/paper-button-behavior.html b/dashboard-ui/bower_components/paper-behaviors/paper-button-behavior.html similarity index 100% rename from dashboard-ui/thirdparty/paper-behaviors/paper-button-behavior.html rename to dashboard-ui/bower_components/paper-behaviors/paper-button-behavior.html diff --git a/dashboard-ui/thirdparty/paper-behaviors/paper-inky-focus-behavior.html b/dashboard-ui/bower_components/paper-behaviors/paper-inky-focus-behavior.html similarity index 100% rename from dashboard-ui/thirdparty/paper-behaviors/paper-inky-focus-behavior.html rename to dashboard-ui/bower_components/paper-behaviors/paper-inky-focus-behavior.html diff --git a/dashboard-ui/bower_components/paper-behaviors/test/index.html b/dashboard-ui/bower_components/paper-behaviors/test/index.html new file mode 100644 index 0000000000..c58bfee5cb --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/test/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/test/paper-button-behavior.html b/dashboard-ui/bower_components/paper-behaviors/test/paper-button-behavior.html new file mode 100644 index 0000000000..9663938d72 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/test/paper-button-behavior.html @@ -0,0 +1,82 @@ + + + + + + paper-button-behavior + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/test/paper-radio-button-behavior.html b/dashboard-ui/bower_components/paper-behaviors/test/paper-radio-button-behavior.html new file mode 100644 index 0000000000..890d0bb487 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/test/paper-radio-button-behavior.html @@ -0,0 +1,62 @@ + + + + + + paper-radio-button-behavior + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/test/test-button.html b/dashboard-ui/bower_components/paper-behaviors/test/test-button.html new file mode 100644 index 0000000000..3bbf356e67 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/test/test-button.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-behaviors/test/test-radio-button.html b/dashboard-ui/bower_components/paper-behaviors/test/test-radio-button.html new file mode 100644 index 0000000000..afeabbb2c0 --- /dev/null +++ b/dashboard-ui/bower_components/paper-behaviors/test/test-radio-button.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-button/.bower.json b/dashboard-ui/bower_components/paper-button/.bower.json new file mode 100644 index 0000000000..7dea19b0cf --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/.bower.json @@ -0,0 +1,49 @@ +{ + "name": "paper-button", + "version": "1.0.1", + "description": "Material design button", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "paper", + "button" + ], + "main": "paper-button.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-button" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-button", + "dependencies": { + "paper-ripple": "polymerelements/paper-ripple#^1.0.0", + "paper-material": "polymerelements/paper-material#^1.0.0", + "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "e11a0603feaaedd8cf6c7e0d533bdc67de24c8de" + }, + "_source": "git://github.com/PolymerElements/paper-button.git", + "_target": "~1.0.1", + "_originalSource": "PolymerElements/paper-button", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-button/.gitignore b/dashboard-ui/bower_components/paper-button/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-button/bower.json b/dashboard-ui/bower_components/paper-button/bower.json new file mode 100644 index 0000000000..940aa6d159 --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/bower.json @@ -0,0 +1,39 @@ +{ + "name": "paper-button", + "version": "1.0.1", + "description": "Material design button", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "paper", + "button" + ], + "main": "paper-button.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-button" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-button", + "dependencies": { + "paper-ripple": "polymerelements/paper-ripple#^1.0.0", + "paper-material": "polymerelements/paper-material#^1.0.0", + "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-button/demo/index.html b/dashboard-ui/bower_components/paper-button/demo/index.html new file mode 100644 index 0000000000..e8af2969e8 --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/demo/index.html @@ -0,0 +1,158 @@ + + + + + + + + + + + paper-button demo + + + + + + + + + + + +
+
+

Flat

+
+ button + colorful + disabled + noink + ok + cancel + +
+
+ +
+

Raised

+
+ button + colorful + disabled + noink + ok + cancel +
+
+ +
+

Toggleable

+
+ button + noink + colorful + colorful + ok + cancel +
+
+ +
+

Color

+
+ button + noink + colorful + colorful + ok + cancel +
+
+
+ + diff --git a/dashboard-ui/bower_components/paper-button/index.html b/dashboard-ui/bower_components/paper-button/index.html new file mode 100644 index 0000000000..e871f17d98 --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/paper-button/paper-button.html b/dashboard-ui/bower_components/paper-button/paper-button.html similarity index 100% rename from dashboard-ui/thirdparty/paper-button/paper-button.html rename to dashboard-ui/bower_components/paper-button/paper-button.html diff --git a/dashboard-ui/bower_components/paper-button/test/index.html b/dashboard-ui/bower_components/paper-button/test/index.html new file mode 100644 index 0000000000..07ed03ccff --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/test/index.html @@ -0,0 +1,25 @@ + + + + + + + paper-button tests + + + + + + diff --git a/dashboard-ui/bower_components/paper-button/test/paper-button.html b/dashboard-ui/bower_components/paper-button/test/paper-button.html new file mode 100644 index 0000000000..797688cefa --- /dev/null +++ b/dashboard-ui/bower_components/paper-button/test/paper-button.html @@ -0,0 +1,83 @@ + + + + + + paper-button basic tests + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/.bower.json b/dashboard-ui/bower_components/paper-dialog-behavior/.bower.json new file mode 100644 index 0000000000..532e273a47 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/.bower.json @@ -0,0 +1,46 @@ +{ + "name": "paper-dialog-behavior", + "version": "1.0.2", + "description": "Implements a behavior used for material design dialogs", + "authors": "The Polymer Authors", + "keywords": [ + "web-components", + "polymer", + "dialog", + "overlay", + "behavior" + ], + "main": [ + "paper-dialog-behavior.html" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-dialog-behavior" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-dialog-behavior", + "ignore": [], + "dependencies": { + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.4", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "paper-button": "PolymerElements/paper-button#^1.0.0", + "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "156945a20318c11bb65d0bc83ef402262c3071ca" + }, + "_source": "git://github.com/PolymerElements/paper-dialog-behavior.git", + "_target": "^1.0.0", + "_originalSource": "PolymerElements/paper-dialog-behavior" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/.gitignore b/dashboard-ui/bower_components/paper-dialog-behavior/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/bower.json b/dashboard-ui/bower_components/paper-dialog-behavior/bower.json new file mode 100644 index 0000000000..cdd57c6e61 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/bower.json @@ -0,0 +1,37 @@ +{ + "name": "paper-dialog-behavior", + "version": "1.0.2", + "description": "Implements a behavior used for material design dialogs", + "authors": "The Polymer Authors", + "keywords": [ + "web-components", + "polymer", + "dialog", + "overlay", + "behavior" + ], + "main": [ + "paper-dialog-behavior.html" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-dialog-behavior" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-dialog-behavior", + "ignore": [], + "dependencies": { + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.4", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "paper-button": "PolymerElements/paper-button#^1.0.0", + "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/demo/index.html b/dashboard-ui/bower_components/paper-dialog-behavior/demo/index.html new file mode 100644 index 0000000000..3f354e726c --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/demo/index.html @@ -0,0 +1,96 @@ + + + + + + + + + + paper-dialog-behavior demo + + + + + + + + + + + + + +
+ + + + +

Dialog Title

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + + + +

Alert

+

Discard draft?

+
+ Cancel + Discard +
+
+ + + + +

Scrolling

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+
+ Cancel + OK +
+
+ +
+ + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/demo/simple-dialog.html b/dashboard-ui/bower_components/paper-dialog-behavior/demo/simple-dialog.html new file mode 100644 index 0000000000..1bda9cdf29 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/demo/simple-dialog.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/hero.svg b/dashboard-ui/bower_components/paper-dialog-behavior/hero.svg new file mode 100644 index 0000000000..d47381685f --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/hero.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/index.html b/dashboard-ui/bower_components/paper-dialog-behavior/index.html new file mode 100644 index 0000000000..af98b85acd --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/index.html @@ -0,0 +1,30 @@ + + + + + + + + + paper-dialog-behavior + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-behavior.html b/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-behavior.html new file mode 100644 index 0000000000..227fb4dbae --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-behavior.html @@ -0,0 +1,237 @@ + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-common.css b/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-common.css new file mode 100644 index 0000000000..67bddb19c0 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/paper-dialog-common.css @@ -0,0 +1,58 @@ +/* +@license +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + margin: 24px 40px; + + background: var(--paper-dialog-background-color, --primary-background-color); + color: var(--paper-dialog-color, --primary-text-color); + + @apply(--layout-scroll); + @apply(--paper-font-body1); + @apply(--shadow-elevation-16dp); + @apply(--paper-dialog); +} + +:host > ::content > * { + margin-top: 20px; + padding: 0 24px; +} + +:host > ::content > .no-padding { + padding: 0; +}; + +:host > ::content > *:first-child { + margin-top: 24px; +} + +:host > ::content > *:last-child { + margin-bottom: 24px; +} + +:host > ::content h2 { + position: relative; + margin: 0; + @apply(--paper-font-title); + + @apply(--paper-dialog-title); +} + +:host > ::content .buttons { + position: relative; + padding: 8px 8px 8px 24px; + margin: 0; + + color: var(--paper-dialog-button-color, --default-primary-color); + + @apply(--layout-horizontal); + @apply(--layout-end-justified); +} diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/test/index.html b/dashboard-ui/bower_components/paper-dialog-behavior/test/index.html new file mode 100644 index 0000000000..7a7b2d0db8 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/test/index.html @@ -0,0 +1,34 @@ + + + + + + paper-dialog tests + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/test/paper-dialog-behavior.html b/dashboard-ui/bower_components/paper-dialog-behavior/test/paper-dialog-behavior.html new file mode 100644 index 0000000000..45680e71f0 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/test/paper-dialog-behavior.html @@ -0,0 +1,217 @@ + + + + + + paper-dialog-behavior tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-behavior/test/test-dialog.html b/dashboard-ui/bower_components/paper-dialog-behavior/test/test-dialog.html new file mode 100644 index 0000000000..6a3952a5a2 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-behavior/test/test-dialog.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/.bower.json b/dashboard-ui/bower_components/paper-dialog-scrollable/.bower.json new file mode 100644 index 0000000000..0643661d52 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/.bower.json @@ -0,0 +1,46 @@ +{ + "name": "paper-dialog-scrollable", + "version": "1.0.1", + "description": "A scrollable area used inside the material design dialog", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "dialog", + "overlay" + ], + "main": [ + "paper-dialog-scrollable.html" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-dialog-scrollable" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-dialog-scrollable", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "94e65968791d9166d2d3bf186e449d042b10168f" + }, + "_source": "git://github.com/PolymerElements/paper-dialog-scrollable.git", + "_target": "~1.0.1", + "_originalSource": "PolymerElements/paper-dialog-scrollable", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/.gitignore b/dashboard-ui/bower_components/paper-dialog-scrollable/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/bower.json b/dashboard-ui/bower_components/paper-dialog-scrollable/bower.json new file mode 100644 index 0000000000..17ae8f7d4a --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/bower.json @@ -0,0 +1,36 @@ +{ + "name": "paper-dialog-scrollable", + "version": "1.0.1", + "description": "A scrollable area used inside the material design dialog", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "dialog", + "overlay" + ], + "main": [ + "paper-dialog-scrollable.html" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-dialog-scrollable" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-dialog-scrollable", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/demo/index.html b/dashboard-ui/bower_components/paper-dialog-scrollable/demo/index.html new file mode 100644 index 0000000000..120aa8702e --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/demo/index.html @@ -0,0 +1,290 @@ + + + + + + + + + + paper-dialog-scrollable demo + + + + + + + + + + + + + +
+ +
+ Alice in Wonderland +
+ + + +

Alice was beginning to get very tired of sitting by her sister + on the bank, and of having nothing to do: once or twice she had + peeped into the book her sister was reading, but it had no + pictures or conversations in it, 'and what is the use of a book,' + thought Alice 'without pictures or conversation?'

+ +

So she was considering in her own mind (as well as she could, + for the hot day made her feel very sleepy and stupid), whether + the pleasure of making a daisy-chain would be worth the trouble + of getting up and picking the daisies, when suddenly a White + Rabbit with pink eyes ran close by her.

+ +

There was nothing so very remarkable in that; nor did + Alice think it so very much out of the way to hear the + Rabbit say to itself, 'Oh dear! Oh dear! I shall be late!' (when + she thought it over afterwards, it occurred to her that she ought + to have wondered at this, but at the time it all seemed quite + natural); but when the Rabbit actually took a watch out of its + waistcoat-pocket, and looked at it, and then hurried on, + Alice started to her feet, for it flashed across her mind that + she had never before seen a rabbit with either a + waistcoat-pocket, or a watch to take out of it, and burning with + curiosity, she ran across the field after it, and fortunately was + just in time to see it pop down a large rabbit-hole under the + hedge.

+ +

In another moment down went Alice after it, never once + considering how in the world she was to get out again.

+ +

The rabbit-hole went straight on like a tunnel for some way, + and then dipped suddenly down, so suddenly that Alice had not a + moment to think about stopping herself before she found herself + falling down a very deep well.

+ +

Either the well was very deep, or she fell very slowly, for + she had plenty of time as she went down to look about her and to + wonder what was going to happen next. First, she tried to look + down and make out what she was coming to, but it was too dark to + see anything; then she looked at the sides of the well, and + noticed that they were filled with cupboards and book-shelves; + here and there she saw maps and pictures hung upon pegs. She took + down a jar from one of the shelves as she passed; it was labelled + 'ORANGE MARMALADE', but to her great disappointment it was empty: + she did not like to drop the jar for fear of killing somebody, so + managed to put it into one of the cupboards as she fell past + it.

+ +

'Well!' thought Alice to herself, 'after such a fall as this, + I shall think nothing of tumbling down stairs! How brave they'll + all think me at home! Why, I wouldn't say anything about it, even + if I fell off the top of the house!' (Which was very likely + true.)

+ +

Down, down, down. Would the fall never come to an end! + 'I wonder how many miles I've fallen by this time?' she said + aloud. 'I must be getting somewhere near the centre of the earth. + Let me see: that would be four thousand miles down, I think--' + (for, you see, Alice had learnt several things of this sort in + her lessons in the schoolroom, and though this was not a very + good opportunity for showing off her knowledge, as there was no + one to listen to her, still it was good practice to say it over) + '--yes, that's about the right distance--but then I wonder what + Latitude or Longitude I've got to?' (Alice had no idea what + Latitude was, or Longitude either, but thought they were nice + grand words to say.)

+ +

Presently she began again. 'I wonder if I shall fall right + through the earth! How funny it'll seem to come out among + the people that walk with their heads downward! The Antipathies, + I think--' (she was rather glad there was no one listening, this + time, as it didn't sound at all the right word) '--but I shall + have to ask them what the name of the country is, you know. + Please, Ma'am, is this New Zealand or Australia?' (and she tried + to curtsey as she spoke--fancy curtseying as you're + falling through the air! Do you think you could manage it?) 'And + what an ignorant little girl she'll think me for asking! No, + it'll never do to ask: perhaps I shall see it written up + somewhere.'

+ +

Down, down, down. There was nothing else to do, so Alice soon + began talking again. 'Dinah'll miss me very much to-night, I + should think!' (Dinah was the cat.) 'I hope they'll remember her + saucer of milk at tea-time. Dinah my dear! I wish you were down + here with me! There are no mice in the air, I'm afraid, but you + might catch a bat, and that's very like a mouse, you know. But do + cats eat bats, I wonder?' And here Alice began to get rather + sleepy, and went on saying to herself, in a dreamy sort of way, + 'Do cats eat bats? Do cats eat bats?' and sometimes, 'Do bats eat + cats?' for, you see, as she couldn't answer either question, it + didn't much matter which way she put it. She felt that she was + dozing off, and had just begun to dream that she was walking hand + in hand with Dinah, and saying to her very earnestly, 'Now, + Dinah, tell me the truth: did you ever eat a bat?' when suddenly, + thump! thump! down she came upon a heap of sticks and dry leaves, + and the fall was over.

+ +

Alice was not a bit hurt, and she jumped up on to her feet in + a moment: she looked up, but it was all dark overhead; before her + was another long passage, and the White Rabbit was still in + sight, hurrying down it. There was not a moment to be lost: away + went Alice like the wind, and was just in time to hear it say, as + it turned a corner, 'Oh my ears and whiskers, how late it's + getting!' She was close behind it when she turned the corner, but + the Rabbit was no longer to be seen: she found herself in a long, + low hall, which was lit up by a row of lamps hanging from the + roof.

+ +

There were doors all round the hall, but they were all locked; + and when Alice had been all the way down one side and up the + other, trying every door, she walked sadly down the middle, + wondering how she was ever to get out again.

+ +

Suddenly she came upon a little three-legged table, all made + of solid glass; there was nothing on it except a tiny golden key, + and Alice's first thought was that it might belong to one of the + doors of the hall; but, alas! either the locks were too large, or + the key was too small, but at any rate it would not open any of + them. However, on the second time round, she came upon a low + curtain she had not noticed before, and behind it was a little + door about fifteen inches high: she tried the little golden key + in the lock, and to her great delight it fitted!

+ +

Alice opened the door and found that it led into a small + passage, not much larger than a rat-hole: she knelt down and + looked along the passage into the loveliest garden you ever saw. + How she longed to get out of that dark hall, and wander about + among those beds of bright flowers and those cool fountains, but + she could not even get her head though the doorway; 'and even if + my head would go through,' thought poor Alice, 'it would + be of very little use without my shoulders. Oh, how I wish I + could shut up like a telescope! I think I could, if I only know + how to begin.' For, you see, so many out-of-the-way things had + happened lately, that Alice had begun to think that very few + things indeed were really impossible.

+ +

There seemed to be no use in waiting by the little door, so + she went back to the table, half hoping she might find another + key on it, or at any rate a book of rules for shutting people up + like telescopes: this time she found a little bottle on it, + ('which certainly was not here before,' said Alice,) and round + the neck of the bottle was a paper label, with the words 'DRINK + ME' beautifully printed on it in large letters.

+ +

It was all very well to say 'Drink me,' but the wise little + Alice was not going to do that in a hurry. 'No, I'll look + first,' she said, 'and see whether it's marked "poison" or + not'; for she had read several nice little histories about + children who had got burnt, and eaten up by wild beasts and other + unpleasant things, all because they would not remember the + simple rules their friends had taught them: such as, that a + red-hot poker will burn you if you hold it too long; and that if + you cut your finger very deeply with a knife, it usually + bleeds; and she had never forgotten that, if you drink much from + a bottle marked 'poison,' it is almost certain to disagree + with you, sooner or later.

+ +

However, this bottle was not marked 'poison,' so Alice + ventured to taste it, and finding it very nice, (it had, in fact, + a sort of mixed flavour of cherry-tart, custard, pine-apple, + roast turkey, toffee, and hot buttered toast,) she very soon + finished it off.

+ +

+
+ *     *     *     *     * +
+ *     *     *     * +
+ *     *     *     *     * +
+

+ +

'What a curious feeling!' said Alice; 'I must be shutting up + like a telescope.'

+ +

And so it was indeed: she was now only ten inches high, and + her face brightened up at the thought that she was now the right + size for going through the little door into that lovely garden. + First, however, she waited for a few minutes to see if she was + going to shrink any further: she felt a little nervous about + this; 'for it might end, you know,' said Alice to herself, 'in my + going out altogether, like a candle. I wonder what I should be + like then?' And she tried to fancy what the flame of a candle is + like after the candle is blown out, for she could not remember + ever having seen such a thing.

+ +

After a while, finding that nothing more happened, she decided + on going into the garden at once; but, alas for poor Alice! when + she got to the door, she found she had forgotten the little + golden key, and when she went back to the table for it, she found + she could not possibly reach it: she could see it quite plainly + through the glass, and she tried her best to climb up one of the + legs of the table, but it was too slippery; and when she had + tired herself out with trying, the poor little thing sat down and + cried.

+ +

'Come, there's no use in crying like that!' said Alice to + herself, rather sharply; 'I advise you to leave off this minute!' + She generally gave herself very good advice, (though she very + seldom followed it), and sometimes she scolded herself so + severely as to bring tears into her eyes; and once she remembered + trying to box her own ears for having cheated herself in a game + of croquet she was playing against herself, for this curious + child was very fond of pretending to be two people. 'But it's no + use now,' thought poor Alice, 'to pretend to be two people! Why, + there's hardly enough of me left to make one respectable + person!'

+ +

Soon her eye fell on a little glass box that was lying under + the table: she opened it, and found in it a very small cake, on + which the words 'EAT ME' were beautifully marked in currants. + 'Well, I'll eat it,' said Alice, 'and if it makes me grow larger, + I can reach the key; and if it makes me grow smaller, I can creep + under the door; so either way I'll get into the garden, and I + don't care which happens!'

+ +

She ate a little bit, and said anxiously to herself, 'Which + way? Which way?', holding her hand on the top of her head to feel + which way it was growing, and she was quite surprised to find + that she remained the same size: to be sure, this generally + happens when one eats cake, but Alice had got so much into the + way of expecting nothing but out-of-the-way things to happen, + that it seemed quite dull and stupid for life to go on in the + common way.

+ +

So she set to work, and very soon finished off the cake.

+ +
+ + + +
+ + + diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/hero.svg b/dashboard-ui/bower_components/paper-dialog-scrollable/hero.svg new file mode 100644 index 0000000000..40bc69a22c --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/hero.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/index.html b/dashboard-ui/bower_components/paper-dialog-scrollable/index.html new file mode 100644 index 0000000000..2d2ec7e245 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/index.html @@ -0,0 +1,30 @@ + + + + + + + + + paper-dialog-scrollable + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html b/dashboard-ui/bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html new file mode 100644 index 0000000000..5f46d9c03f --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/test/index.html b/dashboard-ui/bower_components/paper-dialog-scrollable/test/index.html new file mode 100644 index 0000000000..cb5a5a9092 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/test/index.html @@ -0,0 +1,34 @@ + + + + + + paper-dialog tests + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog-scrollable/test/paper-dialog-scrollable.html b/dashboard-ui/bower_components/paper-dialog-scrollable/test/paper-dialog-scrollable.html new file mode 100644 index 0000000000..e6606d6c47 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog-scrollable/test/paper-dialog-scrollable.html @@ -0,0 +1,171 @@ + + + + + + paper-dialog-scrollable tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog/.bower.json b/dashboard-ui/bower_components/paper-dialog/.bower.json new file mode 100644 index 0000000000..9ba130a919 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/.bower.json @@ -0,0 +1,45 @@ +{ + "name": "paper-dialog", + "description": "A Material Design dialog", + "version": "1.0.0", + "authors": "The Polymer Authors", + "keywords": [ + "web-components", + "polymer", + "dialog", + "overlay" + ], + "main": "paper-dialog.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-dialog" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-dialog", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "neon-animation": "PolymerElements/neon-animation#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "paper-button": "PolymerElements/paper-button#^1.0.0", + "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.0", + "_resolution": { + "type": "version", + "tag": "v1.0.0", + "commit": "6d66cf1e022e56ec28353a2f718e93535c7cac20" + }, + "_source": "git://github.com/PolymerElements/paper-dialog.git", + "_target": "~1.0.0", + "_originalSource": "PolymerElements/paper-dialog", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-dialog/.gitignore b/dashboard-ui/bower_components/paper-dialog/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-dialog/bower.json b/dashboard-ui/bower_components/paper-dialog/bower.json new file mode 100644 index 0000000000..2bce00e912 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/bower.json @@ -0,0 +1,35 @@ +{ + "name": "paper-dialog", + "description": "A Material Design dialog", + "version": "1.0.0", + "authors": "The Polymer Authors", + "keywords": [ + "web-components", + "polymer", + "dialog", + "overlay" + ], + "main": "paper-dialog.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-dialog" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-dialog", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "neon-animation": "PolymerElements/neon-animation#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "paper-button": "PolymerElements/paper-button#^1.0.0", + "paper-dialog-scrollable": "PolymerElements/paper-dialog-scrollable#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-dialog/demo/index.html b/dashboard-ui/bower_components/paper-dialog/demo/index.html new file mode 100644 index 0000000000..619c6dca22 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/demo/index.html @@ -0,0 +1,158 @@ + + + + + + + + + + paper-dialog demo + + + + + + + + + + + + + + + + + +
+

Dialog layouts

+ + plain dialog + scrolling dialog + dialog with actions + modal dialog + + +

Dialog Title

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + +

Scrolling

+ +

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+
+ Cancel + OK +
+
+ + +

Dialog Title

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ More Info... + Decline + Accept +
+
+ + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

+
+ Tap me to close +
+
+ +
+ +
+

Custom styling

+ colors + size & position + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+
+ +
+

Transitions

+ transitions + +

Dialog Title

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+
+ + + + + diff --git a/dashboard-ui/bower_components/paper-dialog/hero.svg b/dashboard-ui/bower_components/paper-dialog/hero.svg new file mode 100644 index 0000000000..713329b847 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/hero.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog/index.html b/dashboard-ui/bower_components/paper-dialog/index.html new file mode 100644 index 0000000000..6304b8dc64 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/index.html @@ -0,0 +1,30 @@ + + + + + + + + + paper-dialog + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog/paper-dialog.html b/dashboard-ui/bower_components/paper-dialog/paper-dialog.html new file mode 100644 index 0000000000..002e242c9d --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/paper-dialog.html @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog/test/index.html b/dashboard-ui/bower_components/paper-dialog/test/index.html new file mode 100644 index 0000000000..ae925b0589 --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/test/index.html @@ -0,0 +1,34 @@ + + + + + + paper-dialog tests + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-dialog/test/paper-dialog.html b/dashboard-ui/bower_components/paper-dialog/test/paper-dialog.html new file mode 100644 index 0000000000..2eb005756d --- /dev/null +++ b/dashboard-ui/bower_components/paper-dialog/test/paper-dialog.html @@ -0,0 +1,53 @@ + + + + + + paper-dialog tests + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-fab/.bower.json b/dashboard-ui/bower_components/paper-fab/.bower.json new file mode 100644 index 0000000000..e0162f557a --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/.bower.json @@ -0,0 +1,49 @@ +{ + "name": "paper-fab", + "version": "1.0.2", + "description": "A material design floating action button", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "button" + ], + "main": "paper-fab.html", + "ignore": [], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-fab" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-fab", + "dependencies": { + "paper-ripple": "polymerelements/paper-ripple#^1.0.0", + "paper-material": "polymerelements/paper-material#^1.0.0", + "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.2", + "_resolution": { + "type": "version", + "tag": "v1.0.2", + "commit": "59d2f77f456271f1ae4059b92d83ba7655fb1580" + }, + "_source": "git://github.com/PolymerElements/paper-fab.git", + "_target": "~1.0.2", + "_originalSource": "PolymerElements/paper-fab", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-fab/.gitignore b/dashboard-ui/bower_components/paper-fab/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-fab/bower.json b/dashboard-ui/bower_components/paper-fab/bower.json new file mode 100644 index 0000000000..f3738a24ef --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/bower.json @@ -0,0 +1,39 @@ +{ + "name": "paper-fab", + "version": "1.0.2", + "description": "A material design floating action button", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "button" + ], + "main": "paper-fab.html", + "ignore": [], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-fab" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-fab", + "dependencies": { + "paper-ripple": "polymerelements/paper-ripple#^1.0.0", + "paper-material": "polymerelements/paper-material#^1.0.0", + "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-fab/demo/index.html b/dashboard-ui/bower_components/paper-fab/demo/index.html new file mode 100644 index 0000000000..3bd99355e5 --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/demo/index.html @@ -0,0 +1,97 @@ + + + + + + + + + + paper-fab demo + + + + + + + + + + + +
+
+

Enabled

+
+ + + + + +
+
+ +
+

Disabled

+
+ + + + + +
+
+ +
+

Colors

+
+ + + + + +
+
+
+ + diff --git a/dashboard-ui/bower_components/paper-fab/index.html b/dashboard-ui/bower_components/paper-fab/index.html new file mode 100644 index 0000000000..c98a658d9b --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/index.html @@ -0,0 +1,24 @@ + + + + + + paper-fab + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/paper-fab/paper-fab.html b/dashboard-ui/bower_components/paper-fab/paper-fab.html similarity index 100% rename from dashboard-ui/thirdparty/paper-fab/paper-fab.html rename to dashboard-ui/bower_components/paper-fab/paper-fab.html diff --git a/dashboard-ui/bower_components/paper-fab/test/a11y.html b/dashboard-ui/bower_components/paper-fab/test/a11y.html new file mode 100644 index 0000000000..2a2cbe3141 --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/test/a11y.html @@ -0,0 +1,71 @@ + + + + + + paper-fab a11y tests + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-fab/test/basic.html b/dashboard-ui/bower_components/paper-fab/test/basic.html new file mode 100644 index 0000000000..6c8a48aeb1 --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/test/basic.html @@ -0,0 +1,76 @@ + + + + + + paper-fab basic tests + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-fab/test/index.html b/dashboard-ui/bower_components/paper-fab/test/index.html new file mode 100644 index 0000000000..9f9021424f --- /dev/null +++ b/dashboard-ui/bower_components/paper-fab/test/index.html @@ -0,0 +1,26 @@ + + + + + + + paper-fab tests + + + + + + diff --git a/dashboard-ui/bower_components/paper-material/.bower.json b/dashboard-ui/bower_components/paper-material/.bower.json new file mode 100644 index 0000000000..1933706bca --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/.bower.json @@ -0,0 +1,45 @@ +{ + "name": "paper-material", + "version": "1.0.0", + "description": "A material design container that looks like a lifted sheet of paper", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "paper", + "container" + ], + "main": [ + "paper-material.html" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-material" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-material", + "ignore": [], + "dependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.0", + "_resolution": { + "type": "version", + "tag": "v1.0.0", + "commit": "bd769d2b8c4f9ab000aee22582d76b5935793dc1" + }, + "_source": "git://github.com/polymerelements/paper-material.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/paper-material" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-material/.gitignore b/dashboard-ui/bower_components/paper-material/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-material/bower.json b/dashboard-ui/bower_components/paper-material/bower.json new file mode 100644 index 0000000000..e6f78bc3be --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/bower.json @@ -0,0 +1,36 @@ +{ + "name": "paper-material", + "version": "1.0.0", + "description": "A material design container that looks like a lifted sheet of paper", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "web-component", + "polymer", + "paper", + "container" + ], + "main": [ + "paper-material.html" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-material" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-material", + "ignore": [], + "dependencies": { + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-material/demo/index.html b/dashboard-ui/bower_components/paper-material/demo/index.html new file mode 100644 index 0000000000..864f696391 --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/demo/index.html @@ -0,0 +1,113 @@ + + + + + paper-material demo + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-material/index.html b/dashboard-ui/bower_components/paper-material/index.html new file mode 100644 index 0000000000..7209e6d095 --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/index.html @@ -0,0 +1,30 @@ + + + + + + + + + paper-material + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/paper-material/paper-material.html b/dashboard-ui/bower_components/paper-material/paper-material.html similarity index 100% rename from dashboard-ui/thirdparty/paper-material/paper-material.html rename to dashboard-ui/bower_components/paper-material/paper-material.html diff --git a/dashboard-ui/bower_components/paper-material/test/index.html b/dashboard-ui/bower_components/paper-material/test/index.html new file mode 100644 index 0000000000..492a5677f4 --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/test/index.html @@ -0,0 +1,25 @@ + + + + + + + paper-material tests + + + + + + diff --git a/dashboard-ui/bower_components/paper-material/test/paper-material.html b/dashboard-ui/bower_components/paper-material/test/paper-material.html new file mode 100644 index 0000000000..0a593fb581 --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/test/paper-material.html @@ -0,0 +1,92 @@ + + + + + + paper-material basic tests + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-ripple/.bower.json b/dashboard-ui/bower_components/paper-ripple/.bower.json new file mode 100644 index 0000000000..0cbf50c9ff --- /dev/null +++ b/dashboard-ui/bower_components/paper-ripple/.bower.json @@ -0,0 +1,39 @@ +{ + "name": "paper-ripple", + "version": "1.0.1", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Adds a material design ripple to any container", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "ripple" + ], + "main": "paper-ripple.html", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/polymerelements/paper-ripple", + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "af19d904802437c305390bb03415c11661de3d0a" + }, + "_source": "git://github.com/polymerelements/paper-ripple.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/paper-ripple" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-ripple/.gitignore b/dashboard-ui/bower_components/paper-ripple/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-ripple/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-ripple/bower.json b/dashboard-ui/bower_components/paper-ripple/bower.json new file mode 100644 index 0000000000..b9bb0d9f23 --- /dev/null +++ b/dashboard-ui/bower_components/paper-ripple/bower.json @@ -0,0 +1,29 @@ +{ + "name": "paper-ripple", + "version": "1.0.1", + "license": "http://polymer.github.io/LICENSE.txt", + "description": "Adds a material design ripple to any container", + "private": true, + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "ripple" + ], + "main": "paper-ripple.html", + "dependencies": { + "polymer": "Polymer/polymer#^1.0.0", + "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "iron-icon": "polymerelements/iron-icon#^1.0.0", + "iron-icons": "polymerelements/iron-icons#^1.0.0", + "paper-styles": "polymerelements/paper-styles#^1.0.0", + "test-fixture": "polymerelements/test-fixture#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-ripple/demo/index.html b/dashboard-ui/bower_components/paper-ripple/demo/index.html new file mode 100644 index 0000000000..365eb3e5b9 --- /dev/null +++ b/dashboard-ui/bower_components/paper-ripple/demo/index.html @@ -0,0 +1,413 @@ + + + + + paper-ripple demo + + + + + + + + + + + + + + + + + +
+ +
+
SUBMIT
+ +
+ +
+
CANCEL
+ +
+ +
+
COMPOSE
+ +
+ +
+
OK
+ +
+ +
+ +
+ +
+
+1
+ +
+ +
+
+1
+ +
+ +
+
+1
+ +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + + + + +
+ +
+ +
+ +
+
Permission

+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
+
+ +
+
ACCEPT
+ +
+ +
+
DECLINE
+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ + + + diff --git a/dashboard-ui/thirdparty/paper-ripple/hero.svg b/dashboard-ui/bower_components/paper-ripple/hero.svg similarity index 100% rename from dashboard-ui/thirdparty/paper-ripple/hero.svg rename to dashboard-ui/bower_components/paper-ripple/hero.svg diff --git a/dashboard-ui/bower_components/paper-ripple/index.html b/dashboard-ui/bower_components/paper-ripple/index.html new file mode 100644 index 0000000000..3c371fa31a --- /dev/null +++ b/dashboard-ui/bower_components/paper-ripple/index.html @@ -0,0 +1,27 @@ + + + + + + paper-ripple + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/paper-ripple/paper-ripple.html b/dashboard-ui/bower_components/paper-ripple/paper-ripple.html similarity index 100% rename from dashboard-ui/thirdparty/paper-ripple/paper-ripple.html rename to dashboard-ui/bower_components/paper-ripple/paper-ripple.html diff --git a/dashboard-ui/bower_components/paper-ripple/test/index.html b/dashboard-ui/bower_components/paper-ripple/test/index.html new file mode 100644 index 0000000000..48197c08a5 --- /dev/null +++ b/dashboard-ui/bower_components/paper-ripple/test/index.html @@ -0,0 +1,25 @@ + + + + + + + Tests + + + + + + diff --git a/dashboard-ui/bower_components/paper-ripple/test/paper-ripple.html b/dashboard-ui/bower_components/paper-ripple/test/paper-ripple.html new file mode 100644 index 0000000000..81232069ac --- /dev/null +++ b/dashboard-ui/bower_components/paper-ripple/test/paper-ripple.html @@ -0,0 +1,166 @@ + + + + + + + paper-ripple + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-spinner/.bower.json b/dashboard-ui/bower_components/paper-spinner/.bower.json new file mode 100644 index 0000000000..33491d5962 --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/.bower.json @@ -0,0 +1,43 @@ +{ + "name": "paper-spinner", + "version": "1.0.1", + "description": "A material design spinner", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "spinner", + "loading" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-spinner" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-spinner", + "ignore": [], + "dependencies": { + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "web-component-tester": "*", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "5e2b7412922259c9eed1805d69abb18e433efaad" + }, + "_source": "git://github.com/PolymerElements/paper-spinner.git", + "_target": "~1.0.1", + "_originalSource": "PolymerElements/paper-spinner", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-spinner/.gitignore b/dashboard-ui/bower_components/paper-spinner/.gitignore new file mode 100644 index 0000000000..fbe05fc93b --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/.gitignore @@ -0,0 +1 @@ +bower_components/ diff --git a/dashboard-ui/bower_components/paper-spinner/bower.json b/dashboard-ui/bower_components/paper-spinner/bower.json new file mode 100644 index 0000000000..d27e049ff2 --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/bower.json @@ -0,0 +1,33 @@ +{ + "name": "paper-spinner", + "version": "1.0.1", + "description": "A material design spinner", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "spinner", + "loading" + ], + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-spinner" + }, + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/PolymerElements/paper-spinner", + "ignore": [], + "dependencies": { + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "web-component-tester": "*", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-spinner/demo/index.html b/dashboard-ui/bower_components/paper-spinner/demo/index.html new file mode 100644 index 0000000000..15f6385efe --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/demo/index.html @@ -0,0 +1,98 @@ + + + + + + + paper-spinner demo + + + + + + + + + +
+
+

Default

+
+ + + + + +
+
+ +
+

Color

+
+ + + + + +
+
+
+ + + + + diff --git a/dashboard-ui/bower_components/paper-spinner/hero.svg b/dashboard-ui/bower_components/paper-spinner/hero.svg new file mode 100644 index 0000000000..034b1f11ad --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/hero.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-spinner/index.html b/dashboard-ui/bower_components/paper-spinner/index.html new file mode 100644 index 0000000000..9874334610 --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/index.html @@ -0,0 +1,30 @@ + + + + + + + + + paper-spinner + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/paper-spinner/paper-spinner.css b/dashboard-ui/bower_components/paper-spinner/paper-spinner.css similarity index 100% rename from dashboard-ui/thirdparty/paper-spinner/paper-spinner.css rename to dashboard-ui/bower_components/paper-spinner/paper-spinner.css diff --git a/dashboard-ui/thirdparty/paper-spinner/paper-spinner.html b/dashboard-ui/bower_components/paper-spinner/paper-spinner.html similarity index 100% rename from dashboard-ui/thirdparty/paper-spinner/paper-spinner.html rename to dashboard-ui/bower_components/paper-spinner/paper-spinner.html diff --git a/dashboard-ui/bower_components/paper-spinner/test/index.html b/dashboard-ui/bower_components/paper-spinner/test/index.html new file mode 100644 index 0000000000..469b3eeac4 --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/test/index.html @@ -0,0 +1,34 @@ + + + + + + paper-spinner tests + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-spinner/test/paper-spinner.html b/dashboard-ui/bower_components/paper-spinner/test/paper-spinner.html new file mode 100644 index 0000000000..f270c33b78 --- /dev/null +++ b/dashboard-ui/bower_components/paper-spinner/test/paper-spinner.html @@ -0,0 +1,63 @@ + + + + + + + paper-spinner basic tests + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-styles/.bower.json b/dashboard-ui/bower_components/paper-styles/.bower.json new file mode 100644 index 0000000000..e413e5899e --- /dev/null +++ b/dashboard-ui/bower_components/paper-styles/.bower.json @@ -0,0 +1,39 @@ +{ + "name": "paper-styles", + "version": "1.0.5", + "description": "Common (global) styles for Material Design elements.", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-component", + "polymer", + "style" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-styles.git" + }, + "main": "paper-styles.html", + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/polymerelements/paper-styles/", + "ignore": [ + "/.*" + ], + "dependencies": { + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "_release": "1.0.5", + "_resolution": { + "type": "version", + "tag": "v1.0.5", + "commit": "4033dd288b9074febc4532b5ea11787422b9c378" + }, + "_source": "git://github.com/polymerelements/paper-styles.git", + "_target": "^1.0.0", + "_originalSource": "polymerelements/paper-styles" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-styles/bower.json b/dashboard-ui/bower_components/paper-styles/bower.json new file mode 100644 index 0000000000..ffbb3a4891 --- /dev/null +++ b/dashboard-ui/bower_components/paper-styles/bower.json @@ -0,0 +1,30 @@ +{ + "name": "paper-styles", + "version": "1.0.5", + "description": "Common (global) styles for Material Design elements.", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-component", + "polymer", + "style" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-styles.git" + }, + "main": "paper-styles.html", + "license": "http://polymer.github.io/LICENSE.txt", + "homepage": "https://github.com/polymerelements/paper-styles/", + "ignore": [ + "/.*" + ], + "dependencies": { + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0" + }, + "devDependencies": { + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/thirdparty/paper-styles/classes/global.html b/dashboard-ui/bower_components/paper-styles/classes/global.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/classes/global.html rename to dashboard-ui/bower_components/paper-styles/classes/global.html diff --git a/dashboard-ui/thirdparty/paper-styles/classes/shadow-layout.html b/dashboard-ui/bower_components/paper-styles/classes/shadow-layout.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/classes/shadow-layout.html rename to dashboard-ui/bower_components/paper-styles/classes/shadow-layout.html diff --git a/dashboard-ui/thirdparty/paper-styles/classes/shadow.html b/dashboard-ui/bower_components/paper-styles/classes/shadow.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/classes/shadow.html rename to dashboard-ui/bower_components/paper-styles/classes/shadow.html diff --git a/dashboard-ui/thirdparty/paper-styles/classes/typography.html b/dashboard-ui/bower_components/paper-styles/classes/typography.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/classes/typography.html rename to dashboard-ui/bower_components/paper-styles/classes/typography.html diff --git a/dashboard-ui/thirdparty/paper-styles/color.html b/dashboard-ui/bower_components/paper-styles/color.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/color.html rename to dashboard-ui/bower_components/paper-styles/color.html diff --git a/dashboard-ui/thirdparty/paper-styles/default-theme.html b/dashboard-ui/bower_components/paper-styles/default-theme.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/default-theme.html rename to dashboard-ui/bower_components/paper-styles/default-theme.html diff --git a/dashboard-ui/bower_components/paper-styles/demo-pages.html b/dashboard-ui/bower_components/paper-styles/demo-pages.html new file mode 100644 index 0000000000..44f2288727 --- /dev/null +++ b/dashboard-ui/bower_components/paper-styles/demo-pages.html @@ -0,0 +1,72 @@ + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-styles/demo.css b/dashboard-ui/bower_components/paper-styles/demo.css new file mode 100644 index 0000000000..efd8b471b5 --- /dev/null +++ b/dashboard-ui/bower_components/paper-styles/demo.css @@ -0,0 +1,25 @@ +/** +@license +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + +*/ +body { + font-family: 'Roboto', 'Noto', sans-serif; + font-size: 14px; + margin: 0; + padding: 24px; +} + +section { + padding: 20px 0; +} + +section > div { + padding: 14px; + font-size: 16px; +} diff --git a/dashboard-ui/bower_components/paper-styles/demo/index.html b/dashboard-ui/bower_components/paper-styles/demo/index.html new file mode 100644 index 0000000000..42f449f06b --- /dev/null +++ b/dashboard-ui/bower_components/paper-styles/demo/index.html @@ -0,0 +1,358 @@ + + + + + + + + + + + paper-styles demo + + + + + + + + + + + + + + + + + + + + + + + +
+

demo-pages.html

+ +

Horizontal sections

+
+
+

Column 1

+
+
Oxygen
+
Carbon
+
Hydrogen
+
Nitrogen
+
Calcium
+
+
+ +
+

Column 2

+
+
Oxygen
+
Carbon
+
Hydrogen
+
Nitrogen
+
Calcium
+
+
+ +
+

Column 3

+
+
Oxygen
+
Carbon
+
Hydrogen
+
Nitrogen
+
Calcium
+
+
+
+ +

Vertical sections

+
+
+

Section 1

+
+
Oxygen
+
Carbon
+
Hydrogen
+
Nitrogen
+
Calcium
+
+
+
+ +
+

Section 2 (centered)

+
+
Oxygen
+
Carbon
+
Hydrogen
+
Nitrogen
+
Calcium
+
+
+ +
+ + + diff --git a/dashboard-ui/thirdparty/paper-styles/paper-styles-classes.html b/dashboard-ui/bower_components/paper-styles/paper-styles-classes.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/paper-styles-classes.html rename to dashboard-ui/bower_components/paper-styles/paper-styles-classes.html diff --git a/dashboard-ui/thirdparty/paper-styles/paper-styles.html b/dashboard-ui/bower_components/paper-styles/paper-styles.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/paper-styles.html rename to dashboard-ui/bower_components/paper-styles/paper-styles.html diff --git a/dashboard-ui/thirdparty/paper-styles/shadow.html b/dashboard-ui/bower_components/paper-styles/shadow.html similarity index 100% rename from dashboard-ui/thirdparty/paper-styles/shadow.html rename to dashboard-ui/bower_components/paper-styles/shadow.html diff --git a/dashboard-ui/thirdparty/paper-styles/typography.html b/dashboard-ui/bower_components/paper-styles/typography.html similarity index 98% rename from dashboard-ui/thirdparty/paper-styles/typography.html rename to dashboard-ui/bower_components/paper-styles/typography.html index 1846f64ed5..ed99cd4ff1 100644 --- a/dashboard-ui/thirdparty/paper-styles/typography.html +++ b/dashboard-ui/bower_components/paper-styles/typography.html @@ -8,6 +8,7 @@ Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> + diff --git a/dashboard-ui/bower_components/paper-toast/.bower.json b/dashboard-ui/bower_components/paper-toast/.bower.json new file mode 100644 index 0000000000..c1109b6ef9 --- /dev/null +++ b/dashboard-ui/bower_components/paper-toast/.bower.json @@ -0,0 +1,39 @@ +{ + "name": "paper-toast", + "version": "1.0.0", + "description": "A material design notification toast", + "private": true, + "license": "http://polymer.github.io/LICENSE.txt", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "toast", + "notification" + ], + "main": "paper-toast.html", + "dependencies": { + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0", + "iron-a11y-announcer": "polymerelements/iron-a11y-announcer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "paper-button": "polymerelements/paper-button#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "homepage": "https://github.com/PolymerElements/paper-toast", + "_release": "1.0.0", + "_resolution": { + "type": "version", + "tag": "v1.0.0", + "commit": "71e6c327f7aafe9c71010c83d4c4571f63990072" + }, + "_source": "git://github.com/PolymerElements/paper-toast.git", + "_target": "~1.0.0", + "_originalSource": "PolymerElements/paper-toast", + "_direct": true +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-toast/.gitignore b/dashboard-ui/bower_components/paper-toast/.gitignore new file mode 100644 index 0000000000..8d4ae2536a --- /dev/null +++ b/dashboard-ui/bower_components/paper-toast/.gitignore @@ -0,0 +1 @@ +bower_components diff --git a/dashboard-ui/bower_components/paper-toast/bower.json b/dashboard-ui/bower_components/paper-toast/bower.json new file mode 100644 index 0000000000..a4fd51abfe --- /dev/null +++ b/dashboard-ui/bower_components/paper-toast/bower.json @@ -0,0 +1,28 @@ +{ + "name": "paper-toast", + "version": "1.0.0", + "description": "A material design notification toast", + "private": true, + "license": "http://polymer.github.io/LICENSE.txt", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "toast", + "notification" + ], + "main": "paper-toast.html", + "dependencies": { + "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "polymer": "Polymer/polymer#^1.0.0", + "iron-a11y-announcer": "polymerelements/iron-a11y-announcer#^1.0.0" + }, + "devDependencies": { + "iron-component-page": "polymerelements/iron-component-page#^1.0.0", + "paper-button": "polymerelements/paper-button#^1.0.0", + "web-component-tester": "*", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } +} diff --git a/dashboard-ui/bower_components/paper-toast/demo/index.html b/dashboard-ui/bower_components/paper-toast/demo/index.html new file mode 100644 index 0000000000..fbd0f0ecbd --- /dev/null +++ b/dashboard-ui/bower_components/paper-toast/demo/index.html @@ -0,0 +1,56 @@ + + + + + paper-toast + + + + + + + + + + + + + + + + Discard Draft + + Get Messages + + + + + Retry + + + + diff --git a/dashboard-ui/bower_components/paper-toast/hero.svg b/dashboard-ui/bower_components/paper-toast/hero.svg new file mode 100644 index 0000000000..bfdc1808bd --- /dev/null +++ b/dashboard-ui/bower_components/paper-toast/hero.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/paper-toast/index.html b/dashboard-ui/bower_components/paper-toast/index.html new file mode 100644 index 0000000000..e871f17d98 --- /dev/null +++ b/dashboard-ui/bower_components/paper-toast/index.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/thirdparty/paper-toast/paper-toast.html b/dashboard-ui/bower_components/paper-toast/paper-toast.html similarity index 100% rename from dashboard-ui/thirdparty/paper-toast/paper-toast.html rename to dashboard-ui/bower_components/paper-toast/paper-toast.html diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json new file mode 100644 index 0000000000..a00b870db8 --- /dev/null +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -0,0 +1,36 @@ +{ + "name": "polymer", + "version": "1.0.4", + "main": [ + "polymer.html" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "ignore": [ + "/.*", + "/test/" + ], + "authors": [ + "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)" + ], + "repository": { + "type": "git", + "url": "https://github.com/Polymer/polymer.git" + }, + "dependencies": { + "webcomponentsjs": "^0.7.2" + }, + "devDependencies": { + "web-component-tester": "*" + }, + "private": true, + "homepage": "https://github.com/Polymer/polymer", + "_release": "1.0.4", + "_resolution": { + "type": "version", + "tag": "v1.0.4", + "commit": "cdabb91ad8ddf9bbefa308a25c5633d768501e7d" + }, + "_source": "git://github.com/Polymer/polymer.git", + "_target": "^1.0.0", + "_originalSource": "Polymer/polymer" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/polymer/LICENSE.txt b/dashboard-ui/bower_components/polymer/LICENSE.txt new file mode 100644 index 0000000000..95987bac86 --- /dev/null +++ b/dashboard-ui/bower_components/polymer/LICENSE.txt @@ -0,0 +1,27 @@ +// Copyright (c) 2014 The Polymer Authors. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/dashboard-ui/bower_components/polymer/bower.json b/dashboard-ui/bower_components/polymer/bower.json new file mode 100644 index 0000000000..fc37f18989 --- /dev/null +++ b/dashboard-ui/bower_components/polymer/bower.json @@ -0,0 +1,26 @@ +{ + "name": "polymer", + "version": "1.0.4", + "main": [ + "polymer.html" + ], + "license": "http://polymer.github.io/LICENSE.txt", + "ignore": [ + "/.*", + "/test/" + ], + "authors": [ + "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)" + ], + "repository": { + "type": "git", + "url": "https://github.com/Polymer/polymer.git" + }, + "dependencies": { + "webcomponentsjs": "^0.7.2" + }, + "devDependencies": { + "web-component-tester": "*" + }, + "private": true +} diff --git a/dashboard-ui/bower_components/polymer/polymer-micro.html b/dashboard-ui/bower_components/polymer/polymer-micro.html new file mode 100644 index 0000000000..e16f5b17a6 --- /dev/null +++ b/dashboard-ui/bower_components/polymer/polymer-micro.html @@ -0,0 +1,523 @@ + + diff --git a/dashboard-ui/bower_components/polymer/polymer-mini.html b/dashboard-ui/bower_components/polymer/polymer-mini.html new file mode 100644 index 0000000000..25393126c7 --- /dev/null +++ b/dashboard-ui/bower_components/polymer/polymer-mini.html @@ -0,0 +1,1396 @@ + + + + diff --git a/dashboard-ui/bower_components/polymer/polymer.html b/dashboard-ui/bower_components/polymer/polymer.html new file mode 100644 index 0000000000..9d59e33d25 --- /dev/null +++ b/dashboard-ui/bower_components/polymer/polymer.html @@ -0,0 +1,3897 @@ + + + diff --git a/dashboard-ui/bower_components/web-animations-js/.bower.json b/dashboard-ui/bower_components/web-animations-js/.bower.json new file mode 100644 index 0000000000..4215dea747 --- /dev/null +++ b/dashboard-ui/bower_components/web-animations-js/.bower.json @@ -0,0 +1,41 @@ +{ + "name": "web-animations-js", + "description": "JavaScript implementation of the Web Animations API", + "homepage": "https://github.com/web-animations/web-animations-js", + "main": "web-animations.min.js", + "moduleType": [ + "globals" + ], + "keywords": [ + "animations", + "polyfill" + ], + "license": "Apache-2.0", + "ignore": [ + "**/.*", + "node_modules", + "templates", + "test", + "src", + "Gruntfile.js", + "package.json", + "target-config.js", + "target-loader.js", + "web-animations.dev.html", + "web-animations.dev.js", + "web-animations-next.dev.html", + "web-animations-next.dev.js", + "web-animations-next-lite.dev.html", + "web-animations-next-lite.dev.js" + ], + "version": "2.1.0", + "_release": "2.1.0", + "_resolution": { + "type": "version", + "tag": "2.1.0", + "commit": "7215de49976c233fb7abe2c19ee31a1009acc655" + }, + "_source": "git://github.com/web-animations/web-animations-js.git", + "_target": "^2.0.0", + "_originalSource": "web-animations/web-animations-js" +} \ No newline at end of file diff --git a/dashboard-ui/bower_components/web-animations-js/COPYING b/dashboard-ui/bower_components/web-animations-js/COPYING new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/dashboard-ui/bower_components/web-animations-js/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dashboard-ui/bower_components/web-animations-js/History.md b/dashboard-ui/bower_components/web-animations-js/History.md new file mode 100644 index 0000000000..c612d230a7 --- /dev/null +++ b/dashboard-ui/bower_components/web-animations-js/History.md @@ -0,0 +1,118 @@ +### 2.1.0 - *June 15 2015* + * Fix bug affecting GroupEffects with infinite iteration children + * Add GroupEffect.firstChild and GroupEffect.lastChild + * Add initial values for most CSS properties + * Allow `timeline.play()` to be called with no arguments + * Add AnimationEffect.clone + * Add GroupEffect.append and GroupEffect.prepend + * Add AnimationEffect.remove + * Add Animation.ready and Animation.finished promises + +### 2.0.0 - *April 5 2015* + + * Improve behavior of group Animation playback rate. + * Rename Animation to KeyframeEffect. + * Rename AnimationSequence to SequenceEffect. + * Rename AnimationGroup to GroupEffect. + * Rename AnimationPlayer to Animation. + * Remove KeyframeEffect.effect and add KeyframeEffect.getFrames. + * Rename Animation.source to Animation.effect. + * Rename Timeline.getAnimationPlayers to Timeline.getAnimations. + * Rename Element.getAnimationPlayers to Element.getAnimations. + +### 1.0.7 - *March 10 2015* + + * Improve performance of constructing groups and sequences. + * Remove support for animating zoom. + * Add bower file. + +### 1.0.6 - *February 5 2015* + + * Implement playbackRate setter for group players. + * Fix pausing a group player before its first tick. + * Fix cancelling a group player before its first tick. + * Fix excess CPU use on idle pages where custom effects and groups were used. + * Suppress AnimationTiming.playbackRate deprecation warning for cases where AnimationTiming.playbackRate == 1. + +### 1.0.5 - *January 6 2015* + + * Fix loading the polyfill in an SVG document + * Fix a problem where groups didn't take effect in their first frame + * Don't rely on performance.now + +### 1.0.4 - *December 8 2014* + + * Fix a critical bug where deprecation logic wasn't being loaded + when `web-animations-next` and `web-animations-next-lite` were + executed on top of a native `element.animate`. + +### 1.0.3 - *December 4 2014* + + * Fix a critical bug on iOS 7 and Safari <= 6. Due to limitations, + inline style patching is not supported on these platforms. + +### 1.0.2 - *November 28 2014* + + * Deprecated `AnimationTiming.playbackRate`. + + For example, this is no longer supported: + + var player = element.animate( + keyframes, + {duration: 1000, playbackRate: 2}); + + Use `AnimationPlayer.playbackRate` instead: + + var player = element.animate( + keyframes, + {duration: 1000}); + player.playbackRate = 2; + + If you have any feedback on this change, please start a discussion + on the public-fx mailing list: + http://lists.w3.org/Archives/Public/public-fx/ + + Or file an issue against the specification on GitHub: + https://github.com/w3c/web-animations/issues/new + +### 1.0.1 - *November 26 2014* + + * Players should be constructed in idle state + * `play()` and `reverse()` should not force a start times + * Add `requestAnimationFrame` ids and `cancelAnimationFrame` + +### 1.0.0 — *November 21 2014* + + The web-animations-js hackers are pleased to announce the release of + a new codebase for the Web Animations Polyfill: + https://github.com/web-animations/web-animations-js + + The previous polyfill has been moved to: + https://github.com/web-animations/web-animations-js-legacy + + The new codebase is focused on code-size -- our smallest target is + now only 33kb or 11kb after gzip. + + We've implemented native fallback. If the target browser provides + Web Animations features natively, the Polyfill will use them. + + We now provide three different build targets: + + `web-animations.min.js` - Tracks the Web Animations features that + are supported natively in browsers. Today that means Element.animate + and Playback Control in Chrome. If you’re not sure what features you + will need, start with this. + + `web-animations-next.min.js` - All of web-animations.min.js plus + features that are still undergoing discussion or have yet to be + implemented natively. + + `web-animations-next-lite.min.js` - A cut down version of + web-animations-next, removes several lesser used property handlers + and some of the larger and less used features such as matrix + interpolation/decomposition. + + Not all features of the previous polyfill have been ported to the + new codebase; most notably mutation of Animations and Groups and + Additive Animations are not yet supported. These features are still + important and will be implemented in the coming weeks. diff --git a/dashboard-ui/bower_components/web-animations-js/bower.json b/dashboard-ui/bower_components/web-animations-js/bower.json new file mode 100644 index 0000000000..22f26b5e5c --- /dev/null +++ b/dashboard-ui/bower_components/web-animations-js/bower.json @@ -0,0 +1,31 @@ +{ + "name": "web-animations-js", + "description": "JavaScript implementation of the Web Animations API", + "homepage": "https://github.com/web-animations/web-animations-js", + "main": "web-animations.min.js", + "moduleType": [ + "globals" + ], + "keywords": [ + "animations", + "polyfill" + ], + "license": "Apache-2.0", + "ignore": [ + "**/.*", + "node_modules", + "templates", + "test", + "src", + "Gruntfile.js", + "package.json", + "target-config.js", + "target-loader.js", + "web-animations.dev.html", + "web-animations.dev.js", + "web-animations-next.dev.html", + "web-animations-next.dev.js", + "web-animations-next-lite.dev.html", + "web-animations-next-lite.dev.js" + ] +} diff --git a/dashboard-ui/bower_components/web-animations-js/web-animations-next-lite.min.js b/dashboard-ui/bower_components/web-animations-js/web-animations-next-lite.min.js new file mode 100644 index 0000000000..2ca5d37296 --- /dev/null +++ b/dashboard-ui/bower_components/web-animations-js/web-animations-next-lite.min.js @@ -0,0 +1,17 @@ +// Copyright 2014 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +!function(a,b){b["true"]=a;var c={},d={},e={},f=null;!function(a){function b(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function c(b,c){var d={delay:0,endDelay:0,fill:c?"both":"none",iterationStart:0,iterations:1,duration:c?"auto":0,playbackRate:1,direction:"normal",easing:"linear"};return"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof d[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==q.indexOf(b[c]))return;if("direction"==c&&-1==r.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;d[c]=b[c]}}):d.duration=b,d}function d(a,b){var d=c(a,b);return d.easing=g(d.easing),d}function e(a,b,c,d){return 0>a||a>1||0>c||c>1?z:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(0==e||1==e)return e;for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<.001)return f(b,d,i);e>j?g=i:h=i}}}function f(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function g(a){var b=x.exec(a);if(b)return e.apply(this,b.slice(1).map(Number));var c=y.exec(a);if(c)return f(Number(c[1]),{start:s,middle:t,end:u}[c[2]]);var d=v[a];return d?d:z}function h(a){return Math.abs(i(a)/a.playbackRate)}function i(a){return a.duration*a.iterations}function j(a,b,c){return null==b?A:b=c.delay+a?C:D}function k(a,b,c,d,e){switch(d){case B:return"backwards"==b||"both"==b?0:null;case D:return c-e;case C:return"forwards"==b||"both"==b?a:null;case A:return null}}function l(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function m(a,b,c,d,e){return 1/0===c||c===-1/0||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function n(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function o(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d.easing(h)}function p(a,b,c){var d=j(a,b,c),e=k(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===B?0:1;var f=c.iterationStart*c.duration,g=l(a,e,f,c),h=m(c.duration,i(c),g,f,c),p=n(c.duration,h,g,c);return o(p,c.duration,h,c)/c.duration}var q="backwards|forwards|both|none".split("|"),r="reverse|alternate|alternate-reverse".split("|"),s=1,t=.5,u=0,v={ease:e(.25,.1,.25,1),"ease-in":e(.42,0,1,1),"ease-out":e(0,0,.58,1),"ease-in-out":e(.42,0,.58,1),"step-start":f(1,s),"step-middle":f(1,t),"step-end":f(1,u)},w="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",x=new RegExp("cubic-bezier\\("+w+","+w+","+w+","+w+"\\)"),y=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,z=function(a){return a},A=0,B=1,C=2,D=3;a.cloneTimingInput=b,a.makeTiming=c,a.normalizeTimingInput=d,a.calculateActiveDuration=h,a.calculateTimeFraction=p,a.calculatePhase=j,a.toTimingFunction=g}(c,f),function(a){function b(a,b){return a in h?h[a][b]||b:b}function c(a,c,d){var g=e[a];if(g){f.style[a]=c;for(var h in g){var i=g[h],j=f.style[i];d[i]=b(i,j)}}else d[a]=b(a,c)}function d(b){function d(){var a=e.length;null==e[a-1].offset&&(e[a-1].offset=1),a>1&&null==e[0].offset&&(e[0].offset=0);for(var b=0,c=e[0].offset,d=1;a>d;d++){var f=e[d].offset;if(null!=f){for(var g=1;d-b>g;g++)e[b+g].offset=c+(f-c)*g/(d-b);b=d,c=f}}}if(!Array.isArray(b)&&null!==b)throw new TypeError("Keyframes must be null or an array of keyframes");if(null==b)return[];for(var e=b.map(function(b){var d={};for(var e in b){var f=b[e];if("offset"==e){if(null!=f&&(f=Number(f),!isFinite(f)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==e)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};f="easing"==e?a.toTimingFunction(f):""+f}c(e,f,d)}return void 0==d.offset&&(d.offset=null),void 0==d.easing&&(d.easing=a.toTimingFunction("linear")),d}),f=!0,g=-1/0,h=0;hi)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return e=e.filter(function(a){return a.offset>=0&&a.offset<=1}),f||d(),e}var e={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},f=document.createElementNS("http://www.w3.org/1999/xhtml","div"),g={thin:"1px",medium:"3px",thick:"5px"},h={borderBottomWidth:g,borderLeftWidth:g,borderRightWidth:g,borderTopWidth:g,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:g,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.normalizeKeyframes=d}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b){function c(a){for(var b={},c=0;c=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a){function b(a,b,c){e[c]=e[c]||[],e[c].push([a,b])}function c(a,c,d){for(var e=0;ed?a:c;if(a.length==c.length){for(var e=[],f=0;f0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._tickCurrentTime(a,!0),b.invalidateEffects()))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null,b.invalidateEffects()),this._finishedFlag=!1,b.restart(),this._idle=!1,this._ensureAlive()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1)},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),b.invalidateEffects(),b.restart())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){var b=this._isFinished;if((b||this._idle)&&!this._finishedFlag){var d=new c(this,this._currentTime,a),e=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){e.forEach(function(a){a.call(d.target,d)})},0)}this._finishedFlag=b},_tick:function(a){return this._idle||this._paused||(null==this._startTime?this.startTime=a-this._currentTime/this.playbackRate:this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),this._currentTimePending=!1,this._fireEvents(a),!this._idle&&(this._inEffect||!this._finishedFlag)}}}(c,d,f),function(a,b){function c(a){var b=i;i=[],a0&&(s.currentTime+=q*(Math.floor((a-s.currentTime)/q)+1)),g(s.currentTime)}return f(),r.apply(this,arguments)}});var s=new e;b.timeline=s}(c,d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;ek;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,b,["visibility"])}(d),function(a){function b(a){a=a.trim(),e.fillStyle="#000",e.fillStyle=a;var b=e.fillStyle;if(e.fillStyle="#fff",e.fillStyle=a,b==e.fillStyle){e.fillRect(0,0,1,1);var c=e.getImageData(0,0,1,1).data;e.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function c(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=d.height=1;var e=d.getContext("2d");a.addPropertiesHandler(b,c,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,b),a.mergeColors=c}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a){function b(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function c(c){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,b,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],c);return d&&4==d[0].length?d[0]:void 0}function d(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function e(a){return"rect("+a+")"}var f=a.mergeWrappedNestedRepeated.bind(null,e,d,", ");a.parseBox=c,a.mergeBoxes=f,a.addPropertiesHandler(c,f,["clip"])}(d,f),function(a){function b(a){return function(b){var c=0;return a.map(function(a){return a===j?b[c++]:a})}}function c(a){return a}function d(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=m[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.lengtha||a>1||0>c||c>1?z:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(0==e||1==e)return e;for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<.001)return f(b,d,i);e>j?g=i:h=i}}}function f(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function g(a){var b=x.exec(a);if(b)return e.apply(this,b.slice(1).map(Number));var c=y.exec(a);if(c)return f(Number(c[1]),{start:s,middle:t,end:u}[c[2]]);var d=v[a];return d?d:z}function h(a){return Math.abs(i(a)/a.playbackRate)}function i(a){return a.duration*a.iterations}function j(a,b,c){return null==b?A:b=c.delay+a?C:D}function k(a,b,c,d,e){switch(d){case B:return"backwards"==b||"both"==b?0:null;case D:return c-e;case C:return"forwards"==b||"both"==b?a:null;case A:return null}}function l(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function m(a,b,c,d,e){return 1/0===c||c===-1/0||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function n(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function o(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d.easing(h)}function p(a,b,c){var d=j(a,b,c),e=k(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===B?0:1;var f=c.iterationStart*c.duration,g=l(a,e,f,c),h=m(c.duration,i(c),g,f,c),p=n(c.duration,h,g,c);return o(p,c.duration,h,c)/c.duration}var q="backwards|forwards|both|none".split("|"),r="reverse|alternate|alternate-reverse".split("|"),s=1,t=.5,u=0,v={ease:e(.25,.1,.25,1),"ease-in":e(.42,0,1,1),"ease-out":e(0,0,.58,1),"ease-in-out":e(.42,0,.58,1),"step-start":f(1,s),"step-middle":f(1,t),"step-end":f(1,u)},w="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",x=new RegExp("cubic-bezier\\("+w+","+w+","+w+","+w+"\\)"),y=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,z=function(a){return a},A=0,B=1,C=2,D=3;a.cloneTimingInput=b,a.makeTiming=c,a.normalizeTimingInput=d,a.calculateActiveDuration=h,a.calculateTimeFraction=p,a.calculatePhase=j,a.toTimingFunction=g}(c,f),function(a){function b(a,b){return a in h?h[a][b]||b:b}function c(a,c,d){var g=e[a];if(g){f.style[a]=c;for(var h in g){var i=g[h],j=f.style[i];d[i]=b(i,j)}}else d[a]=b(a,c)}function d(b){function d(){var a=e.length;null==e[a-1].offset&&(e[a-1].offset=1),a>1&&null==e[0].offset&&(e[0].offset=0);for(var b=0,c=e[0].offset,d=1;a>d;d++){var f=e[d].offset;if(null!=f){for(var g=1;d-b>g;g++)e[b+g].offset=c+(f-c)*g/(d-b);b=d,c=f}}}if(!Array.isArray(b)&&null!==b)throw new TypeError("Keyframes must be null or an array of keyframes");if(null==b)return[];for(var e=b.map(function(b){var d={};for(var e in b){var f=b[e];if("offset"==e){if(null!=f&&(f=Number(f),!isFinite(f)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==e)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};f="easing"==e?a.toTimingFunction(f):""+f}c(e,f,d)}return void 0==d.offset&&(d.offset=null),void 0==d.easing&&(d.easing=a.toTimingFunction("linear")),d}),f=!0,g=-1/0,h=0;hi)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return e=e.filter(function(a){return a.offset>=0&&a.offset<=1}),f||d(),e}var e={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},f=document.createElementNS("http://www.w3.org/1999/xhtml","div"),g={thin:"1px",medium:"3px",thick:"5px"},h={borderBottomWidth:g,borderLeftWidth:g,borderRightWidth:g,borderTopWidth:g,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:g,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.normalizeKeyframes=d}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b){function c(a){for(var b={},c=0;c=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a){function b(a,b,c){e[c]=e[c]||[],e[c].push([a,b])}function c(a,c,d){for(var e=0;ethis._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(a,b){this._style[a]=b,this._isAnimatedProperty[a]=!0},_clear:function(a){this._style[a]=this._surrogateStyle[a],delete this._isAnimatedProperty[a]}};for(var h in f)c.prototype[h]=function(a,b){return function(){var c=this._surrogateStyle[a].apply(this._surrogateStyle,arguments);return b&&(this._isAnimatedProperty[arguments[0]]||this._style[a].apply(this._style,arguments),this._updateIndices()),c}}(h,h in g);for(var i in document.documentElement.style)i in e||i in f||!function(a){b(c.prototype,a,{get:function(){return this._surrogateStyle[a]},set:function(b){this._surrogateStyle[a]=b,this._updateIndices(),this._isAnimatedProperty[a]||(this._style[a]=b)}})}(i);a.apply=function(b,c,e){d(b),b.style._set(a.propertyName(c),e)},a.clear=function(b,c){b._webAnimationsPatchedStyle&&b.style._clear(a.propertyName(c))}}(d,f),function(a){window.Element.prototype.animate=function(b,c){return a.timeline._play(a.KeyframeEffect(this,b,c))}}(d),function(a){function b(a,c,d){if("number"==typeof a&&"number"==typeof c)return a*(1-d)+c*d;if("boolean"==typeof a&&"boolean"==typeof c)return.5>d?a:c;if(a.length==c.length){for(var e=[],f=0;fj;j++)g.push(c[j]*(Math.cos(e*h)-f*i)+d[j]*i);return g}var d=function(){function a(a,b){for(var c=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],d=0;4>d;d++)for(var e=0;4>e;e++)for(var f=0;4>f;f++)c[d][e]+=b[d][f]*a[f][e];return c}function b(a){return 0==a[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]}function c(c,d,e,f,g){for(var h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],i=0;4>i;i++)h[i][3]=g[i];for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[3][i]+=c[j]*h[j][i];var k=f[0],l=f[1],m=f[2],n=f[3],o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];o[0][0]=1-2*(l*l+m*m),o[0][1]=2*(k*l-m*n),o[0][2]=2*(k*m+l*n),o[1][0]=2*(k*l+m*n),o[1][1]=1-2*(k*k+m*m),o[1][2]=2*(l*m-k*n),o[2][0]=2*(k*m-l*n),o[2][1]=2*(l*m+k*n),o[2][2]=1-2*(k*k+l*l),h=a(h,o);var p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];e[2]&&(p[2][1]=e[2],h=a(h,p)),e[1]&&(p[2][1]=0,p[2][0]=e[0],h=a(h,p)),e[0]&&(p[2][0]=0,p[1][0]=e[0],h=a(h,p));for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[i][j]*=d[i];return b(h)?[h[0][0],h[0][1],h[1][0],h[1][1],h[3][0],h[3][1]]:h[0].concat(h[1],h[2],h[3])}return c}();a.composeMatrix=d,a.quat=c}(d,f),function(a,b){a.sequenceNumber=0;var c=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!1,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this._inEffect=this._effect._update(this.playbackRate<0&&0===this.currentTime?-1:this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._tickCurrentTime(a,!0),b.invalidateEffects()))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null,b.invalidateEffects()),this._finishedFlag=!1,b.restart(),this._idle=!1,this._ensureAlive()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1)},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),b.invalidateEffects(),b.restart())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){var b=this._isFinished;if((b||this._idle)&&!this._finishedFlag){var d=new c(this,this._currentTime,a),e=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){e.forEach(function(a){a.call(d.target,d)})},0)}this._finishedFlag=b},_tick:function(a){return this._idle||this._paused||(null==this._startTime?this.startTime=a-this._currentTime/this.playbackRate:this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),this._currentTimePending=!1,this._fireEvents(a),!this._idle&&(this._inEffect||!this._finishedFlag)}}}(c,d,f),function(a,b){function c(a){var b=i;i=[],a0&&(s.currentTime+=q*(Math.floor((a-s.currentTime)/q)+1)),g(s.currentTime)}return f(),r.apply(this,arguments)}});var s=new e;b.timeline=s}(c,d,f),function(a){function b(a,b){for(var c=0,d=0;do;o++){for(var p=0,q=0;3>q;q++)p+=b[3][q]*m[q][o];n.push(p)}return n.push(1),m.push(n),m}function d(a){return[[a[0][0],a[1][0],a[2][0],a[3][0]],[a[0][1],a[1][1],a[2][1],a[3][1]],[a[0][2],a[1][2],a[2][2],a[3][2]],[a[0][3],a[1][3],a[2][3],a[3][3]]]}function e(a,b){for(var c=[],d=0;4>d;d++){for(var e=0,f=0;4>f;f++)e+=a[f]*b[f][d];c.push(e)}return c}function f(a){var b=g(a);return[a[0]/b,a[1]/b,a[2]/b]}function g(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function h(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function i(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function j(j){var k=[j.slice(0,4),j.slice(4,8),j.slice(8,12),j.slice(12,16)];if(1!==k[3][3])return null;for(var l=[],m=0;4>m;m++)l.push(k[m].slice());for(var m=0;3>m;m++)l[m][3]=0;if(0===a(l))return!1;var n,o=[];if(k[0][3]||k[1][3]||k[2][3]){o.push(k[0][3]),o.push(k[1][3]),o.push(k[2][3]),o.push(k[3][3]);var p=c(l),q=d(p);n=e(o,q)}else n=[0,0,0,1];var r=k[3].slice(0,3),s=[];s.push(k[0].slice(0,3));var t=[];t.push(g(s[0])),s[0]=f(s[0]);var u=[];s.push(k[1].slice(0,3)),u.push(b(s[0],s[1])),s[1]=h(s[1],s[0],1,-u[0]),t.push(g(s[1])),s[1]=f(s[1]),u[0]/=t[1],s.push(k[2].slice(0,3)),u.push(b(s[0],s[2])),s[2]=h(s[2],s[0],1,-u[1]),u.push(b(s[1],s[2])),s[2]=h(s[2],s[1],1,-u[2]),t.push(g(s[2])),s[2]=f(s[2]),u[1]/=t[2],u[2]/=t[2];var v=i(s[1],s[2]);if(b(s[0],v)<0)for(var m=0;3>m;m++)t[m]*=-1,s[m][0]*=-1,s[m][1]*=-1,s[m][2]*=-1;var w,x,y=s[0][0]+s[1][1]+s[2][2]+1;return y>1e-4?(w=.5/Math.sqrt(y),x=[(s[2][1]-s[1][2])*w,(s[0][2]-s[2][0])*w,(s[1][0]-s[0][1])*w,.25/w]):s[0][0]>s[1][1]&&s[0][0]>s[2][2]?(w=2*Math.sqrt(1+s[0][0]-s[1][1]-s[2][2]),x=[.25*w,(s[0][1]+s[1][0])/w,(s[0][2]+s[2][0])/w,(s[2][1]-s[1][2])/w]):s[1][1]>s[2][2]?(w=2*Math.sqrt(1+s[1][1]-s[0][0]-s[2][2]),x=[(s[0][1]+s[1][0])/w,.25*w,(s[1][2]+s[2][1])/w,(s[0][2]-s[2][0])/w]):(w=2*Math.sqrt(1+s[2][2]-s[0][0]-s[1][1]),x=[(s[0][2]+s[2][0])/w,(s[1][2]+s[2][1])/w,.25*w,(s[1][0]-s[0][1])/w]),[r,t,u,x,n]}return j}();a.dot=b,a.makeMatrixDecomposition=f}(d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;ek;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,b,["visibility"])}(d),function(a){function b(a){a=a.trim(),e.fillStyle="#000",e.fillStyle=a;var b=e.fillStyle;if(e.fillStyle="#fff",e.fillStyle=a,b==e.fillStyle){e.fillRect(0,0,1,1);var c=e.getImageData(0,0,1,1).data;e.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function c(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=d.height=1;var e=d.getContext("2d");a.addPropertiesHandler(b,c,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,b),a.mergeColors=c}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e; +var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a){function b(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function c(c){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,b,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],c);return d&&4==d[0].length?d[0]:void 0}function d(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function e(a){return"rect("+a+")"}var f=a.mergeWrappedNestedRepeated.bind(null,e,d,", ");a.parseBox=c,a.mergeBoxes=f,a.addPropertiesHandler(c,f,["clip"])}(d,f),function(a){function b(a){return function(b){var c=0;return a.map(function(a){return a===j?b[c++]:a})}}function c(a){return a}function d(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=m[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.lengthb||b>900||b%100!==0?void 0:b}function c(b){return b=100*Math.round(b/100),b=a.clamp(100,900,b),400===b?"normal":700===b?"bold":String(b)}function d(a,b){return[a,b,c]}a.addPropertiesHandler(b,d,["font-weight"])}(d),function(a){function b(a){var b={};for(var c in a)b[c]=-a[c];return b}function c(b){return a.consumeToken(/^(left|center|right|top|bottom)\b/i,b)||a.consumeLengthOrPercent(b)}function d(b,d){var e=a.consumeRepeated(c,/^/,d);if(e&&""==e[1]){var f=e[0];if(f[0]=f[0]||"center",f[1]=f[1]||"center",3==b&&(f[2]=f[2]||{px:0}),f.length==b){if(/top|bottom/.test(f[0])||/left|right/.test(f[1])){var h=f[0];f[0]=f[1],f[1]=h}if(/left|right|center|Object/.test(f[0])&&/top|bottom|center|Object/.test(f[1]))return f.map(function(a){return"object"==typeof a?a:g[a]})}}}function e(d){var e=a.consumeRepeated(c,/^/,d);if(e){for(var f=e[0],h=[{"%":50},{"%":50}],i=0,j=!1,k=0;k + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/web-animations-js/web-animations.min.js b/dashboard-ui/bower_components/web-animations-js/web-animations.min.js new file mode 100644 index 0000000000..62c3ae57b7 --- /dev/null +++ b/dashboard-ui/bower_components/web-animations-js/web-animations.min.js @@ -0,0 +1,17 @@ +// Copyright 2014 Google Inc. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +!function(a,b){b["true"]=a,function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}var c={},d={},e={},f=null;!function(a){function b(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function c(b,c){var d={delay:0,endDelay:0,fill:c?"both":"none",iterationStart:0,iterations:1,duration:c?"auto":0,playbackRate:1,direction:"normal",easing:"linear"};return"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof d[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==q.indexOf(b[c]))return;if("direction"==c&&-1==r.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;d[c]=b[c]}}):d.duration=b,d}function d(a,b){var d=c(a,b);return d.easing=g(d.easing),d}function e(a,b,c,d){return 0>a||a>1||0>c||c>1?z:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(0==e||1==e)return e;for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<.001)return f(b,d,i);e>j?g=i:h=i}}}function f(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function g(a){var b=x.exec(a);if(b)return e.apply(this,b.slice(1).map(Number));var c=y.exec(a);if(c)return f(Number(c[1]),{start:s,middle:t,end:u}[c[2]]);var d=v[a];return d?d:z}function h(a){return Math.abs(i(a)/a.playbackRate)}function i(a){return a.duration*a.iterations}function j(a,b,c){return null==b?A:b=c.delay+a?C:D}function k(a,b,c,d,e){switch(d){case B:return"backwards"==b||"both"==b?0:null;case D:return c-e;case C:return"forwards"==b||"both"==b?a:null;case A:return null}}function l(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function m(a,b,c,d,e){return 1/0===c||c===-1/0||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function n(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function o(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d.easing(h)}function p(a,b,c){var d=j(a,b,c),e=k(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===B?0:1;var f=c.iterationStart*c.duration,g=l(a,e,f,c),h=m(c.duration,i(c),g,f,c),p=n(c.duration,h,g,c);return o(p,c.duration,h,c)/c.duration}var q="backwards|forwards|both|none".split("|"),r="reverse|alternate|alternate-reverse".split("|"),s=1,t=.5,u=0,v={ease:e(.25,.1,.25,1),"ease-in":e(.42,0,1,1),"ease-out":e(0,0,.58,1),"ease-in-out":e(.42,0,.58,1),"step-start":f(1,s),"step-middle":f(1,t),"step-end":f(1,u)},w="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",x=new RegExp("cubic-bezier\\("+w+","+w+","+w+","+w+"\\)"),y=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,z=function(a){return a},A=0,B=1,C=2,D=3;a.cloneTimingInput=b,a.makeTiming=c,a.normalizeTimingInput=d,a.calculateActiveDuration=h,a.calculateTimeFraction=p,a.calculatePhase=j,a.toTimingFunction=g}(c,f),function(a){function b(a,b){return a in h?h[a][b]||b:b}function c(a,c,d){var g=e[a];if(g){f.style[a]=c;for(var h in g){var i=g[h],j=f.style[i];d[i]=b(i,j)}}else d[a]=b(a,c)}function d(b){function d(){var a=e.length;null==e[a-1].offset&&(e[a-1].offset=1),a>1&&null==e[0].offset&&(e[0].offset=0);for(var b=0,c=e[0].offset,d=1;a>d;d++){var f=e[d].offset;if(null!=f){for(var g=1;d-b>g;g++)e[b+g].offset=c+(f-c)*g/(d-b);b=d,c=f}}}if(!Array.isArray(b)&&null!==b)throw new TypeError("Keyframes must be null or an array of keyframes");if(null==b)return[];for(var e=b.map(function(b){var d={};for(var e in b){var f=b[e];if("offset"==e){if(null!=f&&(f=Number(f),!isFinite(f)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==e)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};f="easing"==e?a.toTimingFunction(f):""+f}c(e,f,d)}return void 0==d.offset&&(d.offset=null),void 0==d.easing&&(d.easing=a.toTimingFunction("linear")),d}),f=!0,g=-1/0,h=0;hi)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return e=e.filter(function(a){return a.offset>=0&&a.offset<=1}),f||d(),e}var e={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},f=document.createElementNS("http://www.w3.org/1999/xhtml","div"),g={thin:"1px",medium:"3px",thick:"5px"},h={borderBottomWidth:g,borderLeftWidth:g,borderRightWidth:g,borderTopWidth:g,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:g,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.normalizeKeyframes=d}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(a,b){function c(a){for(var b={},c=0;c=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a){function b(a,b,c){e[c]=e[c]||[],e[c].push([a,b])}function c(a,c,d){for(var e=0;ethis._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(a,b){this._style[a]=b,this._isAnimatedProperty[a]=!0},_clear:function(a){this._style[a]=this._surrogateStyle[a],delete this._isAnimatedProperty[a]}};for(var h in f)c.prototype[h]=function(a,b){return function(){var c=this._surrogateStyle[a].apply(this._surrogateStyle,arguments);return b&&(this._isAnimatedProperty[arguments[0]]||this._style[a].apply(this._style,arguments),this._updateIndices()),c}}(h,h in g);for(var i in document.documentElement.style)i in e||i in f||!function(a){b(c.prototype,a,{get:function(){return this._surrogateStyle[a]},set:function(b){this._surrogateStyle[a]=b,this._updateIndices(),this._isAnimatedProperty[a]||(this._style[a]=b)}})}(i);a.apply=function(b,c,e){d(b),b.style._set(a.propertyName(c),e)},a.clear=function(b,c){b._webAnimationsPatchedStyle&&b.style._clear(a.propertyName(c))}}(d,f),function(a){window.Element.prototype.animate=function(b,c){return a.timeline._play(a.KeyframeEffect(this,b,c))}}(d),function(a){function b(a,c,d){if("number"==typeof a&&"number"==typeof c)return a*(1-d)+c*d;if("boolean"==typeof a&&"boolean"==typeof c)return.5>d?a:c;if(a.length==c.length){for(var e=[],f=0;fj;j++)g.push(c[j]*(Math.cos(e*h)-f*i)+d[j]*i);return g}var d=function(){function a(a,b){for(var c=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],d=0;4>d;d++)for(var e=0;4>e;e++)for(var f=0;4>f;f++)c[d][e]+=b[d][f]*a[f][e];return c}function b(a){return 0==a[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]}function c(c,d,e,f,g){for(var h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],i=0;4>i;i++)h[i][3]=g[i];for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[3][i]+=c[j]*h[j][i];var k=f[0],l=f[1],m=f[2],n=f[3],o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];o[0][0]=1-2*(l*l+m*m),o[0][1]=2*(k*l-m*n),o[0][2]=2*(k*m+l*n),o[1][0]=2*(k*l+m*n),o[1][1]=1-2*(k*k+m*m),o[1][2]=2*(l*m-k*n),o[2][0]=2*(k*m-l*n),o[2][1]=2*(l*m+k*n),o[2][2]=1-2*(k*k+l*l),h=a(h,o);var p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];e[2]&&(p[2][1]=e[2],h=a(h,p)),e[1]&&(p[2][1]=0,p[2][0]=e[0],h=a(h,p)),e[0]&&(p[2][0]=0,p[1][0]=e[0],h=a(h,p));for(var i=0;3>i;i++)for(var j=0;3>j;j++)h[i][j]*=d[i];return b(h)?[h[0][0],h[0][1],h[1][0],h[1][1],h[3][0],h[3][1]]:h[0].concat(h[1],h[2],h[3])}return c}();a.composeMatrix=d,a.quat=c}(d,f),function(a,b){a.sequenceNumber=0;var c=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!1,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this._inEffect=this._effect._update(this.playbackRate<0&&0===this.currentTime?-1:this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._tickCurrentTime(a,!0),b.invalidateEffects()))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null,b.invalidateEffects()),this._finishedFlag=!1,b.restart(),this._idle=!1,this._ensureAlive()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1)},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),b.invalidateEffects(),b.restart())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){var b=this._isFinished;if((b||this._idle)&&!this._finishedFlag){var d=new c(this,this._currentTime,a),e=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){e.forEach(function(a){a.call(d.target,d)})},0)}this._finishedFlag=b},_tick:function(a){return this._idle||this._paused||(null==this._startTime?this.startTime=a-this._currentTime/this.playbackRate:this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),this._currentTimePending=!1,this._fireEvents(a),!this._idle&&(this._inEffect||!this._finishedFlag)}}}(c,d,f),function(a,b){function c(a){var b=i;i=[],a0&&(s.currentTime+=q*(Math.floor((a-s.currentTime)/q)+1)),g(s.currentTime)}return f(),r.apply(this,arguments)}});var s=new e;b.timeline=s}(c,d,f),function(a){function b(a,b){for(var c=0,d=0;do;o++){for(var p=0,q=0;3>q;q++)p+=b[3][q]*m[q][o];n.push(p)}return n.push(1),m.push(n),m}function d(a){return[[a[0][0],a[1][0],a[2][0],a[3][0]],[a[0][1],a[1][1],a[2][1],a[3][1]],[a[0][2],a[1][2],a[2][2],a[3][2]],[a[0][3],a[1][3],a[2][3],a[3][3]]]}function e(a,b){for(var c=[],d=0;4>d;d++){for(var e=0,f=0;4>f;f++)e+=a[f]*b[f][d];c.push(e)}return c}function f(a){var b=g(a);return[a[0]/b,a[1]/b,a[2]/b]}function g(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function h(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function i(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function j(j){var k=[j.slice(0,4),j.slice(4,8),j.slice(8,12),j.slice(12,16)];if(1!==k[3][3])return null;for(var l=[],m=0;4>m;m++)l.push(k[m].slice());for(var m=0;3>m;m++)l[m][3]=0;if(0===a(l))return!1;var n,o=[];if(k[0][3]||k[1][3]||k[2][3]){o.push(k[0][3]),o.push(k[1][3]),o.push(k[2][3]),o.push(k[3][3]);var p=c(l),q=d(p);n=e(o,q)}else n=[0,0,0,1];var r=k[3].slice(0,3),s=[];s.push(k[0].slice(0,3));var t=[];t.push(g(s[0])),s[0]=f(s[0]);var u=[];s.push(k[1].slice(0,3)),u.push(b(s[0],s[1])),s[1]=h(s[1],s[0],1,-u[0]),t.push(g(s[1])),s[1]=f(s[1]),u[0]/=t[1],s.push(k[2].slice(0,3)),u.push(b(s[0],s[2])),s[2]=h(s[2],s[0],1,-u[1]),u.push(b(s[1],s[2])),s[2]=h(s[2],s[1],1,-u[2]),t.push(g(s[2])),s[2]=f(s[2]),u[1]/=t[2],u[2]/=t[2];var v=i(s[1],s[2]);if(b(s[0],v)<0)for(var m=0;3>m;m++)t[m]*=-1,s[m][0]*=-1,s[m][1]*=-1,s[m][2]*=-1;var w,x,y=s[0][0]+s[1][1]+s[2][2]+1;return y>1e-4?(w=.5/Math.sqrt(y),x=[(s[2][1]-s[1][2])*w,(s[0][2]-s[2][0])*w,(s[1][0]-s[0][1])*w,.25/w]):s[0][0]>s[1][1]&&s[0][0]>s[2][2]?(w=2*Math.sqrt(1+s[0][0]-s[1][1]-s[2][2]),x=[.25*w,(s[0][1]+s[1][0])/w,(s[0][2]+s[2][0])/w,(s[2][1]-s[1][2])/w]):s[1][1]>s[2][2]?(w=2*Math.sqrt(1+s[1][1]-s[0][0]-s[2][2]),x=[(s[0][1]+s[1][0])/w,.25*w,(s[1][2]+s[2][1])/w,(s[0][2]-s[2][0])/w]):(w=2*Math.sqrt(1+s[2][2]-s[0][0]-s[1][1]),x=[(s[0][2]+s[2][0])/w,(s[1][2]+s[2][1])/w,.25*w,(s[1][0]-s[0][1])/w]),[r,t,u,x,n]}return j}();a.dot=b,a.makeMatrixDecomposition=f}(d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;ek;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,b,["visibility"])}(d),function(a){function b(a){a=a.trim(),e.fillStyle="#000",e.fillStyle=a;var b=e.fillStyle;if(e.fillStyle="#fff",e.fillStyle=a,b==e.fillStyle){e.fillRect(0,0,1,1);var c=e.getImageData(0,0,1,1).data;e.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function c(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=d.height=1;var e=d.getContext("2d");a.addPropertiesHandler(b,c,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,b),a.mergeColors=c}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e; +var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a){function b(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function c(c){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,b,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],c);return d&&4==d[0].length?d[0]:void 0}function d(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function e(a){return"rect("+a+")"}var f=a.mergeWrappedNestedRepeated.bind(null,e,d,", ");a.parseBox=c,a.mergeBoxes=f,a.addPropertiesHandler(c,f,["clip"])}(d,f),function(a){function b(a){return function(b){var c=0;return a.map(function(a){return a===j?b[c++]:a})}}function c(a){return a}function d(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=m[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.lengthb||b>900||b%100!==0?void 0:b}function c(b){return b=100*Math.round(b/100),b=a.clamp(100,900,b),400===b?"normal":700===b?"bold":String(b)}function d(a,b){return[a,b,c]}a.addPropertiesHandler(b,d,["font-weight"])}(d),function(a){function b(a){var b={};for(var c in a)b[c]=-a[c];return b}function c(b){return a.consumeToken(/^(left|center|right|top|bottom)\b/i,b)||a.consumeLengthOrPercent(b)}function d(b,d){var e=a.consumeRepeated(c,/^/,d);if(e&&""==e[1]){var f=e[0];if(f[0]=f[0]||"center",f[1]=f[1]||"center",3==b&&(f[2]=f[2]||{px:0}),f.length==b){if(/top|bottom/.test(f[0])||/left|right/.test(f[1])){var h=f[0];f[0]=f[1],f[1]=h}if(/left|right|center|Object/.test(f[0])&&/top|bottom|center|Object/.test(f[1]))return f.map(function(a){return"object"==typeof a?a:g[a]})}}}function e(d){var e=a.consumeRepeated(c,/^/,d);if(e){for(var f=e[0],h=[{"%":50},{"%":50}],i=0,j=!1,k=0;k>> 0) + (counter++ + "__"); + }; + WeakMap.prototype = { + set: function(key, value) { + var entry = key[this.name]; + if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { + value: [ key, value ], + writable: true + }); + return this; + }, + get: function(key) { + var entry; + return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; + }, + "delete": function(key) { + var entry = key[this.name]; + if (!entry || entry[0] !== key) return false; + entry[0] = entry[1] = undefined; + return true; + }, + has: function(key) { + var entry = key[this.name]; + if (!entry) return false; + return entry[0] === key; + } + }; + window.WeakMap = WeakMap; + })(); +} + +(function(global) { + var registrationsTable = new WeakMap(); + var setImmediate; + if (/Trident|Edge/.test(navigator.userAgent)) { + setImmediate = setTimeout; + } else if (window.setImmediate) { + setImmediate = window.setImmediate; + } else { + var setImmediateQueue = []; + var sentinel = String(Math.random()); + window.addEventListener("message", function(e) { + if (e.data === sentinel) { + var queue = setImmediateQueue; + setImmediateQueue = []; + queue.forEach(function(func) { + func(); + }); + } + }); + setImmediate = function(func) { + setImmediateQueue.push(func); + window.postMessage(sentinel, "*"); + }; + } + var isScheduled = false; + var scheduledObservers = []; + function scheduleCallback(observer) { + scheduledObservers.push(observer); + if (!isScheduled) { + isScheduled = true; + setImmediate(dispatchCallbacks); + } + } + function wrapIfNeeded(node) { + return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node; + } + function dispatchCallbacks() { + isScheduled = false; + var observers = scheduledObservers; + scheduledObservers = []; + observers.sort(function(o1, o2) { + return o1.uid_ - o2.uid_; + }); + var anyNonEmpty = false; + observers.forEach(function(observer) { + var queue = observer.takeRecords(); + removeTransientObserversFor(observer); + if (queue.length) { + observer.callback_(queue, observer); + anyNonEmpty = true; + } + }); + if (anyNonEmpty) dispatchCallbacks(); + } + function removeTransientObserversFor(observer) { + observer.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + if (!registrations) return; + registrations.forEach(function(registration) { + if (registration.observer === observer) registration.removeTransientObservers(); + }); + }); + } + function forEachAncestorAndObserverEnqueueRecord(target, callback) { + for (var node = target; node; node = node.parentNode) { + var registrations = registrationsTable.get(node); + if (registrations) { + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + var options = registration.options; + if (node !== target && !options.subtree) continue; + var record = callback(options); + if (record) registration.enqueue(record); + } + } + } + } + var uidCounter = 0; + function JsMutationObserver(callback) { + this.callback_ = callback; + this.nodes_ = []; + this.records_ = []; + this.uid_ = ++uidCounter; + } + JsMutationObserver.prototype = { + observe: function(target, options) { + target = wrapIfNeeded(target); + if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) { + throw new SyntaxError(); + } + var registrations = registrationsTable.get(target); + if (!registrations) registrationsTable.set(target, registrations = []); + var registration; + for (var i = 0; i < registrations.length; i++) { + if (registrations[i].observer === this) { + registration = registrations[i]; + registration.removeListeners(); + registration.options = options; + break; + } + } + if (!registration) { + registration = new Registration(this, target, options); + registrations.push(registration); + this.nodes_.push(target); + } + registration.addListeners(); + }, + disconnect: function() { + this.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.observer === this) { + registration.removeListeners(); + registrations.splice(i, 1); + break; + } + } + }, this); + this.records_ = []; + }, + takeRecords: function() { + var copyOfRecords = this.records_; + this.records_ = []; + return copyOfRecords; + } + }; + function MutationRecord(type, target) { + this.type = type; + this.target = target; + this.addedNodes = []; + this.removedNodes = []; + this.previousSibling = null; + this.nextSibling = null; + this.attributeName = null; + this.attributeNamespace = null; + this.oldValue = null; + } + function copyMutationRecord(original) { + var record = new MutationRecord(original.type, original.target); + record.addedNodes = original.addedNodes.slice(); + record.removedNodes = original.removedNodes.slice(); + record.previousSibling = original.previousSibling; + record.nextSibling = original.nextSibling; + record.attributeName = original.attributeName; + record.attributeNamespace = original.attributeNamespace; + record.oldValue = original.oldValue; + return record; + } + var currentRecord, recordWithOldValue; + function getRecord(type, target) { + return currentRecord = new MutationRecord(type, target); + } + function getRecordWithOldValue(oldValue) { + if (recordWithOldValue) return recordWithOldValue; + recordWithOldValue = copyMutationRecord(currentRecord); + recordWithOldValue.oldValue = oldValue; + return recordWithOldValue; + } + function clearRecords() { + currentRecord = recordWithOldValue = undefined; + } + function recordRepresentsCurrentMutation(record) { + return record === recordWithOldValue || record === currentRecord; + } + function selectRecord(lastRecord, newRecord) { + if (lastRecord === newRecord) return lastRecord; + if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue; + return null; + } + function Registration(observer, target, options) { + this.observer = observer; + this.target = target; + this.options = options; + this.transientObservedNodes = []; + } + Registration.prototype = { + enqueue: function(record) { + var records = this.observer.records_; + var length = records.length; + if (records.length > 0) { + var lastRecord = records[length - 1]; + var recordToReplaceLast = selectRecord(lastRecord, record); + if (recordToReplaceLast) { + records[length - 1] = recordToReplaceLast; + return; + } + } else { + scheduleCallback(this.observer); + } + records[length] = record; + }, + addListeners: function() { + this.addListeners_(this.target); + }, + addListeners_: function(node) { + var options = this.options; + if (options.attributes) node.addEventListener("DOMAttrModified", this, true); + if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.addEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true); + }, + removeListeners: function() { + this.removeListeners_(this.target); + }, + removeListeners_: function(node) { + var options = this.options; + if (options.attributes) node.removeEventListener("DOMAttrModified", this, true); + if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.removeEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true); + }, + addTransientObserver: function(node) { + if (node === this.target) return; + this.addListeners_(node); + this.transientObservedNodes.push(node); + var registrations = registrationsTable.get(node); + if (!registrations) registrationsTable.set(node, registrations = []); + registrations.push(this); + }, + removeTransientObservers: function() { + var transientObservedNodes = this.transientObservedNodes; + this.transientObservedNodes = []; + transientObservedNodes.forEach(function(node) { + this.removeListeners_(node); + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + if (registrations[i] === this) { + registrations.splice(i, 1); + break; + } + } + }, this); + }, + handleEvent: function(e) { + e.stopImmediatePropagation(); + switch (e.type) { + case "DOMAttrModified": + var name = e.attrName; + var namespace = e.relatedNode.namespaceURI; + var target = e.target; + var record = new getRecord("attributes", target); + record.attributeName = name; + record.attributeNamespace = namespace; + var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.attributes) return; + if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) { + return; + } + if (options.attributeOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMCharacterDataModified": + var target = e.target; + var record = getRecord("characterData", target); + var oldValue = e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.characterData) return; + if (options.characterDataOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMNodeRemoved": + this.addTransientObserver(e.target); + + case "DOMNodeInserted": + var changedNode = e.target; + var addedNodes, removedNodes; + if (e.type === "DOMNodeInserted") { + addedNodes = [ changedNode ]; + removedNodes = []; + } else { + addedNodes = []; + removedNodes = [ changedNode ]; + } + var previousSibling = changedNode.previousSibling; + var nextSibling = changedNode.nextSibling; + var record = getRecord("childList", e.target.parentNode); + record.addedNodes = addedNodes; + record.removedNodes = removedNodes; + record.previousSibling = previousSibling; + record.nextSibling = nextSibling; + forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) { + if (!options.childList) return; + return record; + }); + } + clearRecords(); + } + }; + global.JsMutationObserver = JsMutationObserver; + if (!global.MutationObserver) global.MutationObserver = JsMutationObserver; +})(this); + +window.CustomElements = window.CustomElements || { + flags: {} +}; + +(function(scope) { + var flags = scope.flags; + var modules = []; + var addModule = function(module) { + modules.push(module); + }; + var initializeModules = function() { + modules.forEach(function(module) { + module(scope); + }); + }; + scope.addModule = addModule; + scope.initializeModules = initializeModules; + scope.hasNative = Boolean(document.registerElement); + scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative); +})(window.CustomElements); + +window.CustomElements.addModule(function(scope) { + var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none"; + function forSubtree(node, cb) { + findAllElements(node, function(e) { + if (cb(e)) { + return true; + } + forRoots(e, cb); + }); + forRoots(node, cb); + } + function findAllElements(node, find, data) { + var e = node.firstElementChild; + if (!e) { + e = node.firstChild; + while (e && e.nodeType !== Node.ELEMENT_NODE) { + e = e.nextSibling; + } + } + while (e) { + if (find(e, data) !== true) { + findAllElements(e, find, data); + } + e = e.nextElementSibling; + } + return null; + } + function forRoots(node, cb) { + var root = node.shadowRoot; + while (root) { + forSubtree(root, cb); + root = root.olderShadowRoot; + } + } + function forDocumentTree(doc, cb) { + _forDocumentTree(doc, cb, []); + } + function _forDocumentTree(doc, cb, processingDocuments) { + doc = window.wrap(doc); + if (processingDocuments.indexOf(doc) >= 0) { + return; + } + processingDocuments.push(doc); + var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]"); + for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) { + if (n.import) { + _forDocumentTree(n.import, cb, processingDocuments); + } + } + cb(doc); + } + scope.forDocumentTree = forDocumentTree; + scope.forSubtree = forSubtree; +}); + +window.CustomElements.addModule(function(scope) { + var flags = scope.flags; + var forSubtree = scope.forSubtree; + var forDocumentTree = scope.forDocumentTree; + function addedNode(node) { + return added(node) || addedSubtree(node); + } + function added(node) { + if (scope.upgrade(node)) { + return true; + } + attached(node); + } + function addedSubtree(node) { + forSubtree(node, function(e) { + if (added(e)) { + return true; + } + }); + } + function attachedNode(node) { + attached(node); + if (inDocument(node)) { + forSubtree(node, function(e) { + attached(e); + }); + } + } + var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver; + scope.hasPolyfillMutations = hasPolyfillMutations; + var isPendingMutations = false; + var pendingMutations = []; + function deferMutation(fn) { + pendingMutations.push(fn); + if (!isPendingMutations) { + isPendingMutations = true; + setTimeout(takeMutations); + } + } + function takeMutations() { + isPendingMutations = false; + var $p = pendingMutations; + for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { + p(); + } + pendingMutations = []; + } + function attached(element) { + if (hasPolyfillMutations) { + deferMutation(function() { + _attached(element); + }); + } else { + _attached(element); + } + } + function _attached(element) { + if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { + if (!element.__attached && inDocument(element)) { + element.__attached = true; + if (element.attachedCallback) { + element.attachedCallback(); + } + } + } + } + function detachedNode(node) { + detached(node); + forSubtree(node, function(e) { + detached(e); + }); + } + function detached(element) { + if (hasPolyfillMutations) { + deferMutation(function() { + _detached(element); + }); + } else { + _detached(element); + } + } + function _detached(element) { + if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { + if (element.__attached && !inDocument(element)) { + element.__attached = false; + if (element.detachedCallback) { + element.detachedCallback(); + } + } + } + } + function inDocument(element) { + var p = element; + var doc = wrap(document); + while (p) { + if (p == doc) { + return true; + } + p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host; + } + } + function watchShadow(node) { + if (node.shadowRoot && !node.shadowRoot.__watched) { + flags.dom && console.log("watching shadow-root for: ", node.localName); + var root = node.shadowRoot; + while (root) { + observe(root); + root = root.olderShadowRoot; + } + } + } + function handler(mutations) { + if (flags.dom) { + var mx = mutations[0]; + if (mx && mx.type === "childList" && mx.addedNodes) { + if (mx.addedNodes) { + var d = mx.addedNodes[0]; + while (d && d !== document && !d.host) { + d = d.parentNode; + } + var u = d && (d.URL || d._URL || d.host && d.host.localName) || ""; + u = u.split("/?").shift().split("/").pop(); + } + } + console.group("mutations (%d) [%s]", mutations.length, u || ""); + } + mutations.forEach(function(mx) { + if (mx.type === "childList") { + forEach(mx.addedNodes, function(n) { + if (!n.localName) { + return; + } + addedNode(n); + }); + forEach(mx.removedNodes, function(n) { + if (!n.localName) { + return; + } + detachedNode(n); + }); + } + }); + flags.dom && console.groupEnd(); + } + function takeRecords(node) { + node = window.wrap(node); + if (!node) { + node = window.wrap(document); + } + while (node.parentNode) { + node = node.parentNode; + } + var observer = node.__observer; + if (observer) { + handler(observer.takeRecords()); + takeMutations(); + } + } + var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach); + function observe(inRoot) { + if (inRoot.__observer) { + return; + } + var observer = new MutationObserver(handler); + observer.observe(inRoot, { + childList: true, + subtree: true + }); + inRoot.__observer = observer; + } + function upgradeDocument(doc) { + doc = window.wrap(doc); + flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop()); + addedNode(doc); + observe(doc); + flags.dom && console.groupEnd(); + } + function upgradeDocumentTree(doc) { + forDocumentTree(doc, upgradeDocument); + } + var originalCreateShadowRoot = Element.prototype.createShadowRoot; + if (originalCreateShadowRoot) { + Element.prototype.createShadowRoot = function() { + var root = originalCreateShadowRoot.call(this); + window.CustomElements.watchShadow(this); + return root; + }; + } + scope.watchShadow = watchShadow; + scope.upgradeDocumentTree = upgradeDocumentTree; + scope.upgradeSubtree = addedSubtree; + scope.upgradeAll = addedNode; + scope.attachedNode = attachedNode; + scope.takeRecords = takeRecords; +}); + +window.CustomElements.addModule(function(scope) { + var flags = scope.flags; + function upgrade(node) { + if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { + var is = node.getAttribute("is"); + var definition = scope.getRegisteredDefinition(is || node.localName); + if (definition) { + if (is && definition.tag == node.localName) { + return upgradeWithDefinition(node, definition); + } else if (!is && !definition.extends) { + return upgradeWithDefinition(node, definition); + } + } + } + } + function upgradeWithDefinition(element, definition) { + flags.upgrade && console.group("upgrade:", element.localName); + if (definition.is) { + element.setAttribute("is", definition.is); + } + implementPrototype(element, definition); + element.__upgraded__ = true; + created(element); + scope.attachedNode(element); + scope.upgradeSubtree(element); + flags.upgrade && console.groupEnd(); + return element; + } + function implementPrototype(element, definition) { + if (Object.__proto__) { + element.__proto__ = definition.prototype; + } else { + customMixin(element, definition.prototype, definition.native); + element.__proto__ = definition.prototype; + } + } + function customMixin(inTarget, inSrc, inNative) { + var used = {}; + var p = inSrc; + while (p !== inNative && p !== HTMLElement.prototype) { + var keys = Object.getOwnPropertyNames(p); + for (var i = 0, k; k = keys[i]; i++) { + if (!used[k]) { + Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k)); + used[k] = 1; + } + } + p = Object.getPrototypeOf(p); + } + } + function created(element) { + if (element.createdCallback) { + element.createdCallback(); + } + } + scope.upgrade = upgrade; + scope.upgradeWithDefinition = upgradeWithDefinition; + scope.implementPrototype = implementPrototype; +}); + +window.CustomElements.addModule(function(scope) { + var isIE11OrOlder = scope.isIE11OrOlder; + var upgradeDocumentTree = scope.upgradeDocumentTree; + var upgradeAll = scope.upgradeAll; + var upgradeWithDefinition = scope.upgradeWithDefinition; + var implementPrototype = scope.implementPrototype; + var useNative = scope.useNative; + function register(name, options) { + var definition = options || {}; + if (!name) { + throw new Error("document.registerElement: first argument `name` must not be empty"); + } + if (name.indexOf("-") < 0) { + throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'."); + } + if (isReservedTag(name)) { + throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid."); + } + if (getRegisteredDefinition(name)) { + throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered"); + } + if (!definition.prototype) { + definition.prototype = Object.create(HTMLElement.prototype); + } + definition.__name = name.toLowerCase(); + definition.lifecycle = definition.lifecycle || {}; + definition.ancestry = ancestry(definition.extends); + resolveTagName(definition); + resolvePrototypeChain(definition); + overrideAttributeApi(definition.prototype); + registerDefinition(definition.__name, definition); + definition.ctor = generateConstructor(definition); + definition.ctor.prototype = definition.prototype; + definition.prototype.constructor = definition.ctor; + if (scope.ready) { + upgradeDocumentTree(document); + } + return definition.ctor; + } + function overrideAttributeApi(prototype) { + if (prototype.setAttribute._polyfilled) { + return; + } + var setAttribute = prototype.setAttribute; + prototype.setAttribute = function(name, value) { + changeAttribute.call(this, name, value, setAttribute); + }; + var removeAttribute = prototype.removeAttribute; + prototype.removeAttribute = function(name) { + changeAttribute.call(this, name, null, removeAttribute); + }; + prototype.setAttribute._polyfilled = true; + } + function changeAttribute(name, value, operation) { + name = name.toLowerCase(); + var oldValue = this.getAttribute(name); + operation.apply(this, arguments); + var newValue = this.getAttribute(name); + if (this.attributeChangedCallback && newValue !== oldValue) { + this.attributeChangedCallback(name, oldValue, newValue); + } + } + function isReservedTag(name) { + for (var i = 0; i < reservedTagList.length; i++) { + if (name === reservedTagList[i]) { + return true; + } + } + } + var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ]; + function ancestry(extnds) { + var extendee = getRegisteredDefinition(extnds); + if (extendee) { + return ancestry(extendee.extends).concat([ extendee ]); + } + return []; + } + function resolveTagName(definition) { + var baseTag = definition.extends; + for (var i = 0, a; a = definition.ancestry[i]; i++) { + baseTag = a.is && a.tag; + } + definition.tag = baseTag || definition.__name; + if (baseTag) { + definition.is = definition.__name; + } + } + function resolvePrototypeChain(definition) { + if (!Object.__proto__) { + var nativePrototype = HTMLElement.prototype; + if (definition.is) { + var inst = document.createElement(definition.tag); + var expectedPrototype = Object.getPrototypeOf(inst); + if (expectedPrototype === definition.prototype) { + nativePrototype = expectedPrototype; + } + } + var proto = definition.prototype, ancestor; + while (proto && proto !== nativePrototype) { + ancestor = Object.getPrototypeOf(proto); + proto.__proto__ = ancestor; + proto = ancestor; + } + definition.native = nativePrototype; + } + } + function instantiate(definition) { + return upgradeWithDefinition(domCreateElement(definition.tag), definition); + } + var registry = {}; + function getRegisteredDefinition(name) { + if (name) { + return registry[name.toLowerCase()]; + } + } + function registerDefinition(name, definition) { + registry[name] = definition; + } + function generateConstructor(definition) { + return function() { + return instantiate(definition); + }; + } + var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + function createElementNS(namespace, tag, typeExtension) { + if (namespace === HTML_NAMESPACE) { + return createElement(tag, typeExtension); + } else { + return domCreateElementNS(namespace, tag); + } + } + function createElement(tag, typeExtension) { + if (tag) { + tag = tag.toLowerCase(); + } + if (typeExtension) { + typeExtension = typeExtension.toLowerCase(); + } + var definition = getRegisteredDefinition(typeExtension || tag); + if (definition) { + if (tag == definition.tag && typeExtension == definition.is) { + return new definition.ctor(); + } + if (!typeExtension && !definition.is) { + return new definition.ctor(); + } + } + var element; + if (typeExtension) { + element = createElement(tag); + element.setAttribute("is", typeExtension); + return element; + } + element = domCreateElement(tag); + if (tag.indexOf("-") >= 0) { + implementPrototype(element, HTMLElement); + } + return element; + } + var domCreateElement = document.createElement.bind(document); + var domCreateElementNS = document.createElementNS.bind(document); + var isInstance; + if (!Object.__proto__ && !useNative) { + isInstance = function(obj, ctor) { + var p = obj; + while (p) { + if (p === ctor.prototype) { + return true; + } + p = p.__proto__; + } + return false; + }; + } else { + isInstance = function(obj, base) { + return obj instanceof base; + }; + } + function wrapDomMethodToForceUpgrade(obj, methodName) { + var orig = obj[methodName]; + obj[methodName] = function() { + var n = orig.apply(this, arguments); + upgradeAll(n); + return n; + }; + } + wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode"); + wrapDomMethodToForceUpgrade(document, "importNode"); + if (isIE11OrOlder) { + (function() { + var importNode = document.importNode; + document.importNode = function() { + var n = importNode.apply(document, arguments); + if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) { + var f = document.createDocumentFragment(); + f.appendChild(n); + return f; + } else { + return n; + } + }; + })(); + } + document.registerElement = register; + document.createElement = createElement; + document.createElementNS = createElementNS; + scope.registry = registry; + scope.instanceof = isInstance; + scope.reservedTagList = reservedTagList; + scope.getRegisteredDefinition = getRegisteredDefinition; + document.register = document.registerElement; +}); + +(function(scope) { + var useNative = scope.useNative; + var initializeModules = scope.initializeModules; + var isIE11OrOlder = /Trident/.test(navigator.userAgent); + if (useNative) { + var nop = function() {}; + scope.watchShadow = nop; + scope.upgrade = nop; + scope.upgradeAll = nop; + scope.upgradeDocumentTree = nop; + scope.upgradeSubtree = nop; + scope.takeRecords = nop; + scope.instanceof = function(obj, base) { + return obj instanceof base; + }; + } else { + initializeModules(); + } + var upgradeDocumentTree = scope.upgradeDocumentTree; + if (!window.wrap) { + if (window.ShadowDOMPolyfill) { + window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded; + window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded; + } else { + window.wrap = window.unwrap = function(node) { + return node; + }; + } + } + function bootstrap() { + upgradeDocumentTree(window.wrap(document)); + if (window.HTMLImports) { + window.HTMLImports.__importsParsingHook = function(elt) { + upgradeDocumentTree(wrap(elt.import)); + }; + } + window.CustomElements.ready = true; + setTimeout(function() { + window.CustomElements.readyTime = Date.now(); + if (window.HTMLImports) { + window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime; + } + document.dispatchEvent(new CustomEvent("WebComponentsReady", { + bubbles: true + })); + }); + } + if (isIE11OrOlder && typeof window.CustomEvent !== "function") { + window.CustomEvent = function(inType, params) { + params = params || {}; + var e = document.createEvent("CustomEvent"); + e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); + e.preventDefault = function() { + Object.defineProperty(this, "defaultPrevented", { + get: function() { + return true; + } + }); + }; + return e; + }; + window.CustomEvent.prototype = window.Event.prototype; + } + if (document.readyState === "complete" || scope.flags.eager) { + bootstrap(); + } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) { + bootstrap(); + } else { + var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded"; + window.addEventListener(loadEvent, bootstrap); + } + scope.isIE11OrOlder = isIE11OrOlder; +})(window.CustomElements); \ No newline at end of file diff --git a/dashboard-ui/bower_components/webcomponentsjs/CustomElements.min.js b/dashboard-ui/bower_components/webcomponentsjs/CustomElements.min.js new file mode 100644 index 0000000000..c4eff21f45 --- /dev/null +++ b/dashboard-ui/bower_components/webcomponentsjs/CustomElements.min.js @@ -0,0 +1,11 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version 0.7.5 +"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){_.push(e),b||(b=!0,h(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){b=!1;var e=_;_=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r0){var r=n[o-1],i=p(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n=0)){n.push(e);for(var o,r=e.querySelectorAll("link[rel="+a+"]"),d=0,s=r.length;s>d&&(o=r[d]);d++)o["import"]&&i(o["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e){return n(e)||o(e)}function n(t){return e.upgrade(t)?!0:void d(t)}function o(e){_(e,function(e){return n(e)?!0:void 0})}function r(e){d(e),f(e)&&_(e,function(e){d(e)})}function i(e){O.push(e),N||(N=!0,setTimeout(a))}function a(){N=!1;for(var e,t=O,n=0,o=t.length;o>n&&(e=t[n]);n++)e();O=[]}function d(e){y?i(function(){s(e)}):s(e)}function s(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&f(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function u(e){c(e),_(e,function(e){c(e)})}function c(e){y?i(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!f(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function f(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function m(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var o=n.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var r=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";r=r.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,r||"")}e.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e)}),M(e.removedNodes,function(e){e.localName&&u(e)}))}),b.dom&&console.groupEnd()}function h(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(m);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function w(e){e=window.wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function g(e){E(e,w)}var b=e.flags,_=e.forSubtree,E=e.forDocumentTree,y=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=y;var N=!1,O=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),L=Element.prototype.createShadowRoot;L&&(Element.prototype.createShadowRoot=function(){var e=L.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=g,e.upgradeSubtree=o,e.upgradeAll=t,e.attachedNode=r,e.takeRecords=h}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),r=e.getRegisteredDefinition(o||t.localName);if(r){if(o&&r.tag==t.localName)return n(t,r);if(!o&&!r["extends"])return n(t,r)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(r),d=0;i=a[d];d++)o[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Object.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),window.CustomElements.addModule(function(e){function t(t,o){var s=o||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(u(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return s.prototype||(s.prototype=Object.create(HTMLElement.prototype)),s.__name=t.toLowerCase(),s.lifecycle=s.lifecycle||{},s.ancestry=i(s["extends"]),a(s),d(s),n(s.prototype),c(s.__name,s),s.ctor=l(s),s.ctor.prototype=s.prototype,s.prototype.constructor=s.ctor,e.ready&&w(document),s.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for(var t=0;t=0&&_(o,HTMLElement),o)}function m(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var h,v=e.isIE11OrOlder,w=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,_=e.implementPrototype,E=e.useNative,y=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],N={},O="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),L=document.createElementNS.bind(document);h=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},m(Node.prototype,"cloneNode"),m(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=f,e.registry=N,e["instanceof"]=h,e.reservedTagList=y,e.getRegisteredDefinition=u,document.register=document.registerElement}),function(e){function t(){a(window.wrap(document)),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),window.CustomElements.ready=!0,setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,o=e.initializeModules,r=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else o();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var d=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(d,t)}else t();e.isIE11OrOlder=r}(window.CustomElements); \ No newline at end of file diff --git a/dashboard-ui/bower_components/webcomponentsjs/HTMLImports.js b/dashboard-ui/bower_components/webcomponentsjs/HTMLImports.js new file mode 100644 index 0000000000..e9f03ecf81 --- /dev/null +++ b/dashboard-ui/bower_components/webcomponentsjs/HTMLImports.js @@ -0,0 +1,1085 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version 0.7.5 +if (typeof WeakMap === "undefined") { + (function() { + var defineProperty = Object.defineProperty; + var counter = Date.now() % 1e9; + var WeakMap = function() { + this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); + }; + WeakMap.prototype = { + set: function(key, value) { + var entry = key[this.name]; + if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { + value: [ key, value ], + writable: true + }); + return this; + }, + get: function(key) { + var entry; + return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; + }, + "delete": function(key) { + var entry = key[this.name]; + if (!entry || entry[0] !== key) return false; + entry[0] = entry[1] = undefined; + return true; + }, + has: function(key) { + var entry = key[this.name]; + if (!entry) return false; + return entry[0] === key; + } + }; + window.WeakMap = WeakMap; + })(); +} + +(function(global) { + var registrationsTable = new WeakMap(); + var setImmediate; + if (/Trident|Edge/.test(navigator.userAgent)) { + setImmediate = setTimeout; + } else if (window.setImmediate) { + setImmediate = window.setImmediate; + } else { + var setImmediateQueue = []; + var sentinel = String(Math.random()); + window.addEventListener("message", function(e) { + if (e.data === sentinel) { + var queue = setImmediateQueue; + setImmediateQueue = []; + queue.forEach(function(func) { + func(); + }); + } + }); + setImmediate = function(func) { + setImmediateQueue.push(func); + window.postMessage(sentinel, "*"); + }; + } + var isScheduled = false; + var scheduledObservers = []; + function scheduleCallback(observer) { + scheduledObservers.push(observer); + if (!isScheduled) { + isScheduled = true; + setImmediate(dispatchCallbacks); + } + } + function wrapIfNeeded(node) { + return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node; + } + function dispatchCallbacks() { + isScheduled = false; + var observers = scheduledObservers; + scheduledObservers = []; + observers.sort(function(o1, o2) { + return o1.uid_ - o2.uid_; + }); + var anyNonEmpty = false; + observers.forEach(function(observer) { + var queue = observer.takeRecords(); + removeTransientObserversFor(observer); + if (queue.length) { + observer.callback_(queue, observer); + anyNonEmpty = true; + } + }); + if (anyNonEmpty) dispatchCallbacks(); + } + function removeTransientObserversFor(observer) { + observer.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + if (!registrations) return; + registrations.forEach(function(registration) { + if (registration.observer === observer) registration.removeTransientObservers(); + }); + }); + } + function forEachAncestorAndObserverEnqueueRecord(target, callback) { + for (var node = target; node; node = node.parentNode) { + var registrations = registrationsTable.get(node); + if (registrations) { + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + var options = registration.options; + if (node !== target && !options.subtree) continue; + var record = callback(options); + if (record) registration.enqueue(record); + } + } + } + } + var uidCounter = 0; + function JsMutationObserver(callback) { + this.callback_ = callback; + this.nodes_ = []; + this.records_ = []; + this.uid_ = ++uidCounter; + } + JsMutationObserver.prototype = { + observe: function(target, options) { + target = wrapIfNeeded(target); + if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) { + throw new SyntaxError(); + } + var registrations = registrationsTable.get(target); + if (!registrations) registrationsTable.set(target, registrations = []); + var registration; + for (var i = 0; i < registrations.length; i++) { + if (registrations[i].observer === this) { + registration = registrations[i]; + registration.removeListeners(); + registration.options = options; + break; + } + } + if (!registration) { + registration = new Registration(this, target, options); + registrations.push(registration); + this.nodes_.push(target); + } + registration.addListeners(); + }, + disconnect: function() { + this.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.observer === this) { + registration.removeListeners(); + registrations.splice(i, 1); + break; + } + } + }, this); + this.records_ = []; + }, + takeRecords: function() { + var copyOfRecords = this.records_; + this.records_ = []; + return copyOfRecords; + } + }; + function MutationRecord(type, target) { + this.type = type; + this.target = target; + this.addedNodes = []; + this.removedNodes = []; + this.previousSibling = null; + this.nextSibling = null; + this.attributeName = null; + this.attributeNamespace = null; + this.oldValue = null; + } + function copyMutationRecord(original) { + var record = new MutationRecord(original.type, original.target); + record.addedNodes = original.addedNodes.slice(); + record.removedNodes = original.removedNodes.slice(); + record.previousSibling = original.previousSibling; + record.nextSibling = original.nextSibling; + record.attributeName = original.attributeName; + record.attributeNamespace = original.attributeNamespace; + record.oldValue = original.oldValue; + return record; + } + var currentRecord, recordWithOldValue; + function getRecord(type, target) { + return currentRecord = new MutationRecord(type, target); + } + function getRecordWithOldValue(oldValue) { + if (recordWithOldValue) return recordWithOldValue; + recordWithOldValue = copyMutationRecord(currentRecord); + recordWithOldValue.oldValue = oldValue; + return recordWithOldValue; + } + function clearRecords() { + currentRecord = recordWithOldValue = undefined; + } + function recordRepresentsCurrentMutation(record) { + return record === recordWithOldValue || record === currentRecord; + } + function selectRecord(lastRecord, newRecord) { + if (lastRecord === newRecord) return lastRecord; + if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue; + return null; + } + function Registration(observer, target, options) { + this.observer = observer; + this.target = target; + this.options = options; + this.transientObservedNodes = []; + } + Registration.prototype = { + enqueue: function(record) { + var records = this.observer.records_; + var length = records.length; + if (records.length > 0) { + var lastRecord = records[length - 1]; + var recordToReplaceLast = selectRecord(lastRecord, record); + if (recordToReplaceLast) { + records[length - 1] = recordToReplaceLast; + return; + } + } else { + scheduleCallback(this.observer); + } + records[length] = record; + }, + addListeners: function() { + this.addListeners_(this.target); + }, + addListeners_: function(node) { + var options = this.options; + if (options.attributes) node.addEventListener("DOMAttrModified", this, true); + if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.addEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true); + }, + removeListeners: function() { + this.removeListeners_(this.target); + }, + removeListeners_: function(node) { + var options = this.options; + if (options.attributes) node.removeEventListener("DOMAttrModified", this, true); + if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.removeEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true); + }, + addTransientObserver: function(node) { + if (node === this.target) return; + this.addListeners_(node); + this.transientObservedNodes.push(node); + var registrations = registrationsTable.get(node); + if (!registrations) registrationsTable.set(node, registrations = []); + registrations.push(this); + }, + removeTransientObservers: function() { + var transientObservedNodes = this.transientObservedNodes; + this.transientObservedNodes = []; + transientObservedNodes.forEach(function(node) { + this.removeListeners_(node); + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + if (registrations[i] === this) { + registrations.splice(i, 1); + break; + } + } + }, this); + }, + handleEvent: function(e) { + e.stopImmediatePropagation(); + switch (e.type) { + case "DOMAttrModified": + var name = e.attrName; + var namespace = e.relatedNode.namespaceURI; + var target = e.target; + var record = new getRecord("attributes", target); + record.attributeName = name; + record.attributeNamespace = namespace; + var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.attributes) return; + if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) { + return; + } + if (options.attributeOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMCharacterDataModified": + var target = e.target; + var record = getRecord("characterData", target); + var oldValue = e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.characterData) return; + if (options.characterDataOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMNodeRemoved": + this.addTransientObserver(e.target); + + case "DOMNodeInserted": + var changedNode = e.target; + var addedNodes, removedNodes; + if (e.type === "DOMNodeInserted") { + addedNodes = [ changedNode ]; + removedNodes = []; + } else { + addedNodes = []; + removedNodes = [ changedNode ]; + } + var previousSibling = changedNode.previousSibling; + var nextSibling = changedNode.nextSibling; + var record = getRecord("childList", e.target.parentNode); + record.addedNodes = addedNodes; + record.removedNodes = removedNodes; + record.previousSibling = previousSibling; + record.nextSibling = nextSibling; + forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) { + if (!options.childList) return; + return record; + }); + } + clearRecords(); + } + }; + global.JsMutationObserver = JsMutationObserver; + if (!global.MutationObserver) global.MutationObserver = JsMutationObserver; +})(this); + +window.HTMLImports = window.HTMLImports || { + flags: {} +}; + +(function(scope) { + var IMPORT_LINK_TYPE = "import"; + var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link")); + var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill); + var wrap = function(node) { + return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node; + }; + var rootDocument = wrap(document); + var currentScriptDescriptor = { + get: function() { + var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null); + return wrap(script); + }, + configurable: true + }; + Object.defineProperty(document, "_currentScript", currentScriptDescriptor); + Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor); + var isIE = /Trident/.test(navigator.userAgent); + function whenReady(callback, doc) { + doc = doc || rootDocument; + whenDocumentReady(function() { + watchImportsLoad(callback, doc); + }, doc); + } + var requiredReadyState = isIE ? "complete" : "interactive"; + var READY_EVENT = "readystatechange"; + function isDocumentReady(doc) { + return doc.readyState === "complete" || doc.readyState === requiredReadyState; + } + function whenDocumentReady(callback, doc) { + if (!isDocumentReady(doc)) { + var checkReady = function() { + if (doc.readyState === "complete" || doc.readyState === requiredReadyState) { + doc.removeEventListener(READY_EVENT, checkReady); + whenDocumentReady(callback, doc); + } + }; + doc.addEventListener(READY_EVENT, checkReady); + } else if (callback) { + callback(); + } + } + function markTargetLoaded(event) { + event.target.__loaded = true; + } + function watchImportsLoad(callback, doc) { + var imports = doc.querySelectorAll("link[rel=import]"); + var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = []; + function checkDone() { + if (parsedCount == importCount && callback) { + callback({ + allImports: imports, + loadedImports: newImports, + errorImports: errorImports + }); + } + } + function loadedImport(e) { + markTargetLoaded(e); + newImports.push(this); + parsedCount++; + checkDone(); + } + function errorLoadingImport(e) { + errorImports.push(this); + parsedCount++; + checkDone(); + } + if (importCount) { + for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) { + if (isImportLoaded(imp)) { + parsedCount++; + checkDone(); + } else { + imp.addEventListener("load", loadedImport); + imp.addEventListener("error", errorLoadingImport); + } + } + } else { + checkDone(); + } + } + function isImportLoaded(link) { + return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed; + } + if (useNative) { + new MutationObserver(function(mxns) { + for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) { + if (m.addedNodes) { + handleImports(m.addedNodes); + } + } + }).observe(document.head, { + childList: true + }); + function handleImports(nodes) { + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + if (isImport(n)) { + handleImport(n); + } + } + } + function isImport(element) { + return element.localName === "link" && element.rel === "import"; + } + function handleImport(element) { + var loaded = element.import; + if (loaded) { + markTargetLoaded({ + target: element + }); + } else { + element.addEventListener("load", markTargetLoaded); + element.addEventListener("error", markTargetLoaded); + } + } + (function() { + if (document.readyState === "loading") { + var imports = document.querySelectorAll("link[rel=import]"); + for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) { + handleImport(imp); + } + } + })(); + } + whenReady(function(detail) { + window.HTMLImports.ready = true; + window.HTMLImports.readyTime = new Date().getTime(); + var evt = rootDocument.createEvent("CustomEvent"); + evt.initCustomEvent("HTMLImportsLoaded", true, true, detail); + rootDocument.dispatchEvent(evt); + }); + scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE; + scope.useNative = useNative; + scope.rootDocument = rootDocument; + scope.whenReady = whenReady; + scope.isIE = isIE; +})(window.HTMLImports); + +(function(scope) { + var modules = []; + var addModule = function(module) { + modules.push(module); + }; + var initializeModules = function() { + modules.forEach(function(module) { + module(scope); + }); + }; + scope.addModule = addModule; + scope.initializeModules = initializeModules; +})(window.HTMLImports); + +window.HTMLImports.addModule(function(scope) { + var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g; + var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g; + var path = { + resolveUrlsInStyle: function(style, linkUrl) { + var doc = style.ownerDocument; + var resolver = doc.createElement("a"); + style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver); + return style; + }, + resolveUrlsInCssText: function(cssText, linkUrl, urlObj) { + var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP); + r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP); + return r; + }, + replaceUrls: function(text, urlObj, linkUrl, regexp) { + return text.replace(regexp, function(m, pre, url, post) { + var urlPath = url.replace(/["']/g, ""); + if (linkUrl) { + urlPath = new URL(urlPath, linkUrl).href; + } + urlObj.href = urlPath; + urlPath = urlObj.href; + return pre + "'" + urlPath + "'" + post; + }); + } + }; + scope.path = path; +}); + +window.HTMLImports.addModule(function(scope) { + var xhr = { + async: true, + ok: function(request) { + return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0; + }, + load: function(url, next, nextContext) { + var request = new XMLHttpRequest(); + if (scope.flags.debug || scope.flags.bust) { + url += "?" + Math.random(); + } + request.open("GET", url, xhr.async); + request.addEventListener("readystatechange", function(e) { + if (request.readyState === 4) { + var locationHeader = request.getResponseHeader("Location"); + var redirectedUrl = null; + if (locationHeader) { + var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader; + } + next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl); + } + }); + request.send(); + return request; + }, + loadDocument: function(url, next, nextContext) { + this.load(url, next, nextContext).responseType = "document"; + } + }; + scope.xhr = xhr; +}); + +window.HTMLImports.addModule(function(scope) { + var xhr = scope.xhr; + var flags = scope.flags; + var Loader = function(onLoad, onComplete) { + this.cache = {}; + this.onload = onLoad; + this.oncomplete = onComplete; + this.inflight = 0; + this.pending = {}; + }; + Loader.prototype = { + addNodes: function(nodes) { + this.inflight += nodes.length; + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + this.require(n); + } + this.checkDone(); + }, + addNode: function(node) { + this.inflight++; + this.require(node); + this.checkDone(); + }, + require: function(elt) { + var url = elt.src || elt.href; + elt.__nodeUrl = url; + if (!this.dedupe(url, elt)) { + this.fetch(url, elt); + } + }, + dedupe: function(url, elt) { + if (this.pending[url]) { + this.pending[url].push(elt); + return true; + } + var resource; + if (this.cache[url]) { + this.onload(url, elt, this.cache[url]); + this.tail(); + return true; + } + this.pending[url] = [ elt ]; + return false; + }, + fetch: function(url, elt) { + flags.load && console.log("fetch", url, elt); + if (!url) { + setTimeout(function() { + this.receive(url, elt, { + error: "href must be specified" + }, null); + }.bind(this), 0); + } else if (url.match(/^data:/)) { + var pieces = url.split(","); + var header = pieces[0]; + var body = pieces[1]; + if (header.indexOf(";base64") > -1) { + body = atob(body); + } else { + body = decodeURIComponent(body); + } + setTimeout(function() { + this.receive(url, elt, null, body); + }.bind(this), 0); + } else { + var receiveXhr = function(err, resource, redirectedUrl) { + this.receive(url, elt, err, resource, redirectedUrl); + }.bind(this); + xhr.load(url, receiveXhr); + } + }, + receive: function(url, elt, err, resource, redirectedUrl) { + this.cache[url] = resource; + var $p = this.pending[url]; + for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { + this.onload(url, p, resource, err, redirectedUrl); + this.tail(); + } + this.pending[url] = null; + }, + tail: function() { + --this.inflight; + this.checkDone(); + }, + checkDone: function() { + if (!this.inflight) { + this.oncomplete(); + } + } + }; + scope.Loader = Loader; +}); + +window.HTMLImports.addModule(function(scope) { + var Observer = function(addCallback) { + this.addCallback = addCallback; + this.mo = new MutationObserver(this.handler.bind(this)); + }; + Observer.prototype = { + handler: function(mutations) { + for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) { + if (m.type === "childList" && m.addedNodes.length) { + this.addedNodes(m.addedNodes); + } + } + }, + addedNodes: function(nodes) { + if (this.addCallback) { + this.addCallback(nodes); + } + for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) { + if (n.children && n.children.length) { + this.addedNodes(n.children); + } + } + }, + observe: function(root) { + this.mo.observe(root, { + childList: true, + subtree: true + }); + } + }; + scope.Observer = Observer; +}); + +window.HTMLImports.addModule(function(scope) { + var path = scope.path; + var rootDocument = scope.rootDocument; + var flags = scope.flags; + var isIE = scope.isIE; + var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; + var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]"; + var importParser = { + documentSelectors: IMPORT_SELECTOR, + importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","), + map: { + link: "parseLink", + script: "parseScript", + style: "parseStyle" + }, + dynamicElements: [], + parseNext: function() { + var next = this.nextToParse(); + if (next) { + this.parse(next); + } + }, + parse: function(elt) { + if (this.isParsed(elt)) { + flags.parse && console.log("[%s] is already parsed", elt.localName); + return; + } + var fn = this[this.map[elt.localName]]; + if (fn) { + this.markParsing(elt); + fn.call(this, elt); + } + }, + parseDynamic: function(elt, quiet) { + this.dynamicElements.push(elt); + if (!quiet) { + this.parseNext(); + } + }, + markParsing: function(elt) { + flags.parse && console.log("parsing", elt); + this.parsingElement = elt; + }, + markParsingComplete: function(elt) { + elt.__importParsed = true; + this.markDynamicParsingComplete(elt); + if (elt.__importElement) { + elt.__importElement.__importParsed = true; + this.markDynamicParsingComplete(elt.__importElement); + } + this.parsingElement = null; + flags.parse && console.log("completed", elt); + }, + markDynamicParsingComplete: function(elt) { + var i = this.dynamicElements.indexOf(elt); + if (i >= 0) { + this.dynamicElements.splice(i, 1); + } + }, + parseImport: function(elt) { + if (window.HTMLImports.__importsParsingHook) { + window.HTMLImports.__importsParsingHook(elt); + } + if (elt.import) { + elt.import.__importParsed = true; + } + this.markParsingComplete(elt); + if (elt.__resource && !elt.__error) { + elt.dispatchEvent(new CustomEvent("load", { + bubbles: false + })); + } else { + elt.dispatchEvent(new CustomEvent("error", { + bubbles: false + })); + } + if (elt.__pending) { + var fn; + while (elt.__pending.length) { + fn = elt.__pending.shift(); + if (fn) { + fn({ + target: elt + }); + } + } + } + this.parseNext(); + }, + parseLink: function(linkElt) { + if (nodeIsImport(linkElt)) { + this.parseImport(linkElt); + } else { + linkElt.href = linkElt.href; + this.parseGeneric(linkElt); + } + }, + parseStyle: function(elt) { + var src = elt; + elt = cloneStyle(elt); + src.__appliedElement = elt; + elt.__importElement = src; + this.parseGeneric(elt); + }, + parseGeneric: function(elt) { + this.trackElement(elt); + this.addElementToDocument(elt); + }, + rootImportForElement: function(elt) { + var n = elt; + while (n.ownerDocument.__importLink) { + n = n.ownerDocument.__importLink; + } + return n; + }, + addElementToDocument: function(elt) { + var port = this.rootImportForElement(elt.__importElement || elt); + port.parentNode.insertBefore(elt, port); + }, + trackElement: function(elt, callback) { + var self = this; + var done = function(e) { + if (callback) { + callback(e); + } + self.markParsingComplete(elt); + self.parseNext(); + }; + elt.addEventListener("load", done); + elt.addEventListener("error", done); + if (isIE && elt.localName === "style") { + var fakeLoad = false; + if (elt.textContent.indexOf("@import") == -1) { + fakeLoad = true; + } else if (elt.sheet) { + fakeLoad = true; + var csr = elt.sheet.cssRules; + var len = csr ? csr.length : 0; + for (var i = 0, r; i < len && (r = csr[i]); i++) { + if (r.type === CSSRule.IMPORT_RULE) { + fakeLoad = fakeLoad && Boolean(r.styleSheet); + } + } + } + if (fakeLoad) { + setTimeout(function() { + elt.dispatchEvent(new CustomEvent("load", { + bubbles: false + })); + }); + } + } + }, + parseScript: function(scriptElt) { + var script = document.createElement("script"); + script.__importElement = scriptElt; + script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt); + scope.currentScript = scriptElt; + this.trackElement(script, function(e) { + script.parentNode.removeChild(script); + scope.currentScript = null; + }); + this.addElementToDocument(script); + }, + nextToParse: function() { + this._mayParse = []; + return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic()); + }, + nextToParseInDoc: function(doc, link) { + if (doc && this._mayParse.indexOf(doc) < 0) { + this._mayParse.push(doc); + var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc)); + for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) { + if (!this.isParsed(n)) { + if (this.hasResource(n)) { + return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n; + } else { + return; + } + } + } + } + return link; + }, + nextToParseDynamic: function() { + return this.dynamicElements[0]; + }, + parseSelectorsForNode: function(node) { + var doc = node.ownerDocument || node; + return doc === rootDocument ? this.documentSelectors : this.importsSelectors; + }, + isParsed: function(node) { + return node.__importParsed; + }, + needsDynamicParsing: function(elt) { + return this.dynamicElements.indexOf(elt) >= 0; + }, + hasResource: function(node) { + if (nodeIsImport(node) && node.import === undefined) { + return false; + } + return true; + } + }; + function nodeIsImport(elt) { + return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE; + } + function generateScriptDataUrl(script) { + var scriptContent = generateScriptContent(script); + return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent); + } + function generateScriptContent(script) { + return script.textContent + generateSourceMapHint(script); + } + function generateSourceMapHint(script) { + var owner = script.ownerDocument; + owner.__importedScripts = owner.__importedScripts || 0; + var moniker = script.ownerDocument.baseURI; + var num = owner.__importedScripts ? "-" + owner.__importedScripts : ""; + owner.__importedScripts++; + return "\n//# sourceURL=" + moniker + num + ".js\n"; + } + function cloneStyle(style) { + var clone = style.ownerDocument.createElement("style"); + clone.textContent = style.textContent; + path.resolveUrlsInStyle(clone); + return clone; + } + scope.parser = importParser; + scope.IMPORT_SELECTOR = IMPORT_SELECTOR; +}); + +window.HTMLImports.addModule(function(scope) { + var flags = scope.flags; + var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; + var IMPORT_SELECTOR = scope.IMPORT_SELECTOR; + var rootDocument = scope.rootDocument; + var Loader = scope.Loader; + var Observer = scope.Observer; + var parser = scope.parser; + var importer = { + documents: {}, + documentPreloadSelectors: IMPORT_SELECTOR, + importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","), + loadNode: function(node) { + importLoader.addNode(node); + }, + loadSubtree: function(parent) { + var nodes = this.marshalNodes(parent); + importLoader.addNodes(nodes); + }, + marshalNodes: function(parent) { + return parent.querySelectorAll(this.loadSelectorsForNode(parent)); + }, + loadSelectorsForNode: function(node) { + var doc = node.ownerDocument || node; + return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors; + }, + loaded: function(url, elt, resource, err, redirectedUrl) { + flags.load && console.log("loaded", url, elt); + elt.__resource = resource; + elt.__error = err; + if (isImportLink(elt)) { + var doc = this.documents[url]; + if (doc === undefined) { + doc = err ? null : makeDocument(resource, redirectedUrl || url); + if (doc) { + doc.__importLink = elt; + this.bootDocument(doc); + } + this.documents[url] = doc; + } + elt.import = doc; + } + parser.parseNext(); + }, + bootDocument: function(doc) { + this.loadSubtree(doc); + this.observer.observe(doc); + parser.parseNext(); + }, + loadedAll: function() { + parser.parseNext(); + } + }; + var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer)); + importer.observer = new Observer(); + function isImportLink(elt) { + return isLinkRel(elt, IMPORT_LINK_TYPE); + } + function isLinkRel(elt, rel) { + return elt.localName === "link" && elt.getAttribute("rel") === rel; + } + function hasBaseURIAccessor(doc) { + return !!Object.getOwnPropertyDescriptor(doc, "baseURI"); + } + function makeDocument(resource, url) { + var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE); + doc._URL = url; + var base = doc.createElement("base"); + base.setAttribute("href", url); + if (!doc.baseURI && !hasBaseURIAccessor(doc)) { + Object.defineProperty(doc, "baseURI", { + value: url + }); + } + var meta = doc.createElement("meta"); + meta.setAttribute("charset", "utf-8"); + doc.head.appendChild(meta); + doc.head.appendChild(base); + doc.body.innerHTML = resource; + if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) { + HTMLTemplateElement.bootstrap(doc); + } + return doc; + } + if (!document.baseURI) { + var baseURIDescriptor = { + get: function() { + var base = document.querySelector("base"); + return base ? base.href : window.location.href; + }, + configurable: true + }; + Object.defineProperty(document, "baseURI", baseURIDescriptor); + Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor); + } + scope.importer = importer; + scope.importLoader = importLoader; +}); + +window.HTMLImports.addModule(function(scope) { + var parser = scope.parser; + var importer = scope.importer; + var dynamic = { + added: function(nodes) { + var owner, parsed, loading; + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + if (!owner) { + owner = n.ownerDocument; + parsed = parser.isParsed(owner); + } + loading = this.shouldLoadNode(n); + if (loading) { + importer.loadNode(n); + } + if (this.shouldParseNode(n) && parsed) { + parser.parseDynamic(n, loading); + } + } + }, + shouldLoadNode: function(node) { + return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node)); + }, + shouldParseNode: function(node) { + return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node)); + } + }; + importer.observer.addCallback = dynamic.added.bind(dynamic); + var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector; +}); + +(function(scope) { + var initializeModules = scope.initializeModules; + var isIE = scope.isIE; + if (scope.useNative) { + return; + } + if (isIE && typeof window.CustomEvent !== "function") { + window.CustomEvent = function(inType, params) { + params = params || {}; + var e = document.createEvent("CustomEvent"); + e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); + e.preventDefault = function() { + Object.defineProperty(this, "defaultPrevented", { + get: function() { + return true; + } + }); + }; + return e; + }; + window.CustomEvent.prototype = window.Event.prototype; + } + initializeModules(); + var rootDocument = scope.rootDocument; + function bootstrap() { + window.HTMLImports.importer.bootDocument(rootDocument); + } + if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) { + bootstrap(); + } else { + document.addEventListener("DOMContentLoaded", bootstrap); + } +})(window.HTMLImports); \ No newline at end of file diff --git a/dashboard-ui/bower_components/webcomponentsjs/HTMLImports.min.js b/dashboard-ui/bower_components/webcomponentsjs/HTMLImports.min.js new file mode 100644 index 0000000000..c13580a7fe --- /dev/null +++ b/dashboard-ui/bower_components/webcomponentsjs/HTMLImports.min.js @@ -0,0 +1,11 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version 0.7.5 +"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){_.push(e),w||(w=!0,f(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){w=!1;var e=_;_=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o0){var o=n[r-1],i=m(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;nm&&(h=s[m]);m++)a(h)?(d++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)d(t)&&c(t)}function d(e){return"link"===e.localName&&"import"===e.rel}function c(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),m=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},p=m(document),f={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return m(e)},configurable:!0};Object.defineProperty(document,"_currentScript",f),Object.defineProperty(p,"_currentScript",f);var v=/Trident/.test(navigator.userAgent),b=v?"complete":"interactive",g="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)c(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,d=a.length;d>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,d=e.flags,c=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]","style","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(d.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){d.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,d.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),c&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;s>d&&(i=a[d]);d++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,d=e.rootDocument,c=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){m.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);m.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===d?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var d=this.documents[e];void 0===d&&(d=a?null:o(r,s||e),d&&(d.__importLink=n,this.bootDocument(d)),this.documents[e]=d),n["import"]=d}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},m=new c(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(d,"baseURI",p)}e.importer=h,e.importLoader=m}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,d=e.length;d>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports); \ No newline at end of file diff --git a/dashboard-ui/bower_components/webcomponentsjs/MutationObserver.js b/dashboard-ui/bower_components/webcomponentsjs/MutationObserver.js new file mode 100644 index 0000000000..b8fb3cf47a --- /dev/null +++ b/dashboard-ui/bower_components/webcomponentsjs/MutationObserver.js @@ -0,0 +1,344 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version 0.7.5 +if (typeof WeakMap === "undefined") { + (function() { + var defineProperty = Object.defineProperty; + var counter = Date.now() % 1e9; + var WeakMap = function() { + this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); + }; + WeakMap.prototype = { + set: function(key, value) { + var entry = key[this.name]; + if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { + value: [ key, value ], + writable: true + }); + return this; + }, + get: function(key) { + var entry; + return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; + }, + "delete": function(key) { + var entry = key[this.name]; + if (!entry || entry[0] !== key) return false; + entry[0] = entry[1] = undefined; + return true; + }, + has: function(key) { + var entry = key[this.name]; + if (!entry) return false; + return entry[0] === key; + } + }; + window.WeakMap = WeakMap; + })(); +} + +(function(global) { + var registrationsTable = new WeakMap(); + var setImmediate; + if (/Trident|Edge/.test(navigator.userAgent)) { + setImmediate = setTimeout; + } else if (window.setImmediate) { + setImmediate = window.setImmediate; + } else { + var setImmediateQueue = []; + var sentinel = String(Math.random()); + window.addEventListener("message", function(e) { + if (e.data === sentinel) { + var queue = setImmediateQueue; + setImmediateQueue = []; + queue.forEach(function(func) { + func(); + }); + } + }); + setImmediate = function(func) { + setImmediateQueue.push(func); + window.postMessage(sentinel, "*"); + }; + } + var isScheduled = false; + var scheduledObservers = []; + function scheduleCallback(observer) { + scheduledObservers.push(observer); + if (!isScheduled) { + isScheduled = true; + setImmediate(dispatchCallbacks); + } + } + function wrapIfNeeded(node) { + return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node; + } + function dispatchCallbacks() { + isScheduled = false; + var observers = scheduledObservers; + scheduledObservers = []; + observers.sort(function(o1, o2) { + return o1.uid_ - o2.uid_; + }); + var anyNonEmpty = false; + observers.forEach(function(observer) { + var queue = observer.takeRecords(); + removeTransientObserversFor(observer); + if (queue.length) { + observer.callback_(queue, observer); + anyNonEmpty = true; + } + }); + if (anyNonEmpty) dispatchCallbacks(); + } + function removeTransientObserversFor(observer) { + observer.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + if (!registrations) return; + registrations.forEach(function(registration) { + if (registration.observer === observer) registration.removeTransientObservers(); + }); + }); + } + function forEachAncestorAndObserverEnqueueRecord(target, callback) { + for (var node = target; node; node = node.parentNode) { + var registrations = registrationsTable.get(node); + if (registrations) { + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + var options = registration.options; + if (node !== target && !options.subtree) continue; + var record = callback(options); + if (record) registration.enqueue(record); + } + } + } + } + var uidCounter = 0; + function JsMutationObserver(callback) { + this.callback_ = callback; + this.nodes_ = []; + this.records_ = []; + this.uid_ = ++uidCounter; + } + JsMutationObserver.prototype = { + observe: function(target, options) { + target = wrapIfNeeded(target); + if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) { + throw new SyntaxError(); + } + var registrations = registrationsTable.get(target); + if (!registrations) registrationsTable.set(target, registrations = []); + var registration; + for (var i = 0; i < registrations.length; i++) { + if (registrations[i].observer === this) { + registration = registrations[i]; + registration.removeListeners(); + registration.options = options; + break; + } + } + if (!registration) { + registration = new Registration(this, target, options); + registrations.push(registration); + this.nodes_.push(target); + } + registration.addListeners(); + }, + disconnect: function() { + this.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.observer === this) { + registration.removeListeners(); + registrations.splice(i, 1); + break; + } + } + }, this); + this.records_ = []; + }, + takeRecords: function() { + var copyOfRecords = this.records_; + this.records_ = []; + return copyOfRecords; + } + }; + function MutationRecord(type, target) { + this.type = type; + this.target = target; + this.addedNodes = []; + this.removedNodes = []; + this.previousSibling = null; + this.nextSibling = null; + this.attributeName = null; + this.attributeNamespace = null; + this.oldValue = null; + } + function copyMutationRecord(original) { + var record = new MutationRecord(original.type, original.target); + record.addedNodes = original.addedNodes.slice(); + record.removedNodes = original.removedNodes.slice(); + record.previousSibling = original.previousSibling; + record.nextSibling = original.nextSibling; + record.attributeName = original.attributeName; + record.attributeNamespace = original.attributeNamespace; + record.oldValue = original.oldValue; + return record; + } + var currentRecord, recordWithOldValue; + function getRecord(type, target) { + return currentRecord = new MutationRecord(type, target); + } + function getRecordWithOldValue(oldValue) { + if (recordWithOldValue) return recordWithOldValue; + recordWithOldValue = copyMutationRecord(currentRecord); + recordWithOldValue.oldValue = oldValue; + return recordWithOldValue; + } + function clearRecords() { + currentRecord = recordWithOldValue = undefined; + } + function recordRepresentsCurrentMutation(record) { + return record === recordWithOldValue || record === currentRecord; + } + function selectRecord(lastRecord, newRecord) { + if (lastRecord === newRecord) return lastRecord; + if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue; + return null; + } + function Registration(observer, target, options) { + this.observer = observer; + this.target = target; + this.options = options; + this.transientObservedNodes = []; + } + Registration.prototype = { + enqueue: function(record) { + var records = this.observer.records_; + var length = records.length; + if (records.length > 0) { + var lastRecord = records[length - 1]; + var recordToReplaceLast = selectRecord(lastRecord, record); + if (recordToReplaceLast) { + records[length - 1] = recordToReplaceLast; + return; + } + } else { + scheduleCallback(this.observer); + } + records[length] = record; + }, + addListeners: function() { + this.addListeners_(this.target); + }, + addListeners_: function(node) { + var options = this.options; + if (options.attributes) node.addEventListener("DOMAttrModified", this, true); + if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.addEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true); + }, + removeListeners: function() { + this.removeListeners_(this.target); + }, + removeListeners_: function(node) { + var options = this.options; + if (options.attributes) node.removeEventListener("DOMAttrModified", this, true); + if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.removeEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true); + }, + addTransientObserver: function(node) { + if (node === this.target) return; + this.addListeners_(node); + this.transientObservedNodes.push(node); + var registrations = registrationsTable.get(node); + if (!registrations) registrationsTable.set(node, registrations = []); + registrations.push(this); + }, + removeTransientObservers: function() { + var transientObservedNodes = this.transientObservedNodes; + this.transientObservedNodes = []; + transientObservedNodes.forEach(function(node) { + this.removeListeners_(node); + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + if (registrations[i] === this) { + registrations.splice(i, 1); + break; + } + } + }, this); + }, + handleEvent: function(e) { + e.stopImmediatePropagation(); + switch (e.type) { + case "DOMAttrModified": + var name = e.attrName; + var namespace = e.relatedNode.namespaceURI; + var target = e.target; + var record = new getRecord("attributes", target); + record.attributeName = name; + record.attributeNamespace = namespace; + var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.attributes) return; + if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) { + return; + } + if (options.attributeOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMCharacterDataModified": + var target = e.target; + var record = getRecord("characterData", target); + var oldValue = e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.characterData) return; + if (options.characterDataOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMNodeRemoved": + this.addTransientObserver(e.target); + + case "DOMNodeInserted": + var changedNode = e.target; + var addedNodes, removedNodes; + if (e.type === "DOMNodeInserted") { + addedNodes = [ changedNode ]; + removedNodes = []; + } else { + addedNodes = []; + removedNodes = [ changedNode ]; + } + var previousSibling = changedNode.previousSibling; + var nextSibling = changedNode.nextSibling; + var record = getRecord("childList", e.target.parentNode); + record.addedNodes = addedNodes; + record.removedNodes = removedNodes; + record.previousSibling = previousSibling; + record.nextSibling = nextSibling; + forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) { + if (!options.childList) return; + return record; + }); + } + clearRecords(); + } + }; + global.JsMutationObserver = JsMutationObserver; + if (!global.MutationObserver) global.MutationObserver = JsMutationObserver; +})(this); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/webcomponentsjs/MutationObserver.min.js b/dashboard-ui/bower_components/webcomponentsjs/MutationObserver.min.js similarity index 99% rename from dashboard-ui/thirdparty/webcomponentsjs/MutationObserver.min.js rename to dashboard-ui/bower_components/webcomponentsjs/MutationObserver.min.js index b5751a0d80..45b4cbf880 100644 --- a/dashboard-ui/thirdparty/webcomponentsjs/MutationObserver.min.js +++ b/dashboard-ui/bower_components/webcomponentsjs/MutationObserver.min.js @@ -7,5 +7,5 @@ * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -// @version 0.7.3 +// @version 0.7.5 "undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var i=t[this.name];return i&&i[0]===t?i[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){O.push(e),N||(N=!0,b(i))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function i(){N=!1;var e=O;O=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();n(e),r.length&&(e.callback_(r,e),t=!0)}),t&&i()}function n(e){e.nodes_.forEach(function(t){var r=p.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function a(e,t){for(var r=e;r;r=r.parentNode){var i=p.get(r);if(i)for(var n=0;n0){var n=r[i-1],a=l(n,e);if(a)return void(r[i-1]=a)}else t(this.observer);r[i]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=p.get(e);t||p.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=p.get(e),r=0;r>> 0) + (counter++ + "__"); + }; + WeakMap.prototype = { + set: function(key, value) { + var entry = key[this.name]; + if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { + value: [ key, value ], + writable: true + }); + return this; + }, + get: function(key) { + var entry; + return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; + }, + "delete": function(key) { + var entry = key[this.name]; + if (!entry || entry[0] !== key) return false; + entry[0] = entry[1] = undefined; + return true; + }, + has: function(key) { + var entry = key[this.name]; + if (!entry) return false; + return entry[0] === key; + } + }; + window.WeakMap = WeakMap; + })(); +} + +window.ShadowDOMPolyfill = {}; + +(function(scope) { + "use strict"; + var constructorTable = new WeakMap(); + var nativePrototypeTable = new WeakMap(); + var wrappers = Object.create(null); + function detectEval() { + if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) { + return false; + } + if (navigator.getDeviceStorage) { + return false; + } + try { + var f = new Function("return true;"); + return f(); + } catch (ex) { + return false; + } + } + var hasEval = detectEval(); + function assert(b) { + if (!b) throw new Error("Assertion failed"); + } + var defineProperty = Object.defineProperty; + var getOwnPropertyNames = Object.getOwnPropertyNames; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + function mixin(to, from) { + var names = getOwnPropertyNames(from); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + defineProperty(to, name, getOwnPropertyDescriptor(from, name)); + } + return to; + } + function mixinStatics(to, from) { + var names = getOwnPropertyNames(from); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + switch (name) { + case "arguments": + case "caller": + case "length": + case "name": + case "prototype": + case "toString": + continue; + } + defineProperty(to, name, getOwnPropertyDescriptor(from, name)); + } + return to; + } + function oneOf(object, propertyNames) { + for (var i = 0; i < propertyNames.length; i++) { + if (propertyNames[i] in object) return propertyNames[i]; + } + } + var nonEnumerableDataDescriptor = { + value: undefined, + configurable: true, + enumerable: false, + writable: true + }; + function defineNonEnumerableDataProperty(object, name, value) { + nonEnumerableDataDescriptor.value = value; + defineProperty(object, name, nonEnumerableDataDescriptor); + } + getOwnPropertyNames(window); + function getWrapperConstructor(node, opt_instance) { + var nativePrototype = node.__proto__ || Object.getPrototypeOf(node); + if (isFirefox) { + try { + getOwnPropertyNames(nativePrototype); + } catch (error) { + nativePrototype = nativePrototype.__proto__; + } + } + var wrapperConstructor = constructorTable.get(nativePrototype); + if (wrapperConstructor) return wrapperConstructor; + var parentWrapperConstructor = getWrapperConstructor(nativePrototype); + var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor); + registerInternal(nativePrototype, GeneratedWrapper, opt_instance); + return GeneratedWrapper; + } + function addForwardingProperties(nativePrototype, wrapperPrototype) { + installProperty(nativePrototype, wrapperPrototype, true); + } + function registerInstanceProperties(wrapperPrototype, instanceObject) { + installProperty(instanceObject, wrapperPrototype, false); + } + var isFirefox = /Firefox/.test(navigator.userAgent); + var dummyDescriptor = { + get: function() {}, + set: function(v) {}, + configurable: true, + enumerable: true + }; + function isEventHandlerName(name) { + return /^on[a-z]+$/.test(name); + } + function isIdentifierName(name) { + return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name); + } + function getGetter(name) { + return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() { + return this.__impl4cf1e782hg__[name]; + }; + } + function getSetter(name) { + return hasEval && isIdentifierName(name) ? new Function("v", "this.__impl4cf1e782hg__." + name + " = v") : function(v) { + this.__impl4cf1e782hg__[name] = v; + }; + } + function getMethod(name) { + return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name + ".apply(this.__impl4cf1e782hg__, arguments)") : function() { + return this.__impl4cf1e782hg__[name].apply(this.__impl4cf1e782hg__, arguments); + }; + } + function getDescriptor(source, name) { + try { + return Object.getOwnPropertyDescriptor(source, name); + } catch (ex) { + return dummyDescriptor; + } + } + var isBrokenSafari = function() { + var descr = Object.getOwnPropertyDescriptor(Node.prototype, "nodeType"); + return descr && !descr.get && !descr.set; + }(); + function installProperty(source, target, allowMethod, opt_blacklist) { + var names = getOwnPropertyNames(source); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + if (name === "polymerBlackList_") continue; + if (name in target) continue; + if (source.polymerBlackList_ && source.polymerBlackList_[name]) continue; + if (isFirefox) { + source.__lookupGetter__(name); + } + var descriptor = getDescriptor(source, name); + var getter, setter; + if (typeof descriptor.value === "function") { + if (allowMethod) { + target[name] = getMethod(name); + } + continue; + } + var isEvent = isEventHandlerName(name); + if (isEvent) getter = scope.getEventHandlerGetter(name); else getter = getGetter(name); + if (descriptor.writable || descriptor.set || isBrokenSafari) { + if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name); + } + var configurable = isBrokenSafari || descriptor.configurable; + defineProperty(target, name, { + get: getter, + set: setter, + configurable: configurable, + enumerable: descriptor.enumerable + }); + } + } + function register(nativeConstructor, wrapperConstructor, opt_instance) { + if (nativeConstructor == null) { + return; + } + var nativePrototype = nativeConstructor.prototype; + registerInternal(nativePrototype, wrapperConstructor, opt_instance); + mixinStatics(wrapperConstructor, nativeConstructor); + } + function registerInternal(nativePrototype, wrapperConstructor, opt_instance) { + var wrapperPrototype = wrapperConstructor.prototype; + assert(constructorTable.get(nativePrototype) === undefined); + constructorTable.set(nativePrototype, wrapperConstructor); + nativePrototypeTable.set(wrapperPrototype, nativePrototype); + addForwardingProperties(nativePrototype, wrapperPrototype); + if (opt_instance) registerInstanceProperties(wrapperPrototype, opt_instance); + defineNonEnumerableDataProperty(wrapperPrototype, "constructor", wrapperConstructor); + wrapperConstructor.prototype = wrapperPrototype; + } + function isWrapperFor(wrapperConstructor, nativeConstructor) { + return constructorTable.get(nativeConstructor.prototype) === wrapperConstructor; + } + function registerObject(object) { + var nativePrototype = Object.getPrototypeOf(object); + var superWrapperConstructor = getWrapperConstructor(nativePrototype); + var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor); + registerInternal(nativePrototype, GeneratedWrapper, object); + return GeneratedWrapper; + } + function createWrapperConstructor(superWrapperConstructor) { + function GeneratedWrapper(node) { + superWrapperConstructor.call(this, node); + } + var p = Object.create(superWrapperConstructor.prototype); + p.constructor = GeneratedWrapper; + GeneratedWrapper.prototype = p; + return GeneratedWrapper; + } + function isWrapper(object) { + return object && object.__impl4cf1e782hg__; + } + function isNative(object) { + return !isWrapper(object); + } + function wrap(impl) { + if (impl === null) return null; + assert(isNative(impl)); + var wrapper = impl.__wrapper8e3dd93a60__; + if (wrapper != null) { + return wrapper; + } + return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl); + } + function unwrap(wrapper) { + if (wrapper === null) return null; + assert(isWrapper(wrapper)); + return wrapper.__impl4cf1e782hg__; + } + function unsafeUnwrap(wrapper) { + return wrapper.__impl4cf1e782hg__; + } + function setWrapper(impl, wrapper) { + wrapper.__impl4cf1e782hg__ = impl; + impl.__wrapper8e3dd93a60__ = wrapper; + } + function unwrapIfNeeded(object) { + return object && isWrapper(object) ? unwrap(object) : object; + } + function wrapIfNeeded(object) { + return object && !isWrapper(object) ? wrap(object) : object; + } + function rewrap(node, wrapper) { + if (wrapper === null) return; + assert(isNative(node)); + assert(wrapper === undefined || isWrapper(wrapper)); + node.__wrapper8e3dd93a60__ = wrapper; + } + var getterDescriptor = { + get: undefined, + configurable: true, + enumerable: true + }; + function defineGetter(constructor, name, getter) { + getterDescriptor.get = getter; + defineProperty(constructor.prototype, name, getterDescriptor); + } + function defineWrapGetter(constructor, name) { + defineGetter(constructor, name, function() { + return wrap(this.__impl4cf1e782hg__[name]); + }); + } + function forwardMethodsToWrapper(constructors, names) { + constructors.forEach(function(constructor) { + names.forEach(function(name) { + constructor.prototype[name] = function() { + var w = wrapIfNeeded(this); + return w[name].apply(w, arguments); + }; + }); + }); + } + scope.assert = assert; + scope.constructorTable = constructorTable; + scope.defineGetter = defineGetter; + scope.defineWrapGetter = defineWrapGetter; + scope.forwardMethodsToWrapper = forwardMethodsToWrapper; + scope.isIdentifierName = isIdentifierName; + scope.isWrapper = isWrapper; + scope.isWrapperFor = isWrapperFor; + scope.mixin = mixin; + scope.nativePrototypeTable = nativePrototypeTable; + scope.oneOf = oneOf; + scope.registerObject = registerObject; + scope.registerWrapper = register; + scope.rewrap = rewrap; + scope.setWrapper = setWrapper; + scope.unsafeUnwrap = unsafeUnwrap; + scope.unwrap = unwrap; + scope.unwrapIfNeeded = unwrapIfNeeded; + scope.wrap = wrap; + scope.wrapIfNeeded = wrapIfNeeded; + scope.wrappers = wrappers; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + function newSplice(index, removed, addedCount) { + return { + index: index, + removed: removed, + addedCount: addedCount + }; + } + var EDIT_LEAVE = 0; + var EDIT_UPDATE = 1; + var EDIT_ADD = 2; + var EDIT_DELETE = 3; + function ArraySplice() {} + ArraySplice.prototype = { + calcEditDistances: function(current, currentStart, currentEnd, old, oldStart, oldEnd) { + var rowCount = oldEnd - oldStart + 1; + var columnCount = currentEnd - currentStart + 1; + var distances = new Array(rowCount); + for (var i = 0; i < rowCount; i++) { + distances[i] = new Array(columnCount); + distances[i][0] = i; + } + for (var j = 0; j < columnCount; j++) distances[0][j] = j; + for (var i = 1; i < rowCount; i++) { + for (var j = 1; j < columnCount; j++) { + if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1])) distances[i][j] = distances[i - 1][j - 1]; else { + var north = distances[i - 1][j] + 1; + var west = distances[i][j - 1] + 1; + distances[i][j] = north < west ? north : west; + } + } + } + return distances; + }, + spliceOperationsFromEditDistances: function(distances) { + var i = distances.length - 1; + var j = distances[0].length - 1; + var current = distances[i][j]; + var edits = []; + while (i > 0 || j > 0) { + if (i == 0) { + edits.push(EDIT_ADD); + j--; + continue; + } + if (j == 0) { + edits.push(EDIT_DELETE); + i--; + continue; + } + var northWest = distances[i - 1][j - 1]; + var west = distances[i - 1][j]; + var north = distances[i][j - 1]; + var min; + if (west < north) min = west < northWest ? west : northWest; else min = north < northWest ? north : northWest; + if (min == northWest) { + if (northWest == current) { + edits.push(EDIT_LEAVE); + } else { + edits.push(EDIT_UPDATE); + current = northWest; + } + i--; + j--; + } else if (min == west) { + edits.push(EDIT_DELETE); + i--; + current = west; + } else { + edits.push(EDIT_ADD); + j--; + current = north; + } + } + edits.reverse(); + return edits; + }, + calcSplices: function(current, currentStart, currentEnd, old, oldStart, oldEnd) { + var prefixCount = 0; + var suffixCount = 0; + var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart); + if (currentStart == 0 && oldStart == 0) prefixCount = this.sharedPrefix(current, old, minLength); + if (currentEnd == current.length && oldEnd == old.length) suffixCount = this.sharedSuffix(current, old, minLength - prefixCount); + currentStart += prefixCount; + oldStart += prefixCount; + currentEnd -= suffixCount; + oldEnd -= suffixCount; + if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) return []; + if (currentStart == currentEnd) { + var splice = newSplice(currentStart, [], 0); + while (oldStart < oldEnd) splice.removed.push(old[oldStart++]); + return [ splice ]; + } else if (oldStart == oldEnd) return [ newSplice(currentStart, [], currentEnd - currentStart) ]; + var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd)); + var splice = undefined; + var splices = []; + var index = currentStart; + var oldIndex = oldStart; + for (var i = 0; i < ops.length; i++) { + switch (ops[i]) { + case EDIT_LEAVE: + if (splice) { + splices.push(splice); + splice = undefined; + } + index++; + oldIndex++; + break; + + case EDIT_UPDATE: + if (!splice) splice = newSplice(index, [], 0); + splice.addedCount++; + index++; + splice.removed.push(old[oldIndex]); + oldIndex++; + break; + + case EDIT_ADD: + if (!splice) splice = newSplice(index, [], 0); + splice.addedCount++; + index++; + break; + + case EDIT_DELETE: + if (!splice) splice = newSplice(index, [], 0); + splice.removed.push(old[oldIndex]); + oldIndex++; + break; + } + } + if (splice) { + splices.push(splice); + } + return splices; + }, + sharedPrefix: function(current, old, searchLength) { + for (var i = 0; i < searchLength; i++) if (!this.equals(current[i], old[i])) return i; + return searchLength; + }, + sharedSuffix: function(current, old, searchLength) { + var index1 = current.length; + var index2 = old.length; + var count = 0; + while (count < searchLength && this.equals(current[--index1], old[--index2])) count++; + return count; + }, + calculateSplices: function(current, previous) { + return this.calcSplices(current, 0, current.length, previous, 0, previous.length); + }, + equals: function(currentValue, previousValue) { + return currentValue === previousValue; + } + }; + scope.ArraySplice = ArraySplice; +})(window.ShadowDOMPolyfill); + +(function(context) { + "use strict"; + var OriginalMutationObserver = window.MutationObserver; + var callbacks = []; + var pending = false; + var timerFunc; + function handle() { + pending = false; + var copies = callbacks.slice(0); + callbacks = []; + for (var i = 0; i < copies.length; i++) { + (0, copies[i])(); + } + } + if (OriginalMutationObserver) { + var counter = 1; + var observer = new OriginalMutationObserver(handle); + var textNode = document.createTextNode(counter); + observer.observe(textNode, { + characterData: true + }); + timerFunc = function() { + counter = (counter + 1) % 2; + textNode.data = counter; + }; + } else { + timerFunc = window.setTimeout; + } + function setEndOfMicrotask(func) { + callbacks.push(func); + if (pending) return; + pending = true; + timerFunc(handle, 0); + } + context.setEndOfMicrotask = setEndOfMicrotask; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var setEndOfMicrotask = scope.setEndOfMicrotask; + var wrapIfNeeded = scope.wrapIfNeeded; + var wrappers = scope.wrappers; + var registrationsTable = new WeakMap(); + var globalMutationObservers = []; + var isScheduled = false; + function scheduleCallback(observer) { + if (observer.scheduled_) return; + observer.scheduled_ = true; + globalMutationObservers.push(observer); + if (isScheduled) return; + setEndOfMicrotask(notifyObservers); + isScheduled = true; + } + function notifyObservers() { + isScheduled = false; + while (globalMutationObservers.length) { + var notifyList = globalMutationObservers; + globalMutationObservers = []; + notifyList.sort(function(x, y) { + return x.uid_ - y.uid_; + }); + for (var i = 0; i < notifyList.length; i++) { + var mo = notifyList[i]; + mo.scheduled_ = false; + var queue = mo.takeRecords(); + removeTransientObserversFor(mo); + if (queue.length) { + mo.callback_(queue, mo); + } + } + } + } + function MutationRecord(type, target) { + this.type = type; + this.target = target; + this.addedNodes = new wrappers.NodeList(); + this.removedNodes = new wrappers.NodeList(); + this.previousSibling = null; + this.nextSibling = null; + this.attributeName = null; + this.attributeNamespace = null; + this.oldValue = null; + } + function registerTransientObservers(ancestor, node) { + for (;ancestor; ancestor = ancestor.parentNode) { + var registrations = registrationsTable.get(ancestor); + if (!registrations) continue; + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.options.subtree) registration.addTransientObserver(node); + } + } + } + function removeTransientObserversFor(observer) { + for (var i = 0; i < observer.nodes_.length; i++) { + var node = observer.nodes_[i]; + var registrations = registrationsTable.get(node); + if (!registrations) return; + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + if (registration.observer === observer) registration.removeTransientObservers(); + } + } + } + function enqueueMutation(target, type, data) { + var interestedObservers = Object.create(null); + var associatedStrings = Object.create(null); + for (var node = target; node; node = node.parentNode) { + var registrations = registrationsTable.get(node); + if (!registrations) continue; + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + var options = registration.options; + if (node !== target && !options.subtree) continue; + if (type === "attributes" && !options.attributes) continue; + if (type === "attributes" && options.attributeFilter && (data.namespace !== null || options.attributeFilter.indexOf(data.name) === -1)) { + continue; + } + if (type === "characterData" && !options.characterData) continue; + if (type === "childList" && !options.childList) continue; + var observer = registration.observer; + interestedObservers[observer.uid_] = observer; + if (type === "attributes" && options.attributeOldValue || type === "characterData" && options.characterDataOldValue) { + associatedStrings[observer.uid_] = data.oldValue; + } + } + } + for (var uid in interestedObservers) { + var observer = interestedObservers[uid]; + var record = new MutationRecord(type, target); + if ("name" in data && "namespace" in data) { + record.attributeName = data.name; + record.attributeNamespace = data.namespace; + } + if (data.addedNodes) record.addedNodes = data.addedNodes; + if (data.removedNodes) record.removedNodes = data.removedNodes; + if (data.previousSibling) record.previousSibling = data.previousSibling; + if (data.nextSibling) record.nextSibling = data.nextSibling; + if (associatedStrings[uid] !== undefined) record.oldValue = associatedStrings[uid]; + scheduleCallback(observer); + observer.records_.push(record); + } + } + var slice = Array.prototype.slice; + function MutationObserverOptions(options) { + this.childList = !!options.childList; + this.subtree = !!options.subtree; + if (!("attributes" in options) && ("attributeOldValue" in options || "attributeFilter" in options)) { + this.attributes = true; + } else { + this.attributes = !!options.attributes; + } + if ("characterDataOldValue" in options && !("characterData" in options)) this.characterData = true; else this.characterData = !!options.characterData; + if (!this.attributes && (options.attributeOldValue || "attributeFilter" in options) || !this.characterData && options.characterDataOldValue) { + throw new TypeError(); + } + this.characterData = !!options.characterData; + this.attributeOldValue = !!options.attributeOldValue; + this.characterDataOldValue = !!options.characterDataOldValue; + if ("attributeFilter" in options) { + if (options.attributeFilter == null || typeof options.attributeFilter !== "object") { + throw new TypeError(); + } + this.attributeFilter = slice.call(options.attributeFilter); + } else { + this.attributeFilter = null; + } + } + var uidCounter = 0; + function MutationObserver(callback) { + this.callback_ = callback; + this.nodes_ = []; + this.records_ = []; + this.uid_ = ++uidCounter; + this.scheduled_ = false; + } + MutationObserver.prototype = { + constructor: MutationObserver, + observe: function(target, options) { + target = wrapIfNeeded(target); + var newOptions = new MutationObserverOptions(options); + var registration; + var registrations = registrationsTable.get(target); + if (!registrations) registrationsTable.set(target, registrations = []); + for (var i = 0; i < registrations.length; i++) { + if (registrations[i].observer === this) { + registration = registrations[i]; + registration.removeTransientObservers(); + registration.options = newOptions; + } + } + if (!registration) { + registration = new Registration(this, target, newOptions); + registrations.push(registration); + this.nodes_.push(target); + } + }, + disconnect: function() { + this.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.observer === this) { + registrations.splice(i, 1); + break; + } + } + }, this); + this.records_ = []; + }, + takeRecords: function() { + var copyOfRecords = this.records_; + this.records_ = []; + return copyOfRecords; + } + }; + function Registration(observer, target, options) { + this.observer = observer; + this.target = target; + this.options = options; + this.transientObservedNodes = []; + } + Registration.prototype = { + addTransientObserver: function(node) { + if (node === this.target) return; + scheduleCallback(this.observer); + this.transientObservedNodes.push(node); + var registrations = registrationsTable.get(node); + if (!registrations) registrationsTable.set(node, registrations = []); + registrations.push(this); + }, + removeTransientObservers: function() { + var transientObservedNodes = this.transientObservedNodes; + this.transientObservedNodes = []; + for (var i = 0; i < transientObservedNodes.length; i++) { + var node = transientObservedNodes[i]; + var registrations = registrationsTable.get(node); + for (var j = 0; j < registrations.length; j++) { + if (registrations[j] === this) { + registrations.splice(j, 1); + break; + } + } + } + } + }; + scope.enqueueMutation = enqueueMutation; + scope.registerTransientObservers = registerTransientObservers; + scope.wrappers.MutationObserver = MutationObserver; + scope.wrappers.MutationRecord = MutationRecord; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + function TreeScope(root, parent) { + this.root = root; + this.parent = parent; + } + TreeScope.prototype = { + get renderer() { + if (this.root instanceof scope.wrappers.ShadowRoot) { + return scope.getRendererForHost(this.root.host); + } + return null; + }, + contains: function(treeScope) { + for (;treeScope; treeScope = treeScope.parent) { + if (treeScope === this) return true; + } + return false; + } + }; + function setTreeScope(node, treeScope) { + if (node.treeScope_ !== treeScope) { + node.treeScope_ = treeScope; + for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) { + sr.treeScope_.parent = treeScope; + } + for (var child = node.firstChild; child; child = child.nextSibling) { + setTreeScope(child, treeScope); + } + } + } + function getTreeScope(node) { + if (node instanceof scope.wrappers.Window) { + debugger; + } + if (node.treeScope_) return node.treeScope_; + var parent = node.parentNode; + var treeScope; + if (parent) treeScope = getTreeScope(parent); else treeScope = new TreeScope(node, null); + return node.treeScope_ = treeScope; + } + scope.TreeScope = TreeScope; + scope.getTreeScope = getTreeScope; + scope.setTreeScope = setTreeScope; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var forwardMethodsToWrapper = scope.forwardMethodsToWrapper; + var getTreeScope = scope.getTreeScope; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrappers = scope.wrappers; + var wrappedFuns = new WeakMap(); + var listenersTable = new WeakMap(); + var handledEventsTable = new WeakMap(); + var currentlyDispatchingEvents = new WeakMap(); + var targetTable = new WeakMap(); + var currentTargetTable = new WeakMap(); + var relatedTargetTable = new WeakMap(); + var eventPhaseTable = new WeakMap(); + var stopPropagationTable = new WeakMap(); + var stopImmediatePropagationTable = new WeakMap(); + var eventHandlersTable = new WeakMap(); + var eventPathTable = new WeakMap(); + function isShadowRoot(node) { + return node instanceof wrappers.ShadowRoot; + } + function rootOfNode(node) { + return getTreeScope(node).root; + } + function getEventPath(node, event) { + var path = []; + var current = node; + path.push(current); + while (current) { + var destinationInsertionPoints = getDestinationInsertionPoints(current); + if (destinationInsertionPoints && destinationInsertionPoints.length > 0) { + for (var i = 0; i < destinationInsertionPoints.length; i++) { + var insertionPoint = destinationInsertionPoints[i]; + if (isShadowInsertionPoint(insertionPoint)) { + var shadowRoot = rootOfNode(insertionPoint); + var olderShadowRoot = shadowRoot.olderShadowRoot; + if (olderShadowRoot) path.push(olderShadowRoot); + } + path.push(insertionPoint); + } + current = destinationInsertionPoints[destinationInsertionPoints.length - 1]; + } else { + if (isShadowRoot(current)) { + if (inSameTree(node, current) && eventMustBeStopped(event)) { + break; + } + current = current.host; + path.push(current); + } else { + current = current.parentNode; + if (current) path.push(current); + } + } + } + return path; + } + function eventMustBeStopped(event) { + if (!event) return false; + switch (event.type) { + case "abort": + case "error": + case "select": + case "change": + case "load": + case "reset": + case "resize": + case "scroll": + case "selectstart": + return true; + } + return false; + } + function isShadowInsertionPoint(node) { + return node instanceof HTMLShadowElement; + } + function getDestinationInsertionPoints(node) { + return scope.getDestinationInsertionPoints(node); + } + function eventRetargetting(path, currentTarget) { + if (path.length === 0) return currentTarget; + if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document; + var currentTargetTree = getTreeScope(currentTarget); + var originalTarget = path[0]; + var originalTargetTree = getTreeScope(originalTarget); + var relativeTargetTree = lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree); + for (var i = 0; i < path.length; i++) { + var node = path[i]; + if (getTreeScope(node) === relativeTargetTree) return node; + } + return path[path.length - 1]; + } + function getTreeScopeAncestors(treeScope) { + var ancestors = []; + for (;treeScope; treeScope = treeScope.parent) { + ancestors.push(treeScope); + } + return ancestors; + } + function lowestCommonInclusiveAncestor(tsA, tsB) { + var ancestorsA = getTreeScopeAncestors(tsA); + var ancestorsB = getTreeScopeAncestors(tsB); + var result = null; + while (ancestorsA.length > 0 && ancestorsB.length > 0) { + var a = ancestorsA.pop(); + var b = ancestorsB.pop(); + if (a === b) result = a; else break; + } + return result; + } + function getTreeScopeRoot(ts) { + if (!ts.parent) return ts; + return getTreeScopeRoot(ts.parent); + } + function relatedTargetResolution(event, currentTarget, relatedTarget) { + if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document; + var currentTargetTree = getTreeScope(currentTarget); + var relatedTargetTree = getTreeScope(relatedTarget); + var relatedTargetEventPath = getEventPath(relatedTarget, event); + var lowestCommonAncestorTree; + var lowestCommonAncestorTree = lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree); + if (!lowestCommonAncestorTree) lowestCommonAncestorTree = relatedTargetTree.root; + for (var commonAncestorTree = lowestCommonAncestorTree; commonAncestorTree; commonAncestorTree = commonAncestorTree.parent) { + var adjustedRelatedTarget; + for (var i = 0; i < relatedTargetEventPath.length; i++) { + var node = relatedTargetEventPath[i]; + if (getTreeScope(node) === commonAncestorTree) return node; + } + } + return null; + } + function inSameTree(a, b) { + return getTreeScope(a) === getTreeScope(b); + } + var NONE = 0; + var CAPTURING_PHASE = 1; + var AT_TARGET = 2; + var BUBBLING_PHASE = 3; + var pendingError; + function dispatchOriginalEvent(originalEvent) { + if (handledEventsTable.get(originalEvent)) return; + handledEventsTable.set(originalEvent, true); + dispatchEvent(wrap(originalEvent), wrap(originalEvent.target)); + if (pendingError) { + var err = pendingError; + pendingError = null; + throw err; + } + } + function isLoadLikeEvent(event) { + switch (event.type) { + case "load": + case "beforeunload": + case "unload": + return true; + } + return false; + } + function dispatchEvent(event, originalWrapperTarget) { + if (currentlyDispatchingEvents.get(event)) throw new Error("InvalidStateError"); + currentlyDispatchingEvents.set(event, true); + scope.renderAllPending(); + var eventPath; + var overrideTarget; + var win; + if (isLoadLikeEvent(event) && !event.bubbles) { + var doc = originalWrapperTarget; + if (doc instanceof wrappers.Document && (win = doc.defaultView)) { + overrideTarget = doc; + eventPath = []; + } + } + if (!eventPath) { + if (originalWrapperTarget instanceof wrappers.Window) { + win = originalWrapperTarget; + eventPath = []; + } else { + eventPath = getEventPath(originalWrapperTarget, event); + if (!isLoadLikeEvent(event)) { + var doc = eventPath[eventPath.length - 1]; + if (doc instanceof wrappers.Document) win = doc.defaultView; + } + } + } + eventPathTable.set(event, eventPath); + if (dispatchCapturing(event, eventPath, win, overrideTarget)) { + if (dispatchAtTarget(event, eventPath, win, overrideTarget)) { + dispatchBubbling(event, eventPath, win, overrideTarget); + } + } + eventPhaseTable.set(event, NONE); + currentTargetTable.delete(event, null); + currentlyDispatchingEvents.delete(event); + return event.defaultPrevented; + } + function dispatchCapturing(event, eventPath, win, overrideTarget) { + var phase = CAPTURING_PHASE; + if (win) { + if (!invoke(win, event, phase, eventPath, overrideTarget)) return false; + } + for (var i = eventPath.length - 1; i > 0; i--) { + if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return false; + } + return true; + } + function dispatchAtTarget(event, eventPath, win, overrideTarget) { + var phase = AT_TARGET; + var currentTarget = eventPath[0] || win; + return invoke(currentTarget, event, phase, eventPath, overrideTarget); + } + function dispatchBubbling(event, eventPath, win, overrideTarget) { + var phase = BUBBLING_PHASE; + for (var i = 1; i < eventPath.length; i++) { + if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return; + } + if (win && eventPath.length > 0) { + invoke(win, event, phase, eventPath, overrideTarget); + } + } + function invoke(currentTarget, event, phase, eventPath, overrideTarget) { + var listeners = listenersTable.get(currentTarget); + if (!listeners) return true; + var target = overrideTarget || eventRetargetting(eventPath, currentTarget); + if (target === currentTarget) { + if (phase === CAPTURING_PHASE) return true; + if (phase === BUBBLING_PHASE) phase = AT_TARGET; + } else if (phase === BUBBLING_PHASE && !event.bubbles) { + return true; + } + if ("relatedTarget" in event) { + var originalEvent = unwrap(event); + var unwrappedRelatedTarget = originalEvent.relatedTarget; + if (unwrappedRelatedTarget) { + if (unwrappedRelatedTarget instanceof Object && unwrappedRelatedTarget.addEventListener) { + var relatedTarget = wrap(unwrappedRelatedTarget); + var adjusted = relatedTargetResolution(event, currentTarget, relatedTarget); + if (adjusted === target) return true; + } else { + adjusted = null; + } + relatedTargetTable.set(event, adjusted); + } + } + eventPhaseTable.set(event, phase); + var type = event.type; + var anyRemoved = false; + targetTable.set(event, target); + currentTargetTable.set(event, currentTarget); + listeners.depth++; + for (var i = 0, len = listeners.length; i < len; i++) { + var listener = listeners[i]; + if (listener.removed) { + anyRemoved = true; + continue; + } + if (listener.type !== type || !listener.capture && phase === CAPTURING_PHASE || listener.capture && phase === BUBBLING_PHASE) { + continue; + } + try { + if (typeof listener.handler === "function") listener.handler.call(currentTarget, event); else listener.handler.handleEvent(event); + if (stopImmediatePropagationTable.get(event)) return false; + } catch (ex) { + if (!pendingError) pendingError = ex; + } + } + listeners.depth--; + if (anyRemoved && listeners.depth === 0) { + var copy = listeners.slice(); + listeners.length = 0; + for (var i = 0; i < copy.length; i++) { + if (!copy[i].removed) listeners.push(copy[i]); + } + } + return !stopPropagationTable.get(event); + } + function Listener(type, handler, capture) { + this.type = type; + this.handler = handler; + this.capture = Boolean(capture); + } + Listener.prototype = { + equals: function(that) { + return this.handler === that.handler && this.type === that.type && this.capture === that.capture; + }, + get removed() { + return this.handler === null; + }, + remove: function() { + this.handler = null; + } + }; + var OriginalEvent = window.Event; + OriginalEvent.prototype.polymerBlackList_ = { + returnValue: true, + keyLocation: true + }; + function Event(type, options) { + if (type instanceof OriginalEvent) { + var impl = type; + if (!OriginalBeforeUnloadEvent && impl.type === "beforeunload" && !(this instanceof BeforeUnloadEvent)) { + return new BeforeUnloadEvent(impl); + } + setWrapper(impl, this); + } else { + return wrap(constructEvent(OriginalEvent, "Event", type, options)); + } + } + Event.prototype = { + get target() { + return targetTable.get(this); + }, + get currentTarget() { + return currentTargetTable.get(this); + }, + get eventPhase() { + return eventPhaseTable.get(this); + }, + get path() { + var eventPath = eventPathTable.get(this); + if (!eventPath) return []; + return eventPath.slice(); + }, + stopPropagation: function() { + stopPropagationTable.set(this, true); + }, + stopImmediatePropagation: function() { + stopPropagationTable.set(this, true); + stopImmediatePropagationTable.set(this, true); + } + }; + registerWrapper(OriginalEvent, Event, document.createEvent("Event")); + function unwrapOptions(options) { + if (!options || !options.relatedTarget) return options; + return Object.create(options, { + relatedTarget: { + value: unwrap(options.relatedTarget) + } + }); + } + function registerGenericEvent(name, SuperEvent, prototype) { + var OriginalEvent = window[name]; + var GenericEvent = function(type, options) { + if (type instanceof OriginalEvent) setWrapper(type, this); else return wrap(constructEvent(OriginalEvent, name, type, options)); + }; + GenericEvent.prototype = Object.create(SuperEvent.prototype); + if (prototype) mixin(GenericEvent.prototype, prototype); + if (OriginalEvent) { + try { + registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent("temp")); + } catch (ex) { + registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name)); + } + } + return GenericEvent; + } + var UIEvent = registerGenericEvent("UIEvent", Event); + var CustomEvent = registerGenericEvent("CustomEvent", Event); + var relatedTargetProto = { + get relatedTarget() { + var relatedTarget = relatedTargetTable.get(this); + if (relatedTarget !== undefined) return relatedTarget; + return wrap(unwrap(this).relatedTarget); + } + }; + function getInitFunction(name, relatedTargetIndex) { + return function() { + arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]); + var impl = unwrap(this); + impl[name].apply(impl, arguments); + }; + } + var mouseEventProto = mixin({ + initMouseEvent: getInitFunction("initMouseEvent", 14) + }, relatedTargetProto); + var focusEventProto = mixin({ + initFocusEvent: getInitFunction("initFocusEvent", 5) + }, relatedTargetProto); + var MouseEvent = registerGenericEvent("MouseEvent", UIEvent, mouseEventProto); + var FocusEvent = registerGenericEvent("FocusEvent", UIEvent, focusEventProto); + var defaultInitDicts = Object.create(null); + var supportsEventConstructors = function() { + try { + new window.FocusEvent("focus"); + } catch (ex) { + return false; + } + return true; + }(); + function constructEvent(OriginalEvent, name, type, options) { + if (supportsEventConstructors) return new OriginalEvent(type, unwrapOptions(options)); + var event = unwrap(document.createEvent(name)); + var defaultDict = defaultInitDicts[name]; + var args = [ type ]; + Object.keys(defaultDict).forEach(function(key) { + var v = options != null && key in options ? options[key] : defaultDict[key]; + if (key === "relatedTarget") v = unwrap(v); + args.push(v); + }); + event["init" + name].apply(event, args); + return event; + } + if (!supportsEventConstructors) { + var configureEventConstructor = function(name, initDict, superName) { + if (superName) { + var superDict = defaultInitDicts[superName]; + initDict = mixin(mixin({}, superDict), initDict); + } + defaultInitDicts[name] = initDict; + }; + configureEventConstructor("Event", { + bubbles: false, + cancelable: false + }); + configureEventConstructor("CustomEvent", { + detail: null + }, "Event"); + configureEventConstructor("UIEvent", { + view: null, + detail: 0 + }, "Event"); + configureEventConstructor("MouseEvent", { + screenX: 0, + screenY: 0, + clientX: 0, + clientY: 0, + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false, + button: 0, + relatedTarget: null + }, "UIEvent"); + configureEventConstructor("FocusEvent", { + relatedTarget: null + }, "UIEvent"); + } + var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent; + function BeforeUnloadEvent(impl) { + Event.call(this, impl); + } + BeforeUnloadEvent.prototype = Object.create(Event.prototype); + mixin(BeforeUnloadEvent.prototype, { + get returnValue() { + return unsafeUnwrap(this).returnValue; + }, + set returnValue(v) { + unsafeUnwrap(this).returnValue = v; + } + }); + if (OriginalBeforeUnloadEvent) registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent); + function isValidListener(fun) { + if (typeof fun === "function") return true; + return fun && fun.handleEvent; + } + function isMutationEvent(type) { + switch (type) { + case "DOMAttrModified": + case "DOMAttributeNameChanged": + case "DOMCharacterDataModified": + case "DOMElementNameChanged": + case "DOMNodeInserted": + case "DOMNodeInsertedIntoDocument": + case "DOMNodeRemoved": + case "DOMNodeRemovedFromDocument": + case "DOMSubtreeModified": + return true; + } + return false; + } + var OriginalEventTarget = window.EventTarget; + function EventTarget(impl) { + setWrapper(impl, this); + } + var methodNames = [ "addEventListener", "removeEventListener", "dispatchEvent" ]; + [ Node, Window ].forEach(function(constructor) { + var p = constructor.prototype; + methodNames.forEach(function(name) { + Object.defineProperty(p, name + "_", { + value: p[name] + }); + }); + }); + function getTargetToListenAt(wrapper) { + if (wrapper instanceof wrappers.ShadowRoot) wrapper = wrapper.host; + return unwrap(wrapper); + } + EventTarget.prototype = { + addEventListener: function(type, fun, capture) { + if (!isValidListener(fun) || isMutationEvent(type)) return; + var listener = new Listener(type, fun, capture); + var listeners = listenersTable.get(this); + if (!listeners) { + listeners = []; + listeners.depth = 0; + listenersTable.set(this, listeners); + } else { + for (var i = 0; i < listeners.length; i++) { + if (listener.equals(listeners[i])) return; + } + } + listeners.push(listener); + var target = getTargetToListenAt(this); + target.addEventListener_(type, dispatchOriginalEvent, true); + }, + removeEventListener: function(type, fun, capture) { + capture = Boolean(capture); + var listeners = listenersTable.get(this); + if (!listeners) return; + var count = 0, found = false; + for (var i = 0; i < listeners.length; i++) { + if (listeners[i].type === type && listeners[i].capture === capture) { + count++; + if (listeners[i].handler === fun) { + found = true; + listeners[i].remove(); + } + } + } + if (found && count === 1) { + var target = getTargetToListenAt(this); + target.removeEventListener_(type, dispatchOriginalEvent, true); + } + }, + dispatchEvent: function(event) { + var nativeEvent = unwrap(event); + var eventType = nativeEvent.type; + handledEventsTable.set(nativeEvent, false); + scope.renderAllPending(); + var tempListener; + if (!hasListenerInAncestors(this, eventType)) { + tempListener = function() {}; + this.addEventListener(eventType, tempListener, true); + } + try { + return unwrap(this).dispatchEvent_(nativeEvent); + } finally { + if (tempListener) this.removeEventListener(eventType, tempListener, true); + } + } + }; + function hasListener(node, type) { + var listeners = listenersTable.get(node); + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + if (!listeners[i].removed && listeners[i].type === type) return true; + } + } + return false; + } + function hasListenerInAncestors(target, type) { + for (var node = unwrap(target); node; node = node.parentNode) { + if (hasListener(wrap(node), type)) return true; + } + return false; + } + if (OriginalEventTarget) registerWrapper(OriginalEventTarget, EventTarget); + function wrapEventTargetMethods(constructors) { + forwardMethodsToWrapper(constructors, methodNames); + } + var originalElementFromPoint = document.elementFromPoint; + function elementFromPoint(self, document, x, y) { + scope.renderAllPending(); + var element = wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y)); + if (!element) return null; + var path = getEventPath(element, null); + var idx = path.lastIndexOf(self); + if (idx == -1) return null; else path = path.slice(0, idx); + return eventRetargetting(path, self); + } + function getEventHandlerGetter(name) { + return function() { + var inlineEventHandlers = eventHandlersTable.get(this); + return inlineEventHandlers && inlineEventHandlers[name] && inlineEventHandlers[name].value || null; + }; + } + function getEventHandlerSetter(name) { + var eventType = name.slice(2); + return function(value) { + var inlineEventHandlers = eventHandlersTable.get(this); + if (!inlineEventHandlers) { + inlineEventHandlers = Object.create(null); + eventHandlersTable.set(this, inlineEventHandlers); + } + var old = inlineEventHandlers[name]; + if (old) this.removeEventListener(eventType, old.wrapped, false); + if (typeof value === "function") { + var wrapped = function(e) { + var rv = value.call(this, e); + if (rv === false) e.preventDefault(); else if (name === "onbeforeunload" && typeof rv === "string") e.returnValue = rv; + }; + this.addEventListener(eventType, wrapped, false); + inlineEventHandlers[name] = { + value: value, + wrapped: wrapped + }; + } + }; + } + scope.elementFromPoint = elementFromPoint; + scope.getEventHandlerGetter = getEventHandlerGetter; + scope.getEventHandlerSetter = getEventHandlerSetter; + scope.wrapEventTargetMethods = wrapEventTargetMethods; + scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent; + scope.wrappers.CustomEvent = CustomEvent; + scope.wrappers.Event = Event; + scope.wrappers.EventTarget = EventTarget; + scope.wrappers.FocusEvent = FocusEvent; + scope.wrappers.MouseEvent = MouseEvent; + scope.wrappers.UIEvent = UIEvent; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var UIEvent = scope.wrappers.UIEvent; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var OriginalTouchEvent = window.TouchEvent; + if (!OriginalTouchEvent) return; + var nativeEvent; + try { + nativeEvent = document.createEvent("TouchEvent"); + } catch (ex) { + return; + } + var nonEnumDescriptor = { + enumerable: false + }; + function nonEnum(obj, prop) { + Object.defineProperty(obj, prop, nonEnumDescriptor); + } + function Touch(impl) { + setWrapper(impl, this); + } + Touch.prototype = { + get target() { + return wrap(unsafeUnwrap(this).target); + } + }; + var descr = { + configurable: true, + enumerable: true, + get: null + }; + [ "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "identifier", "webkitRadiusX", "webkitRadiusY", "webkitRotationAngle", "webkitForce" ].forEach(function(name) { + descr.get = function() { + return unsafeUnwrap(this)[name]; + }; + Object.defineProperty(Touch.prototype, name, descr); + }); + function TouchList() { + this.length = 0; + nonEnum(this, "length"); + } + TouchList.prototype = { + item: function(index) { + return this[index]; + } + }; + function wrapTouchList(nativeTouchList) { + var list = new TouchList(); + for (var i = 0; i < nativeTouchList.length; i++) { + list[i] = new Touch(nativeTouchList[i]); + } + list.length = i; + return list; + } + function TouchEvent(impl) { + UIEvent.call(this, impl); + } + TouchEvent.prototype = Object.create(UIEvent.prototype); + mixin(TouchEvent.prototype, { + get touches() { + return wrapTouchList(unsafeUnwrap(this).touches); + }, + get targetTouches() { + return wrapTouchList(unsafeUnwrap(this).targetTouches); + }, + get changedTouches() { + return wrapTouchList(unsafeUnwrap(this).changedTouches); + }, + initTouchEvent: function() { + throw new Error("Not implemented"); + } + }); + registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent); + scope.wrappers.Touch = Touch; + scope.wrappers.TouchEvent = TouchEvent; + scope.wrappers.TouchList = TouchList; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var nonEnumDescriptor = { + enumerable: false + }; + function nonEnum(obj, prop) { + Object.defineProperty(obj, prop, nonEnumDescriptor); + } + function NodeList() { + this.length = 0; + nonEnum(this, "length"); + } + NodeList.prototype = { + item: function(index) { + return this[index]; + } + }; + nonEnum(NodeList.prototype, "item"); + function wrapNodeList(list) { + if (list == null) return list; + var wrapperList = new NodeList(); + for (var i = 0, length = list.length; i < length; i++) { + wrapperList[i] = wrap(list[i]); + } + wrapperList.length = length; + return wrapperList; + } + function addWrapNodeListMethod(wrapperConstructor, name) { + wrapperConstructor.prototype[name] = function() { + return wrapNodeList(unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments)); + }; + } + scope.wrappers.NodeList = NodeList; + scope.addWrapNodeListMethod = addWrapNodeListMethod; + scope.wrapNodeList = wrapNodeList; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + scope.wrapHTMLCollection = scope.wrapNodeList; + scope.wrappers.HTMLCollection = scope.wrappers.NodeList; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var EventTarget = scope.wrappers.EventTarget; + var NodeList = scope.wrappers.NodeList; + var TreeScope = scope.TreeScope; + var assert = scope.assert; + var defineWrapGetter = scope.defineWrapGetter; + var enqueueMutation = scope.enqueueMutation; + var getTreeScope = scope.getTreeScope; + var isWrapper = scope.isWrapper; + var mixin = scope.mixin; + var registerTransientObservers = scope.registerTransientObservers; + var registerWrapper = scope.registerWrapper; + var setTreeScope = scope.setTreeScope; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var wrapIfNeeded = scope.wrapIfNeeded; + var wrappers = scope.wrappers; + function assertIsNodeWrapper(node) { + assert(node instanceof Node); + } + function createOneElementNodeList(node) { + var nodes = new NodeList(); + nodes[0] = node; + nodes.length = 1; + return nodes; + } + var surpressMutations = false; + function enqueueRemovalForInsertedNodes(node, parent, nodes) { + enqueueMutation(parent, "childList", { + removedNodes: nodes, + previousSibling: node.previousSibling, + nextSibling: node.nextSibling + }); + } + function enqueueRemovalForInsertedDocumentFragment(df, nodes) { + enqueueMutation(df, "childList", { + removedNodes: nodes + }); + } + function collectNodes(node, parentNode, previousNode, nextNode) { + if (node instanceof DocumentFragment) { + var nodes = collectNodesForDocumentFragment(node); + surpressMutations = true; + for (var i = nodes.length - 1; i >= 0; i--) { + node.removeChild(nodes[i]); + nodes[i].parentNode_ = parentNode; + } + surpressMutations = false; + for (var i = 0; i < nodes.length; i++) { + nodes[i].previousSibling_ = nodes[i - 1] || previousNode; + nodes[i].nextSibling_ = nodes[i + 1] || nextNode; + } + if (previousNode) previousNode.nextSibling_ = nodes[0]; + if (nextNode) nextNode.previousSibling_ = nodes[nodes.length - 1]; + return nodes; + } + var nodes = createOneElementNodeList(node); + var oldParent = node.parentNode; + if (oldParent) { + oldParent.removeChild(node); + } + node.parentNode_ = parentNode; + node.previousSibling_ = previousNode; + node.nextSibling_ = nextNode; + if (previousNode) previousNode.nextSibling_ = node; + if (nextNode) nextNode.previousSibling_ = node; + return nodes; + } + function collectNodesNative(node) { + if (node instanceof DocumentFragment) return collectNodesForDocumentFragment(node); + var nodes = createOneElementNodeList(node); + var oldParent = node.parentNode; + if (oldParent) enqueueRemovalForInsertedNodes(node, oldParent, nodes); + return nodes; + } + function collectNodesForDocumentFragment(node) { + var nodes = new NodeList(); + var i = 0; + for (var child = node.firstChild; child; child = child.nextSibling) { + nodes[i++] = child; + } + nodes.length = i; + enqueueRemovalForInsertedDocumentFragment(node, nodes); + return nodes; + } + function snapshotNodeList(nodeList) { + return nodeList; + } + function nodeWasAdded(node, treeScope) { + setTreeScope(node, treeScope); + node.nodeIsInserted_(); + } + function nodesWereAdded(nodes, parent) { + var treeScope = getTreeScope(parent); + for (var i = 0; i < nodes.length; i++) { + nodeWasAdded(nodes[i], treeScope); + } + } + function nodeWasRemoved(node) { + setTreeScope(node, new TreeScope(node, null)); + } + function nodesWereRemoved(nodes) { + for (var i = 0; i < nodes.length; i++) { + nodeWasRemoved(nodes[i]); + } + } + function ensureSameOwnerDocument(parent, child) { + var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ? parent : parent.ownerDocument; + if (ownerDoc !== child.ownerDocument) ownerDoc.adoptNode(child); + } + function adoptNodesIfNeeded(owner, nodes) { + if (!nodes.length) return; + var ownerDoc = owner.ownerDocument; + if (ownerDoc === nodes[0].ownerDocument) return; + for (var i = 0; i < nodes.length; i++) { + scope.adoptNodeNoRemove(nodes[i], ownerDoc); + } + } + function unwrapNodesForInsertion(owner, nodes) { + adoptNodesIfNeeded(owner, nodes); + var length = nodes.length; + if (length === 1) return unwrap(nodes[0]); + var df = unwrap(owner.ownerDocument.createDocumentFragment()); + for (var i = 0; i < length; i++) { + df.appendChild(unwrap(nodes[i])); + } + return df; + } + function clearChildNodes(wrapper) { + if (wrapper.firstChild_ !== undefined) { + var child = wrapper.firstChild_; + while (child) { + var tmp = child; + child = child.nextSibling_; + tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined; + } + } + wrapper.firstChild_ = wrapper.lastChild_ = undefined; + } + function removeAllChildNodes(wrapper) { + if (wrapper.invalidateShadowRenderer()) { + var childWrapper = wrapper.firstChild; + while (childWrapper) { + assert(childWrapper.parentNode === wrapper); + var nextSibling = childWrapper.nextSibling; + var childNode = unwrap(childWrapper); + var parentNode = childNode.parentNode; + if (parentNode) originalRemoveChild.call(parentNode, childNode); + childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null; + childWrapper = nextSibling; + } + wrapper.firstChild_ = wrapper.lastChild_ = null; + } else { + var node = unwrap(wrapper); + var child = node.firstChild; + var nextSibling; + while (child) { + nextSibling = child.nextSibling; + originalRemoveChild.call(node, child); + child = nextSibling; + } + } + } + function invalidateParent(node) { + var p = node.parentNode; + return p && p.invalidateShadowRenderer(); + } + function cleanupNodes(nodes) { + for (var i = 0, n; i < nodes.length; i++) { + n = nodes[i]; + n.parentNode.removeChild(n); + } + } + var originalImportNode = document.importNode; + var originalCloneNode = window.Node.prototype.cloneNode; + function cloneNode(node, deep, opt_doc) { + var clone; + if (opt_doc) clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false)); else clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false)); + if (deep) { + for (var child = node.firstChild; child; child = child.nextSibling) { + clone.appendChild(cloneNode(child, true, opt_doc)); + } + if (node instanceof wrappers.HTMLTemplateElement) { + var cloneContent = clone.content; + for (var child = node.content.firstChild; child; child = child.nextSibling) { + cloneContent.appendChild(cloneNode(child, true, opt_doc)); + } + } + } + return clone; + } + function contains(self, child) { + if (!child || getTreeScope(self) !== getTreeScope(child)) return false; + for (var node = child; node; node = node.parentNode) { + if (node === self) return true; + } + return false; + } + var OriginalNode = window.Node; + function Node(original) { + assert(original instanceof OriginalNode); + EventTarget.call(this, original); + this.parentNode_ = undefined; + this.firstChild_ = undefined; + this.lastChild_ = undefined; + this.nextSibling_ = undefined; + this.previousSibling_ = undefined; + this.treeScope_ = undefined; + } + var OriginalDocumentFragment = window.DocumentFragment; + var originalAppendChild = OriginalNode.prototype.appendChild; + var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition; + var originalIsEqualNode = OriginalNode.prototype.isEqualNode; + var originalInsertBefore = OriginalNode.prototype.insertBefore; + var originalRemoveChild = OriginalNode.prototype.removeChild; + var originalReplaceChild = OriginalNode.prototype.replaceChild; + var isIe = /Trident|Edge/.test(navigator.userAgent); + var removeChildOriginalHelper = isIe ? function(parent, child) { + try { + originalRemoveChild.call(parent, child); + } catch (ex) { + if (!(parent instanceof OriginalDocumentFragment)) throw ex; + } + } : function(parent, child) { + originalRemoveChild.call(parent, child); + }; + Node.prototype = Object.create(EventTarget.prototype); + mixin(Node.prototype, { + appendChild: function(childWrapper) { + return this.insertBefore(childWrapper, null); + }, + insertBefore: function(childWrapper, refWrapper) { + assertIsNodeWrapper(childWrapper); + var refNode; + if (refWrapper) { + if (isWrapper(refWrapper)) { + refNode = unwrap(refWrapper); + } else { + refNode = refWrapper; + refWrapper = wrap(refNode); + } + } else { + refWrapper = null; + refNode = null; + } + refWrapper && assert(refWrapper.parentNode === this); + var nodes; + var previousNode = refWrapper ? refWrapper.previousSibling : this.lastChild; + var useNative = !this.invalidateShadowRenderer() && !invalidateParent(childWrapper); + if (useNative) nodes = collectNodesNative(childWrapper); else nodes = collectNodes(childWrapper, this, previousNode, refWrapper); + if (useNative) { + ensureSameOwnerDocument(this, childWrapper); + clearChildNodes(this); + originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode); + } else { + if (!previousNode) this.firstChild_ = nodes[0]; + if (!refWrapper) { + this.lastChild_ = nodes[nodes.length - 1]; + if (this.firstChild_ === undefined) this.firstChild_ = this.firstChild; + } + var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this); + if (parentNode) { + originalInsertBefore.call(parentNode, unwrapNodesForInsertion(this, nodes), refNode); + } else { + adoptNodesIfNeeded(this, nodes); + } + } + enqueueMutation(this, "childList", { + addedNodes: nodes, + nextSibling: refWrapper, + previousSibling: previousNode + }); + nodesWereAdded(nodes, this); + return childWrapper; + }, + removeChild: function(childWrapper) { + assertIsNodeWrapper(childWrapper); + if (childWrapper.parentNode !== this) { + var found = false; + var childNodes = this.childNodes; + for (var ieChild = this.firstChild; ieChild; ieChild = ieChild.nextSibling) { + if (ieChild === childWrapper) { + found = true; + break; + } + } + if (!found) { + throw new Error("NotFoundError"); + } + } + var childNode = unwrap(childWrapper); + var childWrapperNextSibling = childWrapper.nextSibling; + var childWrapperPreviousSibling = childWrapper.previousSibling; + if (this.invalidateShadowRenderer()) { + var thisFirstChild = this.firstChild; + var thisLastChild = this.lastChild; + var parentNode = childNode.parentNode; + if (parentNode) removeChildOriginalHelper(parentNode, childNode); + if (thisFirstChild === childWrapper) this.firstChild_ = childWrapperNextSibling; + if (thisLastChild === childWrapper) this.lastChild_ = childWrapperPreviousSibling; + if (childWrapperPreviousSibling) childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling; + if (childWrapperNextSibling) { + childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling; + } + childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = undefined; + } else { + clearChildNodes(this); + removeChildOriginalHelper(unsafeUnwrap(this), childNode); + } + if (!surpressMutations) { + enqueueMutation(this, "childList", { + removedNodes: createOneElementNodeList(childWrapper), + nextSibling: childWrapperNextSibling, + previousSibling: childWrapperPreviousSibling + }); + } + registerTransientObservers(this, childWrapper); + return childWrapper; + }, + replaceChild: function(newChildWrapper, oldChildWrapper) { + assertIsNodeWrapper(newChildWrapper); + var oldChildNode; + if (isWrapper(oldChildWrapper)) { + oldChildNode = unwrap(oldChildWrapper); + } else { + oldChildNode = oldChildWrapper; + oldChildWrapper = wrap(oldChildNode); + } + if (oldChildWrapper.parentNode !== this) { + throw new Error("NotFoundError"); + } + var nextNode = oldChildWrapper.nextSibling; + var previousNode = oldChildWrapper.previousSibling; + var nodes; + var useNative = !this.invalidateShadowRenderer() && !invalidateParent(newChildWrapper); + if (useNative) { + nodes = collectNodesNative(newChildWrapper); + } else { + if (nextNode === newChildWrapper) nextNode = newChildWrapper.nextSibling; + nodes = collectNodes(newChildWrapper, this, previousNode, nextNode); + } + if (!useNative) { + if (this.firstChild === oldChildWrapper) this.firstChild_ = nodes[0]; + if (this.lastChild === oldChildWrapper) this.lastChild_ = nodes[nodes.length - 1]; + oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ = oldChildWrapper.parentNode_ = undefined; + if (oldChildNode.parentNode) { + originalReplaceChild.call(oldChildNode.parentNode, unwrapNodesForInsertion(this, nodes), oldChildNode); + } + } else { + ensureSameOwnerDocument(this, newChildWrapper); + clearChildNodes(this); + originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper), oldChildNode); + } + enqueueMutation(this, "childList", { + addedNodes: nodes, + removedNodes: createOneElementNodeList(oldChildWrapper), + nextSibling: nextNode, + previousSibling: previousNode + }); + nodeWasRemoved(oldChildWrapper); + nodesWereAdded(nodes, this); + return oldChildWrapper; + }, + nodeIsInserted_: function() { + for (var child = this.firstChild; child; child = child.nextSibling) { + child.nodeIsInserted_(); + } + }, + hasChildNodes: function() { + return this.firstChild !== null; + }, + get parentNode() { + return this.parentNode_ !== undefined ? this.parentNode_ : wrap(unsafeUnwrap(this).parentNode); + }, + get firstChild() { + return this.firstChild_ !== undefined ? this.firstChild_ : wrap(unsafeUnwrap(this).firstChild); + }, + get lastChild() { + return this.lastChild_ !== undefined ? this.lastChild_ : wrap(unsafeUnwrap(this).lastChild); + }, + get nextSibling() { + return this.nextSibling_ !== undefined ? this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling); + }, + get previousSibling() { + return this.previousSibling_ !== undefined ? this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling); + }, + get parentElement() { + var p = this.parentNode; + while (p && p.nodeType !== Node.ELEMENT_NODE) { + p = p.parentNode; + } + return p; + }, + get textContent() { + var s = ""; + for (var child = this.firstChild; child; child = child.nextSibling) { + if (child.nodeType != Node.COMMENT_NODE) { + s += child.textContent; + } + } + return s; + }, + set textContent(textContent) { + if (textContent == null) textContent = ""; + var removedNodes = snapshotNodeList(this.childNodes); + if (this.invalidateShadowRenderer()) { + removeAllChildNodes(this); + if (textContent !== "") { + var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent); + this.appendChild(textNode); + } + } else { + clearChildNodes(this); + unsafeUnwrap(this).textContent = textContent; + } + var addedNodes = snapshotNodeList(this.childNodes); + enqueueMutation(this, "childList", { + addedNodes: addedNodes, + removedNodes: removedNodes + }); + nodesWereRemoved(removedNodes); + nodesWereAdded(addedNodes, this); + }, + get childNodes() { + var wrapperList = new NodeList(); + var i = 0; + for (var child = this.firstChild; child; child = child.nextSibling) { + wrapperList[i++] = child; + } + wrapperList.length = i; + return wrapperList; + }, + cloneNode: function(deep) { + return cloneNode(this, deep); + }, + contains: function(child) { + return contains(this, wrapIfNeeded(child)); + }, + compareDocumentPosition: function(otherNode) { + return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode)); + }, + isEqualNode: function(otherNode) { + return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode)); + }, + normalize: function() { + var nodes = snapshotNodeList(this.childNodes); + var remNodes = []; + var s = ""; + var modNode; + for (var i = 0, n; i < nodes.length; i++) { + n = nodes[i]; + if (n.nodeType === Node.TEXT_NODE) { + if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else { + s += n.data; + remNodes.push(n); + } + } else { + if (modNode && remNodes.length) { + modNode.data += s; + cleanupNodes(remNodes); + } + remNodes = []; + s = ""; + modNode = null; + if (n.childNodes.length) n.normalize(); + } + } + if (modNode && remNodes.length) { + modNode.data += s; + cleanupNodes(remNodes); + } + } + }); + defineWrapGetter(Node, "ownerDocument"); + registerWrapper(OriginalNode, Node, document.createDocumentFragment()); + delete Node.prototype.querySelector; + delete Node.prototype.querySelectorAll; + Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype); + scope.cloneNode = cloneNode; + scope.nodeWasAdded = nodeWasAdded; + scope.nodeWasRemoved = nodeWasRemoved; + scope.nodesWereAdded = nodesWereAdded; + scope.nodesWereRemoved = nodesWereRemoved; + scope.originalInsertBefore = originalInsertBefore; + scope.originalRemoveChild = originalRemoveChild; + scope.snapshotNodeList = snapshotNodeList; + scope.wrappers.Node = Node; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLCollection = scope.wrappers.HTMLCollection; + var NodeList = scope.wrappers.NodeList; + var getTreeScope = scope.getTreeScope; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var originalDocumentQuerySelector = document.querySelector; + var originalElementQuerySelector = document.documentElement.querySelector; + var originalDocumentQuerySelectorAll = document.querySelectorAll; + var originalElementQuerySelectorAll = document.documentElement.querySelectorAll; + var originalDocumentGetElementsByTagName = document.getElementsByTagName; + var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName; + var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS; + var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS; + var OriginalElement = window.Element; + var OriginalDocument = window.HTMLDocument || window.Document; + function filterNodeList(list, index, result, deep) { + var wrappedItem = null; + var root = null; + for (var i = 0, length = list.length; i < length; i++) { + wrappedItem = wrap(list[i]); + if (!deep && (root = getTreeScope(wrappedItem).root)) { + if (root instanceof scope.wrappers.ShadowRoot) { + continue; + } + } + result[index++] = wrappedItem; + } + return index; + } + function shimSelector(selector) { + return String(selector).replace(/\/deep\/|::shadow|>>>/g, " "); + } + function shimMatchesSelector(selector) { + return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " "); + } + function findOne(node, selector) { + var m, el = node.firstElementChild; + while (el) { + if (el.matches(selector)) return el; + m = findOne(el, selector); + if (m) return m; + el = el.nextElementSibling; + } + return null; + } + function matchesSelector(el, selector) { + return el.matches(selector); + } + var XHTML_NS = "http://www.w3.org/1999/xhtml"; + function matchesTagName(el, localName, localNameLowerCase) { + var ln = el.localName; + return ln === localName || ln === localNameLowerCase && el.namespaceURI === XHTML_NS; + } + function matchesEveryThing() { + return true; + } + function matchesLocalNameOnly(el, ns, localName) { + return el.localName === localName; + } + function matchesNameSpace(el, ns) { + return el.namespaceURI === ns; + } + function matchesLocalNameNS(el, ns, localName) { + return el.namespaceURI === ns && el.localName === localName; + } + function findElements(node, index, result, p, arg0, arg1) { + var el = node.firstElementChild; + while (el) { + if (p(el, arg0, arg1)) result[index++] = el; + index = findElements(el, index, result, p, arg0, arg1); + el = el.nextElementSibling; + } + return index; + } + function querySelectorAllFiltered(p, index, result, selector, deep) { + var target = unsafeUnwrap(this); + var list; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findElements(this, index, result, p, selector, null); + } else if (target instanceof OriginalElement) { + list = originalElementQuerySelectorAll.call(target, selector); + } else if (target instanceof OriginalDocument) { + list = originalDocumentQuerySelectorAll.call(target, selector); + } else { + return findElements(this, index, result, p, selector, null); + } + return filterNodeList(list, index, result, deep); + } + var SelectorsInterface = { + querySelector: function(selector) { + var shimmed = shimSelector(selector); + var deep = shimmed !== selector; + selector = shimmed; + var target = unsafeUnwrap(this); + var wrappedItem; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findOne(this, selector); + } else if (target instanceof OriginalElement) { + wrappedItem = wrap(originalElementQuerySelector.call(target, selector)); + } else if (target instanceof OriginalDocument) { + wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector)); + } else { + return findOne(this, selector); + } + if (!wrappedItem) { + return wrappedItem; + } else if (!deep && (root = getTreeScope(wrappedItem).root)) { + if (root instanceof scope.wrappers.ShadowRoot) { + return findOne(this, selector); + } + } + return wrappedItem; + }, + querySelectorAll: function(selector) { + var shimmed = shimSelector(selector); + var deep = shimmed !== selector; + selector = shimmed; + var result = new NodeList(); + result.length = querySelectorAllFiltered.call(this, matchesSelector, 0, result, selector, deep); + return result; + } + }; + var MatchesInterface = { + matches: function(selector) { + selector = shimMatchesSelector(selector); + return scope.originalMatches.call(unsafeUnwrap(this), selector); + } + }; + function getElementsByTagNameFiltered(p, index, result, localName, lowercase) { + var target = unsafeUnwrap(this); + var list; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findElements(this, index, result, p, localName, lowercase); + } else if (target instanceof OriginalElement) { + list = originalElementGetElementsByTagName.call(target, localName, lowercase); + } else if (target instanceof OriginalDocument) { + list = originalDocumentGetElementsByTagName.call(target, localName, lowercase); + } else { + return findElements(this, index, result, p, localName, lowercase); + } + return filterNodeList(list, index, result, false); + } + function getElementsByTagNameNSFiltered(p, index, result, ns, localName) { + var target = unsafeUnwrap(this); + var list; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findElements(this, index, result, p, ns, localName); + } else if (target instanceof OriginalElement) { + list = originalElementGetElementsByTagNameNS.call(target, ns, localName); + } else if (target instanceof OriginalDocument) { + list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName); + } else { + return findElements(this, index, result, p, ns, localName); + } + return filterNodeList(list, index, result, false); + } + var GetElementsByInterface = { + getElementsByTagName: function(localName) { + var result = new HTMLCollection(); + var match = localName === "*" ? matchesEveryThing : matchesTagName; + result.length = getElementsByTagNameFiltered.call(this, match, 0, result, localName, localName.toLowerCase()); + return result; + }, + getElementsByClassName: function(className) { + return this.querySelectorAll("." + className); + }, + getElementsByTagNameNS: function(ns, localName) { + var result = new HTMLCollection(); + var match = null; + if (ns === "*") { + match = localName === "*" ? matchesEveryThing : matchesLocalNameOnly; + } else { + match = localName === "*" ? matchesNameSpace : matchesLocalNameNS; + } + result.length = getElementsByTagNameNSFiltered.call(this, match, 0, result, ns || null, localName); + return result; + } + }; + scope.GetElementsByInterface = GetElementsByInterface; + scope.SelectorsInterface = SelectorsInterface; + scope.MatchesInterface = MatchesInterface; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var NodeList = scope.wrappers.NodeList; + function forwardElement(node) { + while (node && node.nodeType !== Node.ELEMENT_NODE) { + node = node.nextSibling; + } + return node; + } + function backwardsElement(node) { + while (node && node.nodeType !== Node.ELEMENT_NODE) { + node = node.previousSibling; + } + return node; + } + var ParentNodeInterface = { + get firstElementChild() { + return forwardElement(this.firstChild); + }, + get lastElementChild() { + return backwardsElement(this.lastChild); + }, + get childElementCount() { + var count = 0; + for (var child = this.firstElementChild; child; child = child.nextElementSibling) { + count++; + } + return count; + }, + get children() { + var wrapperList = new NodeList(); + var i = 0; + for (var child = this.firstElementChild; child; child = child.nextElementSibling) { + wrapperList[i++] = child; + } + wrapperList.length = i; + return wrapperList; + }, + remove: function() { + var p = this.parentNode; + if (p) p.removeChild(this); + } + }; + var ChildNodeInterface = { + get nextElementSibling() { + return forwardElement(this.nextSibling); + }, + get previousElementSibling() { + return backwardsElement(this.previousSibling); + } + }; + var NonElementParentNodeInterface = { + getElementById: function(id) { + if (/[ \t\n\r\f]/.test(id)) return null; + return this.querySelector('[id="' + id + '"]'); + } + }; + scope.ChildNodeInterface = ChildNodeInterface; + scope.NonElementParentNodeInterface = NonElementParentNodeInterface; + scope.ParentNodeInterface = ParentNodeInterface; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var ChildNodeInterface = scope.ChildNodeInterface; + var Node = scope.wrappers.Node; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var OriginalCharacterData = window.CharacterData; + function CharacterData(node) { + Node.call(this, node); + } + CharacterData.prototype = Object.create(Node.prototype); + mixin(CharacterData.prototype, { + get nodeValue() { + return this.data; + }, + set nodeValue(data) { + this.data = data; + }, + get textContent() { + return this.data; + }, + set textContent(value) { + this.data = value; + }, + get data() { + return unsafeUnwrap(this).data; + }, + set data(value) { + var oldValue = unsafeUnwrap(this).data; + enqueueMutation(this, "characterData", { + oldValue: oldValue + }); + unsafeUnwrap(this).data = value; + } + }); + mixin(CharacterData.prototype, ChildNodeInterface); + registerWrapper(OriginalCharacterData, CharacterData, document.createTextNode("")); + scope.wrappers.CharacterData = CharacterData; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var CharacterData = scope.wrappers.CharacterData; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + function toUInt32(x) { + return x >>> 0; + } + var OriginalText = window.Text; + function Text(node) { + CharacterData.call(this, node); + } + Text.prototype = Object.create(CharacterData.prototype); + mixin(Text.prototype, { + splitText: function(offset) { + offset = toUInt32(offset); + var s = this.data; + if (offset > s.length) throw new Error("IndexSizeError"); + var head = s.slice(0, offset); + var tail = s.slice(offset); + this.data = head; + var newTextNode = this.ownerDocument.createTextNode(tail); + if (this.parentNode) this.parentNode.insertBefore(newTextNode, this.nextSibling); + return newTextNode; + } + }); + registerWrapper(OriginalText, Text, document.createTextNode("")); + scope.wrappers.Text = Text; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + if (!window.DOMTokenList) { + console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH."); + return; + } + var unsafeUnwrap = scope.unsafeUnwrap; + var enqueueMutation = scope.enqueueMutation; + function getClass(el) { + return unsafeUnwrap(el).getAttribute("class"); + } + function enqueueClassAttributeChange(el, oldValue) { + enqueueMutation(el, "attributes", { + name: "class", + namespace: null, + oldValue: oldValue + }); + } + function invalidateClass(el) { + scope.invalidateRendererBasedOnAttribute(el, "class"); + } + function changeClass(tokenList, method, args) { + var ownerElement = tokenList.ownerElement_; + if (ownerElement == null) { + return method.apply(tokenList, args); + } + var oldValue = getClass(ownerElement); + var retv = method.apply(tokenList, args); + if (getClass(ownerElement) !== oldValue) { + enqueueClassAttributeChange(ownerElement, oldValue); + invalidateClass(ownerElement); + } + return retv; + } + var oldAdd = DOMTokenList.prototype.add; + DOMTokenList.prototype.add = function() { + changeClass(this, oldAdd, arguments); + }; + var oldRemove = DOMTokenList.prototype.remove; + DOMTokenList.prototype.remove = function() { + changeClass(this, oldRemove, arguments); + }; + var oldToggle = DOMTokenList.prototype.toggle; + DOMTokenList.prototype.toggle = function() { + return changeClass(this, oldToggle, arguments); + }; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var ChildNodeInterface = scope.ChildNodeInterface; + var GetElementsByInterface = scope.GetElementsByInterface; + var Node = scope.wrappers.Node; + var ParentNodeInterface = scope.ParentNodeInterface; + var SelectorsInterface = scope.SelectorsInterface; + var MatchesInterface = scope.MatchesInterface; + var addWrapNodeListMethod = scope.addWrapNodeListMethod; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var oneOf = scope.oneOf; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrappers = scope.wrappers; + var OriginalElement = window.Element; + var matchesNames = [ "matches", "mozMatchesSelector", "msMatchesSelector", "webkitMatchesSelector" ].filter(function(name) { + return OriginalElement.prototype[name]; + }); + var matchesName = matchesNames[0]; + var originalMatches = OriginalElement.prototype[matchesName]; + function invalidateRendererBasedOnAttribute(element, name) { + var p = element.parentNode; + if (!p || !p.shadowRoot) return; + var renderer = scope.getRendererForHost(p); + if (renderer.dependsOnAttribute(name)) renderer.invalidate(); + } + function enqueAttributeChange(element, name, oldValue) { + enqueueMutation(element, "attributes", { + name: name, + namespace: null, + oldValue: oldValue + }); + } + var classListTable = new WeakMap(); + function Element(node) { + Node.call(this, node); + } + Element.prototype = Object.create(Node.prototype); + mixin(Element.prototype, { + createShadowRoot: function() { + var newShadowRoot = new wrappers.ShadowRoot(this); + unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot; + var renderer = scope.getRendererForHost(this); + renderer.invalidate(); + return newShadowRoot; + }, + get shadowRoot() { + return unsafeUnwrap(this).polymerShadowRoot_ || null; + }, + setAttribute: function(name, value) { + var oldValue = unsafeUnwrap(this).getAttribute(name); + unsafeUnwrap(this).setAttribute(name, value); + enqueAttributeChange(this, name, oldValue); + invalidateRendererBasedOnAttribute(this, name); + }, + removeAttribute: function(name) { + var oldValue = unsafeUnwrap(this).getAttribute(name); + unsafeUnwrap(this).removeAttribute(name); + enqueAttributeChange(this, name, oldValue); + invalidateRendererBasedOnAttribute(this, name); + }, + get classList() { + var list = classListTable.get(this); + if (!list) { + list = unsafeUnwrap(this).classList; + if (!list) return; + list.ownerElement_ = this; + classListTable.set(this, list); + } + return list; + }, + get className() { + return unsafeUnwrap(this).className; + }, + set className(v) { + this.setAttribute("class", v); + }, + get id() { + return unsafeUnwrap(this).id; + }, + set id(v) { + this.setAttribute("id", v); + } + }); + matchesNames.forEach(function(name) { + if (name !== "matches") { + Element.prototype[name] = function(selector) { + return this.matches(selector); + }; + } + }); + if (OriginalElement.prototype.webkitCreateShadowRoot) { + Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot; + } + mixin(Element.prototype, ChildNodeInterface); + mixin(Element.prototype, GetElementsByInterface); + mixin(Element.prototype, ParentNodeInterface); + mixin(Element.prototype, SelectorsInterface); + mixin(Element.prototype, MatchesInterface); + registerWrapper(OriginalElement, Element, document.createElementNS(null, "x")); + scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute; + scope.matchesNames = matchesNames; + scope.originalMatches = originalMatches; + scope.wrappers.Element = Element; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var Element = scope.wrappers.Element; + var defineGetter = scope.defineGetter; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var nodesWereAdded = scope.nodesWereAdded; + var nodesWereRemoved = scope.nodesWereRemoved; + var registerWrapper = scope.registerWrapper; + var snapshotNodeList = scope.snapshotNodeList; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrappers = scope.wrappers; + var escapeAttrRegExp = /[&\u00A0"]/g; + var escapeDataRegExp = /[&\u00A0<>]/g; + function escapeReplace(c) { + switch (c) { + case "&": + return "&"; + + case "<": + return "<"; + + case ">": + return ">"; + + case '"': + return """; + + case " ": + return " "; + } + } + function escapeAttr(s) { + return s.replace(escapeAttrRegExp, escapeReplace); + } + function escapeData(s) { + return s.replace(escapeDataRegExp, escapeReplace); + } + function makeSet(arr) { + var set = {}; + for (var i = 0; i < arr.length; i++) { + set[arr[i]] = true; + } + return set; + } + var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]); + var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]); + var XHTML_NS = "http://www.w3.org/1999/xhtml"; + function needsSelfClosingSlash(node) { + if (node.namespaceURI !== XHTML_NS) return true; + var doctype = node.ownerDocument.doctype; + return doctype && doctype.publicId && doctype.systemId; + } + function getOuterHTML(node, parentNode) { + switch (node.nodeType) { + case Node.ELEMENT_NODE: + var tagName = node.tagName.toLowerCase(); + var s = "<" + tagName; + var attrs = node.attributes; + for (var i = 0, attr; attr = attrs[i]; i++) { + s += " " + attr.name + '="' + escapeAttr(attr.value) + '"'; + } + if (voidElements[tagName]) { + if (needsSelfClosingSlash(node)) s += "/"; + return s + ">"; + } + return s + ">" + getInnerHTML(node) + ""; + + case Node.TEXT_NODE: + var data = node.data; + if (parentNode && plaintextParents[parentNode.localName]) return data; + return escapeData(data); + + case Node.COMMENT_NODE: + return ""; + + default: + console.error(node); + throw new Error("not implemented"); + } + } + function getInnerHTML(node) { + if (node instanceof wrappers.HTMLTemplateElement) node = node.content; + var s = ""; + for (var child = node.firstChild; child; child = child.nextSibling) { + s += getOuterHTML(child, node); + } + return s; + } + function setInnerHTML(node, value, opt_tagName) { + var tagName = opt_tagName || "div"; + node.textContent = ""; + var tempElement = unwrap(node.ownerDocument.createElement(tagName)); + tempElement.innerHTML = value; + var firstChild; + while (firstChild = tempElement.firstChild) { + node.appendChild(wrap(firstChild)); + } + } + var oldIe = /MSIE/.test(navigator.userAgent); + var OriginalHTMLElement = window.HTMLElement; + var OriginalHTMLTemplateElement = window.HTMLTemplateElement; + function HTMLElement(node) { + Element.call(this, node); + } + HTMLElement.prototype = Object.create(Element.prototype); + mixin(HTMLElement.prototype, { + get innerHTML() { + return getInnerHTML(this); + }, + set innerHTML(value) { + if (oldIe && plaintextParents[this.localName]) { + this.textContent = value; + return; + } + var removedNodes = snapshotNodeList(this.childNodes); + if (this.invalidateShadowRenderer()) { + if (this instanceof wrappers.HTMLTemplateElement) setInnerHTML(this.content, value); else setInnerHTML(this, value, this.tagName); + } else if (!OriginalHTMLTemplateElement && this instanceof wrappers.HTMLTemplateElement) { + setInnerHTML(this.content, value); + } else { + unsafeUnwrap(this).innerHTML = value; + } + var addedNodes = snapshotNodeList(this.childNodes); + enqueueMutation(this, "childList", { + addedNodes: addedNodes, + removedNodes: removedNodes + }); + nodesWereRemoved(removedNodes); + nodesWereAdded(addedNodes, this); + }, + get outerHTML() { + return getOuterHTML(this, this.parentNode); + }, + set outerHTML(value) { + var p = this.parentNode; + if (p) { + p.invalidateShadowRenderer(); + var df = frag(p, value); + p.replaceChild(df, this); + } + }, + insertAdjacentHTML: function(position, text) { + var contextElement, refNode; + switch (String(position).toLowerCase()) { + case "beforebegin": + contextElement = this.parentNode; + refNode = this; + break; + + case "afterend": + contextElement = this.parentNode; + refNode = this.nextSibling; + break; + + case "afterbegin": + contextElement = this; + refNode = this.firstChild; + break; + + case "beforeend": + contextElement = this; + refNode = null; + break; + + default: + return; + } + var df = frag(contextElement, text); + contextElement.insertBefore(df, refNode); + }, + get hidden() { + return this.hasAttribute("hidden"); + }, + set hidden(v) { + if (v) { + this.setAttribute("hidden", ""); + } else { + this.removeAttribute("hidden"); + } + } + }); + function frag(contextElement, html) { + var p = unwrap(contextElement.cloneNode(false)); + p.innerHTML = html; + var df = unwrap(document.createDocumentFragment()); + var c; + while (c = p.firstChild) { + df.appendChild(c); + } + return wrap(df); + } + function getter(name) { + return function() { + scope.renderAllPending(); + return unsafeUnwrap(this)[name]; + }; + } + function getterRequiresRendering(name) { + defineGetter(HTMLElement, name, getter(name)); + } + [ "clientHeight", "clientLeft", "clientTop", "clientWidth", "offsetHeight", "offsetLeft", "offsetTop", "offsetWidth", "scrollHeight", "scrollWidth" ].forEach(getterRequiresRendering); + function getterAndSetterRequiresRendering(name) { + Object.defineProperty(HTMLElement.prototype, name, { + get: getter(name), + set: function(v) { + scope.renderAllPending(); + unsafeUnwrap(this)[name] = v; + }, + configurable: true, + enumerable: true + }); + } + [ "scrollLeft", "scrollTop" ].forEach(getterAndSetterRequiresRendering); + function methodRequiresRendering(name) { + Object.defineProperty(HTMLElement.prototype, name, { + value: function() { + scope.renderAllPending(); + return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments); + }, + configurable: true, + enumerable: true + }); + } + [ "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering); + registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b")); + scope.wrappers.HTMLElement = HTMLElement; + scope.getInnerHTML = getInnerHTML; + scope.setInnerHTML = setInnerHTML; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var OriginalHTMLCanvasElement = window.HTMLCanvasElement; + function HTMLCanvasElement(node) { + HTMLElement.call(this, node); + } + HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLCanvasElement.prototype, { + getContext: function() { + var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments); + return context && wrap(context); + } + }); + registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement, document.createElement("canvas")); + scope.wrappers.HTMLCanvasElement = HTMLCanvasElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLContentElement = window.HTMLContentElement; + function HTMLContentElement(node) { + HTMLElement.call(this, node); + } + HTMLContentElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLContentElement.prototype, { + constructor: HTMLContentElement, + get select() { + return this.getAttribute("select"); + }, + set select(value) { + this.setAttribute("select", value); + }, + setAttribute: function(n, v) { + HTMLElement.prototype.setAttribute.call(this, n, v); + if (String(n).toLowerCase() === "select") this.invalidateShadowRenderer(true); + } + }); + if (OriginalHTMLContentElement) registerWrapper(OriginalHTMLContentElement, HTMLContentElement); + scope.wrappers.HTMLContentElement = HTMLContentElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var unwrap = scope.unwrap; + var OriginalHTMLFormElement = window.HTMLFormElement; + function HTMLFormElement(node) { + HTMLElement.call(this, node); + } + HTMLFormElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLFormElement.prototype, { + get elements() { + return wrapHTMLCollection(unwrap(this).elements); + } + }); + registerWrapper(OriginalHTMLFormElement, HTMLFormElement, document.createElement("form")); + scope.wrappers.HTMLFormElement = HTMLFormElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var rewrap = scope.rewrap; + var OriginalHTMLImageElement = window.HTMLImageElement; + function HTMLImageElement(node) { + HTMLElement.call(this, node); + } + HTMLImageElement.prototype = Object.create(HTMLElement.prototype); + registerWrapper(OriginalHTMLImageElement, HTMLImageElement, document.createElement("img")); + function Image(width, height) { + if (!(this instanceof Image)) { + throw new TypeError("DOM object constructor cannot be called as a function."); + } + var node = unwrap(document.createElement("img")); + HTMLElement.call(this, node); + rewrap(node, this); + if (width !== undefined) node.width = width; + if (height !== undefined) node.height = height; + } + Image.prototype = HTMLImageElement.prototype; + scope.wrappers.HTMLImageElement = HTMLImageElement; + scope.wrappers.Image = Image; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var NodeList = scope.wrappers.NodeList; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLShadowElement = window.HTMLShadowElement; + function HTMLShadowElement(node) { + HTMLElement.call(this, node); + } + HTMLShadowElement.prototype = Object.create(HTMLElement.prototype); + HTMLShadowElement.prototype.constructor = HTMLShadowElement; + if (OriginalHTMLShadowElement) registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement); + scope.wrappers.HTMLShadowElement = HTMLShadowElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var contentTable = new WeakMap(); + var templateContentsOwnerTable = new WeakMap(); + function getTemplateContentsOwner(doc) { + if (!doc.defaultView) return doc; + var d = templateContentsOwnerTable.get(doc); + if (!d) { + d = doc.implementation.createHTMLDocument(""); + while (d.lastChild) { + d.removeChild(d.lastChild); + } + templateContentsOwnerTable.set(doc, d); + } + return d; + } + function extractContent(templateElement) { + var doc = getTemplateContentsOwner(templateElement.ownerDocument); + var df = unwrap(doc.createDocumentFragment()); + var child; + while (child = templateElement.firstChild) { + df.appendChild(child); + } + return df; + } + var OriginalHTMLTemplateElement = window.HTMLTemplateElement; + function HTMLTemplateElement(node) { + HTMLElement.call(this, node); + if (!OriginalHTMLTemplateElement) { + var content = extractContent(node); + contentTable.set(this, wrap(content)); + } + } + HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTemplateElement.prototype, { + constructor: HTMLTemplateElement, + get content() { + if (OriginalHTMLTemplateElement) return wrap(unsafeUnwrap(this).content); + return contentTable.get(this); + } + }); + if (OriginalHTMLTemplateElement) registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement); + scope.wrappers.HTMLTemplateElement = HTMLTemplateElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLMediaElement = window.HTMLMediaElement; + if (!OriginalHTMLMediaElement) return; + function HTMLMediaElement(node) { + HTMLElement.call(this, node); + } + HTMLMediaElement.prototype = Object.create(HTMLElement.prototype); + registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement, document.createElement("audio")); + scope.wrappers.HTMLMediaElement = HTMLMediaElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLMediaElement = scope.wrappers.HTMLMediaElement; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var rewrap = scope.rewrap; + var OriginalHTMLAudioElement = window.HTMLAudioElement; + if (!OriginalHTMLAudioElement) return; + function HTMLAudioElement(node) { + HTMLMediaElement.call(this, node); + } + HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype); + registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement, document.createElement("audio")); + function Audio(src) { + if (!(this instanceof Audio)) { + throw new TypeError("DOM object constructor cannot be called as a function."); + } + var node = unwrap(document.createElement("audio")); + HTMLMediaElement.call(this, node); + rewrap(node, this); + node.setAttribute("preload", "auto"); + if (src !== undefined) node.setAttribute("src", src); + } + Audio.prototype = HTMLAudioElement.prototype; + scope.wrappers.HTMLAudioElement = HTMLAudioElement; + scope.wrappers.Audio = Audio; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var rewrap = scope.rewrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLOptionElement = window.HTMLOptionElement; + function trimText(s) { + return s.replace(/\s+/g, " ").trim(); + } + function HTMLOptionElement(node) { + HTMLElement.call(this, node); + } + HTMLOptionElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLOptionElement.prototype, { + get text() { + return trimText(this.textContent); + }, + set text(value) { + this.textContent = trimText(String(value)); + }, + get form() { + return wrap(unwrap(this).form); + } + }); + registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement, document.createElement("option")); + function Option(text, value, defaultSelected, selected) { + if (!(this instanceof Option)) { + throw new TypeError("DOM object constructor cannot be called as a function."); + } + var node = unwrap(document.createElement("option")); + HTMLElement.call(this, node); + rewrap(node, this); + if (text !== undefined) node.text = text; + if (value !== undefined) node.setAttribute("value", value); + if (defaultSelected === true) node.setAttribute("selected", ""); + node.selected = selected === true; + } + Option.prototype = HTMLOptionElement.prototype; + scope.wrappers.HTMLOptionElement = HTMLOptionElement; + scope.wrappers.Option = Option; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLSelectElement = window.HTMLSelectElement; + function HTMLSelectElement(node) { + HTMLElement.call(this, node); + } + HTMLSelectElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLSelectElement.prototype, { + add: function(element, before) { + if (typeof before === "object") before = unwrap(before); + unwrap(this).add(unwrap(element), before); + }, + remove: function(indexOrNode) { + if (indexOrNode === undefined) { + HTMLElement.prototype.remove.call(this); + return; + } + if (typeof indexOrNode === "object") indexOrNode = unwrap(indexOrNode); + unwrap(this).remove(indexOrNode); + }, + get form() { + return wrap(unwrap(this).form); + } + }); + registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement, document.createElement("select")); + scope.wrappers.HTMLSelectElement = HTMLSelectElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var OriginalHTMLTableElement = window.HTMLTableElement; + function HTMLTableElement(node) { + HTMLElement.call(this, node); + } + HTMLTableElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTableElement.prototype, { + get caption() { + return wrap(unwrap(this).caption); + }, + createCaption: function() { + return wrap(unwrap(this).createCaption()); + }, + get tHead() { + return wrap(unwrap(this).tHead); + }, + createTHead: function() { + return wrap(unwrap(this).createTHead()); + }, + createTFoot: function() { + return wrap(unwrap(this).createTFoot()); + }, + get tFoot() { + return wrap(unwrap(this).tFoot); + }, + get tBodies() { + return wrapHTMLCollection(unwrap(this).tBodies); + }, + createTBody: function() { + return wrap(unwrap(this).createTBody()); + }, + get rows() { + return wrapHTMLCollection(unwrap(this).rows); + }, + insertRow: function(index) { + return wrap(unwrap(this).insertRow(index)); + } + }); + registerWrapper(OriginalHTMLTableElement, HTMLTableElement, document.createElement("table")); + scope.wrappers.HTMLTableElement = HTMLTableElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement; + function HTMLTableSectionElement(node) { + HTMLElement.call(this, node); + } + HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTableSectionElement.prototype, { + constructor: HTMLTableSectionElement, + get rows() { + return wrapHTMLCollection(unwrap(this).rows); + }, + insertRow: function(index) { + return wrap(unwrap(this).insertRow(index)); + } + }); + registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement, document.createElement("thead")); + scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLTableRowElement = window.HTMLTableRowElement; + function HTMLTableRowElement(node) { + HTMLElement.call(this, node); + } + HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTableRowElement.prototype, { + get cells() { + return wrapHTMLCollection(unwrap(this).cells); + }, + insertCell: function(index) { + return wrap(unwrap(this).insertCell(index)); + } + }); + registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement, document.createElement("tr")); + scope.wrappers.HTMLTableRowElement = HTMLTableRowElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLContentElement = scope.wrappers.HTMLContentElement; + var HTMLElement = scope.wrappers.HTMLElement; + var HTMLShadowElement = scope.wrappers.HTMLShadowElement; + var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLUnknownElement = window.HTMLUnknownElement; + function HTMLUnknownElement(node) { + switch (node.localName) { + case "content": + return new HTMLContentElement(node); + + case "shadow": + return new HTMLShadowElement(node); + + case "template": + return new HTMLTemplateElement(node); + } + HTMLElement.call(this, node); + } + HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype); + registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement); + scope.wrappers.HTMLUnknownElement = HTMLUnknownElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var Element = scope.wrappers.Element; + var HTMLElement = scope.wrappers.HTMLElement; + var registerObject = scope.registerObject; + var defineWrapGetter = scope.defineWrapGetter; + var SVG_NS = "http://www.w3.org/2000/svg"; + var svgTitleElement = document.createElementNS(SVG_NS, "title"); + var SVGTitleElement = registerObject(svgTitleElement); + var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor; + if (!("classList" in svgTitleElement)) { + var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList"); + Object.defineProperty(HTMLElement.prototype, "classList", descr); + delete Element.prototype.classList; + } + defineWrapGetter(SVGElement, "ownerSVGElement"); + scope.wrappers.SVGElement = SVGElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalSVGUseElement = window.SVGUseElement; + var SVG_NS = "http://www.w3.org/2000/svg"; + var gWrapper = wrap(document.createElementNS(SVG_NS, "g")); + var useElement = document.createElementNS(SVG_NS, "use"); + var SVGGElement = gWrapper.constructor; + var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype); + var parentInterface = parentInterfacePrototype.constructor; + function SVGUseElement(impl) { + parentInterface.call(this, impl); + } + SVGUseElement.prototype = Object.create(parentInterfacePrototype); + if ("instanceRoot" in useElement) { + mixin(SVGUseElement.prototype, { + get instanceRoot() { + return wrap(unwrap(this).instanceRoot); + }, + get animatedInstanceRoot() { + return wrap(unwrap(this).animatedInstanceRoot); + } + }); + } + registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement); + scope.wrappers.SVGUseElement = SVGUseElement; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var EventTarget = scope.wrappers.EventTarget; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var OriginalSVGElementInstance = window.SVGElementInstance; + if (!OriginalSVGElementInstance) return; + function SVGElementInstance(impl) { + EventTarget.call(this, impl); + } + SVGElementInstance.prototype = Object.create(EventTarget.prototype); + mixin(SVGElementInstance.prototype, { + get correspondingElement() { + return wrap(unsafeUnwrap(this).correspondingElement); + }, + get correspondingUseElement() { + return wrap(unsafeUnwrap(this).correspondingUseElement); + }, + get parentNode() { + return wrap(unsafeUnwrap(this).parentNode); + }, + get childNodes() { + throw new Error("Not implemented"); + }, + get firstChild() { + return wrap(unsafeUnwrap(this).firstChild); + }, + get lastChild() { + return wrap(unsafeUnwrap(this).lastChild); + }, + get previousSibling() { + return wrap(unsafeUnwrap(this).previousSibling); + }, + get nextSibling() { + return wrap(unsafeUnwrap(this).nextSibling); + } + }); + registerWrapper(OriginalSVGElementInstance, SVGElementInstance); + scope.wrappers.SVGElementInstance = SVGElementInstance; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D; + function CanvasRenderingContext2D(impl) { + setWrapper(impl, this); + } + mixin(CanvasRenderingContext2D.prototype, { + get canvas() { + return wrap(unsafeUnwrap(this).canvas); + }, + drawImage: function() { + arguments[0] = unwrapIfNeeded(arguments[0]); + unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments); + }, + createPattern: function() { + arguments[0] = unwrap(arguments[0]); + return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments); + } + }); + registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D, document.createElement("canvas").getContext("2d")); + scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalWebGLRenderingContext = window.WebGLRenderingContext; + if (!OriginalWebGLRenderingContext) return; + function WebGLRenderingContext(impl) { + setWrapper(impl, this); + } + mixin(WebGLRenderingContext.prototype, { + get canvas() { + return wrap(unsafeUnwrap(this).canvas); + }, + texImage2D: function() { + arguments[5] = unwrapIfNeeded(arguments[5]); + unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments); + }, + texSubImage2D: function() { + arguments[6] = unwrapIfNeeded(arguments[6]); + unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments); + } + }); + var instanceProperties = /WebKit/.test(navigator.userAgent) ? { + drawingBufferHeight: null, + drawingBufferWidth: null + } : {}; + registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties); + scope.wrappers.WebGLRenderingContext = WebGLRenderingContext; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var GetElementsByInterface = scope.GetElementsByInterface; + var NonElementParentNodeInterface = scope.NonElementParentNodeInterface; + var ParentNodeInterface = scope.ParentNodeInterface; + var SelectorsInterface = scope.SelectorsInterface; + var mixin = scope.mixin; + var registerObject = scope.registerObject; + var DocumentFragment = registerObject(document.createDocumentFragment()); + mixin(DocumentFragment.prototype, ParentNodeInterface); + mixin(DocumentFragment.prototype, SelectorsInterface); + mixin(DocumentFragment.prototype, GetElementsByInterface); + mixin(DocumentFragment.prototype, NonElementParentNodeInterface); + var Comment = registerObject(document.createComment("")); + scope.wrappers.Comment = Comment; + scope.wrappers.DocumentFragment = DocumentFragment; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var DocumentFragment = scope.wrappers.DocumentFragment; + var TreeScope = scope.TreeScope; + var elementFromPoint = scope.elementFromPoint; + var getInnerHTML = scope.getInnerHTML; + var getTreeScope = scope.getTreeScope; + var mixin = scope.mixin; + var rewrap = scope.rewrap; + var setInnerHTML = scope.setInnerHTML; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var shadowHostTable = new WeakMap(); + var nextOlderShadowTreeTable = new WeakMap(); + function ShadowRoot(hostWrapper) { + var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment()); + DocumentFragment.call(this, node); + rewrap(node, this); + var oldShadowRoot = hostWrapper.shadowRoot; + nextOlderShadowTreeTable.set(this, oldShadowRoot); + this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper)); + shadowHostTable.set(this, hostWrapper); + } + ShadowRoot.prototype = Object.create(DocumentFragment.prototype); + mixin(ShadowRoot.prototype, { + constructor: ShadowRoot, + get innerHTML() { + return getInnerHTML(this); + }, + set innerHTML(value) { + setInnerHTML(this, value); + this.invalidateShadowRenderer(); + }, + get olderShadowRoot() { + return nextOlderShadowTreeTable.get(this) || null; + }, + get host() { + return shadowHostTable.get(this) || null; + }, + invalidateShadowRenderer: function() { + return shadowHostTable.get(this).invalidateShadowRenderer(); + }, + elementFromPoint: function(x, y) { + return elementFromPoint(this, this.ownerDocument, x, y); + } + }); + scope.wrappers.ShadowRoot = ShadowRoot; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var getTreeScope = scope.getTreeScope; + var OriginalRange = window.Range; + var ShadowRoot = scope.wrappers.ShadowRoot; + function getHost(node) { + var root = getTreeScope(node).root; + if (root instanceof ShadowRoot) { + return root.host; + } + return null; + } + function hostNodeToShadowNode(refNode, offset) { + if (refNode.shadowRoot) { + offset = Math.min(refNode.childNodes.length - 1, offset); + var child = refNode.childNodes[offset]; + if (child) { + var insertionPoint = scope.getDestinationInsertionPoints(child); + if (insertionPoint.length > 0) { + var parentNode = insertionPoint[0].parentNode; + if (parentNode.nodeType == Node.ELEMENT_NODE) { + refNode = parentNode; + } + } + } + } + return refNode; + } + function shadowNodeToHostNode(node) { + node = wrap(node); + return getHost(node) || node; + } + function Range(impl) { + setWrapper(impl, this); + } + Range.prototype = { + get startContainer() { + return shadowNodeToHostNode(unsafeUnwrap(this).startContainer); + }, + get endContainer() { + return shadowNodeToHostNode(unsafeUnwrap(this).endContainer); + }, + get commonAncestorContainer() { + return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer); + }, + setStart: function(refNode, offset) { + refNode = hostNodeToShadowNode(refNode, offset); + unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset); + }, + setEnd: function(refNode, offset) { + refNode = hostNodeToShadowNode(refNode, offset); + unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset); + }, + setStartBefore: function(refNode) { + unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode)); + }, + setStartAfter: function(refNode) { + unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode)); + }, + setEndBefore: function(refNode) { + unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode)); + }, + setEndAfter: function(refNode) { + unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode)); + }, + selectNode: function(refNode) { + unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode)); + }, + selectNodeContents: function(refNode) { + unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode)); + }, + compareBoundaryPoints: function(how, sourceRange) { + return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange)); + }, + extractContents: function() { + return wrap(unsafeUnwrap(this).extractContents()); + }, + cloneContents: function() { + return wrap(unsafeUnwrap(this).cloneContents()); + }, + insertNode: function(node) { + unsafeUnwrap(this).insertNode(unwrapIfNeeded(node)); + }, + surroundContents: function(newParent) { + unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent)); + }, + cloneRange: function() { + return wrap(unsafeUnwrap(this).cloneRange()); + }, + isPointInRange: function(node, offset) { + return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset); + }, + comparePoint: function(node, offset) { + return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset); + }, + intersectsNode: function(node) { + return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node)); + }, + toString: function() { + return unsafeUnwrap(this).toString(); + } + }; + if (OriginalRange.prototype.createContextualFragment) { + Range.prototype.createContextualFragment = function(html) { + return wrap(unsafeUnwrap(this).createContextualFragment(html)); + }; + } + registerWrapper(window.Range, Range, document.createRange()); + scope.wrappers.Range = Range; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var Element = scope.wrappers.Element; + var HTMLContentElement = scope.wrappers.HTMLContentElement; + var HTMLShadowElement = scope.wrappers.HTMLShadowElement; + var Node = scope.wrappers.Node; + var ShadowRoot = scope.wrappers.ShadowRoot; + var assert = scope.assert; + var getTreeScope = scope.getTreeScope; + var mixin = scope.mixin; + var oneOf = scope.oneOf; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var ArraySplice = scope.ArraySplice; + function updateWrapperUpAndSideways(wrapper) { + wrapper.previousSibling_ = wrapper.previousSibling; + wrapper.nextSibling_ = wrapper.nextSibling; + wrapper.parentNode_ = wrapper.parentNode; + } + function updateWrapperDown(wrapper) { + wrapper.firstChild_ = wrapper.firstChild; + wrapper.lastChild_ = wrapper.lastChild; + } + function updateAllChildNodes(parentNodeWrapper) { + assert(parentNodeWrapper instanceof Node); + for (var childWrapper = parentNodeWrapper.firstChild; childWrapper; childWrapper = childWrapper.nextSibling) { + updateWrapperUpAndSideways(childWrapper); + } + updateWrapperDown(parentNodeWrapper); + } + function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) { + var parentNode = unwrap(parentNodeWrapper); + var newChild = unwrap(newChildWrapper); + var refChild = refChildWrapper ? unwrap(refChildWrapper) : null; + remove(newChildWrapper); + updateWrapperUpAndSideways(newChildWrapper); + if (!refChildWrapper) { + parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild; + if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild) parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild; + var lastChildWrapper = wrap(parentNode.lastChild); + if (lastChildWrapper) lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling; + } else { + if (parentNodeWrapper.firstChild === refChildWrapper) parentNodeWrapper.firstChild_ = refChildWrapper; + refChildWrapper.previousSibling_ = refChildWrapper.previousSibling; + } + scope.originalInsertBefore.call(parentNode, newChild, refChild); + } + function remove(nodeWrapper) { + var node = unwrap(nodeWrapper); + var parentNode = node.parentNode; + if (!parentNode) return; + var parentNodeWrapper = wrap(parentNode); + updateWrapperUpAndSideways(nodeWrapper); + if (nodeWrapper.previousSibling) nodeWrapper.previousSibling.nextSibling_ = nodeWrapper; + if (nodeWrapper.nextSibling) nodeWrapper.nextSibling.previousSibling_ = nodeWrapper; + if (parentNodeWrapper.lastChild === nodeWrapper) parentNodeWrapper.lastChild_ = nodeWrapper; + if (parentNodeWrapper.firstChild === nodeWrapper) parentNodeWrapper.firstChild_ = nodeWrapper; + scope.originalRemoveChild.call(parentNode, node); + } + var distributedNodesTable = new WeakMap(); + var destinationInsertionPointsTable = new WeakMap(); + var rendererForHostTable = new WeakMap(); + function resetDistributedNodes(insertionPoint) { + distributedNodesTable.set(insertionPoint, []); + } + function getDistributedNodes(insertionPoint) { + var rv = distributedNodesTable.get(insertionPoint); + if (!rv) distributedNodesTable.set(insertionPoint, rv = []); + return rv; + } + function getChildNodesSnapshot(node) { + var result = [], i = 0; + for (var child = node.firstChild; child; child = child.nextSibling) { + result[i++] = child; + } + return result; + } + var request = oneOf(window, [ "requestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame", "setTimeout" ]); + var pendingDirtyRenderers = []; + var renderTimer; + function renderAllPending() { + for (var i = 0; i < pendingDirtyRenderers.length; i++) { + var renderer = pendingDirtyRenderers[i]; + var parentRenderer = renderer.parentRenderer; + if (parentRenderer && parentRenderer.dirty) continue; + renderer.render(); + } + pendingDirtyRenderers = []; + } + function handleRequestAnimationFrame() { + renderTimer = null; + renderAllPending(); + } + function getRendererForHost(host) { + var renderer = rendererForHostTable.get(host); + if (!renderer) { + renderer = new ShadowRenderer(host); + rendererForHostTable.set(host, renderer); + } + return renderer; + } + function getShadowRootAncestor(node) { + var root = getTreeScope(node).root; + if (root instanceof ShadowRoot) return root; + return null; + } + function getRendererForShadowRoot(shadowRoot) { + return getRendererForHost(shadowRoot.host); + } + var spliceDiff = new ArraySplice(); + spliceDiff.equals = function(renderNode, rawNode) { + return unwrap(renderNode.node) === rawNode; + }; + function RenderNode(node) { + this.skip = false; + this.node = node; + this.childNodes = []; + } + RenderNode.prototype = { + append: function(node) { + var rv = new RenderNode(node); + this.childNodes.push(rv); + return rv; + }, + sync: function(opt_added) { + if (this.skip) return; + var nodeWrapper = this.node; + var newChildren = this.childNodes; + var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper)); + var added = opt_added || new WeakMap(); + var splices = spliceDiff.calculateSplices(newChildren, oldChildren); + var newIndex = 0, oldIndex = 0; + var lastIndex = 0; + for (var i = 0; i < splices.length; i++) { + var splice = splices[i]; + for (;lastIndex < splice.index; lastIndex++) { + oldIndex++; + newChildren[newIndex++].sync(added); + } + var removedCount = splice.removed.length; + for (var j = 0; j < removedCount; j++) { + var wrapper = wrap(oldChildren[oldIndex++]); + if (!added.get(wrapper)) remove(wrapper); + } + var addedCount = splice.addedCount; + var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]); + for (var j = 0; j < addedCount; j++) { + var newChildRenderNode = newChildren[newIndex++]; + var newChildWrapper = newChildRenderNode.node; + insertBefore(nodeWrapper, newChildWrapper, refNode); + added.set(newChildWrapper, true); + newChildRenderNode.sync(added); + } + lastIndex += addedCount; + } + for (var i = lastIndex; i < newChildren.length; i++) { + newChildren[i].sync(added); + } + } + }; + function ShadowRenderer(host) { + this.host = host; + this.dirty = false; + this.invalidateAttributes(); + this.associateNode(host); + } + ShadowRenderer.prototype = { + render: function(opt_renderNode) { + if (!this.dirty) return; + this.invalidateAttributes(); + var host = this.host; + this.distribution(host); + var renderNode = opt_renderNode || new RenderNode(host); + this.buildRenderTree(renderNode, host); + var topMostRenderer = !opt_renderNode; + if (topMostRenderer) renderNode.sync(); + this.dirty = false; + }, + get parentRenderer() { + return getTreeScope(this.host).renderer; + }, + invalidate: function() { + if (!this.dirty) { + this.dirty = true; + var parentRenderer = this.parentRenderer; + if (parentRenderer) parentRenderer.invalidate(); + pendingDirtyRenderers.push(this); + if (renderTimer) return; + renderTimer = window[request](handleRequestAnimationFrame, 0); + } + }, + distribution: function(root) { + this.resetAllSubtrees(root); + this.distributionResolution(root); + }, + resetAll: function(node) { + if (isInsertionPoint(node)) resetDistributedNodes(node); else resetDestinationInsertionPoints(node); + this.resetAllSubtrees(node); + }, + resetAllSubtrees: function(node) { + for (var child = node.firstChild; child; child = child.nextSibling) { + this.resetAll(child); + } + if (node.shadowRoot) this.resetAll(node.shadowRoot); + if (node.olderShadowRoot) this.resetAll(node.olderShadowRoot); + }, + distributionResolution: function(node) { + if (isShadowHost(node)) { + var shadowHost = node; + var pool = poolPopulation(shadowHost); + var shadowTrees = getShadowTrees(shadowHost); + for (var i = 0; i < shadowTrees.length; i++) { + this.poolDistribution(shadowTrees[i], pool); + } + for (var i = shadowTrees.length - 1; i >= 0; i--) { + var shadowTree = shadowTrees[i]; + var shadow = getShadowInsertionPoint(shadowTree); + if (shadow) { + var olderShadowRoot = shadowTree.olderShadowRoot; + if (olderShadowRoot) { + pool = poolPopulation(olderShadowRoot); + } + for (var j = 0; j < pool.length; j++) { + destributeNodeInto(pool[j], shadow); + } + } + this.distributionResolution(shadowTree); + } + } + for (var child = node.firstChild; child; child = child.nextSibling) { + this.distributionResolution(child); + } + }, + poolDistribution: function(node, pool) { + if (node instanceof HTMLShadowElement) return; + if (node instanceof HTMLContentElement) { + var content = node; + this.updateDependentAttributes(content.getAttribute("select")); + var anyDistributed = false; + for (var i = 0; i < pool.length; i++) { + var node = pool[i]; + if (!node) continue; + if (matches(node, content)) { + destributeNodeInto(node, content); + pool[i] = undefined; + anyDistributed = true; + } + } + if (!anyDistributed) { + for (var child = content.firstChild; child; child = child.nextSibling) { + destributeNodeInto(child, content); + } + } + return; + } + for (var child = node.firstChild; child; child = child.nextSibling) { + this.poolDistribution(child, pool); + } + }, + buildRenderTree: function(renderNode, node) { + var children = this.compose(node); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + var childRenderNode = renderNode.append(child); + this.buildRenderTree(childRenderNode, child); + } + if (isShadowHost(node)) { + var renderer = getRendererForHost(node); + renderer.dirty = false; + } + }, + compose: function(node) { + var children = []; + var p = node.shadowRoot || node; + for (var child = p.firstChild; child; child = child.nextSibling) { + if (isInsertionPoint(child)) { + this.associateNode(p); + var distributedNodes = getDistributedNodes(child); + for (var j = 0; j < distributedNodes.length; j++) { + var distributedNode = distributedNodes[j]; + if (isFinalDestination(child, distributedNode)) children.push(distributedNode); + } + } else { + children.push(child); + } + } + return children; + }, + invalidateAttributes: function() { + this.attributes = Object.create(null); + }, + updateDependentAttributes: function(selector) { + if (!selector) return; + var attributes = this.attributes; + if (/\.\w+/.test(selector)) attributes["class"] = true; + if (/#\w+/.test(selector)) attributes["id"] = true; + selector.replace(/\[\s*([^\s=\|~\]]+)/g, function(_, name) { + attributes[name] = true; + }); + }, + dependsOnAttribute: function(name) { + return this.attributes[name]; + }, + associateNode: function(node) { + unsafeUnwrap(node).polymerShadowRenderer_ = this; + } + }; + function poolPopulation(node) { + var pool = []; + for (var child = node.firstChild; child; child = child.nextSibling) { + if (isInsertionPoint(child)) { + pool.push.apply(pool, getDistributedNodes(child)); + } else { + pool.push(child); + } + } + return pool; + } + function getShadowInsertionPoint(node) { + if (node instanceof HTMLShadowElement) return node; + if (node instanceof HTMLContentElement) return null; + for (var child = node.firstChild; child; child = child.nextSibling) { + var res = getShadowInsertionPoint(child); + if (res) return res; + } + return null; + } + function destributeNodeInto(child, insertionPoint) { + getDistributedNodes(insertionPoint).push(child); + var points = destinationInsertionPointsTable.get(child); + if (!points) destinationInsertionPointsTable.set(child, [ insertionPoint ]); else points.push(insertionPoint); + } + function getDestinationInsertionPoints(node) { + return destinationInsertionPointsTable.get(node); + } + function resetDestinationInsertionPoints(node) { + destinationInsertionPointsTable.set(node, undefined); + } + var selectorStartCharRe = /^(:not\()?[*.#[a-zA-Z_|]/; + function matches(node, contentElement) { + var select = contentElement.getAttribute("select"); + if (!select) return true; + select = select.trim(); + if (!select) return true; + if (!(node instanceof Element)) return false; + if (!selectorStartCharRe.test(select)) return false; + try { + return node.matches(select); + } catch (ex) { + return false; + } + } + function isFinalDestination(insertionPoint, node) { + var points = getDestinationInsertionPoints(node); + return points && points[points.length - 1] === insertionPoint; + } + function isInsertionPoint(node) { + return node instanceof HTMLContentElement || node instanceof HTMLShadowElement; + } + function isShadowHost(shadowHost) { + return shadowHost.shadowRoot; + } + function getShadowTrees(host) { + var trees = []; + for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) { + trees.push(tree); + } + return trees; + } + function render(host) { + new ShadowRenderer(host).render(); + } + Node.prototype.invalidateShadowRenderer = function(force) { + var renderer = unsafeUnwrap(this).polymerShadowRenderer_; + if (renderer) { + renderer.invalidate(); + return true; + } + return false; + }; + HTMLContentElement.prototype.getDistributedNodes = HTMLShadowElement.prototype.getDistributedNodes = function() { + renderAllPending(); + return getDistributedNodes(this); + }; + Element.prototype.getDestinationInsertionPoints = function() { + renderAllPending(); + return getDestinationInsertionPoints(this) || []; + }; + HTMLContentElement.prototype.nodeIsInserted_ = HTMLShadowElement.prototype.nodeIsInserted_ = function() { + this.invalidateShadowRenderer(); + var shadowRoot = getShadowRootAncestor(this); + var renderer; + if (shadowRoot) renderer = getRendererForShadowRoot(shadowRoot); + unsafeUnwrap(this).polymerShadowRenderer_ = renderer; + if (renderer) renderer.invalidate(); + }; + scope.getRendererForHost = getRendererForHost; + scope.getShadowTrees = getShadowTrees; + scope.renderAllPending = renderAllPending; + scope.getDestinationInsertionPoints = getDestinationInsertionPoints; + scope.visual = { + insertBefore: insertBefore, + remove: remove + }; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var assert = scope.assert; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var elementsWithFormProperty = [ "HTMLButtonElement", "HTMLFieldSetElement", "HTMLInputElement", "HTMLKeygenElement", "HTMLLabelElement", "HTMLLegendElement", "HTMLObjectElement", "HTMLOutputElement", "HTMLTextAreaElement" ]; + function createWrapperConstructor(name) { + if (!window[name]) return; + assert(!scope.wrappers[name]); + var GeneratedWrapper = function(node) { + HTMLElement.call(this, node); + }; + GeneratedWrapper.prototype = Object.create(HTMLElement.prototype); + mixin(GeneratedWrapper.prototype, { + get form() { + return wrap(unwrap(this).form); + } + }); + registerWrapper(window[name], GeneratedWrapper, document.createElement(name.slice(4, -7))); + scope.wrappers[name] = GeneratedWrapper; + } + elementsWithFormProperty.forEach(createWrapperConstructor); +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalSelection = window.Selection; + function Selection(impl) { + setWrapper(impl, this); + } + Selection.prototype = { + get anchorNode() { + return wrap(unsafeUnwrap(this).anchorNode); + }, + get focusNode() { + return wrap(unsafeUnwrap(this).focusNode); + }, + addRange: function(range) { + unsafeUnwrap(this).addRange(unwrapIfNeeded(range)); + }, + collapse: function(node, index) { + unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index); + }, + containsNode: function(node, allowPartial) { + return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial); + }, + getRangeAt: function(index) { + return wrap(unsafeUnwrap(this).getRangeAt(index)); + }, + removeRange: function(range) { + unsafeUnwrap(this).removeRange(unwrap(range)); + }, + selectAllChildren: function(node) { + unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node)); + }, + toString: function() { + return unsafeUnwrap(this).toString(); + } + }; + if (OriginalSelection.prototype.extend) { + Selection.prototype.extend = function(node, offset) { + unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset); + }; + } + registerWrapper(window.Selection, Selection, window.getSelection()); + scope.wrappers.Selection = Selection; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalTreeWalker = window.TreeWalker; + function TreeWalker(impl) { + setWrapper(impl, this); + } + TreeWalker.prototype = { + get root() { + return wrap(unsafeUnwrap(this).root); + }, + get currentNode() { + return wrap(unsafeUnwrap(this).currentNode); + }, + set currentNode(node) { + unsafeUnwrap(this).currentNode = unwrapIfNeeded(node); + }, + get filter() { + return unsafeUnwrap(this).filter; + }, + parentNode: function() { + return wrap(unsafeUnwrap(this).parentNode()); + }, + firstChild: function() { + return wrap(unsafeUnwrap(this).firstChild()); + }, + lastChild: function() { + return wrap(unsafeUnwrap(this).lastChild()); + }, + previousSibling: function() { + return wrap(unsafeUnwrap(this).previousSibling()); + }, + previousNode: function() { + return wrap(unsafeUnwrap(this).previousNode()); + }, + nextNode: function() { + return wrap(unsafeUnwrap(this).nextNode()); + } + }; + registerWrapper(OriginalTreeWalker, TreeWalker); + scope.wrappers.TreeWalker = TreeWalker; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var GetElementsByInterface = scope.GetElementsByInterface; + var Node = scope.wrappers.Node; + var ParentNodeInterface = scope.ParentNodeInterface; + var NonElementParentNodeInterface = scope.NonElementParentNodeInterface; + var Selection = scope.wrappers.Selection; + var SelectorsInterface = scope.SelectorsInterface; + var ShadowRoot = scope.wrappers.ShadowRoot; + var TreeScope = scope.TreeScope; + var cloneNode = scope.cloneNode; + var defineWrapGetter = scope.defineWrapGetter; + var elementFromPoint = scope.elementFromPoint; + var forwardMethodsToWrapper = scope.forwardMethodsToWrapper; + var matchesNames = scope.matchesNames; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var renderAllPending = scope.renderAllPending; + var rewrap = scope.rewrap; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrapEventTargetMethods = scope.wrapEventTargetMethods; + var wrapNodeList = scope.wrapNodeList; + var implementationTable = new WeakMap(); + function Document(node) { + Node.call(this, node); + this.treeScope_ = new TreeScope(this, null); + } + Document.prototype = Object.create(Node.prototype); + defineWrapGetter(Document, "documentElement"); + defineWrapGetter(Document, "body"); + defineWrapGetter(Document, "head"); + function wrapMethod(name) { + var original = document[name]; + Document.prototype[name] = function() { + return wrap(original.apply(unsafeUnwrap(this), arguments)); + }; + } + [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode" ].forEach(wrapMethod); + var originalAdoptNode = document.adoptNode; + function adoptNodeNoRemove(node, doc) { + originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node)); + adoptSubtree(node, doc); + } + function adoptSubtree(node, doc) { + if (node.shadowRoot) doc.adoptNode(node.shadowRoot); + if (node instanceof ShadowRoot) adoptOlderShadowRoots(node, doc); + for (var child = node.firstChild; child; child = child.nextSibling) { + adoptSubtree(child, doc); + } + } + function adoptOlderShadowRoots(shadowRoot, doc) { + var oldShadowRoot = shadowRoot.olderShadowRoot; + if (oldShadowRoot) doc.adoptNode(oldShadowRoot); + } + var originalGetSelection = document.getSelection; + mixin(Document.prototype, { + adoptNode: function(node) { + if (node.parentNode) node.parentNode.removeChild(node); + adoptNodeNoRemove(node, this); + return node; + }, + elementFromPoint: function(x, y) { + return elementFromPoint(this, this, x, y); + }, + importNode: function(node, deep) { + return cloneNode(node, deep, unsafeUnwrap(this)); + }, + getSelection: function() { + renderAllPending(); + return new Selection(originalGetSelection.call(unwrap(this))); + }, + getElementsByName: function(name) { + return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]"); + } + }); + var originalCreateTreeWalker = document.createTreeWalker; + var TreeWalkerWrapper = scope.wrappers.TreeWalker; + Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) { + var newFilter = null; + if (filter) { + if (filter.acceptNode && typeof filter.acceptNode === "function") { + newFilter = { + acceptNode: function(node) { + return filter.acceptNode(wrap(node)); + } + }; + } else if (typeof filter === "function") { + newFilter = function(node) { + return filter(wrap(node)); + }; + } + } + return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences)); + }; + if (document.registerElement) { + var originalRegisterElement = document.registerElement; + Document.prototype.registerElement = function(tagName, object) { + var prototype, extendsOption; + if (object !== undefined) { + prototype = object.prototype; + extendsOption = object.extends; + } + if (!prototype) prototype = Object.create(HTMLElement.prototype); + if (scope.nativePrototypeTable.get(prototype)) { + throw new Error("NotSupportedError"); + } + var proto = Object.getPrototypeOf(prototype); + var nativePrototype; + var prototypes = []; + while (proto) { + nativePrototype = scope.nativePrototypeTable.get(proto); + if (nativePrototype) break; + prototypes.push(proto); + proto = Object.getPrototypeOf(proto); + } + if (!nativePrototype) { + throw new Error("NotSupportedError"); + } + var newPrototype = Object.create(nativePrototype); + for (var i = prototypes.length - 1; i >= 0; i--) { + newPrototype = Object.create(newPrototype); + } + [ "createdCallback", "attachedCallback", "detachedCallback", "attributeChangedCallback" ].forEach(function(name) { + var f = prototype[name]; + if (!f) return; + newPrototype[name] = function() { + if (!(wrap(this) instanceof CustomElementConstructor)) { + rewrap(this); + } + f.apply(wrap(this), arguments); + }; + }); + var p = { + prototype: newPrototype + }; + if (extendsOption) p.extends = extendsOption; + function CustomElementConstructor(node) { + if (!node) { + if (extendsOption) { + return document.createElement(extendsOption, tagName); + } else { + return document.createElement(tagName); + } + } + setWrapper(node, this); + } + CustomElementConstructor.prototype = prototype; + CustomElementConstructor.prototype.constructor = CustomElementConstructor; + scope.constructorTable.set(newPrototype, CustomElementConstructor); + scope.nativePrototypeTable.set(prototype, newPrototype); + var nativeConstructor = originalRegisterElement.call(unwrap(this), tagName, p); + return CustomElementConstructor; + }; + forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]); + } + forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]); + forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames); + forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]); + mixin(Document.prototype, GetElementsByInterface); + mixin(Document.prototype, ParentNodeInterface); + mixin(Document.prototype, SelectorsInterface); + mixin(Document.prototype, NonElementParentNodeInterface); + mixin(Document.prototype, { + get implementation() { + var implementation = implementationTable.get(this); + if (implementation) return implementation; + implementation = new DOMImplementation(unwrap(this).implementation); + implementationTable.set(this, implementation); + return implementation; + }, + get defaultView() { + return wrap(unwrap(this).defaultView); + } + }); + registerWrapper(window.Document, Document, document.implementation.createHTMLDocument("")); + if (window.HTMLDocument) registerWrapper(window.HTMLDocument, Document); + wrapEventTargetMethods([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement ]); + function DOMImplementation(impl) { + setWrapper(impl, this); + } + var originalCreateDocument = document.implementation.createDocument; + DOMImplementation.prototype.createDocument = function() { + arguments[2] = unwrap(arguments[2]); + return wrap(originalCreateDocument.apply(unsafeUnwrap(this), arguments)); + }; + function wrapImplMethod(constructor, name) { + var original = document.implementation[name]; + constructor.prototype[name] = function() { + return wrap(original.apply(unsafeUnwrap(this), arguments)); + }; + } + function forwardImplMethod(constructor, name) { + var original = document.implementation[name]; + constructor.prototype[name] = function() { + return original.apply(unsafeUnwrap(this), arguments); + }; + } + wrapImplMethod(DOMImplementation, "createDocumentType"); + wrapImplMethod(DOMImplementation, "createHTMLDocument"); + forwardImplMethod(DOMImplementation, "hasFeature"); + registerWrapper(window.DOMImplementation, DOMImplementation); + forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocument", "createDocumentType", "createHTMLDocument", "hasFeature" ]); + scope.adoptNodeNoRemove = adoptNodeNoRemove; + scope.wrappers.DOMImplementation = DOMImplementation; + scope.wrappers.Document = Document; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var EventTarget = scope.wrappers.EventTarget; + var Selection = scope.wrappers.Selection; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var renderAllPending = scope.renderAllPending; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalWindow = window.Window; + var originalGetComputedStyle = window.getComputedStyle; + var originalGetDefaultComputedStyle = window.getDefaultComputedStyle; + var originalGetSelection = window.getSelection; + function Window(impl) { + EventTarget.call(this, impl); + } + Window.prototype = Object.create(EventTarget.prototype); + OriginalWindow.prototype.getComputedStyle = function(el, pseudo) { + return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo); + }; + if (originalGetDefaultComputedStyle) { + OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) { + return wrap(this || window).getDefaultComputedStyle(unwrapIfNeeded(el), pseudo); + }; + } + OriginalWindow.prototype.getSelection = function() { + return wrap(this || window).getSelection(); + }; + delete window.getComputedStyle; + delete window.getDefaultComputedStyle; + delete window.getSelection; + [ "addEventListener", "removeEventListener", "dispatchEvent" ].forEach(function(name) { + OriginalWindow.prototype[name] = function() { + var w = wrap(this || window); + return w[name].apply(w, arguments); + }; + delete window[name]; + }); + mixin(Window.prototype, { + getComputedStyle: function(el, pseudo) { + renderAllPending(); + return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo); + }, + getSelection: function() { + renderAllPending(); + return new Selection(originalGetSelection.call(unwrap(this))); + }, + get document() { + return wrap(unwrap(this).document); + } + }); + if (originalGetDefaultComputedStyle) { + Window.prototype.getDefaultComputedStyle = function(el, pseudo) { + renderAllPending(); + return originalGetDefaultComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo); + }; + } + registerWrapper(OriginalWindow, Window, window); + scope.wrappers.Window = Window; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var unwrap = scope.unwrap; + var OriginalDataTransfer = window.DataTransfer || window.Clipboard; + var OriginalDataTransferSetDragImage = OriginalDataTransfer.prototype.setDragImage; + if (OriginalDataTransferSetDragImage) { + OriginalDataTransfer.prototype.setDragImage = function(image, x, y) { + OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y); + }; + } +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unwrap = scope.unwrap; + var OriginalFormData = window.FormData; + if (!OriginalFormData) return; + function FormData(formElement) { + var impl; + if (formElement instanceof OriginalFormData) { + impl = formElement; + } else { + impl = new OriginalFormData(formElement && unwrap(formElement)); + } + setWrapper(impl, this); + } + registerWrapper(OriginalFormData, FormData, new OriginalFormData()); + scope.wrappers.FormData = FormData; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var originalSend = XMLHttpRequest.prototype.send; + XMLHttpRequest.prototype.send = function(obj) { + return originalSend.call(this, unwrapIfNeeded(obj)); + }; +})(window.ShadowDOMPolyfill); + +(function(scope) { + "use strict"; + var isWrapperFor = scope.isWrapperFor; + var elements = { + a: "HTMLAnchorElement", + area: "HTMLAreaElement", + audio: "HTMLAudioElement", + base: "HTMLBaseElement", + body: "HTMLBodyElement", + br: "HTMLBRElement", + button: "HTMLButtonElement", + canvas: "HTMLCanvasElement", + caption: "HTMLTableCaptionElement", + col: "HTMLTableColElement", + content: "HTMLContentElement", + data: "HTMLDataElement", + datalist: "HTMLDataListElement", + del: "HTMLModElement", + dir: "HTMLDirectoryElement", + div: "HTMLDivElement", + dl: "HTMLDListElement", + embed: "HTMLEmbedElement", + fieldset: "HTMLFieldSetElement", + font: "HTMLFontElement", + form: "HTMLFormElement", + frame: "HTMLFrameElement", + frameset: "HTMLFrameSetElement", + h1: "HTMLHeadingElement", + head: "HTMLHeadElement", + hr: "HTMLHRElement", + html: "HTMLHtmlElement", + iframe: "HTMLIFrameElement", + img: "HTMLImageElement", + input: "HTMLInputElement", + keygen: "HTMLKeygenElement", + label: "HTMLLabelElement", + legend: "HTMLLegendElement", + li: "HTMLLIElement", + link: "HTMLLinkElement", + map: "HTMLMapElement", + marquee: "HTMLMarqueeElement", + menu: "HTMLMenuElement", + menuitem: "HTMLMenuItemElement", + meta: "HTMLMetaElement", + meter: "HTMLMeterElement", + object: "HTMLObjectElement", + ol: "HTMLOListElement", + optgroup: "HTMLOptGroupElement", + option: "HTMLOptionElement", + output: "HTMLOutputElement", + p: "HTMLParagraphElement", + param: "HTMLParamElement", + pre: "HTMLPreElement", + progress: "HTMLProgressElement", + q: "HTMLQuoteElement", + script: "HTMLScriptElement", + select: "HTMLSelectElement", + shadow: "HTMLShadowElement", + source: "HTMLSourceElement", + span: "HTMLSpanElement", + style: "HTMLStyleElement", + table: "HTMLTableElement", + tbody: "HTMLTableSectionElement", + template: "HTMLTemplateElement", + textarea: "HTMLTextAreaElement", + thead: "HTMLTableSectionElement", + time: "HTMLTimeElement", + title: "HTMLTitleElement", + tr: "HTMLTableRowElement", + track: "HTMLTrackElement", + ul: "HTMLUListElement", + video: "HTMLVideoElement" + }; + function overrideConstructor(tagName) { + var nativeConstructorName = elements[tagName]; + var nativeConstructor = window[nativeConstructorName]; + if (!nativeConstructor) return; + var element = document.createElement(tagName); + var wrapperConstructor = element.constructor; + window[nativeConstructorName] = wrapperConstructor; + } + Object.keys(elements).forEach(overrideConstructor); + Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) { + window[name] = scope.wrappers[name]; + }); +})(window.ShadowDOMPolyfill); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/webcomponentsjs/ShadowDOM.min.js b/dashboard-ui/bower_components/webcomponentsjs/ShadowDOM.min.js similarity index 99% rename from dashboard-ui/thirdparty/webcomponentsjs/ShadowDOM.min.js rename to dashboard-ui/bower_components/webcomponentsjs/ShadowDOM.min.js index 1d8e1b8ba6..1380d543b6 100644 --- a/dashboard-ui/thirdparty/webcomponentsjs/ShadowDOM.min.js +++ b/dashboard-ui/bower_components/webcomponentsjs/ShadowDOM.min.js @@ -7,7 +7,7 @@ * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -// @version 0.7.3 +// @version 0.7.5 "undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=k(t),r=0;ru;u++)c[u]=new Array(s),c[u][0]=u;for(var l=0;s>l;l++)c[0][l]=l;for(var u=1;a>u;u++)for(var l=1;s>l;l++)if(this.equals(e[t+l-1],r[o+u-1]))c[u][l]=c[u-1][l-1];else{var p=c[u-1][l]+1,d=c[u][l-1]+1;c[u][l]=d>p?p:d}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var u,l=e[t-1][n-1],p=e[t-1][n],d=e[t][n-1];u=d>p?l>p?p:l:l>d?d:l,u==l?(l==s?c.push(r):(c.push(o),s=l),t--,n--):u==p?(c.push(a),t--,s=p):(c.push(i),n--,s=d)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,u,l){var p=0,d=0,f=Math.min(s-n,l-u);if(0==n&&0==u&&(p=this.sharedPrefix(e,c,f)),s==e.length&&l==c.length&&(d=this.sharedSuffix(e,c,f-p)),n+=p,u+=p,s-=d,l-=d,s-n==0&&l-u==0)return[];if(n==s){for(var h=t(n,[],0);l>u;)h.removed.push(c[u++]);return[h]}if(u==l)return[t(n,[],s-n)];for(var w=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,u,l)),h=void 0,m=[],g=n,v=u,b=0;br;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t0){for(var l=0;l0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function l(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=u(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var l=0;l0;i--)if(!v(t[i],e,o,t,r))return!1;return!0}function m(e,t,n,r){var o=ie,i=t[0]||n;return v(i,e,o,t,r)}function g(e,t,n,r){for(var o=ae,i=1;i0&&v(n,e,o,t,r)}function v(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=q(t),u=c.relatedTarget;if(u){if(u instanceof Object&&u.addEventListener){var p=V(u),d=l(t,e,p);if(d===a)return!0}else d=null;Z.set(t,d)}}J.set(t,n);var f=t.type,h=!1;Y.set(t,a),$.set(t,e),i.depth++;for(var w=0,m=i.length;m>w;w++){var g=i[w];if(g.removed)h=!0;else if(!(g.type!==f||!g.capture&&n===oe||g.capture&&n===ae))try{if("function"==typeof g.handler?g.handler.call(e,t):g.handler.handleEvent(t),ee.get(t))return!1}catch(v){W||(W=v)}}if(i.depth--,h&&0===i.depth){var b=i.slice();i.length=0;for(var w=0;wr;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){N(e instanceof S)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){L(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){L(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);B=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;B=!1;for(var a=0;ao;o++)r.appendChild(W(t[o]));return r}function m(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function g(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){N(t.parentNode===e);var n=t.nextSibling,r=W(t),o=r.parentNode;o&&Y.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=W(e),a=i.firstChild;a;)n=a.nextSibling,Y.call(i,a),a=n}function v(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;ns;s++)i=b(t[s]),!o&&(a=g(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===C}function s(){return!0}function c(e,t,n){return e.localName===n}function u(e,t){return e.namespaceURI===t}function l(e,t,n){return e.namespaceURI===t&&e.localName===n}function p(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=p(a,t,n,r,o,i),a=a.nextElementSibling;return t}function d(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,null);if(c instanceof L)s=M.call(c,i);else{if(!(c instanceof _))return p(this,r,o,n,i,null);s=S.call(c,i)}return t(s,r,o,a)}function f(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=O.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function h(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=j.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=N.call(c,i,a)}return t(s,r,o,!1)}var w=e.wrappers.HTMLCollection,m=e.wrappers.NodeList,g=e.getTreeScope,v=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,S=document.querySelectorAll,M=document.documentElement.querySelectorAll,T=document.getElementsByTagName,O=document.documentElement.getElementsByTagName,N=document.getElementsByTagNameNS,j=document.documentElement.getElementsByTagNameNS,L=window.Element,_=window.HTMLDocument||window.Document,C="http://www.w3.org/1999/xhtml",D={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=v(this),c=g(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof L)a=b(E.call(s,t));else{if(!(s instanceof _))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=g(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new m;return o.length=d.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(v(this),t)}},x={getElementsByTagName:function(e){var t=new w,n="*"===e?s:a;return t.length=f.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new w,r=null;return r="*"===e?"*"===t?s:c:"*"===t?u:l,n.length=h.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=D,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling; return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}},a={getElementById:function(e){return/[ \t\n\r\f]/.test(e)?null:this.querySelector('[id="'+e+'"]')}};e.ChildNodeInterface=i,e.NonElementParentNodeInterface=a,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var u=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,u,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){l(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,u=e.MatchesInterface,l=(e.addWrapNodeListMethod,e.enqueueMutation),p=e.mixin,d=(e.oneOf,e.registerWrapper),f=e.unsafeUnwrap,h=e.wrappers,w=window.Element,m=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return w.prototype[e]}),g=m[0],v=w.prototype[g],b=new WeakMap;r.prototype=Object.create(a.prototype),p(r.prototype,{createShadowRoot:function(){var t=new h.ShadowRoot(this);f(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return f(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=f(this).getAttribute(e);f(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=f(this).getAttribute(e);f(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=f(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return f(this).className},set className(e){this.setAttribute("class",e)},get id(){return f(this).id},set id(e){this.setAttribute("id",e)}}),m.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),w.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),p(r.prototype,o),p(r.prototype,i),p(r.prototype,s),p(r.prototype,c),p(r.prototype,u),d(w,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=m,e.originalMatches=v,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function n(e){return e.replace(j,t)}function r(e){return e.replace(L,t)}function o(e){for(var t={},n=0;n"):c+">"+s(e)+"";case Node.TEXT_NODE:var p=e.data;return t&&C[t.localName]?p:r(p);case Node.COMMENT_NODE:return"";default:throw console.error(e),new Error("not implemented")}}function s(e){e instanceof N.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=a(n,e);return t}function c(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(O(i))}function u(e){w.call(this,e)}function l(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return O(o)}function p(t){return function(){return e.renderAllPending(),M(this)[t]}}function d(e){m(u,e,p(e))}function f(t){Object.defineProperty(u.prototype,t,{get:p(t),set:function(n){e.renderAllPending(),M(this)[t]=n},configurable:!0,enumerable:!0})}function h(t){Object.defineProperty(u.prototype,t,{value:function(){return e.renderAllPending(),M(this)[t].apply(M(this),arguments)},configurable:!0,enumerable:!0})}var w=e.wrappers.Element,m=e.defineGetter,g=e.enqueueMutation,v=e.mixin,b=e.nodesWereAdded,y=e.nodesWereRemoved,E=e.registerWrapper,S=e.snapshotNodeList,M=e.unsafeUnwrap,T=e.unwrap,O=e.wrap,N=e.wrappers,j=/[&\u00A0"]/g,L=/[&\u00A0<>]/g,_=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),C=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),D="http://www.w3.org/1999/xhtml",H=/MSIE/.test(navigator.userAgent),x=window.HTMLElement,R=window.HTMLTemplateElement;u.prototype=Object.create(w.prototype),v(u.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&C[this.localName])return void(this.textContent=e);var t=S(this.childNodes);this.invalidateShadowRenderer()?this instanceof N.HTMLTemplateElement?c(this.content,e):c(this,e,this.tagName):!R&&this instanceof N.HTMLTemplateElement?c(this.content,e):M(this).innerHTML=e;var n=S(this.childNodes);g(this,"childList",{addedNodes:n,removedNodes:t}),y(t),b(n,this)},get outerHTML(){return a(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=l(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=l(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(d),["scrollLeft","scrollTop"].forEach(f),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(h),E(x,u,document.createElement("b")),e.wrappers.HTMLElement=u,e.getInnerHTML=s,e.setInnerHTML=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=p.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);p.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!d){var t=n(e);l.set(this,u(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.wrap,l=new WeakMap,p=new WeakMap,d=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return d?u(s(this).content):l.get(this)}}),d&&a(d,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,u=e.wrap,l=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return u(c(this).form)}}),a(l,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o=e.defineWrapGetter,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"title"),s=r(a),c=Object.getPrototypeOf(s.prototype).constructor;if(!("classList"in a)){var u=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",u),delete t.prototype.classList}o(c,"ownerSVGElement"),e.wrappers.SVGElement=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){d.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),u=document.createElementNS(s,"use"),l=c.constructor,p=Object.getPrototypeOf(l.prototype),d=p.constructor;t.prototype=Object.create(p),"instanceRoot"in u&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,u),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(u,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var u=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,u),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.NonElementParentNodeInterface,r=e.ParentNodeInterface,o=e.SelectorsInterface,i=e.mixin,a=e.registerObject,s=a(document.createDocumentFragment());i(s.prototype,r),i(s.prototype,o),i(s.prototype,t),i(s.prototype,n);var c=a(document.createComment(""));e.wrappers.Comment=c,e.wrappers.DocumentFragment=s}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(l(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;f.set(this,o),this.treeScope_=new r(this,a(o||e)),d.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,u=e.setInnerHTML,l=e.unsafeUnwrap,p=e.unwrap,d=new WeakMap,f=new WeakMap;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){u(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return f.get(this)||null},get host(){return d.get(this)||null},invalidateShadowRenderer:function(){return d.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(e).root;return t instanceof f?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=l(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.unwrapIfNeeded,l=e.wrap,p=e.getTreeScope,d=window.Range,f=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(u(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(u(e),t)},setStartBefore:function(e){s(this).setStartBefore(u(e))},setStartAfter:function(e){s(this).setStartAfter(u(e))},setEndBefore:function(e){s(this).setEndBefore(u(e))},setEndAfter:function(e){s(this).setEndAfter(u(e))},selectNode:function(e){s(this).selectNode(u(e))},selectNodeContents:function(e){s(this).selectNodeContents(u(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return l(s(this).extractContents())},cloneContents:function(){return l(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(u(e))},surroundContents:function(e){s(this).surroundContents(u(e))},cloneRange:function(){return l(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(u(e),t)},comparePoint:function(e,t){return s(this).comparePoint(u(e),t)},intersectsNode:function(e){return s(this).intersectsNode(u(e))},toString:function(){return s(this).toString()}},d.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return l(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var u=R(a.lastChild);u&&(u.nextSibling_=u.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){W.set(e,[])}function i(e){var t=W.get(e);return t||W.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;ew;w++){var m=R(i[l++]);s.get(m)||r(m)}for(var g=f.addedCount,v=i[l]&&R(i[l]),w=0;g>w;w++){var b=o[u++],y=b.node;n(t,y,v),s.set(y,!0),b.sync(s)}p+=g}for(var d=p;d=0;o--){var i=r[o],a=w(i);if(a){var s=i.olderShadowRoot;s&&(n=h(s));for(var c=0;c 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) { + return c; + } + return encodeURIComponent(c); + } + function percentEscapeQuery(c) { + var unicode = c.charCodeAt(0); + if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) { + return c; + } + return encodeURIComponent(c); + } + var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/; + function parse(input, stateOverride, base) { + function err(message) { + errors.push(message); + } + var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = []; + loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) { + var c = input[cursor]; + switch (state) { + case "scheme start": + if (c && ALPHA.test(c)) { + buffer += c.toLowerCase(); + state = "scheme"; + } else if (!stateOverride) { + buffer = ""; + state = "no scheme"; + continue; + } else { + err("Invalid scheme."); + break loop; + } + break; + + case "scheme": + if (c && ALPHANUMERIC.test(c)) { + buffer += c.toLowerCase(); + } else if (":" == c) { + this._scheme = buffer; + buffer = ""; + if (stateOverride) { + break loop; + } + if (isRelativeScheme(this._scheme)) { + this._isRelative = true; + } + if ("file" == this._scheme) { + state = "relative"; + } else if (this._isRelative && base && base._scheme == this._scheme) { + state = "relative or authority"; + } else if (this._isRelative) { + state = "authority first slash"; + } else { + state = "scheme data"; + } + } else if (!stateOverride) { + buffer = ""; + cursor = 0; + state = "no scheme"; + continue; + } else if (EOF == c) { + break loop; + } else { + err("Code point not allowed in scheme: " + c); + break loop; + } + break; + + case "scheme data": + if ("?" == c) { + this._query = "?"; + state = "query"; + } else if ("#" == c) { + this._fragment = "#"; + state = "fragment"; + } else { + if (EOF != c && " " != c && "\n" != c && "\r" != c) { + this._schemeData += percentEscape(c); + } + } + break; + + case "no scheme": + if (!base || !isRelativeScheme(base._scheme)) { + err("Missing scheme."); + invalid.call(this); + } else { + state = "relative"; + continue; + } + break; + + case "relative or authority": + if ("/" == c && "/" == input[cursor + 1]) { + state = "authority ignore slashes"; + } else { + err("Expected /, got: " + c); + state = "relative"; + continue; + } + break; + + case "relative": + this._isRelative = true; + if ("file" != this._scheme) this._scheme = base._scheme; + if (EOF == c) { + this._host = base._host; + this._port = base._port; + this._path = base._path.slice(); + this._query = base._query; + this._username = base._username; + this._password = base._password; + break loop; + } else if ("/" == c || "\\" == c) { + if ("\\" == c) err("\\ is an invalid code point."); + state = "relative slash"; + } else if ("?" == c) { + this._host = base._host; + this._port = base._port; + this._path = base._path.slice(); + this._query = "?"; + this._username = base._username; + this._password = base._password; + state = "query"; + } else if ("#" == c) { + this._host = base._host; + this._port = base._port; + this._path = base._path.slice(); + this._query = base._query; + this._fragment = "#"; + this._username = base._username; + this._password = base._password; + state = "fragment"; + } else { + var nextC = input[cursor + 1]; + var nextNextC = input[cursor + 2]; + if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) { + this._host = base._host; + this._port = base._port; + this._username = base._username; + this._password = base._password; + this._path = base._path.slice(); + this._path.pop(); + } + state = "relative path"; + continue; + } + break; + + case "relative slash": + if ("/" == c || "\\" == c) { + if ("\\" == c) { + err("\\ is an invalid code point."); + } + if ("file" == this._scheme) { + state = "file host"; + } else { + state = "authority ignore slashes"; + } + } else { + if ("file" != this._scheme) { + this._host = base._host; + this._port = base._port; + this._username = base._username; + this._password = base._password; + } + state = "relative path"; + continue; + } + break; + + case "authority first slash": + if ("/" == c) { + state = "authority second slash"; + } else { + err("Expected '/', got: " + c); + state = "authority ignore slashes"; + continue; + } + break; + + case "authority second slash": + state = "authority ignore slashes"; + if ("/" != c) { + err("Expected '/', got: " + c); + continue; + } + break; + + case "authority ignore slashes": + if ("/" != c && "\\" != c) { + state = "authority"; + continue; + } else { + err("Expected authority, got: " + c); + } + break; + + case "authority": + if ("@" == c) { + if (seenAt) { + err("@ already seen."); + buffer += "%40"; + } + seenAt = true; + for (var i = 0; i < buffer.length; i++) { + var cp = buffer[i]; + if (" " == cp || "\n" == cp || "\r" == cp) { + err("Invalid whitespace in authority."); + continue; + } + if (":" == cp && null === this._password) { + this._password = ""; + continue; + } + var tempC = percentEscape(cp); + null !== this._password ? this._password += tempC : this._username += tempC; + } + buffer = ""; + } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { + cursor -= buffer.length; + buffer = ""; + state = "host"; + continue; + } else { + buffer += c; + } + break; + + case "file host": + if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { + if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) { + state = "relative path"; + } else if (buffer.length == 0) { + state = "relative path start"; + } else { + this._host = IDNAToASCII.call(this, buffer); + buffer = ""; + state = "relative path start"; + } + continue; + } else if (" " == c || "\n" == c || "\r" == c) { + err("Invalid whitespace in file host."); + } else { + buffer += c; + } + break; + + case "host": + case "hostname": + if (":" == c && !seenBracket) { + this._host = IDNAToASCII.call(this, buffer); + buffer = ""; + state = "port"; + if ("hostname" == stateOverride) { + break loop; + } + } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { + this._host = IDNAToASCII.call(this, buffer); + buffer = ""; + state = "relative path start"; + if (stateOverride) { + break loop; + } + continue; + } else if (" " != c && "\n" != c && "\r" != c) { + if ("[" == c) { + seenBracket = true; + } else if ("]" == c) { + seenBracket = false; + } + buffer += c; + } else { + err("Invalid code point in host/hostname: " + c); + } + break; + + case "port": + if (/[0-9]/.test(c)) { + buffer += c; + } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) { + if ("" != buffer) { + var temp = parseInt(buffer, 10); + if (temp != relative[this._scheme]) { + this._port = temp + ""; + } + buffer = ""; + } + if (stateOverride) { + break loop; + } + state = "relative path start"; + continue; + } else if (" " == c || "\n" == c || "\r" == c) { + err("Invalid code point in port: " + c); + } else { + invalid.call(this); + } + break; + + case "relative path start": + if ("\\" == c) err("'\\' not allowed in path."); + state = "relative path"; + if ("/" != c && "\\" != c) { + continue; + } + break; + + case "relative path": + if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) { + if ("\\" == c) { + err("\\ not allowed in relative path."); + } + var tmp; + if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { + buffer = tmp; + } + if (".." == buffer) { + this._path.pop(); + if ("/" != c && "\\" != c) { + this._path.push(""); + } + } else if ("." == buffer && "/" != c && "\\" != c) { + this._path.push(""); + } else if ("." != buffer) { + if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") { + buffer = buffer[0] + ":"; + } + this._path.push(buffer); + } + buffer = ""; + if ("?" == c) { + this._query = "?"; + state = "query"; + } else if ("#" == c) { + this._fragment = "#"; + state = "fragment"; + } + } else if (" " != c && "\n" != c && "\r" != c) { + buffer += percentEscape(c); + } + break; + + case "query": + if (!stateOverride && "#" == c) { + this._fragment = "#"; + state = "fragment"; + } else if (EOF != c && " " != c && "\n" != c && "\r" != c) { + this._query += percentEscapeQuery(c); + } + break; + + case "fragment": + if (EOF != c && " " != c && "\n" != c && "\r" != c) { + this._fragment += c; + } + break; + } + cursor++; + } + } + function clear() { + this._scheme = ""; + this._schemeData = ""; + this._username = ""; + this._password = null; + this._host = ""; + this._port = ""; + this._path = []; + this._query = ""; + this._fragment = ""; + this._isInvalid = false; + this._isRelative = false; + } + function jURL(url, base) { + if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base)); + this._url = url; + clear.call(this); + var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ""); + parse.call(this, input, null, base); + } + jURL.prototype = { + toString: function() { + return this.href; + }, + get href() { + if (this._isInvalid) return this._url; + var authority = ""; + if ("" != this._username || null != this._password) { + authority = this._username + (null != this._password ? ":" + this._password : "") + "@"; + } + return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment; + }, + set href(href) { + clear.call(this); + parse.call(this, href); + }, + get protocol() { + return this._scheme + ":"; + }, + set protocol(protocol) { + if (this._isInvalid) return; + parse.call(this, protocol + ":", "scheme start"); + }, + get host() { + return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host; + }, + set host(host) { + if (this._isInvalid || !this._isRelative) return; + parse.call(this, host, "host"); + }, + get hostname() { + return this._host; + }, + set hostname(hostname) { + if (this._isInvalid || !this._isRelative) return; + parse.call(this, hostname, "hostname"); + }, + get port() { + return this._port; + }, + set port(port) { + if (this._isInvalid || !this._isRelative) return; + parse.call(this, port, "port"); + }, + get pathname() { + return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData; + }, + set pathname(pathname) { + if (this._isInvalid || !this._isRelative) return; + this._path = []; + parse.call(this, pathname, "relative path start"); + }, + get search() { + return this._isInvalid || !this._query || "?" == this._query ? "" : this._query; + }, + set search(search) { + if (this._isInvalid || !this._isRelative) return; + this._query = "?"; + if ("?" == search[0]) search = search.slice(1); + parse.call(this, search, "query"); + }, + get hash() { + return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment; + }, + set hash(hash) { + if (this._isInvalid) return; + this._fragment = "#"; + if ("#" == hash[0]) hash = hash.slice(1); + parse.call(this, hash, "fragment"); + }, + get origin() { + var host; + if (this._isInvalid || !this._scheme) { + return ""; + } + switch (this._scheme) { + case "data": + case "file": + case "javascript": + case "mailto": + return "null"; + } + host = this.host; + if (!host) { + return ""; + } + return this._scheme + "://" + host; + } + }; + var OriginalURL = scope.URL; + if (OriginalURL) { + jURL.createObjectURL = function(blob) { + return OriginalURL.createObjectURL.apply(OriginalURL, arguments); + }; + jURL.revokeObjectURL = function(url) { + OriginalURL.revokeObjectURL(url); + }; + } + scope.URL = jURL; +})(this); + +if (typeof WeakMap === "undefined") { + (function() { + var defineProperty = Object.defineProperty; + var counter = Date.now() % 1e9; + var WeakMap = function() { + this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); + }; + WeakMap.prototype = { + set: function(key, value) { + var entry = key[this.name]; + if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { + value: [ key, value ], + writable: true + }); + return this; + }, + get: function(key) { + var entry; + return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; + }, + "delete": function(key) { + var entry = key[this.name]; + if (!entry || entry[0] !== key) return false; + entry[0] = entry[1] = undefined; + return true; + }, + has: function(key) { + var entry = key[this.name]; + if (!entry) return false; + return entry[0] === key; + } + }; + window.WeakMap = WeakMap; + })(); +} + +(function(global) { + var registrationsTable = new WeakMap(); + var setImmediate; + if (/Trident|Edge/.test(navigator.userAgent)) { + setImmediate = setTimeout; + } else if (window.setImmediate) { + setImmediate = window.setImmediate; + } else { + var setImmediateQueue = []; + var sentinel = String(Math.random()); + window.addEventListener("message", function(e) { + if (e.data === sentinel) { + var queue = setImmediateQueue; + setImmediateQueue = []; + queue.forEach(function(func) { + func(); + }); + } + }); + setImmediate = function(func) { + setImmediateQueue.push(func); + window.postMessage(sentinel, "*"); + }; + } + var isScheduled = false; + var scheduledObservers = []; + function scheduleCallback(observer) { + scheduledObservers.push(observer); + if (!isScheduled) { + isScheduled = true; + setImmediate(dispatchCallbacks); + } + } + function wrapIfNeeded(node) { + return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node; + } + function dispatchCallbacks() { + isScheduled = false; + var observers = scheduledObservers; + scheduledObservers = []; + observers.sort(function(o1, o2) { + return o1.uid_ - o2.uid_; + }); + var anyNonEmpty = false; + observers.forEach(function(observer) { + var queue = observer.takeRecords(); + removeTransientObserversFor(observer); + if (queue.length) { + observer.callback_(queue, observer); + anyNonEmpty = true; + } + }); + if (anyNonEmpty) dispatchCallbacks(); + } + function removeTransientObserversFor(observer) { + observer.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + if (!registrations) return; + registrations.forEach(function(registration) { + if (registration.observer === observer) registration.removeTransientObservers(); + }); + }); + } + function forEachAncestorAndObserverEnqueueRecord(target, callback) { + for (var node = target; node; node = node.parentNode) { + var registrations = registrationsTable.get(node); + if (registrations) { + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + var options = registration.options; + if (node !== target && !options.subtree) continue; + var record = callback(options); + if (record) registration.enqueue(record); + } + } + } + } + var uidCounter = 0; + function JsMutationObserver(callback) { + this.callback_ = callback; + this.nodes_ = []; + this.records_ = []; + this.uid_ = ++uidCounter; + } + JsMutationObserver.prototype = { + observe: function(target, options) { + target = wrapIfNeeded(target); + if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) { + throw new SyntaxError(); + } + var registrations = registrationsTable.get(target); + if (!registrations) registrationsTable.set(target, registrations = []); + var registration; + for (var i = 0; i < registrations.length; i++) { + if (registrations[i].observer === this) { + registration = registrations[i]; + registration.removeListeners(); + registration.options = options; + break; + } + } + if (!registration) { + registration = new Registration(this, target, options); + registrations.push(registration); + this.nodes_.push(target); + } + registration.addListeners(); + }, + disconnect: function() { + this.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.observer === this) { + registration.removeListeners(); + registrations.splice(i, 1); + break; + } + } + }, this); + this.records_ = []; + }, + takeRecords: function() { + var copyOfRecords = this.records_; + this.records_ = []; + return copyOfRecords; + } + }; + function MutationRecord(type, target) { + this.type = type; + this.target = target; + this.addedNodes = []; + this.removedNodes = []; + this.previousSibling = null; + this.nextSibling = null; + this.attributeName = null; + this.attributeNamespace = null; + this.oldValue = null; + } + function copyMutationRecord(original) { + var record = new MutationRecord(original.type, original.target); + record.addedNodes = original.addedNodes.slice(); + record.removedNodes = original.removedNodes.slice(); + record.previousSibling = original.previousSibling; + record.nextSibling = original.nextSibling; + record.attributeName = original.attributeName; + record.attributeNamespace = original.attributeNamespace; + record.oldValue = original.oldValue; + return record; + } + var currentRecord, recordWithOldValue; + function getRecord(type, target) { + return currentRecord = new MutationRecord(type, target); + } + function getRecordWithOldValue(oldValue) { + if (recordWithOldValue) return recordWithOldValue; + recordWithOldValue = copyMutationRecord(currentRecord); + recordWithOldValue.oldValue = oldValue; + return recordWithOldValue; + } + function clearRecords() { + currentRecord = recordWithOldValue = undefined; + } + function recordRepresentsCurrentMutation(record) { + return record === recordWithOldValue || record === currentRecord; + } + function selectRecord(lastRecord, newRecord) { + if (lastRecord === newRecord) return lastRecord; + if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue; + return null; + } + function Registration(observer, target, options) { + this.observer = observer; + this.target = target; + this.options = options; + this.transientObservedNodes = []; + } + Registration.prototype = { + enqueue: function(record) { + var records = this.observer.records_; + var length = records.length; + if (records.length > 0) { + var lastRecord = records[length - 1]; + var recordToReplaceLast = selectRecord(lastRecord, record); + if (recordToReplaceLast) { + records[length - 1] = recordToReplaceLast; + return; + } + } else { + scheduleCallback(this.observer); + } + records[length] = record; + }, + addListeners: function() { + this.addListeners_(this.target); + }, + addListeners_: function(node) { + var options = this.options; + if (options.attributes) node.addEventListener("DOMAttrModified", this, true); + if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.addEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true); + }, + removeListeners: function() { + this.removeListeners_(this.target); + }, + removeListeners_: function(node) { + var options = this.options; + if (options.attributes) node.removeEventListener("DOMAttrModified", this, true); + if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.removeEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true); + }, + addTransientObserver: function(node) { + if (node === this.target) return; + this.addListeners_(node); + this.transientObservedNodes.push(node); + var registrations = registrationsTable.get(node); + if (!registrations) registrationsTable.set(node, registrations = []); + registrations.push(this); + }, + removeTransientObservers: function() { + var transientObservedNodes = this.transientObservedNodes; + this.transientObservedNodes = []; + transientObservedNodes.forEach(function(node) { + this.removeListeners_(node); + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + if (registrations[i] === this) { + registrations.splice(i, 1); + break; + } + } + }, this); + }, + handleEvent: function(e) { + e.stopImmediatePropagation(); + switch (e.type) { + case "DOMAttrModified": + var name = e.attrName; + var namespace = e.relatedNode.namespaceURI; + var target = e.target; + var record = new getRecord("attributes", target); + record.attributeName = name; + record.attributeNamespace = namespace; + var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.attributes) return; + if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) { + return; + } + if (options.attributeOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMCharacterDataModified": + var target = e.target; + var record = getRecord("characterData", target); + var oldValue = e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.characterData) return; + if (options.characterDataOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMNodeRemoved": + this.addTransientObserver(e.target); + + case "DOMNodeInserted": + var changedNode = e.target; + var addedNodes, removedNodes; + if (e.type === "DOMNodeInserted") { + addedNodes = [ changedNode ]; + removedNodes = []; + } else { + addedNodes = []; + removedNodes = [ changedNode ]; + } + var previousSibling = changedNode.previousSibling; + var nextSibling = changedNode.nextSibling; + var record = getRecord("childList", e.target.parentNode); + record.addedNodes = addedNodes; + record.removedNodes = removedNodes; + record.previousSibling = previousSibling; + record.nextSibling = nextSibling; + forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) { + if (!options.childList) return; + return record; + }); + } + clearRecords(); + } + }; + global.JsMutationObserver = JsMutationObserver; + if (!global.MutationObserver) global.MutationObserver = JsMutationObserver; +})(this); + +window.HTMLImports = window.HTMLImports || { + flags: {} +}; + +(function(scope) { + var IMPORT_LINK_TYPE = "import"; + var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link")); + var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill); + var wrap = function(node) { + return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node; + }; + var rootDocument = wrap(document); + var currentScriptDescriptor = { + get: function() { + var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null); + return wrap(script); + }, + configurable: true + }; + Object.defineProperty(document, "_currentScript", currentScriptDescriptor); + Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor); + var isIE = /Trident/.test(navigator.userAgent); + function whenReady(callback, doc) { + doc = doc || rootDocument; + whenDocumentReady(function() { + watchImportsLoad(callback, doc); + }, doc); + } + var requiredReadyState = isIE ? "complete" : "interactive"; + var READY_EVENT = "readystatechange"; + function isDocumentReady(doc) { + return doc.readyState === "complete" || doc.readyState === requiredReadyState; + } + function whenDocumentReady(callback, doc) { + if (!isDocumentReady(doc)) { + var checkReady = function() { + if (doc.readyState === "complete" || doc.readyState === requiredReadyState) { + doc.removeEventListener(READY_EVENT, checkReady); + whenDocumentReady(callback, doc); + } + }; + doc.addEventListener(READY_EVENT, checkReady); + } else if (callback) { + callback(); + } + } + function markTargetLoaded(event) { + event.target.__loaded = true; + } + function watchImportsLoad(callback, doc) { + var imports = doc.querySelectorAll("link[rel=import]"); + var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = []; + function checkDone() { + if (parsedCount == importCount && callback) { + callback({ + allImports: imports, + loadedImports: newImports, + errorImports: errorImports + }); + } + } + function loadedImport(e) { + markTargetLoaded(e); + newImports.push(this); + parsedCount++; + checkDone(); + } + function errorLoadingImport(e) { + errorImports.push(this); + parsedCount++; + checkDone(); + } + if (importCount) { + for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) { + if (isImportLoaded(imp)) { + parsedCount++; + checkDone(); + } else { + imp.addEventListener("load", loadedImport); + imp.addEventListener("error", errorLoadingImport); + } + } + } else { + checkDone(); + } + } + function isImportLoaded(link) { + return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed; + } + if (useNative) { + new MutationObserver(function(mxns) { + for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) { + if (m.addedNodes) { + handleImports(m.addedNodes); + } + } + }).observe(document.head, { + childList: true + }); + function handleImports(nodes) { + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + if (isImport(n)) { + handleImport(n); + } + } + } + function isImport(element) { + return element.localName === "link" && element.rel === "import"; + } + function handleImport(element) { + var loaded = element.import; + if (loaded) { + markTargetLoaded({ + target: element + }); + } else { + element.addEventListener("load", markTargetLoaded); + element.addEventListener("error", markTargetLoaded); + } + } + (function() { + if (document.readyState === "loading") { + var imports = document.querySelectorAll("link[rel=import]"); + for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) { + handleImport(imp); + } + } + })(); + } + whenReady(function(detail) { + window.HTMLImports.ready = true; + window.HTMLImports.readyTime = new Date().getTime(); + var evt = rootDocument.createEvent("CustomEvent"); + evt.initCustomEvent("HTMLImportsLoaded", true, true, detail); + rootDocument.dispatchEvent(evt); + }); + scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE; + scope.useNative = useNative; + scope.rootDocument = rootDocument; + scope.whenReady = whenReady; + scope.isIE = isIE; +})(window.HTMLImports); + +(function(scope) { + var modules = []; + var addModule = function(module) { + modules.push(module); + }; + var initializeModules = function() { + modules.forEach(function(module) { + module(scope); + }); + }; + scope.addModule = addModule; + scope.initializeModules = initializeModules; +})(window.HTMLImports); + +window.HTMLImports.addModule(function(scope) { + var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g; + var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g; + var path = { + resolveUrlsInStyle: function(style, linkUrl) { + var doc = style.ownerDocument; + var resolver = doc.createElement("a"); + style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver); + return style; + }, + resolveUrlsInCssText: function(cssText, linkUrl, urlObj) { + var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP); + r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP); + return r; + }, + replaceUrls: function(text, urlObj, linkUrl, regexp) { + return text.replace(regexp, function(m, pre, url, post) { + var urlPath = url.replace(/["']/g, ""); + if (linkUrl) { + urlPath = new URL(urlPath, linkUrl).href; + } + urlObj.href = urlPath; + urlPath = urlObj.href; + return pre + "'" + urlPath + "'" + post; + }); + } + }; + scope.path = path; +}); + +window.HTMLImports.addModule(function(scope) { + var xhr = { + async: true, + ok: function(request) { + return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0; + }, + load: function(url, next, nextContext) { + var request = new XMLHttpRequest(); + if (scope.flags.debug || scope.flags.bust) { + url += "?" + Math.random(); + } + request.open("GET", url, xhr.async); + request.addEventListener("readystatechange", function(e) { + if (request.readyState === 4) { + var locationHeader = request.getResponseHeader("Location"); + var redirectedUrl = null; + if (locationHeader) { + var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader; + } + next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl); + } + }); + request.send(); + return request; + }, + loadDocument: function(url, next, nextContext) { + this.load(url, next, nextContext).responseType = "document"; + } + }; + scope.xhr = xhr; +}); + +window.HTMLImports.addModule(function(scope) { + var xhr = scope.xhr; + var flags = scope.flags; + var Loader = function(onLoad, onComplete) { + this.cache = {}; + this.onload = onLoad; + this.oncomplete = onComplete; + this.inflight = 0; + this.pending = {}; + }; + Loader.prototype = { + addNodes: function(nodes) { + this.inflight += nodes.length; + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + this.require(n); + } + this.checkDone(); + }, + addNode: function(node) { + this.inflight++; + this.require(node); + this.checkDone(); + }, + require: function(elt) { + var url = elt.src || elt.href; + elt.__nodeUrl = url; + if (!this.dedupe(url, elt)) { + this.fetch(url, elt); + } + }, + dedupe: function(url, elt) { + if (this.pending[url]) { + this.pending[url].push(elt); + return true; + } + var resource; + if (this.cache[url]) { + this.onload(url, elt, this.cache[url]); + this.tail(); + return true; + } + this.pending[url] = [ elt ]; + return false; + }, + fetch: function(url, elt) { + flags.load && console.log("fetch", url, elt); + if (!url) { + setTimeout(function() { + this.receive(url, elt, { + error: "href must be specified" + }, null); + }.bind(this), 0); + } else if (url.match(/^data:/)) { + var pieces = url.split(","); + var header = pieces[0]; + var body = pieces[1]; + if (header.indexOf(";base64") > -1) { + body = atob(body); + } else { + body = decodeURIComponent(body); + } + setTimeout(function() { + this.receive(url, elt, null, body); + }.bind(this), 0); + } else { + var receiveXhr = function(err, resource, redirectedUrl) { + this.receive(url, elt, err, resource, redirectedUrl); + }.bind(this); + xhr.load(url, receiveXhr); + } + }, + receive: function(url, elt, err, resource, redirectedUrl) { + this.cache[url] = resource; + var $p = this.pending[url]; + for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { + this.onload(url, p, resource, err, redirectedUrl); + this.tail(); + } + this.pending[url] = null; + }, + tail: function() { + --this.inflight; + this.checkDone(); + }, + checkDone: function() { + if (!this.inflight) { + this.oncomplete(); + } + } + }; + scope.Loader = Loader; +}); + +window.HTMLImports.addModule(function(scope) { + var Observer = function(addCallback) { + this.addCallback = addCallback; + this.mo = new MutationObserver(this.handler.bind(this)); + }; + Observer.prototype = { + handler: function(mutations) { + for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) { + if (m.type === "childList" && m.addedNodes.length) { + this.addedNodes(m.addedNodes); + } + } + }, + addedNodes: function(nodes) { + if (this.addCallback) { + this.addCallback(nodes); + } + for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) { + if (n.children && n.children.length) { + this.addedNodes(n.children); + } + } + }, + observe: function(root) { + this.mo.observe(root, { + childList: true, + subtree: true + }); + } + }; + scope.Observer = Observer; +}); + +window.HTMLImports.addModule(function(scope) { + var path = scope.path; + var rootDocument = scope.rootDocument; + var flags = scope.flags; + var isIE = scope.isIE; + var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; + var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]"; + var importParser = { + documentSelectors: IMPORT_SELECTOR, + importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","), + map: { + link: "parseLink", + script: "parseScript", + style: "parseStyle" + }, + dynamicElements: [], + parseNext: function() { + var next = this.nextToParse(); + if (next) { + this.parse(next); + } + }, + parse: function(elt) { + if (this.isParsed(elt)) { + flags.parse && console.log("[%s] is already parsed", elt.localName); + return; + } + var fn = this[this.map[elt.localName]]; + if (fn) { + this.markParsing(elt); + fn.call(this, elt); + } + }, + parseDynamic: function(elt, quiet) { + this.dynamicElements.push(elt); + if (!quiet) { + this.parseNext(); + } + }, + markParsing: function(elt) { + flags.parse && console.log("parsing", elt); + this.parsingElement = elt; + }, + markParsingComplete: function(elt) { + elt.__importParsed = true; + this.markDynamicParsingComplete(elt); + if (elt.__importElement) { + elt.__importElement.__importParsed = true; + this.markDynamicParsingComplete(elt.__importElement); + } + this.parsingElement = null; + flags.parse && console.log("completed", elt); + }, + markDynamicParsingComplete: function(elt) { + var i = this.dynamicElements.indexOf(elt); + if (i >= 0) { + this.dynamicElements.splice(i, 1); + } + }, + parseImport: function(elt) { + if (window.HTMLImports.__importsParsingHook) { + window.HTMLImports.__importsParsingHook(elt); + } + if (elt.import) { + elt.import.__importParsed = true; + } + this.markParsingComplete(elt); + if (elt.__resource && !elt.__error) { + elt.dispatchEvent(new CustomEvent("load", { + bubbles: false + })); + } else { + elt.dispatchEvent(new CustomEvent("error", { + bubbles: false + })); + } + if (elt.__pending) { + var fn; + while (elt.__pending.length) { + fn = elt.__pending.shift(); + if (fn) { + fn({ + target: elt + }); + } + } + } + this.parseNext(); + }, + parseLink: function(linkElt) { + if (nodeIsImport(linkElt)) { + this.parseImport(linkElt); + } else { + linkElt.href = linkElt.href; + this.parseGeneric(linkElt); + } + }, + parseStyle: function(elt) { + var src = elt; + elt = cloneStyle(elt); + src.__appliedElement = elt; + elt.__importElement = src; + this.parseGeneric(elt); + }, + parseGeneric: function(elt) { + this.trackElement(elt); + this.addElementToDocument(elt); + }, + rootImportForElement: function(elt) { + var n = elt; + while (n.ownerDocument.__importLink) { + n = n.ownerDocument.__importLink; + } + return n; + }, + addElementToDocument: function(elt) { + var port = this.rootImportForElement(elt.__importElement || elt); + port.parentNode.insertBefore(elt, port); + }, + trackElement: function(elt, callback) { + var self = this; + var done = function(e) { + if (callback) { + callback(e); + } + self.markParsingComplete(elt); + self.parseNext(); + }; + elt.addEventListener("load", done); + elt.addEventListener("error", done); + if (isIE && elt.localName === "style") { + var fakeLoad = false; + if (elt.textContent.indexOf("@import") == -1) { + fakeLoad = true; + } else if (elt.sheet) { + fakeLoad = true; + var csr = elt.sheet.cssRules; + var len = csr ? csr.length : 0; + for (var i = 0, r; i < len && (r = csr[i]); i++) { + if (r.type === CSSRule.IMPORT_RULE) { + fakeLoad = fakeLoad && Boolean(r.styleSheet); + } + } + } + if (fakeLoad) { + setTimeout(function() { + elt.dispatchEvent(new CustomEvent("load", { + bubbles: false + })); + }); + } + } + }, + parseScript: function(scriptElt) { + var script = document.createElement("script"); + script.__importElement = scriptElt; + script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt); + scope.currentScript = scriptElt; + this.trackElement(script, function(e) { + script.parentNode.removeChild(script); + scope.currentScript = null; + }); + this.addElementToDocument(script); + }, + nextToParse: function() { + this._mayParse = []; + return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic()); + }, + nextToParseInDoc: function(doc, link) { + if (doc && this._mayParse.indexOf(doc) < 0) { + this._mayParse.push(doc); + var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc)); + for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) { + if (!this.isParsed(n)) { + if (this.hasResource(n)) { + return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n; + } else { + return; + } + } + } + } + return link; + }, + nextToParseDynamic: function() { + return this.dynamicElements[0]; + }, + parseSelectorsForNode: function(node) { + var doc = node.ownerDocument || node; + return doc === rootDocument ? this.documentSelectors : this.importsSelectors; + }, + isParsed: function(node) { + return node.__importParsed; + }, + needsDynamicParsing: function(elt) { + return this.dynamicElements.indexOf(elt) >= 0; + }, + hasResource: function(node) { + if (nodeIsImport(node) && node.import === undefined) { + return false; + } + return true; + } + }; + function nodeIsImport(elt) { + return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE; + } + function generateScriptDataUrl(script) { + var scriptContent = generateScriptContent(script); + return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent); + } + function generateScriptContent(script) { + return script.textContent + generateSourceMapHint(script); + } + function generateSourceMapHint(script) { + var owner = script.ownerDocument; + owner.__importedScripts = owner.__importedScripts || 0; + var moniker = script.ownerDocument.baseURI; + var num = owner.__importedScripts ? "-" + owner.__importedScripts : ""; + owner.__importedScripts++; + return "\n//# sourceURL=" + moniker + num + ".js\n"; + } + function cloneStyle(style) { + var clone = style.ownerDocument.createElement("style"); + clone.textContent = style.textContent; + path.resolveUrlsInStyle(clone); + return clone; + } + scope.parser = importParser; + scope.IMPORT_SELECTOR = IMPORT_SELECTOR; +}); + +window.HTMLImports.addModule(function(scope) { + var flags = scope.flags; + var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; + var IMPORT_SELECTOR = scope.IMPORT_SELECTOR; + var rootDocument = scope.rootDocument; + var Loader = scope.Loader; + var Observer = scope.Observer; + var parser = scope.parser; + var importer = { + documents: {}, + documentPreloadSelectors: IMPORT_SELECTOR, + importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","), + loadNode: function(node) { + importLoader.addNode(node); + }, + loadSubtree: function(parent) { + var nodes = this.marshalNodes(parent); + importLoader.addNodes(nodes); + }, + marshalNodes: function(parent) { + return parent.querySelectorAll(this.loadSelectorsForNode(parent)); + }, + loadSelectorsForNode: function(node) { + var doc = node.ownerDocument || node; + return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors; + }, + loaded: function(url, elt, resource, err, redirectedUrl) { + flags.load && console.log("loaded", url, elt); + elt.__resource = resource; + elt.__error = err; + if (isImportLink(elt)) { + var doc = this.documents[url]; + if (doc === undefined) { + doc = err ? null : makeDocument(resource, redirectedUrl || url); + if (doc) { + doc.__importLink = elt; + this.bootDocument(doc); + } + this.documents[url] = doc; + } + elt.import = doc; + } + parser.parseNext(); + }, + bootDocument: function(doc) { + this.loadSubtree(doc); + this.observer.observe(doc); + parser.parseNext(); + }, + loadedAll: function() { + parser.parseNext(); + } + }; + var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer)); + importer.observer = new Observer(); + function isImportLink(elt) { + return isLinkRel(elt, IMPORT_LINK_TYPE); + } + function isLinkRel(elt, rel) { + return elt.localName === "link" && elt.getAttribute("rel") === rel; + } + function hasBaseURIAccessor(doc) { + return !!Object.getOwnPropertyDescriptor(doc, "baseURI"); + } + function makeDocument(resource, url) { + var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE); + doc._URL = url; + var base = doc.createElement("base"); + base.setAttribute("href", url); + if (!doc.baseURI && !hasBaseURIAccessor(doc)) { + Object.defineProperty(doc, "baseURI", { + value: url + }); + } + var meta = doc.createElement("meta"); + meta.setAttribute("charset", "utf-8"); + doc.head.appendChild(meta); + doc.head.appendChild(base); + doc.body.innerHTML = resource; + if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) { + HTMLTemplateElement.bootstrap(doc); + } + return doc; + } + if (!document.baseURI) { + var baseURIDescriptor = { + get: function() { + var base = document.querySelector("base"); + return base ? base.href : window.location.href; + }, + configurable: true + }; + Object.defineProperty(document, "baseURI", baseURIDescriptor); + Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor); + } + scope.importer = importer; + scope.importLoader = importLoader; +}); + +window.HTMLImports.addModule(function(scope) { + var parser = scope.parser; + var importer = scope.importer; + var dynamic = { + added: function(nodes) { + var owner, parsed, loading; + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + if (!owner) { + owner = n.ownerDocument; + parsed = parser.isParsed(owner); + } + loading = this.shouldLoadNode(n); + if (loading) { + importer.loadNode(n); + } + if (this.shouldParseNode(n) && parsed) { + parser.parseDynamic(n, loading); + } + } + }, + shouldLoadNode: function(node) { + return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node)); + }, + shouldParseNode: function(node) { + return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node)); + } + }; + importer.observer.addCallback = dynamic.added.bind(dynamic); + var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector; +}); + +(function(scope) { + var initializeModules = scope.initializeModules; + var isIE = scope.isIE; + if (scope.useNative) { + return; + } + if (isIE && typeof window.CustomEvent !== "function") { + window.CustomEvent = function(inType, params) { + params = params || {}; + var e = document.createEvent("CustomEvent"); + e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); + e.preventDefault = function() { + Object.defineProperty(this, "defaultPrevented", { + get: function() { + return true; + } + }); + }; + return e; + }; + window.CustomEvent.prototype = window.Event.prototype; + } + initializeModules(); + var rootDocument = scope.rootDocument; + function bootstrap() { + window.HTMLImports.importer.bootDocument(rootDocument); + } + if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) { + bootstrap(); + } else { + document.addEventListener("DOMContentLoaded", bootstrap); + } +})(window.HTMLImports); + +window.CustomElements = window.CustomElements || { + flags: {} +}; + +(function(scope) { + var flags = scope.flags; + var modules = []; + var addModule = function(module) { + modules.push(module); + }; + var initializeModules = function() { + modules.forEach(function(module) { + module(scope); + }); + }; + scope.addModule = addModule; + scope.initializeModules = initializeModules; + scope.hasNative = Boolean(document.registerElement); + scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative); +})(window.CustomElements); + +window.CustomElements.addModule(function(scope) { + var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none"; + function forSubtree(node, cb) { + findAllElements(node, function(e) { + if (cb(e)) { + return true; + } + forRoots(e, cb); + }); + forRoots(node, cb); + } + function findAllElements(node, find, data) { + var e = node.firstElementChild; + if (!e) { + e = node.firstChild; + while (e && e.nodeType !== Node.ELEMENT_NODE) { + e = e.nextSibling; + } + } + while (e) { + if (find(e, data) !== true) { + findAllElements(e, find, data); + } + e = e.nextElementSibling; + } + return null; + } + function forRoots(node, cb) { + var root = node.shadowRoot; + while (root) { + forSubtree(root, cb); + root = root.olderShadowRoot; + } + } + function forDocumentTree(doc, cb) { + _forDocumentTree(doc, cb, []); + } + function _forDocumentTree(doc, cb, processingDocuments) { + doc = window.wrap(doc); + if (processingDocuments.indexOf(doc) >= 0) { + return; + } + processingDocuments.push(doc); + var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]"); + for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) { + if (n.import) { + _forDocumentTree(n.import, cb, processingDocuments); + } + } + cb(doc); + } + scope.forDocumentTree = forDocumentTree; + scope.forSubtree = forSubtree; +}); + +window.CustomElements.addModule(function(scope) { + var flags = scope.flags; + var forSubtree = scope.forSubtree; + var forDocumentTree = scope.forDocumentTree; + function addedNode(node) { + return added(node) || addedSubtree(node); + } + function added(node) { + if (scope.upgrade(node)) { + return true; + } + attached(node); + } + function addedSubtree(node) { + forSubtree(node, function(e) { + if (added(e)) { + return true; + } + }); + } + function attachedNode(node) { + attached(node); + if (inDocument(node)) { + forSubtree(node, function(e) { + attached(e); + }); + } + } + var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver; + scope.hasPolyfillMutations = hasPolyfillMutations; + var isPendingMutations = false; + var pendingMutations = []; + function deferMutation(fn) { + pendingMutations.push(fn); + if (!isPendingMutations) { + isPendingMutations = true; + setTimeout(takeMutations); + } + } + function takeMutations() { + isPendingMutations = false; + var $p = pendingMutations; + for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { + p(); + } + pendingMutations = []; + } + function attached(element) { + if (hasPolyfillMutations) { + deferMutation(function() { + _attached(element); + }); + } else { + _attached(element); + } + } + function _attached(element) { + if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { + if (!element.__attached && inDocument(element)) { + element.__attached = true; + if (element.attachedCallback) { + element.attachedCallback(); + } + } + } + } + function detachedNode(node) { + detached(node); + forSubtree(node, function(e) { + detached(e); + }); + } + function detached(element) { + if (hasPolyfillMutations) { + deferMutation(function() { + _detached(element); + }); + } else { + _detached(element); + } + } + function _detached(element) { + if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { + if (element.__attached && !inDocument(element)) { + element.__attached = false; + if (element.detachedCallback) { + element.detachedCallback(); + } + } + } + } + function inDocument(element) { + var p = element; + var doc = wrap(document); + while (p) { + if (p == doc) { + return true; + } + p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host; + } + } + function watchShadow(node) { + if (node.shadowRoot && !node.shadowRoot.__watched) { + flags.dom && console.log("watching shadow-root for: ", node.localName); + var root = node.shadowRoot; + while (root) { + observe(root); + root = root.olderShadowRoot; + } + } + } + function handler(mutations) { + if (flags.dom) { + var mx = mutations[0]; + if (mx && mx.type === "childList" && mx.addedNodes) { + if (mx.addedNodes) { + var d = mx.addedNodes[0]; + while (d && d !== document && !d.host) { + d = d.parentNode; + } + var u = d && (d.URL || d._URL || d.host && d.host.localName) || ""; + u = u.split("/?").shift().split("/").pop(); + } + } + console.group("mutations (%d) [%s]", mutations.length, u || ""); + } + mutations.forEach(function(mx) { + if (mx.type === "childList") { + forEach(mx.addedNodes, function(n) { + if (!n.localName) { + return; + } + addedNode(n); + }); + forEach(mx.removedNodes, function(n) { + if (!n.localName) { + return; + } + detachedNode(n); + }); + } + }); + flags.dom && console.groupEnd(); + } + function takeRecords(node) { + node = window.wrap(node); + if (!node) { + node = window.wrap(document); + } + while (node.parentNode) { + node = node.parentNode; + } + var observer = node.__observer; + if (observer) { + handler(observer.takeRecords()); + takeMutations(); + } + } + var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach); + function observe(inRoot) { + if (inRoot.__observer) { + return; + } + var observer = new MutationObserver(handler); + observer.observe(inRoot, { + childList: true, + subtree: true + }); + inRoot.__observer = observer; + } + function upgradeDocument(doc) { + doc = window.wrap(doc); + flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop()); + addedNode(doc); + observe(doc); + flags.dom && console.groupEnd(); + } + function upgradeDocumentTree(doc) { + forDocumentTree(doc, upgradeDocument); + } + var originalCreateShadowRoot = Element.prototype.createShadowRoot; + if (originalCreateShadowRoot) { + Element.prototype.createShadowRoot = function() { + var root = originalCreateShadowRoot.call(this); + window.CustomElements.watchShadow(this); + return root; + }; + } + scope.watchShadow = watchShadow; + scope.upgradeDocumentTree = upgradeDocumentTree; + scope.upgradeSubtree = addedSubtree; + scope.upgradeAll = addedNode; + scope.attachedNode = attachedNode; + scope.takeRecords = takeRecords; +}); + +window.CustomElements.addModule(function(scope) { + var flags = scope.flags; + function upgrade(node) { + if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { + var is = node.getAttribute("is"); + var definition = scope.getRegisteredDefinition(is || node.localName); + if (definition) { + if (is && definition.tag == node.localName) { + return upgradeWithDefinition(node, definition); + } else if (!is && !definition.extends) { + return upgradeWithDefinition(node, definition); + } + } + } + } + function upgradeWithDefinition(element, definition) { + flags.upgrade && console.group("upgrade:", element.localName); + if (definition.is) { + element.setAttribute("is", definition.is); + } + implementPrototype(element, definition); + element.__upgraded__ = true; + created(element); + scope.attachedNode(element); + scope.upgradeSubtree(element); + flags.upgrade && console.groupEnd(); + return element; + } + function implementPrototype(element, definition) { + if (Object.__proto__) { + element.__proto__ = definition.prototype; + } else { + customMixin(element, definition.prototype, definition.native); + element.__proto__ = definition.prototype; + } + } + function customMixin(inTarget, inSrc, inNative) { + var used = {}; + var p = inSrc; + while (p !== inNative && p !== HTMLElement.prototype) { + var keys = Object.getOwnPropertyNames(p); + for (var i = 0, k; k = keys[i]; i++) { + if (!used[k]) { + Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k)); + used[k] = 1; + } + } + p = Object.getPrototypeOf(p); + } + } + function created(element) { + if (element.createdCallback) { + element.createdCallback(); + } + } + scope.upgrade = upgrade; + scope.upgradeWithDefinition = upgradeWithDefinition; + scope.implementPrototype = implementPrototype; +}); + +window.CustomElements.addModule(function(scope) { + var isIE11OrOlder = scope.isIE11OrOlder; + var upgradeDocumentTree = scope.upgradeDocumentTree; + var upgradeAll = scope.upgradeAll; + var upgradeWithDefinition = scope.upgradeWithDefinition; + var implementPrototype = scope.implementPrototype; + var useNative = scope.useNative; + function register(name, options) { + var definition = options || {}; + if (!name) { + throw new Error("document.registerElement: first argument `name` must not be empty"); + } + if (name.indexOf("-") < 0) { + throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'."); + } + if (isReservedTag(name)) { + throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid."); + } + if (getRegisteredDefinition(name)) { + throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered"); + } + if (!definition.prototype) { + definition.prototype = Object.create(HTMLElement.prototype); + } + definition.__name = name.toLowerCase(); + definition.lifecycle = definition.lifecycle || {}; + definition.ancestry = ancestry(definition.extends); + resolveTagName(definition); + resolvePrototypeChain(definition); + overrideAttributeApi(definition.prototype); + registerDefinition(definition.__name, definition); + definition.ctor = generateConstructor(definition); + definition.ctor.prototype = definition.prototype; + definition.prototype.constructor = definition.ctor; + if (scope.ready) { + upgradeDocumentTree(document); + } + return definition.ctor; + } + function overrideAttributeApi(prototype) { + if (prototype.setAttribute._polyfilled) { + return; + } + var setAttribute = prototype.setAttribute; + prototype.setAttribute = function(name, value) { + changeAttribute.call(this, name, value, setAttribute); + }; + var removeAttribute = prototype.removeAttribute; + prototype.removeAttribute = function(name) { + changeAttribute.call(this, name, null, removeAttribute); + }; + prototype.setAttribute._polyfilled = true; + } + function changeAttribute(name, value, operation) { + name = name.toLowerCase(); + var oldValue = this.getAttribute(name); + operation.apply(this, arguments); + var newValue = this.getAttribute(name); + if (this.attributeChangedCallback && newValue !== oldValue) { + this.attributeChangedCallback(name, oldValue, newValue); + } + } + function isReservedTag(name) { + for (var i = 0; i < reservedTagList.length; i++) { + if (name === reservedTagList[i]) { + return true; + } + } + } + var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ]; + function ancestry(extnds) { + var extendee = getRegisteredDefinition(extnds); + if (extendee) { + return ancestry(extendee.extends).concat([ extendee ]); + } + return []; + } + function resolveTagName(definition) { + var baseTag = definition.extends; + for (var i = 0, a; a = definition.ancestry[i]; i++) { + baseTag = a.is && a.tag; + } + definition.tag = baseTag || definition.__name; + if (baseTag) { + definition.is = definition.__name; + } + } + function resolvePrototypeChain(definition) { + if (!Object.__proto__) { + var nativePrototype = HTMLElement.prototype; + if (definition.is) { + var inst = document.createElement(definition.tag); + var expectedPrototype = Object.getPrototypeOf(inst); + if (expectedPrototype === definition.prototype) { + nativePrototype = expectedPrototype; + } + } + var proto = definition.prototype, ancestor; + while (proto && proto !== nativePrototype) { + ancestor = Object.getPrototypeOf(proto); + proto.__proto__ = ancestor; + proto = ancestor; + } + definition.native = nativePrototype; + } + } + function instantiate(definition) { + return upgradeWithDefinition(domCreateElement(definition.tag), definition); + } + var registry = {}; + function getRegisteredDefinition(name) { + if (name) { + return registry[name.toLowerCase()]; + } + } + function registerDefinition(name, definition) { + registry[name] = definition; + } + function generateConstructor(definition) { + return function() { + return instantiate(definition); + }; + } + var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + function createElementNS(namespace, tag, typeExtension) { + if (namespace === HTML_NAMESPACE) { + return createElement(tag, typeExtension); + } else { + return domCreateElementNS(namespace, tag); + } + } + function createElement(tag, typeExtension) { + if (tag) { + tag = tag.toLowerCase(); + } + if (typeExtension) { + typeExtension = typeExtension.toLowerCase(); + } + var definition = getRegisteredDefinition(typeExtension || tag); + if (definition) { + if (tag == definition.tag && typeExtension == definition.is) { + return new definition.ctor(); + } + if (!typeExtension && !definition.is) { + return new definition.ctor(); + } + } + var element; + if (typeExtension) { + element = createElement(tag); + element.setAttribute("is", typeExtension); + return element; + } + element = domCreateElement(tag); + if (tag.indexOf("-") >= 0) { + implementPrototype(element, HTMLElement); + } + return element; + } + var domCreateElement = document.createElement.bind(document); + var domCreateElementNS = document.createElementNS.bind(document); + var isInstance; + if (!Object.__proto__ && !useNative) { + isInstance = function(obj, ctor) { + var p = obj; + while (p) { + if (p === ctor.prototype) { + return true; + } + p = p.__proto__; + } + return false; + }; + } else { + isInstance = function(obj, base) { + return obj instanceof base; + }; + } + function wrapDomMethodToForceUpgrade(obj, methodName) { + var orig = obj[methodName]; + obj[methodName] = function() { + var n = orig.apply(this, arguments); + upgradeAll(n); + return n; + }; + } + wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode"); + wrapDomMethodToForceUpgrade(document, "importNode"); + if (isIE11OrOlder) { + (function() { + var importNode = document.importNode; + document.importNode = function() { + var n = importNode.apply(document, arguments); + if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) { + var f = document.createDocumentFragment(); + f.appendChild(n); + return f; + } else { + return n; + } + }; + })(); + } + document.registerElement = register; + document.createElement = createElement; + document.createElementNS = createElementNS; + scope.registry = registry; + scope.instanceof = isInstance; + scope.reservedTagList = reservedTagList; + scope.getRegisteredDefinition = getRegisteredDefinition; + document.register = document.registerElement; +}); + +(function(scope) { + var useNative = scope.useNative; + var initializeModules = scope.initializeModules; + var isIE11OrOlder = /Trident/.test(navigator.userAgent); + if (useNative) { + var nop = function() {}; + scope.watchShadow = nop; + scope.upgrade = nop; + scope.upgradeAll = nop; + scope.upgradeDocumentTree = nop; + scope.upgradeSubtree = nop; + scope.takeRecords = nop; + scope.instanceof = function(obj, base) { + return obj instanceof base; + }; + } else { + initializeModules(); + } + var upgradeDocumentTree = scope.upgradeDocumentTree; + if (!window.wrap) { + if (window.ShadowDOMPolyfill) { + window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded; + window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded; + } else { + window.wrap = window.unwrap = function(node) { + return node; + }; + } + } + function bootstrap() { + upgradeDocumentTree(window.wrap(document)); + if (window.HTMLImports) { + window.HTMLImports.__importsParsingHook = function(elt) { + upgradeDocumentTree(wrap(elt.import)); + }; + } + window.CustomElements.ready = true; + setTimeout(function() { + window.CustomElements.readyTime = Date.now(); + if (window.HTMLImports) { + window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime; + } + document.dispatchEvent(new CustomEvent("WebComponentsReady", { + bubbles: true + })); + }); + } + if (isIE11OrOlder && typeof window.CustomEvent !== "function") { + window.CustomEvent = function(inType, params) { + params = params || {}; + var e = document.createEvent("CustomEvent"); + e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); + e.preventDefault = function() { + Object.defineProperty(this, "defaultPrevented", { + get: function() { + return true; + } + }); + }; + return e; + }; + window.CustomEvent.prototype = window.Event.prototype; + } + if (document.readyState === "complete" || scope.flags.eager) { + bootstrap(); + } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) { + bootstrap(); + } else { + var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded"; + window.addEventListener(loadEvent, bootstrap); + } + scope.isIE11OrOlder = isIE11OrOlder; +})(window.CustomElements); + +if (typeof HTMLTemplateElement === "undefined") { + (function() { + var TEMPLATE_TAG = "template"; + HTMLTemplateElement = function() {}; + HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype); + HTMLTemplateElement.decorate = function(template) { + if (!template.content) { + template.content = template.ownerDocument.createDocumentFragment(); + } + var child; + while (child = template.firstChild) { + template.content.appendChild(child); + } + }; + HTMLTemplateElement.bootstrap = function(doc) { + var templates = doc.querySelectorAll(TEMPLATE_TAG); + for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) { + HTMLTemplateElement.decorate(t); + } + }; + window.addEventListener("DOMContentLoaded", function() { + HTMLTemplateElement.bootstrap(document); + }); + var createElement = document.createElement; + document.createElement = function() { + "use strict"; + var el = createElement.apply(document, arguments); + if (el.localName == "template") { + HTMLTemplateElement.decorate(el); + } + return el; + }; + })(); +} + +(function(scope) { + var style = document.createElement("style"); + style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n"; + var head = document.querySelector("head"); + head.insertBefore(style, head.firstChild); +})(window.WebComponents); \ No newline at end of file diff --git a/dashboard-ui/bower_components/webcomponentsjs/webcomponents-lite.min.js b/dashboard-ui/bower_components/webcomponentsjs/webcomponents-lite.min.js new file mode 100644 index 0000000000..abb6ff6700 --- /dev/null +++ b/dashboard-ui/bower_components/webcomponentsjs/webcomponents-lite.min.js @@ -0,0 +1,13 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version 0.7.5 +window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents-lite.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var n,r=e.split("=");r[0]&&(n=r[0].match(/wc-(.+)/))&&(t[n[1]]=r[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==h[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var d=a||"scheme start",u=0,l="",_=!1,w=!1,b=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var g=e[u];switch(d){case"scheme start":if(!g||!m.test(g)){if(a){c("Invalid scheme.");break e}l="",d="no scheme";continue}l+=g.toLowerCase(),d="scheme";break;case"scheme":if(g&&v.test(g))l+=g.toLowerCase();else{if(":"!=g){if(a){if(f==g)break e;c("Code point not allowed in scheme: "+g);break e}l="",u=0,d="no scheme";continue}if(this._scheme=l,l="",a)break e;t(this._scheme)&&(this._isRelative=!0),d="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==g?(this._query="?",d="query"):"#"==g?(this._fragment="#",d="fragment"):f!=g&&" "!=g&&"\n"!=g&&"\r"!=g&&(this._schemeData+=o(g));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=g||"/"!=e[u+1]){c("Expected /, got: "+g),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==g){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==g||"\\"==g)"\\"==g&&c("\\ is an invalid code point."),d="relative slash";else if("?"==g)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,d="query";else{if("#"!=g){var y=e[u+1],E=e[u+2];("file"!=this._scheme||!m.test(g)||":"!=y&&"|"!=y||f!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),d="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,d="fragment"}break;case"relative slash":if("/"!=g&&"\\"!=g){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),d="relative path";continue}"\\"==g&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=g){c("Expected '/', got: "+g),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=g){c("Expected '/', got: "+g);continue}break;case"authority ignore slashes":if("/"!=g&&"\\"!=g){d="authority";continue}c("Expected authority, got: "+g);break;case"authority":if("@"==g){_&&(c("@ already seen."),l+="%40"),_=!0;for(var L=0;L>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){g.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=g;g=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o0){var o=n[r-1],i=p(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;np&&(h=s[p]);p++)a(h)?(c++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),p=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},f=p(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return p(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var v=/Trident/.test(navigator.userAgent),_=v?"complete":"interactive",w="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)d(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=f,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]","style","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),d&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){p.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);p.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n["import"]=c}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},p=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=h,e.importLoader=p}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){g(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),h(e)&&g(e,function(e){s(e)})}function i(e){M.push(e),L||(L=!0,setTimeout(a))}function a(){L=!1;for(var e,t=M,n=0,r=t.length;r>n&&(e=t[n]);n++)e();M=[]}function s(e){E?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&h(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function d(e){u(e),g(e,function(e){u(e)})}function u(e){E?i(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!h(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function h(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function f(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e)}),T(e.removedNodes,function(e){e.localName&&d(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(f);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function _(e){e=window.wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function w(e){y(e,_)}var b=e.flags,g=e.forSubtree,y=e.forDocumentTree,E=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=E;var L=!1,M=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),N=Element.prototype.createShadowRoot;N&&(Element.prototype.createShadowRoot=function(){var e=N.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=w,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(d(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=l(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&_(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n); + +},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t=0&&g(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return w(e),e}}var m,v=e.isIE11OrOlder,_=e.upgradeDocumentTree,w=e.upgradeAll,b=e.upgradeWithDefinition,g=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],L={},M="http://www.w3.org/1999/xhtml",T=document.createElement.bind(document),N=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=h,e.registry=L,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){a(window.wrap(document)),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),window.CustomElements.ready=!0,setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,r=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements),"undefined"==typeof HTMLTemplateElement&&!function(){var e="template";HTMLTemplateElement=function(){},HTMLTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){e.content||(e.content=e.ownerDocument.createDocumentFragment());for(var t;t=e.firstChild;)e.content.appendChild(t)},HTMLTemplateElement.bootstrap=function(t){for(var n,r=t.querySelectorAll(e),o=0,i=r.length;i>o&&(n=r[o]);o++)HTMLTemplateElement.decorate(n)},window.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)});var t=document.createElement;document.createElement=function(){"use strict";var e=t.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e}}(),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents); \ No newline at end of file diff --git a/dashboard-ui/bower_components/webcomponentsjs/webcomponents.js b/dashboard-ui/bower_components/webcomponentsjs/webcomponents.js new file mode 100644 index 0000000000..6d7154174e --- /dev/null +++ b/dashboard-ui/bower_components/webcomponentsjs/webcomponents.js @@ -0,0 +1,7126 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version 0.7.5 +window.WebComponents = window.WebComponents || {}; + +(function(scope) { + var flags = scope.flags || {}; + var file = "webcomponents.js"; + var script = document.querySelector('script[src*="' + file + '"]'); + if (!flags.noOpts) { + location.search.slice(1).split("&").forEach(function(option) { + var parts = option.split("="); + var match; + if (parts[0] && (match = parts[0].match(/wc-(.+)/))) { + flags[match[1]] = parts[1] || true; + } + }); + if (script) { + for (var i = 0, a; a = script.attributes[i]; i++) { + if (a.name !== "src") { + flags[a.name] = a.value || true; + } + } + } + if (flags.log && flags.log.split) { + var parts = flags.log.split(","); + flags.log = {}; + parts.forEach(function(f) { + flags.log[f] = true; + }); + } else { + flags.log = {}; + } + } + flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill; + if (flags.shadow === "native") { + flags.shadow = false; + } else { + flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot; + } + if (flags.register) { + window.CustomElements = window.CustomElements || { + flags: {} + }; + window.CustomElements.flags.register = flags.register; + } + scope.flags = flags; +})(WebComponents); + +if (WebComponents.flags.shadow) { + if (typeof WeakMap === "undefined") { + (function() { + var defineProperty = Object.defineProperty; + var counter = Date.now() % 1e9; + var WeakMap = function() { + this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); + }; + WeakMap.prototype = { + set: function(key, value) { + var entry = key[this.name]; + if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { + value: [ key, value ], + writable: true + }); + return this; + }, + get: function(key) { + var entry; + return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; + }, + "delete": function(key) { + var entry = key[this.name]; + if (!entry || entry[0] !== key) return false; + entry[0] = entry[1] = undefined; + return true; + }, + has: function(key) { + var entry = key[this.name]; + if (!entry) return false; + return entry[0] === key; + } + }; + window.WeakMap = WeakMap; + })(); + } + window.ShadowDOMPolyfill = {}; + (function(scope) { + "use strict"; + var constructorTable = new WeakMap(); + var nativePrototypeTable = new WeakMap(); + var wrappers = Object.create(null); + function detectEval() { + if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) { + return false; + } + if (navigator.getDeviceStorage) { + return false; + } + try { + var f = new Function("return true;"); + return f(); + } catch (ex) { + return false; + } + } + var hasEval = detectEval(); + function assert(b) { + if (!b) throw new Error("Assertion failed"); + } + var defineProperty = Object.defineProperty; + var getOwnPropertyNames = Object.getOwnPropertyNames; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + function mixin(to, from) { + var names = getOwnPropertyNames(from); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + defineProperty(to, name, getOwnPropertyDescriptor(from, name)); + } + return to; + } + function mixinStatics(to, from) { + var names = getOwnPropertyNames(from); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + switch (name) { + case "arguments": + case "caller": + case "length": + case "name": + case "prototype": + case "toString": + continue; + } + defineProperty(to, name, getOwnPropertyDescriptor(from, name)); + } + return to; + } + function oneOf(object, propertyNames) { + for (var i = 0; i < propertyNames.length; i++) { + if (propertyNames[i] in object) return propertyNames[i]; + } + } + var nonEnumerableDataDescriptor = { + value: undefined, + configurable: true, + enumerable: false, + writable: true + }; + function defineNonEnumerableDataProperty(object, name, value) { + nonEnumerableDataDescriptor.value = value; + defineProperty(object, name, nonEnumerableDataDescriptor); + } + getOwnPropertyNames(window); + function getWrapperConstructor(node, opt_instance) { + var nativePrototype = node.__proto__ || Object.getPrototypeOf(node); + if (isFirefox) { + try { + getOwnPropertyNames(nativePrototype); + } catch (error) { + nativePrototype = nativePrototype.__proto__; + } + } + var wrapperConstructor = constructorTable.get(nativePrototype); + if (wrapperConstructor) return wrapperConstructor; + var parentWrapperConstructor = getWrapperConstructor(nativePrototype); + var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor); + registerInternal(nativePrototype, GeneratedWrapper, opt_instance); + return GeneratedWrapper; + } + function addForwardingProperties(nativePrototype, wrapperPrototype) { + installProperty(nativePrototype, wrapperPrototype, true); + } + function registerInstanceProperties(wrapperPrototype, instanceObject) { + installProperty(instanceObject, wrapperPrototype, false); + } + var isFirefox = /Firefox/.test(navigator.userAgent); + var dummyDescriptor = { + get: function() {}, + set: function(v) {}, + configurable: true, + enumerable: true + }; + function isEventHandlerName(name) { + return /^on[a-z]+$/.test(name); + } + function isIdentifierName(name) { + return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name); + } + function getGetter(name) { + return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() { + return this.__impl4cf1e782hg__[name]; + }; + } + function getSetter(name) { + return hasEval && isIdentifierName(name) ? new Function("v", "this.__impl4cf1e782hg__." + name + " = v") : function(v) { + this.__impl4cf1e782hg__[name] = v; + }; + } + function getMethod(name) { + return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name + ".apply(this.__impl4cf1e782hg__, arguments)") : function() { + return this.__impl4cf1e782hg__[name].apply(this.__impl4cf1e782hg__, arguments); + }; + } + function getDescriptor(source, name) { + try { + return Object.getOwnPropertyDescriptor(source, name); + } catch (ex) { + return dummyDescriptor; + } + } + var isBrokenSafari = function() { + var descr = Object.getOwnPropertyDescriptor(Node.prototype, "nodeType"); + return descr && !descr.get && !descr.set; + }(); + function installProperty(source, target, allowMethod, opt_blacklist) { + var names = getOwnPropertyNames(source); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + if (name === "polymerBlackList_") continue; + if (name in target) continue; + if (source.polymerBlackList_ && source.polymerBlackList_[name]) continue; + if (isFirefox) { + source.__lookupGetter__(name); + } + var descriptor = getDescriptor(source, name); + var getter, setter; + if (typeof descriptor.value === "function") { + if (allowMethod) { + target[name] = getMethod(name); + } + continue; + } + var isEvent = isEventHandlerName(name); + if (isEvent) getter = scope.getEventHandlerGetter(name); else getter = getGetter(name); + if (descriptor.writable || descriptor.set || isBrokenSafari) { + if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name); + } + var configurable = isBrokenSafari || descriptor.configurable; + defineProperty(target, name, { + get: getter, + set: setter, + configurable: configurable, + enumerable: descriptor.enumerable + }); + } + } + function register(nativeConstructor, wrapperConstructor, opt_instance) { + if (nativeConstructor == null) { + return; + } + var nativePrototype = nativeConstructor.prototype; + registerInternal(nativePrototype, wrapperConstructor, opt_instance); + mixinStatics(wrapperConstructor, nativeConstructor); + } + function registerInternal(nativePrototype, wrapperConstructor, opt_instance) { + var wrapperPrototype = wrapperConstructor.prototype; + assert(constructorTable.get(nativePrototype) === undefined); + constructorTable.set(nativePrototype, wrapperConstructor); + nativePrototypeTable.set(wrapperPrototype, nativePrototype); + addForwardingProperties(nativePrototype, wrapperPrototype); + if (opt_instance) registerInstanceProperties(wrapperPrototype, opt_instance); + defineNonEnumerableDataProperty(wrapperPrototype, "constructor", wrapperConstructor); + wrapperConstructor.prototype = wrapperPrototype; + } + function isWrapperFor(wrapperConstructor, nativeConstructor) { + return constructorTable.get(nativeConstructor.prototype) === wrapperConstructor; + } + function registerObject(object) { + var nativePrototype = Object.getPrototypeOf(object); + var superWrapperConstructor = getWrapperConstructor(nativePrototype); + var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor); + registerInternal(nativePrototype, GeneratedWrapper, object); + return GeneratedWrapper; + } + function createWrapperConstructor(superWrapperConstructor) { + function GeneratedWrapper(node) { + superWrapperConstructor.call(this, node); + } + var p = Object.create(superWrapperConstructor.prototype); + p.constructor = GeneratedWrapper; + GeneratedWrapper.prototype = p; + return GeneratedWrapper; + } + function isWrapper(object) { + return object && object.__impl4cf1e782hg__; + } + function isNative(object) { + return !isWrapper(object); + } + function wrap(impl) { + if (impl === null) return null; + assert(isNative(impl)); + var wrapper = impl.__wrapper8e3dd93a60__; + if (wrapper != null) { + return wrapper; + } + return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl); + } + function unwrap(wrapper) { + if (wrapper === null) return null; + assert(isWrapper(wrapper)); + return wrapper.__impl4cf1e782hg__; + } + function unsafeUnwrap(wrapper) { + return wrapper.__impl4cf1e782hg__; + } + function setWrapper(impl, wrapper) { + wrapper.__impl4cf1e782hg__ = impl; + impl.__wrapper8e3dd93a60__ = wrapper; + } + function unwrapIfNeeded(object) { + return object && isWrapper(object) ? unwrap(object) : object; + } + function wrapIfNeeded(object) { + return object && !isWrapper(object) ? wrap(object) : object; + } + function rewrap(node, wrapper) { + if (wrapper === null) return; + assert(isNative(node)); + assert(wrapper === undefined || isWrapper(wrapper)); + node.__wrapper8e3dd93a60__ = wrapper; + } + var getterDescriptor = { + get: undefined, + configurable: true, + enumerable: true + }; + function defineGetter(constructor, name, getter) { + getterDescriptor.get = getter; + defineProperty(constructor.prototype, name, getterDescriptor); + } + function defineWrapGetter(constructor, name) { + defineGetter(constructor, name, function() { + return wrap(this.__impl4cf1e782hg__[name]); + }); + } + function forwardMethodsToWrapper(constructors, names) { + constructors.forEach(function(constructor) { + names.forEach(function(name) { + constructor.prototype[name] = function() { + var w = wrapIfNeeded(this); + return w[name].apply(w, arguments); + }; + }); + }); + } + scope.assert = assert; + scope.constructorTable = constructorTable; + scope.defineGetter = defineGetter; + scope.defineWrapGetter = defineWrapGetter; + scope.forwardMethodsToWrapper = forwardMethodsToWrapper; + scope.isIdentifierName = isIdentifierName; + scope.isWrapper = isWrapper; + scope.isWrapperFor = isWrapperFor; + scope.mixin = mixin; + scope.nativePrototypeTable = nativePrototypeTable; + scope.oneOf = oneOf; + scope.registerObject = registerObject; + scope.registerWrapper = register; + scope.rewrap = rewrap; + scope.setWrapper = setWrapper; + scope.unsafeUnwrap = unsafeUnwrap; + scope.unwrap = unwrap; + scope.unwrapIfNeeded = unwrapIfNeeded; + scope.wrap = wrap; + scope.wrapIfNeeded = wrapIfNeeded; + scope.wrappers = wrappers; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + function newSplice(index, removed, addedCount) { + return { + index: index, + removed: removed, + addedCount: addedCount + }; + } + var EDIT_LEAVE = 0; + var EDIT_UPDATE = 1; + var EDIT_ADD = 2; + var EDIT_DELETE = 3; + function ArraySplice() {} + ArraySplice.prototype = { + calcEditDistances: function(current, currentStart, currentEnd, old, oldStart, oldEnd) { + var rowCount = oldEnd - oldStart + 1; + var columnCount = currentEnd - currentStart + 1; + var distances = new Array(rowCount); + for (var i = 0; i < rowCount; i++) { + distances[i] = new Array(columnCount); + distances[i][0] = i; + } + for (var j = 0; j < columnCount; j++) distances[0][j] = j; + for (var i = 1; i < rowCount; i++) { + for (var j = 1; j < columnCount; j++) { + if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1])) distances[i][j] = distances[i - 1][j - 1]; else { + var north = distances[i - 1][j] + 1; + var west = distances[i][j - 1] + 1; + distances[i][j] = north < west ? north : west; + } + } + } + return distances; + }, + spliceOperationsFromEditDistances: function(distances) { + var i = distances.length - 1; + var j = distances[0].length - 1; + var current = distances[i][j]; + var edits = []; + while (i > 0 || j > 0) { + if (i == 0) { + edits.push(EDIT_ADD); + j--; + continue; + } + if (j == 0) { + edits.push(EDIT_DELETE); + i--; + continue; + } + var northWest = distances[i - 1][j - 1]; + var west = distances[i - 1][j]; + var north = distances[i][j - 1]; + var min; + if (west < north) min = west < northWest ? west : northWest; else min = north < northWest ? north : northWest; + if (min == northWest) { + if (northWest == current) { + edits.push(EDIT_LEAVE); + } else { + edits.push(EDIT_UPDATE); + current = northWest; + } + i--; + j--; + } else if (min == west) { + edits.push(EDIT_DELETE); + i--; + current = west; + } else { + edits.push(EDIT_ADD); + j--; + current = north; + } + } + edits.reverse(); + return edits; + }, + calcSplices: function(current, currentStart, currentEnd, old, oldStart, oldEnd) { + var prefixCount = 0; + var suffixCount = 0; + var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart); + if (currentStart == 0 && oldStart == 0) prefixCount = this.sharedPrefix(current, old, minLength); + if (currentEnd == current.length && oldEnd == old.length) suffixCount = this.sharedSuffix(current, old, minLength - prefixCount); + currentStart += prefixCount; + oldStart += prefixCount; + currentEnd -= suffixCount; + oldEnd -= suffixCount; + if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) return []; + if (currentStart == currentEnd) { + var splice = newSplice(currentStart, [], 0); + while (oldStart < oldEnd) splice.removed.push(old[oldStart++]); + return [ splice ]; + } else if (oldStart == oldEnd) return [ newSplice(currentStart, [], currentEnd - currentStart) ]; + var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd)); + var splice = undefined; + var splices = []; + var index = currentStart; + var oldIndex = oldStart; + for (var i = 0; i < ops.length; i++) { + switch (ops[i]) { + case EDIT_LEAVE: + if (splice) { + splices.push(splice); + splice = undefined; + } + index++; + oldIndex++; + break; + + case EDIT_UPDATE: + if (!splice) splice = newSplice(index, [], 0); + splice.addedCount++; + index++; + splice.removed.push(old[oldIndex]); + oldIndex++; + break; + + case EDIT_ADD: + if (!splice) splice = newSplice(index, [], 0); + splice.addedCount++; + index++; + break; + + case EDIT_DELETE: + if (!splice) splice = newSplice(index, [], 0); + splice.removed.push(old[oldIndex]); + oldIndex++; + break; + } + } + if (splice) { + splices.push(splice); + } + return splices; + }, + sharedPrefix: function(current, old, searchLength) { + for (var i = 0; i < searchLength; i++) if (!this.equals(current[i], old[i])) return i; + return searchLength; + }, + sharedSuffix: function(current, old, searchLength) { + var index1 = current.length; + var index2 = old.length; + var count = 0; + while (count < searchLength && this.equals(current[--index1], old[--index2])) count++; + return count; + }, + calculateSplices: function(current, previous) { + return this.calcSplices(current, 0, current.length, previous, 0, previous.length); + }, + equals: function(currentValue, previousValue) { + return currentValue === previousValue; + } + }; + scope.ArraySplice = ArraySplice; + })(window.ShadowDOMPolyfill); + (function(context) { + "use strict"; + var OriginalMutationObserver = window.MutationObserver; + var callbacks = []; + var pending = false; + var timerFunc; + function handle() { + pending = false; + var copies = callbacks.slice(0); + callbacks = []; + for (var i = 0; i < copies.length; i++) { + (0, copies[i])(); + } + } + if (OriginalMutationObserver) { + var counter = 1; + var observer = new OriginalMutationObserver(handle); + var textNode = document.createTextNode(counter); + observer.observe(textNode, { + characterData: true + }); + timerFunc = function() { + counter = (counter + 1) % 2; + textNode.data = counter; + }; + } else { + timerFunc = window.setTimeout; + } + function setEndOfMicrotask(func) { + callbacks.push(func); + if (pending) return; + pending = true; + timerFunc(handle, 0); + } + context.setEndOfMicrotask = setEndOfMicrotask; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var setEndOfMicrotask = scope.setEndOfMicrotask; + var wrapIfNeeded = scope.wrapIfNeeded; + var wrappers = scope.wrappers; + var registrationsTable = new WeakMap(); + var globalMutationObservers = []; + var isScheduled = false; + function scheduleCallback(observer) { + if (observer.scheduled_) return; + observer.scheduled_ = true; + globalMutationObservers.push(observer); + if (isScheduled) return; + setEndOfMicrotask(notifyObservers); + isScheduled = true; + } + function notifyObservers() { + isScheduled = false; + while (globalMutationObservers.length) { + var notifyList = globalMutationObservers; + globalMutationObservers = []; + notifyList.sort(function(x, y) { + return x.uid_ - y.uid_; + }); + for (var i = 0; i < notifyList.length; i++) { + var mo = notifyList[i]; + mo.scheduled_ = false; + var queue = mo.takeRecords(); + removeTransientObserversFor(mo); + if (queue.length) { + mo.callback_(queue, mo); + } + } + } + } + function MutationRecord(type, target) { + this.type = type; + this.target = target; + this.addedNodes = new wrappers.NodeList(); + this.removedNodes = new wrappers.NodeList(); + this.previousSibling = null; + this.nextSibling = null; + this.attributeName = null; + this.attributeNamespace = null; + this.oldValue = null; + } + function registerTransientObservers(ancestor, node) { + for (;ancestor; ancestor = ancestor.parentNode) { + var registrations = registrationsTable.get(ancestor); + if (!registrations) continue; + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.options.subtree) registration.addTransientObserver(node); + } + } + } + function removeTransientObserversFor(observer) { + for (var i = 0; i < observer.nodes_.length; i++) { + var node = observer.nodes_[i]; + var registrations = registrationsTable.get(node); + if (!registrations) return; + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + if (registration.observer === observer) registration.removeTransientObservers(); + } + } + } + function enqueueMutation(target, type, data) { + var interestedObservers = Object.create(null); + var associatedStrings = Object.create(null); + for (var node = target; node; node = node.parentNode) { + var registrations = registrationsTable.get(node); + if (!registrations) continue; + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + var options = registration.options; + if (node !== target && !options.subtree) continue; + if (type === "attributes" && !options.attributes) continue; + if (type === "attributes" && options.attributeFilter && (data.namespace !== null || options.attributeFilter.indexOf(data.name) === -1)) { + continue; + } + if (type === "characterData" && !options.characterData) continue; + if (type === "childList" && !options.childList) continue; + var observer = registration.observer; + interestedObservers[observer.uid_] = observer; + if (type === "attributes" && options.attributeOldValue || type === "characterData" && options.characterDataOldValue) { + associatedStrings[observer.uid_] = data.oldValue; + } + } + } + for (var uid in interestedObservers) { + var observer = interestedObservers[uid]; + var record = new MutationRecord(type, target); + if ("name" in data && "namespace" in data) { + record.attributeName = data.name; + record.attributeNamespace = data.namespace; + } + if (data.addedNodes) record.addedNodes = data.addedNodes; + if (data.removedNodes) record.removedNodes = data.removedNodes; + if (data.previousSibling) record.previousSibling = data.previousSibling; + if (data.nextSibling) record.nextSibling = data.nextSibling; + if (associatedStrings[uid] !== undefined) record.oldValue = associatedStrings[uid]; + scheduleCallback(observer); + observer.records_.push(record); + } + } + var slice = Array.prototype.slice; + function MutationObserverOptions(options) { + this.childList = !!options.childList; + this.subtree = !!options.subtree; + if (!("attributes" in options) && ("attributeOldValue" in options || "attributeFilter" in options)) { + this.attributes = true; + } else { + this.attributes = !!options.attributes; + } + if ("characterDataOldValue" in options && !("characterData" in options)) this.characterData = true; else this.characterData = !!options.characterData; + if (!this.attributes && (options.attributeOldValue || "attributeFilter" in options) || !this.characterData && options.characterDataOldValue) { + throw new TypeError(); + } + this.characterData = !!options.characterData; + this.attributeOldValue = !!options.attributeOldValue; + this.characterDataOldValue = !!options.characterDataOldValue; + if ("attributeFilter" in options) { + if (options.attributeFilter == null || typeof options.attributeFilter !== "object") { + throw new TypeError(); + } + this.attributeFilter = slice.call(options.attributeFilter); + } else { + this.attributeFilter = null; + } + } + var uidCounter = 0; + function MutationObserver(callback) { + this.callback_ = callback; + this.nodes_ = []; + this.records_ = []; + this.uid_ = ++uidCounter; + this.scheduled_ = false; + } + MutationObserver.prototype = { + constructor: MutationObserver, + observe: function(target, options) { + target = wrapIfNeeded(target); + var newOptions = new MutationObserverOptions(options); + var registration; + var registrations = registrationsTable.get(target); + if (!registrations) registrationsTable.set(target, registrations = []); + for (var i = 0; i < registrations.length; i++) { + if (registrations[i].observer === this) { + registration = registrations[i]; + registration.removeTransientObservers(); + registration.options = newOptions; + } + } + if (!registration) { + registration = new Registration(this, target, newOptions); + registrations.push(registration); + this.nodes_.push(target); + } + }, + disconnect: function() { + this.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.observer === this) { + registrations.splice(i, 1); + break; + } + } + }, this); + this.records_ = []; + }, + takeRecords: function() { + var copyOfRecords = this.records_; + this.records_ = []; + return copyOfRecords; + } + }; + function Registration(observer, target, options) { + this.observer = observer; + this.target = target; + this.options = options; + this.transientObservedNodes = []; + } + Registration.prototype = { + addTransientObserver: function(node) { + if (node === this.target) return; + scheduleCallback(this.observer); + this.transientObservedNodes.push(node); + var registrations = registrationsTable.get(node); + if (!registrations) registrationsTable.set(node, registrations = []); + registrations.push(this); + }, + removeTransientObservers: function() { + var transientObservedNodes = this.transientObservedNodes; + this.transientObservedNodes = []; + for (var i = 0; i < transientObservedNodes.length; i++) { + var node = transientObservedNodes[i]; + var registrations = registrationsTable.get(node); + for (var j = 0; j < registrations.length; j++) { + if (registrations[j] === this) { + registrations.splice(j, 1); + break; + } + } + } + } + }; + scope.enqueueMutation = enqueueMutation; + scope.registerTransientObservers = registerTransientObservers; + scope.wrappers.MutationObserver = MutationObserver; + scope.wrappers.MutationRecord = MutationRecord; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + function TreeScope(root, parent) { + this.root = root; + this.parent = parent; + } + TreeScope.prototype = { + get renderer() { + if (this.root instanceof scope.wrappers.ShadowRoot) { + return scope.getRendererForHost(this.root.host); + } + return null; + }, + contains: function(treeScope) { + for (;treeScope; treeScope = treeScope.parent) { + if (treeScope === this) return true; + } + return false; + } + }; + function setTreeScope(node, treeScope) { + if (node.treeScope_ !== treeScope) { + node.treeScope_ = treeScope; + for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) { + sr.treeScope_.parent = treeScope; + } + for (var child = node.firstChild; child; child = child.nextSibling) { + setTreeScope(child, treeScope); + } + } + } + function getTreeScope(node) { + if (node instanceof scope.wrappers.Window) { + debugger; + } + if (node.treeScope_) return node.treeScope_; + var parent = node.parentNode; + var treeScope; + if (parent) treeScope = getTreeScope(parent); else treeScope = new TreeScope(node, null); + return node.treeScope_ = treeScope; + } + scope.TreeScope = TreeScope; + scope.getTreeScope = getTreeScope; + scope.setTreeScope = setTreeScope; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var forwardMethodsToWrapper = scope.forwardMethodsToWrapper; + var getTreeScope = scope.getTreeScope; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrappers = scope.wrappers; + var wrappedFuns = new WeakMap(); + var listenersTable = new WeakMap(); + var handledEventsTable = new WeakMap(); + var currentlyDispatchingEvents = new WeakMap(); + var targetTable = new WeakMap(); + var currentTargetTable = new WeakMap(); + var relatedTargetTable = new WeakMap(); + var eventPhaseTable = new WeakMap(); + var stopPropagationTable = new WeakMap(); + var stopImmediatePropagationTable = new WeakMap(); + var eventHandlersTable = new WeakMap(); + var eventPathTable = new WeakMap(); + function isShadowRoot(node) { + return node instanceof wrappers.ShadowRoot; + } + function rootOfNode(node) { + return getTreeScope(node).root; + } + function getEventPath(node, event) { + var path = []; + var current = node; + path.push(current); + while (current) { + var destinationInsertionPoints = getDestinationInsertionPoints(current); + if (destinationInsertionPoints && destinationInsertionPoints.length > 0) { + for (var i = 0; i < destinationInsertionPoints.length; i++) { + var insertionPoint = destinationInsertionPoints[i]; + if (isShadowInsertionPoint(insertionPoint)) { + var shadowRoot = rootOfNode(insertionPoint); + var olderShadowRoot = shadowRoot.olderShadowRoot; + if (olderShadowRoot) path.push(olderShadowRoot); + } + path.push(insertionPoint); + } + current = destinationInsertionPoints[destinationInsertionPoints.length - 1]; + } else { + if (isShadowRoot(current)) { + if (inSameTree(node, current) && eventMustBeStopped(event)) { + break; + } + current = current.host; + path.push(current); + } else { + current = current.parentNode; + if (current) path.push(current); + } + } + } + return path; + } + function eventMustBeStopped(event) { + if (!event) return false; + switch (event.type) { + case "abort": + case "error": + case "select": + case "change": + case "load": + case "reset": + case "resize": + case "scroll": + case "selectstart": + return true; + } + return false; + } + function isShadowInsertionPoint(node) { + return node instanceof HTMLShadowElement; + } + function getDestinationInsertionPoints(node) { + return scope.getDestinationInsertionPoints(node); + } + function eventRetargetting(path, currentTarget) { + if (path.length === 0) return currentTarget; + if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document; + var currentTargetTree = getTreeScope(currentTarget); + var originalTarget = path[0]; + var originalTargetTree = getTreeScope(originalTarget); + var relativeTargetTree = lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree); + for (var i = 0; i < path.length; i++) { + var node = path[i]; + if (getTreeScope(node) === relativeTargetTree) return node; + } + return path[path.length - 1]; + } + function getTreeScopeAncestors(treeScope) { + var ancestors = []; + for (;treeScope; treeScope = treeScope.parent) { + ancestors.push(treeScope); + } + return ancestors; + } + function lowestCommonInclusiveAncestor(tsA, tsB) { + var ancestorsA = getTreeScopeAncestors(tsA); + var ancestorsB = getTreeScopeAncestors(tsB); + var result = null; + while (ancestorsA.length > 0 && ancestorsB.length > 0) { + var a = ancestorsA.pop(); + var b = ancestorsB.pop(); + if (a === b) result = a; else break; + } + return result; + } + function getTreeScopeRoot(ts) { + if (!ts.parent) return ts; + return getTreeScopeRoot(ts.parent); + } + function relatedTargetResolution(event, currentTarget, relatedTarget) { + if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document; + var currentTargetTree = getTreeScope(currentTarget); + var relatedTargetTree = getTreeScope(relatedTarget); + var relatedTargetEventPath = getEventPath(relatedTarget, event); + var lowestCommonAncestorTree; + var lowestCommonAncestorTree = lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree); + if (!lowestCommonAncestorTree) lowestCommonAncestorTree = relatedTargetTree.root; + for (var commonAncestorTree = lowestCommonAncestorTree; commonAncestorTree; commonAncestorTree = commonAncestorTree.parent) { + var adjustedRelatedTarget; + for (var i = 0; i < relatedTargetEventPath.length; i++) { + var node = relatedTargetEventPath[i]; + if (getTreeScope(node) === commonAncestorTree) return node; + } + } + return null; + } + function inSameTree(a, b) { + return getTreeScope(a) === getTreeScope(b); + } + var NONE = 0; + var CAPTURING_PHASE = 1; + var AT_TARGET = 2; + var BUBBLING_PHASE = 3; + var pendingError; + function dispatchOriginalEvent(originalEvent) { + if (handledEventsTable.get(originalEvent)) return; + handledEventsTable.set(originalEvent, true); + dispatchEvent(wrap(originalEvent), wrap(originalEvent.target)); + if (pendingError) { + var err = pendingError; + pendingError = null; + throw err; + } + } + function isLoadLikeEvent(event) { + switch (event.type) { + case "load": + case "beforeunload": + case "unload": + return true; + } + return false; + } + function dispatchEvent(event, originalWrapperTarget) { + if (currentlyDispatchingEvents.get(event)) throw new Error("InvalidStateError"); + currentlyDispatchingEvents.set(event, true); + scope.renderAllPending(); + var eventPath; + var overrideTarget; + var win; + if (isLoadLikeEvent(event) && !event.bubbles) { + var doc = originalWrapperTarget; + if (doc instanceof wrappers.Document && (win = doc.defaultView)) { + overrideTarget = doc; + eventPath = []; + } + } + if (!eventPath) { + if (originalWrapperTarget instanceof wrappers.Window) { + win = originalWrapperTarget; + eventPath = []; + } else { + eventPath = getEventPath(originalWrapperTarget, event); + if (!isLoadLikeEvent(event)) { + var doc = eventPath[eventPath.length - 1]; + if (doc instanceof wrappers.Document) win = doc.defaultView; + } + } + } + eventPathTable.set(event, eventPath); + if (dispatchCapturing(event, eventPath, win, overrideTarget)) { + if (dispatchAtTarget(event, eventPath, win, overrideTarget)) { + dispatchBubbling(event, eventPath, win, overrideTarget); + } + } + eventPhaseTable.set(event, NONE); + currentTargetTable.delete(event, null); + currentlyDispatchingEvents.delete(event); + return event.defaultPrevented; + } + function dispatchCapturing(event, eventPath, win, overrideTarget) { + var phase = CAPTURING_PHASE; + if (win) { + if (!invoke(win, event, phase, eventPath, overrideTarget)) return false; + } + for (var i = eventPath.length - 1; i > 0; i--) { + if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return false; + } + return true; + } + function dispatchAtTarget(event, eventPath, win, overrideTarget) { + var phase = AT_TARGET; + var currentTarget = eventPath[0] || win; + return invoke(currentTarget, event, phase, eventPath, overrideTarget); + } + function dispatchBubbling(event, eventPath, win, overrideTarget) { + var phase = BUBBLING_PHASE; + for (var i = 1; i < eventPath.length; i++) { + if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return; + } + if (win && eventPath.length > 0) { + invoke(win, event, phase, eventPath, overrideTarget); + } + } + function invoke(currentTarget, event, phase, eventPath, overrideTarget) { + var listeners = listenersTable.get(currentTarget); + if (!listeners) return true; + var target = overrideTarget || eventRetargetting(eventPath, currentTarget); + if (target === currentTarget) { + if (phase === CAPTURING_PHASE) return true; + if (phase === BUBBLING_PHASE) phase = AT_TARGET; + } else if (phase === BUBBLING_PHASE && !event.bubbles) { + return true; + } + if ("relatedTarget" in event) { + var originalEvent = unwrap(event); + var unwrappedRelatedTarget = originalEvent.relatedTarget; + if (unwrappedRelatedTarget) { + if (unwrappedRelatedTarget instanceof Object && unwrappedRelatedTarget.addEventListener) { + var relatedTarget = wrap(unwrappedRelatedTarget); + var adjusted = relatedTargetResolution(event, currentTarget, relatedTarget); + if (adjusted === target) return true; + } else { + adjusted = null; + } + relatedTargetTable.set(event, adjusted); + } + } + eventPhaseTable.set(event, phase); + var type = event.type; + var anyRemoved = false; + targetTable.set(event, target); + currentTargetTable.set(event, currentTarget); + listeners.depth++; + for (var i = 0, len = listeners.length; i < len; i++) { + var listener = listeners[i]; + if (listener.removed) { + anyRemoved = true; + continue; + } + if (listener.type !== type || !listener.capture && phase === CAPTURING_PHASE || listener.capture && phase === BUBBLING_PHASE) { + continue; + } + try { + if (typeof listener.handler === "function") listener.handler.call(currentTarget, event); else listener.handler.handleEvent(event); + if (stopImmediatePropagationTable.get(event)) return false; + } catch (ex) { + if (!pendingError) pendingError = ex; + } + } + listeners.depth--; + if (anyRemoved && listeners.depth === 0) { + var copy = listeners.slice(); + listeners.length = 0; + for (var i = 0; i < copy.length; i++) { + if (!copy[i].removed) listeners.push(copy[i]); + } + } + return !stopPropagationTable.get(event); + } + function Listener(type, handler, capture) { + this.type = type; + this.handler = handler; + this.capture = Boolean(capture); + } + Listener.prototype = { + equals: function(that) { + return this.handler === that.handler && this.type === that.type && this.capture === that.capture; + }, + get removed() { + return this.handler === null; + }, + remove: function() { + this.handler = null; + } + }; + var OriginalEvent = window.Event; + OriginalEvent.prototype.polymerBlackList_ = { + returnValue: true, + keyLocation: true + }; + function Event(type, options) { + if (type instanceof OriginalEvent) { + var impl = type; + if (!OriginalBeforeUnloadEvent && impl.type === "beforeunload" && !(this instanceof BeforeUnloadEvent)) { + return new BeforeUnloadEvent(impl); + } + setWrapper(impl, this); + } else { + return wrap(constructEvent(OriginalEvent, "Event", type, options)); + } + } + Event.prototype = { + get target() { + return targetTable.get(this); + }, + get currentTarget() { + return currentTargetTable.get(this); + }, + get eventPhase() { + return eventPhaseTable.get(this); + }, + get path() { + var eventPath = eventPathTable.get(this); + if (!eventPath) return []; + return eventPath.slice(); + }, + stopPropagation: function() { + stopPropagationTable.set(this, true); + }, + stopImmediatePropagation: function() { + stopPropagationTable.set(this, true); + stopImmediatePropagationTable.set(this, true); + } + }; + registerWrapper(OriginalEvent, Event, document.createEvent("Event")); + function unwrapOptions(options) { + if (!options || !options.relatedTarget) return options; + return Object.create(options, { + relatedTarget: { + value: unwrap(options.relatedTarget) + } + }); + } + function registerGenericEvent(name, SuperEvent, prototype) { + var OriginalEvent = window[name]; + var GenericEvent = function(type, options) { + if (type instanceof OriginalEvent) setWrapper(type, this); else return wrap(constructEvent(OriginalEvent, name, type, options)); + }; + GenericEvent.prototype = Object.create(SuperEvent.prototype); + if (prototype) mixin(GenericEvent.prototype, prototype); + if (OriginalEvent) { + try { + registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent("temp")); + } catch (ex) { + registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name)); + } + } + return GenericEvent; + } + var UIEvent = registerGenericEvent("UIEvent", Event); + var CustomEvent = registerGenericEvent("CustomEvent", Event); + var relatedTargetProto = { + get relatedTarget() { + var relatedTarget = relatedTargetTable.get(this); + if (relatedTarget !== undefined) return relatedTarget; + return wrap(unwrap(this).relatedTarget); + } + }; + function getInitFunction(name, relatedTargetIndex) { + return function() { + arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]); + var impl = unwrap(this); + impl[name].apply(impl, arguments); + }; + } + var mouseEventProto = mixin({ + initMouseEvent: getInitFunction("initMouseEvent", 14) + }, relatedTargetProto); + var focusEventProto = mixin({ + initFocusEvent: getInitFunction("initFocusEvent", 5) + }, relatedTargetProto); + var MouseEvent = registerGenericEvent("MouseEvent", UIEvent, mouseEventProto); + var FocusEvent = registerGenericEvent("FocusEvent", UIEvent, focusEventProto); + var defaultInitDicts = Object.create(null); + var supportsEventConstructors = function() { + try { + new window.FocusEvent("focus"); + } catch (ex) { + return false; + } + return true; + }(); + function constructEvent(OriginalEvent, name, type, options) { + if (supportsEventConstructors) return new OriginalEvent(type, unwrapOptions(options)); + var event = unwrap(document.createEvent(name)); + var defaultDict = defaultInitDicts[name]; + var args = [ type ]; + Object.keys(defaultDict).forEach(function(key) { + var v = options != null && key in options ? options[key] : defaultDict[key]; + if (key === "relatedTarget") v = unwrap(v); + args.push(v); + }); + event["init" + name].apply(event, args); + return event; + } + if (!supportsEventConstructors) { + var configureEventConstructor = function(name, initDict, superName) { + if (superName) { + var superDict = defaultInitDicts[superName]; + initDict = mixin(mixin({}, superDict), initDict); + } + defaultInitDicts[name] = initDict; + }; + configureEventConstructor("Event", { + bubbles: false, + cancelable: false + }); + configureEventConstructor("CustomEvent", { + detail: null + }, "Event"); + configureEventConstructor("UIEvent", { + view: null, + detail: 0 + }, "Event"); + configureEventConstructor("MouseEvent", { + screenX: 0, + screenY: 0, + clientX: 0, + clientY: 0, + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false, + button: 0, + relatedTarget: null + }, "UIEvent"); + configureEventConstructor("FocusEvent", { + relatedTarget: null + }, "UIEvent"); + } + var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent; + function BeforeUnloadEvent(impl) { + Event.call(this, impl); + } + BeforeUnloadEvent.prototype = Object.create(Event.prototype); + mixin(BeforeUnloadEvent.prototype, { + get returnValue() { + return unsafeUnwrap(this).returnValue; + }, + set returnValue(v) { + unsafeUnwrap(this).returnValue = v; + } + }); + if (OriginalBeforeUnloadEvent) registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent); + function isValidListener(fun) { + if (typeof fun === "function") return true; + return fun && fun.handleEvent; + } + function isMutationEvent(type) { + switch (type) { + case "DOMAttrModified": + case "DOMAttributeNameChanged": + case "DOMCharacterDataModified": + case "DOMElementNameChanged": + case "DOMNodeInserted": + case "DOMNodeInsertedIntoDocument": + case "DOMNodeRemoved": + case "DOMNodeRemovedFromDocument": + case "DOMSubtreeModified": + return true; + } + return false; + } + var OriginalEventTarget = window.EventTarget; + function EventTarget(impl) { + setWrapper(impl, this); + } + var methodNames = [ "addEventListener", "removeEventListener", "dispatchEvent" ]; + [ Node, Window ].forEach(function(constructor) { + var p = constructor.prototype; + methodNames.forEach(function(name) { + Object.defineProperty(p, name + "_", { + value: p[name] + }); + }); + }); + function getTargetToListenAt(wrapper) { + if (wrapper instanceof wrappers.ShadowRoot) wrapper = wrapper.host; + return unwrap(wrapper); + } + EventTarget.prototype = { + addEventListener: function(type, fun, capture) { + if (!isValidListener(fun) || isMutationEvent(type)) return; + var listener = new Listener(type, fun, capture); + var listeners = listenersTable.get(this); + if (!listeners) { + listeners = []; + listeners.depth = 0; + listenersTable.set(this, listeners); + } else { + for (var i = 0; i < listeners.length; i++) { + if (listener.equals(listeners[i])) return; + } + } + listeners.push(listener); + var target = getTargetToListenAt(this); + target.addEventListener_(type, dispatchOriginalEvent, true); + }, + removeEventListener: function(type, fun, capture) { + capture = Boolean(capture); + var listeners = listenersTable.get(this); + if (!listeners) return; + var count = 0, found = false; + for (var i = 0; i < listeners.length; i++) { + if (listeners[i].type === type && listeners[i].capture === capture) { + count++; + if (listeners[i].handler === fun) { + found = true; + listeners[i].remove(); + } + } + } + if (found && count === 1) { + var target = getTargetToListenAt(this); + target.removeEventListener_(type, dispatchOriginalEvent, true); + } + }, + dispatchEvent: function(event) { + var nativeEvent = unwrap(event); + var eventType = nativeEvent.type; + handledEventsTable.set(nativeEvent, false); + scope.renderAllPending(); + var tempListener; + if (!hasListenerInAncestors(this, eventType)) { + tempListener = function() {}; + this.addEventListener(eventType, tempListener, true); + } + try { + return unwrap(this).dispatchEvent_(nativeEvent); + } finally { + if (tempListener) this.removeEventListener(eventType, tempListener, true); + } + } + }; + function hasListener(node, type) { + var listeners = listenersTable.get(node); + if (listeners) { + for (var i = 0; i < listeners.length; i++) { + if (!listeners[i].removed && listeners[i].type === type) return true; + } + } + return false; + } + function hasListenerInAncestors(target, type) { + for (var node = unwrap(target); node; node = node.parentNode) { + if (hasListener(wrap(node), type)) return true; + } + return false; + } + if (OriginalEventTarget) registerWrapper(OriginalEventTarget, EventTarget); + function wrapEventTargetMethods(constructors) { + forwardMethodsToWrapper(constructors, methodNames); + } + var originalElementFromPoint = document.elementFromPoint; + function elementFromPoint(self, document, x, y) { + scope.renderAllPending(); + var element = wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y)); + if (!element) return null; + var path = getEventPath(element, null); + var idx = path.lastIndexOf(self); + if (idx == -1) return null; else path = path.slice(0, idx); + return eventRetargetting(path, self); + } + function getEventHandlerGetter(name) { + return function() { + var inlineEventHandlers = eventHandlersTable.get(this); + return inlineEventHandlers && inlineEventHandlers[name] && inlineEventHandlers[name].value || null; + }; + } + function getEventHandlerSetter(name) { + var eventType = name.slice(2); + return function(value) { + var inlineEventHandlers = eventHandlersTable.get(this); + if (!inlineEventHandlers) { + inlineEventHandlers = Object.create(null); + eventHandlersTable.set(this, inlineEventHandlers); + } + var old = inlineEventHandlers[name]; + if (old) this.removeEventListener(eventType, old.wrapped, false); + if (typeof value === "function") { + var wrapped = function(e) { + var rv = value.call(this, e); + if (rv === false) e.preventDefault(); else if (name === "onbeforeunload" && typeof rv === "string") e.returnValue = rv; + }; + this.addEventListener(eventType, wrapped, false); + inlineEventHandlers[name] = { + value: value, + wrapped: wrapped + }; + } + }; + } + scope.elementFromPoint = elementFromPoint; + scope.getEventHandlerGetter = getEventHandlerGetter; + scope.getEventHandlerSetter = getEventHandlerSetter; + scope.wrapEventTargetMethods = wrapEventTargetMethods; + scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent; + scope.wrappers.CustomEvent = CustomEvent; + scope.wrappers.Event = Event; + scope.wrappers.EventTarget = EventTarget; + scope.wrappers.FocusEvent = FocusEvent; + scope.wrappers.MouseEvent = MouseEvent; + scope.wrappers.UIEvent = UIEvent; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var UIEvent = scope.wrappers.UIEvent; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var OriginalTouchEvent = window.TouchEvent; + if (!OriginalTouchEvent) return; + var nativeEvent; + try { + nativeEvent = document.createEvent("TouchEvent"); + } catch (ex) { + return; + } + var nonEnumDescriptor = { + enumerable: false + }; + function nonEnum(obj, prop) { + Object.defineProperty(obj, prop, nonEnumDescriptor); + } + function Touch(impl) { + setWrapper(impl, this); + } + Touch.prototype = { + get target() { + return wrap(unsafeUnwrap(this).target); + } + }; + var descr = { + configurable: true, + enumerable: true, + get: null + }; + [ "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "identifier", "webkitRadiusX", "webkitRadiusY", "webkitRotationAngle", "webkitForce" ].forEach(function(name) { + descr.get = function() { + return unsafeUnwrap(this)[name]; + }; + Object.defineProperty(Touch.prototype, name, descr); + }); + function TouchList() { + this.length = 0; + nonEnum(this, "length"); + } + TouchList.prototype = { + item: function(index) { + return this[index]; + } + }; + function wrapTouchList(nativeTouchList) { + var list = new TouchList(); + for (var i = 0; i < nativeTouchList.length; i++) { + list[i] = new Touch(nativeTouchList[i]); + } + list.length = i; + return list; + } + function TouchEvent(impl) { + UIEvent.call(this, impl); + } + TouchEvent.prototype = Object.create(UIEvent.prototype); + mixin(TouchEvent.prototype, { + get touches() { + return wrapTouchList(unsafeUnwrap(this).touches); + }, + get targetTouches() { + return wrapTouchList(unsafeUnwrap(this).targetTouches); + }, + get changedTouches() { + return wrapTouchList(unsafeUnwrap(this).changedTouches); + }, + initTouchEvent: function() { + throw new Error("Not implemented"); + } + }); + registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent); + scope.wrappers.Touch = Touch; + scope.wrappers.TouchEvent = TouchEvent; + scope.wrappers.TouchList = TouchList; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var nonEnumDescriptor = { + enumerable: false + }; + function nonEnum(obj, prop) { + Object.defineProperty(obj, prop, nonEnumDescriptor); + } + function NodeList() { + this.length = 0; + nonEnum(this, "length"); + } + NodeList.prototype = { + item: function(index) { + return this[index]; + } + }; + nonEnum(NodeList.prototype, "item"); + function wrapNodeList(list) { + if (list == null) return list; + var wrapperList = new NodeList(); + for (var i = 0, length = list.length; i < length; i++) { + wrapperList[i] = wrap(list[i]); + } + wrapperList.length = length; + return wrapperList; + } + function addWrapNodeListMethod(wrapperConstructor, name) { + wrapperConstructor.prototype[name] = function() { + return wrapNodeList(unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments)); + }; + } + scope.wrappers.NodeList = NodeList; + scope.addWrapNodeListMethod = addWrapNodeListMethod; + scope.wrapNodeList = wrapNodeList; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + scope.wrapHTMLCollection = scope.wrapNodeList; + scope.wrappers.HTMLCollection = scope.wrappers.NodeList; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var EventTarget = scope.wrappers.EventTarget; + var NodeList = scope.wrappers.NodeList; + var TreeScope = scope.TreeScope; + var assert = scope.assert; + var defineWrapGetter = scope.defineWrapGetter; + var enqueueMutation = scope.enqueueMutation; + var getTreeScope = scope.getTreeScope; + var isWrapper = scope.isWrapper; + var mixin = scope.mixin; + var registerTransientObservers = scope.registerTransientObservers; + var registerWrapper = scope.registerWrapper; + var setTreeScope = scope.setTreeScope; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var wrapIfNeeded = scope.wrapIfNeeded; + var wrappers = scope.wrappers; + function assertIsNodeWrapper(node) { + assert(node instanceof Node); + } + function createOneElementNodeList(node) { + var nodes = new NodeList(); + nodes[0] = node; + nodes.length = 1; + return nodes; + } + var surpressMutations = false; + function enqueueRemovalForInsertedNodes(node, parent, nodes) { + enqueueMutation(parent, "childList", { + removedNodes: nodes, + previousSibling: node.previousSibling, + nextSibling: node.nextSibling + }); + } + function enqueueRemovalForInsertedDocumentFragment(df, nodes) { + enqueueMutation(df, "childList", { + removedNodes: nodes + }); + } + function collectNodes(node, parentNode, previousNode, nextNode) { + if (node instanceof DocumentFragment) { + var nodes = collectNodesForDocumentFragment(node); + surpressMutations = true; + for (var i = nodes.length - 1; i >= 0; i--) { + node.removeChild(nodes[i]); + nodes[i].parentNode_ = parentNode; + } + surpressMutations = false; + for (var i = 0; i < nodes.length; i++) { + nodes[i].previousSibling_ = nodes[i - 1] || previousNode; + nodes[i].nextSibling_ = nodes[i + 1] || nextNode; + } + if (previousNode) previousNode.nextSibling_ = nodes[0]; + if (nextNode) nextNode.previousSibling_ = nodes[nodes.length - 1]; + return nodes; + } + var nodes = createOneElementNodeList(node); + var oldParent = node.parentNode; + if (oldParent) { + oldParent.removeChild(node); + } + node.parentNode_ = parentNode; + node.previousSibling_ = previousNode; + node.nextSibling_ = nextNode; + if (previousNode) previousNode.nextSibling_ = node; + if (nextNode) nextNode.previousSibling_ = node; + return nodes; + } + function collectNodesNative(node) { + if (node instanceof DocumentFragment) return collectNodesForDocumentFragment(node); + var nodes = createOneElementNodeList(node); + var oldParent = node.parentNode; + if (oldParent) enqueueRemovalForInsertedNodes(node, oldParent, nodes); + return nodes; + } + function collectNodesForDocumentFragment(node) { + var nodes = new NodeList(); + var i = 0; + for (var child = node.firstChild; child; child = child.nextSibling) { + nodes[i++] = child; + } + nodes.length = i; + enqueueRemovalForInsertedDocumentFragment(node, nodes); + return nodes; + } + function snapshotNodeList(nodeList) { + return nodeList; + } + function nodeWasAdded(node, treeScope) { + setTreeScope(node, treeScope); + node.nodeIsInserted_(); + } + function nodesWereAdded(nodes, parent) { + var treeScope = getTreeScope(parent); + for (var i = 0; i < nodes.length; i++) { + nodeWasAdded(nodes[i], treeScope); + } + } + function nodeWasRemoved(node) { + setTreeScope(node, new TreeScope(node, null)); + } + function nodesWereRemoved(nodes) { + for (var i = 0; i < nodes.length; i++) { + nodeWasRemoved(nodes[i]); + } + } + function ensureSameOwnerDocument(parent, child) { + var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ? parent : parent.ownerDocument; + if (ownerDoc !== child.ownerDocument) ownerDoc.adoptNode(child); + } + function adoptNodesIfNeeded(owner, nodes) { + if (!nodes.length) return; + var ownerDoc = owner.ownerDocument; + if (ownerDoc === nodes[0].ownerDocument) return; + for (var i = 0; i < nodes.length; i++) { + scope.adoptNodeNoRemove(nodes[i], ownerDoc); + } + } + function unwrapNodesForInsertion(owner, nodes) { + adoptNodesIfNeeded(owner, nodes); + var length = nodes.length; + if (length === 1) return unwrap(nodes[0]); + var df = unwrap(owner.ownerDocument.createDocumentFragment()); + for (var i = 0; i < length; i++) { + df.appendChild(unwrap(nodes[i])); + } + return df; + } + function clearChildNodes(wrapper) { + if (wrapper.firstChild_ !== undefined) { + var child = wrapper.firstChild_; + while (child) { + var tmp = child; + child = child.nextSibling_; + tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined; + } + } + wrapper.firstChild_ = wrapper.lastChild_ = undefined; + } + function removeAllChildNodes(wrapper) { + if (wrapper.invalidateShadowRenderer()) { + var childWrapper = wrapper.firstChild; + while (childWrapper) { + assert(childWrapper.parentNode === wrapper); + var nextSibling = childWrapper.nextSibling; + var childNode = unwrap(childWrapper); + var parentNode = childNode.parentNode; + if (parentNode) originalRemoveChild.call(parentNode, childNode); + childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null; + childWrapper = nextSibling; + } + wrapper.firstChild_ = wrapper.lastChild_ = null; + } else { + var node = unwrap(wrapper); + var child = node.firstChild; + var nextSibling; + while (child) { + nextSibling = child.nextSibling; + originalRemoveChild.call(node, child); + child = nextSibling; + } + } + } + function invalidateParent(node) { + var p = node.parentNode; + return p && p.invalidateShadowRenderer(); + } + function cleanupNodes(nodes) { + for (var i = 0, n; i < nodes.length; i++) { + n = nodes[i]; + n.parentNode.removeChild(n); + } + } + var originalImportNode = document.importNode; + var originalCloneNode = window.Node.prototype.cloneNode; + function cloneNode(node, deep, opt_doc) { + var clone; + if (opt_doc) clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false)); else clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false)); + if (deep) { + for (var child = node.firstChild; child; child = child.nextSibling) { + clone.appendChild(cloneNode(child, true, opt_doc)); + } + if (node instanceof wrappers.HTMLTemplateElement) { + var cloneContent = clone.content; + for (var child = node.content.firstChild; child; child = child.nextSibling) { + cloneContent.appendChild(cloneNode(child, true, opt_doc)); + } + } + } + return clone; + } + function contains(self, child) { + if (!child || getTreeScope(self) !== getTreeScope(child)) return false; + for (var node = child; node; node = node.parentNode) { + if (node === self) return true; + } + return false; + } + var OriginalNode = window.Node; + function Node(original) { + assert(original instanceof OriginalNode); + EventTarget.call(this, original); + this.parentNode_ = undefined; + this.firstChild_ = undefined; + this.lastChild_ = undefined; + this.nextSibling_ = undefined; + this.previousSibling_ = undefined; + this.treeScope_ = undefined; + } + var OriginalDocumentFragment = window.DocumentFragment; + var originalAppendChild = OriginalNode.prototype.appendChild; + var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition; + var originalIsEqualNode = OriginalNode.prototype.isEqualNode; + var originalInsertBefore = OriginalNode.prototype.insertBefore; + var originalRemoveChild = OriginalNode.prototype.removeChild; + var originalReplaceChild = OriginalNode.prototype.replaceChild; + var isIe = /Trident|Edge/.test(navigator.userAgent); + var removeChildOriginalHelper = isIe ? function(parent, child) { + try { + originalRemoveChild.call(parent, child); + } catch (ex) { + if (!(parent instanceof OriginalDocumentFragment)) throw ex; + } + } : function(parent, child) { + originalRemoveChild.call(parent, child); + }; + Node.prototype = Object.create(EventTarget.prototype); + mixin(Node.prototype, { + appendChild: function(childWrapper) { + return this.insertBefore(childWrapper, null); + }, + insertBefore: function(childWrapper, refWrapper) { + assertIsNodeWrapper(childWrapper); + var refNode; + if (refWrapper) { + if (isWrapper(refWrapper)) { + refNode = unwrap(refWrapper); + } else { + refNode = refWrapper; + refWrapper = wrap(refNode); + } + } else { + refWrapper = null; + refNode = null; + } + refWrapper && assert(refWrapper.parentNode === this); + var nodes; + var previousNode = refWrapper ? refWrapper.previousSibling : this.lastChild; + var useNative = !this.invalidateShadowRenderer() && !invalidateParent(childWrapper); + if (useNative) nodes = collectNodesNative(childWrapper); else nodes = collectNodes(childWrapper, this, previousNode, refWrapper); + if (useNative) { + ensureSameOwnerDocument(this, childWrapper); + clearChildNodes(this); + originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode); + } else { + if (!previousNode) this.firstChild_ = nodes[0]; + if (!refWrapper) { + this.lastChild_ = nodes[nodes.length - 1]; + if (this.firstChild_ === undefined) this.firstChild_ = this.firstChild; + } + var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this); + if (parentNode) { + originalInsertBefore.call(parentNode, unwrapNodesForInsertion(this, nodes), refNode); + } else { + adoptNodesIfNeeded(this, nodes); + } + } + enqueueMutation(this, "childList", { + addedNodes: nodes, + nextSibling: refWrapper, + previousSibling: previousNode + }); + nodesWereAdded(nodes, this); + return childWrapper; + }, + removeChild: function(childWrapper) { + assertIsNodeWrapper(childWrapper); + if (childWrapper.parentNode !== this) { + var found = false; + var childNodes = this.childNodes; + for (var ieChild = this.firstChild; ieChild; ieChild = ieChild.nextSibling) { + if (ieChild === childWrapper) { + found = true; + break; + } + } + if (!found) { + throw new Error("NotFoundError"); + } + } + var childNode = unwrap(childWrapper); + var childWrapperNextSibling = childWrapper.nextSibling; + var childWrapperPreviousSibling = childWrapper.previousSibling; + if (this.invalidateShadowRenderer()) { + var thisFirstChild = this.firstChild; + var thisLastChild = this.lastChild; + var parentNode = childNode.parentNode; + if (parentNode) removeChildOriginalHelper(parentNode, childNode); + if (thisFirstChild === childWrapper) this.firstChild_ = childWrapperNextSibling; + if (thisLastChild === childWrapper) this.lastChild_ = childWrapperPreviousSibling; + if (childWrapperPreviousSibling) childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling; + if (childWrapperNextSibling) { + childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling; + } + childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = undefined; + } else { + clearChildNodes(this); + removeChildOriginalHelper(unsafeUnwrap(this), childNode); + } + if (!surpressMutations) { + enqueueMutation(this, "childList", { + removedNodes: createOneElementNodeList(childWrapper), + nextSibling: childWrapperNextSibling, + previousSibling: childWrapperPreviousSibling + }); + } + registerTransientObservers(this, childWrapper); + return childWrapper; + }, + replaceChild: function(newChildWrapper, oldChildWrapper) { + assertIsNodeWrapper(newChildWrapper); + var oldChildNode; + if (isWrapper(oldChildWrapper)) { + oldChildNode = unwrap(oldChildWrapper); + } else { + oldChildNode = oldChildWrapper; + oldChildWrapper = wrap(oldChildNode); + } + if (oldChildWrapper.parentNode !== this) { + throw new Error("NotFoundError"); + } + var nextNode = oldChildWrapper.nextSibling; + var previousNode = oldChildWrapper.previousSibling; + var nodes; + var useNative = !this.invalidateShadowRenderer() && !invalidateParent(newChildWrapper); + if (useNative) { + nodes = collectNodesNative(newChildWrapper); + } else { + if (nextNode === newChildWrapper) nextNode = newChildWrapper.nextSibling; + nodes = collectNodes(newChildWrapper, this, previousNode, nextNode); + } + if (!useNative) { + if (this.firstChild === oldChildWrapper) this.firstChild_ = nodes[0]; + if (this.lastChild === oldChildWrapper) this.lastChild_ = nodes[nodes.length - 1]; + oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ = oldChildWrapper.parentNode_ = undefined; + if (oldChildNode.parentNode) { + originalReplaceChild.call(oldChildNode.parentNode, unwrapNodesForInsertion(this, nodes), oldChildNode); + } + } else { + ensureSameOwnerDocument(this, newChildWrapper); + clearChildNodes(this); + originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper), oldChildNode); + } + enqueueMutation(this, "childList", { + addedNodes: nodes, + removedNodes: createOneElementNodeList(oldChildWrapper), + nextSibling: nextNode, + previousSibling: previousNode + }); + nodeWasRemoved(oldChildWrapper); + nodesWereAdded(nodes, this); + return oldChildWrapper; + }, + nodeIsInserted_: function() { + for (var child = this.firstChild; child; child = child.nextSibling) { + child.nodeIsInserted_(); + } + }, + hasChildNodes: function() { + return this.firstChild !== null; + }, + get parentNode() { + return this.parentNode_ !== undefined ? this.parentNode_ : wrap(unsafeUnwrap(this).parentNode); + }, + get firstChild() { + return this.firstChild_ !== undefined ? this.firstChild_ : wrap(unsafeUnwrap(this).firstChild); + }, + get lastChild() { + return this.lastChild_ !== undefined ? this.lastChild_ : wrap(unsafeUnwrap(this).lastChild); + }, + get nextSibling() { + return this.nextSibling_ !== undefined ? this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling); + }, + get previousSibling() { + return this.previousSibling_ !== undefined ? this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling); + }, + get parentElement() { + var p = this.parentNode; + while (p && p.nodeType !== Node.ELEMENT_NODE) { + p = p.parentNode; + } + return p; + }, + get textContent() { + var s = ""; + for (var child = this.firstChild; child; child = child.nextSibling) { + if (child.nodeType != Node.COMMENT_NODE) { + s += child.textContent; + } + } + return s; + }, + set textContent(textContent) { + if (textContent == null) textContent = ""; + var removedNodes = snapshotNodeList(this.childNodes); + if (this.invalidateShadowRenderer()) { + removeAllChildNodes(this); + if (textContent !== "") { + var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent); + this.appendChild(textNode); + } + } else { + clearChildNodes(this); + unsafeUnwrap(this).textContent = textContent; + } + var addedNodes = snapshotNodeList(this.childNodes); + enqueueMutation(this, "childList", { + addedNodes: addedNodes, + removedNodes: removedNodes + }); + nodesWereRemoved(removedNodes); + nodesWereAdded(addedNodes, this); + }, + get childNodes() { + var wrapperList = new NodeList(); + var i = 0; + for (var child = this.firstChild; child; child = child.nextSibling) { + wrapperList[i++] = child; + } + wrapperList.length = i; + return wrapperList; + }, + cloneNode: function(deep) { + return cloneNode(this, deep); + }, + contains: function(child) { + return contains(this, wrapIfNeeded(child)); + }, + compareDocumentPosition: function(otherNode) { + return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode)); + }, + isEqualNode: function(otherNode) { + return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode)); + }, + normalize: function() { + var nodes = snapshotNodeList(this.childNodes); + var remNodes = []; + var s = ""; + var modNode; + for (var i = 0, n; i < nodes.length; i++) { + n = nodes[i]; + if (n.nodeType === Node.TEXT_NODE) { + if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else { + s += n.data; + remNodes.push(n); + } + } else { + if (modNode && remNodes.length) { + modNode.data += s; + cleanupNodes(remNodes); + } + remNodes = []; + s = ""; + modNode = null; + if (n.childNodes.length) n.normalize(); + } + } + if (modNode && remNodes.length) { + modNode.data += s; + cleanupNodes(remNodes); + } + } + }); + defineWrapGetter(Node, "ownerDocument"); + registerWrapper(OriginalNode, Node, document.createDocumentFragment()); + delete Node.prototype.querySelector; + delete Node.prototype.querySelectorAll; + Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype); + scope.cloneNode = cloneNode; + scope.nodeWasAdded = nodeWasAdded; + scope.nodeWasRemoved = nodeWasRemoved; + scope.nodesWereAdded = nodesWereAdded; + scope.nodesWereRemoved = nodesWereRemoved; + scope.originalInsertBefore = originalInsertBefore; + scope.originalRemoveChild = originalRemoveChild; + scope.snapshotNodeList = snapshotNodeList; + scope.wrappers.Node = Node; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLCollection = scope.wrappers.HTMLCollection; + var NodeList = scope.wrappers.NodeList; + var getTreeScope = scope.getTreeScope; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var originalDocumentQuerySelector = document.querySelector; + var originalElementQuerySelector = document.documentElement.querySelector; + var originalDocumentQuerySelectorAll = document.querySelectorAll; + var originalElementQuerySelectorAll = document.documentElement.querySelectorAll; + var originalDocumentGetElementsByTagName = document.getElementsByTagName; + var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName; + var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS; + var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS; + var OriginalElement = window.Element; + var OriginalDocument = window.HTMLDocument || window.Document; + function filterNodeList(list, index, result, deep) { + var wrappedItem = null; + var root = null; + for (var i = 0, length = list.length; i < length; i++) { + wrappedItem = wrap(list[i]); + if (!deep && (root = getTreeScope(wrappedItem).root)) { + if (root instanceof scope.wrappers.ShadowRoot) { + continue; + } + } + result[index++] = wrappedItem; + } + return index; + } + function shimSelector(selector) { + return String(selector).replace(/\/deep\/|::shadow|>>>/g, " "); + } + function shimMatchesSelector(selector) { + return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " "); + } + function findOne(node, selector) { + var m, el = node.firstElementChild; + while (el) { + if (el.matches(selector)) return el; + m = findOne(el, selector); + if (m) return m; + el = el.nextElementSibling; + } + return null; + } + function matchesSelector(el, selector) { + return el.matches(selector); + } + var XHTML_NS = "http://www.w3.org/1999/xhtml"; + function matchesTagName(el, localName, localNameLowerCase) { + var ln = el.localName; + return ln === localName || ln === localNameLowerCase && el.namespaceURI === XHTML_NS; + } + function matchesEveryThing() { + return true; + } + function matchesLocalNameOnly(el, ns, localName) { + return el.localName === localName; + } + function matchesNameSpace(el, ns) { + return el.namespaceURI === ns; + } + function matchesLocalNameNS(el, ns, localName) { + return el.namespaceURI === ns && el.localName === localName; + } + function findElements(node, index, result, p, arg0, arg1) { + var el = node.firstElementChild; + while (el) { + if (p(el, arg0, arg1)) result[index++] = el; + index = findElements(el, index, result, p, arg0, arg1); + el = el.nextElementSibling; + } + return index; + } + function querySelectorAllFiltered(p, index, result, selector, deep) { + var target = unsafeUnwrap(this); + var list; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findElements(this, index, result, p, selector, null); + } else if (target instanceof OriginalElement) { + list = originalElementQuerySelectorAll.call(target, selector); + } else if (target instanceof OriginalDocument) { + list = originalDocumentQuerySelectorAll.call(target, selector); + } else { + return findElements(this, index, result, p, selector, null); + } + return filterNodeList(list, index, result, deep); + } + var SelectorsInterface = { + querySelector: function(selector) { + var shimmed = shimSelector(selector); + var deep = shimmed !== selector; + selector = shimmed; + var target = unsafeUnwrap(this); + var wrappedItem; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findOne(this, selector); + } else if (target instanceof OriginalElement) { + wrappedItem = wrap(originalElementQuerySelector.call(target, selector)); + } else if (target instanceof OriginalDocument) { + wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector)); + } else { + return findOne(this, selector); + } + if (!wrappedItem) { + return wrappedItem; + } else if (!deep && (root = getTreeScope(wrappedItem).root)) { + if (root instanceof scope.wrappers.ShadowRoot) { + return findOne(this, selector); + } + } + return wrappedItem; + }, + querySelectorAll: function(selector) { + var shimmed = shimSelector(selector); + var deep = shimmed !== selector; + selector = shimmed; + var result = new NodeList(); + result.length = querySelectorAllFiltered.call(this, matchesSelector, 0, result, selector, deep); + return result; + } + }; + var MatchesInterface = { + matches: function(selector) { + selector = shimMatchesSelector(selector); + return scope.originalMatches.call(unsafeUnwrap(this), selector); + } + }; + function getElementsByTagNameFiltered(p, index, result, localName, lowercase) { + var target = unsafeUnwrap(this); + var list; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findElements(this, index, result, p, localName, lowercase); + } else if (target instanceof OriginalElement) { + list = originalElementGetElementsByTagName.call(target, localName, lowercase); + } else if (target instanceof OriginalDocument) { + list = originalDocumentGetElementsByTagName.call(target, localName, lowercase); + } else { + return findElements(this, index, result, p, localName, lowercase); + } + return filterNodeList(list, index, result, false); + } + function getElementsByTagNameNSFiltered(p, index, result, ns, localName) { + var target = unsafeUnwrap(this); + var list; + var root = getTreeScope(this).root; + if (root instanceof scope.wrappers.ShadowRoot) { + return findElements(this, index, result, p, ns, localName); + } else if (target instanceof OriginalElement) { + list = originalElementGetElementsByTagNameNS.call(target, ns, localName); + } else if (target instanceof OriginalDocument) { + list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName); + } else { + return findElements(this, index, result, p, ns, localName); + } + return filterNodeList(list, index, result, false); + } + var GetElementsByInterface = { + getElementsByTagName: function(localName) { + var result = new HTMLCollection(); + var match = localName === "*" ? matchesEveryThing : matchesTagName; + result.length = getElementsByTagNameFiltered.call(this, match, 0, result, localName, localName.toLowerCase()); + return result; + }, + getElementsByClassName: function(className) { + return this.querySelectorAll("." + className); + }, + getElementsByTagNameNS: function(ns, localName) { + var result = new HTMLCollection(); + var match = null; + if (ns === "*") { + match = localName === "*" ? matchesEveryThing : matchesLocalNameOnly; + } else { + match = localName === "*" ? matchesNameSpace : matchesLocalNameNS; + } + result.length = getElementsByTagNameNSFiltered.call(this, match, 0, result, ns || null, localName); + return result; + } + }; + scope.GetElementsByInterface = GetElementsByInterface; + scope.SelectorsInterface = SelectorsInterface; + scope.MatchesInterface = MatchesInterface; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var NodeList = scope.wrappers.NodeList; + function forwardElement(node) { + while (node && node.nodeType !== Node.ELEMENT_NODE) { + node = node.nextSibling; + } + return node; + } + function backwardsElement(node) { + while (node && node.nodeType !== Node.ELEMENT_NODE) { + node = node.previousSibling; + } + return node; + } + var ParentNodeInterface = { + get firstElementChild() { + return forwardElement(this.firstChild); + }, + get lastElementChild() { + return backwardsElement(this.lastChild); + }, + get childElementCount() { + var count = 0; + for (var child = this.firstElementChild; child; child = child.nextElementSibling) { + count++; + } + return count; + }, + get children() { + var wrapperList = new NodeList(); + var i = 0; + for (var child = this.firstElementChild; child; child = child.nextElementSibling) { + wrapperList[i++] = child; + } + wrapperList.length = i; + return wrapperList; + }, + remove: function() { + var p = this.parentNode; + if (p) p.removeChild(this); + } + }; + var ChildNodeInterface = { + get nextElementSibling() { + return forwardElement(this.nextSibling); + }, + get previousElementSibling() { + return backwardsElement(this.previousSibling); + } + }; + var NonElementParentNodeInterface = { + getElementById: function(id) { + if (/[ \t\n\r\f]/.test(id)) return null; + return this.querySelector('[id="' + id + '"]'); + } + }; + scope.ChildNodeInterface = ChildNodeInterface; + scope.NonElementParentNodeInterface = NonElementParentNodeInterface; + scope.ParentNodeInterface = ParentNodeInterface; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var ChildNodeInterface = scope.ChildNodeInterface; + var Node = scope.wrappers.Node; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var OriginalCharacterData = window.CharacterData; + function CharacterData(node) { + Node.call(this, node); + } + CharacterData.prototype = Object.create(Node.prototype); + mixin(CharacterData.prototype, { + get nodeValue() { + return this.data; + }, + set nodeValue(data) { + this.data = data; + }, + get textContent() { + return this.data; + }, + set textContent(value) { + this.data = value; + }, + get data() { + return unsafeUnwrap(this).data; + }, + set data(value) { + var oldValue = unsafeUnwrap(this).data; + enqueueMutation(this, "characterData", { + oldValue: oldValue + }); + unsafeUnwrap(this).data = value; + } + }); + mixin(CharacterData.prototype, ChildNodeInterface); + registerWrapper(OriginalCharacterData, CharacterData, document.createTextNode("")); + scope.wrappers.CharacterData = CharacterData; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var CharacterData = scope.wrappers.CharacterData; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + function toUInt32(x) { + return x >>> 0; + } + var OriginalText = window.Text; + function Text(node) { + CharacterData.call(this, node); + } + Text.prototype = Object.create(CharacterData.prototype); + mixin(Text.prototype, { + splitText: function(offset) { + offset = toUInt32(offset); + var s = this.data; + if (offset > s.length) throw new Error("IndexSizeError"); + var head = s.slice(0, offset); + var tail = s.slice(offset); + this.data = head; + var newTextNode = this.ownerDocument.createTextNode(tail); + if (this.parentNode) this.parentNode.insertBefore(newTextNode, this.nextSibling); + return newTextNode; + } + }); + registerWrapper(OriginalText, Text, document.createTextNode("")); + scope.wrappers.Text = Text; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + if (!window.DOMTokenList) { + console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH."); + return; + } + var unsafeUnwrap = scope.unsafeUnwrap; + var enqueueMutation = scope.enqueueMutation; + function getClass(el) { + return unsafeUnwrap(el).getAttribute("class"); + } + function enqueueClassAttributeChange(el, oldValue) { + enqueueMutation(el, "attributes", { + name: "class", + namespace: null, + oldValue: oldValue + }); + } + function invalidateClass(el) { + scope.invalidateRendererBasedOnAttribute(el, "class"); + } + function changeClass(tokenList, method, args) { + var ownerElement = tokenList.ownerElement_; + if (ownerElement == null) { + return method.apply(tokenList, args); + } + var oldValue = getClass(ownerElement); + var retv = method.apply(tokenList, args); + if (getClass(ownerElement) !== oldValue) { + enqueueClassAttributeChange(ownerElement, oldValue); + invalidateClass(ownerElement); + } + return retv; + } + var oldAdd = DOMTokenList.prototype.add; + DOMTokenList.prototype.add = function() { + changeClass(this, oldAdd, arguments); + }; + var oldRemove = DOMTokenList.prototype.remove; + DOMTokenList.prototype.remove = function() { + changeClass(this, oldRemove, arguments); + }; + var oldToggle = DOMTokenList.prototype.toggle; + DOMTokenList.prototype.toggle = function() { + return changeClass(this, oldToggle, arguments); + }; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var ChildNodeInterface = scope.ChildNodeInterface; + var GetElementsByInterface = scope.GetElementsByInterface; + var Node = scope.wrappers.Node; + var ParentNodeInterface = scope.ParentNodeInterface; + var SelectorsInterface = scope.SelectorsInterface; + var MatchesInterface = scope.MatchesInterface; + var addWrapNodeListMethod = scope.addWrapNodeListMethod; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var oneOf = scope.oneOf; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrappers = scope.wrappers; + var OriginalElement = window.Element; + var matchesNames = [ "matches", "mozMatchesSelector", "msMatchesSelector", "webkitMatchesSelector" ].filter(function(name) { + return OriginalElement.prototype[name]; + }); + var matchesName = matchesNames[0]; + var originalMatches = OriginalElement.prototype[matchesName]; + function invalidateRendererBasedOnAttribute(element, name) { + var p = element.parentNode; + if (!p || !p.shadowRoot) return; + var renderer = scope.getRendererForHost(p); + if (renderer.dependsOnAttribute(name)) renderer.invalidate(); + } + function enqueAttributeChange(element, name, oldValue) { + enqueueMutation(element, "attributes", { + name: name, + namespace: null, + oldValue: oldValue + }); + } + var classListTable = new WeakMap(); + function Element(node) { + Node.call(this, node); + } + Element.prototype = Object.create(Node.prototype); + mixin(Element.prototype, { + createShadowRoot: function() { + var newShadowRoot = new wrappers.ShadowRoot(this); + unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot; + var renderer = scope.getRendererForHost(this); + renderer.invalidate(); + return newShadowRoot; + }, + get shadowRoot() { + return unsafeUnwrap(this).polymerShadowRoot_ || null; + }, + setAttribute: function(name, value) { + var oldValue = unsafeUnwrap(this).getAttribute(name); + unsafeUnwrap(this).setAttribute(name, value); + enqueAttributeChange(this, name, oldValue); + invalidateRendererBasedOnAttribute(this, name); + }, + removeAttribute: function(name) { + var oldValue = unsafeUnwrap(this).getAttribute(name); + unsafeUnwrap(this).removeAttribute(name); + enqueAttributeChange(this, name, oldValue); + invalidateRendererBasedOnAttribute(this, name); + }, + get classList() { + var list = classListTable.get(this); + if (!list) { + list = unsafeUnwrap(this).classList; + if (!list) return; + list.ownerElement_ = this; + classListTable.set(this, list); + } + return list; + }, + get className() { + return unsafeUnwrap(this).className; + }, + set className(v) { + this.setAttribute("class", v); + }, + get id() { + return unsafeUnwrap(this).id; + }, + set id(v) { + this.setAttribute("id", v); + } + }); + matchesNames.forEach(function(name) { + if (name !== "matches") { + Element.prototype[name] = function(selector) { + return this.matches(selector); + }; + } + }); + if (OriginalElement.prototype.webkitCreateShadowRoot) { + Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot; + } + mixin(Element.prototype, ChildNodeInterface); + mixin(Element.prototype, GetElementsByInterface); + mixin(Element.prototype, ParentNodeInterface); + mixin(Element.prototype, SelectorsInterface); + mixin(Element.prototype, MatchesInterface); + registerWrapper(OriginalElement, Element, document.createElementNS(null, "x")); + scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute; + scope.matchesNames = matchesNames; + scope.originalMatches = originalMatches; + scope.wrappers.Element = Element; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var Element = scope.wrappers.Element; + var defineGetter = scope.defineGetter; + var enqueueMutation = scope.enqueueMutation; + var mixin = scope.mixin; + var nodesWereAdded = scope.nodesWereAdded; + var nodesWereRemoved = scope.nodesWereRemoved; + var registerWrapper = scope.registerWrapper; + var snapshotNodeList = scope.snapshotNodeList; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrappers = scope.wrappers; + var escapeAttrRegExp = /[&\u00A0"]/g; + var escapeDataRegExp = /[&\u00A0<>]/g; + function escapeReplace(c) { + switch (c) { + case "&": + return "&"; + + case "<": + return "<"; + + case ">": + return ">"; + + case '"': + return """; + + case " ": + return " "; + } + } + function escapeAttr(s) { + return s.replace(escapeAttrRegExp, escapeReplace); + } + function escapeData(s) { + return s.replace(escapeDataRegExp, escapeReplace); + } + function makeSet(arr) { + var set = {}; + for (var i = 0; i < arr.length; i++) { + set[arr[i]] = true; + } + return set; + } + var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]); + var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]); + var XHTML_NS = "http://www.w3.org/1999/xhtml"; + function needsSelfClosingSlash(node) { + if (node.namespaceURI !== XHTML_NS) return true; + var doctype = node.ownerDocument.doctype; + return doctype && doctype.publicId && doctype.systemId; + } + function getOuterHTML(node, parentNode) { + switch (node.nodeType) { + case Node.ELEMENT_NODE: + var tagName = node.tagName.toLowerCase(); + var s = "<" + tagName; + var attrs = node.attributes; + for (var i = 0, attr; attr = attrs[i]; i++) { + s += " " + attr.name + '="' + escapeAttr(attr.value) + '"'; + } + if (voidElements[tagName]) { + if (needsSelfClosingSlash(node)) s += "/"; + return s + ">"; + } + return s + ">" + getInnerHTML(node) + ""; + + case Node.TEXT_NODE: + var data = node.data; + if (parentNode && plaintextParents[parentNode.localName]) return data; + return escapeData(data); + + case Node.COMMENT_NODE: + return ""; + + default: + console.error(node); + throw new Error("not implemented"); + } + } + function getInnerHTML(node) { + if (node instanceof wrappers.HTMLTemplateElement) node = node.content; + var s = ""; + for (var child = node.firstChild; child; child = child.nextSibling) { + s += getOuterHTML(child, node); + } + return s; + } + function setInnerHTML(node, value, opt_tagName) { + var tagName = opt_tagName || "div"; + node.textContent = ""; + var tempElement = unwrap(node.ownerDocument.createElement(tagName)); + tempElement.innerHTML = value; + var firstChild; + while (firstChild = tempElement.firstChild) { + node.appendChild(wrap(firstChild)); + } + } + var oldIe = /MSIE/.test(navigator.userAgent); + var OriginalHTMLElement = window.HTMLElement; + var OriginalHTMLTemplateElement = window.HTMLTemplateElement; + function HTMLElement(node) { + Element.call(this, node); + } + HTMLElement.prototype = Object.create(Element.prototype); + mixin(HTMLElement.prototype, { + get innerHTML() { + return getInnerHTML(this); + }, + set innerHTML(value) { + if (oldIe && plaintextParents[this.localName]) { + this.textContent = value; + return; + } + var removedNodes = snapshotNodeList(this.childNodes); + if (this.invalidateShadowRenderer()) { + if (this instanceof wrappers.HTMLTemplateElement) setInnerHTML(this.content, value); else setInnerHTML(this, value, this.tagName); + } else if (!OriginalHTMLTemplateElement && this instanceof wrappers.HTMLTemplateElement) { + setInnerHTML(this.content, value); + } else { + unsafeUnwrap(this).innerHTML = value; + } + var addedNodes = snapshotNodeList(this.childNodes); + enqueueMutation(this, "childList", { + addedNodes: addedNodes, + removedNodes: removedNodes + }); + nodesWereRemoved(removedNodes); + nodesWereAdded(addedNodes, this); + }, + get outerHTML() { + return getOuterHTML(this, this.parentNode); + }, + set outerHTML(value) { + var p = this.parentNode; + if (p) { + p.invalidateShadowRenderer(); + var df = frag(p, value); + p.replaceChild(df, this); + } + }, + insertAdjacentHTML: function(position, text) { + var contextElement, refNode; + switch (String(position).toLowerCase()) { + case "beforebegin": + contextElement = this.parentNode; + refNode = this; + break; + + case "afterend": + contextElement = this.parentNode; + refNode = this.nextSibling; + break; + + case "afterbegin": + contextElement = this; + refNode = this.firstChild; + break; + + case "beforeend": + contextElement = this; + refNode = null; + break; + + default: + return; + } + var df = frag(contextElement, text); + contextElement.insertBefore(df, refNode); + }, + get hidden() { + return this.hasAttribute("hidden"); + }, + set hidden(v) { + if (v) { + this.setAttribute("hidden", ""); + } else { + this.removeAttribute("hidden"); + } + } + }); + function frag(contextElement, html) { + var p = unwrap(contextElement.cloneNode(false)); + p.innerHTML = html; + var df = unwrap(document.createDocumentFragment()); + var c; + while (c = p.firstChild) { + df.appendChild(c); + } + return wrap(df); + } + function getter(name) { + return function() { + scope.renderAllPending(); + return unsafeUnwrap(this)[name]; + }; + } + function getterRequiresRendering(name) { + defineGetter(HTMLElement, name, getter(name)); + } + [ "clientHeight", "clientLeft", "clientTop", "clientWidth", "offsetHeight", "offsetLeft", "offsetTop", "offsetWidth", "scrollHeight", "scrollWidth" ].forEach(getterRequiresRendering); + function getterAndSetterRequiresRendering(name) { + Object.defineProperty(HTMLElement.prototype, name, { + get: getter(name), + set: function(v) { + scope.renderAllPending(); + unsafeUnwrap(this)[name] = v; + }, + configurable: true, + enumerable: true + }); + } + [ "scrollLeft", "scrollTop" ].forEach(getterAndSetterRequiresRendering); + function methodRequiresRendering(name) { + Object.defineProperty(HTMLElement.prototype, name, { + value: function() { + scope.renderAllPending(); + return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments); + }, + configurable: true, + enumerable: true + }); + } + [ "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering); + registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b")); + scope.wrappers.HTMLElement = HTMLElement; + scope.getInnerHTML = getInnerHTML; + scope.setInnerHTML = setInnerHTML; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var OriginalHTMLCanvasElement = window.HTMLCanvasElement; + function HTMLCanvasElement(node) { + HTMLElement.call(this, node); + } + HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLCanvasElement.prototype, { + getContext: function() { + var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments); + return context && wrap(context); + } + }); + registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement, document.createElement("canvas")); + scope.wrappers.HTMLCanvasElement = HTMLCanvasElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLContentElement = window.HTMLContentElement; + function HTMLContentElement(node) { + HTMLElement.call(this, node); + } + HTMLContentElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLContentElement.prototype, { + constructor: HTMLContentElement, + get select() { + return this.getAttribute("select"); + }, + set select(value) { + this.setAttribute("select", value); + }, + setAttribute: function(n, v) { + HTMLElement.prototype.setAttribute.call(this, n, v); + if (String(n).toLowerCase() === "select") this.invalidateShadowRenderer(true); + } + }); + if (OriginalHTMLContentElement) registerWrapper(OriginalHTMLContentElement, HTMLContentElement); + scope.wrappers.HTMLContentElement = HTMLContentElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var unwrap = scope.unwrap; + var OriginalHTMLFormElement = window.HTMLFormElement; + function HTMLFormElement(node) { + HTMLElement.call(this, node); + } + HTMLFormElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLFormElement.prototype, { + get elements() { + return wrapHTMLCollection(unwrap(this).elements); + } + }); + registerWrapper(OriginalHTMLFormElement, HTMLFormElement, document.createElement("form")); + scope.wrappers.HTMLFormElement = HTMLFormElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var rewrap = scope.rewrap; + var OriginalHTMLImageElement = window.HTMLImageElement; + function HTMLImageElement(node) { + HTMLElement.call(this, node); + } + HTMLImageElement.prototype = Object.create(HTMLElement.prototype); + registerWrapper(OriginalHTMLImageElement, HTMLImageElement, document.createElement("img")); + function Image(width, height) { + if (!(this instanceof Image)) { + throw new TypeError("DOM object constructor cannot be called as a function."); + } + var node = unwrap(document.createElement("img")); + HTMLElement.call(this, node); + rewrap(node, this); + if (width !== undefined) node.width = width; + if (height !== undefined) node.height = height; + } + Image.prototype = HTMLImageElement.prototype; + scope.wrappers.HTMLImageElement = HTMLImageElement; + scope.wrappers.Image = Image; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var NodeList = scope.wrappers.NodeList; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLShadowElement = window.HTMLShadowElement; + function HTMLShadowElement(node) { + HTMLElement.call(this, node); + } + HTMLShadowElement.prototype = Object.create(HTMLElement.prototype); + HTMLShadowElement.prototype.constructor = HTMLShadowElement; + if (OriginalHTMLShadowElement) registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement); + scope.wrappers.HTMLShadowElement = HTMLShadowElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var contentTable = new WeakMap(); + var templateContentsOwnerTable = new WeakMap(); + function getTemplateContentsOwner(doc) { + if (!doc.defaultView) return doc; + var d = templateContentsOwnerTable.get(doc); + if (!d) { + d = doc.implementation.createHTMLDocument(""); + while (d.lastChild) { + d.removeChild(d.lastChild); + } + templateContentsOwnerTable.set(doc, d); + } + return d; + } + function extractContent(templateElement) { + var doc = getTemplateContentsOwner(templateElement.ownerDocument); + var df = unwrap(doc.createDocumentFragment()); + var child; + while (child = templateElement.firstChild) { + df.appendChild(child); + } + return df; + } + var OriginalHTMLTemplateElement = window.HTMLTemplateElement; + function HTMLTemplateElement(node) { + HTMLElement.call(this, node); + if (!OriginalHTMLTemplateElement) { + var content = extractContent(node); + contentTable.set(this, wrap(content)); + } + } + HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTemplateElement.prototype, { + constructor: HTMLTemplateElement, + get content() { + if (OriginalHTMLTemplateElement) return wrap(unsafeUnwrap(this).content); + return contentTable.get(this); + } + }); + if (OriginalHTMLTemplateElement) registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement); + scope.wrappers.HTMLTemplateElement = HTMLTemplateElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLMediaElement = window.HTMLMediaElement; + if (!OriginalHTMLMediaElement) return; + function HTMLMediaElement(node) { + HTMLElement.call(this, node); + } + HTMLMediaElement.prototype = Object.create(HTMLElement.prototype); + registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement, document.createElement("audio")); + scope.wrappers.HTMLMediaElement = HTMLMediaElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLMediaElement = scope.wrappers.HTMLMediaElement; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var rewrap = scope.rewrap; + var OriginalHTMLAudioElement = window.HTMLAudioElement; + if (!OriginalHTMLAudioElement) return; + function HTMLAudioElement(node) { + HTMLMediaElement.call(this, node); + } + HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype); + registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement, document.createElement("audio")); + function Audio(src) { + if (!(this instanceof Audio)) { + throw new TypeError("DOM object constructor cannot be called as a function."); + } + var node = unwrap(document.createElement("audio")); + HTMLMediaElement.call(this, node); + rewrap(node, this); + node.setAttribute("preload", "auto"); + if (src !== undefined) node.setAttribute("src", src); + } + Audio.prototype = HTMLAudioElement.prototype; + scope.wrappers.HTMLAudioElement = HTMLAudioElement; + scope.wrappers.Audio = Audio; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var rewrap = scope.rewrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLOptionElement = window.HTMLOptionElement; + function trimText(s) { + return s.replace(/\s+/g, " ").trim(); + } + function HTMLOptionElement(node) { + HTMLElement.call(this, node); + } + HTMLOptionElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLOptionElement.prototype, { + get text() { + return trimText(this.textContent); + }, + set text(value) { + this.textContent = trimText(String(value)); + }, + get form() { + return wrap(unwrap(this).form); + } + }); + registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement, document.createElement("option")); + function Option(text, value, defaultSelected, selected) { + if (!(this instanceof Option)) { + throw new TypeError("DOM object constructor cannot be called as a function."); + } + var node = unwrap(document.createElement("option")); + HTMLElement.call(this, node); + rewrap(node, this); + if (text !== undefined) node.text = text; + if (value !== undefined) node.setAttribute("value", value); + if (defaultSelected === true) node.setAttribute("selected", ""); + node.selected = selected === true; + } + Option.prototype = HTMLOptionElement.prototype; + scope.wrappers.HTMLOptionElement = HTMLOptionElement; + scope.wrappers.Option = Option; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLSelectElement = window.HTMLSelectElement; + function HTMLSelectElement(node) { + HTMLElement.call(this, node); + } + HTMLSelectElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLSelectElement.prototype, { + add: function(element, before) { + if (typeof before === "object") before = unwrap(before); + unwrap(this).add(unwrap(element), before); + }, + remove: function(indexOrNode) { + if (indexOrNode === undefined) { + HTMLElement.prototype.remove.call(this); + return; + } + if (typeof indexOrNode === "object") indexOrNode = unwrap(indexOrNode); + unwrap(this).remove(indexOrNode); + }, + get form() { + return wrap(unwrap(this).form); + } + }); + registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement, document.createElement("select")); + scope.wrappers.HTMLSelectElement = HTMLSelectElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var OriginalHTMLTableElement = window.HTMLTableElement; + function HTMLTableElement(node) { + HTMLElement.call(this, node); + } + HTMLTableElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTableElement.prototype, { + get caption() { + return wrap(unwrap(this).caption); + }, + createCaption: function() { + return wrap(unwrap(this).createCaption()); + }, + get tHead() { + return wrap(unwrap(this).tHead); + }, + createTHead: function() { + return wrap(unwrap(this).createTHead()); + }, + createTFoot: function() { + return wrap(unwrap(this).createTFoot()); + }, + get tFoot() { + return wrap(unwrap(this).tFoot); + }, + get tBodies() { + return wrapHTMLCollection(unwrap(this).tBodies); + }, + createTBody: function() { + return wrap(unwrap(this).createTBody()); + }, + get rows() { + return wrapHTMLCollection(unwrap(this).rows); + }, + insertRow: function(index) { + return wrap(unwrap(this).insertRow(index)); + } + }); + registerWrapper(OriginalHTMLTableElement, HTMLTableElement, document.createElement("table")); + scope.wrappers.HTMLTableElement = HTMLTableElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement; + function HTMLTableSectionElement(node) { + HTMLElement.call(this, node); + } + HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTableSectionElement.prototype, { + constructor: HTMLTableSectionElement, + get rows() { + return wrapHTMLCollection(unwrap(this).rows); + }, + insertRow: function(index) { + return wrap(unwrap(this).insertRow(index)); + } + }); + registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement, document.createElement("thead")); + scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var wrapHTMLCollection = scope.wrapHTMLCollection; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalHTMLTableRowElement = window.HTMLTableRowElement; + function HTMLTableRowElement(node) { + HTMLElement.call(this, node); + } + HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype); + mixin(HTMLTableRowElement.prototype, { + get cells() { + return wrapHTMLCollection(unwrap(this).cells); + }, + insertCell: function(index) { + return wrap(unwrap(this).insertCell(index)); + } + }); + registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement, document.createElement("tr")); + scope.wrappers.HTMLTableRowElement = HTMLTableRowElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLContentElement = scope.wrappers.HTMLContentElement; + var HTMLElement = scope.wrappers.HTMLElement; + var HTMLShadowElement = scope.wrappers.HTMLShadowElement; + var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var OriginalHTMLUnknownElement = window.HTMLUnknownElement; + function HTMLUnknownElement(node) { + switch (node.localName) { + case "content": + return new HTMLContentElement(node); + + case "shadow": + return new HTMLShadowElement(node); + + case "template": + return new HTMLTemplateElement(node); + } + HTMLElement.call(this, node); + } + HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype); + registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement); + scope.wrappers.HTMLUnknownElement = HTMLUnknownElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var Element = scope.wrappers.Element; + var HTMLElement = scope.wrappers.HTMLElement; + var registerObject = scope.registerObject; + var defineWrapGetter = scope.defineWrapGetter; + var SVG_NS = "http://www.w3.org/2000/svg"; + var svgTitleElement = document.createElementNS(SVG_NS, "title"); + var SVGTitleElement = registerObject(svgTitleElement); + var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor; + if (!("classList" in svgTitleElement)) { + var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList"); + Object.defineProperty(HTMLElement.prototype, "classList", descr); + delete Element.prototype.classList; + } + defineWrapGetter(SVGElement, "ownerSVGElement"); + scope.wrappers.SVGElement = SVGElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var OriginalSVGUseElement = window.SVGUseElement; + var SVG_NS = "http://www.w3.org/2000/svg"; + var gWrapper = wrap(document.createElementNS(SVG_NS, "g")); + var useElement = document.createElementNS(SVG_NS, "use"); + var SVGGElement = gWrapper.constructor; + var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype); + var parentInterface = parentInterfacePrototype.constructor; + function SVGUseElement(impl) { + parentInterface.call(this, impl); + } + SVGUseElement.prototype = Object.create(parentInterfacePrototype); + if ("instanceRoot" in useElement) { + mixin(SVGUseElement.prototype, { + get instanceRoot() { + return wrap(unwrap(this).instanceRoot); + }, + get animatedInstanceRoot() { + return wrap(unwrap(this).animatedInstanceRoot); + } + }); + } + registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement); + scope.wrappers.SVGUseElement = SVGUseElement; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var EventTarget = scope.wrappers.EventTarget; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var wrap = scope.wrap; + var OriginalSVGElementInstance = window.SVGElementInstance; + if (!OriginalSVGElementInstance) return; + function SVGElementInstance(impl) { + EventTarget.call(this, impl); + } + SVGElementInstance.prototype = Object.create(EventTarget.prototype); + mixin(SVGElementInstance.prototype, { + get correspondingElement() { + return wrap(unsafeUnwrap(this).correspondingElement); + }, + get correspondingUseElement() { + return wrap(unsafeUnwrap(this).correspondingUseElement); + }, + get parentNode() { + return wrap(unsafeUnwrap(this).parentNode); + }, + get childNodes() { + throw new Error("Not implemented"); + }, + get firstChild() { + return wrap(unsafeUnwrap(this).firstChild); + }, + get lastChild() { + return wrap(unsafeUnwrap(this).lastChild); + }, + get previousSibling() { + return wrap(unsafeUnwrap(this).previousSibling); + }, + get nextSibling() { + return wrap(unsafeUnwrap(this).nextSibling); + } + }); + registerWrapper(OriginalSVGElementInstance, SVGElementInstance); + scope.wrappers.SVGElementInstance = SVGElementInstance; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D; + function CanvasRenderingContext2D(impl) { + setWrapper(impl, this); + } + mixin(CanvasRenderingContext2D.prototype, { + get canvas() { + return wrap(unsafeUnwrap(this).canvas); + }, + drawImage: function() { + arguments[0] = unwrapIfNeeded(arguments[0]); + unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments); + }, + createPattern: function() { + arguments[0] = unwrap(arguments[0]); + return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments); + } + }); + registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D, document.createElement("canvas").getContext("2d")); + scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalWebGLRenderingContext = window.WebGLRenderingContext; + if (!OriginalWebGLRenderingContext) return; + function WebGLRenderingContext(impl) { + setWrapper(impl, this); + } + mixin(WebGLRenderingContext.prototype, { + get canvas() { + return wrap(unsafeUnwrap(this).canvas); + }, + texImage2D: function() { + arguments[5] = unwrapIfNeeded(arguments[5]); + unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments); + }, + texSubImage2D: function() { + arguments[6] = unwrapIfNeeded(arguments[6]); + unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments); + } + }); + var instanceProperties = /WebKit/.test(navigator.userAgent) ? { + drawingBufferHeight: null, + drawingBufferWidth: null + } : {}; + registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties); + scope.wrappers.WebGLRenderingContext = WebGLRenderingContext; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var GetElementsByInterface = scope.GetElementsByInterface; + var NonElementParentNodeInterface = scope.NonElementParentNodeInterface; + var ParentNodeInterface = scope.ParentNodeInterface; + var SelectorsInterface = scope.SelectorsInterface; + var mixin = scope.mixin; + var registerObject = scope.registerObject; + var DocumentFragment = registerObject(document.createDocumentFragment()); + mixin(DocumentFragment.prototype, ParentNodeInterface); + mixin(DocumentFragment.prototype, SelectorsInterface); + mixin(DocumentFragment.prototype, GetElementsByInterface); + mixin(DocumentFragment.prototype, NonElementParentNodeInterface); + var Comment = registerObject(document.createComment("")); + scope.wrappers.Comment = Comment; + scope.wrappers.DocumentFragment = DocumentFragment; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var DocumentFragment = scope.wrappers.DocumentFragment; + var TreeScope = scope.TreeScope; + var elementFromPoint = scope.elementFromPoint; + var getInnerHTML = scope.getInnerHTML; + var getTreeScope = scope.getTreeScope; + var mixin = scope.mixin; + var rewrap = scope.rewrap; + var setInnerHTML = scope.setInnerHTML; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var shadowHostTable = new WeakMap(); + var nextOlderShadowTreeTable = new WeakMap(); + function ShadowRoot(hostWrapper) { + var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment()); + DocumentFragment.call(this, node); + rewrap(node, this); + var oldShadowRoot = hostWrapper.shadowRoot; + nextOlderShadowTreeTable.set(this, oldShadowRoot); + this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper)); + shadowHostTable.set(this, hostWrapper); + } + ShadowRoot.prototype = Object.create(DocumentFragment.prototype); + mixin(ShadowRoot.prototype, { + constructor: ShadowRoot, + get innerHTML() { + return getInnerHTML(this); + }, + set innerHTML(value) { + setInnerHTML(this, value); + this.invalidateShadowRenderer(); + }, + get olderShadowRoot() { + return nextOlderShadowTreeTable.get(this) || null; + }, + get host() { + return shadowHostTable.get(this) || null; + }, + invalidateShadowRenderer: function() { + return shadowHostTable.get(this).invalidateShadowRenderer(); + }, + elementFromPoint: function(x, y) { + return elementFromPoint(this, this.ownerDocument, x, y); + } + }); + scope.wrappers.ShadowRoot = ShadowRoot; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var getTreeScope = scope.getTreeScope; + var OriginalRange = window.Range; + var ShadowRoot = scope.wrappers.ShadowRoot; + function getHost(node) { + var root = getTreeScope(node).root; + if (root instanceof ShadowRoot) { + return root.host; + } + return null; + } + function hostNodeToShadowNode(refNode, offset) { + if (refNode.shadowRoot) { + offset = Math.min(refNode.childNodes.length - 1, offset); + var child = refNode.childNodes[offset]; + if (child) { + var insertionPoint = scope.getDestinationInsertionPoints(child); + if (insertionPoint.length > 0) { + var parentNode = insertionPoint[0].parentNode; + if (parentNode.nodeType == Node.ELEMENT_NODE) { + refNode = parentNode; + } + } + } + } + return refNode; + } + function shadowNodeToHostNode(node) { + node = wrap(node); + return getHost(node) || node; + } + function Range(impl) { + setWrapper(impl, this); + } + Range.prototype = { + get startContainer() { + return shadowNodeToHostNode(unsafeUnwrap(this).startContainer); + }, + get endContainer() { + return shadowNodeToHostNode(unsafeUnwrap(this).endContainer); + }, + get commonAncestorContainer() { + return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer); + }, + setStart: function(refNode, offset) { + refNode = hostNodeToShadowNode(refNode, offset); + unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset); + }, + setEnd: function(refNode, offset) { + refNode = hostNodeToShadowNode(refNode, offset); + unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset); + }, + setStartBefore: function(refNode) { + unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode)); + }, + setStartAfter: function(refNode) { + unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode)); + }, + setEndBefore: function(refNode) { + unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode)); + }, + setEndAfter: function(refNode) { + unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode)); + }, + selectNode: function(refNode) { + unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode)); + }, + selectNodeContents: function(refNode) { + unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode)); + }, + compareBoundaryPoints: function(how, sourceRange) { + return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange)); + }, + extractContents: function() { + return wrap(unsafeUnwrap(this).extractContents()); + }, + cloneContents: function() { + return wrap(unsafeUnwrap(this).cloneContents()); + }, + insertNode: function(node) { + unsafeUnwrap(this).insertNode(unwrapIfNeeded(node)); + }, + surroundContents: function(newParent) { + unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent)); + }, + cloneRange: function() { + return wrap(unsafeUnwrap(this).cloneRange()); + }, + isPointInRange: function(node, offset) { + return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset); + }, + comparePoint: function(node, offset) { + return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset); + }, + intersectsNode: function(node) { + return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node)); + }, + toString: function() { + return unsafeUnwrap(this).toString(); + } + }; + if (OriginalRange.prototype.createContextualFragment) { + Range.prototype.createContextualFragment = function(html) { + return wrap(unsafeUnwrap(this).createContextualFragment(html)); + }; + } + registerWrapper(window.Range, Range, document.createRange()); + scope.wrappers.Range = Range; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var Element = scope.wrappers.Element; + var HTMLContentElement = scope.wrappers.HTMLContentElement; + var HTMLShadowElement = scope.wrappers.HTMLShadowElement; + var Node = scope.wrappers.Node; + var ShadowRoot = scope.wrappers.ShadowRoot; + var assert = scope.assert; + var getTreeScope = scope.getTreeScope; + var mixin = scope.mixin; + var oneOf = scope.oneOf; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var ArraySplice = scope.ArraySplice; + function updateWrapperUpAndSideways(wrapper) { + wrapper.previousSibling_ = wrapper.previousSibling; + wrapper.nextSibling_ = wrapper.nextSibling; + wrapper.parentNode_ = wrapper.parentNode; + } + function updateWrapperDown(wrapper) { + wrapper.firstChild_ = wrapper.firstChild; + wrapper.lastChild_ = wrapper.lastChild; + } + function updateAllChildNodes(parentNodeWrapper) { + assert(parentNodeWrapper instanceof Node); + for (var childWrapper = parentNodeWrapper.firstChild; childWrapper; childWrapper = childWrapper.nextSibling) { + updateWrapperUpAndSideways(childWrapper); + } + updateWrapperDown(parentNodeWrapper); + } + function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) { + var parentNode = unwrap(parentNodeWrapper); + var newChild = unwrap(newChildWrapper); + var refChild = refChildWrapper ? unwrap(refChildWrapper) : null; + remove(newChildWrapper); + updateWrapperUpAndSideways(newChildWrapper); + if (!refChildWrapper) { + parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild; + if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild) parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild; + var lastChildWrapper = wrap(parentNode.lastChild); + if (lastChildWrapper) lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling; + } else { + if (parentNodeWrapper.firstChild === refChildWrapper) parentNodeWrapper.firstChild_ = refChildWrapper; + refChildWrapper.previousSibling_ = refChildWrapper.previousSibling; + } + scope.originalInsertBefore.call(parentNode, newChild, refChild); + } + function remove(nodeWrapper) { + var node = unwrap(nodeWrapper); + var parentNode = node.parentNode; + if (!parentNode) return; + var parentNodeWrapper = wrap(parentNode); + updateWrapperUpAndSideways(nodeWrapper); + if (nodeWrapper.previousSibling) nodeWrapper.previousSibling.nextSibling_ = nodeWrapper; + if (nodeWrapper.nextSibling) nodeWrapper.nextSibling.previousSibling_ = nodeWrapper; + if (parentNodeWrapper.lastChild === nodeWrapper) parentNodeWrapper.lastChild_ = nodeWrapper; + if (parentNodeWrapper.firstChild === nodeWrapper) parentNodeWrapper.firstChild_ = nodeWrapper; + scope.originalRemoveChild.call(parentNode, node); + } + var distributedNodesTable = new WeakMap(); + var destinationInsertionPointsTable = new WeakMap(); + var rendererForHostTable = new WeakMap(); + function resetDistributedNodes(insertionPoint) { + distributedNodesTable.set(insertionPoint, []); + } + function getDistributedNodes(insertionPoint) { + var rv = distributedNodesTable.get(insertionPoint); + if (!rv) distributedNodesTable.set(insertionPoint, rv = []); + return rv; + } + function getChildNodesSnapshot(node) { + var result = [], i = 0; + for (var child = node.firstChild; child; child = child.nextSibling) { + result[i++] = child; + } + return result; + } + var request = oneOf(window, [ "requestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame", "setTimeout" ]); + var pendingDirtyRenderers = []; + var renderTimer; + function renderAllPending() { + for (var i = 0; i < pendingDirtyRenderers.length; i++) { + var renderer = pendingDirtyRenderers[i]; + var parentRenderer = renderer.parentRenderer; + if (parentRenderer && parentRenderer.dirty) continue; + renderer.render(); + } + pendingDirtyRenderers = []; + } + function handleRequestAnimationFrame() { + renderTimer = null; + renderAllPending(); + } + function getRendererForHost(host) { + var renderer = rendererForHostTable.get(host); + if (!renderer) { + renderer = new ShadowRenderer(host); + rendererForHostTable.set(host, renderer); + } + return renderer; + } + function getShadowRootAncestor(node) { + var root = getTreeScope(node).root; + if (root instanceof ShadowRoot) return root; + return null; + } + function getRendererForShadowRoot(shadowRoot) { + return getRendererForHost(shadowRoot.host); + } + var spliceDiff = new ArraySplice(); + spliceDiff.equals = function(renderNode, rawNode) { + return unwrap(renderNode.node) === rawNode; + }; + function RenderNode(node) { + this.skip = false; + this.node = node; + this.childNodes = []; + } + RenderNode.prototype = { + append: function(node) { + var rv = new RenderNode(node); + this.childNodes.push(rv); + return rv; + }, + sync: function(opt_added) { + if (this.skip) return; + var nodeWrapper = this.node; + var newChildren = this.childNodes; + var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper)); + var added = opt_added || new WeakMap(); + var splices = spliceDiff.calculateSplices(newChildren, oldChildren); + var newIndex = 0, oldIndex = 0; + var lastIndex = 0; + for (var i = 0; i < splices.length; i++) { + var splice = splices[i]; + for (;lastIndex < splice.index; lastIndex++) { + oldIndex++; + newChildren[newIndex++].sync(added); + } + var removedCount = splice.removed.length; + for (var j = 0; j < removedCount; j++) { + var wrapper = wrap(oldChildren[oldIndex++]); + if (!added.get(wrapper)) remove(wrapper); + } + var addedCount = splice.addedCount; + var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]); + for (var j = 0; j < addedCount; j++) { + var newChildRenderNode = newChildren[newIndex++]; + var newChildWrapper = newChildRenderNode.node; + insertBefore(nodeWrapper, newChildWrapper, refNode); + added.set(newChildWrapper, true); + newChildRenderNode.sync(added); + } + lastIndex += addedCount; + } + for (var i = lastIndex; i < newChildren.length; i++) { + newChildren[i].sync(added); + } + } + }; + function ShadowRenderer(host) { + this.host = host; + this.dirty = false; + this.invalidateAttributes(); + this.associateNode(host); + } + ShadowRenderer.prototype = { + render: function(opt_renderNode) { + if (!this.dirty) return; + this.invalidateAttributes(); + var host = this.host; + this.distribution(host); + var renderNode = opt_renderNode || new RenderNode(host); + this.buildRenderTree(renderNode, host); + var topMostRenderer = !opt_renderNode; + if (topMostRenderer) renderNode.sync(); + this.dirty = false; + }, + get parentRenderer() { + return getTreeScope(this.host).renderer; + }, + invalidate: function() { + if (!this.dirty) { + this.dirty = true; + var parentRenderer = this.parentRenderer; + if (parentRenderer) parentRenderer.invalidate(); + pendingDirtyRenderers.push(this); + if (renderTimer) return; + renderTimer = window[request](handleRequestAnimationFrame, 0); + } + }, + distribution: function(root) { + this.resetAllSubtrees(root); + this.distributionResolution(root); + }, + resetAll: function(node) { + if (isInsertionPoint(node)) resetDistributedNodes(node); else resetDestinationInsertionPoints(node); + this.resetAllSubtrees(node); + }, + resetAllSubtrees: function(node) { + for (var child = node.firstChild; child; child = child.nextSibling) { + this.resetAll(child); + } + if (node.shadowRoot) this.resetAll(node.shadowRoot); + if (node.olderShadowRoot) this.resetAll(node.olderShadowRoot); + }, + distributionResolution: function(node) { + if (isShadowHost(node)) { + var shadowHost = node; + var pool = poolPopulation(shadowHost); + var shadowTrees = getShadowTrees(shadowHost); + for (var i = 0; i < shadowTrees.length; i++) { + this.poolDistribution(shadowTrees[i], pool); + } + for (var i = shadowTrees.length - 1; i >= 0; i--) { + var shadowTree = shadowTrees[i]; + var shadow = getShadowInsertionPoint(shadowTree); + if (shadow) { + var olderShadowRoot = shadowTree.olderShadowRoot; + if (olderShadowRoot) { + pool = poolPopulation(olderShadowRoot); + } + for (var j = 0; j < pool.length; j++) { + destributeNodeInto(pool[j], shadow); + } + } + this.distributionResolution(shadowTree); + } + } + for (var child = node.firstChild; child; child = child.nextSibling) { + this.distributionResolution(child); + } + }, + poolDistribution: function(node, pool) { + if (node instanceof HTMLShadowElement) return; + if (node instanceof HTMLContentElement) { + var content = node; + this.updateDependentAttributes(content.getAttribute("select")); + var anyDistributed = false; + for (var i = 0; i < pool.length; i++) { + var node = pool[i]; + if (!node) continue; + if (matches(node, content)) { + destributeNodeInto(node, content); + pool[i] = undefined; + anyDistributed = true; + } + } + if (!anyDistributed) { + for (var child = content.firstChild; child; child = child.nextSibling) { + destributeNodeInto(child, content); + } + } + return; + } + for (var child = node.firstChild; child; child = child.nextSibling) { + this.poolDistribution(child, pool); + } + }, + buildRenderTree: function(renderNode, node) { + var children = this.compose(node); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + var childRenderNode = renderNode.append(child); + this.buildRenderTree(childRenderNode, child); + } + if (isShadowHost(node)) { + var renderer = getRendererForHost(node); + renderer.dirty = false; + } + }, + compose: function(node) { + var children = []; + var p = node.shadowRoot || node; + for (var child = p.firstChild; child; child = child.nextSibling) { + if (isInsertionPoint(child)) { + this.associateNode(p); + var distributedNodes = getDistributedNodes(child); + for (var j = 0; j < distributedNodes.length; j++) { + var distributedNode = distributedNodes[j]; + if (isFinalDestination(child, distributedNode)) children.push(distributedNode); + } + } else { + children.push(child); + } + } + return children; + }, + invalidateAttributes: function() { + this.attributes = Object.create(null); + }, + updateDependentAttributes: function(selector) { + if (!selector) return; + var attributes = this.attributes; + if (/\.\w+/.test(selector)) attributes["class"] = true; + if (/#\w+/.test(selector)) attributes["id"] = true; + selector.replace(/\[\s*([^\s=\|~\]]+)/g, function(_, name) { + attributes[name] = true; + }); + }, + dependsOnAttribute: function(name) { + return this.attributes[name]; + }, + associateNode: function(node) { + unsafeUnwrap(node).polymerShadowRenderer_ = this; + } + }; + function poolPopulation(node) { + var pool = []; + for (var child = node.firstChild; child; child = child.nextSibling) { + if (isInsertionPoint(child)) { + pool.push.apply(pool, getDistributedNodes(child)); + } else { + pool.push(child); + } + } + return pool; + } + function getShadowInsertionPoint(node) { + if (node instanceof HTMLShadowElement) return node; + if (node instanceof HTMLContentElement) return null; + for (var child = node.firstChild; child; child = child.nextSibling) { + var res = getShadowInsertionPoint(child); + if (res) return res; + } + return null; + } + function destributeNodeInto(child, insertionPoint) { + getDistributedNodes(insertionPoint).push(child); + var points = destinationInsertionPointsTable.get(child); + if (!points) destinationInsertionPointsTable.set(child, [ insertionPoint ]); else points.push(insertionPoint); + } + function getDestinationInsertionPoints(node) { + return destinationInsertionPointsTable.get(node); + } + function resetDestinationInsertionPoints(node) { + destinationInsertionPointsTable.set(node, undefined); + } + var selectorStartCharRe = /^(:not\()?[*.#[a-zA-Z_|]/; + function matches(node, contentElement) { + var select = contentElement.getAttribute("select"); + if (!select) return true; + select = select.trim(); + if (!select) return true; + if (!(node instanceof Element)) return false; + if (!selectorStartCharRe.test(select)) return false; + try { + return node.matches(select); + } catch (ex) { + return false; + } + } + function isFinalDestination(insertionPoint, node) { + var points = getDestinationInsertionPoints(node); + return points && points[points.length - 1] === insertionPoint; + } + function isInsertionPoint(node) { + return node instanceof HTMLContentElement || node instanceof HTMLShadowElement; + } + function isShadowHost(shadowHost) { + return shadowHost.shadowRoot; + } + function getShadowTrees(host) { + var trees = []; + for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) { + trees.push(tree); + } + return trees; + } + function render(host) { + new ShadowRenderer(host).render(); + } + Node.prototype.invalidateShadowRenderer = function(force) { + var renderer = unsafeUnwrap(this).polymerShadowRenderer_; + if (renderer) { + renderer.invalidate(); + return true; + } + return false; + }; + HTMLContentElement.prototype.getDistributedNodes = HTMLShadowElement.prototype.getDistributedNodes = function() { + renderAllPending(); + return getDistributedNodes(this); + }; + Element.prototype.getDestinationInsertionPoints = function() { + renderAllPending(); + return getDestinationInsertionPoints(this) || []; + }; + HTMLContentElement.prototype.nodeIsInserted_ = HTMLShadowElement.prototype.nodeIsInserted_ = function() { + this.invalidateShadowRenderer(); + var shadowRoot = getShadowRootAncestor(this); + var renderer; + if (shadowRoot) renderer = getRendererForShadowRoot(shadowRoot); + unsafeUnwrap(this).polymerShadowRenderer_ = renderer; + if (renderer) renderer.invalidate(); + }; + scope.getRendererForHost = getRendererForHost; + scope.getShadowTrees = getShadowTrees; + scope.renderAllPending = renderAllPending; + scope.getDestinationInsertionPoints = getDestinationInsertionPoints; + scope.visual = { + insertBefore: insertBefore, + remove: remove + }; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var HTMLElement = scope.wrappers.HTMLElement; + var assert = scope.assert; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var elementsWithFormProperty = [ "HTMLButtonElement", "HTMLFieldSetElement", "HTMLInputElement", "HTMLKeygenElement", "HTMLLabelElement", "HTMLLegendElement", "HTMLObjectElement", "HTMLOutputElement", "HTMLTextAreaElement" ]; + function createWrapperConstructor(name) { + if (!window[name]) return; + assert(!scope.wrappers[name]); + var GeneratedWrapper = function(node) { + HTMLElement.call(this, node); + }; + GeneratedWrapper.prototype = Object.create(HTMLElement.prototype); + mixin(GeneratedWrapper.prototype, { + get form() { + return wrap(unwrap(this).form); + } + }); + registerWrapper(window[name], GeneratedWrapper, document.createElement(name.slice(4, -7))); + scope.wrappers[name] = GeneratedWrapper; + } + elementsWithFormProperty.forEach(createWrapperConstructor); + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalSelection = window.Selection; + function Selection(impl) { + setWrapper(impl, this); + } + Selection.prototype = { + get anchorNode() { + return wrap(unsafeUnwrap(this).anchorNode); + }, + get focusNode() { + return wrap(unsafeUnwrap(this).focusNode); + }, + addRange: function(range) { + unsafeUnwrap(this).addRange(unwrapIfNeeded(range)); + }, + collapse: function(node, index) { + unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index); + }, + containsNode: function(node, allowPartial) { + return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial); + }, + getRangeAt: function(index) { + return wrap(unsafeUnwrap(this).getRangeAt(index)); + }, + removeRange: function(range) { + unsafeUnwrap(this).removeRange(unwrap(range)); + }, + selectAllChildren: function(node) { + unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node)); + }, + toString: function() { + return unsafeUnwrap(this).toString(); + } + }; + if (OriginalSelection.prototype.extend) { + Selection.prototype.extend = function(node, offset) { + unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset); + }; + } + registerWrapper(window.Selection, Selection, window.getSelection()); + scope.wrappers.Selection = Selection; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalTreeWalker = window.TreeWalker; + function TreeWalker(impl) { + setWrapper(impl, this); + } + TreeWalker.prototype = { + get root() { + return wrap(unsafeUnwrap(this).root); + }, + get currentNode() { + return wrap(unsafeUnwrap(this).currentNode); + }, + set currentNode(node) { + unsafeUnwrap(this).currentNode = unwrapIfNeeded(node); + }, + get filter() { + return unsafeUnwrap(this).filter; + }, + parentNode: function() { + return wrap(unsafeUnwrap(this).parentNode()); + }, + firstChild: function() { + return wrap(unsafeUnwrap(this).firstChild()); + }, + lastChild: function() { + return wrap(unsafeUnwrap(this).lastChild()); + }, + previousSibling: function() { + return wrap(unsafeUnwrap(this).previousSibling()); + }, + previousNode: function() { + return wrap(unsafeUnwrap(this).previousNode()); + }, + nextNode: function() { + return wrap(unsafeUnwrap(this).nextNode()); + } + }; + registerWrapper(OriginalTreeWalker, TreeWalker); + scope.wrappers.TreeWalker = TreeWalker; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var GetElementsByInterface = scope.GetElementsByInterface; + var Node = scope.wrappers.Node; + var ParentNodeInterface = scope.ParentNodeInterface; + var NonElementParentNodeInterface = scope.NonElementParentNodeInterface; + var Selection = scope.wrappers.Selection; + var SelectorsInterface = scope.SelectorsInterface; + var ShadowRoot = scope.wrappers.ShadowRoot; + var TreeScope = scope.TreeScope; + var cloneNode = scope.cloneNode; + var defineWrapGetter = scope.defineWrapGetter; + var elementFromPoint = scope.elementFromPoint; + var forwardMethodsToWrapper = scope.forwardMethodsToWrapper; + var matchesNames = scope.matchesNames; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var renderAllPending = scope.renderAllPending; + var rewrap = scope.rewrap; + var setWrapper = scope.setWrapper; + var unsafeUnwrap = scope.unsafeUnwrap; + var unwrap = scope.unwrap; + var wrap = scope.wrap; + var wrapEventTargetMethods = scope.wrapEventTargetMethods; + var wrapNodeList = scope.wrapNodeList; + var implementationTable = new WeakMap(); + function Document(node) { + Node.call(this, node); + this.treeScope_ = new TreeScope(this, null); + } + Document.prototype = Object.create(Node.prototype); + defineWrapGetter(Document, "documentElement"); + defineWrapGetter(Document, "body"); + defineWrapGetter(Document, "head"); + function wrapMethod(name) { + var original = document[name]; + Document.prototype[name] = function() { + return wrap(original.apply(unsafeUnwrap(this), arguments)); + }; + } + [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode" ].forEach(wrapMethod); + var originalAdoptNode = document.adoptNode; + function adoptNodeNoRemove(node, doc) { + originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node)); + adoptSubtree(node, doc); + } + function adoptSubtree(node, doc) { + if (node.shadowRoot) doc.adoptNode(node.shadowRoot); + if (node instanceof ShadowRoot) adoptOlderShadowRoots(node, doc); + for (var child = node.firstChild; child; child = child.nextSibling) { + adoptSubtree(child, doc); + } + } + function adoptOlderShadowRoots(shadowRoot, doc) { + var oldShadowRoot = shadowRoot.olderShadowRoot; + if (oldShadowRoot) doc.adoptNode(oldShadowRoot); + } + var originalGetSelection = document.getSelection; + mixin(Document.prototype, { + adoptNode: function(node) { + if (node.parentNode) node.parentNode.removeChild(node); + adoptNodeNoRemove(node, this); + return node; + }, + elementFromPoint: function(x, y) { + return elementFromPoint(this, this, x, y); + }, + importNode: function(node, deep) { + return cloneNode(node, deep, unsafeUnwrap(this)); + }, + getSelection: function() { + renderAllPending(); + return new Selection(originalGetSelection.call(unwrap(this))); + }, + getElementsByName: function(name) { + return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]"); + } + }); + var originalCreateTreeWalker = document.createTreeWalker; + var TreeWalkerWrapper = scope.wrappers.TreeWalker; + Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) { + var newFilter = null; + if (filter) { + if (filter.acceptNode && typeof filter.acceptNode === "function") { + newFilter = { + acceptNode: function(node) { + return filter.acceptNode(wrap(node)); + } + }; + } else if (typeof filter === "function") { + newFilter = function(node) { + return filter(wrap(node)); + }; + } + } + return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences)); + }; + if (document.registerElement) { + var originalRegisterElement = document.registerElement; + Document.prototype.registerElement = function(tagName, object) { + var prototype, extendsOption; + if (object !== undefined) { + prototype = object.prototype; + extendsOption = object.extends; + } + if (!prototype) prototype = Object.create(HTMLElement.prototype); + if (scope.nativePrototypeTable.get(prototype)) { + throw new Error("NotSupportedError"); + } + var proto = Object.getPrototypeOf(prototype); + var nativePrototype; + var prototypes = []; + while (proto) { + nativePrototype = scope.nativePrototypeTable.get(proto); + if (nativePrototype) break; + prototypes.push(proto); + proto = Object.getPrototypeOf(proto); + } + if (!nativePrototype) { + throw new Error("NotSupportedError"); + } + var newPrototype = Object.create(nativePrototype); + for (var i = prototypes.length - 1; i >= 0; i--) { + newPrototype = Object.create(newPrototype); + } + [ "createdCallback", "attachedCallback", "detachedCallback", "attributeChangedCallback" ].forEach(function(name) { + var f = prototype[name]; + if (!f) return; + newPrototype[name] = function() { + if (!(wrap(this) instanceof CustomElementConstructor)) { + rewrap(this); + } + f.apply(wrap(this), arguments); + }; + }); + var p = { + prototype: newPrototype + }; + if (extendsOption) p.extends = extendsOption; + function CustomElementConstructor(node) { + if (!node) { + if (extendsOption) { + return document.createElement(extendsOption, tagName); + } else { + return document.createElement(tagName); + } + } + setWrapper(node, this); + } + CustomElementConstructor.prototype = prototype; + CustomElementConstructor.prototype.constructor = CustomElementConstructor; + scope.constructorTable.set(newPrototype, CustomElementConstructor); + scope.nativePrototypeTable.set(prototype, newPrototype); + var nativeConstructor = originalRegisterElement.call(unwrap(this), tagName, p); + return CustomElementConstructor; + }; + forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]); + } + forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]); + forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames); + forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]); + mixin(Document.prototype, GetElementsByInterface); + mixin(Document.prototype, ParentNodeInterface); + mixin(Document.prototype, SelectorsInterface); + mixin(Document.prototype, NonElementParentNodeInterface); + mixin(Document.prototype, { + get implementation() { + var implementation = implementationTable.get(this); + if (implementation) return implementation; + implementation = new DOMImplementation(unwrap(this).implementation); + implementationTable.set(this, implementation); + return implementation; + }, + get defaultView() { + return wrap(unwrap(this).defaultView); + } + }); + registerWrapper(window.Document, Document, document.implementation.createHTMLDocument("")); + if (window.HTMLDocument) registerWrapper(window.HTMLDocument, Document); + wrapEventTargetMethods([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement ]); + function DOMImplementation(impl) { + setWrapper(impl, this); + } + var originalCreateDocument = document.implementation.createDocument; + DOMImplementation.prototype.createDocument = function() { + arguments[2] = unwrap(arguments[2]); + return wrap(originalCreateDocument.apply(unsafeUnwrap(this), arguments)); + }; + function wrapImplMethod(constructor, name) { + var original = document.implementation[name]; + constructor.prototype[name] = function() { + return wrap(original.apply(unsafeUnwrap(this), arguments)); + }; + } + function forwardImplMethod(constructor, name) { + var original = document.implementation[name]; + constructor.prototype[name] = function() { + return original.apply(unsafeUnwrap(this), arguments); + }; + } + wrapImplMethod(DOMImplementation, "createDocumentType"); + wrapImplMethod(DOMImplementation, "createHTMLDocument"); + forwardImplMethod(DOMImplementation, "hasFeature"); + registerWrapper(window.DOMImplementation, DOMImplementation); + forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocument", "createDocumentType", "createHTMLDocument", "hasFeature" ]); + scope.adoptNodeNoRemove = adoptNodeNoRemove; + scope.wrappers.DOMImplementation = DOMImplementation; + scope.wrappers.Document = Document; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var EventTarget = scope.wrappers.EventTarget; + var Selection = scope.wrappers.Selection; + var mixin = scope.mixin; + var registerWrapper = scope.registerWrapper; + var renderAllPending = scope.renderAllPending; + var unwrap = scope.unwrap; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var wrap = scope.wrap; + var OriginalWindow = window.Window; + var originalGetComputedStyle = window.getComputedStyle; + var originalGetDefaultComputedStyle = window.getDefaultComputedStyle; + var originalGetSelection = window.getSelection; + function Window(impl) { + EventTarget.call(this, impl); + } + Window.prototype = Object.create(EventTarget.prototype); + OriginalWindow.prototype.getComputedStyle = function(el, pseudo) { + return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo); + }; + if (originalGetDefaultComputedStyle) { + OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) { + return wrap(this || window).getDefaultComputedStyle(unwrapIfNeeded(el), pseudo); + }; + } + OriginalWindow.prototype.getSelection = function() { + return wrap(this || window).getSelection(); + }; + delete window.getComputedStyle; + delete window.getDefaultComputedStyle; + delete window.getSelection; + [ "addEventListener", "removeEventListener", "dispatchEvent" ].forEach(function(name) { + OriginalWindow.prototype[name] = function() { + var w = wrap(this || window); + return w[name].apply(w, arguments); + }; + delete window[name]; + }); + mixin(Window.prototype, { + getComputedStyle: function(el, pseudo) { + renderAllPending(); + return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo); + }, + getSelection: function() { + renderAllPending(); + return new Selection(originalGetSelection.call(unwrap(this))); + }, + get document() { + return wrap(unwrap(this).document); + } + }); + if (originalGetDefaultComputedStyle) { + Window.prototype.getDefaultComputedStyle = function(el, pseudo) { + renderAllPending(); + return originalGetDefaultComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo); + }; + } + registerWrapper(OriginalWindow, Window, window); + scope.wrappers.Window = Window; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var unwrap = scope.unwrap; + var OriginalDataTransfer = window.DataTransfer || window.Clipboard; + var OriginalDataTransferSetDragImage = OriginalDataTransfer.prototype.setDragImage; + if (OriginalDataTransferSetDragImage) { + OriginalDataTransfer.prototype.setDragImage = function(image, x, y) { + OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y); + }; + } + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var registerWrapper = scope.registerWrapper; + var setWrapper = scope.setWrapper; + var unwrap = scope.unwrap; + var OriginalFormData = window.FormData; + if (!OriginalFormData) return; + function FormData(formElement) { + var impl; + if (formElement instanceof OriginalFormData) { + impl = formElement; + } else { + impl = new OriginalFormData(formElement && unwrap(formElement)); + } + setWrapper(impl, this); + } + registerWrapper(OriginalFormData, FormData, new OriginalFormData()); + scope.wrappers.FormData = FormData; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var unwrapIfNeeded = scope.unwrapIfNeeded; + var originalSend = XMLHttpRequest.prototype.send; + XMLHttpRequest.prototype.send = function(obj) { + return originalSend.call(this, unwrapIfNeeded(obj)); + }; + })(window.ShadowDOMPolyfill); + (function(scope) { + "use strict"; + var isWrapperFor = scope.isWrapperFor; + var elements = { + a: "HTMLAnchorElement", + area: "HTMLAreaElement", + audio: "HTMLAudioElement", + base: "HTMLBaseElement", + body: "HTMLBodyElement", + br: "HTMLBRElement", + button: "HTMLButtonElement", + canvas: "HTMLCanvasElement", + caption: "HTMLTableCaptionElement", + col: "HTMLTableColElement", + content: "HTMLContentElement", + data: "HTMLDataElement", + datalist: "HTMLDataListElement", + del: "HTMLModElement", + dir: "HTMLDirectoryElement", + div: "HTMLDivElement", + dl: "HTMLDListElement", + embed: "HTMLEmbedElement", + fieldset: "HTMLFieldSetElement", + font: "HTMLFontElement", + form: "HTMLFormElement", + frame: "HTMLFrameElement", + frameset: "HTMLFrameSetElement", + h1: "HTMLHeadingElement", + head: "HTMLHeadElement", + hr: "HTMLHRElement", + html: "HTMLHtmlElement", + iframe: "HTMLIFrameElement", + img: "HTMLImageElement", + input: "HTMLInputElement", + keygen: "HTMLKeygenElement", + label: "HTMLLabelElement", + legend: "HTMLLegendElement", + li: "HTMLLIElement", + link: "HTMLLinkElement", + map: "HTMLMapElement", + marquee: "HTMLMarqueeElement", + menu: "HTMLMenuElement", + menuitem: "HTMLMenuItemElement", + meta: "HTMLMetaElement", + meter: "HTMLMeterElement", + object: "HTMLObjectElement", + ol: "HTMLOListElement", + optgroup: "HTMLOptGroupElement", + option: "HTMLOptionElement", + output: "HTMLOutputElement", + p: "HTMLParagraphElement", + param: "HTMLParamElement", + pre: "HTMLPreElement", + progress: "HTMLProgressElement", + q: "HTMLQuoteElement", + script: "HTMLScriptElement", + select: "HTMLSelectElement", + shadow: "HTMLShadowElement", + source: "HTMLSourceElement", + span: "HTMLSpanElement", + style: "HTMLStyleElement", + table: "HTMLTableElement", + tbody: "HTMLTableSectionElement", + template: "HTMLTemplateElement", + textarea: "HTMLTextAreaElement", + thead: "HTMLTableSectionElement", + time: "HTMLTimeElement", + title: "HTMLTitleElement", + tr: "HTMLTableRowElement", + track: "HTMLTrackElement", + ul: "HTMLUListElement", + video: "HTMLVideoElement" + }; + function overrideConstructor(tagName) { + var nativeConstructorName = elements[tagName]; + var nativeConstructor = window[nativeConstructorName]; + if (!nativeConstructor) return; + var element = document.createElement(tagName); + var wrapperConstructor = element.constructor; + window[nativeConstructorName] = wrapperConstructor; + } + Object.keys(elements).forEach(overrideConstructor); + Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) { + window[name] = scope.wrappers[name]; + }); + })(window.ShadowDOMPolyfill); + (function(scope) { + var ShadowCSS = { + strictStyling: false, + registry: {}, + shimStyling: function(root, name, extendsName) { + var scopeStyles = this.prepareRoot(root, name, extendsName); + var typeExtension = this.isTypeExtension(extendsName); + var scopeSelector = this.makeScopeSelector(name, typeExtension); + var cssText = stylesToCssText(scopeStyles, true); + cssText = this.scopeCssText(cssText, scopeSelector); + if (root) { + root.shimmedStyle = cssText; + } + this.addCssToDocument(cssText, name); + }, + shimStyle: function(style, selector) { + return this.shimCssText(style.textContent, selector); + }, + shimCssText: function(cssText, selector) { + cssText = this.insertDirectives(cssText); + return this.scopeCssText(cssText, selector); + }, + makeScopeSelector: function(name, typeExtension) { + if (name) { + return typeExtension ? "[is=" + name + "]" : name; + } + return ""; + }, + isTypeExtension: function(extendsName) { + return extendsName && extendsName.indexOf("-") < 0; + }, + prepareRoot: function(root, name, extendsName) { + var def = this.registerRoot(root, name, extendsName); + this.replaceTextInStyles(def.rootStyles, this.insertDirectives); + this.removeStyles(root, def.rootStyles); + if (this.strictStyling) { + this.applyScopeToContent(root, name); + } + return def.scopeStyles; + }, + removeStyles: function(root, styles) { + for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) { + s.parentNode.removeChild(s); + } + }, + registerRoot: function(root, name, extendsName) { + var def = this.registry[name] = { + root: root, + name: name, + extendsName: extendsName + }; + var styles = this.findStyles(root); + def.rootStyles = styles; + def.scopeStyles = def.rootStyles; + var extendee = this.registry[def.extendsName]; + if (extendee) { + def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles); + } + return def; + }, + findStyles: function(root) { + if (!root) { + return []; + } + var styles = root.querySelectorAll("style"); + return Array.prototype.filter.call(styles, function(s) { + return !s.hasAttribute(NO_SHIM_ATTRIBUTE); + }); + }, + applyScopeToContent: function(root, name) { + if (root) { + Array.prototype.forEach.call(root.querySelectorAll("*"), function(node) { + node.setAttribute(name, ""); + }); + Array.prototype.forEach.call(root.querySelectorAll("template"), function(template) { + this.applyScopeToContent(template.content, name); + }, this); + } + }, + insertDirectives: function(cssText) { + cssText = this.insertPolyfillDirectivesInCssText(cssText); + return this.insertPolyfillRulesInCssText(cssText); + }, + insertPolyfillDirectivesInCssText: function(cssText) { + cssText = cssText.replace(cssCommentNextSelectorRe, function(match, p1) { + return p1.slice(0, -2) + "{"; + }); + return cssText.replace(cssContentNextSelectorRe, function(match, p1) { + return p1 + " {"; + }); + }, + insertPolyfillRulesInCssText: function(cssText) { + cssText = cssText.replace(cssCommentRuleRe, function(match, p1) { + return p1.slice(0, -1); + }); + return cssText.replace(cssContentRuleRe, function(match, p1, p2, p3) { + var rule = match.replace(p1, "").replace(p2, ""); + return p3 + rule; + }); + }, + scopeCssText: function(cssText, scopeSelector) { + var unscoped = this.extractUnscopedRulesFromCssText(cssText); + cssText = this.insertPolyfillHostInCssText(cssText); + cssText = this.convertColonHost(cssText); + cssText = this.convertColonHostContext(cssText); + cssText = this.convertShadowDOMSelectors(cssText); + if (scopeSelector) { + var self = this, cssText; + withCssRules(cssText, function(rules) { + cssText = self.scopeRules(rules, scopeSelector); + }); + } + cssText = cssText + "\n" + unscoped; + return cssText.trim(); + }, + extractUnscopedRulesFromCssText: function(cssText) { + var r = "", m; + while (m = cssCommentUnscopedRuleRe.exec(cssText)) { + r += m[1].slice(0, -1) + "\n\n"; + } + while (m = cssContentUnscopedRuleRe.exec(cssText)) { + r += m[0].replace(m[2], "").replace(m[1], m[3]) + "\n\n"; + } + return r; + }, + convertColonHost: function(cssText) { + return this.convertColonRule(cssText, cssColonHostRe, this.colonHostPartReplacer); + }, + convertColonHostContext: function(cssText) { + return this.convertColonRule(cssText, cssColonHostContextRe, this.colonHostContextPartReplacer); + }, + convertColonRule: function(cssText, regExp, partReplacer) { + return cssText.replace(regExp, function(m, p1, p2, p3) { + p1 = polyfillHostNoCombinator; + if (p2) { + var parts = p2.split(","), r = []; + for (var i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) { + p = p.trim(); + r.push(partReplacer(p1, p, p3)); + } + return r.join(","); + } else { + return p1 + p3; + } + }); + }, + colonHostContextPartReplacer: function(host, part, suffix) { + if (part.match(polyfillHost)) { + return this.colonHostPartReplacer(host, part, suffix); + } else { + return host + part + suffix + ", " + part + " " + host + suffix; + } + }, + colonHostPartReplacer: function(host, part, suffix) { + return host + part.replace(polyfillHost, "") + suffix; + }, + convertShadowDOMSelectors: function(cssText) { + for (var i = 0; i < shadowDOMSelectorsRe.length; i++) { + cssText = cssText.replace(shadowDOMSelectorsRe[i], " "); + } + return cssText; + }, + scopeRules: function(cssRules, scopeSelector) { + var cssText = ""; + if (cssRules) { + Array.prototype.forEach.call(cssRules, function(rule) { + if (rule.selectorText && (rule.style && rule.style.cssText !== undefined)) { + cssText += this.scopeSelector(rule.selectorText, scopeSelector, this.strictStyling) + " {\n "; + cssText += this.propertiesFromRule(rule) + "\n}\n\n"; + } else if (rule.type === CSSRule.MEDIA_RULE) { + cssText += "@media " + rule.media.mediaText + " {\n"; + cssText += this.scopeRules(rule.cssRules, scopeSelector); + cssText += "\n}\n\n"; + } else { + try { + if (rule.cssText) { + cssText += rule.cssText + "\n\n"; + } + } catch (x) { + if (rule.type === CSSRule.KEYFRAMES_RULE && rule.cssRules) { + cssText += this.ieSafeCssTextFromKeyFrameRule(rule); + } + } + } + }, this); + } + return cssText; + }, + ieSafeCssTextFromKeyFrameRule: function(rule) { + var cssText = "@keyframes " + rule.name + " {"; + Array.prototype.forEach.call(rule.cssRules, function(rule) { + cssText += " " + rule.keyText + " {" + rule.style.cssText + "}"; + }); + cssText += " }"; + return cssText; + }, + scopeSelector: function(selector, scopeSelector, strict) { + var r = [], parts = selector.split(","); + parts.forEach(function(p) { + p = p.trim(); + if (this.selectorNeedsScoping(p, scopeSelector)) { + p = strict && !p.match(polyfillHostNoCombinator) ? this.applyStrictSelectorScope(p, scopeSelector) : this.applySelectorScope(p, scopeSelector); + } + r.push(p); + }, this); + return r.join(", "); + }, + selectorNeedsScoping: function(selector, scopeSelector) { + if (Array.isArray(scopeSelector)) { + return true; + } + var re = this.makeScopeMatcher(scopeSelector); + return !selector.match(re); + }, + makeScopeMatcher: function(scopeSelector) { + scopeSelector = scopeSelector.replace(/\[/g, "\\[").replace(/\]/g, "\\]"); + return new RegExp("^(" + scopeSelector + ")" + selectorReSuffix, "m"); + }, + applySelectorScope: function(selector, selectorScope) { + return Array.isArray(selectorScope) ? this.applySelectorScopeList(selector, selectorScope) : this.applySimpleSelectorScope(selector, selectorScope); + }, + applySelectorScopeList: function(selector, scopeSelectorList) { + var r = []; + for (var i = 0, s; s = scopeSelectorList[i]; i++) { + r.push(this.applySimpleSelectorScope(selector, s)); + } + return r.join(", "); + }, + applySimpleSelectorScope: function(selector, scopeSelector) { + if (selector.match(polyfillHostRe)) { + selector = selector.replace(polyfillHostNoCombinator, scopeSelector); + return selector.replace(polyfillHostRe, scopeSelector + " "); + } else { + return scopeSelector + " " + selector; + } + }, + applyStrictSelectorScope: function(selector, scopeSelector) { + scopeSelector = scopeSelector.replace(/\[is=([^\]]*)\]/g, "$1"); + var splits = [ " ", ">", "+", "~" ], scoped = selector, attrName = "[" + scopeSelector + "]"; + splits.forEach(function(sep) { + var parts = scoped.split(sep); + scoped = parts.map(function(p) { + var t = p.trim().replace(polyfillHostRe, ""); + if (t && splits.indexOf(t) < 0 && t.indexOf(attrName) < 0) { + p = t.replace(/([^:]*)(:*)(.*)/, "$1" + attrName + "$2$3"); + } + return p; + }).join(sep); + }); + return scoped; + }, + insertPolyfillHostInCssText: function(selector) { + return selector.replace(colonHostContextRe, polyfillHostContext).replace(colonHostRe, polyfillHost); + }, + propertiesFromRule: function(rule) { + var cssText = rule.style.cssText; + if (rule.style.content && !rule.style.content.match(/['"]+|attr/)) { + cssText = cssText.replace(/content:[^;]*;/g, "content: '" + rule.style.content + "';"); + } + var style = rule.style; + for (var i in style) { + if (style[i] === "initial") { + cssText += i + ": initial; "; + } + } + return cssText; + }, + replaceTextInStyles: function(styles, action) { + if (styles && action) { + if (!(styles instanceof Array)) { + styles = [ styles ]; + } + Array.prototype.forEach.call(styles, function(s) { + s.textContent = action.call(this, s.textContent); + }, this); + } + }, + addCssToDocument: function(cssText, name) { + if (cssText.match("@import")) { + addOwnSheet(cssText, name); + } else { + addCssToDocument(cssText); + } + } + }; + var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)"; + var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ]; + function stylesToCssText(styles, preserveComments) { + var cssText = ""; + Array.prototype.forEach.call(styles, function(s) { + cssText += s.textContent + "\n\n"; + }); + if (!preserveComments) { + cssText = cssText.replace(cssCommentRe, ""); + } + return cssText; + } + function cssTextToStyle(cssText) { + var style = document.createElement("style"); + style.textContent = cssText; + return style; + } + function cssToRules(cssText) { + var style = cssTextToStyle(cssText); + document.head.appendChild(style); + var rules = []; + if (style.sheet) { + try { + rules = style.sheet.cssRules; + } catch (e) {} + } else { + console.warn("sheet not found", style); + } + style.parentNode.removeChild(style); + return rules; + } + var frame = document.createElement("iframe"); + frame.style.display = "none"; + function initFrame() { + frame.initialized = true; + document.body.appendChild(frame); + var doc = frame.contentDocument; + var base = doc.createElement("base"); + base.href = document.baseURI; + doc.head.appendChild(base); + } + function inFrame(fn) { + if (!frame.initialized) { + initFrame(); + } + document.body.appendChild(frame); + fn(frame.contentDocument); + document.body.removeChild(frame); + } + var isChrome = navigator.userAgent.match("Chrome"); + function withCssRules(cssText, callback) { + if (!callback) { + return; + } + var rules; + if (cssText.match("@import") && isChrome) { + var style = cssTextToStyle(cssText); + inFrame(function(doc) { + doc.head.appendChild(style.impl); + rules = Array.prototype.slice.call(style.sheet.cssRules, 0); + callback(rules); + }); + } else { + rules = cssToRules(cssText); + callback(rules); + } + } + function rulesToCss(cssRules) { + for (var i = 0, css = []; i < cssRules.length; i++) { + css.push(cssRules[i].cssText); + } + return css.join("\n\n"); + } + function addCssToDocument(cssText) { + if (cssText) { + getSheet().appendChild(document.createTextNode(cssText)); + } + } + function addOwnSheet(cssText, name) { + var style = cssTextToStyle(cssText); + style.setAttribute(name, ""); + style.setAttribute(SHIMMED_ATTRIBUTE, ""); + document.head.appendChild(style); + } + var SHIM_ATTRIBUTE = "shim-shadowdom"; + var SHIMMED_ATTRIBUTE = "shim-shadowdom-css"; + var NO_SHIM_ATTRIBUTE = "no-shim"; + var sheet; + function getSheet() { + if (!sheet) { + sheet = document.createElement("style"); + sheet.setAttribute(SHIMMED_ATTRIBUTE, ""); + sheet[SHIMMED_ATTRIBUTE] = true; + } + return sheet; + } + if (window.ShadowDOMPolyfill) { + addCssToDocument("style { display: none !important; }\n"); + var doc = ShadowDOMPolyfill.wrap(document); + var head = doc.querySelector("head"); + head.insertBefore(getSheet(), head.childNodes[0]); + document.addEventListener("DOMContentLoaded", function() { + var urlResolver = scope.urlResolver; + if (window.HTMLImports && !HTMLImports.useNative) { + var SHIM_SHEET_SELECTOR = "link[rel=stylesheet]" + "[" + SHIM_ATTRIBUTE + "]"; + var SHIM_STYLE_SELECTOR = "style[" + SHIM_ATTRIBUTE + "]"; + HTMLImports.importer.documentPreloadSelectors += "," + SHIM_SHEET_SELECTOR; + HTMLImports.importer.importsPreloadSelectors += "," + SHIM_SHEET_SELECTOR; + HTMLImports.parser.documentSelectors = [ HTMLImports.parser.documentSelectors, SHIM_SHEET_SELECTOR, SHIM_STYLE_SELECTOR ].join(","); + var originalParseGeneric = HTMLImports.parser.parseGeneric; + HTMLImports.parser.parseGeneric = function(elt) { + if (elt[SHIMMED_ATTRIBUTE]) { + return; + } + var style = elt.__importElement || elt; + if (!style.hasAttribute(SHIM_ATTRIBUTE)) { + originalParseGeneric.call(this, elt); + return; + } + if (elt.__resource) { + style = elt.ownerDocument.createElement("style"); + style.textContent = elt.__resource; + } + HTMLImports.path.resolveUrlsInStyle(style, elt.href); + style.textContent = ShadowCSS.shimStyle(style); + style.removeAttribute(SHIM_ATTRIBUTE, ""); + style.setAttribute(SHIMMED_ATTRIBUTE, ""); + style[SHIMMED_ATTRIBUTE] = true; + if (style.parentNode !== head) { + if (elt.parentNode === head) { + head.replaceChild(style, elt); + } else { + this.addElementToDocument(style); + } + } + style.__importParsed = true; + this.markParsingComplete(elt); + this.parseNext(); + }; + var hasResource = HTMLImports.parser.hasResource; + HTMLImports.parser.hasResource = function(node) { + if (node.localName === "link" && node.rel === "stylesheet" && node.hasAttribute(SHIM_ATTRIBUTE)) { + return node.__resource; + } else { + return hasResource.call(this, node); + } + }; + } + }); + } + scope.ShadowCSS = ShadowCSS; + })(window.WebComponents); +} + +(function(scope) { + if (window.ShadowDOMPolyfill) { + window.wrap = ShadowDOMPolyfill.wrapIfNeeded; + window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded; + } else { + window.wrap = window.unwrap = function(n) { + return n; + }; + } +})(window.WebComponents); + +(function(scope) { + "use strict"; + var hasWorkingUrl = false; + if (!scope.forceJURL) { + try { + var u = new URL("b", "http://a"); + u.pathname = "c%20d"; + hasWorkingUrl = u.href === "http://a/c%20d"; + } catch (e) {} + } + if (hasWorkingUrl) return; + var relative = Object.create(null); + relative["ftp"] = 21; + relative["file"] = 0; + relative["gopher"] = 70; + relative["http"] = 80; + relative["https"] = 443; + relative["ws"] = 80; + relative["wss"] = 443; + var relativePathDotMapping = Object.create(null); + relativePathDotMapping["%2e"] = "."; + relativePathDotMapping[".%2e"] = ".."; + relativePathDotMapping["%2e."] = ".."; + relativePathDotMapping["%2e%2e"] = ".."; + function isRelativeScheme(scheme) { + return relative[scheme] !== undefined; + } + function invalid() { + clear.call(this); + this._isInvalid = true; + } + function IDNAToASCII(h) { + if ("" == h) { + invalid.call(this); + } + return h.toLowerCase(); + } + function percentEscape(c) { + var unicode = c.charCodeAt(0); + if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) { + return c; + } + return encodeURIComponent(c); + } + function percentEscapeQuery(c) { + var unicode = c.charCodeAt(0); + if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) { + return c; + } + return encodeURIComponent(c); + } + var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/; + function parse(input, stateOverride, base) { + function err(message) { + errors.push(message); + } + var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = []; + loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) { + var c = input[cursor]; + switch (state) { + case "scheme start": + if (c && ALPHA.test(c)) { + buffer += c.toLowerCase(); + state = "scheme"; + } else if (!stateOverride) { + buffer = ""; + state = "no scheme"; + continue; + } else { + err("Invalid scheme."); + break loop; + } + break; + + case "scheme": + if (c && ALPHANUMERIC.test(c)) { + buffer += c.toLowerCase(); + } else if (":" == c) { + this._scheme = buffer; + buffer = ""; + if (stateOverride) { + break loop; + } + if (isRelativeScheme(this._scheme)) { + this._isRelative = true; + } + if ("file" == this._scheme) { + state = "relative"; + } else if (this._isRelative && base && base._scheme == this._scheme) { + state = "relative or authority"; + } else if (this._isRelative) { + state = "authority first slash"; + } else { + state = "scheme data"; + } + } else if (!stateOverride) { + buffer = ""; + cursor = 0; + state = "no scheme"; + continue; + } else if (EOF == c) { + break loop; + } else { + err("Code point not allowed in scheme: " + c); + break loop; + } + break; + + case "scheme data": + if ("?" == c) { + this._query = "?"; + state = "query"; + } else if ("#" == c) { + this._fragment = "#"; + state = "fragment"; + } else { + if (EOF != c && " " != c && "\n" != c && "\r" != c) { + this._schemeData += percentEscape(c); + } + } + break; + + case "no scheme": + if (!base || !isRelativeScheme(base._scheme)) { + err("Missing scheme."); + invalid.call(this); + } else { + state = "relative"; + continue; + } + break; + + case "relative or authority": + if ("/" == c && "/" == input[cursor + 1]) { + state = "authority ignore slashes"; + } else { + err("Expected /, got: " + c); + state = "relative"; + continue; + } + break; + + case "relative": + this._isRelative = true; + if ("file" != this._scheme) this._scheme = base._scheme; + if (EOF == c) { + this._host = base._host; + this._port = base._port; + this._path = base._path.slice(); + this._query = base._query; + this._username = base._username; + this._password = base._password; + break loop; + } else if ("/" == c || "\\" == c) { + if ("\\" == c) err("\\ is an invalid code point."); + state = "relative slash"; + } else if ("?" == c) { + this._host = base._host; + this._port = base._port; + this._path = base._path.slice(); + this._query = "?"; + this._username = base._username; + this._password = base._password; + state = "query"; + } else if ("#" == c) { + this._host = base._host; + this._port = base._port; + this._path = base._path.slice(); + this._query = base._query; + this._fragment = "#"; + this._username = base._username; + this._password = base._password; + state = "fragment"; + } else { + var nextC = input[cursor + 1]; + var nextNextC = input[cursor + 2]; + if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) { + this._host = base._host; + this._port = base._port; + this._username = base._username; + this._password = base._password; + this._path = base._path.slice(); + this._path.pop(); + } + state = "relative path"; + continue; + } + break; + + case "relative slash": + if ("/" == c || "\\" == c) { + if ("\\" == c) { + err("\\ is an invalid code point."); + } + if ("file" == this._scheme) { + state = "file host"; + } else { + state = "authority ignore slashes"; + } + } else { + if ("file" != this._scheme) { + this._host = base._host; + this._port = base._port; + this._username = base._username; + this._password = base._password; + } + state = "relative path"; + continue; + } + break; + + case "authority first slash": + if ("/" == c) { + state = "authority second slash"; + } else { + err("Expected '/', got: " + c); + state = "authority ignore slashes"; + continue; + } + break; + + case "authority second slash": + state = "authority ignore slashes"; + if ("/" != c) { + err("Expected '/', got: " + c); + continue; + } + break; + + case "authority ignore slashes": + if ("/" != c && "\\" != c) { + state = "authority"; + continue; + } else { + err("Expected authority, got: " + c); + } + break; + + case "authority": + if ("@" == c) { + if (seenAt) { + err("@ already seen."); + buffer += "%40"; + } + seenAt = true; + for (var i = 0; i < buffer.length; i++) { + var cp = buffer[i]; + if (" " == cp || "\n" == cp || "\r" == cp) { + err("Invalid whitespace in authority."); + continue; + } + if (":" == cp && null === this._password) { + this._password = ""; + continue; + } + var tempC = percentEscape(cp); + null !== this._password ? this._password += tempC : this._username += tempC; + } + buffer = ""; + } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { + cursor -= buffer.length; + buffer = ""; + state = "host"; + continue; + } else { + buffer += c; + } + break; + + case "file host": + if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { + if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) { + state = "relative path"; + } else if (buffer.length == 0) { + state = "relative path start"; + } else { + this._host = IDNAToASCII.call(this, buffer); + buffer = ""; + state = "relative path start"; + } + continue; + } else if (" " == c || "\n" == c || "\r" == c) { + err("Invalid whitespace in file host."); + } else { + buffer += c; + } + break; + + case "host": + case "hostname": + if (":" == c && !seenBracket) { + this._host = IDNAToASCII.call(this, buffer); + buffer = ""; + state = "port"; + if ("hostname" == stateOverride) { + break loop; + } + } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) { + this._host = IDNAToASCII.call(this, buffer); + buffer = ""; + state = "relative path start"; + if (stateOverride) { + break loop; + } + continue; + } else if (" " != c && "\n" != c && "\r" != c) { + if ("[" == c) { + seenBracket = true; + } else if ("]" == c) { + seenBracket = false; + } + buffer += c; + } else { + err("Invalid code point in host/hostname: " + c); + } + break; + + case "port": + if (/[0-9]/.test(c)) { + buffer += c; + } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) { + if ("" != buffer) { + var temp = parseInt(buffer, 10); + if (temp != relative[this._scheme]) { + this._port = temp + ""; + } + buffer = ""; + } + if (stateOverride) { + break loop; + } + state = "relative path start"; + continue; + } else if (" " == c || "\n" == c || "\r" == c) { + err("Invalid code point in port: " + c); + } else { + invalid.call(this); + } + break; + + case "relative path start": + if ("\\" == c) err("'\\' not allowed in path."); + state = "relative path"; + if ("/" != c && "\\" != c) { + continue; + } + break; + + case "relative path": + if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) { + if ("\\" == c) { + err("\\ not allowed in relative path."); + } + var tmp; + if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { + buffer = tmp; + } + if (".." == buffer) { + this._path.pop(); + if ("/" != c && "\\" != c) { + this._path.push(""); + } + } else if ("." == buffer && "/" != c && "\\" != c) { + this._path.push(""); + } else if ("." != buffer) { + if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") { + buffer = buffer[0] + ":"; + } + this._path.push(buffer); + } + buffer = ""; + if ("?" == c) { + this._query = "?"; + state = "query"; + } else if ("#" == c) { + this._fragment = "#"; + state = "fragment"; + } + } else if (" " != c && "\n" != c && "\r" != c) { + buffer += percentEscape(c); + } + break; + + case "query": + if (!stateOverride && "#" == c) { + this._fragment = "#"; + state = "fragment"; + } else if (EOF != c && " " != c && "\n" != c && "\r" != c) { + this._query += percentEscapeQuery(c); + } + break; + + case "fragment": + if (EOF != c && " " != c && "\n" != c && "\r" != c) { + this._fragment += c; + } + break; + } + cursor++; + } + } + function clear() { + this._scheme = ""; + this._schemeData = ""; + this._username = ""; + this._password = null; + this._host = ""; + this._port = ""; + this._path = []; + this._query = ""; + this._fragment = ""; + this._isInvalid = false; + this._isRelative = false; + } + function jURL(url, base) { + if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base)); + this._url = url; + clear.call(this); + var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ""); + parse.call(this, input, null, base); + } + jURL.prototype = { + toString: function() { + return this.href; + }, + get href() { + if (this._isInvalid) return this._url; + var authority = ""; + if ("" != this._username || null != this._password) { + authority = this._username + (null != this._password ? ":" + this._password : "") + "@"; + } + return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment; + }, + set href(href) { + clear.call(this); + parse.call(this, href); + }, + get protocol() { + return this._scheme + ":"; + }, + set protocol(protocol) { + if (this._isInvalid) return; + parse.call(this, protocol + ":", "scheme start"); + }, + get host() { + return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host; + }, + set host(host) { + if (this._isInvalid || !this._isRelative) return; + parse.call(this, host, "host"); + }, + get hostname() { + return this._host; + }, + set hostname(hostname) { + if (this._isInvalid || !this._isRelative) return; + parse.call(this, hostname, "hostname"); + }, + get port() { + return this._port; + }, + set port(port) { + if (this._isInvalid || !this._isRelative) return; + parse.call(this, port, "port"); + }, + get pathname() { + return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData; + }, + set pathname(pathname) { + if (this._isInvalid || !this._isRelative) return; + this._path = []; + parse.call(this, pathname, "relative path start"); + }, + get search() { + return this._isInvalid || !this._query || "?" == this._query ? "" : this._query; + }, + set search(search) { + if (this._isInvalid || !this._isRelative) return; + this._query = "?"; + if ("?" == search[0]) search = search.slice(1); + parse.call(this, search, "query"); + }, + get hash() { + return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment; + }, + set hash(hash) { + if (this._isInvalid) return; + this._fragment = "#"; + if ("#" == hash[0]) hash = hash.slice(1); + parse.call(this, hash, "fragment"); + }, + get origin() { + var host; + if (this._isInvalid || !this._scheme) { + return ""; + } + switch (this._scheme) { + case "data": + case "file": + case "javascript": + case "mailto": + return "null"; + } + host = this.host; + if (!host) { + return ""; + } + return this._scheme + "://" + host; + } + }; + var OriginalURL = scope.URL; + if (OriginalURL) { + jURL.createObjectURL = function(blob) { + return OriginalURL.createObjectURL.apply(OriginalURL, arguments); + }; + jURL.revokeObjectURL = function(url) { + OriginalURL.revokeObjectURL(url); + }; + } + scope.URL = jURL; +})(this); + +(function(global) { + var registrationsTable = new WeakMap(); + var setImmediate; + if (/Trident|Edge/.test(navigator.userAgent)) { + setImmediate = setTimeout; + } else if (window.setImmediate) { + setImmediate = window.setImmediate; + } else { + var setImmediateQueue = []; + var sentinel = String(Math.random()); + window.addEventListener("message", function(e) { + if (e.data === sentinel) { + var queue = setImmediateQueue; + setImmediateQueue = []; + queue.forEach(function(func) { + func(); + }); + } + }); + setImmediate = function(func) { + setImmediateQueue.push(func); + window.postMessage(sentinel, "*"); + }; + } + var isScheduled = false; + var scheduledObservers = []; + function scheduleCallback(observer) { + scheduledObservers.push(observer); + if (!isScheduled) { + isScheduled = true; + setImmediate(dispatchCallbacks); + } + } + function wrapIfNeeded(node) { + return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node; + } + function dispatchCallbacks() { + isScheduled = false; + var observers = scheduledObservers; + scheduledObservers = []; + observers.sort(function(o1, o2) { + return o1.uid_ - o2.uid_; + }); + var anyNonEmpty = false; + observers.forEach(function(observer) { + var queue = observer.takeRecords(); + removeTransientObserversFor(observer); + if (queue.length) { + observer.callback_(queue, observer); + anyNonEmpty = true; + } + }); + if (anyNonEmpty) dispatchCallbacks(); + } + function removeTransientObserversFor(observer) { + observer.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + if (!registrations) return; + registrations.forEach(function(registration) { + if (registration.observer === observer) registration.removeTransientObservers(); + }); + }); + } + function forEachAncestorAndObserverEnqueueRecord(target, callback) { + for (var node = target; node; node = node.parentNode) { + var registrations = registrationsTable.get(node); + if (registrations) { + for (var j = 0; j < registrations.length; j++) { + var registration = registrations[j]; + var options = registration.options; + if (node !== target && !options.subtree) continue; + var record = callback(options); + if (record) registration.enqueue(record); + } + } + } + } + var uidCounter = 0; + function JsMutationObserver(callback) { + this.callback_ = callback; + this.nodes_ = []; + this.records_ = []; + this.uid_ = ++uidCounter; + } + JsMutationObserver.prototype = { + observe: function(target, options) { + target = wrapIfNeeded(target); + if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) { + throw new SyntaxError(); + } + var registrations = registrationsTable.get(target); + if (!registrations) registrationsTable.set(target, registrations = []); + var registration; + for (var i = 0; i < registrations.length; i++) { + if (registrations[i].observer === this) { + registration = registrations[i]; + registration.removeListeners(); + registration.options = options; + break; + } + } + if (!registration) { + registration = new Registration(this, target, options); + registrations.push(registration); + this.nodes_.push(target); + } + registration.addListeners(); + }, + disconnect: function() { + this.nodes_.forEach(function(node) { + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + var registration = registrations[i]; + if (registration.observer === this) { + registration.removeListeners(); + registrations.splice(i, 1); + break; + } + } + }, this); + this.records_ = []; + }, + takeRecords: function() { + var copyOfRecords = this.records_; + this.records_ = []; + return copyOfRecords; + } + }; + function MutationRecord(type, target) { + this.type = type; + this.target = target; + this.addedNodes = []; + this.removedNodes = []; + this.previousSibling = null; + this.nextSibling = null; + this.attributeName = null; + this.attributeNamespace = null; + this.oldValue = null; + } + function copyMutationRecord(original) { + var record = new MutationRecord(original.type, original.target); + record.addedNodes = original.addedNodes.slice(); + record.removedNodes = original.removedNodes.slice(); + record.previousSibling = original.previousSibling; + record.nextSibling = original.nextSibling; + record.attributeName = original.attributeName; + record.attributeNamespace = original.attributeNamespace; + record.oldValue = original.oldValue; + return record; + } + var currentRecord, recordWithOldValue; + function getRecord(type, target) { + return currentRecord = new MutationRecord(type, target); + } + function getRecordWithOldValue(oldValue) { + if (recordWithOldValue) return recordWithOldValue; + recordWithOldValue = copyMutationRecord(currentRecord); + recordWithOldValue.oldValue = oldValue; + return recordWithOldValue; + } + function clearRecords() { + currentRecord = recordWithOldValue = undefined; + } + function recordRepresentsCurrentMutation(record) { + return record === recordWithOldValue || record === currentRecord; + } + function selectRecord(lastRecord, newRecord) { + if (lastRecord === newRecord) return lastRecord; + if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue; + return null; + } + function Registration(observer, target, options) { + this.observer = observer; + this.target = target; + this.options = options; + this.transientObservedNodes = []; + } + Registration.prototype = { + enqueue: function(record) { + var records = this.observer.records_; + var length = records.length; + if (records.length > 0) { + var lastRecord = records[length - 1]; + var recordToReplaceLast = selectRecord(lastRecord, record); + if (recordToReplaceLast) { + records[length - 1] = recordToReplaceLast; + return; + } + } else { + scheduleCallback(this.observer); + } + records[length] = record; + }, + addListeners: function() { + this.addListeners_(this.target); + }, + addListeners_: function(node) { + var options = this.options; + if (options.attributes) node.addEventListener("DOMAttrModified", this, true); + if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.addEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true); + }, + removeListeners: function() { + this.removeListeners_(this.target); + }, + removeListeners_: function(node) { + var options = this.options; + if (options.attributes) node.removeEventListener("DOMAttrModified", this, true); + if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true); + if (options.childList) node.removeEventListener("DOMNodeInserted", this, true); + if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true); + }, + addTransientObserver: function(node) { + if (node === this.target) return; + this.addListeners_(node); + this.transientObservedNodes.push(node); + var registrations = registrationsTable.get(node); + if (!registrations) registrationsTable.set(node, registrations = []); + registrations.push(this); + }, + removeTransientObservers: function() { + var transientObservedNodes = this.transientObservedNodes; + this.transientObservedNodes = []; + transientObservedNodes.forEach(function(node) { + this.removeListeners_(node); + var registrations = registrationsTable.get(node); + for (var i = 0; i < registrations.length; i++) { + if (registrations[i] === this) { + registrations.splice(i, 1); + break; + } + } + }, this); + }, + handleEvent: function(e) { + e.stopImmediatePropagation(); + switch (e.type) { + case "DOMAttrModified": + var name = e.attrName; + var namespace = e.relatedNode.namespaceURI; + var target = e.target; + var record = new getRecord("attributes", target); + record.attributeName = name; + record.attributeNamespace = namespace; + var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.attributes) return; + if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) { + return; + } + if (options.attributeOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMCharacterDataModified": + var target = e.target; + var record = getRecord("characterData", target); + var oldValue = e.prevValue; + forEachAncestorAndObserverEnqueueRecord(target, function(options) { + if (!options.characterData) return; + if (options.characterDataOldValue) return getRecordWithOldValue(oldValue); + return record; + }); + break; + + case "DOMNodeRemoved": + this.addTransientObserver(e.target); + + case "DOMNodeInserted": + var changedNode = e.target; + var addedNodes, removedNodes; + if (e.type === "DOMNodeInserted") { + addedNodes = [ changedNode ]; + removedNodes = []; + } else { + addedNodes = []; + removedNodes = [ changedNode ]; + } + var previousSibling = changedNode.previousSibling; + var nextSibling = changedNode.nextSibling; + var record = getRecord("childList", e.target.parentNode); + record.addedNodes = addedNodes; + record.removedNodes = removedNodes; + record.previousSibling = previousSibling; + record.nextSibling = nextSibling; + forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) { + if (!options.childList) return; + return record; + }); + } + clearRecords(); + } + }; + global.JsMutationObserver = JsMutationObserver; + if (!global.MutationObserver) global.MutationObserver = JsMutationObserver; +})(this); + +window.HTMLImports = window.HTMLImports || { + flags: {} +}; + +(function(scope) { + var IMPORT_LINK_TYPE = "import"; + var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link")); + var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill); + var wrap = function(node) { + return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node; + }; + var rootDocument = wrap(document); + var currentScriptDescriptor = { + get: function() { + var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null); + return wrap(script); + }, + configurable: true + }; + Object.defineProperty(document, "_currentScript", currentScriptDescriptor); + Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor); + var isIE = /Trident/.test(navigator.userAgent); + function whenReady(callback, doc) { + doc = doc || rootDocument; + whenDocumentReady(function() { + watchImportsLoad(callback, doc); + }, doc); + } + var requiredReadyState = isIE ? "complete" : "interactive"; + var READY_EVENT = "readystatechange"; + function isDocumentReady(doc) { + return doc.readyState === "complete" || doc.readyState === requiredReadyState; + } + function whenDocumentReady(callback, doc) { + if (!isDocumentReady(doc)) { + var checkReady = function() { + if (doc.readyState === "complete" || doc.readyState === requiredReadyState) { + doc.removeEventListener(READY_EVENT, checkReady); + whenDocumentReady(callback, doc); + } + }; + doc.addEventListener(READY_EVENT, checkReady); + } else if (callback) { + callback(); + } + } + function markTargetLoaded(event) { + event.target.__loaded = true; + } + function watchImportsLoad(callback, doc) { + var imports = doc.querySelectorAll("link[rel=import]"); + var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = []; + function checkDone() { + if (parsedCount == importCount && callback) { + callback({ + allImports: imports, + loadedImports: newImports, + errorImports: errorImports + }); + } + } + function loadedImport(e) { + markTargetLoaded(e); + newImports.push(this); + parsedCount++; + checkDone(); + } + function errorLoadingImport(e) { + errorImports.push(this); + parsedCount++; + checkDone(); + } + if (importCount) { + for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) { + if (isImportLoaded(imp)) { + parsedCount++; + checkDone(); + } else { + imp.addEventListener("load", loadedImport); + imp.addEventListener("error", errorLoadingImport); + } + } + } else { + checkDone(); + } + } + function isImportLoaded(link) { + return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed; + } + if (useNative) { + new MutationObserver(function(mxns) { + for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) { + if (m.addedNodes) { + handleImports(m.addedNodes); + } + } + }).observe(document.head, { + childList: true + }); + function handleImports(nodes) { + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + if (isImport(n)) { + handleImport(n); + } + } + } + function isImport(element) { + return element.localName === "link" && element.rel === "import"; + } + function handleImport(element) { + var loaded = element.import; + if (loaded) { + markTargetLoaded({ + target: element + }); + } else { + element.addEventListener("load", markTargetLoaded); + element.addEventListener("error", markTargetLoaded); + } + } + (function() { + if (document.readyState === "loading") { + var imports = document.querySelectorAll("link[rel=import]"); + for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) { + handleImport(imp); + } + } + })(); + } + whenReady(function(detail) { + window.HTMLImports.ready = true; + window.HTMLImports.readyTime = new Date().getTime(); + var evt = rootDocument.createEvent("CustomEvent"); + evt.initCustomEvent("HTMLImportsLoaded", true, true, detail); + rootDocument.dispatchEvent(evt); + }); + scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE; + scope.useNative = useNative; + scope.rootDocument = rootDocument; + scope.whenReady = whenReady; + scope.isIE = isIE; +})(window.HTMLImports); + +(function(scope) { + var modules = []; + var addModule = function(module) { + modules.push(module); + }; + var initializeModules = function() { + modules.forEach(function(module) { + module(scope); + }); + }; + scope.addModule = addModule; + scope.initializeModules = initializeModules; +})(window.HTMLImports); + +window.HTMLImports.addModule(function(scope) { + var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g; + var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g; + var path = { + resolveUrlsInStyle: function(style, linkUrl) { + var doc = style.ownerDocument; + var resolver = doc.createElement("a"); + style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver); + return style; + }, + resolveUrlsInCssText: function(cssText, linkUrl, urlObj) { + var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP); + r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP); + return r; + }, + replaceUrls: function(text, urlObj, linkUrl, regexp) { + return text.replace(regexp, function(m, pre, url, post) { + var urlPath = url.replace(/["']/g, ""); + if (linkUrl) { + urlPath = new URL(urlPath, linkUrl).href; + } + urlObj.href = urlPath; + urlPath = urlObj.href; + return pre + "'" + urlPath + "'" + post; + }); + } + }; + scope.path = path; +}); + +window.HTMLImports.addModule(function(scope) { + var xhr = { + async: true, + ok: function(request) { + return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0; + }, + load: function(url, next, nextContext) { + var request = new XMLHttpRequest(); + if (scope.flags.debug || scope.flags.bust) { + url += "?" + Math.random(); + } + request.open("GET", url, xhr.async); + request.addEventListener("readystatechange", function(e) { + if (request.readyState === 4) { + var locationHeader = request.getResponseHeader("Location"); + var redirectedUrl = null; + if (locationHeader) { + var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader; + } + next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl); + } + }); + request.send(); + return request; + }, + loadDocument: function(url, next, nextContext) { + this.load(url, next, nextContext).responseType = "document"; + } + }; + scope.xhr = xhr; +}); + +window.HTMLImports.addModule(function(scope) { + var xhr = scope.xhr; + var flags = scope.flags; + var Loader = function(onLoad, onComplete) { + this.cache = {}; + this.onload = onLoad; + this.oncomplete = onComplete; + this.inflight = 0; + this.pending = {}; + }; + Loader.prototype = { + addNodes: function(nodes) { + this.inflight += nodes.length; + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + this.require(n); + } + this.checkDone(); + }, + addNode: function(node) { + this.inflight++; + this.require(node); + this.checkDone(); + }, + require: function(elt) { + var url = elt.src || elt.href; + elt.__nodeUrl = url; + if (!this.dedupe(url, elt)) { + this.fetch(url, elt); + } + }, + dedupe: function(url, elt) { + if (this.pending[url]) { + this.pending[url].push(elt); + return true; + } + var resource; + if (this.cache[url]) { + this.onload(url, elt, this.cache[url]); + this.tail(); + return true; + } + this.pending[url] = [ elt ]; + return false; + }, + fetch: function(url, elt) { + flags.load && console.log("fetch", url, elt); + if (!url) { + setTimeout(function() { + this.receive(url, elt, { + error: "href must be specified" + }, null); + }.bind(this), 0); + } else if (url.match(/^data:/)) { + var pieces = url.split(","); + var header = pieces[0]; + var body = pieces[1]; + if (header.indexOf(";base64") > -1) { + body = atob(body); + } else { + body = decodeURIComponent(body); + } + setTimeout(function() { + this.receive(url, elt, null, body); + }.bind(this), 0); + } else { + var receiveXhr = function(err, resource, redirectedUrl) { + this.receive(url, elt, err, resource, redirectedUrl); + }.bind(this); + xhr.load(url, receiveXhr); + } + }, + receive: function(url, elt, err, resource, redirectedUrl) { + this.cache[url] = resource; + var $p = this.pending[url]; + for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { + this.onload(url, p, resource, err, redirectedUrl); + this.tail(); + } + this.pending[url] = null; + }, + tail: function() { + --this.inflight; + this.checkDone(); + }, + checkDone: function() { + if (!this.inflight) { + this.oncomplete(); + } + } + }; + scope.Loader = Loader; +}); + +window.HTMLImports.addModule(function(scope) { + var Observer = function(addCallback) { + this.addCallback = addCallback; + this.mo = new MutationObserver(this.handler.bind(this)); + }; + Observer.prototype = { + handler: function(mutations) { + for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) { + if (m.type === "childList" && m.addedNodes.length) { + this.addedNodes(m.addedNodes); + } + } + }, + addedNodes: function(nodes) { + if (this.addCallback) { + this.addCallback(nodes); + } + for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) { + if (n.children && n.children.length) { + this.addedNodes(n.children); + } + } + }, + observe: function(root) { + this.mo.observe(root, { + childList: true, + subtree: true + }); + } + }; + scope.Observer = Observer; +}); + +window.HTMLImports.addModule(function(scope) { + var path = scope.path; + var rootDocument = scope.rootDocument; + var flags = scope.flags; + var isIE = scope.isIE; + var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; + var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]"; + var importParser = { + documentSelectors: IMPORT_SELECTOR, + importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","), + map: { + link: "parseLink", + script: "parseScript", + style: "parseStyle" + }, + dynamicElements: [], + parseNext: function() { + var next = this.nextToParse(); + if (next) { + this.parse(next); + } + }, + parse: function(elt) { + if (this.isParsed(elt)) { + flags.parse && console.log("[%s] is already parsed", elt.localName); + return; + } + var fn = this[this.map[elt.localName]]; + if (fn) { + this.markParsing(elt); + fn.call(this, elt); + } + }, + parseDynamic: function(elt, quiet) { + this.dynamicElements.push(elt); + if (!quiet) { + this.parseNext(); + } + }, + markParsing: function(elt) { + flags.parse && console.log("parsing", elt); + this.parsingElement = elt; + }, + markParsingComplete: function(elt) { + elt.__importParsed = true; + this.markDynamicParsingComplete(elt); + if (elt.__importElement) { + elt.__importElement.__importParsed = true; + this.markDynamicParsingComplete(elt.__importElement); + } + this.parsingElement = null; + flags.parse && console.log("completed", elt); + }, + markDynamicParsingComplete: function(elt) { + var i = this.dynamicElements.indexOf(elt); + if (i >= 0) { + this.dynamicElements.splice(i, 1); + } + }, + parseImport: function(elt) { + if (window.HTMLImports.__importsParsingHook) { + window.HTMLImports.__importsParsingHook(elt); + } + if (elt.import) { + elt.import.__importParsed = true; + } + this.markParsingComplete(elt); + if (elt.__resource && !elt.__error) { + elt.dispatchEvent(new CustomEvent("load", { + bubbles: false + })); + } else { + elt.dispatchEvent(new CustomEvent("error", { + bubbles: false + })); + } + if (elt.__pending) { + var fn; + while (elt.__pending.length) { + fn = elt.__pending.shift(); + if (fn) { + fn({ + target: elt + }); + } + } + } + this.parseNext(); + }, + parseLink: function(linkElt) { + if (nodeIsImport(linkElt)) { + this.parseImport(linkElt); + } else { + linkElt.href = linkElt.href; + this.parseGeneric(linkElt); + } + }, + parseStyle: function(elt) { + var src = elt; + elt = cloneStyle(elt); + src.__appliedElement = elt; + elt.__importElement = src; + this.parseGeneric(elt); + }, + parseGeneric: function(elt) { + this.trackElement(elt); + this.addElementToDocument(elt); + }, + rootImportForElement: function(elt) { + var n = elt; + while (n.ownerDocument.__importLink) { + n = n.ownerDocument.__importLink; + } + return n; + }, + addElementToDocument: function(elt) { + var port = this.rootImportForElement(elt.__importElement || elt); + port.parentNode.insertBefore(elt, port); + }, + trackElement: function(elt, callback) { + var self = this; + var done = function(e) { + if (callback) { + callback(e); + } + self.markParsingComplete(elt); + self.parseNext(); + }; + elt.addEventListener("load", done); + elt.addEventListener("error", done); + if (isIE && elt.localName === "style") { + var fakeLoad = false; + if (elt.textContent.indexOf("@import") == -1) { + fakeLoad = true; + } else if (elt.sheet) { + fakeLoad = true; + var csr = elt.sheet.cssRules; + var len = csr ? csr.length : 0; + for (var i = 0, r; i < len && (r = csr[i]); i++) { + if (r.type === CSSRule.IMPORT_RULE) { + fakeLoad = fakeLoad && Boolean(r.styleSheet); + } + } + } + if (fakeLoad) { + setTimeout(function() { + elt.dispatchEvent(new CustomEvent("load", { + bubbles: false + })); + }); + } + } + }, + parseScript: function(scriptElt) { + var script = document.createElement("script"); + script.__importElement = scriptElt; + script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt); + scope.currentScript = scriptElt; + this.trackElement(script, function(e) { + script.parentNode.removeChild(script); + scope.currentScript = null; + }); + this.addElementToDocument(script); + }, + nextToParse: function() { + this._mayParse = []; + return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic()); + }, + nextToParseInDoc: function(doc, link) { + if (doc && this._mayParse.indexOf(doc) < 0) { + this._mayParse.push(doc); + var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc)); + for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) { + if (!this.isParsed(n)) { + if (this.hasResource(n)) { + return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n; + } else { + return; + } + } + } + } + return link; + }, + nextToParseDynamic: function() { + return this.dynamicElements[0]; + }, + parseSelectorsForNode: function(node) { + var doc = node.ownerDocument || node; + return doc === rootDocument ? this.documentSelectors : this.importsSelectors; + }, + isParsed: function(node) { + return node.__importParsed; + }, + needsDynamicParsing: function(elt) { + return this.dynamicElements.indexOf(elt) >= 0; + }, + hasResource: function(node) { + if (nodeIsImport(node) && node.import === undefined) { + return false; + } + return true; + } + }; + function nodeIsImport(elt) { + return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE; + } + function generateScriptDataUrl(script) { + var scriptContent = generateScriptContent(script); + return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent); + } + function generateScriptContent(script) { + return script.textContent + generateSourceMapHint(script); + } + function generateSourceMapHint(script) { + var owner = script.ownerDocument; + owner.__importedScripts = owner.__importedScripts || 0; + var moniker = script.ownerDocument.baseURI; + var num = owner.__importedScripts ? "-" + owner.__importedScripts : ""; + owner.__importedScripts++; + return "\n//# sourceURL=" + moniker + num + ".js\n"; + } + function cloneStyle(style) { + var clone = style.ownerDocument.createElement("style"); + clone.textContent = style.textContent; + path.resolveUrlsInStyle(clone); + return clone; + } + scope.parser = importParser; + scope.IMPORT_SELECTOR = IMPORT_SELECTOR; +}); + +window.HTMLImports.addModule(function(scope) { + var flags = scope.flags; + var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; + var IMPORT_SELECTOR = scope.IMPORT_SELECTOR; + var rootDocument = scope.rootDocument; + var Loader = scope.Loader; + var Observer = scope.Observer; + var parser = scope.parser; + var importer = { + documents: {}, + documentPreloadSelectors: IMPORT_SELECTOR, + importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","), + loadNode: function(node) { + importLoader.addNode(node); + }, + loadSubtree: function(parent) { + var nodes = this.marshalNodes(parent); + importLoader.addNodes(nodes); + }, + marshalNodes: function(parent) { + return parent.querySelectorAll(this.loadSelectorsForNode(parent)); + }, + loadSelectorsForNode: function(node) { + var doc = node.ownerDocument || node; + return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors; + }, + loaded: function(url, elt, resource, err, redirectedUrl) { + flags.load && console.log("loaded", url, elt); + elt.__resource = resource; + elt.__error = err; + if (isImportLink(elt)) { + var doc = this.documents[url]; + if (doc === undefined) { + doc = err ? null : makeDocument(resource, redirectedUrl || url); + if (doc) { + doc.__importLink = elt; + this.bootDocument(doc); + } + this.documents[url] = doc; + } + elt.import = doc; + } + parser.parseNext(); + }, + bootDocument: function(doc) { + this.loadSubtree(doc); + this.observer.observe(doc); + parser.parseNext(); + }, + loadedAll: function() { + parser.parseNext(); + } + }; + var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer)); + importer.observer = new Observer(); + function isImportLink(elt) { + return isLinkRel(elt, IMPORT_LINK_TYPE); + } + function isLinkRel(elt, rel) { + return elt.localName === "link" && elt.getAttribute("rel") === rel; + } + function hasBaseURIAccessor(doc) { + return !!Object.getOwnPropertyDescriptor(doc, "baseURI"); + } + function makeDocument(resource, url) { + var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE); + doc._URL = url; + var base = doc.createElement("base"); + base.setAttribute("href", url); + if (!doc.baseURI && !hasBaseURIAccessor(doc)) { + Object.defineProperty(doc, "baseURI", { + value: url + }); + } + var meta = doc.createElement("meta"); + meta.setAttribute("charset", "utf-8"); + doc.head.appendChild(meta); + doc.head.appendChild(base); + doc.body.innerHTML = resource; + if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) { + HTMLTemplateElement.bootstrap(doc); + } + return doc; + } + if (!document.baseURI) { + var baseURIDescriptor = { + get: function() { + var base = document.querySelector("base"); + return base ? base.href : window.location.href; + }, + configurable: true + }; + Object.defineProperty(document, "baseURI", baseURIDescriptor); + Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor); + } + scope.importer = importer; + scope.importLoader = importLoader; +}); + +window.HTMLImports.addModule(function(scope) { + var parser = scope.parser; + var importer = scope.importer; + var dynamic = { + added: function(nodes) { + var owner, parsed, loading; + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { + if (!owner) { + owner = n.ownerDocument; + parsed = parser.isParsed(owner); + } + loading = this.shouldLoadNode(n); + if (loading) { + importer.loadNode(n); + } + if (this.shouldParseNode(n) && parsed) { + parser.parseDynamic(n, loading); + } + } + }, + shouldLoadNode: function(node) { + return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node)); + }, + shouldParseNode: function(node) { + return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node)); + } + }; + importer.observer.addCallback = dynamic.added.bind(dynamic); + var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector; +}); + +(function(scope) { + var initializeModules = scope.initializeModules; + var isIE = scope.isIE; + if (scope.useNative) { + return; + } + if (isIE && typeof window.CustomEvent !== "function") { + window.CustomEvent = function(inType, params) { + params = params || {}; + var e = document.createEvent("CustomEvent"); + e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); + e.preventDefault = function() { + Object.defineProperty(this, "defaultPrevented", { + get: function() { + return true; + } + }); + }; + return e; + }; + window.CustomEvent.prototype = window.Event.prototype; + } + initializeModules(); + var rootDocument = scope.rootDocument; + function bootstrap() { + window.HTMLImports.importer.bootDocument(rootDocument); + } + if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) { + bootstrap(); + } else { + document.addEventListener("DOMContentLoaded", bootstrap); + } +})(window.HTMLImports); + +window.CustomElements = window.CustomElements || { + flags: {} +}; + +(function(scope) { + var flags = scope.flags; + var modules = []; + var addModule = function(module) { + modules.push(module); + }; + var initializeModules = function() { + modules.forEach(function(module) { + module(scope); + }); + }; + scope.addModule = addModule; + scope.initializeModules = initializeModules; + scope.hasNative = Boolean(document.registerElement); + scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative); +})(window.CustomElements); + +window.CustomElements.addModule(function(scope) { + var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none"; + function forSubtree(node, cb) { + findAllElements(node, function(e) { + if (cb(e)) { + return true; + } + forRoots(e, cb); + }); + forRoots(node, cb); + } + function findAllElements(node, find, data) { + var e = node.firstElementChild; + if (!e) { + e = node.firstChild; + while (e && e.nodeType !== Node.ELEMENT_NODE) { + e = e.nextSibling; + } + } + while (e) { + if (find(e, data) !== true) { + findAllElements(e, find, data); + } + e = e.nextElementSibling; + } + return null; + } + function forRoots(node, cb) { + var root = node.shadowRoot; + while (root) { + forSubtree(root, cb); + root = root.olderShadowRoot; + } + } + function forDocumentTree(doc, cb) { + _forDocumentTree(doc, cb, []); + } + function _forDocumentTree(doc, cb, processingDocuments) { + doc = window.wrap(doc); + if (processingDocuments.indexOf(doc) >= 0) { + return; + } + processingDocuments.push(doc); + var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]"); + for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) { + if (n.import) { + _forDocumentTree(n.import, cb, processingDocuments); + } + } + cb(doc); + } + scope.forDocumentTree = forDocumentTree; + scope.forSubtree = forSubtree; +}); + +window.CustomElements.addModule(function(scope) { + var flags = scope.flags; + var forSubtree = scope.forSubtree; + var forDocumentTree = scope.forDocumentTree; + function addedNode(node) { + return added(node) || addedSubtree(node); + } + function added(node) { + if (scope.upgrade(node)) { + return true; + } + attached(node); + } + function addedSubtree(node) { + forSubtree(node, function(e) { + if (added(e)) { + return true; + } + }); + } + function attachedNode(node) { + attached(node); + if (inDocument(node)) { + forSubtree(node, function(e) { + attached(e); + }); + } + } + var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver; + scope.hasPolyfillMutations = hasPolyfillMutations; + var isPendingMutations = false; + var pendingMutations = []; + function deferMutation(fn) { + pendingMutations.push(fn); + if (!isPendingMutations) { + isPendingMutations = true; + setTimeout(takeMutations); + } + } + function takeMutations() { + isPendingMutations = false; + var $p = pendingMutations; + for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { + p(); + } + pendingMutations = []; + } + function attached(element) { + if (hasPolyfillMutations) { + deferMutation(function() { + _attached(element); + }); + } else { + _attached(element); + } + } + function _attached(element) { + if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { + if (!element.__attached && inDocument(element)) { + element.__attached = true; + if (element.attachedCallback) { + element.attachedCallback(); + } + } + } + } + function detachedNode(node) { + detached(node); + forSubtree(node, function(e) { + detached(e); + }); + } + function detached(element) { + if (hasPolyfillMutations) { + deferMutation(function() { + _detached(element); + }); + } else { + _detached(element); + } + } + function _detached(element) { + if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { + if (element.__attached && !inDocument(element)) { + element.__attached = false; + if (element.detachedCallback) { + element.detachedCallback(); + } + } + } + } + function inDocument(element) { + var p = element; + var doc = wrap(document); + while (p) { + if (p == doc) { + return true; + } + p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host; + } + } + function watchShadow(node) { + if (node.shadowRoot && !node.shadowRoot.__watched) { + flags.dom && console.log("watching shadow-root for: ", node.localName); + var root = node.shadowRoot; + while (root) { + observe(root); + root = root.olderShadowRoot; + } + } + } + function handler(mutations) { + if (flags.dom) { + var mx = mutations[0]; + if (mx && mx.type === "childList" && mx.addedNodes) { + if (mx.addedNodes) { + var d = mx.addedNodes[0]; + while (d && d !== document && !d.host) { + d = d.parentNode; + } + var u = d && (d.URL || d._URL || d.host && d.host.localName) || ""; + u = u.split("/?").shift().split("/").pop(); + } + } + console.group("mutations (%d) [%s]", mutations.length, u || ""); + } + mutations.forEach(function(mx) { + if (mx.type === "childList") { + forEach(mx.addedNodes, function(n) { + if (!n.localName) { + return; + } + addedNode(n); + }); + forEach(mx.removedNodes, function(n) { + if (!n.localName) { + return; + } + detachedNode(n); + }); + } + }); + flags.dom && console.groupEnd(); + } + function takeRecords(node) { + node = window.wrap(node); + if (!node) { + node = window.wrap(document); + } + while (node.parentNode) { + node = node.parentNode; + } + var observer = node.__observer; + if (observer) { + handler(observer.takeRecords()); + takeMutations(); + } + } + var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach); + function observe(inRoot) { + if (inRoot.__observer) { + return; + } + var observer = new MutationObserver(handler); + observer.observe(inRoot, { + childList: true, + subtree: true + }); + inRoot.__observer = observer; + } + function upgradeDocument(doc) { + doc = window.wrap(doc); + flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop()); + addedNode(doc); + observe(doc); + flags.dom && console.groupEnd(); + } + function upgradeDocumentTree(doc) { + forDocumentTree(doc, upgradeDocument); + } + var originalCreateShadowRoot = Element.prototype.createShadowRoot; + if (originalCreateShadowRoot) { + Element.prototype.createShadowRoot = function() { + var root = originalCreateShadowRoot.call(this); + window.CustomElements.watchShadow(this); + return root; + }; + } + scope.watchShadow = watchShadow; + scope.upgradeDocumentTree = upgradeDocumentTree; + scope.upgradeSubtree = addedSubtree; + scope.upgradeAll = addedNode; + scope.attachedNode = attachedNode; + scope.takeRecords = takeRecords; +}); + +window.CustomElements.addModule(function(scope) { + var flags = scope.flags; + function upgrade(node) { + if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { + var is = node.getAttribute("is"); + var definition = scope.getRegisteredDefinition(is || node.localName); + if (definition) { + if (is && definition.tag == node.localName) { + return upgradeWithDefinition(node, definition); + } else if (!is && !definition.extends) { + return upgradeWithDefinition(node, definition); + } + } + } + } + function upgradeWithDefinition(element, definition) { + flags.upgrade && console.group("upgrade:", element.localName); + if (definition.is) { + element.setAttribute("is", definition.is); + } + implementPrototype(element, definition); + element.__upgraded__ = true; + created(element); + scope.attachedNode(element); + scope.upgradeSubtree(element); + flags.upgrade && console.groupEnd(); + return element; + } + function implementPrototype(element, definition) { + if (Object.__proto__) { + element.__proto__ = definition.prototype; + } else { + customMixin(element, definition.prototype, definition.native); + element.__proto__ = definition.prototype; + } + } + function customMixin(inTarget, inSrc, inNative) { + var used = {}; + var p = inSrc; + while (p !== inNative && p !== HTMLElement.prototype) { + var keys = Object.getOwnPropertyNames(p); + for (var i = 0, k; k = keys[i]; i++) { + if (!used[k]) { + Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k)); + used[k] = 1; + } + } + p = Object.getPrototypeOf(p); + } + } + function created(element) { + if (element.createdCallback) { + element.createdCallback(); + } + } + scope.upgrade = upgrade; + scope.upgradeWithDefinition = upgradeWithDefinition; + scope.implementPrototype = implementPrototype; +}); + +window.CustomElements.addModule(function(scope) { + var isIE11OrOlder = scope.isIE11OrOlder; + var upgradeDocumentTree = scope.upgradeDocumentTree; + var upgradeAll = scope.upgradeAll; + var upgradeWithDefinition = scope.upgradeWithDefinition; + var implementPrototype = scope.implementPrototype; + var useNative = scope.useNative; + function register(name, options) { + var definition = options || {}; + if (!name) { + throw new Error("document.registerElement: first argument `name` must not be empty"); + } + if (name.indexOf("-") < 0) { + throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'."); + } + if (isReservedTag(name)) { + throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid."); + } + if (getRegisteredDefinition(name)) { + throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered"); + } + if (!definition.prototype) { + definition.prototype = Object.create(HTMLElement.prototype); + } + definition.__name = name.toLowerCase(); + definition.lifecycle = definition.lifecycle || {}; + definition.ancestry = ancestry(definition.extends); + resolveTagName(definition); + resolvePrototypeChain(definition); + overrideAttributeApi(definition.prototype); + registerDefinition(definition.__name, definition); + definition.ctor = generateConstructor(definition); + definition.ctor.prototype = definition.prototype; + definition.prototype.constructor = definition.ctor; + if (scope.ready) { + upgradeDocumentTree(document); + } + return definition.ctor; + } + function overrideAttributeApi(prototype) { + if (prototype.setAttribute._polyfilled) { + return; + } + var setAttribute = prototype.setAttribute; + prototype.setAttribute = function(name, value) { + changeAttribute.call(this, name, value, setAttribute); + }; + var removeAttribute = prototype.removeAttribute; + prototype.removeAttribute = function(name) { + changeAttribute.call(this, name, null, removeAttribute); + }; + prototype.setAttribute._polyfilled = true; + } + function changeAttribute(name, value, operation) { + name = name.toLowerCase(); + var oldValue = this.getAttribute(name); + operation.apply(this, arguments); + var newValue = this.getAttribute(name); + if (this.attributeChangedCallback && newValue !== oldValue) { + this.attributeChangedCallback(name, oldValue, newValue); + } + } + function isReservedTag(name) { + for (var i = 0; i < reservedTagList.length; i++) { + if (name === reservedTagList[i]) { + return true; + } + } + } + var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ]; + function ancestry(extnds) { + var extendee = getRegisteredDefinition(extnds); + if (extendee) { + return ancestry(extendee.extends).concat([ extendee ]); + } + return []; + } + function resolveTagName(definition) { + var baseTag = definition.extends; + for (var i = 0, a; a = definition.ancestry[i]; i++) { + baseTag = a.is && a.tag; + } + definition.tag = baseTag || definition.__name; + if (baseTag) { + definition.is = definition.__name; + } + } + function resolvePrototypeChain(definition) { + if (!Object.__proto__) { + var nativePrototype = HTMLElement.prototype; + if (definition.is) { + var inst = document.createElement(definition.tag); + var expectedPrototype = Object.getPrototypeOf(inst); + if (expectedPrototype === definition.prototype) { + nativePrototype = expectedPrototype; + } + } + var proto = definition.prototype, ancestor; + while (proto && proto !== nativePrototype) { + ancestor = Object.getPrototypeOf(proto); + proto.__proto__ = ancestor; + proto = ancestor; + } + definition.native = nativePrototype; + } + } + function instantiate(definition) { + return upgradeWithDefinition(domCreateElement(definition.tag), definition); + } + var registry = {}; + function getRegisteredDefinition(name) { + if (name) { + return registry[name.toLowerCase()]; + } + } + function registerDefinition(name, definition) { + registry[name] = definition; + } + function generateConstructor(definition) { + return function() { + return instantiate(definition); + }; + } + var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + function createElementNS(namespace, tag, typeExtension) { + if (namespace === HTML_NAMESPACE) { + return createElement(tag, typeExtension); + } else { + return domCreateElementNS(namespace, tag); + } + } + function createElement(tag, typeExtension) { + if (tag) { + tag = tag.toLowerCase(); + } + if (typeExtension) { + typeExtension = typeExtension.toLowerCase(); + } + var definition = getRegisteredDefinition(typeExtension || tag); + if (definition) { + if (tag == definition.tag && typeExtension == definition.is) { + return new definition.ctor(); + } + if (!typeExtension && !definition.is) { + return new definition.ctor(); + } + } + var element; + if (typeExtension) { + element = createElement(tag); + element.setAttribute("is", typeExtension); + return element; + } + element = domCreateElement(tag); + if (tag.indexOf("-") >= 0) { + implementPrototype(element, HTMLElement); + } + return element; + } + var domCreateElement = document.createElement.bind(document); + var domCreateElementNS = document.createElementNS.bind(document); + var isInstance; + if (!Object.__proto__ && !useNative) { + isInstance = function(obj, ctor) { + var p = obj; + while (p) { + if (p === ctor.prototype) { + return true; + } + p = p.__proto__; + } + return false; + }; + } else { + isInstance = function(obj, base) { + return obj instanceof base; + }; + } + function wrapDomMethodToForceUpgrade(obj, methodName) { + var orig = obj[methodName]; + obj[methodName] = function() { + var n = orig.apply(this, arguments); + upgradeAll(n); + return n; + }; + } + wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode"); + wrapDomMethodToForceUpgrade(document, "importNode"); + if (isIE11OrOlder) { + (function() { + var importNode = document.importNode; + document.importNode = function() { + var n = importNode.apply(document, arguments); + if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) { + var f = document.createDocumentFragment(); + f.appendChild(n); + return f; + } else { + return n; + } + }; + })(); + } + document.registerElement = register; + document.createElement = createElement; + document.createElementNS = createElementNS; + scope.registry = registry; + scope.instanceof = isInstance; + scope.reservedTagList = reservedTagList; + scope.getRegisteredDefinition = getRegisteredDefinition; + document.register = document.registerElement; +}); + +(function(scope) { + var useNative = scope.useNative; + var initializeModules = scope.initializeModules; + var isIE11OrOlder = /Trident/.test(navigator.userAgent); + if (useNative) { + var nop = function() {}; + scope.watchShadow = nop; + scope.upgrade = nop; + scope.upgradeAll = nop; + scope.upgradeDocumentTree = nop; + scope.upgradeSubtree = nop; + scope.takeRecords = nop; + scope.instanceof = function(obj, base) { + return obj instanceof base; + }; + } else { + initializeModules(); + } + var upgradeDocumentTree = scope.upgradeDocumentTree; + if (!window.wrap) { + if (window.ShadowDOMPolyfill) { + window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded; + window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded; + } else { + window.wrap = window.unwrap = function(node) { + return node; + }; + } + } + function bootstrap() { + upgradeDocumentTree(window.wrap(document)); + if (window.HTMLImports) { + window.HTMLImports.__importsParsingHook = function(elt) { + upgradeDocumentTree(wrap(elt.import)); + }; + } + window.CustomElements.ready = true; + setTimeout(function() { + window.CustomElements.readyTime = Date.now(); + if (window.HTMLImports) { + window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime; + } + document.dispatchEvent(new CustomEvent("WebComponentsReady", { + bubbles: true + })); + }); + } + if (isIE11OrOlder && typeof window.CustomEvent !== "function") { + window.CustomEvent = function(inType, params) { + params = params || {}; + var e = document.createEvent("CustomEvent"); + e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); + e.preventDefault = function() { + Object.defineProperty(this, "defaultPrevented", { + get: function() { + return true; + } + }); + }; + return e; + }; + window.CustomEvent.prototype = window.Event.prototype; + } + if (document.readyState === "complete" || scope.flags.eager) { + bootstrap(); + } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) { + bootstrap(); + } else { + var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded"; + window.addEventListener(loadEvent, bootstrap); + } + scope.isIE11OrOlder = isIE11OrOlder; +})(window.CustomElements); + +(function(scope) { + if (!Function.prototype.bind) { + Function.prototype.bind = function(scope) { + var self = this; + var args = Array.prototype.slice.call(arguments, 1); + return function() { + var args2 = args.slice(); + args2.push.apply(args2, arguments); + return self.apply(scope, args2); + }; + }; + } +})(window.WebComponents); + +(function(scope) { + "use strict"; + if (!window.performance) { + var start = Date.now(); + window.performance = { + now: function() { + return Date.now() - start; + } + }; + } + if (!window.requestAnimationFrame) { + window.requestAnimationFrame = function() { + var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; + return nativeRaf ? function(callback) { + return nativeRaf(function() { + callback(performance.now()); + }); + } : function(callback) { + return window.setTimeout(callback, 1e3 / 60); + }; + }(); + } + if (!window.cancelAnimationFrame) { + window.cancelAnimationFrame = function() { + return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) { + clearTimeout(id); + }; + }(); + } + var elementDeclarations = []; + var polymerStub = function(name, dictionary) { + if (typeof name !== "string" && arguments.length === 1) { + Array.prototype.push.call(arguments, document._currentScript); + } + elementDeclarations.push(arguments); + }; + window.Polymer = polymerStub; + scope.consumeDeclarations = function(callback) { + scope.consumeDeclarations = function() { + throw "Possible attempt to load Polymer twice"; + }; + if (callback) { + callback(elementDeclarations); + } + elementDeclarations = null; + }; + function installPolymerWarning() { + if (window.Polymer === polymerStub) { + window.Polymer = function() { + throw new Error("You tried to use polymer without loading it first. To " + 'load polymer, '); + }; + } + } + if (HTMLImports.useNative) { + installPolymerWarning(); + } else { + window.addEventListener("DOMContentLoaded", installPolymerWarning); + } +})(window.WebComponents); + +(function(scope) { + var style = document.createElement("style"); + style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n"; + var head = document.querySelector("head"); + head.insertBefore(style, head.firstChild); +})(window.WebComponents); + +(function(scope) { + window.Platform = scope; +})(window.WebComponents); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/webcomponentsjs/webcomponents.min.js b/dashboard-ui/bower_components/webcomponentsjs/webcomponents.min.js similarity index 80% rename from dashboard-ui/thirdparty/webcomponentsjs/webcomponents.min.js rename to dashboard-ui/bower_components/webcomponentsjs/webcomponents.min.js index fa958412e9..4870c727e4 100644 --- a/dashboard-ui/thirdparty/webcomponentsjs/webcomponents.min.js +++ b/dashboard-ui/bower_components/webcomponentsjs/webcomponents.min.js @@ -7,9 +7,9 @@ * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -// @version 0.7.3 +// @version 0.7.5 window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var n,r=e.split("=");r[0]&&(n=r[0].match(/wc-(.+)/))&&(t[n[1]]=r[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log&&t.log.split){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(WebComponents),WebComponents.flags.shadow&&("undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=W(t),r=0;rl;l++)c[l]=new Array(s),c[l][0]=l;for(var u=0;s>u;u++)c[0][u]=u;for(var l=1;a>l;l++)for(var u=1;s>u;u++)if(this.equals(e[t+u-1],r[o+l-1]))c[l][u]=c[l-1][u-1];else{var d=c[l-1][u]+1,p=c[l][u-1]+1;c[l][u]=p>d?d:p}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var l,u=e[t-1][n-1],d=e[t-1][n],p=e[t][n-1];l=p>d?u>d?d:u:u>p?p:u,l==u?(u==s?c.push(r):(c.push(o),s=u),t--,n--):l==d?(c.push(a),t--,s=d):(c.push(i),n--,s=p)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,l,u){var d=0,p=0,h=Math.min(s-n,u-l);if(0==n&&0==l&&(d=this.sharedPrefix(e,c,h)),s==e.length&&u==c.length&&(p=this.sharedSuffix(e,c,h-d)),n+=d,l+=d,s-=p,u-=p,s-n==0&&u-l==0)return[];if(n==s){for(var f=t(n,[],0);u>l;)f.removed.push(c[l++]);return[f]}if(l==u)return[t(n,[],s-n)];for(var m=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,l,u)),f=void 0,w=[],v=n,g=l,b=0;br;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t0){for(var u=0;u0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function u(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=l(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var u=0;u0;i--)if(!g(t[i],e,o,t,r))return!1;return!0}function w(e,t,n,r){var o=ie,i=t[0]||n;return g(i,e,o,t,r)}function v(e,t,n,r){for(var o=ae,i=1;i0&&g(n,e,o,t,r)}function g(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=B(t),l=c.relatedTarget;if(l){if(l instanceof Object&&l.addEventListener){var d=V(l),p=u(t,e,d);if(p===a)return!0}else p=null;Z.set(t,p)}}J.set(t,n);var h=t.type,f=!1;$.set(t,a),X.set(t,e),i.depth++;for(var m=0,w=i.length;w>m;m++){var v=i[m];if(v.removed)f=!0;else if(!(v.type!==h||!v.capture&&n===oe||v.capture&&n===ae))try{if("function"==typeof v.handler?v.handler.call(e,t):v.handler.handleEvent(t),ee.get(t))return!1}catch(g){P||(P=g)}}if(i.depth--,f&&0===i.depth){var b=i.slice();i.length=0;for(var m=0;mr;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){O(e instanceof _)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){N(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){N(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);U=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;U=!1;for(var a=0;ao;o++)r.appendChild(P(t[o]));return r}function w(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function v(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){O(t.parentNode===e);var n=t.nextSibling,r=P(t),o=r.parentNode;o&&$.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=P(e),a=i.firstChild;a;)n=a.nextSibling,$.call(i,a),a=n}function g(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;ns;s++)i=b(t[s]),!o&&(a=v(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===j}function s(){return!0}function c(e,t,n){return e.localName===n}function l(e,t){return e.namespaceURI===t}function u(e,t,n){return e.namespaceURI===t&&e.localName===n}function d(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=d(a,t,n,r,o,i),a=a.nextElementSibling;return t}function p(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,null);if(c instanceof N)s=S.call(c,i);else{if(!(c instanceof C))return d(this,r,o,n,i,null);s=_.call(c,i)}return t(s,r,o,a)}function h(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=M.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function f(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=L.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=O.call(c,i,a)}return t(s,r,o,!1)}var m=e.wrappers.HTMLCollection,w=e.wrappers.NodeList,v=e.getTreeScope,g=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,_=document.querySelectorAll,S=document.documentElement.querySelectorAll,T=document.getElementsByTagName,M=document.documentElement.getElementsByTagName,O=document.getElementsByTagNameNS,L=document.documentElement.getElementsByTagNameNS,N=window.Element,C=window.HTMLDocument||window.Document,j="http://www.w3.org/1999/xhtml",D={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=g(this),c=v(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof N)a=b(E.call(s,t));else{if(!(s instanceof C))return o(this,t); a=b(y.call(s,t))}return a&&!i&&(c=v(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new w;return o.length=p.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(g(this),t)}},x={getElementsByTagName:function(e){var t=new m,n="*"===e?s:a;return t.length=h.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new m,r=null;return r="*"===e?"*"===t?s:c:"*"===t?l:u,n.length=f.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=D,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}},a={getElementById:function(e){return/[ \t\n\r\f]/.test(e)?null:this.querySelector('[id="'+e+'"]')}};e.ChildNodeInterface=i,e.NonElementParentNodeInterface=a,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,l,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){u(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,l=e.MatchesInterface,u=(e.addWrapNodeListMethod,e.enqueueMutation),d=e.mixin,p=(e.oneOf,e.registerWrapper),h=e.unsafeUnwrap,f=e.wrappers,m=window.Element,w=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return m.prototype[e]}),v=w[0],g=m.prototype[v],b=new WeakMap;r.prototype=Object.create(a.prototype),d(r.prototype,{createShadowRoot:function(){var t=new f.ShadowRoot(this);h(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return h(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=h(this).getAttribute(e);h(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=h(this).getAttribute(e);h(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=h(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return h(this).className},set className(e){this.setAttribute("class",e)},get id(){return h(this).id},set id(e){this.setAttribute("id",e)}}),w.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),m.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),d(r.prototype,o),d(r.prototype,i),d(r.prototype,s),d(r.prototype,c),d(r.prototype,l),p(m,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=w,e.originalMatches=g,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function n(e){return e.replace(L,t)}function r(e){return e.replace(N,t)}function o(e){for(var t={},n=0;n"):c+">"+s(e)+"";case Node.TEXT_NODE:var d=e.data;return t&&j[t.localName]?d:r(d);case Node.COMMENT_NODE:return"";default:throw console.error(e),new Error("not implemented")}}function s(e){e instanceof O.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=a(n,e);return t}function c(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(M(i))}function l(e){m.call(this,e)}function u(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return M(o)}function d(t){return function(){return e.renderAllPending(),S(this)[t]}}function p(e){w(l,e,d(e))}function h(t){Object.defineProperty(l.prototype,t,{get:d(t),set:function(n){e.renderAllPending(),S(this)[t]=n},configurable:!0,enumerable:!0})}function f(t){Object.defineProperty(l.prototype,t,{value:function(){return e.renderAllPending(),S(this)[t].apply(S(this),arguments)},configurable:!0,enumerable:!0})}var m=e.wrappers.Element,w=e.defineGetter,v=e.enqueueMutation,g=e.mixin,b=e.nodesWereAdded,y=e.nodesWereRemoved,E=e.registerWrapper,_=e.snapshotNodeList,S=e.unsafeUnwrap,T=e.unwrap,M=e.wrap,O=e.wrappers,L=/[&\u00A0"]/g,N=/[&\u00A0<>]/g,C=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),j=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),D="http://www.w3.org/1999/xhtml",H=/MSIE/.test(navigator.userAgent),x=window.HTMLElement,R=window.HTMLTemplateElement;l.prototype=Object.create(m.prototype),g(l.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&j[this.localName])return void(this.textContent=e);var t=_(this.childNodes);this.invalidateShadowRenderer()?this instanceof O.HTMLTemplateElement?c(this.content,e):c(this,e,this.tagName):!R&&this instanceof O.HTMLTemplateElement?c(this.content,e):S(this).innerHTML=e;var n=_(this.childNodes);v(this,"childList",{addedNodes:n,removedNodes:t}),y(t),b(n,this)},get outerHTML(){return a(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=u(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=u(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(p),["scrollLeft","scrollTop"].forEach(h),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(f),E(x,l,document.createElement("b")),e.wrappers.HTMLElement=l,e.getInnerHTML=s,e.setInnerHTML=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=d.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);d.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!p){var t=n(e);u.set(this,l(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.wrap,u=new WeakMap,d=new WeakMap,p=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return p?l(s(this).content):u.get(this)}}),p&&a(p,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,l=e.wrap,u=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return l(c(this).form)}}),a(u,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o=e.defineWrapGetter,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"title"),s=r(a),c=Object.getPrototypeOf(s.prototype).constructor;if(!("classList"in a)){var l=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",l),delete t.prototype.classList}o(c,"ownerSVGElement"),e.wrappers.SVGElement=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){p.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),l=document.createElementNS(s,"use"),u=c.constructor,d=Object.getPrototypeOf(u.prototype),p=d.constructor;t.prototype=Object.create(d),"instanceRoot"in l&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,l),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,l=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(l,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var l=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,l),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.NonElementParentNodeInterface,r=e.ParentNodeInterface,o=e.SelectorsInterface,i=e.mixin,a=e.registerObject,s=a(document.createDocumentFragment());i(s.prototype,r),i(s.prototype,o),i(s.prototype,t),i(s.prototype,n);var c=a(document.createComment(""));e.wrappers.Comment=c,e.wrappers.DocumentFragment=s}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(u(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;h.set(this,o),this.treeScope_=new r(this,a(o||e)),p.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,l=e.setInnerHTML,u=e.unsafeUnwrap,d=e.unwrap,p=new WeakMap,h=new WeakMap;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){l(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return h.get(this)||null},get host(){return p.get(this)||null},invalidateShadowRenderer:function(){return p.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(e).root;return t instanceof h?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=u(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.unwrapIfNeeded,u=e.wrap,d=e.getTreeScope,p=window.Range,h=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(l(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(l(e),t)},setStartBefore:function(e){s(this).setStartBefore(l(e))},setStartAfter:function(e){s(this).setStartAfter(l(e))},setEndBefore:function(e){s(this).setEndBefore(l(e))},setEndAfter:function(e){s(this).setEndAfter(l(e))},selectNode:function(e){s(this).selectNode(l(e))},selectNodeContents:function(e){s(this).selectNodeContents(l(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return u(s(this).extractContents())},cloneContents:function(){return u(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(l(e))},surroundContents:function(e){s(this).surroundContents(l(e))},cloneRange:function(){return u(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(l(e),t)},comparePoint:function(e,t){return s(this).comparePoint(l(e),t)},intersectsNode:function(e){return s(this).intersectsNode(l(e))},toString:function(){return s(this).toString()}},p.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return u(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var l=R(a.lastChild);l&&(l.nextSibling_=l.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){P.set(e,[])}function i(e){var t=P.get(e);return t||P.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;em;m++){var w=R(i[u++]);s.get(w)||r(w)}for(var v=h.addedCount,g=i[u]&&R(i[u]),m=0;v>m;m++){var b=o[l++],y=b.node;n(t,y,g),s.set(y,!0),b.sync(s)}d+=v}for(var p=d;p=0;o--){var i=r[o],a=m(i);if(a){var s=i.olderShadowRoot;s&&(n=f(s));for(var c=0;c=0;u--)l=Object.create(l);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(l[e]=function(){C(this)instanceof r||M(this),t.apply(C(this),arguments)})});var d={prototype:l};i&&(d["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(l,r),e.nativePrototypeTable.set(o,l);P.call(N(this),t,d);return r},y([window.HTMLDocument||window.Document],["registerElement"])}y([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),y([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],E),y([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),_(t.prototype,l),_(t.prototype,d),_(t.prototype,f),_(t.prototype,p),_(t.prototype,{get implementation(){var e=D.get(this);return e?e:(e=new a(N(this).implementation),D.set(this,e),e)},get defaultView(){return C(N(this).defaultView)}}),S(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&S(window.HTMLDocument,t),j([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var k=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=N(arguments[2]),C(k.apply(L(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),S(window.DOMImplementation,a),y([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,l=e.wrap,u=window.Window,d=window.getComputedStyle,p=window.getDefaultComputedStyle,h=window.getSelection;t.prototype=Object.create(n.prototype),u.prototype.getComputedStyle=function(e,t){return l(this||window).getComputedStyle(c(e),t)},p&&(u.prototype.getDefaultComputedStyle=function(e,t){return l(this||window).getDefaultComputedStyle(c(e),t)}),u.prototype.getSelection=function(){return l(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){u.prototype[e]=function(){var t=l(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),d.call(s(this),c(e),t)},getSelection:function(){return a(),new r(h.call(s(this)))},get document(){return l(s(this).document)}}),p&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),p.call(s(this),c(e),t)}),i(u,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill),function(e){function t(e,t){var n="";return Array.prototype.forEach.call(e,function(e){n+=e.textContent+"\n\n"}),t||(n=n.replace(d,"")),n}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){var t=n(e);document.head.appendChild(t);var r=[];if(t.sheet)try{r=t.sheet.cssRules}catch(o){}else console.warn("sheet not found",t);return t.parentNode.removeChild(t),r}function o(){C.initialized=!0,document.body.appendChild(C);var e=C.contentDocument,t=e.createElement("base");t.href=document.baseURI,e.head.appendChild(t)}function i(e){C.initialized||o(),document.body.appendChild(C),e(C.contentDocument),document.body.removeChild(C)}function a(e,t){if(t){var o;if(e.match("@import")&&D){var a=n(e);i(function(e){e.head.appendChild(a.impl),o=Array.prototype.slice.call(a.sheet.cssRules,0),t(o)})}else o=r(e),t(o)}}function s(e){e&&l().appendChild(document.createTextNode(e))}function c(e,t){var r=n(e);r.setAttribute(t,""),r.setAttribute(x,""),document.head.appendChild(r)}function l(){return j||(j=document.createElement("style"),j.setAttribute(x,""),j[x]=!0),j}var u={strictStyling:!1,registry:{},shimStyling:function(e,n,r){var o=this.prepareRoot(e,n,r),i=this.isTypeExtension(r),a=this.makeScopeSelector(n,i),s=t(o,!0);s=this.scopeCssText(s,a),e&&(e.shimmedStyle=s),this.addCssToDocument(s,n)},shimStyle:function(e,t){return this.shimCssText(e.textContent,t)},shimCssText:function(e,t){return e=this.insertDirectives(e),this.scopeCssText(e,t)},makeScopeSelector:function(e,t){return e?t?"[is="+e+"]":e:""},isTypeExtension:function(e){return e&&e.indexOf("-")<0},prepareRoot:function(e,t,n){var r=this.registerRoot(e,t,n);return this.replaceTextInStyles(r.rootStyles,this.insertDirectives),this.removeStyles(e,r.rootStyles),this.strictStyling&&this.applyScopeToContent(e,t),r.scopeStyles},removeStyles:function(e,t){for(var n,r=0,o=t.length;o>r&&(n=t[r]);r++)n.parentNode.removeChild(n)},registerRoot:function(e,t,n){var r=this.registry[t]={root:e,name:t,extendsName:n},o=this.findStyles(e);r.rootStyles=o,r.scopeStyles=r.rootStyles;var i=this.registry[r.extendsName];return i&&(r.scopeStyles=i.scopeStyles.concat(r.scopeStyles)),r},findStyles:function(e){if(!e)return[];var t=e.querySelectorAll("style");return Array.prototype.filter.call(t,function(e){return!e.hasAttribute(R)})},applyScopeToContent:function(e,t){e&&(Array.prototype.forEach.call(e.querySelectorAll("*"),function(e){e.setAttribute(t,"")}),Array.prototype.forEach.call(e.querySelectorAll("template"),function(e){this.applyScopeToContent(e.content,t)},this))},insertDirectives:function(e){return e=this.insertPolyfillDirectivesInCssText(e),this.insertPolyfillRulesInCssText(e)},insertPolyfillDirectivesInCssText:function(e){return e=e.replace(p,function(e,t){return t.slice(0,-2)+"{"}),e.replace(h,function(e,t){return t+" {"})},insertPolyfillRulesInCssText:function(e){return e=e.replace(f,function(e,t){return t.slice(0,-1)}),e.replace(m,function(e,t,n,r){var o=e.replace(t,"").replace(n,"");return r+o})},scopeCssText:function(e,t){var n=this.extractUnscopedRulesFromCssText(e);if(e=this.insertPolyfillHostInCssText(e),e=this.convertColonHost(e),e=this.convertColonHostContext(e),e=this.convertShadowDOMSelectors(e),t){var e,r=this;a(e,function(n){e=r.scopeRules(n,t)})}return e=e+"\n"+n,e.trim()},extractUnscopedRulesFromCssText:function(e){for(var t,n="";t=w.exec(e);)n+=t[1].slice(0,-1)+"\n\n";for(;t=v.exec(e);)n+=t[0].replace(t[2],"").replace(t[1],t[3])+"\n\n";return n},convertColonHost:function(e){return this.convertColonRule(e,E,this.colonHostPartReplacer)},convertColonHostContext:function(e){return this.convertColonRule(e,_,this.colonHostContextPartReplacer)},convertColonRule:function(e,t,n){return e.replace(t,function(e,t,r,o){if(t=O,r){for(var i,a=r.split(","),s=[],c=0,l=a.length;l>c&&(i=a[c]);c++)i=i.trim(),s.push(n(t,i,o));return s.join(",")}return t+o})},colonHostContextPartReplacer:function(e,t,n){return t.match(g)?this.colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},colonHostPartReplacer:function(e,t,n){return e+t.replace(g,"")+n},convertShadowDOMSelectors:function(e){for(var t=0;t","+","~"],r=e,o="["+t+"]";return n.forEach(function(e){var t=r.split(e);r=t.map(function(e){var t=e.trim().replace(L,"");return t&&n.indexOf(t)<0&&t.indexOf(o)<0&&(e=t.replace(/([^:]*)(:*)(.*)/,"$1"+o+"$2$3")),e}).join(e)}),r},insertPolyfillHostInCssText:function(e){return e.replace(M,b).replace(T,g)},propertiesFromRule:function(e){var t=e.style.cssText;e.style.content&&!e.style.content.match(/['"]+|attr/)&&(t=t.replace(/content:[^;]*;/g,"content: '"+e.style.content+"';"));var n=e.style;for(var r in n)"initial"===n[r]&&(t+=r+": initial; ");return t},replaceTextInStyles:function(e,t){e&&t&&(e instanceof Array||(e=[e]),Array.prototype.forEach.call(e,function(e){e.textContent=t.call(this,e.textContent)},this))},addCssToDocument:function(e,t){e.match("@import")?c(e,t):s(e)}},d=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,p=/\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim,h=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,f=/\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,m=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,w=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,v=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,g="-shadowcsshost",b="-shadowcsscontext",y=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",E=new RegExp("("+g+y,"gim"),_=new RegExp("("+b+y,"gim"),S="([>\\s~+[.,{:][\\s\\S]*)?$",T=/\:host/gim,M=/\:host-context/gim,O=g+"-no-combinator",L=new RegExp(g,"gim"),N=(new RegExp(b,"gim"),[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^/g]),C=document.createElement("iframe");C.style.display="none";var j,D=navigator.userAgent.match("Chrome"),H="shim-shadowdom",x="shim-shadowdom-css",R="no-shim";if(window.ShadowDOMPolyfill){s("style { display: none !important; }\n");var I=ShadowDOMPolyfill.wrap(document),P=I.querySelector("head");P.insertBefore(l(),P.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){e.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var t="link[rel=stylesheet]["+H+"]",n="style["+H+"]";HTMLImports.importer.documentPreloadSelectors+=","+t,HTMLImports.importer.importsPreloadSelectors+=","+t,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,t,n].join(",");var r=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(e){if(!e[x]){var t=e.__importElement||e;if(!t.hasAttribute(H))return void r.call(this,e);e.__resource&&(t=e.ownerDocument.createElement("style"),t.textContent=e.__resource),HTMLImports.path.resolveUrlsInStyle(t,e.href),t.textContent=u.shimStyle(t),t.removeAttribute(H,""),t.setAttribute(x,""),t[x]=!0,t.parentNode!==P&&(e.parentNode===P?P.replaceChild(t,e):this.addElementToDocument(t)),t.__importParsed=!0,this.markParsingComplete(e),this.parseNext()}};var o=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(e){return"link"===e.localName&&"stylesheet"===e.rel&&e.hasAttribute(H)?e.__resource:o.call(this,e)}}})}e.ShadowCSS=u}(window.WebComponents)),function(e){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==p[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var l=a||"scheme start",u=0,d="",v=!1,g=!1,b=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var y=e[u];switch(l){case"scheme start":if(!y||!m.test(y)){if(a){c("Invalid scheme.");break e}d="",l="no scheme";continue}d+=y.toLowerCase(),l="scheme";break;case"scheme":if(y&&w.test(y))d+=y.toLowerCase();else{if(":"!=y){if(a){if(f==y)break e;c("Code point not allowed in scheme: "+y);break e}d="",u=0,l="no scheme";continue}if(this._scheme=d,d="",a)break e;t(this._scheme)&&(this._isRelative=!0),l="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==y?(this._query="?",l="query"):"#"==y?(this._fragment="#",l="fragment"):f!=y&&" "!=y&&"\n"!=y&&"\r"!=y&&(this._schemeData+=o(y));break;case"no scheme":if(s&&t(s._scheme)){l="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=y||"/"!=e[u+1]){c("Expected /, got: "+y),l="relative";continue}l="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==y){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==y||"\\"==y)"\\"==y&&c("\\ is an invalid code point."),l="relative slash";else if("?"==y)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,l="query";else{if("#"!=y){var E=e[u+1],_=e[u+2];("file"!=this._scheme||!m.test(y)||":"!=E&&"|"!=E||f!=_&&"/"!=_&&"\\"!=_&&"?"!=_&&"#"!=_)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),l="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,l="fragment"}break;case"relative slash":if("/"!=y&&"\\"!=y){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),l="relative path";continue}"\\"==y&&c("\\ is an invalid code point."),l="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=y){c("Expected '/', got: "+y),l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":if(l="authority ignore slashes","/"!=y){c("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!=y&&"\\"!=y){l="authority";continue}c("Expected authority, got: "+y);break;case"authority":if("@"==y){v&&(c("@ already seen."),d+="%40"),v=!0;for(var S=0;S0){var o=n[r-1],i=h(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=w.get(e);t||w.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=w.get(e),n=0;nh&&(p=s[h]);h++)a(p)?(c++,n()):(p.addEventListener("load",r),p.addEventListener("error",i));else n()}function a(e){return d?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&l(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function l(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",d=Boolean(u in document.createElement("link")),p=Boolean(window.ShadowDOMPolyfill),h=function(e){return p?ShadowDOMPolyfill.wrapIfNeeded(e):e},f=h(document),m={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return h(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var w=/Trident|Edge/.test(navigator.userAgent),v=w?"complete":"interactive",g="readystatechange";d&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)l(e)}()),t(function(e){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=d,e.rootDocument=f,e.whenReady=t,e.isIE=w}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){ -var n=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,l=e.isIE,u=e.IMPORT_LINK_TYPE,d="link[rel="+u+"]",p={documentSelectors:d,importsSelectors:[d,"link[rel=stylesheet]","style","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),l&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=p,e.IMPORT_SELECTOR=d}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,l=e.Loader,u=e.Observer,d=e.parser,p={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){h.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);h.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n["import"]=c}d.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),d.parseNext()},loadedAll:function(){d.parseNext()}},h=new l(p.loaded.bind(p),p.loadedAll.bind(p));if(p.observer=new u,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=p,e.importLoader=h}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){y(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),p(e)&&y(e,function(e){s(e)})}function i(e){T.push(e),S||(S=!0,setTimeout(a))}function a(){S=!1;for(var e,t=T,n=0,r=t.length;r>n&&(e=t[n]);n++)e();T=[]}function s(e){_?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&p(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function l(e){u(e),y(e,function(e){u(e)})}function u(e){_?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!p(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function p(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function h(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)w(t),t=t.olderShadowRoot}}function f(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e)}),M(e.removedNodes,function(e){e.localName&&l(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(t.takeRecords()),a())}function w(e){if(!e.__observer){var t=new MutationObserver(f);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),w(e),b.dom&&console.groupEnd()}function g(e){E(e,v)}var b=e.flags,y=e.forSubtree,E=e.forDocumentTree,_=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=_;var S=!1,T=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Element.prototype.createShadowRoot;O&&(Element.prototype.createShadowRoot=function(){var e=O.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=h,e.upgradeDocumentTree=g,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(l(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=d(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&v(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t<_.length;t++)if(e===_[t])return!0}function i(e){var t=l(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],r=0;t=e.ancestry[r];r++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag),r=Object.getPrototypeOf(n);r===e.prototype&&(t=r)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),i.__proto__=o,i=o;e["native"]=t}}function c(e){return b(M(e.tag),e)}function l(e){return e?S[e.toLowerCase()]:void 0}function u(e,t){S[e]=t}function d(e){return function(){return c(e)}}function p(e,t,n){return e===T?h(t,n):O(e,t)}function h(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=l(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var r;return t?(r=h(e),r.setAttribute("is",t),r):(r=M(e),e.indexOf("-")>=0&&y(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var m,w=e.isIE11OrOlder,v=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,y=e.implementPrototype,E=e.useNative,_=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],S={},T="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),O=document.createElementNS.bind(document);m=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),w&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=h,document.createElementNS=p,e.registry=S,e["instanceof"]=m,e.reservedTagList=_,e.getRegisteredDefinition=l,document.register=document.registerElement}),function(e){function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,r=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements),function(e){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(e,r)}})}(window.WebComponents),function(e){"use strict";function t(){window.Polymer===o&&(window.Polymer=function(){throw new Error('You tried to use polymer without loading it first. To load polymer, ')})}if(!window.performance){var n=Date.now();window.performance={now:function(){return Date.now()-n}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var r=[],o=function(e,t){"string"!=typeof e&&1===arguments.length&&Array.prototype.push.call(arguments,document._currentScript),r.push(arguments)};window.Polymer=o,e.consumeDeclarations=function(t){e.consumeDeclarations=function(){throw"Possible attempt to load Polymer twice"},t&&t(r),r=null},HTMLImports.useNative?t():addEventListener("DOMContentLoaded",t)}(window.WebComponents),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents),function(e){window.Platform=e}(window.WebComponents); \ No newline at end of file +adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return b(this,this,e,t)},importNode:function(e,t){return v(e,t,L(this))},getSelection:function(){return T(),new h(x.call(N(this)))},getElementsByName:function(e){return f.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var R=document.createTreeWalker,I=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(C(e))}}:"function"==typeof n&&(o=function(e){return n(C(e))})),new I(R.call(N(this),N(e),t,o,r))},document.registerElement){var P=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void O(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var l=Object.create(a),u=c.length-1;u>=0;u--)l=Object.create(l);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(l[e]=function(){C(this)instanceof r||M(this),t.apply(C(this),arguments)})});var d={prototype:l};i&&(d["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(l,r),e.nativePrototypeTable.set(o,l);P.call(N(this),t,d);return r},y([window.HTMLDocument||window.Document],["registerElement"])}y([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),y([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],E),y([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),_(t.prototype,l),_(t.prototype,d),_(t.prototype,f),_(t.prototype,p),_(t.prototype,{get implementation(){var e=D.get(this);return e?e:(e=new a(N(this).implementation),D.set(this,e),e)},get defaultView(){return C(N(this).defaultView)}}),S(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&S(window.HTMLDocument,t),j([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var k=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=N(arguments[2]),C(k.apply(L(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),S(window.DOMImplementation,a),y([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,l=e.wrap,u=window.Window,d=window.getComputedStyle,p=window.getDefaultComputedStyle,h=window.getSelection;t.prototype=Object.create(n.prototype),u.prototype.getComputedStyle=function(e,t){return l(this||window).getComputedStyle(c(e),t)},p&&(u.prototype.getDefaultComputedStyle=function(e,t){return l(this||window).getDefaultComputedStyle(c(e),t)}),u.prototype.getSelection=function(){return l(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){u.prototype[e]=function(){var t=l(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),d.call(s(this),c(e),t)},getSelection:function(){return a(),new r(h.call(s(this)))},get document(){return l(s(this).document)}}),p&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),p.call(s(this),c(e),t)}),i(u,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill),function(e){function t(e,t){var n="";return Array.prototype.forEach.call(e,function(e){n+=e.textContent+"\n\n"}),t||(n=n.replace(d,"")),n}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){var t=n(e);document.head.appendChild(t);var r=[];if(t.sheet)try{r=t.sheet.cssRules}catch(o){}else console.warn("sheet not found",t);return t.parentNode.removeChild(t),r}function o(){C.initialized=!0,document.body.appendChild(C);var e=C.contentDocument,t=e.createElement("base");t.href=document.baseURI,e.head.appendChild(t)}function i(e){C.initialized||o(),document.body.appendChild(C),e(C.contentDocument),document.body.removeChild(C)}function a(e,t){if(t){var o;if(e.match("@import")&&D){var a=n(e);i(function(e){e.head.appendChild(a.impl),o=Array.prototype.slice.call(a.sheet.cssRules,0),t(o)})}else o=r(e),t(o)}}function s(e){e&&l().appendChild(document.createTextNode(e))}function c(e,t){var r=n(e);r.setAttribute(t,""),r.setAttribute(x,""),document.head.appendChild(r)}function l(){return j||(j=document.createElement("style"),j.setAttribute(x,""),j[x]=!0),j}var u={strictStyling:!1,registry:{},shimStyling:function(e,n,r){var o=this.prepareRoot(e,n,r),i=this.isTypeExtension(r),a=this.makeScopeSelector(n,i),s=t(o,!0);s=this.scopeCssText(s,a),e&&(e.shimmedStyle=s),this.addCssToDocument(s,n)},shimStyle:function(e,t){return this.shimCssText(e.textContent,t)},shimCssText:function(e,t){return e=this.insertDirectives(e),this.scopeCssText(e,t)},makeScopeSelector:function(e,t){return e?t?"[is="+e+"]":e:""},isTypeExtension:function(e){return e&&e.indexOf("-")<0},prepareRoot:function(e,t,n){var r=this.registerRoot(e,t,n);return this.replaceTextInStyles(r.rootStyles,this.insertDirectives),this.removeStyles(e,r.rootStyles),this.strictStyling&&this.applyScopeToContent(e,t),r.scopeStyles},removeStyles:function(e,t){for(var n,r=0,o=t.length;o>r&&(n=t[r]);r++)n.parentNode.removeChild(n)},registerRoot:function(e,t,n){var r=this.registry[t]={root:e,name:t,extendsName:n},o=this.findStyles(e);r.rootStyles=o,r.scopeStyles=r.rootStyles;var i=this.registry[r.extendsName];return i&&(r.scopeStyles=i.scopeStyles.concat(r.scopeStyles)),r},findStyles:function(e){if(!e)return[];var t=e.querySelectorAll("style");return Array.prototype.filter.call(t,function(e){return!e.hasAttribute(R)})},applyScopeToContent:function(e,t){e&&(Array.prototype.forEach.call(e.querySelectorAll("*"),function(e){e.setAttribute(t,"")}),Array.prototype.forEach.call(e.querySelectorAll("template"),function(e){this.applyScopeToContent(e.content,t)},this))},insertDirectives:function(e){return e=this.insertPolyfillDirectivesInCssText(e),this.insertPolyfillRulesInCssText(e)},insertPolyfillDirectivesInCssText:function(e){return e=e.replace(p,function(e,t){return t.slice(0,-2)+"{"}),e.replace(h,function(e,t){return t+" {"})},insertPolyfillRulesInCssText:function(e){return e=e.replace(f,function(e,t){return t.slice(0,-1)}),e.replace(m,function(e,t,n,r){var o=e.replace(t,"").replace(n,"");return r+o})},scopeCssText:function(e,t){var n=this.extractUnscopedRulesFromCssText(e);if(e=this.insertPolyfillHostInCssText(e),e=this.convertColonHost(e),e=this.convertColonHostContext(e),e=this.convertShadowDOMSelectors(e),t){var e,r=this;a(e,function(n){e=r.scopeRules(n,t)})}return e=e+"\n"+n,e.trim()},extractUnscopedRulesFromCssText:function(e){for(var t,n="";t=w.exec(e);)n+=t[1].slice(0,-1)+"\n\n";for(;t=v.exec(e);)n+=t[0].replace(t[2],"").replace(t[1],t[3])+"\n\n";return n},convertColonHost:function(e){return this.convertColonRule(e,E,this.colonHostPartReplacer)},convertColonHostContext:function(e){return this.convertColonRule(e,_,this.colonHostContextPartReplacer)},convertColonRule:function(e,t,n){return e.replace(t,function(e,t,r,o){if(t=O,r){for(var i,a=r.split(","),s=[],c=0,l=a.length;l>c&&(i=a[c]);c++)i=i.trim(),s.push(n(t,i,o));return s.join(",")}return t+o})},colonHostContextPartReplacer:function(e,t,n){return t.match(g)?this.colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},colonHostPartReplacer:function(e,t,n){return e+t.replace(g,"")+n},convertShadowDOMSelectors:function(e){for(var t=0;t","+","~"],r=e,o="["+t+"]";return n.forEach(function(e){var t=r.split(e);r=t.map(function(e){var t=e.trim().replace(L,"");return t&&n.indexOf(t)<0&&t.indexOf(o)<0&&(e=t.replace(/([^:]*)(:*)(.*)/,"$1"+o+"$2$3")),e}).join(e)}),r},insertPolyfillHostInCssText:function(e){return e.replace(M,b).replace(T,g)},propertiesFromRule:function(e){var t=e.style.cssText;e.style.content&&!e.style.content.match(/['"]+|attr/)&&(t=t.replace(/content:[^;]*;/g,"content: '"+e.style.content+"';"));var n=e.style;for(var r in n)"initial"===n[r]&&(t+=r+": initial; ");return t},replaceTextInStyles:function(e,t){e&&t&&(e instanceof Array||(e=[e]),Array.prototype.forEach.call(e,function(e){e.textContent=t.call(this,e.textContent)},this))},addCssToDocument:function(e,t){e.match("@import")?c(e,t):s(e)}},d=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,p=/\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim,h=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,f=/\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,m=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,w=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,v=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,g="-shadowcsshost",b="-shadowcsscontext",y=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",E=new RegExp("("+g+y,"gim"),_=new RegExp("("+b+y,"gim"),S="([>\\s~+[.,{:][\\s\\S]*)?$",T=/\:host/gim,M=/\:host-context/gim,O=g+"-no-combinator",L=new RegExp(g,"gim"),N=(new RegExp(b,"gim"),[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^/g]),C=document.createElement("iframe");C.style.display="none";var j,D=navigator.userAgent.match("Chrome"),H="shim-shadowdom",x="shim-shadowdom-css",R="no-shim";if(window.ShadowDOMPolyfill){s("style { display: none !important; }\n");var I=ShadowDOMPolyfill.wrap(document),P=I.querySelector("head");P.insertBefore(l(),P.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){e.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var t="link[rel=stylesheet]["+H+"]",n="style["+H+"]";HTMLImports.importer.documentPreloadSelectors+=","+t,HTMLImports.importer.importsPreloadSelectors+=","+t,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,t,n].join(",");var r=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(e){if(!e[x]){var t=e.__importElement||e;if(!t.hasAttribute(H))return void r.call(this,e);e.__resource&&(t=e.ownerDocument.createElement("style"),t.textContent=e.__resource),HTMLImports.path.resolveUrlsInStyle(t,e.href),t.textContent=u.shimStyle(t),t.removeAttribute(H,""),t.setAttribute(x,""),t[x]=!0,t.parentNode!==P&&(e.parentNode===P?P.replaceChild(t,e):this.addElementToDocument(t)),t.__importParsed=!0,this.markParsingComplete(e),this.parseNext()}};var o=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(e){return"link"===e.localName&&"stylesheet"===e.rel&&e.hasAttribute(H)?e.__resource:o.call(this,e)}}})}e.ShadowCSS=u}(window.WebComponents)),function(e){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==p[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var l=a||"scheme start",u=0,d="",v=!1,g=!1,b=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var y=e[u];switch(l){case"scheme start":if(!y||!m.test(y)){if(a){c("Invalid scheme.");break e}d="",l="no scheme";continue}d+=y.toLowerCase(),l="scheme";break;case"scheme":if(y&&w.test(y))d+=y.toLowerCase();else{if(":"!=y){if(a){if(f==y)break e;c("Code point not allowed in scheme: "+y);break e}d="",u=0,l="no scheme";continue}if(this._scheme=d,d="",a)break e;t(this._scheme)&&(this._isRelative=!0),l="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==y?(this._query="?",l="query"):"#"==y?(this._fragment="#",l="fragment"):f!=y&&" "!=y&&"\n"!=y&&"\r"!=y&&(this._schemeData+=o(y));break;case"no scheme":if(s&&t(s._scheme)){l="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=y||"/"!=e[u+1]){c("Expected /, got: "+y),l="relative";continue}l="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==y){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==y||"\\"==y)"\\"==y&&c("\\ is an invalid code point."),l="relative slash";else if("?"==y)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,l="query";else{if("#"!=y){var E=e[u+1],_=e[u+2];("file"!=this._scheme||!m.test(y)||":"!=E&&"|"!=E||f!=_&&"/"!=_&&"\\"!=_&&"?"!=_&&"#"!=_)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),l="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,l="fragment"}break;case"relative slash":if("/"!=y&&"\\"!=y){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),l="relative path";continue}"\\"==y&&c("\\ is an invalid code point."),l="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=y){c("Expected '/', got: "+y),l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":if(l="authority ignore slashes","/"!=y){c("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!=y&&"\\"!=y){l="authority";continue}c("Expected authority, got: "+y);break;case"authority":if("@"==y){v&&(c("@ already seen."),d+="%40"),v=!0;for(var S=0;S0){var o=n[r-1],i=h(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=w.get(e);t||w.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=w.get(e),n=0;nh&&(p=s[h]);h++)a(p)?(c++,n()):(p.addEventListener("load",r),p.addEventListener("error",i));else n()}function a(e){return d?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&l(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function l(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",d=Boolean(u in document.createElement("link")),p=Boolean(window.ShadowDOMPolyfill),h=function(e){return p?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},f=h(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return h(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var w=/Trident/.test(navigator.userAgent),v=w?"complete":"interactive",g="readystatechange";d&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)l(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=d,e.rootDocument=f,e.whenReady=t,e.isIE=w}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){ +if(4===i.readyState){var n=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,l=e.isIE,u=e.IMPORT_LINK_TYPE,d="link[rel="+u+"]",p={documentSelectors:d,importsSelectors:[d,"link[rel=stylesheet]","style","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),l&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=p,e.IMPORT_SELECTOR=d}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,l=e.Loader,u=e.Observer,d=e.parser,p={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){h.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);h.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n["import"]=c}d.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),d.parseNext()},loadedAll:function(){d.parseNext()}},h=new l(p.loaded.bind(p),p.loadedAll.bind(p));if(p.observer=new u,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=p,e.importLoader=h}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){y(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),p(e)&&y(e,function(e){s(e)})}function i(e){T.push(e),S||(S=!0,setTimeout(a))}function a(){S=!1;for(var e,t=T,n=0,r=t.length;r>n&&(e=t[n]);n++)e();T=[]}function s(e){_?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&p(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function l(e){u(e),y(e,function(e){u(e)})}function u(e){_?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!p(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function p(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function h(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)w(t),t=t.olderShadowRoot}}function f(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e)}),M(e.removedNodes,function(e){e.localName&&l(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(t.takeRecords()),a())}function w(e){if(!e.__observer){var t=new MutationObserver(f);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),w(e),b.dom&&console.groupEnd()}function g(e){E(e,v)}var b=e.flags,y=e.forSubtree,E=e.forDocumentTree,_=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=_;var S=!1,T=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Element.prototype.createShadowRoot;O&&(Element.prototype.createShadowRoot=function(){var e=O.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=h,e.upgradeDocumentTree=g,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(l(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=d(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&v(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t<_.length;t++)if(e===_[t])return!0}function i(e){var t=l(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],r=0;t=e.ancestry[r];r++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag),r=Object.getPrototypeOf(n);r===e.prototype&&(t=r)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),i.__proto__=o,i=o;e["native"]=t}}function c(e){return b(M(e.tag),e)}function l(e){return e?S[e.toLowerCase()]:void 0}function u(e,t){S[e]=t}function d(e){return function(){return c(e)}}function p(e,t,n){return e===T?h(t,n):O(e,t)}function h(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=l(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var r;return t?(r=h(e),r.setAttribute("is",t),r):(r=M(e),e.indexOf("-")>=0&&y(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var m,w=e.isIE11OrOlder,v=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,y=e.implementPrototype,E=e.useNative,_=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],S={},T="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),O=document.createElementNS.bind(document);m=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),w&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=h,document.createElementNS=p,e.registry=S,e["instanceof"]=m,e.reservedTagList=_,e.getRegisteredDefinition=l,document.register=document.registerElement}),function(e){function t(){a(window.wrap(document)),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),window.CustomElements.ready=!0,setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,r=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements),function(e){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(e,r)}})}(window.WebComponents),function(e){"use strict";function t(){window.Polymer===o&&(window.Polymer=function(){throw new Error('You tried to use polymer without loading it first. To load polymer, ')})}if(!window.performance){var n=Date.now();window.performance={now:function(){return Date.now()-n}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var r=[],o=function(e,t){"string"!=typeof e&&1===arguments.length&&Array.prototype.push.call(arguments,document._currentScript),r.push(arguments)};window.Polymer=o,e.consumeDeclarations=function(t){e.consumeDeclarations=function(){throw"Possible attempt to load Polymer twice"},t&&t(r),r=null},HTMLImports.useNative?t():window.addEventListener("DOMContentLoaded",t)}(window.WebComponents),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents),function(e){window.Platform=e}(window.WebComponents); \ No newline at end of file diff --git a/dashboard-ui/collections.html b/dashboard-ui/collections.html index 94d3de9ab6..a0a351c762 100644 --- a/dashboard-ui/collections.html +++ b/dashboard-ui/collections.html @@ -20,8 +20,6 @@ ${TabCollections} -
-
@@ -34,7 +32,7 @@

${MessageNoCollectionsAvailable}

- +
diff --git a/dashboard-ui/css/tileitem.css b/dashboard-ui/css/tileitem.css index 5f609fff26..bd6c06597e 100644 --- a/dashboard-ui/css/tileitem.css +++ b/dashboard-ui/css/tileitem.css @@ -75,7 +75,7 @@ @media all and (min-width: 750px) { .smallPosterTileItem { - width: 31%; + width: 30.5%; } } diff --git a/dashboard-ui/livetvguide.html b/dashboard-ui/livetvguide.html index 2a9ac48c75..4124176274 100644 --- a/dashboard-ui/livetvguide.html +++ b/dashboard-ui/livetvguide.html @@ -19,7 +19,7 @@
- +
@@ -41,16 +41,6 @@
-
-
- -

${HeaderSelectDate}

-
- -
diff --git a/dashboard-ui/scripts/actionsheet.js b/dashboard-ui/scripts/actionsheet.js index 0b812566bb..1fe1886574 100644 --- a/dashboard-ui/scripts/actionsheet.js +++ b/dashboard-ui/scripts/actionsheet.js @@ -1,15 +1,65 @@ (function () { + function onClosed() { + $(this).remove(); + } function show(options) { - // items - // positionTo - // showCancel + require(['paperbuttonstyle'], function() { + // items + // positionTo + // showCancel + // title + var id = 'dlg' + new Date().getTime(); + var html = ''; + html += ''; + + if (options.title) { + html += '

'; + html += options.title; + html += '

'; + } + + html += ''; + for (var i = 0, length = options.items.length; i < length; i++) { + + var option = options.items[i]; + + html += '' + option.name + ''; + } + + html += ''; + + if (options.showCancel) { + html += '
'; + html += '' + Globalize.translate('ButtonCancel') + ''; + html += '
'; + } + + html += '
'; + + $(html).appendTo(document.body); + + setTimeout(function () { + var dlg = document.getElementById(id); + dlg.open(); + + // Has to be assigned a z-index after the call to .open() + $(dlg).css('z-index', '999999').on('iron-overlay-closed', onClosed); + + $('.btnOption', dlg).on('click', function () { + + if (options.callback) { + options.callback(this.getAttribute('data-id')); + } + dlg.close(); + }); + }, 100); + }); } - window.ActionSheet = { + window.ActionSheetElement = { show: show }; - })(); \ No newline at end of file diff --git a/dashboard-ui/scripts/livetvguide.js b/dashboard-ui/scripts/livetvguide.js index 2c7a75d936..659d0159ff 100644 --- a/dashboard-ui/scripts/livetvguide.js +++ b/dashboard-ui/scripts/livetvguide.js @@ -353,6 +353,8 @@ $('.currentDate', page).html(text); } + var dateOptions = []; + function setDateRange(page, guideInfo) { var today = new Date(); @@ -370,28 +372,23 @@ start = new Date(Math.max(today, start)); - var html = ''; + dateOptions = []; while (start <= end) { - - html += ''; + dateOptions.push({ + name: LibraryBrowser.getFutureDateText(start), + id: start.getTime() + }); start.setDate(start.getDate() + 1); start.setHours(0, 0, 0, 0); } - var elem = $('#selectDate', page).html(html).selectmenu('refresh'); - - if (currentDate) { - elem.val(currentDate.getTime()).selectmenu('refresh'); - } - - var val = elem.val(); var date = new Date(); - if (val) { - date.setTime(parseInt(val)); + if (currentDate) { + date.setTime(currentDate.getTime()); } changeDate(page, date); @@ -425,6 +422,25 @@ }); } + function selectDate(page) { + + require(['actionsheet'], function() { + + ActionSheetElement.show({ + items: dateOptions, + showCancel: true, + title: Globalize.translate('HeaderSelectDate'), + callback: function (id) { + + var date = new Date(); + date.setTime(parseInt(id)); + changeDate(page, date); + } + }); + + }); + } + $(document).on('pageinitdepends', "#liveTvGuidePage", function () { var page = this; @@ -434,19 +450,6 @@ onProgramGridScroll(page, this); }); - $('#selectDate', page).on('change', function () { - - var date = new Date(); - date.setTime(parseInt(this.value)); - - $('#popupConfig', page).popup('close'); - - setTimeout(function () { - - changeDate(page, date); - }, 300); - }); - if ($.browser.mobile) { $('.tvGuide', page).addClass('mobileGuide'); } else { @@ -478,6 +481,11 @@ reloadPage(page); }); + $('.btnSelectDate', page).on('click', function () { + + selectDate(page); + }); + }).on('pagebeforeshowready', "#liveTvGuidePage", function () { var page = this; diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js index a3a425f093..95458792c3 100644 --- a/dashboard-ui/scripts/moviecollections.js +++ b/dashboard-ui/scripts/moviecollections.js @@ -163,8 +163,6 @@ $('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh'); $('#chkThemeVideo', page).checked(query.HasThemeVideo == true).checkboxradio('refresh'); - $('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater); - $('#selectPageSize', page).val(query.Limit).selectmenu('refresh'); } @@ -223,20 +221,6 @@ reloadItems(page); }); - $('.alphabetPicker', this).on('alphaselect', function (e, character) { - - query.NameStartsWithOrGreater = character; - query.StartIndex = 0; - - reloadItems(page); - - }).on('alphaclear', function (e) { - - query.NameStartsWithOrGreater = ''; - - reloadItems(page); - }); - $('#selectView', this).on('change', function () { view = this.value; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 3b311b13f2..b553f64e55 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2042,14 +2042,19 @@ var AppInfo = {}; define("connectservice", ["thirdparty/apiclient/connectservice"]); define("paperbuttonstyle", [], function () { - Dashboard.importCss('thirdparty/paper-button/paper-button-style.css'); + Dashboard.importCss('thirdparty/paper-button-style.css'); return {}; }); define("jqmicons", [], function () { Dashboard.importCss('thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.icons.css'); return {}; }); - define("actionsheet", ["scripts/actionsheet"]); + + if (Dashboard.isRunningInCordova() && $.browser.safari) { + define("actionsheet", ["thirdparty/cordova/ios/actionsheet"]); + } else { + define("actionsheet", ["scripts/actionsheet"]); + } //requirejs(['http://viblast.com/player/free-version/qy2fdwajo1/viblast.js']); diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index 175d3cdc09..666d814779 100644 --- a/dashboard-ui/themes/ios.css +++ b/dashboard-ui/themes/ios.css @@ -146,3 +146,7 @@ h1, h1 a { margin-left: 210px; } } + +.bottomFab { + bottom: 70px; +} diff --git a/dashboard-ui/thirdparty/cordova/ios/actionsheet.js b/dashboard-ui/thirdparty/cordova/ios/actionsheet.js new file mode 100644 index 0000000000..3a955b534b --- /dev/null +++ b/dashboard-ui/thirdparty/cordova/ios/actionsheet.js @@ -0,0 +1,37 @@ +(function () { + + function show(options) { + + // items + // positionTo + // showCancel + // title + + var innerOptions = { + 'title': options.title, + 'buttonLabels': options.items.map(function (i) { + return i.name; + }) + }; + + if (options.showCancel) { + innerOptions.addCancelButtonWithLabel = Globalize.translate('ButtonCancel'); + } + + // Depending on the buttonIndex, you can now call shareViaFacebook or shareViaTwitter + // of the SocialSharing plugin (https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin) + window.plugins.actionsheet.show(innerOptions, function (index) { + + if (options.callback) { + + if (index >= 1) { + options.callback(options.items[index - 1].id); + } + } + }); + } + + window.ActionSheetElement = { + show: show + }; +})(); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/iron-icons/emby-icons.html b/dashboard-ui/thirdparty/emby-icons.html similarity index 96% rename from dashboard-ui/thirdparty/iron-icons/emby-icons.html rename to dashboard-ui/thirdparty/emby-icons.html index 7beff542b3..8e328be6a8 100644 --- a/dashboard-ui/thirdparty/iron-icons/emby-icons.html +++ b/dashboard-ui/thirdparty/emby-icons.html @@ -31,8 +31,8 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for @demo demo/index.html --> - - + + diff --git a/dashboard-ui/thirdparty/paper-button/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css similarity index 89% rename from dashboard-ui/thirdparty/paper-button/paper-button-style.css rename to dashboard-ui/thirdparty/paper-button-style.css index 7a9d347fde..ed0770e9c2 100644 --- a/dashboard-ui/thirdparty/paper-button/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -9,6 +9,22 @@ display: block; } + paper-button.blue { + color: #03a9f4; + } + + paper-button.blue:hover { + background: #e1f5f3; + } + + paper-button.ripple::shadow paper-ripple { + color: #ff3bee; + } + + paper-button.ripple paper-ripple { + color: #ff3bee; + } + paper-button.submit { color: #4285f4; } @@ -163,3 +179,7 @@ paper-button.notext { background-color: #eee; color: #000; }*/ + +.bottomFab { + bottom: 30px; +} diff --git a/dashboard-ui/thirdparty/paper-icon-button/paper-icon-button.html b/dashboard-ui/thirdparty/paper-icon-button/paper-icon-button.html deleted file mode 100644 index f4164ce06d..0000000000 --- a/dashboard-ui/thirdparty/paper-icon-button/paper-icon-button.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/dashboard-ui/thirdparty/webcomponentsjs/CustomElements.min.js b/dashboard-ui/thirdparty/webcomponentsjs/CustomElements.min.js deleted file mode 100644 index ca224db2f2..0000000000 --- a/dashboard-ui/thirdparty/webcomponentsjs/CustomElements.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @license - * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt - */ -// @version 0.7.3 -"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var n=t[this.name];return n&&n[0]===t?n[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){_.push(e),b||(b=!0,h(n))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function n(){b=!1;var e=_;_=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();o(e),r.length&&(e.callback_(r,e),t=!0)}),t&&n()}function o(e){e.nodes_.forEach(function(t){var r=v.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var r=e;r;r=r.parentNode){var n=v.get(r);if(n)for(var o=0;o0){var o=r[n-1],i=p(o,e);if(i)return void(r[n-1]=i)}else t(this.observer);r[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),r=0;r=0)){r.push(e);for(var n,o=e.querySelectorAll("link[rel="+a+"]"),s=0,d=o.length;d>s&&(n=o[s]);s++)n["import"]&&i(n["import"],t,r);t(e)}}var a=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e){return r(e)||n(e)}function r(t){return e.upgrade(t)?!0:void s(t)}function n(e){_(e,function(e){return r(e)?!0:void 0})}function o(e){s(e),f(e)&&_(e,function(e){s(e)})}function i(e){M.push(e),N||(N=!0,setTimeout(a))}function a(){N=!1;for(var e,t=M,r=0,n=t.length;n>r&&(e=t[r]);r++)e();M=[]}function s(e){y?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&f(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function u(e){c(e),_(e,function(e){c(e)})}function c(e){y?i(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!f(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function f(e){for(var t=e,r=wrap(document);t;){if(t==r)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function m(e){if(b.dom){var r=e[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var n=r.addedNodes[0];n&&n!==document&&!n.host;)n=n.parentNode;var o=n&&(n.URL||n._URL||n.host&&n.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(O(e.addedNodes,function(e){e.localName&&t(e)}),O(e.removedNodes,function(e){e.localName&&u(e)}))}),b.dom&&console.groupEnd()}function h(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(m);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function w(e){e=wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function g(e){E(e,w)}var b=e.flags,_=e.forSubtree,E=e.forDocumentTree,y=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=y;var N=!1,M=[],O=Array.prototype.forEach.call.bind(Array.prototype.forEach),L=Element.prototype.createShadowRoot;L&&(Element.prototype.createShadowRoot=function(){var e=L.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=g,e.upgradeSubtree=n,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=h}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var n=t.getAttribute("is"),o=e.getRegisteredDefinition(n||t.localName);if(o){if(n&&o.tag==t.localName)return r(t,o);if(!n&&!o["extends"])return r(t,o)}}}function r(t,r){return a.upgrade&&console.group("upgrade:",t.localName),r.is&&t.setAttribute("is",r.is),n(t,r),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function n(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,r){for(var n={},o=t;o!==r&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)n[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),n[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=r,e.implementPrototype=n}),window.CustomElements.addModule(function(e){function t(t,n){var d=n||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(u(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return d.prototype||(d.prototype=Object.create(HTMLElement.prototype)),d.__name=t.toLowerCase(),d.lifecycle=d.lifecycle||{},d.ancestry=i(d["extends"]),a(d),s(d),r(d.prototype),c(d.__name,d),d.ctor=l(d),d.ctor.prototype=d.prototype,d.prototype.constructor=d.ctor,e.ready&&w(document),d.ctor}function r(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,r){n.call(this,e,r,t)};var r=e.removeAttribute;e.removeAttribute=function(e){n.call(this,e,null,r)},e.setAttribute._polyfilled=!0}}function n(e,t,r){e=e.toLowerCase();var n=this.getAttribute(e);r.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==n&&this.attributeChangedCallback(e,n,o)}function o(e){for(var t=0;t=0&&_(n,HTMLElement),n)}function m(e,t){var r=e[t];e[t]=function(){var e=r.apply(this,arguments);return g(e),e}}var h,v=e.isIE11OrOlder,w=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,_=e.implementPrototype,E=e.useNative,y=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],N={},M="http://www.w3.org/1999/xhtml",O=document.createElement.bind(document),L=document.createElementNS.bind(document);h=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){for(var r=e;r;){if(r===t.prototype)return!0;r=r.__proto__}return!1},m(Node.prototype,"cloneNode"),m(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var r=document.createDocumentFragment();return r.appendChild(t),r}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=f,e.registry=N,e["instanceof"]=h,e.reservedTagList=y,e.getRegisteredDefinition=u,document.register=document.registerElement}),function(e){function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var r=e.useNative,n=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(r){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else n();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),r},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/webcomponentsjs/HTMLImports.min.js b/dashboard-ui/thirdparty/webcomponentsjs/HTMLImports.min.js deleted file mode 100644 index 84ec6b896f..0000000000 --- a/dashboard-ui/thirdparty/webcomponentsjs/HTMLImports.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @license - * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt - */ -// @version 0.7.3 -"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var n=t[this.name];return n&&n[0]===t?n[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){E.push(e),_||(_=!0,f(n))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function n(){_=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();o(e),r.length&&(e.callback_(r,e),t=!0)}),t&&n()}function o(e){e.nodes_.forEach(function(t){var r=v.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var r=e;r;r=r.parentNode){var n=v.get(r);if(n)for(var o=0;o0){var o=r[n-1],i=m(o,e);if(i)return void(r[n-1]=i)}else t(this.observer);r[n]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),r=0;rm&&(h=s[m]);m++)a(h)?(d++,r()):(h.addEventListener("load",n),h.addEventListener("error",i));else r()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)d(t)&&c(t)}function d(e){return"link"===e.localName&&"import"===e.rel}function c(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),m=function(e){return h?ShadowDOMPolyfill.wrapIfNeeded(e):e},p=m(document),f={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return m(e)},configurable:!0};Object.defineProperty(document,"_currentScript",f),Object.defineProperty(p,"_currentScript",f);var v=/Trident|Edge/.test(navigator.userAgent),b=v?"complete":"interactive",g="readystatechange";l&&(new MutationObserver(function(e){for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),r=0,n=t.length;n>r&&(e=t[r]);r++)c(e)}()),t(function(e){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],r=function(e){t.push(e)},n=function(){t.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=n}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,r=/(@import[\s]+(?!url\())([^;]*)(;)/g,n={resolveUrlsInStyle:function(e,t){var r=e.ownerDocument,n=r.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,n),e},resolveUrlsInCssText:function(e,n,o){var i=this.replaceUrls(e,o,n,t);return i=this.replaceUrls(i,o,n,r)},replaceUrls:function(e,t,r,n){return e.replace(n,function(e,n,o,i){var a=o.replace(/["']/g,"");return r&&(a=new URL(a,r).href),t.href=a,a=t.href,n+"'"+a+"'"+i})}};e.path=n}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(r,n,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(r+="?"+Math.random()),i.open("GET",r,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var r=i.getResponseHeader("Location"),a=null;if(r)var a="/"===r.substr(0,1)?location.origin+r:r;n.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,r){this.load(e,t,r).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,r=e.flags,n=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};n.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,n){if(r.load&&console.log("fetch",e,n),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,n,null,a)}.bind(this),0)}else{var s=function(t,r,o){this.receive(e,n,t,r,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,n,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,r,n,o){this.cache[e]=n;for(var i,a=this.pending[e],s=0,d=a.length;d>s&&(i=a[s]);s++)this.onload(e,i,n,r,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=n}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,r=0,n=e.length;n>r&&(t=e[r]);r++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function r(e){var t=n(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function n(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var r=e.ownerDocument.baseURI,n=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+r+n+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,d=e.flags,c=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]","style","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(d.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){d.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,d.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var r=this,n=function(n){t&&t(n),r.markParsingComplete(e),r.parseNext()};if(e.addEventListener("load",n),e.addEventListener("error",n),c&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;s>d&&(i=a[d]);d++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var n=document.createElement("script");n.__importElement=t,n.src=t.src?t.src:r(t),e.currentScript=t,this.trackElement(n,function(t){n.parentNode.removeChild(n),e.currentScript=null}),this.addElementToDocument(n)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,r){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var n,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(n=o[i]);i++)if(!this.isParsed(n))return this.hasResource(n)?t(n)?this.nextToParseInDoc(n["import"],n):n:void 0}return r},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return r(e,a)}function r(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function n(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var r=document.implementation.createHTMLDocument(a);r._URL=t;var o=r.createElement("base");o.setAttribute("href",t),r.baseURI||n(r)||Object.defineProperty(r,"baseURI",{value:t});var i=r.createElement("meta");return i.setAttribute("charset","utf-8"),r.head.appendChild(i),r.head.appendChild(o),r.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(r),r}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,d=e.rootDocument,c=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){m.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);m.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===d?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,r,n,a,s){if(i.load&&console.log("loaded",e,r),r.__resource=n,r.__error=a,t(r)){var d=this.documents[e];void 0===d&&(d=a?null:o(n,s||e),d&&(d.__importLink=r,this.bootDocument(d)),this.documents[e]=d),r["import"]=d}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},m=new c(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(d,"baseURI",p)}e.importer=h,e.importLoader=m}),window.HTMLImports.addModule(function(e){var t=e.parser,r=e.importer,n={added:function(e){for(var n,o,i,a,s=0,d=e.length;d>s&&(a=e[s]);s++)n||(n=a.ownerDocument,o=t.isParsed(n)),i=this.shouldLoadNode(a),i&&r.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,r.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};r.observer.addCallback=n.added.bind(n);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(o)}var r=e.initializeModules,n=e.isIE;if(!e.useNative){n&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),r},window.CustomEvent.prototype=window.Event.prototype),r();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/webcomponentsjs/webcomponents-lite.min.js b/dashboard-ui/thirdparty/webcomponentsjs/webcomponents-lite.min.js deleted file mode 100644 index a193b1da1c..0000000000 --- a/dashboard-ui/thirdparty/webcomponentsjs/webcomponents-lite.min.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @license - * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt - */ -// @version 0.7.3 -window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents-lite.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var n,r=e.split("=");r[0]&&(n=r[0].match(/wc-(.+)/))&&(t[n[1]]=r[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==h[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var d=a||"scheme start",l=0,u="",_=!1,g=!1,b=[];e:for(;(e[l-1]!=f||0==l)&&!this._isInvalid;){var w=e[l];switch(d){case"scheme start":if(!w||!m.test(w)){if(a){c("Invalid scheme.");break e}u="",d="no scheme";continue}u+=w.toLowerCase(),d="scheme";break;case"scheme":if(w&&v.test(w))u+=w.toLowerCase();else{if(":"!=w){if(a){if(f==w)break e;c("Code point not allowed in scheme: "+w);break e}u="",l=0,d="no scheme";continue}if(this._scheme=u,u="",a)break e;t(this._scheme)&&(this._isRelative=!0),d="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==w?(this._query="?",d="query"):"#"==w?(this._fragment="#",d="fragment"):f!=w&&" "!=w&&"\n"!=w&&"\r"!=w&&(this._schemeData+=o(w));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=w||"/"!=e[l+1]){c("Expected /, got: "+w),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==w){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==w||"\\"==w)"\\"==w&&c("\\ is an invalid code point."),d="relative slash";else if("?"==w)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,d="query";else{if("#"!=w){var y=e[l+1],E=e[l+2];("file"!=this._scheme||!m.test(w)||":"!=y&&"|"!=y||f!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),d="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,d="fragment"}break;case"relative slash":if("/"!=w&&"\\"!=w){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),d="relative path";continue}"\\"==w&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=w){c("Expected '/', got: "+w),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=w){c("Expected '/', got: "+w);continue}break;case"authority ignore slashes":if("/"!=w&&"\\"!=w){d="authority";continue}c("Expected authority, got: "+w);break;case"authority":if("@"==w){_&&(c("@ already seen."),u+="%40"),_=!0;for(var L=0;L>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){w.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=w;w=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o0){var o=n[r-1],i=p(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;np&&(h=s[p]);p++)a(h)?(c++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return u?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var l="import",u=Boolean(l in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),p=function(e){return h?ShadowDOMPolyfill.wrapIfNeeded(e):e},f=p(document),m={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return p(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var v=/Trident|Edge/.test(navigator.userAgent),_=v?"complete":"interactive",g="readystatechange";u&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)d(e)}()),t(function(e){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=l,e.useNative=u,e.rootDocument=f,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===l}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,l=e.IMPORT_LINK_TYPE,u="link[rel="+l+"]",h={documentSelectors:u,importsSelectors:[u,"link[rel=stylesheet]","style","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),d&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=u}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,l=e.Observer,u=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){p.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);p.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n["import"]=c}u.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),u.parseNext()},loadedAll:function(){u.parseNext()}},p=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new l,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=h,e.importLoader=p}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){w(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),h(e)&&w(e,function(e){s(e)})}function i(e){M.push(e),L||(L=!0,setTimeout(a))}function a(){L=!1;for(var e,t=M,n=0,r=t.length;r>n&&(e=t[n]);n++)e();M=[]}function s(e){E?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&h(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function d(e){l(e),w(e,function(e){l(e)})}function l(e){E?i(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!h(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function h(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function f(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e)}),T(e.removedNodes,function(e){e.localName&&d(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(f);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function _(e){e=wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function g(e){y(e,_)}var b=e.flags,w=e.forSubtree,y=e.forDocumentTree,E=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=E;var L=!1,M=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),N=Element.prototype.createShadowRoot;N&&(Element.prototype.createShadowRoot=function(){var e=N.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=g,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(d(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),l(c.__name,c),c.ctor=u(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&_(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o); - -}function o(e){for(var t=0;t=0&&w(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var m,v=e.isIE11OrOlder,_=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,w=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],L={},M="http://www.w3.org/1999/xhtml",T=document.createElement.bind(document),N=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=h,e.registry=L,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,r=e.initializeModules,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t();e.isIE11OrOlder=o}(window.CustomElements),"undefined"==typeof HTMLTemplateElement&&!function(){var e="template";HTMLTemplateElement=function(){},HTMLTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){e.content||(e.content=e.ownerDocument.createDocumentFragment());for(var t;t=e.firstChild;)e.content.appendChild(t)},HTMLTemplateElement.bootstrap=function(t){for(var n,r=t.querySelectorAll(e),o=0,i=r.length;i>o&&(n=r[o]);o++)HTMLTemplateElement.decorate(n)},addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)});var t=document.createElement;document.createElement=function(){"use strict";var e=t.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e}}(),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents); \ No newline at end of file