├── favicon.png ├── css ├── Roboto-Bold.ttf ├── creative.css └── bootstrap.min.css ├── package.json ├── README.md ├── calculator.html ├── js ├── calculate.js └── bootstrap.min.js └── index.html /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narulakeshav/calculator/HEAD/favicon.png -------------------------------------------------------------------------------- /css/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/narulakeshav/calculator/HEAD/css/Roboto-Bold.ttf -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Material Design Calculator", 3 | "version": "1.1.2", 4 | "description": "Online Material Design calculator that does basic calculations, mix with elegant design.", 5 | "author": "Keshav Narula ", 6 | "contributors":[{ 7 | "name": "Keshav Narula", 8 | "email": "NarulaKeshav13@gmail.com" 9 | }], 10 | "main": "js/calculate.js", 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/NarulaKeshav/calculator" 14 | }, 15 | "bugs": { 16 | "url": "https://github.com/NarulaKeshav/calculator/issues" 17 | }, 18 | "keywords": [ 19 | "Calculator", 20 | "Operations", 21 | "Material Design" 22 | ], 23 | "license": "MIT", 24 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CalculatorX 2 | CalculatorX is a basic online calculator that should do your basic calculations, from `adding` to `substracting`, from `multiplying` to `dividing`, from `squaring` to taking a `square root`. 3 | 4 | You can view the calculator and play around with it: 5 | [CalculatorX](https://narulakeshav.github.io/calculator) 6 | 7 | ______________________________________________________________________ 8 |
9 | ![Screenshot](http://goo.gl/6bc8XH) 10 | 11 | ## What I used: 12 | * HTML5 (Duh!) 13 | * CSS3 (Rly?) 14 | * Bootstrap 3 (Hmmm...) 15 | * jQuery (Nahh!!) 16 | * JavaScript (No way!!) 17 | 18 | ## Material Design Feel 19 | I wanted this calculator to be a pleasant experience for the user. So I decided to use my CSS and Bootstrap skills to make it look like a Material Design Calculator. I believe that I did a decent job for achieving that. 20 | 21 | ## Inspired by FreeCodeCamp 22 | This was one of the [Zipline Challenges in FreeCodeCamp](http://goo.gl/FTaKBM).
23 | FreeCodeCamp is a great tool for beginner like me who's trying to learn JavaScript. I'm trying to build these small projects to learn and understand JavaScript. -------------------------------------------------------------------------------- /calculator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Flat Calculator 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 | 23 |
24 |

25 |   View Repository on GitHub 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 | -------------------------------------------------------------------------------- /js/calculate.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | var displayBox = document.getElementById("display"); 3 | 4 | //CHECK IF 0 IS PRESENT. IF IT IS, OVERRIDE IT, ELSE APPEND VALUE TO DISPLAY 5 | function clickNumbers(val) { 6 | if(displayBox.innerHTML === "0") { displayBox.innerHTML = val; } 7 | else { displayBox.innerHTML += val; } 8 | } 9 | 10 | //PLUS MINUS 11 | $("#plus_minus").click(function() { 12 | if(eval(displayBox.innerHTML) > 0) { 13 | displayBox.innerHTML = "-" + displayBox.innerHTML; 14 | } 15 | else { 16 | displayBox.innerHTML = displayBox.innerHTML.replace("-", ""); 17 | } 18 | }); 19 | 20 | //ON CLICK ON NUMBERS 21 | $("#clear").click(function() { 22 | displayBox.innerHTML = "0"; 23 | $("#display").css("font-size", "80px"); 24 | $("#display").css("margin-top", "110px"); 25 | $("button").prop("disabled", false); 26 | }); 27 | $("#one").click(function() { 28 | checkLength(displayBox.innerHTML); 29 | clickNumbers(1); 30 | }); 31 | $("#two").click(function() { 32 | checkLength(displayBox.innerHTML); 33 | clickNumbers(2); 34 | }); 35 | $("#three").click(function() { 36 | checkLength(displayBox.innerHTML); 37 | clickNumbers(3); 38 | }); 39 | $("#four").click(function() { 40 | checkLength(displayBox.innerHTML); 41 | clickNumbers(4); 42 | }); 43 | $("#five").click(function() { 44 | checkLength(displayBox.innerHTML); 45 | clickNumbers(5); 46 | }); 47 | $("#six").click(function() { 48 | checkLength(displayBox.innerHTML); 49 | clickNumbers(6); 50 | }); 51 | $("#seven").click(function() { 52 | checkLength(displayBox.innerHTML); 53 | clickNumbers(7); 54 | }); 55 | $("#eight").click(function() { 56 | checkLength(displayBox.innerHTML); 57 | clickNumbers(8); 58 | }); 59 | $("#nine").click(function() { 60 | checkLength(displayBox.innerHTML); 61 | clickNumbers(9); 62 | }); 63 | $("#zero").click(function() { 64 | checkLength(displayBox.innerHTML); 65 | clickNumbers(0); 66 | }); 67 | $("#decimal").click(function() { 68 | if(displayBox.innerHTML.indexOf(".") === -1 69 | || (displayBox.innerHTML.indexOf(".") !== -1 && displayBox.innerHTML.indexOf("+") !== -1) 70 | || (displayBox.innerHTML.indexOf(".") !== -1 && displayBox.innerHTML.indexOf("-") !== -1) 71 | || (displayBox.innerHTML.indexOf(".") !== -1 && displayBox.innerHTML.indexOf("×") !== -1) 72 | || (displayBox.innerHTML.indexOf(".") !== -1 && displayBox.innerHTML.indexOf("÷") !== -1)) { 73 | clickNumbers("."); 74 | } 75 | }); 76 | 77 | //OPERATORS 78 | $("#add").click(function() { 79 | evaluate(); 80 | checkLength(displayBox.innerHTML); 81 | displayBox.innerHTML += "+"; 82 | }); 83 | $("#subtract").click(function() { 84 | evaluate(); 85 | checkLength(displayBox.innerHTML); 86 | displayBox.innerHTML += "-"; 87 | }); 88 | $("#multiply").click(function() { 89 | evaluate(); 90 | checkLength(displayBox.innerHTML); 91 | displayBox.innerHTML += "×"; 92 | }); 93 | $("#divide").click(function() { 94 | evaluate(); 95 | checkLength(displayBox.innerHTML); 96 | displayBox.innerHTML += "÷"; 97 | }); 98 | $("#square").click(function() { 99 | var num = Number(displayBox.innerHTML); 100 | num = num * num; 101 | checkLength(num); 102 | displayBox.innerHTML = num; 103 | }); 104 | $("#sqrt").click(function() { 105 | var num = parseFloat(displayBox.innerHTML); 106 | num = Math.sqrt(num); 107 | displayBox.innerHTML = Number(num.toFixed(5)); 108 | }); 109 | $('#equals').click(evaluate); 110 | 111 | //EVAL FUNCTION 112 | function evaluate() { 113 | displayBox.innerHTML = displayBox.innerHTML.replace(",", ""); 114 | displayBox.innerHTML = displayBox.innerHTML.replace("×", "*"); 115 | displayBox.innerHTML = displayBox.innerHTML.replace("÷", "/"); 116 | if(displayBox.innerHTML.indexOf("/0") !== -1) { 117 | $("#display").css("font-size", "70px"); 118 | $("#display").css("margin-top", "124px"); 119 | $("button").prop("disabled", false); 120 | $(".clear").attr("disabled", false); 121 | displayBox.innerHTML = "Undefined"; 122 | } 123 | var evaluate = eval(displayBox.innerHTML); 124 | if(evaluate.toString().indexOf(".") !== -1) { 125 | evaluate = evaluate.toFixed(5); 126 | } 127 | checkLength(evaluate); 128 | displayBox.innerHTML = evaluate; 129 | } 130 | 131 | //CHECK FOR LENGTH & DISABLING BUTTONS 132 | function checkLength(num) { 133 | if(num.toString().length > 7 && num.toString().length < 14) { 134 | $("#display").css("font-size", "35px"); 135 | $("#display").css("margin-top", "174px"); 136 | } 137 | else if(num.toString().length > 16) { 138 | num = "Infinity"; 139 | $("button").prop("disabled", true); 140 | $(".clear").attr("disabled", false); 141 | } 142 | } 143 | 144 | //TRIM IF NECESSARY 145 | function trimIfNecessary() { 146 | var length = displayBox.innerHTML.length; 147 | if(length > 7 && length < 14) { 148 | $("#display").css("font-size", "35px"); 149 | $("#display").css("margin-top", "174px"); 150 | } 151 | else if(length > 14){ 152 | displayBox.innerHTML = "Infinity"; 153 | $("button").prop("disabled", true); 154 | $(".clear").attr("disabled", false); 155 | } 156 | } 157 | 158 | }); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | CalculatorX 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
23 | 24 |
25 |

26 |   View Repository on GitHub 27 |

28 |
29 |
30 |
31 |

0

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 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /css/creative.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Bold'; 3 | src: url('Roboto-Bold.ttf'); 4 | } 5 | body { 6 | /*background: -webkit-linear-gradient(-60deg, #CCC 0%,#CCC 50%,#BBB 50%,#BBB 100%);*/ 7 | background: radial-gradient(circle, #FFF, #888); 8 | padding-top: 2%; 9 | height: 100vh; 10 | font-family: Roboto; 11 | } 12 | a:hover, 13 | a:focus { 14 | text-decoration: none; 15 | } 16 | a, .btn { 17 | -webkit-transition: all .5s; 18 | -moz-transition: all .5s; 19 | transition: all .5s; 20 | } 21 | .container { 22 | width: 94%; 23 | } 24 | :focus { 25 | outline: none; 26 | box-shadow: 0px 0px 0px transparent; 27 | } 28 | .calculator { 29 | background: #F0F0F0; 30 | box-shadow: 2px 3px 6px #C2C2C2; 31 | } 32 | .displayBox { 33 | background: #03A9F4; 34 | padding: 0; 35 | min-height: 220px; 36 | overflow: hidden; 37 | } 38 | .displayText { 39 | margin-top: 110px; 40 | background: transparent; 41 | border: none; 42 | color: #FFF; 43 | font-size: 80px; 44 | font-weight: 100; 45 | padding-right: 20px; 46 | padding-bottom: -10px; 47 | float: right; 48 | display: inline-block; 49 | overflow: hidden; 50 | } 51 | .notification { 52 | height: 27px; 53 | background: #049ADE; 54 | -webkit-transition: all .5s; 55 | -moz-transition: all .5s; 56 | transition: all .5s; 57 | } 58 | .notification:hover { 59 | background: #0487C2; 60 | } 61 | .notificationMessage { 62 | color: #A0DEFA; 63 | padding-top: 6px; 64 | font-size: 11px; 65 | font-family: Bold; 66 | text-transform: uppercase; 67 | -webkit-transition: all .5s; 68 | -moz-transition: all .5s; 69 | transition: all .5s; 70 | } 71 | .notification:hover .notificationMessage { 72 | color: #FFF; 73 | } 74 | .operationSide { 75 | background: #FFF; 76 | margin-top: -14px; 77 | padding: 0; 78 | padding-left: -20px; 79 | padding-top: 10px; 80 | border-left: 1px solid #E5E5E5; 81 | } 82 | .numberPad { 83 | padding-top: 14px; 84 | } 85 | .btn-calc, 86 | .btn-calc:focus { 87 | background: transparent; 88 | color: #A2A2A2; 89 | font-size: 25px; 90 | width: 75px; 91 | height: 75px; 92 | font-weight: 100; 93 | border-radius: 100px; 94 | outline: none; 95 | box-shadow: 0px 0px 0px transparent; 96 | border: none; 97 | } 98 | .btn-calc:hover { 99 | background: #FFF; 100 | color: #03A9F4; 101 | } 102 | .btn-operation { 103 | background: transparent; 104 | color: #999; 105 | font-size: 25px; 106 | /*width: 97px;*/ 107 | width: 100%; 108 | height: 80.8px; 109 | font-weight: 100; 110 | border-radius: 0; 111 | outline: none; 112 | box-shadow: 0px 0px 0px transparent; 113 | } 114 | .btn-operation:focus { 115 | background: #E8E8E8; 116 | color: #444; 117 | outline: 0; 118 | } 119 | .btn-operation:hover { 120 | background: #E8E8E8; 121 | color: #444; 122 | } 123 | .equals, 124 | .equals:focus { 125 | background: #03A9F4; 126 | color: #FFF; 127 | } 128 | .equals:hover { 129 | background: #049ADE; 130 | color: #FFF; 131 | } 132 | .clear, 133 | .clear:focus { 134 | background: #03A9F4 !important; 135 | color: #FFF; 136 | font-size: 25px; 137 | width: 75px; 138 | height: 75px; 139 | font-weight: 100; 140 | border-radius: 100px; 141 | outline: none; 142 | box-shadow: 0px 0px 0px transparent; 143 | border: transparent; 144 | } 145 | .clear:hover { 146 | background: #049ADE; 147 | color: #FFF; 148 | } 149 | .btn-question, 150 | .btn-question:focus { 151 | z-index: 100; 152 | position: absolute; 153 | top: 20px; 154 | right: 20px; 155 | width: 40px; 156 | height: 40px; 157 | border-radius: 40px; 158 | background: transparent; 159 | border: 2px solid #FFF; 160 | padding-top: 6px; 161 | color: #FFF; 162 | font-family: sans-serif; 163 | font-size: 18px; 164 | outline: none; 165 | } 166 | .btn-question:hover { 167 | background: rgba(255,255,255,0.2); 168 | color: #FFF; 169 | } 170 | .modal-dialog { 171 | padding-top: 100px; 172 | width: 450px; 173 | } 174 | .modal-content { 175 | border-radius: 0px; 176 | box-shadow: none; 177 | border: none; 178 | } 179 | .modal-title { 180 | color: #666; 181 | font-size: 15px; 182 | } 183 | .modal-text { 184 | line-height: 28px; 185 | font-size: 15px; 186 | color: #555; 187 | padding: 10px 5px; 188 | padding-right: 10px; 189 | } 190 | .close { 191 | -webkit-transition: all .5s; 192 | -moz-transition: all .5s; 193 | transition: all .5s; 194 | } 195 | .modal-close { 196 | font-weight: 100; 197 | } 198 | .btn-social, 199 | .btn-social:focus { 200 | background: #F0F0F0; 201 | padding: 10px 12px; 202 | border-radius: 2px; 203 | color: #888; 204 | margin-right: 5px; 205 | text-transform: uppercase; 206 | font-size: 11px; 207 | font-family: Bold; 208 | } 209 | .linkedin:hover { 210 | background: #1985BC; 211 | color: #FFF; 212 | } 213 | .twitter:hover { 214 | background: #55ACEE; 215 | color: #FFF; 216 | } 217 | .github:hover { 218 | background: #444; 219 | color: #FFF; 220 | } 221 | .link, 222 | .link:focus { 223 | border-bottom: 1px dotted #03A9F4; 224 | color: #03A9F4; 225 | } 226 | .link:hover { 227 | color: #40C3FF; 228 | border-color: #40C3FF; 229 | } 230 | 231 | /* MEDIA QUERIES */ 232 | @media only screen and (max-width: 768px) { 233 | body { 234 | padding-top: 1.3em; 235 | } 236 | .calculator { 237 | height: 590px; 238 | box-shadow: 2px 3px 6px #888; 239 | } 240 | .displayBox { 241 | height: 150px; 242 | } 243 | .displayText { 244 | margin-top: 80px; 245 | font-size: 50px; 246 | } 247 | .btn-calc, 248 | .btn-calc:focus { 249 | width: 70px; 250 | height: 70px; 251 | font-size: 18px; 252 | } 253 | .operationSide { 254 | padding: 0; 255 | } 256 | .btn-operation, 257 | .btn-operation:focus { 258 | width: 60px; 259 | height: 60px; 260 | font-size: 18px; 261 | } 262 | .clear, 263 | .clear:focus { 264 | width: 70px; 265 | height: 70px; 266 | font-size: 18px; 267 | } 268 | .equals, 269 | .equals:focus { 270 | width: 62px; 271 | height: 63px; 272 | margin-top: 1px; 273 | } 274 | .modal-dialog { 275 | width: 100%; 276 | } 277 | } 278 | @media only screen and (min-width: 1440px) { 279 | .container { 280 | width: 85%; 281 | } 282 | .btn-calc, 283 | .clear, 284 | .btn-calc:focus, 285 | .clear:focus { 286 | width: 80px; 287 | height: 80px; 288 | } 289 | .equals, 290 | .equals:focus { 291 | width: 100%; 292 | height: 96px; 293 | } 294 | } 295 | 296 | .hvr-radial-out:before { 297 | background: #FFF !important; 298 | border-radius: 100%; 299 | transition-duration: 0.5s; 300 | } 301 | .hvr-fade:before { 302 | background: #FFF !important; 303 | transition-duration: 0.5s; 304 | } -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.2 (http://getbootstrap.com) 3 | * Copyright 2011-2015 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";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(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.3.2",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):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.3.2",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]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"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")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));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()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(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),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.2",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){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.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},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,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&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};var e=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(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),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){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.2",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.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 in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}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.3.2",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('