├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── check.html ├── contract.html ├── contractOffline.html ├── css ├── base.css ├── codemirror.css └── ui-block.css ├── img ├── background.png ├── logo-b.png ├── logo.png └── prompt.png ├── index.html ├── js ├── 1-localSave.js ├── home.v1.js ├── i18n.js └── ui-block.js ├── lib ├── Blob.js ├── FileSaver.min.js ├── blockies.min.js ├── bootbox.min.js ├── bootstrap-4.0.0-dist │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map ├── codemirror │ ├── codemirror.js │ └── javascript.js ├── jquery-3.3.1.min.js ├── jquery.base64.js ├── jquery.qrcode.min.js ├── js-beautify-1.7.5 │ └── beautify.js ├── nebulas.js └── prismjs-1.13.0 │ ├── prism.css │ └── prism.js ├── sendNas.html ├── sendOffline.html ├── server.js ├── signOffline.html └── viewWalletInfo.html /.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # don't touch end of line 3 | * -text 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | node_modules/ 4 | /dist/ 5 | npm-debug.log* 6 | yarn-debug.log* 7 | yarn-error.log* 8 | 9 | # Editor directories and files 10 | .idea 11 | .vscode 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # web-wallet 3 | 4 | How to use the Web Wallet 5 | Part 1 - [Create a NAS Wallet](https://medium.com/nebulasio/creating-a-nas-wallet-9d01b5fa2df6) 6 | Part 2 - [Sending NAS and ATP from your Wallet](https://medium.com/nebulasio/sending-nas-from-your-wallet-be1b958c4e5d) 7 | Part 3 - [Signing a Transaction Offline](https://medium.com/nebulasio/signing-a-transaction-offline-ae8278f45201) 8 | Part 4 - [View Wallet Information](https://medium.com/nebulasio/view-wallet-information-fcea3ea35d94) 9 | Part 5 - [Check TX Status](https://medium.com/nebulasio/check-tx-status-8dc7dd9b79de) 10 | Part 6 - [Deploy a Smart Contract](https://medium.com/nebulasio/deploy-a-smart-contract-1e781e13c22e) 11 | Part 7 - [Call a Smart Contract on Nebulas](https://medium.com/@ottokafka/call-a-smart-contract-on-nebulas-3522038aec18) 12 | 13 | Nebulas wallet for the web. Nebulas users can use it to send transactions and submit smart contracts. 14 | 15 | Nebulas already has a JavaScript library [neb.js](https://github.com/nebulasio/neb.js) that implements address generation, transaction signing, and submission. Web-wallet implemented using this library. 16 | 17 | ### Feature list 18 | 19 | - generate nebulas address/keystore; 20 | - send transaction (support NAS,NAX,ATP,NAT); 21 | - send offline transaction; 22 | - view address/keystore info; 23 | - view transaction status & info; 24 | - deploy/call smart contract; 25 | - choose nebulas network(Mainnet, Testnet etc.). 26 | 27 | ### TODO list 28 | - Multiple wallet address import methods. 29 | 30 | 31 | Thanks to @luoman for implementing a pre-version [naswallet](https://github.com/nebulasio/explorer/tree/master/nasWallet) for us. 32 | 33 | ## Contribution 34 | 35 | We are very glad that you are considering to help Nebulas Team, including but not limited to source code, documents or others. 36 | 37 | If you'd like to contribute, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our [slack channel](http://nebulasio.herokuapp.com) to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple. 38 | 39 | Please refer to our [contribution guideline](https://github.com/nebulasio/wiki/blob/master/contribute.md) for more information. 40 | 41 | Thanks. 42 | 43 | ## License 44 | 45 | The go-nebulas project is licensed under the [GNU Lesser General Public License Version 3.0 (“LGPL v3”)](https://www.gnu.org/licenses/lgpl-3.0.en.html). 46 | 47 | For the more information about licensing, please refer to [Licensing](https://github.com/nebulasio/wiki/blob/master/licensing.md) page. 48 | 49 | -------------------------------------------------------------------------------- /check.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 50 | NEBULAS 51 | 52 | 53 | 54 |
55 |
56 | 57 |
58 |
59 |
60 |

Check TX Status

61 |

62 |
63 |
64 | 65 | 66 |
67 | Please enter a valid TX hash 68 |
69 |
70 | 71 |
72 |

Transaction Details

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 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 111 | 112 | 113 | 114 | 117 | 118 | 119 | 120 | 123 | 124 | 125 | 126 | 129 | 130 | 131 |
TX Hash
Contract address
TxReceipt Status
From Address
To Address
Amount 99 |
100 |
Nonce
Gas Price 109 |
110 |
Gas Limit 115 |
116 |
Gas Used 121 |
122 |
Data 127 | 128 |
132 |
133 | 134 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 224 | 225 | 226 | -------------------------------------------------------------------------------- /contractOffline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | NEBULAS 22 | 23 | 24 | 25 |
26 |
27 | 28 |
29 |
30 |

31 |
32 |
From Address
33 |
34 |
35 | 36 | 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 | 96 |
97 |
98 |
99 | 104 |
105 |
106 |
107 | 108 | 109 |
110 | 111 | 112 | 113 |
114 | 115 | 116 |
117 | 118 |
119 |
120 |
121 | 122 | 123 |
124 |
125 |
126 |
127 | 128 | 129 |
130 |
131 |
132 |
133 | 134 |
135 |

