├── voting-dap-ui
├── styles
│ └── styles.css
├── .idea
│ ├── misc.xml
│ ├── jsLibraryMappings.xml
│ ├── modules.xml
│ ├── voting-dap-ui.iml
│ └── workspace.xml
├── package.json
├── libs
│ └── material-light
│ │ ├── bower.json
│ │ ├── package.json
│ │ ├── LICENSE
│ │ └── material.min.js
├── scripts
│ └── app.js
├── index.html
└── package-lock.json
├── screenshot.png
├── nodeScript
├── package.json
├── voting-dap.js
└── Voting.sol
└── README.md
/voting-dap-ui/styles/styles.css:
--------------------------------------------------------------------------------
1 | .app-container{
2 | padding:20px;
3 | }
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joshpierro/ethereum-voting-dapp/HEAD/screenshot.png
--------------------------------------------------------------------------------
/voting-dap-ui/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/voting-dap-ui/.idea/jsLibraryMappings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/voting-dap-ui/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/nodeScript/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "voting-dap",
3 | "description": "etherium voting dap",
4 | "version": "0.0.1",
5 | "devDependencies": {
6 | "http-server": "^0.9.0"
7 | },
8 | "scripts": {
9 | "test": "echo",
10 | "prestart": "npm install",
11 | "start": "node voting-dap.js"
12 | },
13 | "dependencies": {
14 | "file-system": "^2.2.2",
15 | "solc": "^0.4.18",
16 | "web3": "^0.20.1"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/voting-dap-ui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "voting-dap",
3 | "description": "etherium voting dap",
4 | "version": "0.0.1",
5 | "devDependencies": {
6 | "http-server": "^0.9.0"
7 | },
8 | "scripts": {
9 | "test": "echo",
10 | "prestart": "npm install",
11 | "start": "http-server -a localhost -p 8080 -c-1"
12 | },
13 | "dependencies": {
14 | "file-system": "^2.2.2",
15 | "solc": "^0.4.18",
16 | "web3": "^0.20.1"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/voting-dap-ui/.idea/voting-dap-ui.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/voting-dap-ui/libs/material-light/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "material-design-lite",
3 | "version": "1.3.0",
4 | "homepage": "https://github.com/google/material-design-lite",
5 | "authors": [
6 | "Material Design Lite team"
7 | ],
8 | "description": "Material Design Components in CSS, JS and HTML",
9 | "main": [
10 | "material.min.css",
11 | "material.min.js"
12 | ],
13 | "keywords": [
14 | "material",
15 | "design",
16 | "styleguide",
17 | "style",
18 | "guide"
19 | ],
20 | "license": "Apache-2",
21 | "ignore": [
22 | "**/.*",
23 | "node_modules",
24 | "bower_components",
25 | "./lib/.bower_components",
26 | "test",
27 | "tests"
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/nodeScript/voting-dap.js:
--------------------------------------------------------------------------------
1 | fs = require('fs');
2 | solc = require('solc');
3 | Web3 = require('web3');
4 |
5 | web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
6 | code = fs.readFileSync('Voting.sol').toString();
7 | compiledCode = solc.compile(code);
8 | abiDefinition = JSON.parse(compiledCode.contracts[':Voting'].interface);
9 | VotingContract = web3.eth.contract(abiDefinition);
10 | byteCode = compiledCode.contracts[':Voting'].bytecode;
11 | deployedContract = VotingContract.new(['Rama','Nick','Jose'],{data: byteCode, from: web3.eth.accounts[0], gas: 4700000});
12 | console.log(deployedContract);
13 | contractInstance = VotingContract.at(deployedContract.address);
14 | console.log('hello',deployedContract.address)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ethereum-voting-dapp
2 | Hello world for writing Ethereum apps!
3 |
4 | This is a pure javascript and material design port of [this awesome tutorial](https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-1-40d2d0d807c2) .
5 |
6 | To Use:
7 | - read the [tutorial](https://medium.com/@mvmurthy/full-stack-hello-world-voting-ethereum-dapp-tutorial-part-1-40d2d0d807c2)
8 | - install and run testrpc : npm install -g ethereumjs-testrpc
9 | - run the scripts in the 'NodeScript' dir
10 | - change line 7 of voting-dap-ui/scripts/app.js to the contractInstance.address
11 | - serve up the web app (I use [web server for chrome](https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en)
12 |
13 |
14 |
--------------------------------------------------------------------------------
/nodeScript/Voting.sol:
--------------------------------------------------------------------------------
1 | pragma solidity ^0.4.11;
2 | // We have to specify what version of compiler this code will compile with
3 |
4 | contract Voting {
5 | /* mapping field below is equivalent to an associative array or hash.
6 | The key of the mapping is candidate name stored as type bytes32 and value is
7 | */
8 |
9 | mapping (bytes32 => uint8) public votesReceived;
10 |
11 | /* Solidity doesn't let you pass in an array of strings in the constructor (yet).
12 | We will use an array of bytes32 instead to store the list of candidates
13 | */
14 |
15 | bytes32[] public candidateList;
16 |
17 | /* This is the constructor which will be called once when you
18 | deploy the contract to the blockchain. When we deploy the contract,
19 | we will pass an array of candidates who will be contesting in the election
20 | */
21 | function Voting(bytes32[] candidateNames) {
22 | candidateList = candidateNames;
23 | }
24 |
25 | // This function returns the total votes a candidate has received so far
26 | function totalVotesFor(bytes32 candidate) returns (uint8) {
27 | if (validCandidate(candidate) == false) throw;
28 | return votesReceived[candidate];
29 | }
30 |
31 | // This function increments the vote count for the specified candidate. This
32 | // is equivalent to casting a vote
33 | function voteForCandidate(bytes32 candidate) {
34 | if (validCandidate(candidate) == false) throw;
35 | votesReceived[candidate] += 1;
36 | }
37 |
38 | function validCandidate(bytes32 candidate) returns (bool) {
39 | for(uint i = 0; i < candidateList.length; i++) {
40 | if (candidateList[i] == candidate) {
41 | return true;
42 | }
43 | }
44 | return false;
45 | }
46 | }
--------------------------------------------------------------------------------
/voting-dap-ui/libs/material-light/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "material-design-lite",
3 | "version": "1.3.0",
4 | "description": "Material Design Components in CSS, JS and HTML",
5 | "private": true,
6 | "license": "Apache-2.0",
7 | "author": "Google",
8 | "repository": "google/material-design-lite",
9 | "main": "dist/material.min.js",
10 | "devDependencies": {
11 | "acorn": "^4.0.3",
12 | "babel-core": "^6.20.0",
13 | "babel-preset-es2015": "^6.18.0",
14 | "browser-sync": "^2.2.3",
15 | "chai": "^3.3.0",
16 | "chai-jquery": "^2.0.0",
17 | "del": "^2.0.2",
18 | "drool": "^0.4.0",
19 | "escodegen": "^1.6.1",
20 | "google-closure-compiler": "",
21 | "gulp": "^3.9.0",
22 | "gulp-autoprefixer": "^3.0.2",
23 | "gulp-cache": "^0.4.5",
24 | "gulp-closure-compiler": "^0.4.0",
25 | "gulp-concat": "^2.4.1",
26 | "gulp-connect": "^5.0.0",
27 | "gulp-css-inline-images": "^0.1.1",
28 | "gulp-csso": "1.0.0",
29 | "gulp-file": "^0.3.0",
30 | "gulp-flatten": "^0.3.1",
31 | "gulp-front-matter": "^1.2.2",
32 | "gulp-header": "^1.2.2",
33 | "gulp-if": "^2.0.0",
34 | "gulp-iife": "^0.3.0",
35 | "gulp-imagemin": "^3.1.0",
36 | "gulp-jscs": "^4.0.0",
37 | "gulp-jshint": "^2.0.4",
38 | "gulp-load-plugins": "^1.3.0",
39 | "gulp-marked": "^1.0.0",
40 | "gulp-mocha-phantomjs": "^0.12.0",
41 | "gulp-open": "^2.0.0",
42 | "gulp-rename": "^1.2.0",
43 | "gulp-replace": "^0.5.3",
44 | "gulp-sass": "3.0.0",
45 | "gulp-shell": "^0.5.2",
46 | "gulp-size": "^2.0.0",
47 | "gulp-sourcemaps": "^2.0.1",
48 | "gulp-subtree": "^0.1.0",
49 | "gulp-tap": "^0.1.3",
50 | "gulp-uglify": "^2.0.0",
51 | "gulp-util": "^3.0.4",
52 | "gulp-zip": "^3.0.2",
53 | "humanize": "0.0.9",
54 | "jquery": "^3.1.1",
55 | "jshint": "^2.9.4",
56 | "jshint-stylish": "^2.2.1",
57 | "merge-stream": "^1.0.0",
58 | "mocha": "^3.0.2",
59 | "prismjs": "0.0.1",
60 | "run-sequence": "^1.0.2",
61 | "swig": "^1.4.2",
62 | "through2": "^2.0.0",
63 | "vinyl-paths": "^2.0.0"
64 | },
65 | "engines": {
66 | "node": ">=0.12.0"
67 | },
68 | "scripts": {
69 | "test": "gulp && git status | grep 'working directory clean' >/dev/null || (echo 'Please commit all changes generated by building'; exit 1)"
70 | },
71 | "babel": {
72 | "only": "gulpfile.babel.js",
73 | "presets": [
74 | "es2015"
75 | ]
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/voting-dap-ui/scripts/app.js:
--------------------------------------------------------------------------------
1 | (function(){
2 | web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
3 | abi = JSON.parse('[{"constant":false,"inputs":[{"name":"candidate","type":"bytes32"}],"name":"totalVotesFor","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"candidate","type":"bytes32"}],"name":"validCandidate","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"votesReceived","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"x","type":"bytes32"}],"name":"bytes32ToString","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"candidateList","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"candidate","type":"bytes32"}],"name":"voteForCandidate","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"contractOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"candidateNames","type":"bytes32[]"}],"payable":false,"type":"constructor"}]')
4 | VotingContract = web3.eth.contract(abi);
5 |
6 | // In your nodejs console, execute contractInstance.address to get the address at which the contract is deployed and change the line below to use your deployed address
7 | contractInstance = VotingContract.at('0xa11c674b8b20751c9b41990721356d161dce0772');
8 | candidates = {"Rama": "candidate-1", "Nick": "candidate-2", "Jose": "candidate-3"}
9 |
10 | const ramaBtn = document.getElementById('Rama'),nickBtn = document.getElementById('Nick'),joseBtn = document.getElementById('Jose');
11 |
12 | init();
13 |
14 | ramaBtn.addEventListener('click',function(){
15 | vote(this.id)
16 | });
17 | nickBtn.addEventListener('click',function(){
18 | vote(this.id)
19 | });
20 | joseBtn.addEventListener('click',function(){
21 | vote(this.id)
22 | });
23 |
24 | function vote(candidate){
25 | contractInstance.voteForCandidate(candidate, {from: web3.eth.accounts[0]}, function() {
26 | let divId = (candidate + '-votes').toLowerCase();
27 | let voteDiv = document.getElementById(divId);
28 | voteDiv.innerHTML = contractInstance.totalVotesFor.call(candidate).toString();
29 | });
30 | }
31 |
32 | function init(){
33 | let candidateNames = Object.keys(candidates);
34 | for (var i = 0; i < candidateNames.length; i++) {
35 | let candidate = candidateNames[i];
36 | let val = contractInstance.totalVotesFor.call(candidate).toString();
37 | let divId = (candidate + '-votes').toLowerCase();
38 | let voteDiv = document.getElementById(divId);
39 | voteDiv.innerHTML = contractInstance.totalVotesFor.call(candidate).toString();
40 | }
41 | }
42 | })();
--------------------------------------------------------------------------------
/voting-dap-ui/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | voting-dap
6 |
7 |
8 |
9 |
10 |
11 |
12 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/voting-dap-ui/libs/material-light/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright 2015 Google Inc
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
204 | All code in any directories or sub-directories that end with *.html or
205 | *.css is licensed under the Creative Commons Attribution International
206 | 4.0 License, which full text can be found here:
207 | https://creativecommons.org/licenses/by/4.0/legalcode.
208 |
209 | As an exception to this license, all html or css that is generated by
210 | the software at the direction of the user is copyright the user. The
211 | user has full ownership and control over such content, including
212 | whether and how they wish to license it.
213 |
--------------------------------------------------------------------------------
/voting-dap-ui/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | true
117 | DEFINITION_ORDER
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 | project
286 |
287 |
288 | true
289 |
290 |
291 |
292 | DIRECTORY
293 |
294 | false
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 | 1508428072916
305 |
306 |
307 | 1508428072916
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
--------------------------------------------------------------------------------
/voting-dap-ui/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "voting-dap",
3 | "version": "0.0.1",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "ansi-regex": {
8 | "version": "2.1.1",
9 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
10 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
11 | },
12 | "async": {
13 | "version": "0.9.0",
14 | "resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz",
15 | "integrity": "sha1-rDYTsdqb7RtHUQu0ZRuJMeRxRsc=",
16 | "dev": true
17 | },
18 | "balanced-match": {
19 | "version": "1.0.0",
20 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
21 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
22 | },
23 | "bignumber.js": {
24 | "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
25 | },
26 | "brace-expansion": {
27 | "version": "1.1.8",
28 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
29 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
30 | "requires": {
31 | "balanced-match": "1.0.0",
32 | "concat-map": "0.0.1"
33 | }
34 | },
35 | "builtin-modules": {
36 | "version": "1.1.1",
37 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
38 | "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8="
39 | },
40 | "camelcase": {
41 | "version": "3.0.0",
42 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
43 | "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo="
44 | },
45 | "cliui": {
46 | "version": "3.2.0",
47 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
48 | "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
49 | "requires": {
50 | "string-width": "1.0.2",
51 | "strip-ansi": "3.0.1",
52 | "wrap-ansi": "2.1.0"
53 | }
54 | },
55 | "code-point-at": {
56 | "version": "1.1.0",
57 | "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
58 | "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
59 | },
60 | "colors": {
61 | "version": "1.0.3",
62 | "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
63 | "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=",
64 | "dev": true
65 | },
66 | "concat-map": {
67 | "version": "0.0.1",
68 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
69 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
70 | },
71 | "corser": {
72 | "version": "2.0.1",
73 | "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
74 | "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=",
75 | "dev": true
76 | },
77 | "crypto-js": {
78 | "version": "3.1.8",
79 | "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz",
80 | "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU="
81 | },
82 | "decamelize": {
83 | "version": "1.2.0",
84 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
85 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
86 | },
87 | "ecstatic": {
88 | "version": "1.4.1",
89 | "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-1.4.1.tgz",
90 | "integrity": "sha1-Mst7b6LikNWGaGdNEV6PDD1WfWo=",
91 | "dev": true,
92 | "requires": {
93 | "he": "0.5.0",
94 | "mime": "1.4.1",
95 | "minimist": "1.2.0",
96 | "url-join": "1.1.0"
97 | }
98 | },
99 | "error-ex": {
100 | "version": "1.3.1",
101 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
102 | "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
103 | "requires": {
104 | "is-arrayish": "0.2.1"
105 | }
106 | },
107 | "eventemitter3": {
108 | "version": "1.2.0",
109 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz",
110 | "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=",
111 | "dev": true
112 | },
113 | "file-match": {
114 | "version": "1.0.2",
115 | "resolved": "https://registry.npmjs.org/file-match/-/file-match-1.0.2.tgz",
116 | "integrity": "sha1-ycrSZdLIrfOoFHWw30dYWQafrvc=",
117 | "requires": {
118 | "utils-extend": "1.0.8"
119 | }
120 | },
121 | "file-system": {
122 | "version": "2.2.2",
123 | "resolved": "https://registry.npmjs.org/file-system/-/file-system-2.2.2.tgz",
124 | "integrity": "sha1-fWWDPjojR9zZVqgTxncVPtPt2Yc=",
125 | "requires": {
126 | "file-match": "1.0.2",
127 | "utils-extend": "1.0.8"
128 | }
129 | },
130 | "find-up": {
131 | "version": "1.1.2",
132 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
133 | "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
134 | "requires": {
135 | "path-exists": "2.1.0",
136 | "pinkie-promise": "2.0.1"
137 | }
138 | },
139 | "fs-extra": {
140 | "version": "0.30.0",
141 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
142 | "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=",
143 | "requires": {
144 | "graceful-fs": "4.1.11",
145 | "jsonfile": "2.4.0",
146 | "klaw": "1.3.1",
147 | "path-is-absolute": "1.0.1",
148 | "rimraf": "2.6.2"
149 | }
150 | },
151 | "fs.realpath": {
152 | "version": "1.0.0",
153 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
154 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
155 | },
156 | "get-caller-file": {
157 | "version": "1.0.2",
158 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz",
159 | "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U="
160 | },
161 | "glob": {
162 | "version": "7.1.2",
163 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
164 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
165 | "requires": {
166 | "fs.realpath": "1.0.0",
167 | "inflight": "1.0.6",
168 | "inherits": "2.0.3",
169 | "minimatch": "3.0.4",
170 | "once": "1.4.0",
171 | "path-is-absolute": "1.0.1"
172 | }
173 | },
174 | "graceful-fs": {
175 | "version": "4.1.11",
176 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
177 | "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
178 | },
179 | "he": {
180 | "version": "0.5.0",
181 | "resolved": "https://registry.npmjs.org/he/-/he-0.5.0.tgz",
182 | "integrity": "sha1-LAX/rvkLaOhg8/0rVO9YCYknfuI=",
183 | "dev": true
184 | },
185 | "hosted-git-info": {
186 | "version": "2.5.0",
187 | "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
188 | "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg=="
189 | },
190 | "http-proxy": {
191 | "version": "1.16.2",
192 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz",
193 | "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=",
194 | "dev": true,
195 | "requires": {
196 | "eventemitter3": "1.2.0",
197 | "requires-port": "1.0.0"
198 | }
199 | },
200 | "http-server": {
201 | "version": "0.9.0",
202 | "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.9.0.tgz",
203 | "integrity": "sha1-jxsGvcczYY1NxCgxx7oa/04GABo=",
204 | "dev": true,
205 | "requires": {
206 | "colors": "1.0.3",
207 | "corser": "2.0.1",
208 | "ecstatic": "1.4.1",
209 | "http-proxy": "1.16.2",
210 | "opener": "1.4.3",
211 | "optimist": "0.6.1",
212 | "portfinder": "0.4.0",
213 | "union": "0.4.6"
214 | }
215 | },
216 | "inflight": {
217 | "version": "1.0.6",
218 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
219 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
220 | "requires": {
221 | "once": "1.4.0",
222 | "wrappy": "1.0.2"
223 | }
224 | },
225 | "inherits": {
226 | "version": "2.0.3",
227 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
228 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
229 | },
230 | "invert-kv": {
231 | "version": "1.0.0",
232 | "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
233 | "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
234 | },
235 | "is-arrayish": {
236 | "version": "0.2.1",
237 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
238 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
239 | },
240 | "is-builtin-module": {
241 | "version": "1.0.0",
242 | "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
243 | "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
244 | "requires": {
245 | "builtin-modules": "1.1.1"
246 | }
247 | },
248 | "is-fullwidth-code-point": {
249 | "version": "1.0.0",
250 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
251 | "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
252 | "requires": {
253 | "number-is-nan": "1.0.1"
254 | }
255 | },
256 | "is-utf8": {
257 | "version": "0.2.1",
258 | "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
259 | "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
260 | },
261 | "jsonfile": {
262 | "version": "2.4.0",
263 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
264 | "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
265 | "requires": {
266 | "graceful-fs": "4.1.11"
267 | }
268 | },
269 | "klaw": {
270 | "version": "1.3.1",
271 | "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
272 | "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
273 | "requires": {
274 | "graceful-fs": "4.1.11"
275 | }
276 | },
277 | "lcid": {
278 | "version": "1.0.0",
279 | "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
280 | "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
281 | "requires": {
282 | "invert-kv": "1.0.0"
283 | }
284 | },
285 | "load-json-file": {
286 | "version": "1.1.0",
287 | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
288 | "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
289 | "requires": {
290 | "graceful-fs": "4.1.11",
291 | "parse-json": "2.2.0",
292 | "pify": "2.3.0",
293 | "pinkie-promise": "2.0.1",
294 | "strip-bom": "2.0.0"
295 | }
296 | },
297 | "lodash.assign": {
298 | "version": "4.2.0",
299 | "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
300 | "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc="
301 | },
302 | "memorystream": {
303 | "version": "0.3.1",
304 | "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
305 | "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI="
306 | },
307 | "mime": {
308 | "version": "1.4.1",
309 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
310 | "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==",
311 | "dev": true
312 | },
313 | "minimatch": {
314 | "version": "3.0.4",
315 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
316 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
317 | "requires": {
318 | "brace-expansion": "1.1.8"
319 | }
320 | },
321 | "minimist": {
322 | "version": "1.2.0",
323 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
324 | "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
325 | "dev": true
326 | },
327 | "mkdirp": {
328 | "version": "0.5.1",
329 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
330 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
331 | "dev": true,
332 | "requires": {
333 | "minimist": "0.0.8"
334 | },
335 | "dependencies": {
336 | "minimist": {
337 | "version": "0.0.8",
338 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
339 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
340 | "dev": true
341 | }
342 | }
343 | },
344 | "normalize-package-data": {
345 | "version": "2.4.0",
346 | "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
347 | "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
348 | "requires": {
349 | "hosted-git-info": "2.5.0",
350 | "is-builtin-module": "1.0.0",
351 | "semver": "5.4.1",
352 | "validate-npm-package-license": "3.0.1"
353 | }
354 | },
355 | "number-is-nan": {
356 | "version": "1.0.1",
357 | "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
358 | "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
359 | },
360 | "once": {
361 | "version": "1.4.0",
362 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
363 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
364 | "requires": {
365 | "wrappy": "1.0.2"
366 | }
367 | },
368 | "opener": {
369 | "version": "1.4.3",
370 | "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz",
371 | "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=",
372 | "dev": true
373 | },
374 | "optimist": {
375 | "version": "0.6.1",
376 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
377 | "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
378 | "dev": true,
379 | "requires": {
380 | "minimist": "0.0.10",
381 | "wordwrap": "0.0.3"
382 | },
383 | "dependencies": {
384 | "minimist": {
385 | "version": "0.0.10",
386 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
387 | "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
388 | "dev": true
389 | }
390 | }
391 | },
392 | "os-locale": {
393 | "version": "1.4.0",
394 | "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
395 | "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
396 | "requires": {
397 | "lcid": "1.0.0"
398 | }
399 | },
400 | "parse-json": {
401 | "version": "2.2.0",
402 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
403 | "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
404 | "requires": {
405 | "error-ex": "1.3.1"
406 | }
407 | },
408 | "path-exists": {
409 | "version": "2.1.0",
410 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
411 | "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
412 | "requires": {
413 | "pinkie-promise": "2.0.1"
414 | }
415 | },
416 | "path-is-absolute": {
417 | "version": "1.0.1",
418 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
419 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
420 | },
421 | "path-type": {
422 | "version": "1.1.0",
423 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
424 | "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
425 | "requires": {
426 | "graceful-fs": "4.1.11",
427 | "pify": "2.3.0",
428 | "pinkie-promise": "2.0.1"
429 | }
430 | },
431 | "pify": {
432 | "version": "2.3.0",
433 | "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
434 | "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
435 | },
436 | "pinkie": {
437 | "version": "2.0.4",
438 | "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
439 | "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
440 | },
441 | "pinkie-promise": {
442 | "version": "2.0.1",
443 | "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
444 | "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
445 | "requires": {
446 | "pinkie": "2.0.4"
447 | }
448 | },
449 | "portfinder": {
450 | "version": "0.4.0",
451 | "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-0.4.0.tgz",
452 | "integrity": "sha1-o/+t/6/k+5jgYBqF7aJ8J86Eyh4=",
453 | "dev": true,
454 | "requires": {
455 | "async": "0.9.0",
456 | "mkdirp": "0.5.1"
457 | }
458 | },
459 | "qs": {
460 | "version": "2.3.3",
461 | "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
462 | "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=",
463 | "dev": true
464 | },
465 | "read-pkg": {
466 | "version": "1.1.0",
467 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
468 | "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
469 | "requires": {
470 | "load-json-file": "1.1.0",
471 | "normalize-package-data": "2.4.0",
472 | "path-type": "1.1.0"
473 | }
474 | },
475 | "read-pkg-up": {
476 | "version": "1.0.1",
477 | "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
478 | "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
479 | "requires": {
480 | "find-up": "1.1.2",
481 | "read-pkg": "1.1.0"
482 | }
483 | },
484 | "require-directory": {
485 | "version": "2.1.1",
486 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
487 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
488 | },
489 | "require-from-string": {
490 | "version": "1.2.1",
491 | "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz",
492 | "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg="
493 | },
494 | "require-main-filename": {
495 | "version": "1.0.1",
496 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
497 | "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
498 | },
499 | "requires-port": {
500 | "version": "1.0.0",
501 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
502 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
503 | "dev": true
504 | },
505 | "rimraf": {
506 | "version": "2.6.2",
507 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
508 | "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
509 | "requires": {
510 | "glob": "7.1.2"
511 | }
512 | },
513 | "semver": {
514 | "version": "5.4.1",
515 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
516 | "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
517 | },
518 | "set-blocking": {
519 | "version": "2.0.0",
520 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
521 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
522 | },
523 | "solc": {
524 | "version": "0.4.18",
525 | "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.18.tgz",
526 | "integrity": "sha512-Kq+O3PNF9Pfq7fB+lDYAuoqRdghLmZyfngsg0h1Hj38NKAeVHeGPOGeZasn5KqdPeCzbMFvaGyTySxzGv6aXCg==",
527 | "requires": {
528 | "fs-extra": "0.30.0",
529 | "memorystream": "0.3.1",
530 | "require-from-string": "1.2.1",
531 | "semver": "5.4.1",
532 | "yargs": "4.8.1"
533 | }
534 | },
535 | "spdx-correct": {
536 | "version": "1.0.2",
537 | "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
538 | "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
539 | "requires": {
540 | "spdx-license-ids": "1.2.2"
541 | }
542 | },
543 | "spdx-expression-parse": {
544 | "version": "1.0.4",
545 | "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
546 | "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw="
547 | },
548 | "spdx-license-ids": {
549 | "version": "1.2.2",
550 | "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
551 | "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc="
552 | },
553 | "string-width": {
554 | "version": "1.0.2",
555 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
556 | "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
557 | "requires": {
558 | "code-point-at": "1.1.0",
559 | "is-fullwidth-code-point": "1.0.0",
560 | "strip-ansi": "3.0.1"
561 | }
562 | },
563 | "strip-ansi": {
564 | "version": "3.0.1",
565 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
566 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
567 | "requires": {
568 | "ansi-regex": "2.1.1"
569 | }
570 | },
571 | "strip-bom": {
572 | "version": "2.0.0",
573 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
574 | "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
575 | "requires": {
576 | "is-utf8": "0.2.1"
577 | }
578 | },
579 | "union": {
580 | "version": "0.4.6",
581 | "resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz",
582 | "integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=",
583 | "dev": true,
584 | "requires": {
585 | "qs": "2.3.3"
586 | }
587 | },
588 | "url-join": {
589 | "version": "1.1.0",
590 | "resolved": "https://registry.npmjs.org/url-join/-/url-join-1.1.0.tgz",
591 | "integrity": "sha1-dBxsL0WWxIMNZxhGCSDQySIC3Hg=",
592 | "dev": true
593 | },
594 | "utf8": {
595 | "version": "2.1.2",
596 | "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz",
597 | "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY="
598 | },
599 | "utils-extend": {
600 | "version": "1.0.8",
601 | "resolved": "https://registry.npmjs.org/utils-extend/-/utils-extend-1.0.8.tgz",
602 | "integrity": "sha1-zP17ZFQPjpDuIe7Fd2nQZRyril8="
603 | },
604 | "validate-npm-package-license": {
605 | "version": "3.0.1",
606 | "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
607 | "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
608 | "requires": {
609 | "spdx-correct": "1.0.2",
610 | "spdx-expression-parse": "1.0.4"
611 | }
612 | },
613 | "web3": {
614 | "version": "0.20.2",
615 | "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.2.tgz",
616 | "integrity": "sha1-xU2sX8DjdzmcBMGm7LsS5FEyeNY=",
617 | "requires": {
618 | "bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
619 | "crypto-js": "3.1.8",
620 | "utf8": "2.1.2",
621 | "xhr2": "0.1.4",
622 | "xmlhttprequest": "1.8.0"
623 | }
624 | },
625 | "which-module": {
626 | "version": "1.0.0",
627 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
628 | "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8="
629 | },
630 | "window-size": {
631 | "version": "0.2.0",
632 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz",
633 | "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU="
634 | },
635 | "wordwrap": {
636 | "version": "0.0.3",
637 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
638 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
639 | "dev": true
640 | },
641 | "wrap-ansi": {
642 | "version": "2.1.0",
643 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
644 | "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
645 | "requires": {
646 | "string-width": "1.0.2",
647 | "strip-ansi": "3.0.1"
648 | }
649 | },
650 | "wrappy": {
651 | "version": "1.0.2",
652 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
653 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
654 | },
655 | "xhr2": {
656 | "version": "0.1.4",
657 | "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz",
658 | "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8="
659 | },
660 | "xmlhttprequest": {
661 | "version": "1.8.0",
662 | "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
663 | "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw="
664 | },
665 | "y18n": {
666 | "version": "3.2.1",
667 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
668 | "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
669 | },
670 | "yargs": {
671 | "version": "4.8.1",
672 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz",
673 | "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=",
674 | "requires": {
675 | "cliui": "3.2.0",
676 | "decamelize": "1.2.0",
677 | "get-caller-file": "1.0.2",
678 | "lodash.assign": "4.2.0",
679 | "os-locale": "1.4.0",
680 | "read-pkg-up": "1.0.1",
681 | "require-directory": "2.1.1",
682 | "require-main-filename": "1.0.1",
683 | "set-blocking": "2.0.0",
684 | "string-width": "1.0.2",
685 | "which-module": "1.0.0",
686 | "window-size": "0.2.0",
687 | "y18n": "3.2.1",
688 | "yargs-parser": "2.4.1"
689 | }
690 | },
691 | "yargs-parser": {
692 | "version": "2.4.1",
693 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz",
694 | "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=",
695 | "requires": {
696 | "camelcase": "3.0.0",
697 | "lodash.assign": "4.2.0"
698 | }
699 | }
700 | }
701 | }
702 |
--------------------------------------------------------------------------------
/voting-dap-ui/libs/material-light/material.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * material-design-lite - Material Design Components in CSS, JS and HTML
3 | * @version v1.3.0
4 | * @license Apache-2.0
5 | * @copyright 2015 Google, Inc.
6 | * @link https://github.com/google/material-design-lite
7 | */
8 | !function(){"use strict";function e(e,t){if(e){if(t.element_.classList.contains(t.CssClasses_.MDL_JS_RIPPLE_EFFECT)){var s=document.createElement("span");s.classList.add(t.CssClasses_.MDL_RIPPLE_CONTAINER),s.classList.add(t.CssClasses_.MDL_JS_RIPPLE_EFFECT);var i=document.createElement("span");i.classList.add(t.CssClasses_.MDL_RIPPLE),s.appendChild(i),e.appendChild(s)}e.addEventListener("click",function(s){if("#"===e.getAttribute("href").charAt(0)){s.preventDefault();var i=e.href.split("#")[1],n=t.element_.querySelector("#"+i);t.resetTabState_(),t.resetPanelState_(),e.classList.add(t.CssClasses_.ACTIVE_CLASS),n.classList.add(t.CssClasses_.ACTIVE_CLASS)}})}}function t(e,t,s,i){function n(){var n=e.href.split("#")[1],a=i.content_.querySelector("#"+n);i.resetTabState_(t),i.resetPanelState_(s),e.classList.add(i.CssClasses_.IS_ACTIVE),a.classList.add(i.CssClasses_.IS_ACTIVE)}if(i.tabBar_.classList.contains(i.CssClasses_.JS_RIPPLE_EFFECT)){var a=document.createElement("span");a.classList.add(i.CssClasses_.RIPPLE_CONTAINER),a.classList.add(i.CssClasses_.JS_RIPPLE_EFFECT);var l=document.createElement("span");l.classList.add(i.CssClasses_.RIPPLE),a.appendChild(l),e.appendChild(a)}i.tabBar_.classList.contains(i.CssClasses_.TAB_MANUAL_SWITCH)||e.addEventListener("click",function(t){"#"===e.getAttribute("href").charAt(0)&&(t.preventDefault(),n())}),e.show=n}var s={upgradeDom:function(e,t){},upgradeElement:function(e,t){},upgradeElements:function(e){},upgradeAllRegistered:function(){},registerUpgradedCallback:function(e,t){},register:function(e){},downgradeElements:function(e){}};s=function(){function e(e,t){for(var s=0;s0&&l(t.children))}function o(t){var s="undefined"==typeof t.widget&&"undefined"==typeof t.widget,i=!0;s||(i=t.widget||t.widget);var n={classConstructor:t.constructor||t.constructor,className:t.classAsString||t.classAsString,cssClass:t.cssClass||t.cssClass,widget:i,callbacks:[]};if(c.forEach(function(e){if(e.cssClass===n.cssClass)throw new Error("The provided cssClass has already been registered: "+e.cssClass);if(e.className===n.className)throw new Error("The provided className has already been registered")}),t.constructor.prototype.hasOwnProperty(C))throw new Error("MDL component classes must not have "+C+" defined as a property.");var a=e(t.classAsString,n);a||c.push(n)}function r(t,s){var i=e(t);i&&i.callbacks.push(s)}function _(){for(var e=0;e0&&this.container_.classList.contains(this.CssClasses_.IS_VISIBLE)&&(e.keyCode===this.Keycodes_.UP_ARROW?(e.preventDefault(),t[t.length-1].focus()):e.keyCode===this.Keycodes_.DOWN_ARROW&&(e.preventDefault(),t[0].focus()))}},d.prototype.handleItemKeyboardEvent_=function(e){if(this.element_&&this.container_){var t=this.element_.querySelectorAll("."+this.CssClasses_.ITEM+":not([disabled])");if(t&&t.length>0&&this.container_.classList.contains(this.CssClasses_.IS_VISIBLE)){var s=Array.prototype.slice.call(t).indexOf(e.target);if(e.keyCode===this.Keycodes_.UP_ARROW)e.preventDefault(),s>0?t[s-1].focus():t[t.length-1].focus();else if(e.keyCode===this.Keycodes_.DOWN_ARROW)e.preventDefault(),t.length>s+1?t[s+1].focus():t[0].focus();else if(e.keyCode===this.Keycodes_.SPACE||e.keyCode===this.Keycodes_.ENTER){e.preventDefault();var i=new MouseEvent("mousedown");e.target.dispatchEvent(i),i=new MouseEvent("mouseup"),e.target.dispatchEvent(i),e.target.click()}else e.keyCode===this.Keycodes_.ESCAPE&&(e.preventDefault(),this.hide())}}},d.prototype.handleItemClick_=function(e){e.target.hasAttribute("disabled")?e.stopPropagation():(this.closing_=!0,window.setTimeout(function(e){this.hide(),this.closing_=!1}.bind(this),this.Constant_.CLOSE_TIMEOUT))},d.prototype.applyClip_=function(e,t){this.element_.classList.contains(this.CssClasses_.UNALIGNED)?this.element_.style.clip="":this.element_.classList.contains(this.CssClasses_.BOTTOM_RIGHT)?this.element_.style.clip="rect(0 "+t+"px 0 "+t+"px)":this.element_.classList.contains(this.CssClasses_.TOP_LEFT)?this.element_.style.clip="rect("+e+"px 0 "+e+"px 0)":this.element_.classList.contains(this.CssClasses_.TOP_RIGHT)?this.element_.style.clip="rect("+e+"px "+t+"px "+e+"px "+t+"px)":this.element_.style.clip=""},d.prototype.removeAnimationEndListener_=function(e){e.target.classList.remove(d.prototype.CssClasses_.IS_ANIMATING)},d.prototype.addAnimationEndListener_=function(){this.element_.addEventListener("transitionend",this.removeAnimationEndListener_),this.element_.addEventListener("webkitTransitionEnd",this.removeAnimationEndListener_)},d.prototype.show=function(e){if(this.element_&&this.container_&&this.outline_){var t=this.element_.getBoundingClientRect().height,s=this.element_.getBoundingClientRect().width;this.container_.style.width=s+"px",this.container_.style.height=t+"px",this.outline_.style.width=s+"px",this.outline_.style.height=t+"px";for(var i=this.Constant_.TRANSITION_DURATION_SECONDS*this.Constant_.TRANSITION_DURATION_FRACTION,n=this.element_.querySelectorAll("."+this.CssClasses_.ITEM),a=0;a0&&this.showSnackbar(this.queuedNotifications_.shift())},C.prototype.cleanup_=function(){this.element_.classList.remove(this.cssClasses_.ACTIVE),setTimeout(function(){this.element_.setAttribute("aria-hidden","true"),this.textElement_.textContent="",Boolean(this.actionElement_.getAttribute("aria-hidden"))||(this.setActionHidden_(!0),this.actionElement_.textContent="",this.actionElement_.removeEventListener("click",this.actionHandler_)),this.actionHandler_=void 0,this.message_=void 0,this.actionText_=void 0,this.active=!1,this.checkQueue_()}.bind(this),this.Constant_.ANIMATION_LENGTH)},C.prototype.setActionHidden_=function(e){e?this.actionElement_.setAttribute("aria-hidden","true"):this.actionElement_.removeAttribute("aria-hidden")},s.register({constructor:C,classAsString:"MaterialSnackbar",cssClass:"mdl-js-snackbar",widget:!0});var u=function(e){this.element_=e,this.init()};window.MaterialSpinner=u,u.prototype.Constant_={MDL_SPINNER_LAYER_COUNT:4},u.prototype.CssClasses_={MDL_SPINNER_LAYER:"mdl-spinner__layer",MDL_SPINNER_CIRCLE_CLIPPER:"mdl-spinner__circle-clipper",MDL_SPINNER_CIRCLE:"mdl-spinner__circle",MDL_SPINNER_GAP_PATCH:"mdl-spinner__gap-patch",MDL_SPINNER_LEFT:"mdl-spinner__left",MDL_SPINNER_RIGHT:"mdl-spinner__right"},u.prototype.createLayer=function(e){var t=document.createElement("div");t.classList.add(this.CssClasses_.MDL_SPINNER_LAYER),t.classList.add(this.CssClasses_.MDL_SPINNER_LAYER+"-"+e);var s=document.createElement("div");s.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER),s.classList.add(this.CssClasses_.MDL_SPINNER_LEFT);var i=document.createElement("div");i.classList.add(this.CssClasses_.MDL_SPINNER_GAP_PATCH);var n=document.createElement("div");n.classList.add(this.CssClasses_.MDL_SPINNER_CIRCLE_CLIPPER),n.classList.add(this.CssClasses_.MDL_SPINNER_RIGHT);for(var a=[s,i,n],l=0;l=this.maxRows&&e.preventDefault()},L.prototype.onFocus_=function(e){this.element_.classList.add(this.CssClasses_.IS_FOCUSED)},L.prototype.onBlur_=function(e){this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},L.prototype.onReset_=function(e){this.updateClasses_()},L.prototype.updateClasses_=function(){this.checkDisabled(),this.checkValidity(),this.checkDirty(),this.checkFocus()},L.prototype.checkDisabled=function(){this.input_.disabled?this.element_.classList.add(this.CssClasses_.IS_DISABLED):this.element_.classList.remove(this.CssClasses_.IS_DISABLED)},L.prototype.checkDisabled=L.prototype.checkDisabled,L.prototype.checkFocus=function(){Boolean(this.element_.querySelector(":focus"))?this.element_.classList.add(this.CssClasses_.IS_FOCUSED):this.element_.classList.remove(this.CssClasses_.IS_FOCUSED)},L.prototype.checkFocus=L.prototype.checkFocus,L.prototype.checkValidity=function(){this.input_.validity&&(this.input_.validity.valid?this.element_.classList.remove(this.CssClasses_.IS_INVALID):this.element_.classList.add(this.CssClasses_.IS_INVALID))},L.prototype.checkValidity=L.prototype.checkValidity,L.prototype.checkDirty=function(){this.input_.value&&this.input_.value.length>0?this.element_.classList.add(this.CssClasses_.IS_DIRTY):this.element_.classList.remove(this.CssClasses_.IS_DIRTY)},L.prototype.checkDirty=L.prototype.checkDirty,L.prototype.disable=function(){this.input_.disabled=!0,this.updateClasses_()},L.prototype.disable=L.prototype.disable,L.prototype.enable=function(){this.input_.disabled=!1,this.updateClasses_()},L.prototype.enable=L.prototype.enable,L.prototype.change=function(e){this.input_.value=e||"",this.updateClasses_()},L.prototype.change=L.prototype.change,L.prototype.init=function(){if(this.element_&&(this.label_=this.element_.querySelector("."+this.CssClasses_.LABEL),this.input_=this.element_.querySelector("."+this.CssClasses_.INPUT),this.input_)){this.input_.hasAttribute(this.Constant_.MAX_ROWS_ATTRIBUTE)&&(this.maxRows=parseInt(this.input_.getAttribute(this.Constant_.MAX_ROWS_ATTRIBUTE),10),isNaN(this.maxRows)&&(this.maxRows=this.Constant_.NO_MAX_ROWS)),this.input_.hasAttribute("placeholder")&&this.element_.classList.add(this.CssClasses_.HAS_PLACEHOLDER),this.boundUpdateClassesHandler=this.updateClasses_.bind(this),this.boundFocusHandler=this.onFocus_.bind(this),this.boundBlurHandler=this.onBlur_.bind(this),this.boundResetHandler=this.onReset_.bind(this),this.input_.addEventListener("input",this.boundUpdateClassesHandler),this.input_.addEventListener("focus",this.boundFocusHandler),this.input_.addEventListener("blur",this.boundBlurHandler),this.input_.addEventListener("reset",this.boundResetHandler),this.maxRows!==this.Constant_.NO_MAX_ROWS&&(this.boundKeyDownHandler=this.onKeyDown_.bind(this),this.input_.addEventListener("keydown",this.boundKeyDownHandler));var e=this.element_.classList.contains(this.CssClasses_.IS_INVALID);this.updateClasses_(),this.element_.classList.add(this.CssClasses_.IS_UPGRADED),e&&this.element_.classList.add(this.CssClasses_.IS_INVALID),this.input_.hasAttribute("autofocus")&&(this.element_.focus(),this.checkFocus())}},s.register({constructor:L,classAsString:"MaterialTextfield",cssClass:"mdl-js-textfield",widget:!0});var I=function(e){this.element_=e,this.init()};window.MaterialTooltip=I,I.prototype.Constant_={},I.prototype.CssClasses_={IS_ACTIVE:"is-active",BOTTOM:"mdl-tooltip--bottom",LEFT:"mdl-tooltip--left",RIGHT:"mdl-tooltip--right",TOP:"mdl-tooltip--top"},I.prototype.handleMouseEnter_=function(e){var t=e.target.getBoundingClientRect(),s=t.left+t.width/2,i=t.top+t.height/2,n=-1*(this.element_.offsetWidth/2),a=-1*(this.element_.offsetHeight/2);this.element_.classList.contains(this.CssClasses_.LEFT)||this.element_.classList.contains(this.CssClasses_.RIGHT)?(s=t.width/2,i+a<0?(this.element_.style.top="0",this.element_.style.marginTop="0"):(this.element_.style.top=i+"px",this.element_.style.marginTop=a+"px")):s+n<0?(this.element_.style.left="0",this.element_.style.marginLeft="0"):(this.element_.style.left=s+"px",this.element_.style.marginLeft=n+"px"),this.element_.classList.contains(this.CssClasses_.TOP)?this.element_.style.top=t.top-this.element_.offsetHeight-10+"px":this.element_.classList.contains(this.CssClasses_.RIGHT)?this.element_.style.left=t.left+t.width+10+"px":this.element_.classList.contains(this.CssClasses_.LEFT)?this.element_.style.left=t.left-this.element_.offsetWidth-10+"px":this.element_.style.top=t.top+t.height+10+"px",this.element_.classList.add(this.CssClasses_.IS_ACTIVE)},I.prototype.hideTooltip_=function(){this.element_.classList.remove(this.CssClasses_.IS_ACTIVE)},I.prototype.init=function(){if(this.element_){var e=this.element_.getAttribute("for")||this.element_.getAttribute("data-mdl-for");e&&(this.forElement_=document.getElementById(e)),this.forElement_&&(this.forElement_.hasAttribute("tabindex")||this.forElement_.setAttribute("tabindex","0"),this.boundMouseEnterHandler=this.handleMouseEnter_.bind(this),this.boundMouseLeaveAndScrollHandler=this.hideTooltip_.bind(this),this.forElement_.addEventListener("mouseenter",this.boundMouseEnterHandler,!1),this.forElement_.addEventListener("touchend",this.boundMouseEnterHandler,!1),this.forElement_.addEventListener("mouseleave",this.boundMouseLeaveAndScrollHandler,!1),window.addEventListener("scroll",this.boundMouseLeaveAndScrollHandler,!0),window.addEventListener("touchstart",this.boundMouseLeaveAndScrollHandler))}},s.register({constructor:I,classAsString:"MaterialTooltip",cssClass:"mdl-tooltip"});var f=function(e){this.element_=e,this.init()};window.MaterialLayout=f,f.prototype.Constant_={MAX_WIDTH:"(max-width: 1024px)",TAB_SCROLL_PIXELS:100,RESIZE_TIMEOUT:100,MENU_ICON:"",CHEVRON_LEFT:"chevron_left",CHEVRON_RIGHT:"chevron_right"},f.prototype.Keycodes_={ENTER:13,ESCAPE:27,SPACE:32},f.prototype.Mode_={STANDARD:0,SEAMED:1,WATERFALL:2,SCROLL:3},f.prototype.CssClasses_={CONTAINER:"mdl-layout__container",HEADER:"mdl-layout__header",DRAWER:"mdl-layout__drawer",CONTENT:"mdl-layout__content",DRAWER_BTN:"mdl-layout__drawer-button",ICON:"material-icons",JS_RIPPLE_EFFECT:"mdl-js-ripple-effect",RIPPLE_CONTAINER:"mdl-layout__tab-ripple-container",RIPPLE:"mdl-ripple",RIPPLE_IGNORE_EVENTS:"mdl-js-ripple-effect--ignore-events",HEADER_SEAMED:"mdl-layout__header--seamed",HEADER_WATERFALL:"mdl-layout__header--waterfall",HEADER_SCROLL:"mdl-layout__header--scroll",FIXED_HEADER:"mdl-layout--fixed-header",OBFUSCATOR:"mdl-layout__obfuscator",TAB_BAR:"mdl-layout__tab-bar",TAB_CONTAINER:"mdl-layout__tab-bar-container",TAB:"mdl-layout__tab",TAB_BAR_BUTTON:"mdl-layout__tab-bar-button",TAB_BAR_LEFT_BUTTON:"mdl-layout__tab-bar-left-button",TAB_BAR_RIGHT_BUTTON:"mdl-layout__tab-bar-right-button",TAB_MANUAL_SWITCH:"mdl-layout__tab-manual-switch",PANEL:"mdl-layout__tab-panel",HAS_DRAWER:"has-drawer",HAS_TABS:"has-tabs",HAS_SCROLLING_HEADER:"has-scrolling-header",CASTING_SHADOW:"is-casting-shadow",IS_COMPACT:"is-compact",IS_SMALL_SCREEN:"is-small-screen",IS_DRAWER_OPEN:"is-visible",IS_ACTIVE:"is-active",IS_UPGRADED:"is-upgraded",IS_ANIMATING:"is-animating",ON_LARGE_SCREEN:"mdl-layout--large-screen-only",ON_SMALL_SCREEN:"mdl-layout--small-screen-only"},f.prototype.contentScrollHandler_=function(){if(!this.header_.classList.contains(this.CssClasses_.IS_ANIMATING)){var e=!this.element_.classList.contains(this.CssClasses_.IS_SMALL_SCREEN)||this.element_.classList.contains(this.CssClasses_.FIXED_HEADER);this.content_.scrollTop>0&&!this.header_.classList.contains(this.CssClasses_.IS_COMPACT)?(this.header_.classList.add(this.CssClasses_.CASTING_SHADOW),this.header_.classList.add(this.CssClasses_.IS_COMPACT),e&&this.header_.classList.add(this.CssClasses_.IS_ANIMATING)):this.content_.scrollTop<=0&&this.header_.classList.contains(this.CssClasses_.IS_COMPACT)&&(this.header_.classList.remove(this.CssClasses_.CASTING_SHADOW),this.header_.classList.remove(this.CssClasses_.IS_COMPACT),e&&this.header_.classList.add(this.CssClasses_.IS_ANIMATING))}},f.prototype.keyboardEventHandler_=function(e){e.keyCode===this.Keycodes_.ESCAPE&&this.drawer_.classList.contains(this.CssClasses_.IS_DRAWER_OPEN)&&this.toggleDrawer()},f.prototype.screenSizeHandler_=function(){this.screenSizeMediaQuery_.matches?this.element_.classList.add(this.CssClasses_.IS_SMALL_SCREEN):(this.element_.classList.remove(this.CssClasses_.IS_SMALL_SCREEN),this.drawer_&&(this.drawer_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN),this.obfuscator_.classList.remove(this.CssClasses_.IS_DRAWER_OPEN)))},f.prototype.drawerToggleHandler_=function(e){if(e&&"keydown"===e.type){if(e.keyCode!==this.Keycodes_.SPACE&&e.keyCode!==this.Keycodes_.ENTER)return;e.preventDefault()}this.toggleDrawer()},f.prototype.headerTransitionEndHandler_=function(){this.header_.classList.remove(this.CssClasses_.IS_ANIMATING)},f.prototype.headerClickHandler_=function(){this.header_.classList.contains(this.CssClasses_.IS_COMPACT)&&(this.header_.classList.remove(this.CssClasses_.IS_COMPACT),this.header_.classList.add(this.CssClasses_.IS_ANIMATING))},f.prototype.resetTabState_=function(e){for(var t=0;t0?c.classList.add(this.CssClasses_.IS_ACTIVE):c.classList.remove(this.CssClasses_.IS_ACTIVE),this.tabBar_.scrollLeft0)return;this.setFrameCount(1);var i,n,a=e.currentTarget.getBoundingClientRect();if(0===e.clientX&&0===e.clientY)i=Math.round(a.width/2),n=Math.round(a.height/2);else{var l=void 0!==e.clientX?e.clientX:e.touches[0].clientX,o=void 0!==e.clientY?e.clientY:e.touches[0].clientY;i=Math.round(l-a.left),n=Math.round(o-a.top)}this.setRippleXY(i,n),this.setRippleStyles(!0),window.requestAnimationFrame(this.animFrameHandler.bind(this))}},S.prototype.upHandler_=function(e){e&&2!==e.detail&&window.setTimeout(function(){this.rippleElement_.classList.remove(this.CssClasses_.IS_VISIBLE)}.bind(this),0)},S.prototype.init=function(){if(this.element_){var e=this.element_.classList.contains(this.CssClasses_.RIPPLE_CENTER);this.element_.classList.contains(this.CssClasses_.RIPPLE_EFFECT_IGNORE_EVENTS)||(this.rippleElement_=this.element_.querySelector("."+this.CssClasses_.RIPPLE),this.frameCount_=0,this.rippleSize_=0,this.x_=0,this.y_=0,this.ignoringMouseDown_=!1,this.boundDownHandler=this.downHandler_.bind(this),this.element_.addEventListener("mousedown",this.boundDownHandler),this.element_.addEventListener("touchstart",this.boundDownHandler),this.boundUpHandler=this.upHandler_.bind(this),this.element_.addEventListener("mouseup",this.boundUpHandler),this.element_.addEventListener("mouseleave",this.boundUpHandler),this.element_.addEventListener("touchend",this.boundUpHandler),this.element_.addEventListener("blur",this.boundUpHandler),this.getFrameCount=function(){return this.frameCount_},this.setFrameCount=function(e){this.frameCount_=e},this.getRippleElement=function(){return this.rippleElement_},this.setRippleXY=function(e,t){this.x_=e,this.y_=t},this.setRippleStyles=function(t){if(null!==this.rippleElement_){var s,i,n,a="translate("+this.x_+"px, "+this.y_+"px)";t?(i=this.Constant_.INITIAL_SCALE,n=this.Constant_.INITIAL_SIZE):(i=this.Constant_.FINAL_SCALE,n=this.rippleSize_+"px",e&&(a="translate("+this.boundWidth/2+"px, "+this.boundHeight/2+"px)")),s="translate(-50%, -50%) "+a+i,this.rippleElement_.style.webkitTransform=s,this.rippleElement_.style.msTransform=s,this.rippleElement_.style.transform=s,t?this.rippleElement_.classList.remove(this.CssClasses_.IS_ANIMATING):this.rippleElement_.classList.add(this.CssClasses_.IS_ANIMATING)}},this.animFrameHandler=function(){this.frameCount_-- >0?window.requestAnimationFrame(this.animFrameHandler.bind(this)):this.setRippleStyles(!1)})}},s.register({constructor:S,classAsString:"MaterialRipple",cssClass:"mdl-js-ripple-effect",widget:!1})}();
10 | //# sourceMappingURL=material.min.js.map
11 |
--------------------------------------------------------------------------------