Step 3: Send / Publish Transaction (Online Computer)

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 | 200 | 201 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 474 | 475 | 476 | 477 | -------------------------------------------------------------------------------- /css/base.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | color: #333; 4 | line-height: 1.8; 5 | letter-spacing: 0.08rem; 6 | font-family: open sans, helvetica neue, helvetica, arial, sans-serif 7 | } 8 | 9 | a { 10 | color: #000 11 | } 12 | 13 | a:focus, 14 | a:visited { 15 | color: #333; 16 | text-decoration: none 17 | } 18 | 19 | a:active, 20 | a:hover { 21 | cursor: pointer; 22 | color: #333; 23 | text-decoration: none 24 | } 25 | 26 | ::selection { 27 | background-color: #333; 28 | color: #fff 29 | } 30 | 31 | ::-moz-selection { 32 | background-color: #333; 33 | color: #fff 34 | } 35 | 36 | ::-webkit-selection { 37 | background-color: #333; 38 | color: #fff 39 | } 40 | 41 | .btn { 42 | background-color: black; 43 | border-radius: 0; 44 | color: white; 45 | font-weight: 500; 46 | letter-spacing: 2px; 47 | margin: 1rem 0 .5rem 0; 48 | padding: 0.75rem 2.1875rem; 49 | } 50 | 51 | .btn.disabled:hover, 52 | .btn.disabled:active { 53 | cursor: default 54 | } 55 | 56 | .btn:disabled { 57 | cursor: default 58 | } 59 | 60 | .btn+.btn { 61 | margin-left: 1rem 62 | } 63 | 64 | @media (max-width: 767px) { 65 | .btn { 66 | white-space: normal 67 | } 68 | .btn+.btn { 69 | margin-left: 0 70 | } 71 | } 72 | 73 | a.btn-link { 74 | font-weight: 200; 75 | padding-bottom: 0.4rem 76 | } 77 | 78 | a.btn-link:focus, 79 | a.btn-link.focus, 80 | a.btn-link:visited, 81 | a.btn-link.visited, 82 | a.btn-link:active, 83 | a.btn-link.active { 84 | text-decoration: none 85 | } 86 | 87 | a.btn-link:hover { 88 | color: #000; 89 | border-bottom-color: #000; 90 | border-bottom: 1px solid; 91 | text-decoration: none; 92 | -webkit-transition: border .3s ease-in-out, color .3s ease-in-out; 93 | -moz-transition: border .3s ease-in-out, color .3s ease-in-out; 94 | -o-transition: border .3s ease-in-out, color .3s ease-in-out; 95 | transition: border 0.3s ease-in-out, color 0.3s ease-in-out 96 | } 97 | 98 | .form-control { 99 | background-color: #f5f5f5; 100 | border-radius: 3px; 101 | box-shadow: none; 102 | color: #565656; 103 | font-size: 0.875rem; 104 | line-height: 1.43; 105 | min-height: 3em; 106 | padding: 0.2em 1.07em 0.2em; 107 | border: 1px solid #e8e8e8 108 | } 109 | 110 | .form-control:focus { 111 | border: 1px solid #e8e8e8 112 | } 113 | 114 | .form-active .form-control:invalid { 115 | border-color: #f28281 116 | } 117 | 118 | .modal-backdrop.in { 119 | opacity: .8; 120 | } 121 | 122 | /* 123 | ============================================================ 124 | added since moved to https://github.com/nebulasio/web-wallet.git 125 | ============================================================ 126 | */ 127 | 128 | input.invalid, 129 | textarea.invalid { 130 | border-color: red; 131 | } 132 | 133 | input.validation-guard { 134 | border-color: #e8e8e8; 135 | } 136 | 137 | label > i { 138 | color: gray; 139 | font-size: small; 140 | } 141 | 142 | .mt14 { 143 | margin-top: 14px; 144 | } 145 | 146 | ::-webkit-scrollbar { 147 | display: none; 148 | } 149 | 150 | [data-i18n] { 151 | white-space: pre-line; 152 | } 153 | 154 | @media (max-width: 991px) { 155 | label > i { 156 | display: none; 157 | } 158 | } 159 | 160 | /* 161 | overrides bootstrap 162 | ============================================================ 163 | */ 164 | 165 | .btn-primary { 166 | border-color: black; 167 | } 168 | 169 | .dropdown-item.active, 170 | .dropdown-item:active { 171 | background-color: black; 172 | } 173 | 174 | /* 175 | overrides bootbox 176 | https://github.com/makeusabrew/bootbox/issues/566 177 | ============================================================ 178 | */ 179 | 180 | .bootbox .modal-header h4 { order: 0; } 181 | .bootbox .modal-header button { order: 1; } 182 | 183 | /* 184 | overrides base.css 185 | ============================================================ 186 | */ 187 | 188 | .bootbox .btn { 189 | line-height: 1; 190 | margin-bottom: 0; 191 | margin-top: 0; 192 | } 193 | -------------------------------------------------------------------------------- /css/codemirror.css: -------------------------------------------------------------------------------- 1 | /* BASICS */ 2 | 3 | .CodeMirror { 4 | /* Set height, width, borders, and global font properties here */ 5 | font-family: monospace; 6 | height: 300px; 7 | color: black; 8 | direction: ltr; 9 | } 10 | 11 | /* PADDING */ 12 | 13 | .CodeMirror-lines { 14 | padding: 4px 0; /* Vertical padding around content */ 15 | } 16 | .CodeMirror pre { 17 | padding: 0 4px; /* Horizontal padding of content */ 18 | } 19 | 20 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 21 | background-color: white; /* The little square between H and V scrollbars */ 22 | } 23 | 24 | /* GUTTER */ 25 | 26 | .CodeMirror-gutters { 27 | border-right: 1px solid #ddd; 28 | background-color: #f7f7f7; 29 | white-space: nowrap; 30 | } 31 | 32 | .CodeMirror-linenumber { 33 | padding: 0 3px 0 5px; 34 | min-width: 20px; 35 | text-align: right; 36 | color: #999; 37 | white-space: nowrap; 38 | } 39 | 40 | .CodeMirror-guttermarker { color: black; } 41 | .CodeMirror-guttermarker-subtle { color: #999; } 42 | 43 | /* CURSOR */ 44 | 45 | .CodeMirror-cursor { 46 | border-left: 1px solid black; 47 | border-right: none; 48 | width: 0; 49 | } 50 | /* Shown when moving in bi-directional text */ 51 | .CodeMirror div.CodeMirror-secondarycursor { 52 | border-left: 1px solid silver; 53 | } 54 | .cm-fat-cursor .CodeMirror-cursor { 55 | width: auto; 56 | border: 0 !important; 57 | background: #7e7; 58 | } 59 | .cm-fat-cursor div.CodeMirror-cursors { 60 | z-index: 1; 61 | } 62 | .cm-fat-cursor-mark { 63 | background-color: rgba(20, 255, 20, 0.5); 64 | -webkit-animation: blink 1.06s steps(1) infinite; 65 | -moz-animation: blink 1.06s steps(1) infinite; 66 | animation: blink 1.06s steps(1) infinite; 67 | } 68 | .cm-animate-fat-cursor { 69 | width: auto; 70 | border: 0; 71 | -webkit-animation: blink 1.06s steps(1) infinite; 72 | -moz-animation: blink 1.06s steps(1) infinite; 73 | animation: blink 1.06s steps(1) infinite; 74 | background-color: #7e7; 75 | } 76 | @-moz-keyframes blink { 77 | 0% {} 78 | 50% { background-color: transparent; } 79 | 100% {} 80 | } 81 | @-webkit-keyframes blink { 82 | 0% {} 83 | 50% { background-color: transparent; } 84 | 100% {} 85 | } 86 | @keyframes blink { 87 | 0% {} 88 | 50% { background-color: transparent; } 89 | 100% {} 90 | } 91 | 92 | /* Can style cursor different in overwrite (non-insert) mode */ 93 | 94 | .cm-tab { display: inline-block; text-decoration: inherit; } 95 | 96 | .CodeMirror-rulers { 97 | position: absolute; 98 | left: 0; right: 0; top: -50px; bottom: -20px; 99 | overflow: hidden; 100 | } 101 | .CodeMirror-ruler { 102 | border-left: 1px solid #ccc; 103 | top: 0; bottom: 0; 104 | position: absolute; 105 | } 106 | 107 | /* DEFAULT THEME */ 108 | 109 | .cm-s-default .cm-header {color: blue;} 110 | .cm-s-default .cm-quote {color: #090;} 111 | .cm-negative {color: #d44;} 112 | .cm-positive {color: #292;} 113 | .cm-header, .cm-strong {font-weight: bold;} 114 | .cm-em {font-style: italic;} 115 | .cm-link {text-decoration: underline;} 116 | .cm-strikethrough {text-decoration: line-through;} 117 | 118 | .cm-s-default .cm-keyword {color: #708;} 119 | .cm-s-default .cm-atom {color: #219;} 120 | .cm-s-default .cm-number {color: #164;} 121 | .cm-s-default .cm-def {color: #00f;} 122 | .cm-s-default .cm-variable-2 {color: #05a;} 123 | .cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} 124 | .cm-s-default .cm-comment {color: #a50;} 125 | .cm-s-default .cm-string {color: #a11;} 126 | .cm-s-default .cm-string-2 {color: #f50;} 127 | .cm-s-default .cm-meta {color: #555;} 128 | .cm-s-default .cm-qualifier {color: #555;} 129 | .cm-s-default .cm-builtin {color: #30a;} 130 | .cm-s-default .cm-bracket {color: #997;} 131 | .cm-s-default .cm-tag {color: #170;} 132 | .cm-s-default .cm-attribute {color: #00c;} 133 | .cm-s-default .cm-hr {color: #999;} 134 | .cm-s-default .cm-link {color: #00c;} 135 | 136 | .cm-s-default .cm-error {color: #f00;} 137 | .cm-invalidchar {color: #f00;} 138 | 139 | .CodeMirror-composing { border-bottom: 2px solid; } 140 | 141 | /* Default styles for common addons */ 142 | 143 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} 144 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} 145 | .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } 146 | .CodeMirror-activeline-background {background: #e8f2ff;} 147 | 148 | /* STOP */ 149 | 150 | /* The rest of this file contains styles related to the mechanics of 151 | the editor. You probably shouldn't touch them. */ 152 | 153 | .CodeMirror { 154 | position: relative; 155 | overflow: hidden; 156 | background: white; 157 | } 158 | 159 | .CodeMirror-scroll { 160 | overflow: scroll !important; /* Things will break if this is overridden */ 161 | /* 30px is the magic margin used to hide the element's real scrollbars */ 162 | /* See overflow: hidden in .CodeMirror */ 163 | margin-bottom: -30px; margin-right: -30px; 164 | padding-bottom: 30px; 165 | height: 100%; 166 | outline: none; /* Prevent dragging from highlighting the element */ 167 | position: relative; 168 | } 169 | .CodeMirror-sizer { 170 | position: relative; 171 | border-right: 30px solid transparent; 172 | } 173 | 174 | /* The fake, visible scrollbars. Used to force redraw during scrolling 175 | before actual scrolling happens, thus preventing shaking and 176 | flickering artifacts. */ 177 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { 178 | position: absolute; 179 | z-index: 6; 180 | display: none; 181 | } 182 | .CodeMirror-vscrollbar { 183 | right: 0; top: 0; 184 | overflow-x: hidden; 185 | overflow-y: scroll; 186 | } 187 | .CodeMirror-hscrollbar { 188 | bottom: 0; left: 0; 189 | overflow-y: hidden; 190 | overflow-x: scroll; 191 | } 192 | .CodeMirror-scrollbar-filler { 193 | right: 0; bottom: 0; 194 | } 195 | .CodeMirror-gutter-filler { 196 | left: 0; bottom: 0; 197 | } 198 | 199 | .CodeMirror-gutters { 200 | position: absolute; left: 0; top: 0; 201 | min-height: 100%; 202 | z-index: 3; 203 | } 204 | .CodeMirror-gutter { 205 | white-space: normal; 206 | height: 100%; 207 | display: inline-block; 208 | vertical-align: top; 209 | margin-bottom: -30px; 210 | } 211 | .CodeMirror-gutter-wrapper { 212 | position: absolute; 213 | z-index: 4; 214 | background: none !important; 215 | border: none !important; 216 | } 217 | .CodeMirror-gutter-background { 218 | position: absolute; 219 | top: 0; bottom: 0; 220 | z-index: 4; 221 | } 222 | .CodeMirror-gutter-elt { 223 | position: absolute; 224 | cursor: default; 225 | z-index: 4; 226 | } 227 | .CodeMirror-gutter-wrapper ::selection { background-color: transparent } 228 | .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } 229 | 230 | .CodeMirror-lines { 231 | cursor: text; 232 | min-height: 1px; /* prevents collapsing before first draw */ 233 | } 234 | .CodeMirror pre { 235 | /* Reset some styles that the rest of the page might have set */ 236 | -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; 237 | border-width: 0; 238 | background: transparent; 239 | font-family: inherit; 240 | font-size: inherit; 241 | margin: 0; 242 | white-space: pre; 243 | word-wrap: normal; 244 | line-height: inherit; 245 | color: inherit; 246 | z-index: 2; 247 | position: relative; 248 | overflow: visible; 249 | -webkit-tap-highlight-color: transparent; 250 | -webkit-font-variant-ligatures: contextual; 251 | font-variant-ligatures: contextual; 252 | } 253 | .CodeMirror-wrap pre { 254 | word-wrap: break-word; 255 | white-space: pre-wrap; 256 | word-break: normal; 257 | } 258 | 259 | .CodeMirror-linebackground { 260 | position: absolute; 261 | left: 0; right: 0; top: 0; bottom: 0; 262 | z-index: 0; 263 | } 264 | 265 | .CodeMirror-linewidget { 266 | position: relative; 267 | z-index: 2; 268 | padding: 0.1px; /* Force widget margins to stay inside of the container */ 269 | } 270 | 271 | 272 | .CodeMirror-rtl pre { direction: rtl; } 273 | 274 | .CodeMirror-code { 275 | outline: none; 276 | } 277 | 278 | /* Force content-box sizing for the elements where we expect it */ 279 | .CodeMirror-scroll, 280 | .CodeMirror-sizer, 281 | .CodeMirror-gutter, 282 | .CodeMirror-gutters, 283 | .CodeMirror-linenumber { 284 | -moz-box-sizing: content-box; 285 | box-sizing: content-box; 286 | } 287 | 288 | .CodeMirror-measure { 289 | position: absolute; 290 | width: 100%; 291 | height: 0; 292 | overflow: hidden; 293 | visibility: hidden; 294 | } 295 | 296 | .CodeMirror-cursor { 297 | position: absolute; 298 | pointer-events: none; 299 | } 300 | .CodeMirror-measure pre { position: static; } 301 | 302 | div.CodeMirror-cursors { 303 | visibility: hidden; 304 | position: relative; 305 | z-index: 3; 306 | } 307 | div.CodeMirror-dragcursors { 308 | visibility: visible; 309 | } 310 | 311 | .CodeMirror-focused div.CodeMirror-cursors { 312 | visibility: visible; 313 | } 314 | 315 | .CodeMirror-selected { background: #d9d9d9; } 316 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } 317 | .CodeMirror-crosshair { cursor: crosshair; } 318 | .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } 319 | .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } 320 | 321 | .cm-searching { 322 | background-color: #ffa; 323 | background-color: rgba(255, 255, 0, .4); 324 | } 325 | 326 | /* Used to force a border model for a node */ 327 | .cm-force-border { padding-right: .1px; } 328 | 329 | @media print { 330 | /* Hide the cursor when printing */ 331 | .CodeMirror div.CodeMirror-cursors { 332 | visibility: hidden; 333 | } 334 | } 335 | 336 | /* See issue #2901 */ 337 | .cm-tab-wrap-hack:after { content: ''; } 338 | 339 | /* Help users use markselection to safely style text background */ 340 | span.CodeMirror-selectedtext { background: none; } 341 | -------------------------------------------------------------------------------- /css/ui-block.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | .footer 4 | ============================================================ 5 | */ 6 | 7 | body { 8 | display: flex; 9 | flex-direction: column; 10 | min-height: 100vh; 11 | } 12 | 13 | .footer { 14 | font-size: .8rem; 15 | font-weight: 200; 16 | padding-bottom: 20px; 17 | padding-top: 20px; 18 | margin-top: auto; 19 | } 20 | 21 | .footer .copyright { 22 | color: #b2b2b2; 23 | } 24 | 25 | .footer nav { 26 | margin: 5px 0; 27 | } 28 | 29 | .footer a { 30 | border-bottom: 1px solid transparent; 31 | margin: 0 7px; 32 | padding-bottom: 3px; 33 | } 34 | 35 | .footer a:hover { 36 | border-color: #333; 37 | transition: border-color .3s; 38 | } 39 | 40 | .footer .logo { 41 | background: url(../img/logo-b.png) center / contain no-repeat; 42 | height: 1.8rem; 43 | } 44 | 45 | /* 46 | .header 47 | ============================================================ 48 | */ 49 | 50 | .header > div { 51 | display: flex; 52 | justify-content: space-between; 53 | } 54 | 55 | .header > div > a { 56 | margin: 0 10px; 57 | overflow: hidden; 58 | text-align: center; 59 | text-overflow: ellipsis; 60 | white-space: nowrap; 61 | } 62 | 63 | .header .checked { 64 | border-bottom: 2px solid #000; 65 | } 66 | 67 | /* 68 | .icon-address 69 | ============================================================ 70 | */ 71 | 72 | .icon-address { 73 | position: relative; 74 | } 75 | 76 | .icon-address canvas { 77 | font-size: .875rem; 78 | height: 32px; 79 | position: absolute; 80 | right: .35em; 81 | top: .35em; 82 | width: 32px; 83 | } 84 | 85 | .icon-address input { 86 | padding-right: 40px; 87 | } 88 | 89 | /* 90 | .logo-main 91 | ============================================================ 92 | */ 93 | 94 | .logo-main .btn { 95 | font-size: smaller; 96 | font-weight: lighter; 97 | } 98 | 99 | .logo-main .col:first-child { 100 | background: url(../img/logo-b.png) left center no-repeat content-box; 101 | height: 70px; 102 | margin: 15px 0; 103 | } 104 | 105 | .logo-main .col:last-child { 106 | align-items: center; 107 | display: flex; 108 | justify-content: flex-end; 109 | } 110 | 111 | /* overrides - base.css */ 112 | .logo-main .col:last-child .btn { 113 | background-color: white; 114 | color: #aaa; 115 | margin: 0 10px 0 0; 116 | padding: 0; 117 | } 118 | 119 | /* 120 | .number-comma 121 | ============================================================ 122 | */ 123 | 124 | .number-comma { 125 | position: relative; 126 | } 127 | 128 | .number-comma > div { 129 | color: #aaa; 130 | font-size: .875rem; 131 | line-height: 3em; 132 | pointer-events: none; 133 | position: absolute; 134 | right: 6px; 135 | top: 0; 136 | } 137 | 138 | .number-comma > span { 139 | line-height: 2.8em; 140 | position: absolute; 141 | right: 6px; 142 | top: 0; 143 | } 144 | 145 | .number-comma .currency { 146 | height: 2.5em; 147 | line-height: 2em; 148 | top: 0; 149 | } 150 | 151 | /* 152 | .select-wallet-file 153 | ============================================================ 154 | */ 155 | 156 | .select-wallet-file label.file { 157 | background-color: #f5f5f5; 158 | border-radius: 3px; 159 | cursor: pointer; 160 | display: block; 161 | font-size: 19px; 162 | font-weight: bold; 163 | height: auto; /* override bootstrap */ 164 | line-height: 50px; 165 | overflow: hidden; 166 | text-align: center; 167 | text-overflow: ellipsis; 168 | } 169 | 170 | .select-wallet-file .empty { 171 | border: 1px solid red; 172 | } 173 | 174 | .select-wallet-file input[type=file] { 175 | display: none; 176 | } 177 | 178 | .select-wallet-file label.pass { 179 | display: block; 180 | } 181 | 182 | .select-wallet-file input[type=password] { 183 | background-color: #f5f5f5; 184 | border: 1px solid #e8e8e8; 185 | border-radius: 3px; 186 | display: block; 187 | height: 3em; 188 | letter-spacing: .3em; 189 | margin-top: 10px; 190 | padding: 0 10px; 191 | width: 100%; 192 | } 193 | 194 | .select-wallet-file label.hide { 195 | display: none; 196 | } 197 | 198 | .select-wallet-file .comment { 199 | font-size: .8rem; 200 | } 201 | -------------------------------------------------------------------------------- /img/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nebulasio/web-wallet/2ebc337dd551f96b3999f89916ac1fa332a25e6e/img/background.png -------------------------------------------------------------------------------- /img/logo-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nebulasio/web-wallet/2ebc337dd551f96b3999f89916ac1fa332a25e6e/img/logo-b.png -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nebulasio/web-wallet/2ebc337dd551f96b3999f89916ac1fa332a25e6e/img/logo.png -------------------------------------------------------------------------------- /img/prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nebulasio/web-wallet/2ebc337dd551f96b3999f89916ac1fa332a25e6e/img/prompt.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | NEBULAS 12 | 30 | 31 | 32 |
33 |
34 | 35 |
36 |
37 |
38 | 39 | 40 |
41 | 42 |
43 |
44 |

45 | Save your 46 | 47 | File. 48 |

49 | 50 |
51 |

52 | This password encrypts your private key. 53 |
This does not act as a seed to generate your keys. 54 |
You will need this password + your private key to unlock your wallet. 55 |

56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 111 | 112 | -------------------------------------------------------------------------------- /js/1-localSave.js: -------------------------------------------------------------------------------- 1 | // 2 | // ==================== 3 | // cause: macos safari 4 | // ==================== 5 | // 6 | // macos safari + file: + localStorage = error 7 | 8 | var localSave; 9 | 10 | try { 11 | localStorage.setItem("mod", "mod"); 12 | localStorage.removeItem("mod"); 13 | localSave = localStorage; 14 | } catch (e) { 15 | // https://gist.github.com/juliocesar/926500/85cbf5924c071f23772d73dd51ebd9d5d79ec225 16 | // digital-flowers commented on 8 May 2017 17 | // points to 18 | // https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage 19 | 20 | document.cookie = "thetest=b; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"; 21 | 22 | if (document.cookie) { 23 | document.cookie = "thetest=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; 24 | 25 | localSave = { 26 | getItem: function (sKey) { 27 | if (!sKey || !this.hasOwnProperty(sKey)) { return null; } 28 | return unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"), "$1")); 29 | }, 30 | key: function (nKeyId) { 31 | return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/, "").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[nKeyId]); 32 | }, 33 | setItem: function (sKey, sValue) { 34 | if (!sKey) { return; } 35 | document.cookie = escape(sKey) + "=" + escape(sValue) + "; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"; 36 | this.length = document.cookie.match(/\=/g).length; 37 | }, 38 | length: 0, 39 | removeItem: function (sKey) { 40 | if (!sKey || !this.hasOwnProperty(sKey)) { return; } 41 | document.cookie = escape(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; 42 | this.length--; 43 | }, 44 | hasOwnProperty: function (sKey) { 45 | return (new RegExp("(?:^|;\\s*)" + escape(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); 46 | } 47 | }; 48 | 49 | localSave.length = (document.cookie.match(/\=/g) || localSave).length; 50 | } else { 51 | // 52 | // in chrome, disable cookie 53 | 54 | console.log("warning: can not use localStorage and cookie, using memory, will not persist"); 55 | 56 | localSave = function () { 57 | var bag = {}; 58 | 59 | return { 60 | getItem: function (sKey) { 61 | return bag[sKey]; 62 | }, 63 | key: function (nKeyId) { 64 | var i, j = 0; 65 | 66 | for (i in bag) { 67 | if (j == nKeyId) return i; 68 | 69 | ++j; 70 | } 71 | 72 | return null; 73 | }, 74 | setItem: function (sKey, sValue) { 75 | var i, len = 0; 76 | 77 | bag[sKey] = sValue; 78 | 79 | for (i in bag)++len; 80 | 81 | this.length = len; 82 | }, 83 | length: 0, // in this case length is initially 0 84 | removeItem: function (sKey) { 85 | bag[sKey] = undefined; 86 | 87 | for (i in bag)++len; 88 | 89 | this.length = len; 90 | } 91 | }; 92 | }(); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /js/home.v1.js: -------------------------------------------------------------------------------- 1 | function checkEmail(email) { 2 | var emailRegex = /[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+/g; 3 | var isEmail = email.match(emailRegex); 4 | isEmail = isEmail && isEmail.length > 0; 5 | if (!isEmail) { 6 | bootbox.dialog({ 7 | title: 'Invalid Email', 8 | message: "Please provide a valid email address", 9 | }); 10 | return isEmail; 11 | } 12 | return isEmail; 13 | } 14 | 15 | function checkWallet(wallet) { 16 | var walletRegex = /(0x)?[\w]{48}/g; 17 | var isWallet = wallet.match(walletRegex); 18 | isWallet = isWallet && isWallet.length > 0; 19 | if (!isWallet) { 20 | bootbox.dialog({ 21 | title: 'Invalid Wallet Address', 22 | message: "[0x] + hex string(40 letters) + checksum(8 letters)", 23 | }); 24 | return isWallet; 25 | } 26 | return isWallet; 27 | } 28 | 29 | $(function () { 30 | $('#frmToken').on("submit", function (e) { 31 | e.preventDefault(); 32 | 33 | var email = $('#tokEmail').val(); 34 | var wallet = $("#tokWallet").val(); 35 | if (checkEmail(email) && checkWallet(wallet)) { 36 | var url = "/claim/api/claim/" + email + "/" + wallet + "/"; 37 | $.get(url, function (resp) { 38 | console.log(resp); 39 | if (resp.hash) { 40 | bootbox.dialog({ 41 | title: 'Send Claim Tx Successfully', 42 | message: "Claim Token Tx Hash is " + resp.hash, 43 | size: 'large' 44 | }); 45 | } else { 46 | bootbox.dialog({ 47 | title: 'Send Claim Tx Failed', 48 | message: resp.error, 49 | }); 50 | } 51 | }).fail(function () { 52 | bootbox.alert({ 53 | message: "Sorry, server is busy!", 54 | }); 55 | }); 56 | } 57 | }); 58 | 59 | $('#frmState').on("submit", function (e) { 60 | e.preventDefault(); 61 | 62 | var wallet = $("#stWallet").val(); 63 | if (checkWallet(wallet)) { 64 | var url = "/claim/api/state/" + wallet + "/"; 65 | $.get(url, function (resp) { 66 | console.log(resp); 67 | if (resp.balance) { 68 | bootbox.dialog({ 69 | title: 'Fetch State Successfully', 70 | message: "Balance: " + resp.balance + "\nNonce: " + resp.nonce, 71 | }); 72 | } else { 73 | bootbox.dialog({ 74 | title: 'Fetch State Failed', 75 | message: resp.error, 76 | }); 77 | } 78 | }).fail(function () { 79 | bootbox.alert({ 80 | message: "Sorry, server is busy!", 81 | }); 82 | }); 83 | } 84 | }); 85 | }); -------------------------------------------------------------------------------- /js/i18n.js: -------------------------------------------------------------------------------- 1 | // 2 | // i18n.run() 3 | // - $("[data-i18n]").each((el.type == input, textarea ? el.placeholder : el.innerHTML) = table[lang][el.attr(data-i18n)]) 4 | // 5 | // requires jquery 6 | // 7 | // this file is mainly a big table 8 | // calls i18n.run() at bottom of this file 9 | 10 | "use strict"; 11 | 12 | var i18n = function () { 13 | var table = { 14 | en: { 15 | amount: "Amount", 16 | blog: "Blog", 17 | "check/anchor": "Please, read about this tool here.", 18 | "check/blah": "Trading hash can query transaction information, including pending and packaged transactions. You need to refresh the package status change of the query transaction several times when the transaction is packaged and validated.", 19 | "check/comment1": "Please enter a valid TX hash", 20 | "check/tx-details": "Transaction Details", 21 | community: "Community", 22 | "contract/addr_input_msg": "Please enter your TXhash", 23 | "contract/call": "Call", 24 | "contract/call_offline": "Call Offline", 25 | "contract/call_contract": "Call Contract", 26 | "contract/call_contract_offline": "Call Contract Offline", 27 | "contract/call_test": "Test", 28 | "contract/call_submit": "Submit", 29 | "contract/deploy": "Deploy", 30 | "contract/deploy_contract": "Deploy Contract", 31 | "contract/deploy_test": "Test", 32 | "contract/deploy_submit": "Submit", 33 | "contract/contract_code": "code : ", 34 | "contract/contract_codetype": "Programming Language :", 35 | "contract/contract_codetype_banner": "( Please select the code type !)", 36 | "contract/contract_fun": "arguments", 37 | "contract/contract_fun_prompt":" (Type:JSON)for example : [\"arg-1\", \"arg-2\", ...] ", 38 | "contract/contract_fn_prompt":"function (x) { } ", 39 | "contract/contract_funtion": "function", 40 | "contract/err_msg": "Red part information is wrong,Please enter a valid msg", 41 | "contract/err_msg_hash": "Please enter a valid TX hash", 42 | "contract/test_result": "Test result", 43 | "contract/result": "Submit result", 44 | "contract/search": "Search", 45 | "contract/search_contract": "Search Contract", 46 | "contract/txhash": "txhash :", 47 | "contract/contract_address": "contract_address :", 48 | "contract/clickToCheck": "(Click to view transaction details)", 49 | data: "Data", 50 | download: "Download", 51 | "gas-limit": "Gas Limit", 52 | "gas-price": "Gas Price", 53 | "gas-used": "Gas Used", 54 | "header/check": "Check TX Status", 55 | "header/contract": "Contract", 56 | "header/new-wallet": "Create New Wallet", 57 | "header/send": "Send", 58 | "header/send-offline": "Send Offline", 59 | "header/view": "View Wallet Info", 60 | home: "Home", 61 | "keystore-file": "Keystore File", 62 | name: "English", 63 | "new/comment": "This password encrypts your private key.\n" + 64 | "This does not act as a seed to generate your keys.\n" + 65 | "You will need this password + your private key to unlock your wallet.", 66 | "new/enter-password": "Enter a password:(Not less than 9 characters)", 67 | "new/gen": "Download Keystore File", 68 | "new/new": "Create New Wallet", 69 | "new/placeholder/do-not-forget": "Do NOT forget to save this!", 70 | "new/save1": "Save your", 71 | "new/save3": ".", 72 | "placeholder/addr": "fill address here", 73 | "placeholder/tx#": "fill transaction hash here", 74 | resources: "Resources", 75 | "send-nas/amount": "Value / Amount to Send", 76 | "send-nas/balance": "Balance", 77 | "send-nas/button/generate": "Generate Transaction", 78 | "send-nas/check": "Submit", 79 | "send-nas/close": "Close", 80 | "send-nas/from-address": "From Address", 81 | "send-nas/raw": "Raw Transaction", 82 | "send-nas/receipt": "receipt :", 83 | "send-nas/send": "Send Transaction", 84 | "send-nas/signed": "Signed Transaction", 85 | "send-nas/signed_qr": "Signed Transaction QR", 86 | "send-nas/to-address": "To Address", 87 | "send-nas/transfer_msg": "transfer message", 88 | "send-offline/gen-info": "Inquire Information", 89 | "send-offline/nonce": "nonce : (next transaction nonce)", 90 | "send-offline/step1": "Step 1: Inquire Information (Online Computer)", 91 | "send-offline/step2": "Step 2: Generate Transaction (Offline Computer)", 92 | "send-offline/step3": "Step 3: Send / Publish Transaction (Online Computer)", 93 | "swf/button": "SELECT WALLET FILE...", 94 | "swf/good": "Your wallet is encrypted. Good! Please enter the password.", 95 | "swf/modal/select/message": "please upload your wallet file, thanks", 96 | "swf/modal/select/title": "please select your wallet", 97 | "swf/name": "Select Your Wallet File:", 98 | "swf/unlock": "Unlock", 99 | team: "Team", 100 | technology: "Technology", 101 | "validate/eqgt0": "invalid: must equal to or greater than 0", 102 | "validate/gt0": "invalid: must greater than 0", 103 | "validate/lengthEq35": "invalid: length should be 35", 104 | "validate/lengthEq64": "invalid: length should be 64", 105 | "validate/lengthGt8": "invalid: length should at least be 9", 106 | "validate/number": "invalid: must be number", 107 | "validate/required": "invalid: required", 108 | "wallet-info/acc-addr": "Account Address", 109 | "wallet-info/acc-balance": "Account Balance", 110 | "wallet-info/private-key": "Private Key (unencrypted)", 111 | "wallet-info/your-addr": "Your Address" 112 | }, 113 | es: { 114 | amount: "Cantidad", 115 | blog: "Blog", 116 | "check/anchor": "Por favor, lea más sobre esta herramienta aquí.", 117 | "check/blah": "Con un TX hash usted puede obtener información de la transacción, incluyendo transacciones pendientes y empaquetadas. Necesita actualizar varias veces la consulta cuando la transacción es empaquetada y validada.", 118 | "check/comment1": "Por favor, ingrese un hash de TX válido", 119 | "check/tx-details": "Detalles de la transacción", 120 | community: "Comunidad", 121 | "contract/addr_input_msg": "Por favor, ingrese su hash de TX", 122 | "contract/call": "Llamada", 123 | "contract/call_contract": "Llamada a contrato", 124 | "contract/call_test": "Prueba", 125 | "contract/call_submit": "Enviar", 126 | "contract/deploy": "Implementar", 127 | "contract/deploy_contract": "Implementar contrato", 128 | "contract/deploy_test": "Prueba", 129 | "contract/deploy_submit": "Enviar", 130 | "contract/contract_code": "código : ", 131 | "contract/contract_codetype": "Lenguaje de programación :", 132 | "contract/contract_codetype_banner": "( Seleccione el tipo de código, por favor !)", 133 | "contract/contract_fun": "argumentos", 134 | "contract/contract_fun_prompt":" (Tipo:JSON)por ejemplo : [\"arg-1\", \"arg-2\", ...] ", 135 | "contract/contract_fn_prompt":"function (x) { } ", 136 | "contract/contract_funtion": "function", 137 | "contract/err_msg": "La información que se muestra en rojo es errónea; por favor, ingrese un mensaje válido", 138 | "contract/err_msg_hash": "Por favor, ingrese un hash TX válido", 139 | "contract/test_result": "Resultados de la prueba", 140 | "contract/result": "Enviar resultado", 141 | "contract/search": "Buscar", 142 | "contract/search_contract": "Buscar contrato", 143 | "contract/txhash": "txhash :", 144 | "contract/contract_address": "contract_address :", 145 | "contract/clickToCheck": "(Clic para ver los detalles de la transacción)", 146 | data: "Datos", 147 | download: "Descargar", 148 | "gas-limit": "Límite de gas", 149 | "gas-price": "Precio de gas", 150 | "gas-used": "Gas usado", 151 | "header/check": "Comprobar estado de TX", 152 | "header/contract": "Contrato", 153 | "header/new-wallet": "Crear nueva cartera", 154 | "header/send": "Enviar", 155 | "header/send-offline": "Enviar sin conexión", 156 | "header/view": "Ver información de la cartera", 157 | home: "Inicio", 158 | "keystore-file": "Archivo Keystore", 159 | name: "Español", 160 | "new/comment": "Esta contraseña encripta su clave privada.\n" + 161 | "La misma no actúa como semilla para generar sus claves.\n" + 162 | "Necesitará esta contraseña y su clave privada para desbloquear su cartera.", 163 | "new/enter-password": "Ingrese una clave:(no menor a 9 caracteres)", 164 | "new/gen": "Descargar archivo Keystore", 165 | "new/new": "Crear nueva cartera", 166 | "new/placeholder/do-not-forget": "¡No olvide guardar esta información!", 167 | "new/save1": "Guardar su", 168 | "new/save3": ".", 169 | "placeholder/addr": "ingrese la dirección aquí", 170 | "placeholder/tx#": "ingrese el hash de la transacción aquí", 171 | resources: "Recursos", 172 | "send-nas/amount": "Valor / Cantidad a enviar", 173 | "send-nas/balance": "Balance", 174 | "send-nas/button/generate": "Generar transacción", 175 | "send-nas/check": "Enviar", 176 | "send-nas/close": "Cerrar", 177 | "send-nas/from-address": "Desde dirección", 178 | "send-nas/raw": "Transacción en bruto", 179 | "send-nas/receipt": "receptor :", 180 | "send-nas/send": "Enviar transacción", 181 | "send-nas/signed": "Transacción firmada", 182 | "send-nas/signed_qr": "QR de la transacción firmada", 183 | "send-nas/to-address": "Hacia dirección", 184 | "send-nas/transfer_msg": "transferir mensaje", 185 | "send-offline/gen-info": "Solicitar información", 186 | "send-offline/nonce": "nonce : (nonce de la próxima transacción)", 187 | "send-offline/step1": "Paso 1: Solicitar información (computadora en línea)", 188 | "send-offline/step2": "Paso 2: Generar transacción (computadora desconectada)", 189 | "send-offline/step3": "Paso 3: Enviar / publicar transacción (computadora en línea)", 190 | "swf/button": "SELECCIONE EL ARCHIVO DE SU CARTERA...", 191 | "swf/good": "Su cartera ha sido encriptada. ¡Bien! Ingrese su contraseña.", 192 | "swf/modal/select/message": "por favor, suba el archivo de su cartera, gracias", 193 | "swf/modal/select/title": "por favor, seleccione su cartera", 194 | "swf/name": "Seleccione el archivo de su cartera:", 195 | "swf/unlock": "Desbloquear", 196 | team: "Equipo", 197 | technology: "Tecnología", 198 | "validate/eqgt0": "inválido: debe ser igual o mayor a 0", 199 | "validate/gt0": "inválido: debe ser mayor a 0", 200 | "validate/lengthEq35": "inválido: la longitud debe ser igual a 35", 201 | "validate/lengthEq64": "inválido: la longitud debe ser de 64", 202 | "validate/lengthGt8": "inválido: la longitud debe ser de al menos 9", 203 | "validate/number": "inválido: debe ser un número", 204 | "validate/required": "inválido: requerido", 205 | "wallet-info/acc-addr": "Dirección de la cuenta", 206 | "wallet-info/acc-balance": "Balance de la cuenta", 207 | "wallet-info/private-key": "Clave privada (sin encriptar)", 208 | "wallet-info/your-addr": "Su dirección" 209 | }, 210 | zh: { 211 | amount: "金额", 212 | blog: "博客", 213 | "check/anchor": "有关此工具请阅读这里。", 214 | "check/blah": "交易哈希可以查询交易信息,包含等待上链和已经打包的交易。在交易打包验证时需要多次刷新查询交易的打包状态变更。", 215 | "check/comment1": "请输入有效的交易哈希", 216 | "check/tx-details": "交易详情", 217 | community: "社区", 218 | "contract/addr_input_msg": "请输入你的交易地址", 219 | "contract/call": "执行", 220 | "contract/call_offline": "离线执行", 221 | "contract/call_contract": "执行合约", 222 | "contract/call_contract_offline": "离线执行合约", 223 | "contract/call_test": "测试", 224 | "contract/call_submit": "提交", 225 | "contract/deploy": "部署", 226 | "contract/deploy_contract": "部署合约", 227 | "contract/deploy_test": "测试", 228 | "contract/deploy_submit": "提交", 229 | "contract/contract_code": "合约代码 :", 230 | "contract/contract_codetype": "编程语言 :", 231 | "contract/contract_codetype_banner": "( 请选择代码类型 !)", 232 | "contract/contract_fun": "参数 ", 233 | "contract/contract_fun_prompt": " (json格式)例如 :[\"arg-1\", \"arg-2\",...] ", 234 | "contract/contract_fn_prompt":"例如 :function (x) { } ", 235 | "contract/contract_funtion": "函数", 236 | "contract/err_msg": "红色部分信息错误,请输入有效信息", 237 | "contract/err_msg_hash": "请输入有效的交易哈希", 238 | "contract/test_result": "测试结果", 239 | "contract/result": "提交结果", 240 | "contract/search": "搜索", 241 | "contract/search_contract": "搜索合约", 242 | "contract/txhash": "交易哈希 :", 243 | "contract/contract_address": "合约地址 :", 244 | "contract/clickToCheck": "(点击产看交易详情)", 245 | data: "数据", 246 | download: "下载", 247 | "gas-limit": "Gas 限制", 248 | "gas-price": "Gas 价格", 249 | "gas-used": "Gas 消耗", 250 | "header/check": "交易状态", 251 | "header/contract": "合约", 252 | "header/new-wallet": "新建钱包", 253 | "header/send": "转账", 254 | "header/send-offline": "离线转账", 255 | "header/view": "钱包信息", 256 | home: "主页", 257 | "keystore-file": "密码库文件", 258 | name: "简体中文", 259 | "new/comment": "该密码用于加密您的私钥。\n他不做为产生私钥的种子。\n您需要该密码 + 您的私钥以解锁您的钱包。", 260 | "new/enter-password": "输入密码:(不少于9位数)", 261 | "new/gen": "下载密码库文件", 262 | "new/new": "新建钱包", 263 | "new/placeholder/do-not-forget": "别忘了这个!", 264 | "new/save1": "保存你的", 265 | "new/save3": "。", 266 | "placeholder/addr": "地址", 267 | "placeholder/tx#": "交易哈希", 268 | resources: "资源", 269 | "send-nas/amount": "要发送的价值 / 金额", 270 | "send-nas/balance": "余额", 271 | "send-nas/button/generate": "生成交易", 272 | "send-nas/from-address": "来自地址", 273 | "send-nas/raw": "原始交易", 274 | "send-nas/receipt": "收据", 275 | "send-nas/send": "发送交易", 276 | "send-nas/signed": "签名的交易", 277 | "send-nas/signed_qr": "签名交易的二维码", 278 | "send-nas/transfer_msg": "交易信息", 279 | "send-nas/close": "关闭", 280 | "send-nas/check": "确认", 281 | "send-nas/to-address": "目的地址", 282 | "send-offline/gen-info": "查询信息", 283 | "send-offline/nonce": "nonce : (下一个交易的 nonce)", 284 | "send-offline/step1": "第 1 步:查询信息(联网)", 285 | "send-offline/step2": "第 2 步:生成信息(单机)", 286 | "send-offline/step3": "第 3 步:发送 / 发布交易(联网)", 287 | "swf/button": "选择钱包文件...", 288 | "swf/good": "你的钱包加密了,好!请输入密码。", 289 | "swf/modal/select/message": "请上传您的钱包文件,谢谢", 290 | "swf/modal/select/title": "请选择您的钱包", 291 | "swf/name": "选择你的钱包文件:", 292 | "swf/unlock": "解锁", 293 | team: "团队", 294 | technology: "技术", 295 | "validate/eqgt0": "无效:必须等于或大于 0", 296 | "validate/gt0": "无效:必须大于 0", 297 | "validate/lengthEq35": "无效:长度应等于 35", 298 | "validate/lengthEq64": "无效:长度应等于 64", 299 | "validate/lengthGt8": "无效:长度至少是 9", 300 | "validate/number": "无效:必须是数字", 301 | "validate/required": "无效:必填", 302 | "wallet-info/acc-addr": "钱包地址", 303 | "wallet-info/acc-balance": "钱包余额", 304 | "wallet-info/private-key": "私钥(未加密)", 305 | "wallet-info/your-addr": "你的地址" 306 | }, 307 | ko: { 308 | amount: "양", 309 | blog: "블로그", 310 | "check/anchor": "여기서 이 도구에 대해서 읽으세요.", 311 | "check/blah": "거래 해쉬는 보류 및 패키지 트랜잭션을 포함하여 트랜잭션 정보를 쿼리할 수 ​​있습니다. 트랜잭션이 패키징되고 유효성이 확인되면 쿼리 트랜잭션의 패키지 상태 변경을 여러 번 새로고침해야합니다.", 312 | "check/comment1": "유효한 TX hash를 입력해주세요", 313 | "check/tx-details": "트랜잭션 세부정보", 314 | community: "커뮤니티", 315 | "contract/addr_input_msg": "TXhash를 입력해주세요", 316 | "contract/call": "호출", 317 | "contract/call_contract": "컨트랙트 호출", 318 | "contract/call_test": "테스트", 319 | "contract/call_submit": "제출", 320 | "contract/deploy": "배포", 321 | "contract/deploy_contract": "컨트랙트 배포", 322 | "contract/deploy_test": "테스트", 323 | "contract/deploy_submit": "제출", 324 | "contract/contract_code": "코드 : ", 325 | "contract/contract_codetype": "프로그래밍 언어 :", 326 | "contract/contract_codetype_banner": "( 코드의 타입을 선택해주세요! )", 327 | "contract/contract_fun": "인자", 328 | "contract/contract_fun_prompt":" (타입: JSON)예시 : [\"arg-1\", \"arg-2\", ...] ", 329 | "contract/contract_fn_prompt":"function (x) { } ", 330 | "contract/contract_funtion": "함수", 331 | "contract/err_msg": "빨간 부분의 정보는 틀린 것입니다, 유효한 msg를 입력해주세요.", 332 | "contract/err_msg_hash": "유효한 TX hash를 입력해주세요", 333 | "contract/test_result": "테스트 결과", 334 | "contract/result": "제출 결과", 335 | "contract/search": "검색", 336 | "contract/search_contract": "컨트랙트 검색", 337 | "contract/txhash": "txhash :", 338 | "contract/contract_address": "contract_address :", 339 | "contract/clickToCheck": "(트랜잭션 세부정보를 보려면 클릭하세요)", 340 | data: "데이터", 341 | download: "다운로드", 342 | "gas-limit": "가스 한도", 343 | "gas-price": "가스 가격", 344 | "gas-used": "사용된 가스", 345 | "header/check": "트랜잭션 확인", 346 | "header/contract": "컨트랙트", 347 | "header/new-wallet": "새 지갑 생성", 348 | "header/send": "출금", 349 | "header/send-offline": "오프라인 출금", 350 | "header/view": "지갑 정보 조회", 351 | home: "홈", 352 | "keystore-file": "키스토어 파일", 353 | name: "한글", 354 | "new/comment": "이 암호는 프라이빗 키로 암호화됩니다.\n" + 355 | "키를 생성하는 시드로 작동하지 않습니다.\n" + 356 | "지갑을 언락하기 위해 이 비밀번호와 프라이빗 키가 필요합니다.", 357 | "new/enter-password": "비밀번호를 입력해주세요:(길이가 9 이상이어야 합니다)", 358 | "new/gen": "키스토어 파일을 다운로드하세요", 359 | "new/new": "새 지갑 생성", 360 | "new/placeholder/do-not-forget": "비밀번호를 잊지 말아주세요!", 361 | "new/save1": " ", 362 | "new/save3": "을 저장하세요.", 363 | "placeholder/addr": "주소를 입력해주세요", 364 | "placeholder/tx#": "트랜잭션 해쉬를 입력해주세요", 365 | resources: "리소스", 366 | "send-nas/amount": "전송할 값 / 양", 367 | "send-nas/balance": "잔액", 368 | "send-nas/button/generate": "트랜잭션 생성", 369 | "send-nas/check": "제출", 370 | "send-nas/close": "닫기", 371 | "send-nas/from-address": "보내는 주소", 372 | "send-nas/raw": "원시 트랜잭션", 373 | "send-nas/receipt": "영수증 :", 374 | "send-nas/send": "트랜잭션 전송", 375 | "send-nas/signed": "서명된 트랜잭션", 376 | "send-nas/signed_qr": "서명된 트랜잭션 QR", 377 | "send-nas/to-address": "받는 주소", 378 | "send-nas/transfer_msg": "메세지 전송", 379 | "send-offline/gen-info": "정보 조회", 380 | "send-offline/nonce": "nonce : (다음 트랜잭션 nonce)", 381 | "send-offline/step1": "1단계: 정보 조회 (온라인 컴퓨터)", 382 | "send-offline/step2": "2단계: 트랜잭션 생성 (오프라인 컴퓨터)", 383 | "send-offline/step3": "3단계: 트랜잭션 전송 / 게재 (온라인 컴퓨터)", 384 | "swf/button": "지갑 파일을 선택해주세요...", 385 | "swf/good": "지갑은 암호화됩니다. 비밀번호를 입력해주세요.", 386 | "swf/modal/select/message": "지갑 파일을 업로드해주세요.", 387 | "swf/modal/select/title": "지갑을 선택하세요", 388 | "swf/name": "지갑 파일을 선택하세요:", 389 | "swf/unlock": "언락", 390 | team: "팀", 391 | technology: "기술", 392 | "validate/eqgt0": "유효하지 않음: 0보다 크거나 같아야 합니다", 393 | "validate/gt0": "유효하지 않음: 0보다 커야 합니다", 394 | "validate/lengthEq35": "유효하지 않음: 길이가 35가 되어야 합니다", 395 | "validate/lengthEq64": "유효하지 않음: 길이가 64가 되어야 합니다", 396 | "validate/lengthGt8": "유효하지 않음: 길이가 최소한 9는 되어야 합니다", 397 | "validate/number": "유효하지 않음: 숫자여야 합니다", 398 | "validate/required": "유효하지 않음: 필수입니다", 399 | "wallet-info/acc-addr": "지갑 주소", 400 | "wallet-info/acc-balance": "지갑 잔액", 401 | "wallet-info/private-key": "프라이빗 키 (암호화되지 않음)", 402 | "wallet-info/your-addr": "당신의 주소" 403 | }, 404 | }; 405 | 406 | return { 407 | apiErrorToText: apiErrorToText, 408 | langName: langName, 409 | run: run, 410 | supports: supports 411 | }; 412 | 413 | function apiErrorToText(s) { 414 | var lang = localSave.getItem("lang"), 415 | table = { 416 | unknown: { 417 | en: "unknown error", 418 | es: "error desconocido", 419 | zh: "未知错误", 420 | ko: "알려지지 않은 에러", 421 | }, 422 | "Network Error": { 423 | en: s, 424 | es: "Error de red", 425 | zh: "网络错误", 426 | ko: "네트워크 에러", 427 | }, 428 | // getAccountState 429 | "address: invalid address format": { 430 | en: s, 431 | es: "formato inválido para la dirección", 432 | zh: "地址格式无效", 433 | ko: "주소: 유효하지 않은 주소 포맷입니다", 434 | }, 435 | // GetTransactionReceipt 436 | "invalid argument(s)": { 437 | en: "invalid transaction hash", 438 | es: "TX hash inválido", 439 | zh: "无效的交易哈希", 440 | ko: "유효하지 않은 트랜잭션 해쉬입니다", 441 | }, 442 | "params eror/system error": { 443 | en: "transaction hash or system error", 444 | es: "Error de sistema o de TX hash", 445 | zh: "交易哈希或者系统错误", 446 | ko: "트랜잭션 해쉬 혹은 시스템 에러입니다", 447 | }, 448 | "transaction not found": { 449 | en: "transaction not found", 450 | es: "no se encontró la transacción", 451 | zh: "交易未找到", 452 | ko: "트랜잭션이 존재하지 않습니다", 453 | }, 454 | // senRawTransaction 455 | "transaction's nonce is invalid, should bigger than the from's nonce": { 456 | en: s, 457 | es: "El nonce de la transacción es inválido; deberia ser mayor que el nonce de origen", 458 | zh: "交易的 nonce 无效,应该大于发送方的 nonce", 459 | ko: "트랜잭션의 nonce가 유효하지 않습니다, 보내는 주소의 nonce보다 커야 합니다", 460 | }, 461 | "contract transaction from-address not equal to to-address": { 462 | en: s, 463 | es: "la dirección origen de la transacción del contrato no es igual a la dirección destino", 464 | zh: "发布合约的 from / to 地址不一致", 465 | ko: "보내는 주소의 컨트랙트 트랜잭션이 받는 주소의 것과 같지 않습니다", 466 | }, 467 | "contract check failed": { 468 | en: s, 469 | es: "falló el chequeo del contrato", 470 | zh: "合约地址无效", 471 | ko: "컨트랙트 확인이 실패했습니다", 472 | }, 473 | "duplicated transaction": { 474 | en: s, 475 | es: "transacción duplicada", 476 | zh: "不能重复提交相同的交易", 477 | ko: "중복된 트랜잭션입니다", 478 | }, 479 | "below the gas price gas": { 480 | en: s, 481 | es: "por debajo del precio del gas", 482 | zh: "价格太低", 483 | ko: "가스 가격이 너무 낮습니다", 484 | }, 485 | "gas limit less or equal to 0": { 486 | en: s, 487 | es: "límite de gas menor o igual a cero", 488 | zh: "gas 限制应该大于 0", 489 | ko: "가스 한도가 0보다 작거나 같습니다", 490 | }, 491 | "out of gas limit": { 492 | en: s, 493 | es: "fuera de límite de gas", 494 | zh: "gas 限制过大", 495 | ko: "가스가 부족합니다", 496 | }, 497 | "invalid transaction chainID": { 498 | en: s, 499 | es: "chainID de transacción inválido", 500 | zh: "无效的 chain id", 501 | ko: "유효하지 않은 트랜잭션 chainID입니다", 502 | }, 503 | "invalid transaction hash": { 504 | en: s, 505 | es: "TX hash inválido", 506 | zh: "交易哈希无效", 507 | ko: "유효하지 않은 트랜잭션 해쉬입니다", 508 | }, 509 | "invalid transaction signer": { 510 | en: s, 511 | es: "firma de la transacción inválida", 512 | zh: "无效的交易签名", 513 | ko: "유효하지 않은 트랜잭션 서명입니다", 514 | } 515 | }; 516 | 517 | return table[s] ? table[s][lang] || table[s].en : table.unknown[lang] || table.unknown.en; 518 | } 519 | 520 | function langName(s) { 521 | return table[s].name; 522 | } 523 | 524 | function run($parent, lang) { 525 | // make sure lang is a key of table 526 | lang = (lang || localSave.getItem("lang") || "").toLowerCase(); 527 | table[lang] || (lang = "en"); 528 | 529 | if ($parent) 530 | $parent.find("[data-i18n]").each(f); 531 | else { 532 | $("[data-i18n]").each(f); 533 | document.documentElement.lang = lang; 534 | } 535 | 536 | return $parent; 537 | 538 | function f(i, o) { 539 | var key = o.dataset.i18n || ""; 540 | o[o.tagName == "INPUT" || o.tagName == "TEXTAREA" ? "placeholder" : "textContent"] = table[lang][key] || table.en[key]; 541 | } 542 | } 543 | 544 | function supports(s) { 545 | return s ? s in table : Object.keys(table); 546 | } 547 | }(); 548 | 549 | i18n.run(); -------------------------------------------------------------------------------- /lib/Blob.js: -------------------------------------------------------------------------------- 1 | /* Blob.js 2 | * A Blob implementation. 3 | * 2018-01-12 4 | * 5 | * By Eli Grey, http://eligrey.com 6 | * By Devin Samarin, https://github.com/dsamarin 7 | * License: MIT 8 | * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md 9 | */ 10 | 11 | /*global self, unescape */ 12 | /*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, 13 | plusplus: true */ 14 | 15 | /*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ 16 | 17 | (function (view) { 18 | "use strict"; 19 | 20 | view.URL = view.URL || view.webkitURL; 21 | 22 | if (view.Blob && view.URL) { 23 | try { 24 | new Blob; 25 | return; 26 | } catch (e) {} 27 | } 28 | 29 | // Internally we use a BlobBuilder implementation to base Blob off of 30 | // in order to support older browsers that only have BlobBuilder 31 | var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) { 32 | var 33 | get_class = function(object) { 34 | return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; 35 | } 36 | , FakeBlobBuilder = function BlobBuilder() { 37 | this.data = []; 38 | } 39 | , FakeBlob = function Blob(data, type, encoding) { 40 | this.data = data; 41 | this.size = data.length; 42 | this.type = type; 43 | this.encoding = encoding; 44 | } 45 | , FBB_proto = FakeBlobBuilder.prototype 46 | , FB_proto = FakeBlob.prototype 47 | , FileReaderSync = view.FileReaderSync 48 | , FileException = function(type) { 49 | this.code = this[this.name = type]; 50 | } 51 | , file_ex_codes = ( 52 | "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " 53 | + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" 54 | ).split(" ") 55 | , file_ex_code = file_ex_codes.length 56 | , real_URL = view.URL || view.webkitURL || view 57 | , real_create_object_URL = real_URL.createObjectURL 58 | , real_revoke_object_URL = real_URL.revokeObjectURL 59 | , URL = real_URL 60 | , btoa = view.btoa 61 | , atob = view.atob 62 | 63 | , ArrayBuffer = view.ArrayBuffer 64 | , Uint8Array = view.Uint8Array 65 | 66 | , origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/ 67 | ; 68 | FakeBlob.fake = FB_proto.fake = true; 69 | while (file_ex_code--) { 70 | FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; 71 | } 72 | // Polyfill URL 73 | if (!real_URL.createObjectURL) { 74 | URL = view.URL = function(uri) { 75 | var 76 | uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a") 77 | , uri_origin 78 | ; 79 | uri_info.href = uri; 80 | if (!("origin" in uri_info)) { 81 | if (uri_info.protocol.toLowerCase() === "data:") { 82 | uri_info.origin = null; 83 | } else { 84 | uri_origin = uri.match(origin); 85 | uri_info.origin = uri_origin && uri_origin[1]; 86 | } 87 | } 88 | return uri_info; 89 | }; 90 | } 91 | URL.createObjectURL = function(blob) { 92 | var 93 | type = blob.type 94 | , data_URI_header 95 | ; 96 | if (type === null) { 97 | type = "application/octet-stream"; 98 | } 99 | if (blob instanceof FakeBlob) { 100 | data_URI_header = "data:" + type; 101 | if (blob.encoding === "base64") { 102 | return data_URI_header + ";base64," + blob.data; 103 | } else if (blob.encoding === "URI") { 104 | return data_URI_header + "," + decodeURIComponent(blob.data); 105 | } if (btoa) { 106 | return data_URI_header + ";base64," + btoa(blob.data); 107 | } else { 108 | return data_URI_header + "," + encodeURIComponent(blob.data); 109 | } 110 | } else if (real_create_object_URL) { 111 | return real_create_object_URL.call(real_URL, blob); 112 | } 113 | }; 114 | URL.revokeObjectURL = function(object_URL) { 115 | if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { 116 | real_revoke_object_URL.call(real_URL, object_URL); 117 | } 118 | }; 119 | FBB_proto.append = function(data/*, endings*/) { 120 | var bb = this.data; 121 | // decode data to a binary string 122 | if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { 123 | var 124 | str = "" 125 | , buf = new Uint8Array(data) 126 | , i = 0 127 | , buf_len = buf.length 128 | ; 129 | for (; i < buf_len; i++) { 130 | str += String.fromCharCode(buf[i]); 131 | } 132 | bb.push(str); 133 | } else if (get_class(data) === "Blob" || get_class(data) === "File") { 134 | if (FileReaderSync) { 135 | var fr = new FileReaderSync; 136 | bb.push(fr.readAsBinaryString(data)); 137 | } else { 138 | // async FileReader won't work as BlobBuilder is sync 139 | throw new FileException("NOT_READABLE_ERR"); 140 | } 141 | } else if (data instanceof FakeBlob) { 142 | if (data.encoding === "base64" && atob) { 143 | bb.push(atob(data.data)); 144 | } else if (data.encoding === "URI") { 145 | bb.push(decodeURIComponent(data.data)); 146 | } else if (data.encoding === "raw") { 147 | bb.push(data.data); 148 | } 149 | } else { 150 | if (typeof data !== "string") { 151 | data += ""; // convert unsupported types to strings 152 | } 153 | // decode UTF-16 to binary string 154 | bb.push(unescape(encodeURIComponent(data))); 155 | } 156 | }; 157 | FBB_proto.getBlob = function(type) { 158 | if (!arguments.length) { 159 | type = null; 160 | } 161 | return new FakeBlob(this.data.join(""), type, "raw"); 162 | }; 163 | FBB_proto.toString = function() { 164 | return "[object BlobBuilder]"; 165 | }; 166 | FB_proto.slice = function(start, end, type) { 167 | var args = arguments.length; 168 | if (args < 3) { 169 | type = null; 170 | } 171 | return new FakeBlob( 172 | this.data.slice(start, args > 1 ? end : this.data.length) 173 | , type 174 | , this.encoding 175 | ); 176 | }; 177 | FB_proto.toString = function() { 178 | return "[object Blob]"; 179 | }; 180 | FB_proto.close = function() { 181 | this.size = 0; 182 | delete this.data; 183 | }; 184 | return FakeBlobBuilder; 185 | }(view)); 186 | 187 | view.Blob = function(blobParts, options) { 188 | var type = options ? (options.type || "") : ""; 189 | var builder = new BlobBuilder(); 190 | if (blobParts) { 191 | for (var i = 0, len = blobParts.length; i < len; i++) { 192 | if (Uint8Array && blobParts[i] instanceof Uint8Array) { 193 | builder.append(blobParts[i].buffer); 194 | } 195 | else { 196 | builder.append(blobParts[i]); 197 | } 198 | } 199 | } 200 | var blob = builder.getBlob(type); 201 | if (!blob.slice && blob.webkitSlice) { 202 | blob.slice = blob.webkitSlice; 203 | } 204 | return blob; 205 | }; 206 | 207 | var getPrototypeOf = Object.getPrototypeOf || function(object) { 208 | return object.__proto__; 209 | }; 210 | view.Blob.prototype = getPrototypeOf(new view.Blob()); 211 | }( 212 | typeof self !== "undefined" && self 213 | || typeof window !== "undefined" && window 214 | || this 215 | )); 216 | -------------------------------------------------------------------------------- /lib/FileSaver.min.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ 2 | var saveAs=saveAs||function(e){"use strict";if(!("undefined"==typeof e||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in o,a=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent),f=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s="application/octet-stream",u=4e4,c=function(e){var t=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};setTimeout(t,u)},l=function(e,t,n){t=[].concat(t);for(var o=t.length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(a){f(a)}}},v=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e},p=function(t,f,u){u||(t=v(t));var p,w=this,m=t.type,y=m===s,S=function(){l(w,"writestart progress write writeend".split(" "))},h=function(){if((d||y&&i)&&e.FileReader){var o=new FileReader;return o.onloadend=function(){var t=d?o.result:o.result.replace(/^data:[^;]*;/,"data:attachment/file;"),n=e.open(t,"_blank");n||(e.location.href=t),t=void 0,w.readyState=w.DONE,S()},o.readAsDataURL(t),void(w.readyState=w.INIT)}if(p||(p=n().createObjectURL(t)),y)e.location.href=p;else{var r=e.open(p,"_blank");r||(e.location.href=p)}w.readyState=w.DONE,S(),c(p)};return w.readyState=w.INIT,r?(p=n().createObjectURL(t),void setTimeout(function(){o.href=p,o.download=f,a(o),S(),c(p),w.readyState=w.DONE})):void h()},w=p.prototype,m=function(e,t,n){return new p(e,t||e.name||"download",n)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return t=t||e.name||"download",n||(e=v(e)),navigator.msSaveOrOpenBlob(e,t)}:(w.abort=function(){},w.readyState=w.INIT=0,w.WRITING=1,w.DONE=2,w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null,m)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!==define.amd&&define("FileSaver.js",function(){return saveAs}); -------------------------------------------------------------------------------- /lib/blockies.min.js: -------------------------------------------------------------------------------- 1 | !function(){function e(e){for(var o=0;o>19^e^e>>8,(c[3]>>>0)/(1<<31>>>0)}function r(){var e=Math.floor(360*o()),r=60*o()+40+"%",t=25*(o()+o()+o()+o())+"%",l="hsl("+e+","+r+","+t+")";return l}function t(e){for(var r=e,t=e,l=Math.ceil(r/2),n=r-l,a=[],c=0;t>c;c++){for(var i=[],f=0;l>f;f++)i[f]=Math.floor(2.3*o());var s=i.slice(0,n);s.reverse(),i=i.concat(s);for(var h=0;h=d&&f===d-1?"btn-primary":"btn-default")}),a}function i(a,b){var c=a.length,d={};if(1>c||c>2)throw new Error("Invalid argument length");return 2===c||"string"==typeof a[0]?(d[b[0]]=a[0],d[b[1]]=a[1]):d=a[0],d}function j(a,c,d){return b.extend(!0,{},a,i(c,d))}function k(a,b,c,d){var e={className:"bootbox-"+a,buttons:l.apply(null,b)};return m(j(e,d,c),b)}function l(){for(var a={},b=0,c=arguments.length;c>b;b++){var e=arguments[b],f=e.toLowerCase(),g=e.toUpperCase();a[f]={label:d(g)}}return a}function m(a,b){var d={};return g(b,function(a,b){d[b]=!0}),g(a.buttons,function(a){if(d[a]===c)throw new Error("button key "+a+" is not allowed (options are "+b.join("\n")+")")}),a}var n={dialog:"",header:"",footer:"",closeButton:"",form:"
",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"
",date:"",time:"",number:"",password:""}},o={locale:"en",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},p={};p.alert=function(){var a;if(a=k("alert",["ok"],["message","callback"],arguments),a.callback&&!b.isFunction(a.callback))throw new Error("alert requires callback property to be a function when provided");return a.buttons.ok.callback=a.onEscape=function(){return b.isFunction(a.callback)?a.callback.call(this):!0},p.dialog(a)},p.confirm=function(){var a;if(a=k("confirm",["cancel","confirm"],["message","callback"],arguments),a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,!1)},a.buttons.confirm.callback=function(){return a.callback.call(this,!0)},!b.isFunction(a.callback))throw new Error("confirm requires a callback");return p.dialog(a)},p.prompt=function(){var a,d,e,f,h,i,k;if(f=b(n.form),d={className:"bootbox-prompt",buttons:l("cancel","confirm"),value:"",inputType:"text"},a=m(j(d,arguments,["title","callback"]),["cancel","confirm"]),i=a.show===c?!0:a.show,a.message=f,a.buttons.cancel.callback=a.onEscape=function(){return a.callback.call(this,null)},a.buttons.confirm.callback=function(){var c;switch(a.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":c=h.val();break;case"checkbox":var d=h.find("input:checked");c=[],g(d,function(a,d){c.push(b(d).val())})}return a.callback.call(this,c)},a.show=!1,!a.title)throw new Error("prompt requires a title");if(!b.isFunction(a.callback))throw new Error("prompt requires a callback");if(!n.inputs[a.inputType])throw new Error("invalid prompt type");switch(h=b(n.inputs[a.inputType]),a.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":h.val(a.value);break;case"select":var o={};if(k=a.inputOptions||[],!b.isArray(k))throw new Error("Please pass an array of input options");if(!k.length)throw new Error("prompt with select requires options");g(k,function(a,d){var e=h;if(d.value===c||d.text===c)throw new Error("given options in wrong format");d.group&&(o[d.group]||(o[d.group]=b("").attr("label",d.group)),e=o[d.group]),e.append("")}),g(o,function(a,b){h.append(b)}),h.val(a.value);break;case"checkbox":var q=b.isArray(a.value)?a.value:[a.value];if(k=a.inputOptions||[],!k.length)throw new Error("prompt with checkbox requires options");if(!k[0].value||!k[0].text)throw new Error("given options in wrong format");h=b("
"),g(k,function(c,d){var e=b(n.inputs[a.inputType]);e.find("input").attr("value",d.value),e.find("label").append(d.text),g(q,function(a,b){b===d.value&&e.find("input").prop("checked",!0)}),h.append(e)})}return a.placeholder&&h.attr("placeholder",a.placeholder),a.pattern&&h.attr("pattern",a.pattern),a.maxlength&&h.attr("maxlength",a.maxlength),f.append(h),f.on("submit",function(a){a.preventDefault(),a.stopPropagation(),e.find(".btn-primary").click()}),e=p.dialog(a),e.off("shown.bs.modal"),e.on("shown.bs.modal",function(){h.focus()}),i===!0&&e.modal("show"),e},p.dialog=function(a){a=h(a);var d=b(n.dialog),f=d.find(".modal-dialog"),i=d.find(".modal-body"),j=a.buttons,k="",l={onEscape:a.onEscape};if(b.fn.modal===c)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(g(j,function(a,b){k+="",l[a]=b.callback}),i.find(".bootbox-body").html(a.message),a.animate===!0&&d.addClass("fade"),a.className&&d.addClass(a.className),"large"===a.size?f.addClass("modal-lg"):"small"===a.size&&f.addClass("modal-sm"),a.title&&i.before(n.header),a.closeButton){var m=b(n.closeButton);a.title?d.find(".modal-header").prepend(m):m.css("margin-top","-10px").prependTo(i)}return a.title&&d.find(".modal-title").html(a.title),k.length&&(i.after(n.footer),d.find(".modal-footer").html(k)),d.on("hidden.bs.modal",function(a){a.target===this&&d.remove()}),d.on("shown.bs.modal",function(){d.find(".btn-primary:first").focus()}),"static"!==a.backdrop&&d.on("click.dismiss.bs.modal",function(a){d.children(".modal-backdrop").length&&(a.currentTarget=d.children(".modal-backdrop").get(0)),a.target===a.currentTarget&&d.trigger("escape.close.bb")}),d.on("escape.close.bb",function(a){l.onEscape&&e(a,d,l.onEscape)}),d.on("click",".modal-footer button",function(a){var c=b(this).data("bb-handler");e(a,d,l[c])}),d.on("click",".bootbox-close-button",function(a){e(a,d,l.onEscape)}),d.on("keyup",function(a){27===a.which&&d.trigger("escape.close.bb")}),b(a.container).append(d),d.modal({backdrop:a.backdrop?"static":!1,keyboard:!1,show:!1}),a.show&&d.modal("show"),d},p.setDefaults=function(){var a={};2===arguments.length?a[arguments[0]]=arguments[1]:a=arguments[0],b.extend(o,a)},p.hideAll=function(){return b(".bootbox").modal("hide"),p};var q={bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};return p.addLocale=function(a,c){return b.each(["OK","CANCEL","CONFIRM"],function(a,b){if(!c[b])throw new Error("Please supply a translation for '"+b+"'")}),q[a]={OK:c.OK,CANCEL:c.CANCEL,CONFIRM:c.CONFIRM},p},p.removeLocale=function(a){return delete q[a],p},p.setLocale=function(a){return p.setDefaults("locale",a)},p.init=function(c){return a(c||b)},p}); -------------------------------------------------------------------------------- /lib/bootstrap-4.0.0-dist/css/bootstrap-reboot.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.0.0 (https://getbootstrap.com) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | *, 9 | *::before, 10 | *::after { 11 | box-sizing: border-box; 12 | } 13 | 14 | html { 15 | font-family: sans-serif; 16 | line-height: 1.15; 17 | -webkit-text-size-adjust: 100%; 18 | -ms-text-size-adjust: 100%; 19 | -ms-overflow-style: scrollbar; 20 | -webkit-tap-highlight-color: transparent; 21 | } 22 | 23 | @-ms-viewport { 24 | width: device-width; 25 | } 26 | 27 | article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { 28 | display: block; 29 | } 30 | 31 | body { 32 | margin: 0; 33 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 34 | font-size: 1rem; 35 | font-weight: 400; 36 | line-height: 1.5; 37 | color: #212529; 38 | text-align: left; 39 | background-color: #fff; 40 | } 41 | 42 | [tabindex="-1"]:focus { 43 | outline: 0 !important; 44 | } 45 | 46 | hr { 47 | box-sizing: content-box; 48 | height: 0; 49 | overflow: visible; 50 | } 51 | 52 | h1, h2, h3, h4, h5, h6 { 53 | margin-top: 0; 54 | margin-bottom: 0.5rem; 55 | } 56 | 57 | p { 58 | margin-top: 0; 59 | margin-bottom: 1rem; 60 | } 61 | 62 | abbr[title], 63 | abbr[data-original-title] { 64 | text-decoration: underline; 65 | -webkit-text-decoration: underline dotted; 66 | text-decoration: underline dotted; 67 | cursor: help; 68 | border-bottom: 0; 69 | } 70 | 71 | address { 72 | margin-bottom: 1rem; 73 | font-style: normal; 74 | line-height: inherit; 75 | } 76 | 77 | ol, 78 | ul, 79 | dl { 80 | margin-top: 0; 81 | margin-bottom: 1rem; 82 | } 83 | 84 | ol ol, 85 | ul ul, 86 | ol ul, 87 | ul ol { 88 | margin-bottom: 0; 89 | } 90 | 91 | dt { 92 | font-weight: 700; 93 | } 94 | 95 | dd { 96 | margin-bottom: .5rem; 97 | margin-left: 0; 98 | } 99 | 100 | blockquote { 101 | margin: 0 0 1rem; 102 | } 103 | 104 | dfn { 105 | font-style: italic; 106 | } 107 | 108 | b, 109 | strong { 110 | font-weight: bolder; 111 | } 112 | 113 | small { 114 | font-size: 80%; 115 | } 116 | 117 | sub, 118 | sup { 119 | position: relative; 120 | font-size: 75%; 121 | line-height: 0; 122 | vertical-align: baseline; 123 | } 124 | 125 | sub { 126 | bottom: -.25em; 127 | } 128 | 129 | sup { 130 | top: -.5em; 131 | } 132 | 133 | a { 134 | color: #007bff; 135 | text-decoration: none; 136 | background-color: transparent; 137 | -webkit-text-decoration-skip: objects; 138 | } 139 | 140 | a:hover { 141 | color: #0056b3; 142 | text-decoration: underline; 143 | } 144 | 145 | a:not([href]):not([tabindex]) { 146 | color: inherit; 147 | text-decoration: none; 148 | } 149 | 150 | a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { 151 | color: inherit; 152 | text-decoration: none; 153 | } 154 | 155 | a:not([href]):not([tabindex]):focus { 156 | outline: 0; 157 | } 158 | 159 | pre, 160 | code, 161 | kbd, 162 | samp { 163 | font-family: monospace, monospace; 164 | font-size: 1em; 165 | } 166 | 167 | pre { 168 | margin-top: 0; 169 | margin-bottom: 1rem; 170 | overflow: auto; 171 | -ms-overflow-style: scrollbar; 172 | } 173 | 174 | figure { 175 | margin: 0 0 1rem; 176 | } 177 | 178 | img { 179 | vertical-align: middle; 180 | border-style: none; 181 | } 182 | 183 | svg:not(:root) { 184 | overflow: hidden; 185 | } 186 | 187 | table { 188 | border-collapse: collapse; 189 | } 190 | 191 | caption { 192 | padding-top: 0.75rem; 193 | padding-bottom: 0.75rem; 194 | color: #6c757d; 195 | text-align: left; 196 | caption-side: bottom; 197 | } 198 | 199 | th { 200 | text-align: inherit; 201 | } 202 | 203 | label { 204 | display: inline-block; 205 | margin-bottom: .5rem; 206 | } 207 | 208 | button { 209 | border-radius: 0; 210 | } 211 | 212 | button:focus { 213 | outline: 1px dotted; 214 | outline: 5px auto -webkit-focus-ring-color; 215 | } 216 | 217 | input, 218 | button, 219 | select, 220 | optgroup, 221 | textarea { 222 | margin: 0; 223 | font-family: inherit; 224 | font-size: inherit; 225 | line-height: inherit; 226 | } 227 | 228 | button, 229 | input { 230 | overflow: visible; 231 | } 232 | 233 | button, 234 | select { 235 | text-transform: none; 236 | } 237 | 238 | button, 239 | html [type="button"], 240 | [type="reset"], 241 | [type="submit"] { 242 | -webkit-appearance: button; 243 | } 244 | 245 | button::-moz-focus-inner, 246 | [type="button"]::-moz-focus-inner, 247 | [type="reset"]::-moz-focus-inner, 248 | [type="submit"]::-moz-focus-inner { 249 | padding: 0; 250 | border-style: none; 251 | } 252 | 253 | input[type="radio"], 254 | input[type="checkbox"] { 255 | box-sizing: border-box; 256 | padding: 0; 257 | } 258 | 259 | input[type="date"], 260 | input[type="time"], 261 | input[type="datetime-local"], 262 | input[type="month"] { 263 | -webkit-appearance: listbox; 264 | } 265 | 266 | textarea { 267 | overflow: auto; 268 | resize: vertical; 269 | } 270 | 271 | fieldset { 272 | min-width: 0; 273 | padding: 0; 274 | margin: 0; 275 | border: 0; 276 | } 277 | 278 | legend { 279 | display: block; 280 | width: 100%; 281 | max-width: 100%; 282 | padding: 0; 283 | margin-bottom: .5rem; 284 | font-size: 1.5rem; 285 | line-height: inherit; 286 | color: inherit; 287 | white-space: normal; 288 | } 289 | 290 | progress { 291 | vertical-align: baseline; 292 | } 293 | 294 | [type="number"]::-webkit-inner-spin-button, 295 | [type="number"]::-webkit-outer-spin-button { 296 | height: auto; 297 | } 298 | 299 | [type="search"] { 300 | outline-offset: -2px; 301 | -webkit-appearance: none; 302 | } 303 | 304 | [type="search"]::-webkit-search-cancel-button, 305 | [type="search"]::-webkit-search-decoration { 306 | -webkit-appearance: none; 307 | } 308 | 309 | ::-webkit-file-upload-button { 310 | font: inherit; 311 | -webkit-appearance: button; 312 | } 313 | 314 | output { 315 | display: inline-block; 316 | } 317 | 318 | summary { 319 | display: list-item; 320 | cursor: pointer; 321 | } 322 | 323 | template { 324 | display: none; 325 | } 326 | 327 | [hidden] { 328 | display: none !important; 329 | } 330 | /*# sourceMappingURL=bootstrap-reboot.css.map */ -------------------------------------------------------------------------------- /lib/bootstrap-4.0.0-dist/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.0.0 (https://getbootstrap.com) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /lib/jquery.base64.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.base64.js 0.1 - https://github.com/yckart/jquery.base64.js 3 | * Makes Base64 en & -decoding simpler as it is. 4 | * 5 | * Based upon: https://gist.github.com/Yaffle/1284012 6 | * 7 | * Copyright (c) 2012 Yannick Albert (http://yckart.com) 8 | * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php). 9 | * 2013/02/10 10 | **/ 11 | ;(function($) { 12 | 13 | var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", 14 | a256 = '', 15 | r64 = [256], 16 | r256 = [256], 17 | i = 0; 18 | 19 | var UTF8 = { 20 | 21 | /** 22 | * Encode multi-byte Unicode string into utf-8 multiple single-byte characters 23 | * (BMP / basic multilingual plane only) 24 | * 25 | * Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars 26 | * 27 | * @param {String} strUni Unicode string to be encoded as UTF-8 28 | * @returns {String} encoded string 29 | */ 30 | encode: function(strUni) { 31 | // use regular expressions & String.replace callback function for better efficiency 32 | // than procedural approaches 33 | var strUtf = strUni.replace(/[\u0080-\u07ff]/g, // U+0080 - U+07FF => 2 bytes 110yyyyy, 10zzzzzz 34 | function(c) { 35 | var cc = c.charCodeAt(0); 36 | return String.fromCharCode(0xc0 | cc >> 6, 0x80 | cc & 0x3f); 37 | }) 38 | .replace(/[\u0800-\uffff]/g, // U+0800 - U+FFFF => 3 bytes 1110xxxx, 10yyyyyy, 10zzzzzz 39 | function(c) { 40 | var cc = c.charCodeAt(0); 41 | return String.fromCharCode(0xe0 | cc >> 12, 0x80 | cc >> 6 & 0x3F, 0x80 | cc & 0x3f); 42 | }); 43 | return strUtf; 44 | }, 45 | 46 | /** 47 | * Decode utf-8 encoded string back into multi-byte Unicode characters 48 | * 49 | * @param {String} strUtf UTF-8 string to be decoded back to Unicode 50 | * @returns {String} decoded string 51 | */ 52 | decode: function(strUtf) { 53 | // note: decode 3-byte chars first as decoded 2-byte strings could appear to be 3-byte char! 54 | var strUni = strUtf.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g, // 3-byte chars 55 | function(c) { // (note parentheses for precence) 56 | var cc = ((c.charCodeAt(0) & 0x0f) << 12) | ((c.charCodeAt(1) & 0x3f) << 6) | (c.charCodeAt(2) & 0x3f); 57 | return String.fromCharCode(cc); 58 | }) 59 | .replace(/[\u00c0-\u00df][\u0080-\u00bf]/g, // 2-byte chars 60 | function(c) { // (note parentheses for precence) 61 | var cc = (c.charCodeAt(0) & 0x1f) << 6 | c.charCodeAt(1) & 0x3f; 62 | return String.fromCharCode(cc); 63 | }); 64 | return strUni; 65 | } 66 | }; 67 | 68 | while(i < 256) { 69 | var c = String.fromCharCode(i); 70 | a256 += c; 71 | r256[i] = i; 72 | r64[i] = b64.indexOf(c); 73 | ++i; 74 | } 75 | 76 | function code(s, discard, alpha, beta, w1, w2) { 77 | s = String(s); 78 | var buffer = 0, 79 | i = 0, 80 | length = s.length, 81 | result = '', 82 | bitsInBuffer = 0; 83 | 84 | while(i < length) { 85 | var c = s.charCodeAt(i); 86 | c = c < 256 ? alpha[c] : -1; 87 | 88 | buffer = (buffer << w1) + c; 89 | bitsInBuffer += w1; 90 | 91 | while(bitsInBuffer >= w2) { 92 | bitsInBuffer -= w2; 93 | var tmp = buffer >> bitsInBuffer; 94 | result += beta.charAt(tmp); 95 | buffer ^= tmp << bitsInBuffer; 96 | } 97 | ++i; 98 | } 99 | if(!discard && bitsInBuffer > 0) result += beta.charAt(buffer << (w2 - bitsInBuffer)); 100 | return result; 101 | } 102 | 103 | var Plugin = $.base64 = function(dir, input, encode) { 104 | return input ? Plugin[dir](input, encode) : dir ? null : this; 105 | }; 106 | 107 | Plugin.btoa = Plugin.encode = function(plain, utf8encode) { 108 | plain = Plugin.raw === false || Plugin.utf8encode || utf8encode ? UTF8.encode(plain) : plain; 109 | plain = code(plain, false, r256, b64, 8, 6); 110 | return plain + '===='.slice((plain.length % 4) || 4); 111 | }; 112 | 113 | Plugin.atob = Plugin.decode = function(coded, utf8decode) { 114 | coded = String(coded).split('='); 115 | var i = coded.length; 116 | do {--i; 117 | coded[i] = code(coded[i], true, r64, a256, 6, 8); 118 | } while (i > 0); 119 | coded = coded.join(''); 120 | return Plugin.raw === false || Plugin.utf8decode || utf8decode ? UTF8.decode(coded) : coded; 121 | }; 122 | }(jQuery)); -------------------------------------------------------------------------------- /lib/jquery.qrcode.min.js: -------------------------------------------------------------------------------- 1 | (function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;da||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]= 5 | 0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c= 7 | j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount- 8 | b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0g;g++)if(null==this.modules[b][i-g]){var n=!1;f>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a, 9 | c),b=new t,e=0;e8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d= 10 | 0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+ 14 | a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;dc)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+ 15 | a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256), 17 | LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d 18 | this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b>>7-a%8&1)},put:function(a,c){for(var d=0;d>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1, 26 | correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e").css("height",b+"px").appendTo(c);for(i=0;i").css("width", 28 | d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery); 29 | -------------------------------------------------------------------------------- /lib/prismjs-1.13.0/prism.css: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.13.0 2 | http://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ 3 | /** 4 | * prism.js default theme for JavaScript, CSS and HTML 5 | * Based on dabblet (http://dabblet.com) 6 | * @author Lea Verou 7 | */ 8 | 9 | code[class*="language-"], 10 | pre[class*="language-"] { 11 | color: black; 12 | background: none; 13 | text-shadow: 0 1px white; 14 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 15 | text-align: left; 16 | white-space: pre; 17 | word-spacing: normal; 18 | word-break: normal; 19 | word-wrap: normal; 20 | line-height: 1.5; 21 | 22 | -moz-tab-size: 4; 23 | -o-tab-size: 4; 24 | tab-size: 4; 25 | 26 | -webkit-hyphens: none; 27 | -moz-hyphens: none; 28 | -ms-hyphens: none; 29 | hyphens: none; 30 | } 31 | 32 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 33 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 34 | text-shadow: none; 35 | background: #b3d4fc; 36 | } 37 | 38 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 39 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 40 | text-shadow: none; 41 | background: #b3d4fc; 42 | } 43 | 44 | @media print { 45 | code[class*="language-"], 46 | pre[class*="language-"] { 47 | text-shadow: none; 48 | } 49 | } 50 | 51 | /* Code blocks */ 52 | pre[class*="language-"] { 53 | padding: 1em; 54 | margin: .5em 0; 55 | overflow: auto; 56 | } 57 | 58 | :not(pre) > code[class*="language-"], 59 | pre[class*="language-"] { 60 | background: #f5f2f0; 61 | } 62 | 63 | /* Inline code */ 64 | :not(pre) > code[class*="language-"] { 65 | padding: .1em; 66 | border-radius: .3em; 67 | white-space: normal; 68 | } 69 | 70 | .token.comment, 71 | .token.prolog, 72 | .token.doctype, 73 | .token.cdata { 74 | color: slategray; 75 | } 76 | 77 | .token.punctuation { 78 | color: #999; 79 | } 80 | 81 | .namespace { 82 | opacity: .7; 83 | } 84 | 85 | .token.property, 86 | .token.tag, 87 | .token.boolean, 88 | .token.number, 89 | .token.constant, 90 | .token.symbol, 91 | .token.deleted { 92 | color: #905; 93 | } 94 | 95 | .token.selector, 96 | .token.attr-name, 97 | .token.string, 98 | .token.char, 99 | .token.builtin, 100 | .token.inserted { 101 | color: #690; 102 | } 103 | 104 | .token.operator, 105 | .token.entity, 106 | .token.url, 107 | .language-css .token.string, 108 | .style .token.string { 109 | color: #9a6e3a; 110 | background: hsla(0, 0%, 100%, .5); 111 | } 112 | 113 | .token.atrule, 114 | .token.attr-value, 115 | .token.keyword { 116 | color: #07a; 117 | } 118 | 119 | .token.function, 120 | .token.class-name { 121 | color: #DD4A68; 122 | } 123 | 124 | .token.regex, 125 | .token.important, 126 | .token.variable { 127 | color: #e90; 128 | } 129 | 130 | .token.important, 131 | .token.bold { 132 | font-weight: bold; 133 | } 134 | .token.italic { 135 | font-style: italic; 136 | } 137 | 138 | .token.entity { 139 | cursor: help; 140 | } 141 | 142 | -------------------------------------------------------------------------------- /lib/prismjs-1.13.0/prism.js: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.13.0 2 | http://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */ 3 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); 4 | Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; 5 | Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); 6 | Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; 7 | Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; 8 | -------------------------------------------------------------------------------- /sendNas.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | NEBULAS 13 | 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 | 75 |
76 |
77 |
78 | 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 | 117 | ↓ 118 | 119 |
120 | 121 | 122 |
123 |
124 |
125 | 126 | 127 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 428 | 429 | 430 | -------------------------------------------------------------------------------- /sendOffline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | NEBULAS 22 | 23 | 24 | 25 |
26 |
27 | 28 |
29 |
30 |

Step 1: Generate Information (Online Computer)

31 |
32 |
From Address
33 |
34 |
35 | 36 | 46 |
47 |
48 | 49 |
50 |
51 |

Step 2: Generate Transaction (Offline Computer)

52 |
53 |
54 | 55 |
56 |
57 |
58 | 59 |
60 |
61 |
62 |
63 |
64 | 65 |
66 |
67 |
68 | 69 | 70 |
71 |
72 |
73 |
74 | 77 |
78 |
79 |
80 | 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 |

Step 3: Send / Publish Transaction (Online Computer)

113 |
114 |
115 | 116 | 117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | 125 |
126 |
127 | 128 |
129 | 130 | ↓ 131 | 132 |
133 | 134 | 135 |
136 |
137 | 138 | 172 | 173 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 439 | 440 | 441 | 442 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | 2 | 'use strict'; 3 | 4 | var fs = require('fs'); 5 | var url = require('url'); 6 | var path = require('path'); 7 | var http = require('http'); 8 | var root = path.resolve(process.argv[2] || '.'); 9 | 10 | console.log('Static root dir: ' + root); 11 | 12 | var server = http.createServer(function (request, response) { 13 | var pathname = url.parse(request.url).pathname; 14 | 15 | if (pathname === '/') { 16 | pathname += 'index.html'; 17 | } 18 | 19 | var filepath = path.join(root, pathname); 20 | 21 | fs.stat(filepath, function (err, stats) { 22 | if (!err && stats.isFile()) { 23 | console.log('200 ' + request.url); 24 | response.writeHead(200); 25 | fs.createReadStream(filepath).pipe(response); 26 | } else { 27 | console.log('404 ' + request.url); 28 | response.writeHead(404); 29 | response.end('404 Not Found'); 30 | } 31 | }); 32 | }); 33 | 34 | server.listen(8080); 35 | console.log('nasWallet is running at http://127.0.0.1:8080/'); 36 | -------------------------------------------------------------------------------- /signOffline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 21 | NEBULAS 22 | 23 | 24 | 25 |
26 |
27 | 28 | 48 | 49 |
50 |
51 |

Sign message (Offline Computer)

52 |
53 |
54 | 55 |
56 |
57 | 61 |
62 | 72 | 88 |
89 |
90 | 91 |
92 | 93 |
94 | 95 |
96 |
97 |
98 | 99 | 100 |
101 |
102 |
103 |
104 | 105 | 106 |
107 |
108 |
109 |
110 | 111 | 127 | 128 | 137 | 138 | 172 | 173 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 447 | 448 | 449 | 450 | -------------------------------------------------------------------------------- /viewWalletInfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | NEBULAS 12 | 13 | 27 | 28 |
29 |
30 |
31 | 32 |
33 |
34 |
35 |
36 | 37 | 38 |
39 |
40 | 41 |
42 |
43 |
44 | 48 | 49 |
50 |
51 | 52 | 53 |
54 | 55 | 56 |
57 |
58 |
59 |
60 |
61 | 62 |
63 |
64 | 68 |
69 |
70 |
71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 218 | 219 | --------------------------------------------------------------------------------