diff --git a/Gruntfile.js b/Gruntfile.js index f3c3af8f8..98cc655f9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -56,27 +56,64 @@ module.exports = function (grunt) { docs: 'docs/dist' }, - jshint: { - options: { - jshintrc: 'js/.jshintrc' - }, - grunt: { - options: { - jshintrc: 'grunt/.jshintrc' + // JS build configuration + + lineremover: { + es6Import: { + files: { + '<%= concat.bootstrap.dest %>': '<%= concat.bootstrap.dest %>' }, - src: ['Gruntfile.js', 'grunt/*.js'] - }, - core: { - src: 'js/*.js' - }, - test: { options: { - jshintrc: 'js/tests/unit/.jshintrc' + exclusionPattern: /^(import|export)/g + } + } + }, + + babel: { + dev: { + options: { + sourceMap: true, + modules: 'ignore' }, - src: 'js/tests/unit/*.js' + files: { + 'js/dist/util.js' : 'js/src/util.js', + 'js/dist/alert.js' : 'js/src/alert.js', + 'js/dist/button.js' : 'js/src/button.js', + 'js/dist/carousel.js' : 'js/src/carousel.js', + 'js/dist/collapse.js' : 'js/src/collapse.js', + 'js/dist/dropdown.js' : 'js/src/dropdown.js', + 'js/dist/modal.js' : 'js/src/modal.js', + 'js/dist/scrollspy.js' : 'js/src/scrollspy.js', + 'js/dist/tab.js' : 'js/src/tab.js', + 'js/dist/tooltip.js' : 'js/src/tooltip.js', + 'js/dist/popover.js' : 'js/src/popover.js' + } }, - assets: { - src: ['docs/assets/js/src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js'] + dist: { + options: { + modules: 'ignore' + }, + files: { + '<%= concat.bootstrap.dest %>' : '<%= concat.bootstrap.dest %>' + } + }, + umd: { + options: { + modules: 'umd' + }, + files: { + 'dist/js/umd/util.js' : 'js/src/util.js', + 'dist/js/umd/alert.js' : 'js/src/alert.js', + 'dist/js/umd/button.js' : 'js/src/button.js', + 'dist/js/umd/carousel.js' : 'js/src/carousel.js', + 'dist/js/umd/collapse.js' : 'js/src/collapse.js', + 'dist/js/umd/dropdown.js' : 'js/src/dropdown.js', + 'dist/js/umd/modal.js' : 'js/src/modal.js', + 'dist/js/umd/scrollspy.js' : 'js/src/scrollspy.js', + 'dist/js/umd/tab.js' : 'js/src/tab.js', + 'dist/js/umd/tooltip.js' : 'js/src/tooltip.js', + 'dist/js/umd/popover.js' : 'js/src/popover.js' + } } }, @@ -85,41 +122,51 @@ module.exports = function (grunt) { config: 'js/.jscsrc' }, grunt: { - src: '<%= jshint.grunt.src %>' + src: ['Gruntfile.js', 'grunt/*.js'] }, core: { - src: '<%= jshint.core.src %>' + src: 'js/src/*.js' }, test: { - src: '<%= jshint.test.src %>' + src: 'js/tests/unit/*.js' }, assets: { options: { requireCamelCaseOrUpperCaseIdentifiers: null }, - src: '<%= jshint.assets.src %>' + src: ['docs/assets/js/src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js'] + } + }, + + stamp: { + options: { + banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function ($) {\n', + footer: '\n}(jQuery);' + }, + bootstrap: { + files: { + src: '<%= concat.bootstrap.dest %>' + } } }, concat: { options: { - banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>', stripBanners: false }, bootstrap: { src: [ - 'js/transition.js', - 'js/alert.js', - 'js/button.js', - 'js/carousel.js', - 'js/collapse.js', - 'js/dropdown.js', - 'js/modal.js', - 'js/tooltip.js', - 'js/popover.js', - 'js/scrollspy.js', - 'js/tab.js', - 'js/affix.js' + 'js/src/util.js', + 'js/src/alert.js', + 'js/src/button.js', + 'js/src/carousel.js', + 'js/src/collapse.js', + 'js/src/dropdown.js', + 'js/src/modal.js', + 'js/src/scrollspy.js', + 'js/src/tab.js', + 'js/src/tooltip.js', + 'js/src/popover.js' ], dest: 'dist/js/<%= pkg.name %>.js' } @@ -154,6 +201,9 @@ module.exports = function (grunt) { files: 'js/tests/index.html' }, + + // CSS build configuration + scsslint: { scss: ['scss/*.scss', '!scss/_normalize.scss'], options: { @@ -301,12 +351,12 @@ module.exports = function (grunt) { watch: { src: { - files: '<%= jshint.core.src %>', - tasks: ['jshint:core', 'qunit', 'concat'] + files: '<%= jscs.core.src %>', + tasks: ['babel:dev'] }, test: { - files: '<%= jshint.test.src %>', - tasks: ['jshint:test', 'qunit'] + files: '<%= jscs.test.src %>', + tasks: ['qunit'] }, sass: { files: 'scss/**/*.scss', @@ -398,10 +448,10 @@ module.exports = function (grunt) { testSubtasks.push('saucelabs-qunit'); } grunt.registerTask('test', testSubtasks); - grunt.registerTask('test-js', ['jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']); + grunt.registerTask('test-js', ['jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']); // JS distribution task. - grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']); + grunt.registerTask('dist-js', ['concat', 'lineremover', 'babel:dist', 'stamp', 'uglify:core', 'commonjs']); grunt.registerTask('test-scss', ['scsslint:scss']); @@ -425,8 +475,12 @@ module.exports = function (grunt) { // This can be overzealous, so its changes should always be manually reviewed! grunt.registerTask('change-version-number', 'sed'); - grunt.registerTask('commonjs', 'Generate CommonJS entrypoint module in dist dir.', function () { - var srcFiles = grunt.config.get('concat.bootstrap.src'); + grunt.registerTask('commonjs', ['babel:umd', 'npm-js']); + + grunt.registerTask('npm-js', 'Generate npm-js entrypoint module in dist dir.', function () { + var srcFiles = Object.keys(grunt.config.get('babel.umd.files')).map(function (filename) { + return './' + path.join('umd', path.basename(filename)) + }) var destFilepath = 'dist/js/npm.js'; generateCommonJSModule(grunt, srcFiles, destFilepath); }); @@ -434,7 +488,7 @@ module.exports = function (grunt) { // Docs task. grunt.registerTask('docs-css', ['autoprefixer:docs', 'autoprefixer:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']); grunt.registerTask('docs-js', ['uglify:docsJs']); - grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']); + grunt.registerTask('lint-docs-js', ['jscs:assets']); grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']); grunt.registerTask('docs-github', ['jekyll:github']); diff --git a/dist/css/bootstrap.css b/dist/css/bootstrap.css index acf6ed35f..f7cabd0e0 100644 --- a/dist/css/bootstrap.css +++ b/dist/css/bootstrap.css @@ -1,402 +1,363 @@ -/*! - * Bootstrap v4.0.0-alpha (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - +@charset "UTF-8"; /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ html { font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; } body { - margin: 0; -} + margin: 0; } -article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { - display: block; -} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; } -audio, canvas, progress, video { +audio, +canvas, +progress, +video { display: inline-block; - vertical-align: baseline; -} + vertical-align: baseline; } audio:not([controls]) { display: none; - height: 0; -} + height: 0; } -[hidden], template { - display: none; -} +[hidden], +template { + display: none; } a { - background-color: transparent; -} + background-color: transparent; } a:active { - outline: 0; -} + outline: 0; } + a:hover { - outline: 0; -} + outline: 0; } abbr[title] { - border-bottom: 1px dotted; -} + border-bottom: 1px dotted; } -b, strong { - font-weight: bold; -} +b, +strong { + font-weight: bold; } dfn { - font-style: italic; -} + font-style: italic; } h1 { - margin: .67em 0; font-size: 2em; -} + margin: 0.67em 0; } mark { - color: #000; background: #ff0; -} + color: #000; } small { - font-size: 80%; -} + font-size: 80%; } -sub, sup { - position: relative; +sub, +sup { font-size: 75%; line-height: 0; - vertical-align: baseline; -} + position: relative; + vertical-align: baseline; } sup { - top: -.5em; -} + top: -0.5em; } sub { - bottom: -.25em; -} + bottom: -0.25em; } img { - border: 0; -} + border: 0; } svg:not(:root) { - overflow: hidden; -} + overflow: hidden; } figure { - margin: 1em 40px; -} + margin: 1em 40px; } hr { - height: 0; - -webkit-box-sizing: content-box; - box-sizing: content-box; -} + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; } pre { - overflow: auto; -} + overflow: auto; } -code, kbd, pre, samp { +code, +kbd, +pre, +samp { font-family: monospace, monospace; - font-size: 1em; -} + font-size: 1em; } -button, input, optgroup, select, textarea { - margin: 0; - font: inherit; +button, +input, +optgroup, +select, +textarea { color: inherit; -} + font: inherit; + margin: 0; } button { - overflow: visible; -} + overflow: visible; } -button, select { - text-transform: none; -} +button, +select { + text-transform: none; } -button, html input[type="button"], input[type="reset"], input[type="submit"] { +button, +html input[type="button"], input[type="reset"], +input[type="submit"] { -webkit-appearance: button; - cursor: pointer; -} + cursor: pointer; } -button[disabled], html input[disabled] { - cursor: default; -} +button[disabled], +html input[disabled] { + cursor: default; } -button::-moz-focus-inner, input::-moz-focus-inner { - padding: 0; +button::-moz-focus-inner, +input::-moz-focus-inner { border: 0; -} + padding: 0; } input { - line-height: normal; -} + line-height: normal; } -input[type="checkbox"], input[type="radio"] { - -webkit-box-sizing: border-box; - box-sizing: border-box; - padding: 0; -} +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; } -input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { - height: auto; -} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; } input[type="search"] { - -webkit-box-sizing: content-box; - box-sizing: content-box; -webkit-appearance: textfield; -} + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; } -input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } fieldset { - padding: .35em .625em .75em; - margin: 0 2px; border: 1px solid #c0c0c0; -} + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } legend { - padding: 0; border: 0; -} + padding: 0; } textarea { - overflow: auto; -} + overflow: auto; } optgroup { - font-weight: bold; -} + font-weight: bold; } table { - border-spacing: 0; border-collapse: collapse; -} + border-spacing: 0; } -td, th { - padding: 0; -} +td, +th { + padding: 0; } @media print { - *, *:before, *:after { + *, + *:before, + *:after { text-shadow: none !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; - } - a, a:visited { - text-decoration: underline; - } + box-shadow: none !important; } + a, + a:visited { + text-decoration: underline; } abbr[title]:after { - content: " (" attr(title) ")"; - } - pre, blockquote { + content: " (" attr(title) ")"; } + pre, + blockquote { border: 1px solid #999; - - page-break-inside: avoid; - } + page-break-inside: avoid; } thead { - display: table-header-group; - } - tr, img { - page-break-inside: avoid; - } + display: table-header-group; } + tr, img { - max-width: 100% !important; - } - p, h2, h3 { + page-break-inside: avoid; } + img { + max-width: 100% !important; } + p, + h2, + h3 { orphans: 3; - widows: 3; - } - h2, h3 { - page-break-after: avoid; - } + widows: 3; } + h2, + h3 { + page-break-after: avoid; } .navbar { - display: none; - } - .btn > .caret, .dropup > .btn > .caret { - border-top-color: #000 !important; - } + display: none; } + .btn > .caret, + .dropup > .btn > .caret { + border-top-color: #000 !important; } .label { - border: 1px solid #000; - } + border: 1px solid #000; } .table { - border-collapse: collapse !important; - } - .table td, .table th { - background-color: #fff !important; - } - .table-bordered th, .table-bordered td { - border: 1px solid #ddd !important; - } -} + border-collapse: collapse !important; } + .table td, + .table th { + background-color: #fff !important; } + .table-bordered th, + .table-bordered td { + border: 1px solid #ddd !important; } } html { - -webkit-box-sizing: border-box; - box-sizing: border-box; -} + box-sizing: border-box; } -*, *:before, *:after { - -webkit-box-sizing: inherit; - box-sizing: inherit; -} +*, +*:before, +*:after { + box-sizing: inherit; } -@at-root { - @-moz-viewport { - width: device-width; - } +@-moz-viewport { + width: device-width; } - @-ms-viewport { - width: device-width; - } +@-ms-viewport { + width: device-width; } - @-webkit-viewport { - width: device-width; - } +@-o-viewport { + width: device-width; } - @viewport { - width: device-width; - } -} +@-webkit-viewport { + width: device-width; } + +@viewport { + width: device-width; } html { font-size: 16px; - - -webkit-tap-highlight-color: transparent; -} + -webkit-tap-highlight-color: transparent; } body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1rem; line-height: 1.5; color: #373a3c; - background-color: #fff; -} + background-color: #fff; } h1, h2, h3, h4, h5, h6 { margin-top: 0; - margin-bottom: .5rem; -} + margin-bottom: .5rem; } p { margin-top: 0; - margin-bottom: 1rem; -} + margin-bottom: 1rem; } -abbr[title], abbr[data-original-title] { +abbr[title], +abbr[data-original-title] { cursor: help; - border-bottom: 1px dotted #818a91; -} + border-bottom: 1px dotted #818a91; } address { margin-bottom: 1rem; font-style: normal; - line-height: inherit; -} + line-height: inherit; } -ol, ul, dl { +ol, +ul, +dl { margin-top: 0; - margin-bottom: 1rem; -} + margin-bottom: 1rem; } -ol ol, ul ul, ol ul, ul ol { - margin-bottom: 0; -} +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; } dt { - font-weight: bold; -} + font-weight: bold; } dd { - margin-bottom: .5rem; margin-left: 0; -} + margin-bottom: .5rem; } blockquote { - margin: 0 0 1rem; -} + margin: 0 0 1rem; } a { color: #0275d8; - text-decoration: none; -} -a:focus, a:hover { - color: #014c8c; - text-decoration: underline; -} -a:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} + text-decoration: none; } + a:focus, + a:hover { + color: #014c8c; + text-decoration: underline; } + a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } pre { margin-top: 0; - margin-bottom: 1rem; -} + margin-bottom: 1rem; } figure { - margin: 0 0 1rem; -} + margin: 0 0 1rem; } img { - vertical-align: middle; -} + vertical-align: middle; } [role="button"] { - cursor: pointer; -} + cursor: pointer; } table { - background-color: transparent; -} + background-color: transparent; } caption { - padding-top: .75rem; - padding-bottom: .75rem; - color: #818a91; - text-align: left; caption-side: bottom; -} + padding-top: 0.75rem; + padding-bottom: 0.75rem; + color: #818a91; + text-align: left; } th { - text-align: left; -} + text-align: left; } label { display: inline-block; - margin-bottom: .5rem; -} + margin-bottom: .5rem; } -input, button, select, textarea { +input, +button, +select, +textarea { margin: 0; - line-height: inherit; -} + line-height: inherit; } textarea { - resize: vertical; -} + resize: vertical; } fieldset { - min-width: 0; padding: 0; margin: 0; border: 0; -} + min-width: 0; } legend { display: block; @@ -404,206 +365,206 @@ legend { padding: 0; margin-bottom: .5rem; font-size: 1.5rem; - line-height: inherit; -} + line-height: inherit; } input[type="search"] { - -webkit-appearance: none; -} + -webkit-appearance: none; } output { - display: inline-block; -} + display: inline-block; } -h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { +h1, h2, h3, h4, h5, h6, +.h1, .h2, .h3, .h4, .h5, .h6 { font-family: inherit; font-weight: 500; line-height: 1.1; - color: inherit; -} -h1 small, h1 .small, h2 small, h2 .small, h3 small, h3 .small, h4 small, h4 .small, h5 small, h5 .small, h6 small, h6 .small, .h1 small, .h1 .small, .h2 small, .h2 .small, .h3 small, .h3 .small, .h4 small, .h4 .small, .h5 small, .h5 .small, .h6 small, .h6 .small { - font-weight: normal; - line-height: 1; - color: #818a91; -} + color: inherit; } + h1 small, + h1 .small, h2 small, + h2 .small, h3 small, + h3 .small, h4 small, + h4 .small, h5 small, + h5 .small, h6 small, + h6 .small, + .h1 small, + .h1 .small, .h2 small, + .h2 .small, .h3 small, + .h3 .small, .h4 small, + .h4 .small, .h5 small, + .h5 .small, .h6 small, + .h6 .small { + font-weight: normal; + line-height: 1; + color: #818a91; } -h1, .h1, h2, .h2, h3, .h3 { - margin-bottom: .5rem; -} -h1 small, h1 .small, .h1 small, .h1 .small, h2 small, h2 .small, .h2 small, .h2 .small, h3 small, h3 .small, .h3 small, .h3 .small { - font-size: 65%; -} +h1, .h1, +h2, .h2, +h3, .h3 { + margin-bottom: 0.5rem; } + h1 small, + h1 .small, .h1 small, + .h1 .small, + h2 small, + h2 .small, .h2 small, + .h2 .small, + h3 small, + h3 .small, .h3 small, + .h3 .small { + font-size: 65%; } -h4, .h4, h5, .h5, h6, .h6 { - margin-bottom: .5rem; -} -h4 small, h4 .small, .h4 small, .h4 .small, h5 small, h5 .small, .h5 small, .h5 .small, h6 small, h6 .small, .h6 small, .h6 .small { - font-size: 75%; -} +h4, .h4, +h5, .h5, +h6, .h6 { + margin-bottom: 0.5rem; } + h4 small, + h4 .small, .h4 small, + .h4 .small, + h5 small, + h5 .small, .h5 small, + .h5 .small, + h6 small, + h6 .small, .h6 small, + .h6 .small { + font-size: 75%; } h1, .h1 { - font-size: 2.75rem; -} + font-size: 2.75rem; } h2, .h2 { - font-size: 2.25rem; -} + font-size: 2.25rem; } h3, .h3 { - font-size: 1.75rem; -} + font-size: 1.75rem; } h4, .h4 { - font-size: 1.5rem; -} + font-size: 1.5rem; } h5, .h5 { - font-size: 1.25rem; -} + font-size: 1.25rem; } h6, .h6 { - font-size: 1rem; -} + font-size: 1rem; } .lead { font-size: 1.25rem; - font-weight: 300; -} + font-weight: 300; } hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; - border-top: .0625rem solid #eceeef; -} + border-top: 0.0625rem solid #eceeef; } -small, .small { - font-size: 85%; -} +small, +.small { + font-size: 85%; } -mark, .mark { +mark, +.mark { padding: .2em; - background-color: #fcf8e3; -} + background-color: #fcf8e3; } .list-unstyled { padding-left: 0; - list-style: none; -} + list-style: none; } .list-inline { padding-left: 0; margin-left: -5px; - list-style: none; -} -.list-inline > li { - display: inline-block; - padding-right: 5px; - padding-left: 5px; -} + list-style: none; } + .list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px; } .dl-horizontal { margin-right: -1.5rem; - margin-left: -1.5rem; -} -.dl-horizontal:before, .dl-horizontal:after { - display: table; - content: " "; -} -.dl-horizontal:after { - clear: both; -} + margin-left: -1.5rem; } + .dl-horizontal:before, + .dl-horizontal:after { + content: " "; + display: table; } + .dl-horizontal:after { + clear: both; } .initialism { font-size: 90%; - text-transform: uppercase; -} + text-transform: uppercase; } .blockquote { - padding: .5rem 1rem; + padding: 0.5rem 1rem; margin-bottom: 1rem; font-size: 1.25rem; - border-left: .25rem solid #eceeef; -} -.blockquote p:last-child, .blockquote ul:last-child, .blockquote ol:last-child { - margin-bottom: 0; -} -.blockquote footer { - display: block; - font-size: 80%; - line-height: 1.5; - color: #818a91; -} -.blockquote footer:before { - content: "\2014 \00A0"; -} + border-left: 0.25rem solid #eceeef; } + .blockquote p:last-child, + .blockquote ul:last-child, + .blockquote ol:last-child { + margin-bottom: 0; } + .blockquote footer { + display: block; + font-size: 80%; + line-height: 1.5; + color: #818a91; } + .blockquote footer:before { + content: "\2014 \00A0"; } .blockquote-reverse { padding-right: 1rem; padding-left: 0; text-align: right; - border-right: .25rem solid #eceeef; - border-left: 0; -} -.blockquote-reverse footer:before { - content: ""; -} -.blockquote-reverse footer:after { - content: "\00A0 \2014"; -} + border-right: 0.25rem solid #eceeef; + border-left: 0; } + .blockquote-reverse footer:before { + content: ""; } + .blockquote-reverse footer:after { + content: "\00A0 \2014"; } -.img-responsive, .carousel-inner > .carousel-item > img, .carousel-inner > .carousel-item > a > img { +.img-responsive, .carousel-inner > .carousel-item > img, +.carousel-inner > .carousel-item > a > img { display: block; max-width: 100%; - height: auto; -} + height: auto; } .img-rounded { - border-radius: .3rem; -} + border-radius: 0.3rem; } .img-thumbnail { - display: inline-block; - max-width: 100%; - height: auto; - padding: .25rem; + padding: 0.25rem; line-height: 1.5; background-color: #fff; border: 1px solid #ddd; - border-radius: .25rem; - -webkit-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} + border-radius: 0.25rem; + transition: all 0.2s ease-in-out; + display: inline-block; + max-width: 100%; + height: auto; } .img-circle { - border-radius: 50%; -} + border-radius: 50%; } -code, kbd, pre, samp { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; -} +code, +kbd, +pre, +samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; } code { - padding: .2rem .4rem; + padding: 0.2rem 0.4rem; font-size: 90%; color: #d44950; background-color: #f7f7f9; - border-radius: .25rem; -} + border-radius: 0.25rem; } kbd { - padding: .2rem .4rem; + padding: 0.2rem 0.4rem; font-size: 90%; color: #fff; background-color: #333; - border-radius: .2rem; -} -kbd kbd { - padding: 0; - font-size: 100%; - font-weight: bold; -} + border-radius: 0.2rem; } + kbd kbd { + padding: 0; + font-size: 100%; + font-weight: bold; } pre { display: block; @@ -611,1668 +572,1039 @@ pre { margin-bottom: 1rem; font-size: 90%; line-height: 1.5; - color: #373a3c; -} -pre code { - padding: 0; - font-size: inherit; - color: inherit; - background-color: transparent; - border-radius: 0; -} + color: #373a3c; } + pre code { + padding: 0; + font-size: inherit; + color: inherit; + background-color: transparent; + border-radius: 0; } .pre-scrollable { max-height: 340px; - overflow-y: scroll; -} + overflow-y: scroll; } .container { - padding-right: .75rem; - padding-left: .75rem; margin-right: auto; margin-left: auto; -} -.container:before, .container:after { - display: table; - content: " "; -} -.container:after { - clear: both; -} -@media (min-width: 34em) { - .container { - max-width: 34rem; - } -} -@media (min-width: 48em) { - .container { - max-width: 45rem; - } -} -@media (min-width: 62em) { - .container { - max-width: 60rem; - } -} -@media (min-width: 75em) { - .container { - max-width: 72.25rem; - } -} + padding-left: 0.75rem; + padding-right: 0.75rem; } + .container:before, + .container:after { + content: " "; + display: table; } + .container:after { + clear: both; } + @media (min-width: 34em) { + .container { + max-width: 34rem; } } + @media (min-width: 48em) { + .container { + max-width: 45rem; } } + @media (min-width: 62em) { + .container { + max-width: 60rem; } } + @media (min-width: 75em) { + .container { + max-width: 72.25rem; } } .container-fluid { - padding-right: .75rem; - padding-left: .75rem; margin-right: auto; margin-left: auto; -} -.container-fluid:before, .container-fluid:after { - display: table; - content: " "; -} -.container-fluid:after { - clear: both; -} + padding-left: 0.75rem; + padding-right: 0.75rem; } + .container-fluid:before, + .container-fluid:after { + content: " "; + display: table; } + .container-fluid:after { + clear: both; } .row { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - margin-right: -.75rem; - margin-left: -.75rem; - - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; -} -.row:before, .row:after { - display: table; - content: " "; -} -.row:after { - clear: both; -} + display: flex; + flex-wrap: wrap; + margin-left: -0.75rem; + margin-right: -0.75rem; } + .row:before, + .row:after { + content: " "; + display: table; } + .row:after { + clear: both; } .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 { position: relative; min-height: 1px; - padding-right: .75rem; - padding-left: .75rem; -} + padding-left: 0.75rem; + padding-right: 0.75rem; } .col-xs-1 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 8.333333%; - -ms-flex: 0 0 8.333333%; - flex: 0 0 8.333333%; -} + flex: 0 0 8.333333%; } .col-xs-2 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 16.666667%; - -ms-flex: 0 0 16.666667%; - flex: 0 0 16.666667%; -} + flex: 0 0 16.666667%; } .col-xs-3 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 25%; - -ms-flex: 0 0 25%; - flex: 0 0 25%; -} + flex: 0 0 25%; } .col-xs-4 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 33.333333%; - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; -} + flex: 0 0 33.333333%; } .col-xs-5 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 41.666667%; - -ms-flex: 0 0 41.666667%; - flex: 0 0 41.666667%; -} + flex: 0 0 41.666667%; } .col-xs-6 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 50%; - -ms-flex: 0 0 50%; - flex: 0 0 50%; -} + flex: 0 0 50%; } .col-xs-7 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 58.333333%; - -ms-flex: 0 0 58.333333%; - flex: 0 0 58.333333%; -} + flex: 0 0 58.333333%; } .col-xs-8 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 66.666667%; - -ms-flex: 0 0 66.666667%; - flex: 0 0 66.666667%; -} + flex: 0 0 66.666667%; } .col-xs-9 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 75%; - -ms-flex: 0 0 75%; - flex: 0 0 75%; -} + flex: 0 0 75%; } .col-xs-10 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 83.333333%; - -ms-flex: 0 0 83.333333%; - flex: 0 0 83.333333%; -} + flex: 0 0 83.333333%; } .col-xs-11 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 91.666667%; - -ms-flex: 0 0 91.666667%; - flex: 0 0 91.666667%; -} + flex: 0 0 91.666667%; } .col-xs-12 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 100%; - -ms-flex: 0 0 100%; - flex: 0 0 100%; -} + flex: 0 0 100%; } .col-xs-pull-0 { - right: auto; -} + right: auto; } .col-xs-pull-1 { - right: 8.333333%; -} + right: 8.333333%; } .col-xs-pull-2 { - right: 16.666667%; -} + right: 16.666667%; } .col-xs-pull-3 { - right: 25%; -} + right: 25%; } .col-xs-pull-4 { - right: 33.333333%; -} + right: 33.333333%; } .col-xs-pull-5 { - right: 41.666667%; -} + right: 41.666667%; } .col-xs-pull-6 { - right: 50%; -} + right: 50%; } .col-xs-pull-7 { - right: 58.333333%; -} + right: 58.333333%; } .col-xs-pull-8 { - right: 66.666667%; -} + right: 66.666667%; } .col-xs-pull-9 { - right: 75%; -} + right: 75%; } .col-xs-pull-10 { - right: 83.333333%; -} + right: 83.333333%; } .col-xs-pull-11 { - right: 91.666667%; -} + right: 91.666667%; } .col-xs-pull-12 { - right: 100%; -} + right: 100%; } .col-xs-push-0 { - left: auto; -} + left: auto; } .col-xs-push-1 { - left: 8.333333%; -} + left: 8.333333%; } .col-xs-push-2 { - left: 16.666667%; -} + left: 16.666667%; } .col-xs-push-3 { - left: 25%; -} + left: 25%; } .col-xs-push-4 { - left: 33.333333%; -} + left: 33.333333%; } .col-xs-push-5 { - left: 41.666667%; -} + left: 41.666667%; } .col-xs-push-6 { - left: 50%; -} + left: 50%; } .col-xs-push-7 { - left: 58.333333%; -} + left: 58.333333%; } .col-xs-push-8 { - left: 66.666667%; -} + left: 66.666667%; } .col-xs-push-9 { - left: 75%; -} + left: 75%; } .col-xs-push-10 { - left: 83.333333%; -} + left: 83.333333%; } .col-xs-push-11 { - left: 91.666667%; -} + left: 91.666667%; } .col-xs-push-12 { - left: 100%; -} + left: 100%; } .col-xs-offset-0 { - margin-left: 0; -} + margin-left: 0%; } .col-xs-offset-1 { - margin-left: 8.333333%; -} + margin-left: 8.333333%; } .col-xs-offset-2 { - margin-left: 16.666667%; -} + margin-left: 16.666667%; } .col-xs-offset-3 { - margin-left: 25%; -} + margin-left: 25%; } .col-xs-offset-4 { - margin-left: 33.333333%; -} + margin-left: 33.333333%; } .col-xs-offset-5 { - margin-left: 41.666667%; -} + margin-left: 41.666667%; } .col-xs-offset-6 { - margin-left: 50%; -} + margin-left: 50%; } .col-xs-offset-7 { - margin-left: 58.333333%; -} + margin-left: 58.333333%; } .col-xs-offset-8 { - margin-left: 66.666667%; -} + margin-left: 66.666667%; } .col-xs-offset-9 { - margin-left: 75%; -} + margin-left: 75%; } .col-xs-offset-10 { - margin-left: 83.333333%; -} + margin-left: 83.333333%; } .col-xs-offset-11 { - margin-left: 91.666667%; -} + margin-left: 91.666667%; } .col-xs-offset-12 { - margin-left: 100%; -} + margin-left: 100%; } @media (min-width: 34em) { .col-sm-1 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 8.333333%; - -ms-flex: 0 0 8.333333%; - flex: 0 0 8.333333%; - } + flex: 0 0 8.333333%; } .col-sm-2 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 16.666667%; - -ms-flex: 0 0 16.666667%; - flex: 0 0 16.666667%; - } + flex: 0 0 16.666667%; } .col-sm-3 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 25%; - -ms-flex: 0 0 25%; - flex: 0 0 25%; - } + flex: 0 0 25%; } .col-sm-4 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 33.333333%; - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; - } + flex: 0 0 33.333333%; } .col-sm-5 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 41.666667%; - -ms-flex: 0 0 41.666667%; - flex: 0 0 41.666667%; - } + flex: 0 0 41.666667%; } .col-sm-6 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 50%; - -ms-flex: 0 0 50%; - flex: 0 0 50%; - } + flex: 0 0 50%; } .col-sm-7 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 58.333333%; - -ms-flex: 0 0 58.333333%; - flex: 0 0 58.333333%; - } + flex: 0 0 58.333333%; } .col-sm-8 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 66.666667%; - -ms-flex: 0 0 66.666667%; - flex: 0 0 66.666667%; - } + flex: 0 0 66.666667%; } .col-sm-9 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 75%; - -ms-flex: 0 0 75%; - flex: 0 0 75%; - } + flex: 0 0 75%; } .col-sm-10 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 83.333333%; - -ms-flex: 0 0 83.333333%; - flex: 0 0 83.333333%; - } + flex: 0 0 83.333333%; } .col-sm-11 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 91.666667%; - -ms-flex: 0 0 91.666667%; - flex: 0 0 91.666667%; - } + flex: 0 0 91.666667%; } .col-sm-12 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 100%; - -ms-flex: 0 0 100%; - flex: 0 0 100%; - } + flex: 0 0 100%; } .col-sm-pull-0 { - right: auto; - } + right: auto; } .col-sm-pull-1 { - right: 8.333333%; - } + right: 8.333333%; } .col-sm-pull-2 { - right: 16.666667%; - } + right: 16.666667%; } .col-sm-pull-3 { - right: 25%; - } + right: 25%; } .col-sm-pull-4 { - right: 33.333333%; - } + right: 33.333333%; } .col-sm-pull-5 { - right: 41.666667%; - } + right: 41.666667%; } .col-sm-pull-6 { - right: 50%; - } + right: 50%; } .col-sm-pull-7 { - right: 58.333333%; - } + right: 58.333333%; } .col-sm-pull-8 { - right: 66.666667%; - } + right: 66.666667%; } .col-sm-pull-9 { - right: 75%; - } + right: 75%; } .col-sm-pull-10 { - right: 83.333333%; - } + right: 83.333333%; } .col-sm-pull-11 { - right: 91.666667%; - } + right: 91.666667%; } .col-sm-pull-12 { - right: 100%; - } + right: 100%; } .col-sm-push-0 { - left: auto; - } + left: auto; } .col-sm-push-1 { - left: 8.333333%; - } + left: 8.333333%; } .col-sm-push-2 { - left: 16.666667%; - } + left: 16.666667%; } .col-sm-push-3 { - left: 25%; - } + left: 25%; } .col-sm-push-4 { - left: 33.333333%; - } + left: 33.333333%; } .col-sm-push-5 { - left: 41.666667%; - } + left: 41.666667%; } .col-sm-push-6 { - left: 50%; - } + left: 50%; } .col-sm-push-7 { - left: 58.333333%; - } + left: 58.333333%; } .col-sm-push-8 { - left: 66.666667%; - } + left: 66.666667%; } .col-sm-push-9 { - left: 75%; - } + left: 75%; } .col-sm-push-10 { - left: 83.333333%; - } + left: 83.333333%; } .col-sm-push-11 { - left: 91.666667%; - } + left: 91.666667%; } .col-sm-push-12 { - left: 100%; - } + left: 100%; } .col-sm-offset-0 { - margin-left: 0; - } + margin-left: 0%; } .col-sm-offset-1 { - margin-left: 8.333333%; - } + margin-left: 8.333333%; } .col-sm-offset-2 { - margin-left: 16.666667%; - } + margin-left: 16.666667%; } .col-sm-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .col-sm-offset-4 { - margin-left: 33.333333%; - } + margin-left: 33.333333%; } .col-sm-offset-5 { - margin-left: 41.666667%; - } + margin-left: 41.666667%; } .col-sm-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .col-sm-offset-7 { - margin-left: 58.333333%; - } + margin-left: 58.333333%; } .col-sm-offset-8 { - margin-left: 66.666667%; - } + margin-left: 66.666667%; } .col-sm-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .col-sm-offset-10 { - margin-left: 83.333333%; - } + margin-left: 83.333333%; } .col-sm-offset-11 { - margin-left: 91.666667%; - } + margin-left: 91.666667%; } .col-sm-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } @media (min-width: 48em) { .col-md-1 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 8.333333%; - -ms-flex: 0 0 8.333333%; - flex: 0 0 8.333333%; - } + flex: 0 0 8.333333%; } .col-md-2 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 16.666667%; - -ms-flex: 0 0 16.666667%; - flex: 0 0 16.666667%; - } + flex: 0 0 16.666667%; } .col-md-3 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 25%; - -ms-flex: 0 0 25%; - flex: 0 0 25%; - } + flex: 0 0 25%; } .col-md-4 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 33.333333%; - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; - } + flex: 0 0 33.333333%; } .col-md-5 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 41.666667%; - -ms-flex: 0 0 41.666667%; - flex: 0 0 41.666667%; - } + flex: 0 0 41.666667%; } .col-md-6 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 50%; - -ms-flex: 0 0 50%; - flex: 0 0 50%; - } + flex: 0 0 50%; } .col-md-7 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 58.333333%; - -ms-flex: 0 0 58.333333%; - flex: 0 0 58.333333%; - } + flex: 0 0 58.333333%; } .col-md-8 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 66.666667%; - -ms-flex: 0 0 66.666667%; - flex: 0 0 66.666667%; - } + flex: 0 0 66.666667%; } .col-md-9 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 75%; - -ms-flex: 0 0 75%; - flex: 0 0 75%; - } + flex: 0 0 75%; } .col-md-10 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 83.333333%; - -ms-flex: 0 0 83.333333%; - flex: 0 0 83.333333%; - } + flex: 0 0 83.333333%; } .col-md-11 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 91.666667%; - -ms-flex: 0 0 91.666667%; - flex: 0 0 91.666667%; - } + flex: 0 0 91.666667%; } .col-md-12 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 100%; - -ms-flex: 0 0 100%; - flex: 0 0 100%; - } + flex: 0 0 100%; } .col-md-pull-0 { - right: auto; - } + right: auto; } .col-md-pull-1 { - right: 8.333333%; - } + right: 8.333333%; } .col-md-pull-2 { - right: 16.666667%; - } + right: 16.666667%; } .col-md-pull-3 { - right: 25%; - } + right: 25%; } .col-md-pull-4 { - right: 33.333333%; - } + right: 33.333333%; } .col-md-pull-5 { - right: 41.666667%; - } + right: 41.666667%; } .col-md-pull-6 { - right: 50%; - } + right: 50%; } .col-md-pull-7 { - right: 58.333333%; - } + right: 58.333333%; } .col-md-pull-8 { - right: 66.666667%; - } + right: 66.666667%; } .col-md-pull-9 { - right: 75%; - } + right: 75%; } .col-md-pull-10 { - right: 83.333333%; - } + right: 83.333333%; } .col-md-pull-11 { - right: 91.666667%; - } + right: 91.666667%; } .col-md-pull-12 { - right: 100%; - } + right: 100%; } .col-md-push-0 { - left: auto; - } + left: auto; } .col-md-push-1 { - left: 8.333333%; - } + left: 8.333333%; } .col-md-push-2 { - left: 16.666667%; - } + left: 16.666667%; } .col-md-push-3 { - left: 25%; - } + left: 25%; } .col-md-push-4 { - left: 33.333333%; - } + left: 33.333333%; } .col-md-push-5 { - left: 41.666667%; - } + left: 41.666667%; } .col-md-push-6 { - left: 50%; - } + left: 50%; } .col-md-push-7 { - left: 58.333333%; - } + left: 58.333333%; } .col-md-push-8 { - left: 66.666667%; - } + left: 66.666667%; } .col-md-push-9 { - left: 75%; - } + left: 75%; } .col-md-push-10 { - left: 83.333333%; - } + left: 83.333333%; } .col-md-push-11 { - left: 91.666667%; - } + left: 91.666667%; } .col-md-push-12 { - left: 100%; - } + left: 100%; } .col-md-offset-0 { - margin-left: 0; - } + margin-left: 0%; } .col-md-offset-1 { - margin-left: 8.333333%; - } + margin-left: 8.333333%; } .col-md-offset-2 { - margin-left: 16.666667%; - } + margin-left: 16.666667%; } .col-md-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .col-md-offset-4 { - margin-left: 33.333333%; - } + margin-left: 33.333333%; } .col-md-offset-5 { - margin-left: 41.666667%; - } + margin-left: 41.666667%; } .col-md-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .col-md-offset-7 { - margin-left: 58.333333%; - } + margin-left: 58.333333%; } .col-md-offset-8 { - margin-left: 66.666667%; - } + margin-left: 66.666667%; } .col-md-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .col-md-offset-10 { - margin-left: 83.333333%; - } + margin-left: 83.333333%; } .col-md-offset-11 { - margin-left: 91.666667%; - } + margin-left: 91.666667%; } .col-md-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } @media (min-width: 62em) { .col-lg-1 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 8.333333%; - -ms-flex: 0 0 8.333333%; - flex: 0 0 8.333333%; - } + flex: 0 0 8.333333%; } .col-lg-2 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 16.666667%; - -ms-flex: 0 0 16.666667%; - flex: 0 0 16.666667%; - } + flex: 0 0 16.666667%; } .col-lg-3 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 25%; - -ms-flex: 0 0 25%; - flex: 0 0 25%; - } + flex: 0 0 25%; } .col-lg-4 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 33.333333%; - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; - } + flex: 0 0 33.333333%; } .col-lg-5 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 41.666667%; - -ms-flex: 0 0 41.666667%; - flex: 0 0 41.666667%; - } + flex: 0 0 41.666667%; } .col-lg-6 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 50%; - -ms-flex: 0 0 50%; - flex: 0 0 50%; - } + flex: 0 0 50%; } .col-lg-7 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 58.333333%; - -ms-flex: 0 0 58.333333%; - flex: 0 0 58.333333%; - } + flex: 0 0 58.333333%; } .col-lg-8 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 66.666667%; - -ms-flex: 0 0 66.666667%; - flex: 0 0 66.666667%; - } + flex: 0 0 66.666667%; } .col-lg-9 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 75%; - -ms-flex: 0 0 75%; - flex: 0 0 75%; - } + flex: 0 0 75%; } .col-lg-10 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 83.333333%; - -ms-flex: 0 0 83.333333%; - flex: 0 0 83.333333%; - } + flex: 0 0 83.333333%; } .col-lg-11 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 91.666667%; - -ms-flex: 0 0 91.666667%; - flex: 0 0 91.666667%; - } + flex: 0 0 91.666667%; } .col-lg-12 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 100%; - -ms-flex: 0 0 100%; - flex: 0 0 100%; - } + flex: 0 0 100%; } .col-lg-pull-0 { - right: auto; - } + right: auto; } .col-lg-pull-1 { - right: 8.333333%; - } + right: 8.333333%; } .col-lg-pull-2 { - right: 16.666667%; - } + right: 16.666667%; } .col-lg-pull-3 { - right: 25%; - } + right: 25%; } .col-lg-pull-4 { - right: 33.333333%; - } + right: 33.333333%; } .col-lg-pull-5 { - right: 41.666667%; - } + right: 41.666667%; } .col-lg-pull-6 { - right: 50%; - } + right: 50%; } .col-lg-pull-7 { - right: 58.333333%; - } + right: 58.333333%; } .col-lg-pull-8 { - right: 66.666667%; - } + right: 66.666667%; } .col-lg-pull-9 { - right: 75%; - } + right: 75%; } .col-lg-pull-10 { - right: 83.333333%; - } + right: 83.333333%; } .col-lg-pull-11 { - right: 91.666667%; - } + right: 91.666667%; } .col-lg-pull-12 { - right: 100%; - } + right: 100%; } .col-lg-push-0 { - left: auto; - } + left: auto; } .col-lg-push-1 { - left: 8.333333%; - } + left: 8.333333%; } .col-lg-push-2 { - left: 16.666667%; - } + left: 16.666667%; } .col-lg-push-3 { - left: 25%; - } + left: 25%; } .col-lg-push-4 { - left: 33.333333%; - } + left: 33.333333%; } .col-lg-push-5 { - left: 41.666667%; - } + left: 41.666667%; } .col-lg-push-6 { - left: 50%; - } + left: 50%; } .col-lg-push-7 { - left: 58.333333%; - } + left: 58.333333%; } .col-lg-push-8 { - left: 66.666667%; - } + left: 66.666667%; } .col-lg-push-9 { - left: 75%; - } + left: 75%; } .col-lg-push-10 { - left: 83.333333%; - } + left: 83.333333%; } .col-lg-push-11 { - left: 91.666667%; - } + left: 91.666667%; } .col-lg-push-12 { - left: 100%; - } + left: 100%; } .col-lg-offset-0 { - margin-left: 0; - } + margin-left: 0%; } .col-lg-offset-1 { - margin-left: 8.333333%; - } + margin-left: 8.333333%; } .col-lg-offset-2 { - margin-left: 16.666667%; - } + margin-left: 16.666667%; } .col-lg-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .col-lg-offset-4 { - margin-left: 33.333333%; - } + margin-left: 33.333333%; } .col-lg-offset-5 { - margin-left: 41.666667%; - } + margin-left: 41.666667%; } .col-lg-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .col-lg-offset-7 { - margin-left: 58.333333%; - } + margin-left: 58.333333%; } .col-lg-offset-8 { - margin-left: 66.666667%; - } + margin-left: 66.666667%; } .col-lg-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .col-lg-offset-10 { - margin-left: 83.333333%; - } + margin-left: 83.333333%; } .col-lg-offset-11 { - margin-left: 91.666667%; - } + margin-left: 91.666667%; } .col-lg-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } @media (min-width: 75em) { .col-xl-1 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 8.333333%; - -ms-flex: 0 0 8.333333%; - flex: 0 0 8.333333%; - } + flex: 0 0 8.333333%; } .col-xl-2 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 16.666667%; - -ms-flex: 0 0 16.666667%; - flex: 0 0 16.666667%; - } + flex: 0 0 16.666667%; } .col-xl-3 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 25%; - -ms-flex: 0 0 25%; - flex: 0 0 25%; - } + flex: 0 0 25%; } .col-xl-4 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 33.333333%; - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; - } + flex: 0 0 33.333333%; } .col-xl-5 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 41.666667%; - -ms-flex: 0 0 41.666667%; - flex: 0 0 41.666667%; - } + flex: 0 0 41.666667%; } .col-xl-6 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 50%; - -ms-flex: 0 0 50%; - flex: 0 0 50%; - } + flex: 0 0 50%; } .col-xl-7 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 58.333333%; - -ms-flex: 0 0 58.333333%; - flex: 0 0 58.333333%; - } + flex: 0 0 58.333333%; } .col-xl-8 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 66.666667%; - -ms-flex: 0 0 66.666667%; - flex: 0 0 66.666667%; - } + flex: 0 0 66.666667%; } .col-xl-9 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 75%; - -ms-flex: 0 0 75%; - flex: 0 0 75%; - } + flex: 0 0 75%; } .col-xl-10 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 83.333333%; - -ms-flex: 0 0 83.333333%; - flex: 0 0 83.333333%; - } + flex: 0 0 83.333333%; } .col-xl-11 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 91.666667%; - -ms-flex: 0 0 91.666667%; - flex: 0 0 91.666667%; - } + flex: 0 0 91.666667%; } .col-xl-12 { - -webkit-box-flex: 0; - -webkit-flex: 0 0 100%; - -ms-flex: 0 0 100%; - flex: 0 0 100%; - } + flex: 0 0 100%; } .col-xl-pull-0 { - right: auto; - } + right: auto; } .col-xl-pull-1 { - right: 8.333333%; - } + right: 8.333333%; } .col-xl-pull-2 { - right: 16.666667%; - } + right: 16.666667%; } .col-xl-pull-3 { - right: 25%; - } + right: 25%; } .col-xl-pull-4 { - right: 33.333333%; - } + right: 33.333333%; } .col-xl-pull-5 { - right: 41.666667%; - } + right: 41.666667%; } .col-xl-pull-6 { - right: 50%; - } + right: 50%; } .col-xl-pull-7 { - right: 58.333333%; - } + right: 58.333333%; } .col-xl-pull-8 { - right: 66.666667%; - } + right: 66.666667%; } .col-xl-pull-9 { - right: 75%; - } + right: 75%; } .col-xl-pull-10 { - right: 83.333333%; - } + right: 83.333333%; } .col-xl-pull-11 { - right: 91.666667%; - } + right: 91.666667%; } .col-xl-pull-12 { - right: 100%; - } + right: 100%; } .col-xl-push-0 { - left: auto; - } + left: auto; } .col-xl-push-1 { - left: 8.333333%; - } + left: 8.333333%; } .col-xl-push-2 { - left: 16.666667%; - } + left: 16.666667%; } .col-xl-push-3 { - left: 25%; - } + left: 25%; } .col-xl-push-4 { - left: 33.333333%; - } + left: 33.333333%; } .col-xl-push-5 { - left: 41.666667%; - } + left: 41.666667%; } .col-xl-push-6 { - left: 50%; - } + left: 50%; } .col-xl-push-7 { - left: 58.333333%; - } + left: 58.333333%; } .col-xl-push-8 { - left: 66.666667%; - } + left: 66.666667%; } .col-xl-push-9 { - left: 75%; - } + left: 75%; } .col-xl-push-10 { - left: 83.333333%; - } + left: 83.333333%; } .col-xl-push-11 { - left: 91.666667%; - } + left: 91.666667%; } .col-xl-push-12 { - left: 100%; - } + left: 100%; } .col-xl-offset-0 { - margin-left: 0; - } + margin-left: 0%; } .col-xl-offset-1 { - margin-left: 8.333333%; - } + margin-left: 8.333333%; } .col-xl-offset-2 { - margin-left: 16.666667%; - } + margin-left: 16.666667%; } .col-xl-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .col-xl-offset-4 { - margin-left: 33.333333%; - } + margin-left: 33.333333%; } .col-xl-offset-5 { - margin-left: 41.666667%; - } + margin-left: 41.666667%; } .col-xl-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .col-xl-offset-7 { - margin-left: 58.333333%; - } + margin-left: 58.333333%; } .col-xl-offset-8 { - margin-left: 66.666667%; - } + margin-left: 66.666667%; } .col-xl-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .col-xl-offset-10 { - margin-left: 83.333333%; - } + margin-left: 83.333333%; } .col-xl-offset-11 { - margin-left: 91.666667%; - } + margin-left: 91.666667%; } .col-xl-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } .col-xs-first { - -webkit-box-ordinal-group: 0; - -webkit-order: -1; - -ms-flex-order: -1; - order: -1; -} + order: -1; } .col-xs-last { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; -} + order: 1; } @media (min-width: 34em) { .col-sm-first { - -webkit-box-ordinal-group: 0; - -webkit-order: -1; - -ms-flex-order: -1; - order: -1; - } + order: -1; } .col-sm-last { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; - } -} + order: 1; } } @media (min-width: 48em) { .col-md-first { - -webkit-box-ordinal-group: 0; - -webkit-order: -1; - -ms-flex-order: -1; - order: -1; - } + order: -1; } .col-md-last { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; - } -} + order: 1; } } @media (min-width: 62em) { .col-lg-first { - -webkit-box-ordinal-group: 0; - -webkit-order: -1; - -ms-flex-order: -1; - order: -1; - } + order: -1; } .col-lg-last { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; - } -} + order: 1; } } @media (min-width: 75em) { .col-xl-first { - -webkit-box-ordinal-group: 0; - -webkit-order: -1; - -ms-flex-order: -1; - order: -1; - } + order: -1; } .col-xl-last { - -webkit-box-ordinal-group: 2; - -webkit-order: 1; - -ms-flex-order: 1; - order: 1; - } -} + order: 1; } } .row-xs-top { - -webkit-box-align: start; - -webkit-align-items: flex-start; - -ms-flex-align: start; - align-items: flex-start; -} + align-items: flex-start; } .row-xs-center { - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; -} + align-items: center; } .row-xs-bottom { - -webkit-box-align: end; - -webkit-align-items: flex-end; - -ms-flex-align: end; - align-items: flex-end; -} + align-items: flex-end; } @media (min-width: 34em) { .row-sm-top { - -webkit-box-align: start; - -webkit-align-items: flex-start; - -ms-flex-align: start; - align-items: flex-start; - } + align-items: flex-start; } .row-sm-center { - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } + align-items: center; } .row-sm-bottom { - -webkit-box-align: end; - -webkit-align-items: flex-end; - -ms-flex-align: end; - align-items: flex-end; - } -} + align-items: flex-end; } } @media (min-width: 48em) { .row-md-top { - -webkit-box-align: start; - -webkit-align-items: flex-start; - -ms-flex-align: start; - align-items: flex-start; - } + align-items: flex-start; } .row-md-center { - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } + align-items: center; } .row-md-bottom { - -webkit-box-align: end; - -webkit-align-items: flex-end; - -ms-flex-align: end; - align-items: flex-end; - } -} + align-items: flex-end; } } @media (min-width: 62em) { .row-lg-top { - -webkit-box-align: start; - -webkit-align-items: flex-start; - -ms-flex-align: start; - align-items: flex-start; - } + align-items: flex-start; } .row-lg-center { - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } + align-items: center; } .row-lg-bottom { - -webkit-box-align: end; - -webkit-align-items: flex-end; - -ms-flex-align: end; - align-items: flex-end; - } -} + align-items: flex-end; } } @media (min-width: 75em) { .row-xl-top { - -webkit-box-align: start; - -webkit-align-items: flex-start; - -ms-flex-align: start; - align-items: flex-start; - } + align-items: flex-start; } .row-xl-center { - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - } + align-items: center; } .row-xl-bottom { - -webkit-box-align: end; - -webkit-align-items: flex-end; - -ms-flex-align: end; - align-items: flex-end; - } -} + align-items: flex-end; } } .col-xs-top { - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; -} + align-self: flex-start; } .col-xs-center { - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; -} + align-self: center; } .col-xs-bottom { - -webkit-align-self: flex-end; - -ms-flex-item-align: end; - align-self: flex-end; -} + align-self: flex-end; } @media (min-width: 34em) { .col-sm-top { - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; - } + align-self: flex-start; } .col-sm-center { - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - } + align-self: center; } .col-sm-bottom { - -webkit-align-self: flex-end; - -ms-flex-item-align: end; - align-self: flex-end; - } -} + align-self: flex-end; } } @media (min-width: 48em) { .col-md-top { - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; - } + align-self: flex-start; } .col-md-center { - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - } + align-self: center; } .col-md-bottom { - -webkit-align-self: flex-end; - -ms-flex-item-align: end; - align-self: flex-end; - } -} + align-self: flex-end; } } @media (min-width: 62em) { .col-lg-top { - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; - } + align-self: flex-start; } .col-lg-center { - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - } + align-self: center; } .col-lg-bottom { - -webkit-align-self: flex-end; - -ms-flex-item-align: end; - align-self: flex-end; - } -} + align-self: flex-end; } } @media (min-width: 75em) { .col-xl-top { - -webkit-align-self: flex-start; - -ms-flex-item-align: start; - align-self: flex-start; - } + align-self: flex-start; } .col-xl-center { - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; - } + align-self: center; } .col-xl-bottom { - -webkit-align-self: flex-end; - -ms-flex-item-align: end; - align-self: flex-end; - } -} + align-self: flex-end; } } .table { width: 100%; max-width: 100%; - margin-bottom: 1rem; -} -.table th, .table td { - padding: .75rem; - line-height: 1.5; - vertical-align: top; - border-top: 1px solid #eceeef; -} -.table thead th { - vertical-align: bottom; - border-bottom: 2px solid #eceeef; -} -.table tbody + tbody { - border-top: 2px solid #eceeef; -} -.table .table { - background-color: #fff; -} + margin-bottom: 1rem; } + .table th, + .table td { + padding: 0.75rem; + line-height: 1.5; + vertical-align: top; + border-top: 1px solid #eceeef; } + .table thead th { + vertical-align: bottom; + border-bottom: 2px solid #eceeef; } + .table tbody + tbody { + border-top: 2px solid #eceeef; } + .table .table { + background-color: #fff; } -.table-sm th, .table-sm td { - padding: .3rem; -} +.table-sm th, +.table-sm td { + padding: 0.3rem; } .table-bordered { - border: 1px solid #eceeef; -} -.table-bordered th, .table-bordered td { - border: 1px solid #eceeef; -} -.table-bordered thead th, .table-bordered thead td { - border-bottom-width: 2px; -} + border: 1px solid #eceeef; } + .table-bordered th, + .table-bordered td { + border: 1px solid #eceeef; } + .table-bordered thead th, + .table-bordered thead td { + border-bottom-width: 2px; } .table-striped tbody tr:nth-of-type(odd) { - background-color: #f9f9f9; -} + background-color: #f9f9f9; } .table-hover tbody tr:hover { - background-color: #f5f5f5; -} + background-color: #f5f5f5; } -.table-active, .table-active > th, .table-active > td { - background-color: #f5f5f5; -} +.table-active, +.table-active > th, +.table-active > td { + background-color: #f5f5f5; } .table-hover .table-active:hover { - background-color: #e8e8e8; -} -.table-hover .table-active:hover > td, .table-hover .table-active:hover > th { - background-color: #e8e8e8; -} + background-color: #e8e8e8; } + .table-hover .table-active:hover > td, + .table-hover .table-active:hover > th { + background-color: #e8e8e8; } -.table-success, .table-success > th, .table-success > td { - background-color: #dff0d8; -} +.table-success, +.table-success > th, +.table-success > td { + background-color: #dff0d8; } .table-hover .table-success:hover { - background-color: #d0e9c6; -} -.table-hover .table-success:hover > td, .table-hover .table-success:hover > th { - background-color: #d0e9c6; -} + background-color: #d0e9c6; } + .table-hover .table-success:hover > td, + .table-hover .table-success:hover > th { + background-color: #d0e9c6; } -.table-info, .table-info > th, .table-info > td { - background-color: #d9edf7; -} +.table-info, +.table-info > th, +.table-info > td { + background-color: #d9edf7; } .table-hover .table-info:hover { - background-color: #c4e3f3; -} -.table-hover .table-info:hover > td, .table-hover .table-info:hover > th { - background-color: #c4e3f3; -} + background-color: #c4e3f3; } + .table-hover .table-info:hover > td, + .table-hover .table-info:hover > th { + background-color: #c4e3f3; } -.table-warning, .table-warning > th, .table-warning > td { - background-color: #fcf8e3; -} +.table-warning, +.table-warning > th, +.table-warning > td { + background-color: #fcf8e3; } .table-hover .table-warning:hover { - background-color: #faf2cc; -} -.table-hover .table-warning:hover > td, .table-hover .table-warning:hover > th { - background-color: #faf2cc; -} + background-color: #faf2cc; } + .table-hover .table-warning:hover > td, + .table-hover .table-warning:hover > th { + background-color: #faf2cc; } -.table-danger, .table-danger > th, .table-danger > td { - background-color: #f2dede; -} +.table-danger, +.table-danger > th, +.table-danger > td { + background-color: #f2dede; } .table-hover .table-danger:hover { - background-color: #ebcccc; -} -.table-hover .table-danger:hover > td, .table-hover .table-danger:hover > th { - background-color: #ebcccc; -} + background-color: #ebcccc; } + .table-hover .table-danger:hover > td, + .table-hover .table-danger:hover > th { + background-color: #ebcccc; } .table-responsive { display: block; width: 100%; - overflow-x: auto; -} + overflow-x: auto; } .thead-inverse th { color: #fff; - background-color: #373a3c; -} + background-color: #373a3c; } .thead-default th { color: #55595c; - background-color: #eceeef; -} + background-color: #eceeef; } .table-inverse { color: #eceeef; - background-color: #373a3c; -} -.table-inverse.table-bordered { - border: 0; -} -.table-inverse th, .table-inverse td, .table-inverse thead th { - border-color: #55595c; -} + background-color: #373a3c; } + .table-inverse.table-bordered { + border: 0; } + .table-inverse th, + .table-inverse td, + .table-inverse thead th { + border-color: #55595c; } .table-reflow thead { - float: left; -} + float: left; } + .table-reflow tbody { display: block; - white-space: nowrap; -} -.table-reflow th, .table-reflow td { + white-space: nowrap; } + +.table-reflow th, +.table-reflow td { border-top: 1px solid #eceeef; - border-left: 1px solid #eceeef; -} -.table-reflow th:last-child, .table-reflow td:last-child { - border-right: 1px solid #eceeef; -} -.table-reflow thead:last-child tr:last-child th, .table-reflow thead:last-child tr:last-child td, .table-reflow tbody:last-child tr:last-child th, .table-reflow tbody:last-child tr:last-child td, .table-reflow tfoot:last-child tr:last-child th, .table-reflow tfoot:last-child tr:last-child td { - border-bottom: 1px solid #eceeef; -} + border-left: 1px solid #eceeef; } + .table-reflow th:last-child, + .table-reflow td:last-child { + border-right: 1px solid #eceeef; } + +.table-reflow thead:last-child tr:last-child th, +.table-reflow thead:last-child tr:last-child td, +.table-reflow tbody:last-child tr:last-child th, +.table-reflow tbody:last-child tr:last-child td, +.table-reflow tfoot:last-child tr:last-child th, +.table-reflow tfoot:last-child tr:last-child td { + border-bottom: 1px solid #eceeef; } + .table-reflow tr { - float: left; -} -.table-reflow tr th, .table-reflow tr td { - display: block !important; - border: 1px solid #eceeef; -} + float: left; } + .table-reflow tr th, + .table-reflow tr td { + display: block !important; + border: 1px solid #eceeef; } .form-control { display: block; width: 100%; - padding: .5rem .75rem; + padding: 0.5rem 0.75rem; font-size: 1rem; line-height: 1.5; color: #55595c; background-color: #fff; background-image: none; border: 1px solid #ccc; - border-radius: .25rem; - -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -.form-control:not(textarea), .form-control:not(select[size]), .form-control:not(select[multiple]) { - height: 2.625rem; -} -.form-control:focus { - border-color: #66afe9; - outline: none; -} -.form-control::-webkit-input-placeholder { - color: #999; - opacity: 1; -} -.form-control::-moz-placeholder { - color: #999; - opacity: 1; -} -.form-control:-ms-input-placeholder { - color: #999; - opacity: 1; -} -.form-control::placeholder { - color: #999; - opacity: 1; -} -.form-control:disabled, .form-control[readonly], fieldset[disabled] .form-control { - background-color: #eceeef; - opacity: 1; -} -.form-control[disabled], fieldset[disabled] .form-control { - cursor: false; -} + border-radius: 0.25rem; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; } + .form-control:not(textarea), + .form-control:not(select[size]), + .form-control:not(select[multiple]) { + height: 2.625rem; } + .form-control:focus { + border-color: #66afe9; + outline: none; } + .form-control::placeholder { + color: #999; + opacity: 1; } + .form-control:disabled, + .form-control[readonly], + fieldset[disabled] .form-control { + background-color: #eceeef; + opacity: 1; } + .form-control[disabled], + fieldset[disabled] .form-control { + cursor: not-allowed; } -.form-control-file, .form-control-range { - display: block; -} +.form-control-file, +.form-control-range { + display: block; } .form-control-label { - padding: .5625rem .75rem; - margin-bottom: 0; -} + padding: 0.5625rem 0.75rem; + margin-bottom: 0; } .form-control-static { min-height: 2.625rem; - padding-top: .5625rem; - padding-bottom: .5625rem; - margin-bottom: 0; -} -.form-control-static.form-control-sm, .input-group-sm > .form-control-static.form-control, .input-group-sm > .form-control-static.input-group-addon, .input-group-sm > .input-group-btn > .form-control-static.btn, .form-control-static.form-control-lg, .input-group-lg > .form-control-static.form-control, .input-group-lg > .form-control-static.input-group-addon, .input-group-lg > .input-group-btn > .form-control-static.btn { - padding-right: 0; - padding-left: 0; -} + padding-top: 0.5625rem; + padding-bottom: 0.5625rem; + margin-bottom: 0; } + .form-control-static.form-control-sm, + .input-group-sm > .form-control-static.form-control, + .input-group-sm > .form-control-static.input-group-addon, + .input-group-sm > .input-group-btn > .form-control-static.btn, + .form-control-static.form-control-lg, .input-group-lg > .form-control-static.form-control, + .input-group-lg > .form-control-static.input-group-addon, + .input-group-lg > .input-group-btn > .form-control-static.btn { + padding-right: 0; + padding-left: 0; } -.form-control-sm, .input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { +.form-control-sm, .input-group-sm > .form-control, +.input-group-sm > .input-group-addon, +.input-group-sm > .input-group-btn > .btn { height: 2rem; - padding: .3rem .75rem; - font-size: .85rem; + padding: 0.3rem 0.75rem; + font-size: 0.85rem; line-height: 1.5; - border-radius: .2rem; -} + border-radius: 0.2rem; } -.form-control-lg, .input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { +.form-control-lg, .input-group-lg > .form-control, +.input-group-lg > .input-group-addon, +.input-group-lg > .input-group-btn > .btn { height: 3.291667rem; - padding: .75rem 1.5rem; + padding: 0.75rem 1.5rem; font-size: 1.25rem; line-height: 1.333333; - border-radius: .3rem; -} + border-radius: 0.3rem; } .form-group { - margin-bottom: 15px; -} + margin-bottom: 15px; } -.radio, .checkbox { +.radio, +.checkbox { position: relative; display: block; - margin-bottom: .75rem; -} -.radio label, .checkbox label { - padding-left: 1.25rem; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} -.radio label input:only-child, .checkbox label input:only-child { - position: static; -} + margin-bottom: 0.75rem; } + .radio label, + .checkbox label { + padding-left: 1.25rem; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; } + .radio label input:only-child, + .checkbox label input:only-child { + position: static; } -.radio input[type="radio"], .radio-inline input[type="radio"], .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"] { +.radio input[type="radio"], +.radio-inline input[type="radio"], +.checkbox input[type="checkbox"], +.checkbox-inline input[type="checkbox"] { position: absolute; margin-top: .25rem; - margin-left: -1.25rem; -} + margin-left: -1.25rem; } -.radio + .radio, .checkbox + .checkbox { - margin-top: -.25rem; -} +.radio + .radio, +.checkbox + .checkbox { + margin-top: -.25rem; } -.radio-inline, .checkbox-inline { +.radio-inline, +.checkbox-inline { position: relative; display: inline-block; padding-left: 1.25rem; margin-bottom: 0; font-weight: normal; vertical-align: middle; - cursor: pointer; -} + cursor: pointer; } -.radio-inline + .radio-inline, .checkbox-inline + .checkbox-inline { +.radio-inline + .radio-inline, +.checkbox-inline + .checkbox-inline { margin-top: 0; - margin-left: .75rem; -} + margin-left: .75rem; } -input[type="radio"]:disabled, input[type="radio"].disabled, fieldset[disabled] input[type="radio"], input[type="checkbox"]:disabled, input[type="checkbox"].disabled, fieldset[disabled] input[type="checkbox"] { - cursor: false; -} +input[type="radio"]:disabled, +input[type="radio"].disabled, +fieldset[disabled] input[type="radio"], +input[type="checkbox"]:disabled, +input[type="checkbox"].disabled, +fieldset[disabled] input[type="checkbox"] { + cursor: not-allowed; } -.radio-inline.disabled, fieldset[disabled] .radio-inline, .checkbox-inline.disabled, fieldset[disabled] .checkbox-inline { - cursor: false; -} +.radio-inline.disabled, +fieldset[disabled] .radio-inline, +.checkbox-inline.disabled, +fieldset[disabled] .checkbox-inline { + cursor: not-allowed; } -.radio.disabled label, fieldset[disabled] .radio label, .checkbox.disabled label, fieldset[disabled] .checkbox label { - cursor: false; -} +.radio.disabled label, +fieldset[disabled] .radio label, +.checkbox.disabled label, +fieldset[disabled] .checkbox label { + cursor: not-allowed; } .has-feedback { - position: relative; -} -.has-feedback .form-control { - padding-right: 3.28125rem; -} + position: relative; } + .has-feedback .form-control { + padding-right: 3.28125rem; } .form-control-feedback { position: absolute; @@ -2284,460 +1616,545 @@ input[type="radio"]:disabled, input[type="radio"].disabled, fieldset[disabled] i height: 2.625rem; line-height: 2.625rem; text-align: center; - pointer-events: none; -} + pointer-events: none; } -.input-lg + .form-control-feedback, .input-group-lg + .form-control-feedback { +.input-lg + .form-control-feedback, +.input-group-lg + .form-control-feedback { width: 3.291667rem; height: 3.291667rem; - line-height: 3.291667rem; -} + line-height: 3.291667rem; } -.input-sm + .form-control-feedback, .input-group-sm + .form-control-feedback { +.input-sm + .form-control-feedback, +.input-group-sm + .form-control-feedback { width: 2rem; height: 2rem; - line-height: 2rem; -} + line-height: 2rem; } + +.has-success .help-block, +.has-success .control-label, +.has-success .radio, +.has-success .checkbox, +.has-success .radio-inline, +.has-success .checkbox-inline, +.has-success.radio label, +.has-success.checkbox label, +.has-success.radio-inline label, +.has-success.checkbox-inline label { + color: #3c763d; } -.has-success .help-block, .has-success .control-label, .has-success .radio, .has-success .checkbox, .has-success .radio-inline, .has-success .checkbox-inline, .has-success.radio label, .has-success.checkbox label, .has-success.radio-inline label, .has-success.checkbox-inline label { - color: #3c763d; -} .has-success .form-control { - border-color: #3c763d; -} -.has-success .form-control:focus { - border-color: #2b542c; -} + border-color: #3c763d; } + .has-success .form-control:focus { + border-color: #2b542c; } + .has-success .input-group-addon { color: #3c763d; - background-color: #dff0d8; border-color: #3c763d; -} -.has-success .form-control-feedback { - color: #3c763d; -} + background-color: #dff0d8; } + +.has-success .form-control-feedback { + color: #3c763d; } + +.has-warning .help-block, +.has-warning .control-label, +.has-warning .radio, +.has-warning .checkbox, +.has-warning .radio-inline, +.has-warning .checkbox-inline, +.has-warning.radio label, +.has-warning.checkbox label, +.has-warning.radio-inline label, +.has-warning.checkbox-inline label { + color: #8a6d3b; } -.has-warning .help-block, .has-warning .control-label, .has-warning .radio, .has-warning .checkbox, .has-warning .radio-inline, .has-warning .checkbox-inline, .has-warning.radio label, .has-warning.checkbox label, .has-warning.radio-inline label, .has-warning.checkbox-inline label { - color: #8a6d3b; -} .has-warning .form-control { - border-color: #8a6d3b; -} -.has-warning .form-control:focus { - border-color: #66512c; -} + border-color: #8a6d3b; } + .has-warning .form-control:focus { + border-color: #66512c; } + .has-warning .input-group-addon { color: #8a6d3b; - background-color: #fcf8e3; border-color: #8a6d3b; -} -.has-warning .form-control-feedback { - color: #8a6d3b; -} + background-color: #fcf8e3; } + +.has-warning .form-control-feedback { + color: #8a6d3b; } + +.has-error .help-block, +.has-error .control-label, +.has-error .radio, +.has-error .checkbox, +.has-error .radio-inline, +.has-error .checkbox-inline, +.has-error.radio label, +.has-error.checkbox label, +.has-error.radio-inline label, +.has-error.checkbox-inline label { + color: #a94442; } -.has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline, .has-error.radio label, .has-error.checkbox label, .has-error.radio-inline label, .has-error.checkbox-inline label { - color: #a94442; -} .has-error .form-control { - border-color: #a94442; -} -.has-error .form-control:focus { - border-color: #843534; -} + border-color: #a94442; } + .has-error .form-control:focus { + border-color: #843534; } + .has-error .input-group-addon { color: #a94442; - background-color: #f2dede; border-color: #a94442; -} + background-color: #f2dede; } + .has-error .form-control-feedback { - color: #a94442; -} + color: #a94442; } .has-feedback label ~ .form-control-feedback { - top: 6; -} + top: 6; } + .has-feedback label.sr-only ~ .form-control-feedback { - top: 0; -} + top: 0; } .help-block { display: block; margin-top: .25rem; margin-bottom: .75rem; - color: #747a7f; -} + color: #747a7f; } @media (min-width: 34em) { .form-inline .form-group { display: inline-block; margin-bottom: 0; - vertical-align: middle; - } + vertical-align: middle; } .form-inline .form-control { display: inline-block; width: auto; - vertical-align: middle; - } + vertical-align: middle; } .form-inline .form-control-static { - display: inline-block; - } + display: inline-block; } .form-inline .input-group { display: inline-table; - vertical-align: middle; - } - .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn, .form-inline .input-group .form-control { - width: auto; - } + vertical-align: middle; } + .form-inline .input-group .input-group-addon, + .form-inline .input-group .input-group-btn, + .form-inline .input-group .form-control { + width: auto; } .form-inline .input-group > .form-control { - width: 100%; - } + width: 100%; } .form-inline .control-label { margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio, .form-inline .checkbox { + vertical-align: middle; } + .form-inline .radio, + .form-inline .checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio label, .form-inline .checkbox label { - padding-left: 0; - } - .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { + vertical-align: middle; } + .form-inline .radio label, + .form-inline .checkbox label { + padding-left: 0; } + .form-inline .radio input[type="radio"], + .form-inline .checkbox input[type="checkbox"] { position: relative; - margin-left: 0; - } + margin-left: 0; } .form-inline .has-feedback .form-control-feedback { - top: 0; - } -} + top: 0; } } .btn { display: inline-block; - padding: .5rem .75rem; - font-size: 1rem; font-weight: normal; - line-height: 1.5; text-align: center; white-space: nowrap; vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; + touch-action: manipulation; cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - border: .0625rem solid transparent; - border-radius: .25rem; - -webkit-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} -.btn:focus, .btn.focus, .btn:active:focus, .btn:active.focus, .btn.active:focus, .btn.active.focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:focus, .btn:hover { - text-decoration: none; -} -.btn.focus { - text-decoration: none; -} -.btn:active, .btn.active { - background-image: none; - outline: 0; -} -.btn.disabled, .btn:disabled, fieldset[disabled] .btn { - cursor: false; - opacity: .65; -} + user-select: none; + border: 0.0625rem solid transparent; + padding: 0.5rem 0.75rem; + font-size: 1rem; + line-height: 1.5; + border-radius: 0.25rem; + transition: all 0.2s ease-in-out; } + .btn:focus, + .btn.focus, + .btn:active:focus, + .btn:active.focus, + .btn.active:focus, + .btn.active.focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } + .btn:focus, + .btn:hover { + text-decoration: none; } + .btn.focus { + text-decoration: none; } + .btn:active, + .btn.active { + background-image: none; + outline: 0; } + .btn.disabled, + .btn:disabled, + fieldset[disabled] .btn { + cursor: not-allowed; + opacity: .65; } -a.btn.disaabled, fieldset[disabled] a.btn { - pointer-events: none; -} +a.btn.disaabled, +fieldset[disabled] a.btn { + pointer-events: none; } .btn-primary { color: #fff; background-color: #0275d8; - border-color: #0267bf; -} -.btn-primary:focus, .btn-primary.focus, .btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle { - color: #fff; - background-color: #025aa5; - border-color: #014682; -} -.btn-primary:hover { - color: #fff; - background-color: #025aa5; - border-color: #014682; -} -.btn-primary:active, .btn-primary.active, .open > .btn-primary.dropdown-toggle { - background-image: none; -} -.btn-primary.disabled, .btn-primary.disabled:focus, .btn-primary.disabled.focus, .btn-primary.disabled:active, .btn-primary.disabled.active, .btn-primary:disabled, .btn-primary:disabled:focus, .btn-primary:disabled.focus, .btn-primary:disabled:active, .btn-primary:disabled.active, fieldset[disabled] .btn-primary, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary.focus, fieldset[disabled] .btn-primary:active, fieldset[disabled] .btn-primary.active { - background-color: #0275d8; - border-color: #0267bf; -} -.btn-primary.disabled:hover, .btn-primary:disabled:hover, fieldset[disabled] .btn-primary:hover { - background-color: #0275d8; - border-color: #0267bf; -} -.btn-primary .badge { - color: #0275d8; - background-color: #fff; -} + border-color: #0267bf; } + .btn-primary:focus, + .btn-primary.focus, + .btn-primary:active, + .btn-primary.active, + .open > .btn-primary.dropdown-toggle { + color: #fff; + background-color: #025aa5; + border-color: #014682; } + .btn-primary:hover { + color: #fff; + background-color: #025aa5; + border-color: #014682; } + .btn-primary:active, + .btn-primary.active, + .open > .btn-primary.dropdown-toggle { + background-image: none; } + .btn-primary.disabled, + .btn-primary.disabled:focus, + .btn-primary.disabled.focus, + .btn-primary.disabled:active, + .btn-primary.disabled.active, + .btn-primary:disabled, + .btn-primary:disabled:focus, + .btn-primary:disabled.focus, + .btn-primary:disabled:active, + .btn-primary:disabled.active, + fieldset[disabled] .btn-primary, + fieldset[disabled] .btn-primary:focus, + fieldset[disabled] .btn-primary.focus, + fieldset[disabled] .btn-primary:active, + fieldset[disabled] .btn-primary.active { + background-color: #0275d8; + border-color: #0267bf; } + .btn-primary.disabled:hover, + .btn-primary:disabled:hover, + fieldset[disabled] .btn-primary:hover { + background-color: #0275d8; + border-color: #0267bf; } + .btn-primary .badge { + color: #0275d8; + background-color: #fff; } .btn-secondary { color: #373a3c; background-color: #fff; - border-color: #ccc; -} -.btn-secondary:focus, .btn-secondary.focus, .btn-secondary:active, .btn-secondary.active, .open > .btn-secondary.dropdown-toggle { - color: #373a3c; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-secondary:hover { - color: #373a3c; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-secondary:active, .btn-secondary.active, .open > .btn-secondary.dropdown-toggle { - background-image: none; -} -.btn-secondary.disabled, .btn-secondary.disabled:focus, .btn-secondary.disabled.focus, .btn-secondary.disabled:active, .btn-secondary.disabled.active, .btn-secondary:disabled, .btn-secondary:disabled:focus, .btn-secondary:disabled.focus, .btn-secondary:disabled:active, .btn-secondary:disabled.active, fieldset[disabled] .btn-secondary, fieldset[disabled] .btn-secondary:focus, fieldset[disabled] .btn-secondary.focus, fieldset[disabled] .btn-secondary:active, fieldset[disabled] .btn-secondary.active { - background-color: #fff; - border-color: #ccc; -} -.btn-secondary.disabled:hover, .btn-secondary:disabled:hover, fieldset[disabled] .btn-secondary:hover { - background-color: #fff; - border-color: #ccc; -} -.btn-secondary .badge { - color: #fff; - background-color: #373a3c; -} + border-color: #ccc; } + .btn-secondary:focus, + .btn-secondary.focus, + .btn-secondary:active, + .btn-secondary.active, + .open > .btn-secondary.dropdown-toggle { + color: #373a3c; + background-color: #e6e6e6; + border-color: #adadad; } + .btn-secondary:hover { + color: #373a3c; + background-color: #e6e6e6; + border-color: #adadad; } + .btn-secondary:active, + .btn-secondary.active, + .open > .btn-secondary.dropdown-toggle { + background-image: none; } + .btn-secondary.disabled, + .btn-secondary.disabled:focus, + .btn-secondary.disabled.focus, + .btn-secondary.disabled:active, + .btn-secondary.disabled.active, + .btn-secondary:disabled, + .btn-secondary:disabled:focus, + .btn-secondary:disabled.focus, + .btn-secondary:disabled:active, + .btn-secondary:disabled.active, + fieldset[disabled] .btn-secondary, + fieldset[disabled] .btn-secondary:focus, + fieldset[disabled] .btn-secondary.focus, + fieldset[disabled] .btn-secondary:active, + fieldset[disabled] .btn-secondary.active { + background-color: #fff; + border-color: #ccc; } + .btn-secondary.disabled:hover, + .btn-secondary:disabled:hover, + fieldset[disabled] .btn-secondary:hover { + background-color: #fff; + border-color: #ccc; } + .btn-secondary .badge { + color: #fff; + background-color: #373a3c; } .btn-info { color: #fff; background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:focus, .btn-info.focus, .btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:hover { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active, .btn-info.active, .open > .btn-info.dropdown-toggle { - background-image: none; -} -.btn-info.disabled, .btn-info.disabled:focus, .btn-info.disabled.focus, .btn-info.disabled:active, .btn-info.disabled.active, .btn-info:disabled, .btn-info:disabled:focus, .btn-info:disabled.focus, .btn-info:disabled:active, .btn-info:disabled.active, fieldset[disabled] .btn-info, fieldset[disabled] .btn-info:focus, fieldset[disabled] .btn-info.focus, fieldset[disabled] .btn-info:active, fieldset[disabled] .btn-info.active { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info.disabled:hover, .btn-info:disabled:hover, fieldset[disabled] .btn-info:hover { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} + border-color: #46b8da; } + .btn-info:focus, + .btn-info.focus, + .btn-info:active, + .btn-info.active, + .open > .btn-info.dropdown-toggle { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; } + .btn-info:hover { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; } + .btn-info:active, + .btn-info.active, + .open > .btn-info.dropdown-toggle { + background-image: none; } + .btn-info.disabled, + .btn-info.disabled:focus, + .btn-info.disabled.focus, + .btn-info.disabled:active, + .btn-info.disabled.active, + .btn-info:disabled, + .btn-info:disabled:focus, + .btn-info:disabled.focus, + .btn-info:disabled:active, + .btn-info:disabled.active, + fieldset[disabled] .btn-info, + fieldset[disabled] .btn-info:focus, + fieldset[disabled] .btn-info.focus, + fieldset[disabled] .btn-info:active, + fieldset[disabled] .btn-info.active { + background-color: #5bc0de; + border-color: #46b8da; } + .btn-info.disabled:hover, + .btn-info:disabled:hover, + fieldset[disabled] .btn-info:hover { + background-color: #5bc0de; + border-color: #46b8da; } + .btn-info .badge { + color: #5bc0de; + background-color: #fff; } .btn-success { color: #fff; background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:focus, .btn-success.focus, .btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:hover { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active, .btn-success.active, .open > .btn-success.dropdown-toggle { - background-image: none; -} -.btn-success.disabled, .btn-success.disabled:focus, .btn-success.disabled.focus, .btn-success.disabled:active, .btn-success.disabled.active, .btn-success:disabled, .btn-success:disabled:focus, .btn-success:disabled.focus, .btn-success:disabled:active, .btn-success:disabled.active, fieldset[disabled] .btn-success, fieldset[disabled] .btn-success:focus, fieldset[disabled] .btn-success.focus, fieldset[disabled] .btn-success:active, fieldset[disabled] .btn-success.active { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success.disabled:hover, .btn-success:disabled:hover, fieldset[disabled] .btn-success:hover { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} + border-color: #4cae4c; } + .btn-success:focus, + .btn-success.focus, + .btn-success:active, + .btn-success.active, + .open > .btn-success.dropdown-toggle { + color: #fff; + background-color: #449d44; + border-color: #398439; } + .btn-success:hover { + color: #fff; + background-color: #449d44; + border-color: #398439; } + .btn-success:active, + .btn-success.active, + .open > .btn-success.dropdown-toggle { + background-image: none; } + .btn-success.disabled, + .btn-success.disabled:focus, + .btn-success.disabled.focus, + .btn-success.disabled:active, + .btn-success.disabled.active, + .btn-success:disabled, + .btn-success:disabled:focus, + .btn-success:disabled.focus, + .btn-success:disabled:active, + .btn-success:disabled.active, + fieldset[disabled] .btn-success, + fieldset[disabled] .btn-success:focus, + fieldset[disabled] .btn-success.focus, + fieldset[disabled] .btn-success:active, + fieldset[disabled] .btn-success.active { + background-color: #5cb85c; + border-color: #4cae4c; } + .btn-success.disabled:hover, + .btn-success:disabled:hover, + fieldset[disabled] .btn-success:hover { + background-color: #5cb85c; + border-color: #4cae4c; } + .btn-success .badge { + color: #5cb85c; + background-color: #fff; } .btn-warning { color: #fff; background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:focus, .btn-warning.focus, .btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:hover { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active, .btn-warning.active, .open > .btn-warning.dropdown-toggle { - background-image: none; -} -.btn-warning.disabled, .btn-warning.disabled:focus, .btn-warning.disabled.focus, .btn-warning.disabled:active, .btn-warning.disabled.active, .btn-warning:disabled, .btn-warning:disabled:focus, .btn-warning:disabled.focus, .btn-warning:disabled:active, .btn-warning:disabled.active, fieldset[disabled] .btn-warning, fieldset[disabled] .btn-warning:focus, fieldset[disabled] .btn-warning.focus, fieldset[disabled] .btn-warning:active, fieldset[disabled] .btn-warning.active { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning.disabled:hover, .btn-warning:disabled:hover, fieldset[disabled] .btn-warning:hover { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} + border-color: #eea236; } + .btn-warning:focus, + .btn-warning.focus, + .btn-warning:active, + .btn-warning.active, + .open > .btn-warning.dropdown-toggle { + color: #fff; + background-color: #ec971f; + border-color: #d58512; } + .btn-warning:hover { + color: #fff; + background-color: #ec971f; + border-color: #d58512; } + .btn-warning:active, + .btn-warning.active, + .open > .btn-warning.dropdown-toggle { + background-image: none; } + .btn-warning.disabled, + .btn-warning.disabled:focus, + .btn-warning.disabled.focus, + .btn-warning.disabled:active, + .btn-warning.disabled.active, + .btn-warning:disabled, + .btn-warning:disabled:focus, + .btn-warning:disabled.focus, + .btn-warning:disabled:active, + .btn-warning:disabled.active, + fieldset[disabled] .btn-warning, + fieldset[disabled] .btn-warning:focus, + fieldset[disabled] .btn-warning.focus, + fieldset[disabled] .btn-warning:active, + fieldset[disabled] .btn-warning.active { + background-color: #f0ad4e; + border-color: #eea236; } + .btn-warning.disabled:hover, + .btn-warning:disabled:hover, + fieldset[disabled] .btn-warning:hover { + background-color: #f0ad4e; + border-color: #eea236; } + .btn-warning .badge { + color: #f0ad4e; + background-color: #fff; } .btn-danger { color: #fff; background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:focus, .btn-danger.focus, .btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:hover { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active, .btn-danger.active, .open > .btn-danger.dropdown-toggle { - background-image: none; -} -.btn-danger.disabled, .btn-danger.disabled:focus, .btn-danger.disabled.focus, .btn-danger.disabled:active, .btn-danger.disabled.active, .btn-danger:disabled, .btn-danger:disabled:focus, .btn-danger:disabled.focus, .btn-danger:disabled:active, .btn-danger:disabled.active, fieldset[disabled] .btn-danger, fieldset[disabled] .btn-danger:focus, fieldset[disabled] .btn-danger.focus, fieldset[disabled] .btn-danger:active, fieldset[disabled] .btn-danger.active { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger.disabled:hover, .btn-danger:disabled:hover, fieldset[disabled] .btn-danger:hover { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} + border-color: #d43f3a; } + .btn-danger:focus, + .btn-danger.focus, + .btn-danger:active, + .btn-danger.active, + .open > .btn-danger.dropdown-toggle { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; } + .btn-danger:hover { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; } + .btn-danger:active, + .btn-danger.active, + .open > .btn-danger.dropdown-toggle { + background-image: none; } + .btn-danger.disabled, + .btn-danger.disabled:focus, + .btn-danger.disabled.focus, + .btn-danger.disabled:active, + .btn-danger.disabled.active, + .btn-danger:disabled, + .btn-danger:disabled:focus, + .btn-danger:disabled.focus, + .btn-danger:disabled:active, + .btn-danger:disabled.active, + fieldset[disabled] .btn-danger, + fieldset[disabled] .btn-danger:focus, + fieldset[disabled] .btn-danger.focus, + fieldset[disabled] .btn-danger:active, + fieldset[disabled] .btn-danger.active { + background-color: #d9534f; + border-color: #d43f3a; } + .btn-danger.disabled:hover, + .btn-danger:disabled:hover, + fieldset[disabled] .btn-danger:hover { + background-color: #d9534f; + border-color: #d43f3a; } + .btn-danger .badge { + color: #d9534f; + background-color: #fff; } .btn-link { font-weight: normal; color: #0275d8; - border-radius: 0; -} -.btn-link, .btn-link:active, .btn-link.active, .btn-link:disabled, fieldset[disabled] .btn-link { - background-color: transparent; -} -.btn-link, .btn-link:focus, .btn-link:active { - border-color: transparent; -} -.btn-link:hover { - border-color: transparent; -} -.btn-link:focus, .btn-link:hover { - color: #014c8c; - text-decoration: underline; - background-color: transparent; -} -.btn-link:disabled:focus, .btn-link:disabled:hover, fieldset[disabled] .btn-link:focus, fieldset[disabled] .btn-link:hover { - color: #818a91; - text-decoration: none; -} + border-radius: 0; } + .btn-link, + .btn-link:active, + .btn-link.active, + .btn-link:disabled, + fieldset[disabled] .btn-link { + background-color: transparent; } + .btn-link, + .btn-link:focus, + .btn-link:active { + border-color: transparent; } + .btn-link:hover { + border-color: transparent; } + .btn-link:focus, + .btn-link:hover { + color: #014c8c; + text-decoration: underline; + background-color: transparent; } + .btn-link:disabled:focus, + .btn-link:disabled:hover, + fieldset[disabled] .btn-link:focus, + fieldset[disabled] .btn-link:hover { + color: #818a91; + text-decoration: none; } .btn-lg, .btn-group-lg > .btn { - padding: .75rem 1.5rem; + padding: 0.75rem 1.5rem; font-size: 1.25rem; line-height: 1.333333; - border-radius: .3rem; -} + border-radius: 0.3rem; } .btn-sm, .btn-group-sm > .btn { - padding: .3rem .75rem; - font-size: .85rem; + padding: 0.3rem 0.75rem; + font-size: 0.85rem; line-height: 1.5; - border-radius: .2rem; -} + border-radius: 0.2rem; } .btn-xs, .btn-group-xs > .btn { - padding: .2rem .5rem; - font-size: .75rem; + padding: 0.2rem 0.5rem; + font-size: 0.75rem; line-height: 1.5; - border-radius: .2rem; -} + border-radius: 0.2rem; } .btn-block { display: block; - width: 100%; -} + width: 100%; } .btn-block + .btn-block { - margin-top: 5px; -} + margin-top: 5px; } -input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { - width: 100%; -} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; } .fade { opacity: 0; - -webkit-transition: opacity .15s linear; - -o-transition: opacity .15s linear; - transition: opacity .15s linear; -} -.fade.in { - opacity: 1; -} + transition: opacity 0.15s linear; } + .fade.in { + opacity: 1; } .collapse { - display: none; -} -.collapse.in { - display: block; -} + display: none; } + .collapse.in { + display: block; } .collapsing { position: relative; height: 0; overflow: hidden; - -webkit-transition-timing-function: ease; - -o-transition-timing-function: ease; - transition-timing-function: ease; - -webkit-transition-duration: .35s; - -o-transition-duration: .35s; - transition-duration: .35s; - -webkit-transition-property: height; - -o-transition-property: height; - transition-property: height; -} + transition-timing-function: ease; + transition-duration: .35s; + transition-property: height; } -.dropup, .dropdown { - position: relative; -} +.dropup, +.dropdown { + position: relative; } .dropdown-toggle:after { display: inline-block; @@ -2746,13 +2163,12 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto margin-left: .25rem; vertical-align: middle; content: ""; - border-top: .3em solid; - border-right: .3em solid transparent; - border-left: .3em solid transparent; -} + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-left: 0.3em solid transparent; } + .dropdown-toggle:focus { - outline: 0; -} + outline: 0; } .dropdown-menu { position: absolute; @@ -2768,76 +2184,71 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto text-align: left; list-style: none; background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .15); - border-radius: .25rem; -} -.dropdown-menu .divider { - height: 1px; - margin: -.5 0; - overflow: hidden; - background-color: #e5e5e5; -} -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.5; - color: #373a3c; - white-space: nowrap; -} + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; } + .dropdown-menu .divider { + height: 1px; + margin: 0.5rem 0; + overflow: hidden; + background-color: #e5e5e5; } + .dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.5; + color: #373a3c; + white-space: nowrap; } -.dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover { +.dropdown-menu > li > a:focus, +.dropdown-menu > li > a:hover { color: #2b2d2f; text-decoration: none; - background-color: #f5f5f5; -} + background-color: #f5f5f5; } -.dropdown-menu > .active > a, .dropdown-menu > .active > a:focus, .dropdown-menu > .active > a:hover { +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:focus, +.dropdown-menu > .active > a:hover { color: #fff; text-decoration: none; background-color: #0275d8; - outline: 0; -} + outline: 0; } -.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:focus, .dropdown-menu > .disabled > a:hover { - color: #818a91; -} -.dropdown-menu > .disabled > a:focus, .dropdown-menu > .disabled > a:hover { +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:focus, +.dropdown-menu > .disabled > a:hover { + color: #818a91; } + +.dropdown-menu > .disabled > a:focus, +.dropdown-menu > .disabled > a:hover { text-decoration: none; - cursor: false; + cursor: not-allowed; background-color: transparent; background-image: none; - filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; -} + filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)"; } .open > .dropdown-menu { - display: block; -} + display: block; } + .open > a { - outline: 0; -} + outline: 0; } .dropdown-menu-right { right: 0; - left: auto; -} + left: auto; } .dropdown-menu-left { right: auto; - left: 0; -} + left: 0; } .dropdown-header { display: block; padding: 3px 20px; - font-size: .85rem; + font-size: 0.85rem; line-height: 1.5; color: #818a91; - white-space: nowrap; -} + white-space: nowrap; } .dropdown-backdrop { position: fixed; @@ -2845,208 +2256,197 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto right: 0; bottom: 0; left: 0; - z-index: 990; -} + z-index: 990; } .pull-right > .dropdown-menu { right: 0; - left: auto; -} + left: auto; } -.dropup .caret, .navbar-fixed-bottom .dropdown .caret { +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { content: ""; border-top: 0; - border-bottom: .3em solid; -} -.dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { + border-bottom: 0.3em solid; } + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; - margin-bottom: 2px; -} + margin-bottom: 2px; } -.btn-group, .btn-group-vertical { +.btn-group, +.btn-group-vertical { position: relative; display: inline-block; - vertical-align: middle; -} -.btn-group > .btn, .btn-group-vertical > .btn { - position: relative; - float: left; -} -.btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active, .btn-group-vertical > .btn:focus, .btn-group-vertical > .btn:active, .btn-group-vertical > .btn.active { - z-index: 2; -} -.btn-group > .btn:hover, .btn-group-vertical > .btn:hover { - z-index: 2; -} + vertical-align: middle; } + .btn-group > .btn, + .btn-group-vertical > .btn { + position: relative; + float: left; } + .btn-group > .btn:focus, + .btn-group > .btn:active, + .btn-group > .btn.active, + .btn-group-vertical > .btn:focus, + .btn-group-vertical > .btn:active, + .btn-group-vertical > .btn.active { + z-index: 2; } + .btn-group > .btn:hover, + .btn-group-vertical > .btn:hover { + z-index: 2; } -.btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { - margin-left: -1px; -} +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group { + margin-left: -1px; } .btn-toolbar { - margin-left: -5px; -} -.btn-toolbar:before, .btn-toolbar:after { - display: table; - content: " "; -} -.btn-toolbar:after { - clear: both; -} -.btn-toolbar .btn-group, .btn-toolbar .input-group { - float: left; -} -.btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { - margin-left: 5px; -} + margin-left: -5px; } + .btn-toolbar:before, + .btn-toolbar:after { + content: " "; + display: table; } + .btn-toolbar:after { + clear: both; } + .btn-toolbar .btn-group, + .btn-toolbar .input-group { + float: left; } + .btn-toolbar > .btn, + .btn-toolbar > .btn-group, + .btn-toolbar > .input-group { + margin-left: 5px; } .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} + border-radius: 0; } .btn-group > .btn:first-child { - margin-left: 0; -} -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} + margin-left: 0; } + .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-bottom-right-radius: 0; + border-top-right-radius: 0; } -.btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { - border-top-left-radius: 0; +.btn-group > .btn:last-child:not(:first-child), +.btn-group > .dropdown-toggle:not(:first-child) { border-bottom-left-radius: 0; -} + border-top-left-radius: 0; } .btn-group > .btn-group { - float: left; -} + float: left; } .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} + border-radius: 0; } -.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-top-right-radius: 0; +.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { border-bottom-right-radius: 0; -} + border-top-right-radius: 0; } .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; border-bottom-left-radius: 0; -} + border-top-left-radius: 0; } -.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { - outline: 0; -} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-right: 8px; - padding-left: 8px; -} + padding-left: 8px; } .btn-group > .btn-lg + .dropdown-toggle, .btn-group-lg.btn-group > .btn + .dropdown-toggle { padding-right: 12px; - padding-left: 12px; -} + padding-left: 12px; } .btn .caret { - margin-left: 0; -} + margin-left: 0; } .btn-lg .caret, .btn-group-lg > .btn .caret { - border-width: .3em .3em 0; - border-bottom-width: 0; -} + border-width: 0.3em 0.3em 0; + border-bottom-width: 0; } .dropup .btn-lg .caret, .dropup .btn-group-lg > .btn .caret { - border-width: 0 .3em .3em; -} + border-width: 0 0.3em 0.3em; } -.btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { +.btn-group-vertical > .btn, +.btn-group-vertical > .btn-group, +.btn-group-vertical > .btn-group > .btn { display: block; float: none; width: 100%; - max-width: 100%; -} -.btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { - display: table; - content: " "; -} + max-width: 100%; } + +.btn-group-vertical > .btn-group:before, .btn-group-vertical > .btn-group:after { - clear: both; -} + content: " "; + display: table; } + +.btn-group-vertical > .btn-group:after { + clear: both; } + .btn-group-vertical > .btn-group > .btn { - float: none; -} -.btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { + float: none; } + +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { margin-top: -1px; - margin-left: 0; -} + margin-left: 0; } .btn-group-vertical > .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} + border-radius: 0; } + .btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} + border-bottom-left-radius: 0; } + .btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-left-radius: 0; + border-bottom-left-radius: 0.25rem; border-top-right-radius: 0; - border-bottom-left-radius: .25rem; -} + border-top-left-radius: 0; } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} + border-radius: 0; } -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} + border-bottom-left-radius: 0; } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; border-top-right-radius: 0; -} + border-top-left-radius: 0; } -[data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"], [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { +[data-toggle="buttons"] > .btn input[type="radio"], +[data-toggle="buttons"] > .btn input[type="checkbox"], +[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], +[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); - pointer-events: none; -} + pointer-events: none; } .input-group { position: relative; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; -} -.input-group .form-control { - position: relative; - z-index: 2; - margin-bottom: 0; + display: flex; } + .input-group .form-control { + position: relative; + z-index: 2; + flex: 1; + margin-bottom: 0; } - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; -} +.input-group-addon:not(:first-child):not(:last-child), +.input-group-btn:not(:first-child):not(:last-child), +.input-group .form-control:not(:first-child):not(:last-child) { + border-radius: 0; } -.input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child), .input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} - -.input-group-addon, .input-group-btn { +.input-group-addon, +.input-group-btn { white-space: nowrap; - vertical-align: middle; -} + vertical-align: middle; } .input-group-addon { - padding: .5rem .75rem; + padding: 0.5rem 0.75rem; font-size: 1rem; font-weight: normal; line-height: 1; @@ -3054,84 +2454,84 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto text-align: center; background-color: #eceeef; border: 1px solid #ccc; - border-radius: .25rem; -} -.input-group-addon.form-control-sm, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .input-group-addon.btn { - padding: .3rem .75rem; - font-size: .85rem; - border-radius: .2rem; -} -.input-group-addon.form-control-lg, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .input-group-addon.btn { - padding: .75rem 1.5rem; - font-size: 1.25rem; - border-radius: .3rem; -} -.input-group-addon input[type="radio"], .input-group-addon input[type="checkbox"] { - margin-top: 0; -} + border-radius: 0.25rem; } + .input-group-addon.form-control-sm, .input-group-sm > .input-group-addon, + .input-group-sm > .input-group-btn > .input-group-addon.btn { + padding: 0.3rem 0.75rem; + font-size: 0.85rem; + border-radius: 0.2rem; } + .input-group-addon.form-control-lg, .input-group-lg > .input-group-addon, + .input-group-lg > .input-group-btn > .input-group-addon.btn { + padding: 0.75rem 1.5rem; + font-size: 1.25rem; + border-radius: 0.3rem; } + .input-group-addon input[type="radio"], + .input-group-addon input[type="checkbox"] { + margin-top: 0; } -.input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), .input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; +.input-group .form-control:first-child, +.input-group-addon:first-child, +.input-group-btn:first-child > .btn, +.input-group-btn:first-child > .btn-group > .btn, +.input-group-btn:first-child > .dropdown-toggle, +.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { border-bottom-right-radius: 0; -} + border-top-right-radius: 0; } .input-group-addon:first-child { - border-right: 0; -} + border-right: 0; } -.input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; +.input-group .form-control:last-child, +.input-group-addon:last-child, +.input-group-btn:last-child > .btn, +.input-group-btn:last-child > .btn-group > .btn, +.input-group-btn:last-child > .dropdown-toggle, +.input-group-btn:first-child > .btn:not(:first-child), +.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { border-bottom-left-radius: 0; -} + border-top-left-radius: 0; } .input-group-addon:last-child { - border-left: 0; -} + border-left: 0; } .input-group-btn { position: relative; font-size: 0; - white-space: nowrap; -} -.input-group-btn > .btn { - position: relative; -} -.input-group-btn > .btn + .btn { - margin-left: -1px; -} -.input-group-btn > .btn:focus, .input-group-btn > .btn:active, .input-group-btn > .btn:hover { - z-index: 2; -} -.input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { - margin-right: -1px; -} -.input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { - margin-left: -1px; -} + white-space: nowrap; } + .input-group-btn > .btn { + position: relative; } + .input-group-btn > .btn + .btn { + margin-left: -1px; } + .input-group-btn > .btn:focus, + .input-group-btn > .btn:active, + .input-group-btn > .btn:hover { + z-index: 2; } + .input-group-btn:first-child > .btn, + .input-group-btn:first-child > .btn-group { + margin-right: -1px; } + .input-group-btn:last-child > .btn, + .input-group-btn:last-child > .btn-group { + margin-left: -1px; } .c-input { position: relative; display: inline; padding-left: 1.5rem; color: #555; - cursor: pointer; -} -.c-input > input { - position: absolute; - z-index: -1; - opacity: 0; -} -.c-input > input:checked ~ .c-indicator { - color: #fff; - background-color: #0074d9; -} -.c-input > input:active ~ .c-indicator { - color: #fff; - background-color: #84c6ff; -} -.c-input + .c-input { - margin-left: 1rem; -} + cursor: pointer; } + .c-input > input { + position: absolute; + z-index: -1; + opacity: 0; } + .c-input > input:checked ~ .c-indicator { + color: #fff; + background-color: #0074d9; } + .c-input > input:active ~ .c-indicator { + color: #fff; + background-color: #84c6ff; } + .c-input + .c-input { + margin-left: 1rem; } .c-indicator { position: absolute; @@ -3144,123 +2544,97 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto line-height: 1rem; color: #eee; text-align: center; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + user-select: none; background-color: #eee; background-repeat: no-repeat; background-position: center center; - -webkit-background-size: 50% 50%; - background-size: 50% 50%; -} + background-size: 50% 50%; } .c-checkbox .c-indicator { - border-radius: .25rem; -} + border-radius: .25rem; } + .c-checkbox input:checked ~ .c-indicator { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTYuNCwxTDUuNywxLjdMMi45LDQuNUwyLjEsMy43TDEuNCwzTDAsNC40bDAuNywwLjdsMS41LDEuNWwwLjcsMC43bDAuNy0wLjdsMy41LTMuNWwwLjctMC43TDYuNCwxTDYuNCwxeiINCgkvPg0KPC9zdmc+DQo=); -} + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTYuNCwxTDUuNywxLjdMMi45LDQuNUwyLjEsMy43TDEuNCwzTDAsNC40bDAuNywwLjdsMS41LDEuNWwwLjcsMC43bDAuNy0wLjdsMy41LTMuNWwwLjctMC43TDYuNCwxTDYuNCwxeiINCgkvPg0KPC9zdmc+DQo=); } + .c-checkbox input:indeterminate ~ .c-indicator { background-color: #0074d9; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K); -} + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K); } .c-radio .c-indicator { - border-radius: 50%; -} + border-radius: 50%; } + .c-radio input:checked ~ .c-indicator { - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQsMUMyLjMsMSwxLDIuMywxLDRzMS4zLDMsMywzczMtMS4zLDMtM1M1LjcsMSw0LDF6Ii8+DQo8L3N2Zz4NCg==); -} + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgOCA4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA4IDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQsMUMyLjMsMSwxLDIuMywxLDRzMS4zLDMsMywzczMtMS4zLDMtM1M1LjcsMSw0LDF6Ii8+DQo8L3N2Zz4NCg==); } .c-inputs-stacked .c-input { - display: inline; -} -.c-inputs-stacked .c-input:after { - display: block; - margin-bottom: .25rem; - content: ""; -} -.c-inputs-stacked .c-input + .c-input { - margin-left: 0; -} + display: inline; } + .c-inputs-stacked .c-input:after { + display: block; + margin-bottom: .25rem; + content: ""; } + .c-inputs-stacked .c-input + .c-input { + margin-left: 0; } .select { position: relative; display: inline-block; - color: #555; -} -.select > select { - display: inline-block; - width: 100%; - -webkit-appearance: none; - padding: .5rem 2.25rem .5rem 1rem; - margin: 0; - line-height: 1.5; - color: #555; - cursor: pointer; - background-color: #eee; - border: 0; - border-radius: .25rem; - outline: 0; - - appearance: none; -} -.select > select:focus { - -webkit-box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9; - box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9; -} -.select > select:focus:-moz-focusring { - color: transparent; - text-shadow: 0 0 0 #000; -} -.select > select:active { - color: #fff; - background-color: #0074d9; -} -.select > select::-ms-expand { - display: none; -} -.select:after { - position: absolute; - top: 50%; - right: 1.25rem; - display: inline-block; - width: 0; - height: 0; - margin-top: -.15rem; - pointer-events: none; - content: ""; - border-top: .35rem solid; - border-right: .35rem solid transparent; - border-bottom: .35rem solid transparent; - border-left: .35rem solid transparent; -} + color: #555; } + .select > select { + display: inline-block; + width: 100%; + padding: 0.5rem 2.25rem 0.5rem 1rem; + margin: 0; + line-height: 1.5; + color: #555; + cursor: pointer; + background-color: #eee; + border: 0; + border-radius: .25rem; + outline: 0; + -webkit-appearance: none; + appearance: none; } + .select > select:focus { + box-shadow: 0 0 0 0.075rem #fff, 0 0 0 0.2rem #0074d9; } + .select > select:focus:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #000; } + .select > select:active { + color: #fff; + background-color: #0074d9; } + .select > select::-ms-expand { + display: none; } + .select:after { + position: absolute; + top: 50%; + right: 1.25rem; + display: inline-block; + width: 0; + height: 0; + margin-top: -.15rem; + pointer-events: none; + content: ""; + border-top: .35rem solid; + border-right: .35rem solid transparent; + border-bottom: .35rem solid transparent; + border-left: .35rem solid transparent; } .select select:hover { - background-color: #ddd; -} + background-color: #ddd; } @-moz-document url-prefix() { .select select { padding-right: 1rem; - text-indent: .01px; - text-overflow: ""; - } - + text-indent: 0.01px; + text-overflow: ""; } .select option { - background-color: #fff; - } -} + background-color: #fff; } } -@media screen and (min-width: 0\0) { +@media screen and (min-width: 0 \0) { .select select { z-index: 1; - padding: .5rem 1.5rem .5rem 1rem; - } + padding: 0.5rem 1.5rem 0.5rem 1rem; } .select:after { - z-index: 5; - } + z-index: 5; } .select:before { position: absolute; top: 0; @@ -3270,27 +2644,24 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto display: block; width: 1.5rem; content: ""; - background-color: #eee; - } - .select select:focus, .select select:active, .select select:hover { + background-color: #eee; } + .select select:focus, + .select select:active, + .select select:hover { color: #555; - background-color: #eee; - } -} + background-color: #eee; } } .file { position: relative; display: inline-block; height: 2.5rem; - cursor: pointer; -} + cursor: pointer; } .file input { min-width: 14rem; margin: 0; filter: alpha(opacity=0); - opacity: 0; -} + opacity: 0; } .file-custom { position: absolute; @@ -3299,23 +2670,17 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto left: 0; z-index: 5; height: 2.5rem; - padding: .5rem 1rem; + padding: 0.5rem 1rem; line-height: 1.5; color: #555; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + user-select: none; background-color: #fff; border: .075rem solid #ddd; border-radius: .25rem; - -webkit-box-shadow: inset 0 .2rem .4rem rgba(0, 0, 0, .05); - box-shadow: inset 0 .2rem .4rem rgba(0, 0, 0, .05); -} + box-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05); } .file-custom:after { - content: "Choose file..."; -} + content: "Choose file..."; } .file-custom:before { position: absolute; @@ -3325,427 +2690,417 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto z-index: 6; display: block; height: 2.5rem; - padding: .5rem 1rem; + padding: 0.5rem 1rem; line-height: 1.5; color: #555; content: "Browse"; background-color: #eee; border: .075rem solid #ddd; - border-radius: 0 .25rem .25rem 0; -} + border-radius: 0 0.25rem 0.25rem 0; } .file input:focus ~ .file-custom { - -webkit-box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9; - box-shadow: 0 0 0 .075rem #fff, 0 0 0 .2rem #0074d9; -} + box-shadow: 0 0 0 0.075rem #fff, 0 0 0 0.2rem #0074d9; } .nav { padding-left: 0; margin-bottom: 0; - list-style: none; -} -.nav:before, .nav:after { - display: table; - content: " "; -} -.nav:after { - clear: both; -} + list-style: none; } + .nav:before, + .nav:after { + content: " "; + display: table; } + .nav:after { + clear: both; } .nav-item { position: relative; - display: inline-block; -} + display: inline-block; } .nav-link { display: inline-block; - padding: .75em 1em; - line-height: 1; -} -.nav-link:focus, .nav-link:hover { - text-decoration: none; - background-color: #eceeef; -} -.disabled > .nav-link, .nav-link.disabled { - color: #818a91; -} -.disabled > .nav-link, .disabled > .nav-link:focus, .disabled > .nav-link:hover, .nav-link.disabled, .nav-link.disabled:focus, .nav-link.disabled:hover { - color: #818a91; - cursor: false; - background-color: transparent; -} + padding: 0.75em 1em; + line-height: 1; } + .nav-link:focus, + .nav-link:hover { + text-decoration: none; + background-color: #eceeef; } + .disabled > .nav-link, + .nav-link.disabled { + color: #818a91; } + .disabled > .nav-link, + .disabled > .nav-link:focus, + .disabled > .nav-link:hover, + .nav-link.disabled, + .nav-link.disabled:focus, + .nav-link.disabled:hover { + color: #818a91; + cursor: not-allowed; + background-color: transparent; } .nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs .nav-item { - float: left; - margin-bottom: -1px; -} -.nav-tabs .nav-item + .nav-item { - margin-left: .2rem; -} -.nav-tabs .nav-link { - display: block; - border: 1px solid transparent; - border-radius: .25rem .25rem 0 0; -} -.nav-tabs .nav-link:focus, .nav-tabs .nav-link:hover { - border-color: #eceeef #eceeef #ddd; -} -.nav-tabs .open > .nav-link, .nav-tabs .open > .nav-link:focus, .nav-tabs .open > .nav-link:hover, .nav-tabs .active > .nav-link, .nav-tabs .active > .nav-link:focus, .nav-tabs .active > .nav-link:hover, .nav-tabs .nav-link.open, .nav-tabs .nav-link.open:focus, .nav-tabs .nav-link.open:hover, .nav-tabs .nav-link.active, .nav-tabs .nav-link.active:focus, .nav-tabs .nav-link.active:hover { - color: #55595c; - background-color: #fff; - border-color: #ddd #ddd transparent; -} -.nav-tabs .disabled > .nav-link, .nav-tabs .disabled > .nav-link:focus, .nav-tabs .disabled > .nav-link:hover, .nav-tabs .nav-link.disabled, .nav-tabs .nav-link.disabled:focus, .nav-tabs .nav-link.disabled:hover { - color: #818a91; - background-color: transparent; - border-color: transparent; -} + border-bottom: 1px solid #ddd; } + .nav-tabs .nav-item { + float: left; + margin-bottom: -1px; } + .nav-tabs .nav-item + .nav-item { + margin-left: .2rem; } + .nav-tabs .nav-link { + display: block; + border: 1px solid transparent; + border-radius: 0.25rem 0.25rem 0 0; } + .nav-tabs .nav-link:focus, + .nav-tabs .nav-link:hover { + border-color: #eceeef #eceeef #ddd; } + .nav-tabs .open > .nav-link, + .nav-tabs .open > .nav-link:focus, + .nav-tabs .open > .nav-link:hover, + .nav-tabs .active > .nav-link, + .nav-tabs .active > .nav-link:focus, + .nav-tabs .active > .nav-link:hover, + .nav-tabs .nav-link.open, + .nav-tabs .nav-link.open:focus, + .nav-tabs .nav-link.open:hover, + .nav-tabs .nav-link.active, + .nav-tabs .nav-link.active:focus, + .nav-tabs .nav-link.active:hover { + color: #55595c; + background-color: #fff; + border-color: #ddd #ddd transparent; } + .nav-tabs .disabled > .nav-link, + .nav-tabs .disabled > .nav-link:focus, + .nav-tabs .disabled > .nav-link:hover, + .nav-tabs .nav-link.disabled, + .nav-tabs .nav-link.disabled:focus, + .nav-tabs .nav-link.disabled:hover { + color: #818a91; + background-color: transparent; + border-color: transparent; } .nav-pills .nav-item { - float: left; -} -.nav-pills .nav-item + .nav-item { - margin-left: .2rem; -} + float: left; } + .nav-pills .nav-item + .nav-item { + margin-left: .2rem; } + .nav-pills .nav-link { display: block; - border-radius: .25rem; -} -.nav-pills .open > .nav-link, .nav-pills .open > .nav-link:focus, .nav-pills .open > .nav-link:hover, .nav-pills .active > .nav-link, .nav-pills .active > .nav-link:focus, .nav-pills .active > .nav-link:hover, .nav-pills .nav-link.open, .nav-pills .nav-link.open:focus, .nav-pills .nav-link.open:hover, .nav-pills .nav-link.active, .nav-pills .nav-link.active:focus, .nav-pills .nav-link.active:hover { + border-radius: 0.25rem; } + +.nav-pills .open > .nav-link, +.nav-pills .open > .nav-link:focus, +.nav-pills .open > .nav-link:hover, +.nav-pills .active > .nav-link, +.nav-pills .active > .nav-link:focus, +.nav-pills .active > .nav-link:hover, +.nav-pills .nav-link.open, +.nav-pills .nav-link.open:focus, +.nav-pills .nav-link.open:hover, +.nav-pills .nav-link.active, +.nav-pills .nav-link.active:focus, +.nav-pills .nav-link.active:hover { color: #fff; cursor: default; - background-color: #0275d8; -} + background-color: #0275d8; } .nav-stacked .nav-item { display: block; - float: none; -} -.nav-stacked .nav-item + .nav-item { - margin-top: .2rem; - margin-left: 0; -} + float: none; } + .nav-stacked .nav-item + .nav-item { + margin-top: .2rem; + margin-left: 0; } .tab-content > .tab-pane { - display: none; -} + display: none; } + .tab-content > .active { - display: block; -} + display: block; } .nav-tabs .dropdown-menu { margin-top: -1px; - border-top-left-radius: 0; border-top-right-radius: 0; -} + border-top-left-radius: 0; } .navbar { position: relative; padding: 1rem; - margin-bottom: 1; -} -.navbar:before, .navbar:after { - display: table; - content: " "; -} -.navbar:after { - clear: both; -} -@media (min-width: 34em) { - .navbar { - border-radius: .25rem; - } -} + margin-bottom: 1; } + .navbar:before, + .navbar:after { + content: " "; + display: table; } + .navbar:after { + clear: both; } + @media (min-width: 34em) { + .navbar { + border-radius: 0.25rem; } } .navbar-static-top { - z-index: 1000; -} -@media (min-width: 34em) { - .navbar-static-top { - border-radius: 0; - } -} + z-index: 1000; } + @media (min-width: 34em) { + .navbar-static-top { + border-radius: 0; } } -.navbar-fixed-top, .navbar-fixed-bottom { +.navbar-fixed-top, +.navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; - margin-bottom: 0; -} -@media (min-width: 34em) { - .navbar-fixed-top, .navbar-fixed-bottom { - border-radius: 0; - } -} + margin-bottom: 0; } + @media (min-width: 34em) { + .navbar-fixed-top, + .navbar-fixed-bottom { + border-radius: 0; } } .navbar-fixed-top { - top: 0; -} + top: 0; } .navbar-fixed-bottom { - bottom: 0; -} + bottom: 0; } .navbar-sticky-top { - position: -webkit-sticky; - position: sticky; + position: sticky; top: 0; - z-index: 1030; width: 100%; -} -@media (min-width: 34em) { - .navbar-sticky-top { - border-radius: 0; - } -} + z-index: 1030; } + @media (min-width: 34em) { + .navbar-sticky-top { + border-radius: 0; } } .navbar-brand { float: left; - padding: .625rem .75rem; + padding: 0.625rem 0.75rem; margin-right: 1rem; margin-bottom: 0; font-size: 1.25rem; - line-height: 1; -} -.navbar-brand > a:focus, .navbar-brand > a:hover { - text-decoration: none; -} -.navbar-brand > img { - display: block; -} + line-height: 1; } + .navbar-brand > a:focus, + .navbar-brand > a:hover { + text-decoration: none; } + .navbar-brand > img { + display: block; } .navbar-toggler { - padding: .55rem .75rem; + padding: 0.55rem 0.75rem; margin-right: 1rem; margin-bottom: 0; font-size: 1.25rem; line-height: 1; background: none; - border: 0; -} -.navbar-toggler:focus, .navbar-toggler:hover { - text-decoration: none; -} + border: 0; } + .navbar-toggler:focus, + .navbar-toggler:hover { + text-decoration: none; } @media (min-width: 34em) { .navbar-toggleable-xs { - display: block !important; - } -} + display: block !important; } } + @media (min-width: 48em) { .navbar-toggleable-sm { - display: block !important; - } -} + display: block !important; } } .navbar-nav > li > .dropdown-menu { margin-top: 0; - border-top-left-radius: 0; border-top-right-radius: 0; -} + border-top-left-radius: 0; } .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; + border-top-right-radius: 0.25rem; + border-top-left-radius: 0.25rem; border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} + border-bottom-left-radius: 0; } .navbar-condensed { padding-top: 0; - padding-bottom: 0; -} -.navbar-condensed .navbar-brand { - padding-top: .95rem; - padding-bottom: .95rem; -} -.navbar-condensed .form-inline { - margin-top: .6rem; -} + padding-bottom: 0; } + .navbar-condensed .navbar-brand { + padding-top: .95rem; + padding-bottom: .95rem; } + .navbar-condensed .form-inline { + margin-top: .6rem; } .navbar-nav .nav-item { - float: left; -} + float: left; } + .navbar-nav .nav-link { display: block; padding-top: .95rem; padding-bottom: .95rem; - line-height: 1.25; -} -.navbar-nav .open > .nav-link, .navbar-nav .open > .nav-link:focus, .navbar-nav .open > .nav-link:hover, .navbar-nav .active > .nav-link, .navbar-nav .active > .nav-link:focus, .navbar-nav .active > .nav-link:hover, .navbar-nav .nav-link.open, .navbar-nav .nav-link.open:focus, .navbar-nav .nav-link.open:hover, .navbar-nav .nav-link.active, .navbar-nav .nav-link.active:focus, .navbar-nav .nav-link.active:hover { + line-height: 1.25; } + +.navbar-nav .open > .nav-link, +.navbar-nav .open > .nav-link:focus, +.navbar-nav .open > .nav-link:hover, +.navbar-nav .active > .nav-link, +.navbar-nav .active > .nav-link:focus, +.navbar-nav .active > .nav-link:hover, +.navbar-nav .nav-link.open, +.navbar-nav .nav-link.open:focus, +.navbar-nav .nav-link.open:hover, +.navbar-nav .nav-link.active, +.navbar-nav .nav-link.active:focus, +.navbar-nav .nav-link.active:hover { color: #555; cursor: default; - background-color: #e7e7e7; -} + background-color: #e7e7e7; } .navbar-default { background-color: #f8f8f8; - border-color: #e7e7e7; -} -.navbar-default .navbar-brand { - color: #777; -} -.navbar-default .navbar-brand:focus, .navbar-default .navbar-brand:hover { - color: #5e5e5e; - background-color: transparent; -} + border-color: #e7e7e7; } + .navbar-default .navbar-brand { + color: #777; } + .navbar-default .navbar-brand:focus, + .navbar-default .navbar-brand:hover { + color: #5e5e5e; + background-color: transparent; } .navbar-inverse { background-color: #373a3c; - border-color: #1f2021; -} -.navbar-inverse .navbar-toggler, .navbar-inverse .navbar-brand > a, .navbar-inverse .nav-pills > .nav-item > .nav-link { - color: #aab0b5; -} -.navbar-inverse .navbar-toggler:focus, .navbar-inverse .navbar-toggler:hover, .navbar-inverse .navbar-brand > a:focus, .navbar-inverse .navbar-brand > a:hover, .navbar-inverse .nav-pills > .nav-item > .nav-link:focus, .navbar-inverse .nav-pills > .nav-item > .nav-link:hover { - color: #fff; -} -.navbar-inverse .nav-pills > .nav-item > .nav-link:focus, .navbar-inverse .nav-pills > .nav-item > .nav-link:hover { - color: #fff; - background-color: #1f2021; -} -.navbar-inverse .nav-pills > .active > .nav-link, .navbar-inverse .nav-pills > .nav-link.active { - color: #fff; - background-color: #1f2021; -} -.navbar-inverse .navbar-brand { - color: #aab0b5; -} -.navbar-inverse .navbar-brand:focus, .navbar-inverse .navbar-brand:hover { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-text { - color: #a2a8ae; -} -.navbar-inverse .navbar-nav > li > a { - color: #aab0b5; -} -.navbar-inverse .navbar-nav > li > a:focus, .navbar-inverse .navbar-nav > li > a:hover { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:focus, .navbar-inverse .navbar-nav > .active > a:hover { - color: #fff; - background-color: #1f2021; -} -.navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:focus, .navbar-inverse .navbar-nav > .disabled > a:hover { - color: #444; - background-color: transparent; -} -.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { - border-color: #262829; -} -.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:focus, .navbar-inverse .navbar-nav > .open > a:hover { - color: #fff; - background-color: #1f2021; -} -.navbar-inverse .navbar-link { - color: #aab0b5; -} -.navbar-inverse .navbar-link:hover { - color: #fff; -} -.navbar-inverse .btn-link { - color: #aab0b5; -} -.navbar-inverse .btn-link:focus, .navbar-inverse .btn-link:hover { - color: #fff; -} -.navbar-inverse .btn-link:disabled:focus, .navbar-inverse .btn-link:disabled:hover, fieldset[disabled] .navbar-inverse .btn-link:focus, fieldset[disabled] .navbar-inverse .btn-link:hover { - color: #444; -} + border-color: #1f2021; } + .navbar-inverse .navbar-toggler, + .navbar-inverse .navbar-brand > a, + .navbar-inverse .nav-pills > .nav-item > .nav-link { + color: #aab0b5; } + .navbar-inverse .navbar-toggler:focus, + .navbar-inverse .navbar-toggler:hover, + .navbar-inverse .navbar-brand > a:focus, + .navbar-inverse .navbar-brand > a:hover, + .navbar-inverse .nav-pills > .nav-item > .nav-link:focus, + .navbar-inverse .nav-pills > .nav-item > .nav-link:hover { + color: #fff; } + .navbar-inverse .nav-pills > .nav-item > .nav-link:focus, + .navbar-inverse .nav-pills > .nav-item > .nav-link:hover { + color: #fff; + background-color: #1f2021; } + .navbar-inverse .nav-pills > .active > .nav-link, + .navbar-inverse .nav-pills > .nav-link.active { + color: #fff; + background-color: #1f2021; } + .navbar-inverse .navbar-brand { + color: #aab0b5; } + .navbar-inverse .navbar-brand:focus, + .navbar-inverse .navbar-brand:hover { + color: #fff; + background-color: transparent; } + .navbar-inverse .navbar-text { + color: #a2a8ae; } + .navbar-inverse .navbar-nav > li > a { + color: #aab0b5; } + .navbar-inverse .navbar-nav > li > a:focus, + .navbar-inverse .navbar-nav > li > a:hover { + color: #fff; + background-color: transparent; } + .navbar-inverse .navbar-nav > .active > a, + .navbar-inverse .navbar-nav > .active > a:focus, + .navbar-inverse .navbar-nav > .active > a:hover { + color: #fff; + background-color: #1f2021; } + .navbar-inverse .navbar-nav > .disabled > a, + .navbar-inverse .navbar-nav > .disabled > a:focus, + .navbar-inverse .navbar-nav > .disabled > a:hover { + color: #444; + background-color: transparent; } + .navbar-inverse .navbar-collapse, + .navbar-inverse .navbar-form { + border-color: #262829; } + .navbar-inverse .navbar-nav > .open > a, + .navbar-inverse .navbar-nav > .open > a:focus, + .navbar-inverse .navbar-nav > .open > a:hover { + color: #fff; + background-color: #1f2021; } + .navbar-inverse .navbar-link { + color: #aab0b5; } + .navbar-inverse .navbar-link:hover { + color: #fff; } + .navbar-inverse .btn-link { + color: #aab0b5; } + .navbar-inverse .btn-link:focus, + .navbar-inverse .btn-link:hover { + color: #fff; } + .navbar-inverse .btn-link:disabled:focus, + .navbar-inverse .btn-link:disabled:hover, + fieldset[disabled] .navbar-inverse .btn-link:focus, + fieldset[disabled] .navbar-inverse .btn-link:hover { + color: #444; } .card { position: relative; padding: 1.25rem; margin-bottom: 1.25rem; - border: .075rem solid #eee; -} + border: .075rem solid #eee; } .card-title { margin-top: 0; - margin-bottom: .75rem; -} + margin-bottom: .75rem; } .card-text:last-child { - margin-bottom: 0; -} + margin-bottom: 0; } .card-actions .card-link + .card-link { - margin-left: .75rem; -} + margin-left: .75rem; } .card-link:hover { - text-decoration: none; -} + text-decoration: none; } .card-header { - padding: .75rem 1.25rem; + padding: 0.75rem 1.25rem; margin: -1.25rem -1.25rem 1.25rem; border-bottom: .075rem solid #eee; - border-radius: .25rem .25rem 0 0; -} + border-radius: 0.25rem 0.25rem 0 0; } .card-footer { - padding: .75rem 1.25rem; + padding: 0.75rem 1.25rem; margin: 1.25rem -1.25rem -1.25rem; border-top: .075rem solid #eee; - border-radius: 0 0 .25rem .25rem; -} + border-radius: 0 0 0.25rem 0.25rem; } .card-primary { background-color: #0275d8; - border-color: #0275d8; -} + border-color: #0275d8; } .card-success { background-color: #5cb85c; - border-color: #5cb85c; -} + border-color: #5cb85c; } .card-info { background-color: #5bc0de; - border-color: #5bc0de; -} + border-color: #5bc0de; } .card-warning { background-color: #f0ad4e; - border-color: #f0ad4e; -} + border-color: #f0ad4e; } .card-danger { background-color: #d9534f; - border-color: #d9534f; -} + border-color: #d9534f; } -.card-inverse .card-header, .card-inverse .card-footer { - border-bottom: .075rem solid rgba(255, 255, 255, .2); -} -.card-inverse .card-header, .card-inverse .card-footer, .card-inverse .card-title, .card-inverse .card-blockquote { - color: #fff; -} -.card-inverse .card-link, .card-inverse .card-text, .card-inverse .card-blockquote > footer { - color: rgba(255, 255, 255, .65); -} -.card-inverse .card-link:focus, .card-inverse .card-link:hover { - color: #fff; -} +.card-inverse .card-header, +.card-inverse .card-footer { + border-bottom: 0.075rem solid rgba(255, 255, 255, 0.2); } + +.card-inverse .card-header, +.card-inverse .card-footer, +.card-inverse .card-title, +.card-inverse .card-blockquote { + color: #fff; } + +.card-inverse .card-link, +.card-inverse .card-text, +.card-inverse .card-blockquote > footer { + color: rgba(255, 255, 255, 0.65); } + +.card-inverse .card-link:focus, +.card-inverse .card-link:hover { + color: #fff; } .card-blockquote { padding: 0; margin-bottom: 0; - border-left: 0; -} + border-left: 0; } .card-img { margin: -1.325rem; - border-radius: .25rem; -} + border-radius: 0.25rem; } .card-img-overlay { position: absolute; @@ -3753,206 +3108,199 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto right: 0; bottom: 0; left: 0; - padding: 1.25rem; -} + padding: 1.25rem; } .card-img-top { margin: -1.325rem -1.325rem 1.25rem; - border-radius: .25rem .25rem 0 0; -} + border-radius: 0.25rem 0.25rem 0 0; } .card-img-bottom { margin: 1.25rem -1.325rem -1.325rem; - border-radius: 0 0 .25rem .25rem; -} + border-radius: 0 0 0.25rem 0.25rem; } .card-set { display: table; table-layout: fixed; - border-spacing: 1.25rem 0; -} -.card-set .card { - display: table-cell; - float: none; - max-width: none; -} + border-spacing: 1.25rem 0; } + .card-set .card { + display: table-cell; + float: none; + max-width: none; } .card-set-wrapper { margin-right: -1.25rem; - margin-left: -1.25rem; -} + margin-left: -1.25rem; } .card-group { display: table; width: 100%; - table-layout: fixed; -} -.card-group .card { - display: table-cell; - float: none; - max-width: none; -} -.card-group .card + .card { - margin-left: 0; - border-left: 0; -} + table-layout: fixed; } + .card-group .card { + display: table-cell; + float: none; + max-width: none; } + .card-group .card + .card { + margin-left: 0; + border-left: 0; } .card-columns { - -webkit-column-count: 3; - -moz-column-count: 3; - column-count: 3; - -webkit-column-gap: 1rem; - -moz-column-gap: 1rem; - column-gap: 1rem; -} -.card-columns .card { - display: inline-block; - width: 100%; -} + column-count: 3; + column-gap: 1rem; } + .card-columns .card { + display: inline-block; + width: 100%; } .breadcrumb { - padding: .75rem 1rem; + padding: 0.75rem 1rem; margin-bottom: 1rem; list-style: none; background-color: #eceeef; - border-radius: .25rem; -} -.breadcrumb > li { - display: inline-block; -} -.breadcrumb > li + li:before { - padding-right: .5rem; - padding-left: .5rem; - color: #818a91; - content: "/\00a0"; -} -.breadcrumb > .active { - color: #818a91; -} + border-radius: 0.25rem; } + .breadcrumb > li { + display: inline-block; } + .breadcrumb > li + li:before { + padding-right: .5rem; + padding-left: .5rem; + color: #818a91; + content: "/ "; } + .breadcrumb > .active { + color: #818a91; } .pagination { display: inline-block; padding-left: 0; + margin-top: 1rem; + margin-bottom: 1rem; margin: 1 0; - border-radius: .25rem; -} -.pagination > li { - display: inline; -} -.pagination > li > a, .pagination > li > span { - position: relative; - float: left; - padding: .5rem .75rem; - margin-left: -1px; - line-height: 1.5; - color: #0275d8; - text-decoration: none; - background-color: #fff; - border: 1px solid #ddd; -} -.pagination > li:first-child > a, .pagination > li:first-child > span { - margin-left: 0; - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; -} -.pagination > li:last-child > a, .pagination > li:last-child > span { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; -} -.pagination > li > a:focus, .pagination > li > a:hover, .pagination > li > span:focus, .pagination > li > span:hover { - color: #014c8c; - background-color: #eceeef; - border-color: #ddd; -} -.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover { - z-index: 2; - color: #fff; - cursor: default; - background-color: #0275d8; - border-color: #0275d8; -} -.pagination > .disabled > span, .pagination > .disabled > span:focus, .pagination > .disabled > span:hover, .pagination > .disabled > a, .pagination > .disabled > a:focus, .pagination > .disabled > a:hover { - color: #818a91; - cursor: false; - background-color: #fff; - border-color: #ddd; -} + border-radius: 0.25rem; } + .pagination > li { + display: inline; } + .pagination > li > a, + .pagination > li > span { + position: relative; + float: left; + padding: 0.5rem 0.75rem; + margin-left: -1px; + line-height: 1.5; + color: #0275d8; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd; } + .pagination > li:first-child > a, + .pagination > li:first-child > span { + margin-left: 0; + border-bottom-left-radius: 0.25rem; + border-top-left-radius: 0.25rem; } + .pagination > li:last-child > a, + .pagination > li:last-child > span { + border-bottom-right-radius: 0.25rem; + border-top-right-radius: 0.25rem; } + .pagination > li > a:focus, + .pagination > li > a:hover, + .pagination > li > span:focus, + .pagination > li > span:hover { + color: #014c8c; + background-color: #eceeef; + border-color: #ddd; } + .pagination > .active > a, + .pagination > .active > a:focus, + .pagination > .active > a:hover, + .pagination > .active > span, + .pagination > .active > span:focus, + .pagination > .active > span:hover { + z-index: 2; + color: #fff; + cursor: default; + background-color: #0275d8; + border-color: #0275d8; } + .pagination > .disabled > span, + .pagination > .disabled > span:focus, + .pagination > .disabled > span:hover, + .pagination > .disabled > a, + .pagination > .disabled > a:focus, + .pagination > .disabled > a:hover { + color: #818a91; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd; } -.pagination-lg > li > a, .pagination-lg > li > span { - padding: .75rem 1.5rem; - font-size: 1.25rem; -} -.pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { - border-top-left-radius: .3rem; - border-bottom-left-radius: .3rem; -} -.pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { - border-top-right-radius: .3rem; - border-bottom-right-radius: .3rem; -} +.pagination-lg > li > a, +.pagination-lg > li > span { + padding: 0.75rem 1.5rem; + font-size: 1.25rem; } -.pagination-sm > li > a, .pagination-sm > li > span { - padding: .3rem .75rem; - font-size: .85rem; -} -.pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { - border-top-left-radius: .2rem; - border-bottom-left-radius: .2rem; -} -.pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { - border-top-right-radius: .2rem; - border-bottom-right-radius: .2rem; -} +.pagination-lg > li:first-child > a, +.pagination-lg > li:first-child > span { + border-bottom-left-radius: 0.3rem; + border-top-left-radius: 0.3rem; } + +.pagination-lg > li:last-child > a, +.pagination-lg > li:last-child > span { + border-bottom-right-radius: 0.3rem; + border-top-right-radius: 0.3rem; } + +.pagination-sm > li > a, +.pagination-sm > li > span { + padding: 0.3rem 0.75rem; + font-size: 0.85rem; } + +.pagination-sm > li:first-child > a, +.pagination-sm > li:first-child > span { + border-bottom-left-radius: 0.2rem; + border-top-left-radius: 0.2rem; } + +.pagination-sm > li:last-child > a, +.pagination-sm > li:last-child > span { + border-bottom-right-radius: 0.2rem; + border-top-right-radius: 0.2rem; } .pager { padding-left: 0; - margin: 1 0; + margin-top: 1rem; + margin-bottom: 1rem; text-align: center; - list-style: none; -} -.pager:before, .pager:after { - display: table; - content: " "; -} -.pager:after { - clear: both; -} -.pager li { - display: inline; -} -.pager li > a, .pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 15px; -} -.pager li > a:focus, .pager li > a:hover { - text-decoration: none; - background-color: #eceeef; -} -.pager .disabled > a, .pager .disabled > a:focus, .pager .disabled > a:hover { - color: #818a91; - cursor: false; - background-color: #fff; -} -.pager .disabled > span { - color: #818a91; - cursor: false; - background-color: #fff; -} + list-style: none; } + .pager:before, + .pager:after { + content: " "; + display: table; } + .pager:after { + clear: both; } + .pager li { + display: inline; } + .pager li > a, + .pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px; } + .pager li > a:focus, + .pager li > a:hover { + text-decoration: none; + background-color: #eceeef; } + .pager .disabled > a, + .pager .disabled > a:focus, + .pager .disabled > a:hover { + color: #818a91; + cursor: not-allowed; + background-color: #fff; } + .pager .disabled > span { + color: #818a91; + cursor: not-allowed; + background-color: #fff; } -.pager-next > a, .pager-next > span { - float: right; -} +.pager-next > a, +.pager-next > span { + float: right; } -.pager-prev > a, .pager-prev > span { - float: left; -} +.pager-prev > a, +.pager-prev > span { + float: left; } .label { display: inline-block; - padding: .25em .4em; + padding: 0.25em 0.4em; font-size: 75%; font-weight: bold; line-height: 1; @@ -3960,63 +3308,54 @@ input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="butto text-align: center; white-space: nowrap; vertical-align: baseline; - border-radius: .25rem; -} -.label:empty { - display: none; -} -.btn .label { - position: relative; - top: -1px; -} + border-radius: 0.25rem; } + .label:empty { + display: none; } + .btn .label { + position: relative; + top: -1px; } -a.label:focus, a.label:hover { +a.label:focus, +a.label:hover { color: #fff; text-decoration: none; - cursor: pointer; -} + cursor: pointer; } .label-default { - background-color: #818a91; -} -.label-default[href]:focus, .label-default[href]:hover { - background-color: #687077; -} + background-color: #818a91; } + .label-default[href]:focus, + .label-default[href]:hover { + background-color: #687077; } .label-primary { - background-color: #0275d8; -} -.label-primary[href]:focus, .label-primary[href]:hover { - background-color: #025aa5; -} + background-color: #0275d8; } + .label-primary[href]:focus, + .label-primary[href]:hover { + background-color: #025aa5; } .label-success { - background-color: #5cb85c; -} -.label-success[href]:focus, .label-success[href]:hover { - background-color: #449d44; -} + background-color: #5cb85c; } + .label-success[href]:focus, + .label-success[href]:hover { + background-color: #449d44; } .label-info { - background-color: #5bc0de; -} -.label-info[href]:focus, .label-info[href]:hover { - background-color: #31b0d5; -} + background-color: #5bc0de; } + .label-info[href]:focus, + .label-info[href]:hover { + background-color: #31b0d5; } .label-warning { - background-color: #f0ad4e; -} -.label-warning[href]:focus, .label-warning[href]:hover { - background-color: #ec971f; -} + background-color: #f0ad4e; } + .label-warning[href]:focus, + .label-warning[href]:hover { + background-color: #ec971f; } .label-danger { - background-color: #d9534f; -} -.label-danger[href]:focus, .label-danger[href]:hover { - background-color: #c9302c; -} + background-color: #d9534f; } + .label-danger[href]:focus, + .label-danger[href]:hover { + background-color: #c9302c; } .badge { position: relative; @@ -4030,362 +3369,260 @@ a.label:focus, a.label:hover { text-align: center; white-space: nowrap; background-color: #818a91; - border-radius: 2em; -} -.badge:empty { - display: none; -} -.badge.pull-left, .badge.pull-right { - top: .2em; -} -.list-group-item.active > .badge, .nav-pills > .active > a > .badge { - color: #0275d8; - background-color: #fff; -} -.list-group-item > .badge { - float: right; -} -.list-group-item > .badge + .badge { - margin-right: 5px; -} -.nav-pills > li > a > .badge { - margin-left: 3px; -} + border-radius: 2em; } + .badge:empty { + display: none; } + .badge.pull-left, + .badge.pull-right { + top: .2em; } + .list-group-item.active > .badge, + .nav-pills > .active > a > .badge { + color: #0275d8; + background-color: #fff; } + .list-group-item > .badge { + float: right; } + .list-group-item > .badge + .badge { + margin-right: 5px; } + .nav-pills > li > a > .badge { + margin-left: 3px; } -a.badge:focus, a.badge:hover { +a.badge:focus, +a.badge:hover { color: #fff; text-decoration: none; - cursor: pointer; -} + cursor: pointer; } .jumbotron { padding: 2rem 1rem; margin-bottom: 2rem; color: inherit; background-color: #eceeef; - border-radius: .3rem; -} + border-radius: 0.3rem; } .jumbotron-heading { - color: inherit; -} + color: inherit; } .jumbotron-hr { - border-top-color: #d0d5d8; -} + border-top-color: #d0d5d8; } @media (min-width: 34em) { .jumbotron { - padding: 4rem 2rem; - } + padding: 4rem 2rem; } .jumbotron-heading { - font-size: 4.5rem; - } -} + font-size: 4.5rem; } } .jumbotron-fluid { padding-right: 0; padding-left: 0; - border-radius: 0; -} + border-radius: 0; } .alert { padding: 15px; margin-bottom: 1rem; border: 1px solid transparent; - border-radius: .25rem; -} -.alert > p, .alert > ul { - margin-bottom: 0; -} -.alert > p + p { - margin-top: 5px; -} + border-radius: 0.25rem; } + .alert > p, + .alert > ul { + margin-bottom: 0; } + .alert > p + p { + margin-top: 5px; } .alert-heading { margin-top: 0; - color: inherit; -} + color: inherit; } .alert-link { - font-weight: bold; -} + font-weight: bold; } .alert-dismissible { - padding-right: 35px; -} -.alert-dismissible .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} + padding-right: 35px; } + .alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit; } .alert-success { - color: #3c763d; background-color: #dff0d8; border-color: #d0e9c6; -} -.alert-success hr { - border-top-color: #c1e2b3; -} -.alert-success .alert-link { - color: #2b542c; -} + color: #3c763d; } + .alert-success hr { + border-top-color: #c1e2b3; } + .alert-success .alert-link { + color: #2b542c; } .alert-info { - color: #31708f; background-color: #d9edf7; border-color: #bcdff1; -} -.alert-info hr { - border-top-color: #a6d5ec; -} -.alert-info .alert-link { - color: #245269; -} + color: #31708f; } + .alert-info hr { + border-top-color: #a6d5ec; } + .alert-info .alert-link { + color: #245269; } .alert-warning { - color: #8a6d3b; background-color: #fcf8e3; border-color: #faf2cc; -} -.alert-warning hr { - border-top-color: #f7ecb5; -} -.alert-warning .alert-link { - color: #66512c; -} + color: #8a6d3b; } + .alert-warning hr { + border-top-color: #f7ecb5; } + .alert-warning .alert-link { + color: #66512c; } .alert-danger { - color: #a94442; background-color: #f2dede; border-color: #ebcccc; -} -.alert-danger hr { - border-top-color: #e4b9b9; -} -.alert-danger .alert-link { - color: #843534; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 1 0; - } - - to { - background-position: 0 0; - } -} - -@-o-keyframes progress-bar-stripes { - from { - background-position: 1 0; - } - - to { - background-position: 0 0; - } -} + color: #a94442; } + .alert-danger hr { + border-top-color: #e4b9b9; } + .alert-danger .alert-link { + color: #843534; } @keyframes progress-bar-stripes { from { - background-position: 1 0; - } - + background-position: 1rem 0; } to { - background-position: 0 0; - } -} + background-position: 0 0; } } .progress { display: block; width: 100%; - height: 1; - margin-bottom: 1; -} + height: 1rem; + margin-bottom: 1rem; } .progress[value] { color: #0074d9; border: 0; - - appearance: none; -} + appearance: none; } .progress[value]::-webkit-progress-bar { background-color: #eee; - border-radius: .25rem; -} + border-radius: 0.25rem; } .progress[value]::-webkit-progress-value::before { - content: attr(value); -} + content: attr(value); } .progress[value]::-webkit-progress-value { background-color: #0074d9; - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; -} + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .progress[value="100"]::-webkit-progress-value { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; -} + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; } -@media screen and ("min-width:0\0") { +@media screen and ("min-width:0�") { .progress { background-color: #eee; - border-radius: .25rem; - } + border-radius: 0.25rem; } .progress-bar { display: inline-block; - height: 1; + height: 1rem; text-indent: -999rem; background-color: #0074d9; - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; - } + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } .progress[width^="0"] { min-width: 2rem; color: #818a91; background-color: transparent; - background-image: none; - } + background-image: none; } .progress[width="100%"] { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; - } -} + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; } } .progress-striped[value]::-webkit-progress-value { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - -webkit-background-size: 1 1; - background-size: 1 1; -} + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; } .progress-striped[value]::-moz-progress-bar { - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-size: 1 1; -} + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; } -@media screen and ("min-width:0\0") { +@media screen and ("min-width:0�") { .progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - -webkit-background-size: 1 1; - background-size: 1 1; - } -} + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; } } .progress-animated[value]::-webkit-progress-value { - -webkit-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} + animation: progress-bar-stripes 2s linear infinite; } .progress-animated[value]::-moz-progress-bar { - animation: progress-bar-stripes 2s linear infinite; -} + animation: progress-bar-stripes 2s linear infinite; } -@media screen and ("min-width:0\0") { +@media screen and ("min-width:0�") { .progress-animated .progress-bar-striped { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; - } -} + animation: progress-bar-stripes 2s linear infinite; } } .progress-success[value]::-webkit-progress-value { - background-color: #5cb85c; -} + background-color: #5cb85c; } + .progress-success[value]::-moz-progress-bar { - background-color: #5cb85c; -} -@media screen and ("min-width:0\0") { + background-color: #5cb85c; } + +@media screen and ("min-width:0�") { .progress-success .progress-bar { - background-color: #5cb85c; - } -} + background-color: #5cb85c; } } .progress-info[value]::-webkit-progress-value { - background-color: #5bc0de; -} + background-color: #5bc0de; } + .progress-info[value]::-moz-progress-bar { - background-color: #5bc0de; -} -@media screen and ("min-width:0\0") { + background-color: #5bc0de; } + +@media screen and ("min-width:0�") { .progress-info .progress-bar { - background-color: #5bc0de; - } -} + background-color: #5bc0de; } } .progress-warning[value]::-webkit-progress-value { - background-color: #f0ad4e; -} + background-color: #f0ad4e; } + .progress-warning[value]::-moz-progress-bar { - background-color: #f0ad4e; -} -@media screen and ("min-width:0\0") { + background-color: #f0ad4e; } + +@media screen and ("min-width:0�") { .progress-warning .progress-bar { - background-color: #f0ad4e; - } -} + background-color: #f0ad4e; } } .progress-danger[value]::-webkit-progress-value { - background-color: #d9534f; -} + background-color: #d9534f; } + .progress-danger[value]::-moz-progress-bar { - background-color: #d9534f; -} -@media screen and ("min-width:0\0") { + background-color: #d9534f; } + +@media screen and ("min-width:0�") { .progress-danger .progress-bar { - background-color: #d9534f; - } -} + background-color: #d9534f; } } .media { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - margin-bottom: 1rem; -} + display: flex; + margin-bottom: 1rem; } .media-body { - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; -} + flex: 1; } .media-object { - display: block; -} + display: block; } -.media-right, .media > .pull-right { - padding-left: 10px; -} +.media-right, +.media > .pull-right { + padding-left: 10px; } -.media-left, .media > .pull-left { - padding-right: 10px; -} +.media-left, +.media > .pull-left { + padding-right: 10px; } .media-heading { margin-top: 0; - margin-bottom: 5px; -} + margin-bottom: 5px; } .media-list { padding-left: 0; - list-style: none; -} + list-style: none; } .list-group { padding-left: 0; - margin-bottom: 20px; -} + margin-bottom: 20px; } .list-group-item { position: relative; @@ -4393,172 +3630,170 @@ a.badge:focus, a.badge:hover { padding: 10px 15px; margin-bottom: -1px; background-color: #fff; - border: 1px solid #ddd; -} -.list-group-item:first-child { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; -} -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; -} + border: 1px solid #ddd; } + .list-group-item:first-child { + border-top-right-radius: 0.25rem; + border-top-left-radius: 0.25rem; } + .list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; } a.list-group-item { - color: #555; -} -a.list-group-item .list-group-item-heading { - color: #333; -} -a.list-group-item:focus, a.list-group-item:hover { - color: #555; - text-decoration: none; - background-color: #f5f5f5; -} + color: #555; } + a.list-group-item .list-group-item-heading { + color: #333; } + a.list-group-item:focus, + a.list-group-item:hover { + color: #555; + text-decoration: none; + background-color: #f5f5f5; } -.list-group-item.disabled, .list-group-item.disabled:focus, .list-group-item.disabled:hover { +.list-group-item.disabled, +.list-group-item.disabled:focus, +.list-group-item.disabled:hover { color: #818a91; - cursor: false; - background-color: #eceeef; -} -.list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading { - color: inherit; -} -.list-group-item.disabled .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text { - color: #818a91; -} -.list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover { + cursor: not-allowed; + background-color: #eceeef; } + .list-group-item.disabled .list-group-item-heading, + .list-group-item.disabled:focus .list-group-item-heading, + .list-group-item.disabled:hover .list-group-item-heading { + color: inherit; } + .list-group-item.disabled .list-group-item-text, + .list-group-item.disabled:focus .list-group-item-text, + .list-group-item.disabled:hover .list-group-item-text { + color: #818a91; } + +.list-group-item.active, +.list-group-item.active:focus, +.list-group-item.active:hover { z-index: 2; color: #fff; background-color: #0275d8; - border-color: #0275d8; -} -.list-group-item.active .list-group-item-heading, .list-group-item.active .list-group-item-heading > small, .list-group-item.active .list-group-item-heading > .small, .list-group-item.active:focus .list-group-item-heading, .list-group-item.active:focus .list-group-item-heading > small, .list-group-item.active:focus .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading, .list-group-item.active:hover .list-group-item-heading > small, .list-group-item.active:hover .list-group-item-heading > .small { - color: inherit; -} -.list-group-item.active .list-group-item-text, .list-group-item.active:focus .list-group-item-text, .list-group-item.active:hover .list-group-item-text { - color: #a8d6fe; -} + border-color: #0275d8; } + .list-group-item.active .list-group-item-heading, + .list-group-item.active .list-group-item-heading > small, + .list-group-item.active .list-group-item-heading > .small, + .list-group-item.active:focus .list-group-item-heading, + .list-group-item.active:focus .list-group-item-heading > small, + .list-group-item.active:focus .list-group-item-heading > .small, + .list-group-item.active:hover .list-group-item-heading, + .list-group-item.active:hover .list-group-item-heading > small, + .list-group-item.active:hover .list-group-item-heading > .small { + color: inherit; } + .list-group-item.active .list-group-item-text, + .list-group-item.active:focus .list-group-item-text, + .list-group-item.active:hover .list-group-item-text { + color: #a8d6fe; } .list-group-item-state { color: #3c763d; - background-color: #dff0d8; -} + background-color: #dff0d8; } a.list-group-item-state { - color: #3c763d; -} -a.list-group-item-state .list-group-item-heading { - color: inherit; -} -a.list-group-item-state:focus, a.list-group-item-state:hover { - color: #3c763d; - background-color: #d0e9c6; -} -a.list-group-item-state.active, a.list-group-item-state.active:focus, a.list-group-item-state.active:hover { - color: #fff; - background-color: #3c763d; - border-color: #3c763d; -} + color: #3c763d; } + a.list-group-item-state .list-group-item-heading { + color: inherit; } + a.list-group-item-state:focus, + a.list-group-item-state:hover { + color: #3c763d; + background-color: #d0e9c6; } + a.list-group-item-state.active, + a.list-group-item-state.active:focus, + a.list-group-item-state.active:hover { + color: #fff; + background-color: #3c763d; + border-color: #3c763d; } .list-group-item-state { color: #31708f; - background-color: #d9edf7; -} + background-color: #d9edf7; } a.list-group-item-state { - color: #31708f; -} -a.list-group-item-state .list-group-item-heading { - color: inherit; -} -a.list-group-item-state:focus, a.list-group-item-state:hover { - color: #31708f; - background-color: #c4e3f3; -} -a.list-group-item-state.active, a.list-group-item-state.active:focus, a.list-group-item-state.active:hover { - color: #fff; - background-color: #31708f; - border-color: #31708f; -} + color: #31708f; } + a.list-group-item-state .list-group-item-heading { + color: inherit; } + a.list-group-item-state:focus, + a.list-group-item-state:hover { + color: #31708f; + background-color: #c4e3f3; } + a.list-group-item-state.active, + a.list-group-item-state.active:focus, + a.list-group-item-state.active:hover { + color: #fff; + background-color: #31708f; + border-color: #31708f; } .list-group-item-state { color: #8a6d3b; - background-color: #fcf8e3; -} + background-color: #fcf8e3; } a.list-group-item-state { - color: #8a6d3b; -} -a.list-group-item-state .list-group-item-heading { - color: inherit; -} -a.list-group-item-state:focus, a.list-group-item-state:hover { - color: #8a6d3b; - background-color: #faf2cc; -} -a.list-group-item-state.active, a.list-group-item-state.active:focus, a.list-group-item-state.active:hover { - color: #fff; - background-color: #8a6d3b; - border-color: #8a6d3b; -} + color: #8a6d3b; } + a.list-group-item-state .list-group-item-heading { + color: inherit; } + a.list-group-item-state:focus, + a.list-group-item-state:hover { + color: #8a6d3b; + background-color: #faf2cc; } + a.list-group-item-state.active, + a.list-group-item-state.active:focus, + a.list-group-item-state.active:hover { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b; } .list-group-item-state { color: #a94442; - background-color: #f2dede; -} + background-color: #f2dede; } a.list-group-item-state { - color: #a94442; -} -a.list-group-item-state .list-group-item-heading { - color: inherit; -} -a.list-group-item-state:focus, a.list-group-item-state:hover { - color: #a94442; - background-color: #ebcccc; -} -a.list-group-item-state.active, a.list-group-item-state.active:focus, a.list-group-item-state.active:hover { - color: #fff; - background-color: #a94442; - border-color: #a94442; -} + color: #a94442; } + a.list-group-item-state .list-group-item-heading { + color: inherit; } + a.list-group-item-state:focus, + a.list-group-item-state:hover { + color: #a94442; + background-color: #ebcccc; } + a.list-group-item-state.active, + a.list-group-item-state.active:focus, + a.list-group-item-state.active:hover { + color: #fff; + background-color: #a94442; + border-color: #a94442; } .list-group-item-heading { margin-top: 0; - margin-bottom: 5px; -} + margin-bottom: 5px; } .list-group-item-text { margin-bottom: 0; - line-height: 1.3; -} + line-height: 1.3; } .embed-responsive { position: relative; display: block; height: 0; padding: 0; - overflow: hidden; -} -.embed-responsive .embed-responsive-item, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; -} + overflow: hidden; } + .embed-responsive .embed-responsive-item, + .embed-responsive iframe, + .embed-responsive embed, + .embed-responsive object, + .embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; } .embed-responsive-16by9 { - padding-bottom: 56.25%; -} + padding-bottom: 56.25%; } .embed-responsive-4by3 { - padding-bottom: 75%; -} + padding-bottom: 75%; } .close { float: right; @@ -4567,26 +3802,23 @@ a.list-group-item-state.active, a.list-group-item-state.active:focus, a.list-gro line-height: 1; color: #000; text-shadow: 0 1px 0 #fff; - opacity: .2; -} -.close:focus, .close:hover { - color: #000; - text-decoration: none; - cursor: pointer; - opacity: .5; -} + opacity: .2; } + .close:focus, + .close:hover { + color: #000; + text-decoration: none; + cursor: pointer; + opacity: .5; } button.close { - -webkit-appearance: none; padding: 0; cursor: pointer; background: transparent; border: 0; -} + -webkit-appearance: none; } .modal-open { - overflow: hidden; -} + overflow: hidden; } .modal { position: fixed; @@ -4597,42 +3829,29 @@ button.close { z-index: 1050; display: none; overflow: hidden; - -webkit-overflow-scrolling: touch; outline: 0; -} -.modal.fade .modal-dialog { - -webkit-transform: transition .3s ease-out, translate(0, -25%); - -ms-transform: transition .3s ease-out, translate(0, -25%); - -o-transform: transition .3s ease-out, translate(0, -25%); - transform: transition .3s ease-out, translate(0, -25%); -} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0); -} + -webkit-overflow-scrolling: touch; } + .modal.fade .modal-dialog { + transform: transition 0.3s ease-out, translate(0, -25%); } + .modal.in .modal-dialog { + transform: translate(0, 0); } .modal-open .modal { overflow-x: hidden; - overflow-y: auto; -} + overflow-y: auto; } .modal-dialog { position: relative; width: auto; - margin: 10px; -} + margin: 10px; } .modal-content { position: relative; background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: .3rem; - outline: 0; -} + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 0.3rem; + outline: 0; } .modal-backdrop { position: fixed; @@ -4641,115 +3860,119 @@ button.close { bottom: 0; left: 0; z-index: 1040; - background-color: #000; -} -.modal-backdrop.fade { - opacity: 0; -} -.modal-backdrop.in { - opacity: .5; -} + background-color: #000; } + .modal-backdrop.fade { + opacity: 0; } + .modal-backdrop.in { + opacity: 0.5; } .modal-header { min-height: 16.5px; padding: 15px; - border-bottom: 1px solid #e5e5e5; -} + border-bottom: 1px solid #e5e5e5; } .modal-header .close { - margin-top: -2px; -} + margin-top: -2px; } .modal-title { margin: 0; - line-height: 1.5; -} + line-height: 1.5; } .modal-body { position: relative; - padding: 15px; -} + padding: 15px; } .modal-footer { padding: 15px; text-align: right; - border-top: 1px solid #e5e5e5; -} -.modal-footer:before, .modal-footer:after { - display: table; - content: " "; -} -.modal-footer:after { - clear: both; -} -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} + border-top: 1px solid #e5e5e5; } + .modal-footer:before, + .modal-footer:after { + content: " "; + display: table; } + .modal-footer:after { + clear: both; } + .modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; } + .modal-footer .btn-group .btn + .btn { + margin-left: -1px; } + .modal-footer .btn-block + .btn-block { + margin-left: 0; } .modal-scrollbar-measure { position: absolute; top: -9999px; width: 50px; height: 50px; - overflow: scroll; -} + overflow: scroll; } @media (min-width: 34em) { .modal-dialog { width: 600px; - margin: 30px auto; - } + margin: 30px auto; } .modal-sm { - width: 300px; - } -} + width: 300px; } } @media (min-width: 48em) { .modal-lg { - width: 900px; - } -} + width: 900px; } } .tooltip { position: absolute; z-index: 1070; display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: .85rem; + font-size: 0.85rem; font-weight: normal; line-height: 1.4; - opacity: 0; -} -.tooltip.in { - opacity: .9; -} - -.tooltip-top { - padding: 5px 0; - margin-top: -3px; -} - -.tooltip-right { - padding: 0 5px; - margin-left: 3px; -} - -.tooltip-bottom { - padding: 5px 0; - margin-top: 3px; -} - -.tooltip-left { - padding: 0 5px; - margin-left: -3px; -} + opacity: 0; } + .tooltip.in { + opacity: 0.9; } + .tooltip.tooltip-top, + .tooltip.bs-tether-element-attached-bottom { + padding: 5px 0; + margin-top: -3px; } + .tooltip.tooltip-top .tooltip-arrow, + .tooltip.bs-tether-element-attached-bottom .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; } + .tooltip.tooltip-right, + .tooltip.bs-tether-element-attached-left { + padding: 0 5px; + margin-left: 3px; } + .tooltip.tooltip-right .tooltip-arrow, + .tooltip.bs-tether-element-attached-left .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; } + .tooltip.tooltip-bottom, + .tooltip.bs-tether-element-attached-top { + padding: 5px 0; + margin-top: 3px; } + .tooltip.tooltip-bottom .tooltip-arrow, + .tooltip.bs-tether-element-attached-top .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; } + .tooltip.tooltip-left, + .tooltip.bs-tether-element-attached-right { + padding: 0 5px; + margin-left: -3px; } + .tooltip.tooltip-left .tooltip-arrow, + .tooltip.bs-tether-element-attached-right .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; } .tooltip-inner { max-width: 200px; @@ -4758,55 +3981,21 @@ button.close { text-align: center; text-decoration: none; background-color: #000; - border-radius: .25rem; -} + border-radius: 0.25rem; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; - border-style: solid; -} - -.tooltip-top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} - -.tooltip-right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000; -} - -.tooltip-left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000; -} - -.tooltip-bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} + border-style: solid; } .popover { position: absolute; top: 0; left: 0; z-index: 1060; - display: none; + display: block; max-width: 276px; padding: 1px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -4816,27 +4005,77 @@ button.close { text-align: left; white-space: normal; background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: .3rem; -} - -.popover-top { - margin-top: -10px; -} - -.popover-right { - margin-left: 10px; -} - -.popover-bottom { - margin-top: 10px; -} - -.popover-left { - margin-left: -10px; -} + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 0.3rem; } + .popover.popover-top, + .popover.bs-tether-element-attached-bottom { + margin-top: -10px; } + .popover.popover-top .popover-arrow, + .popover.bs-tether-element-attached-bottom .popover-arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; } + .popover.popover-top .popover-arrow:after, + .popover.bs-tether-element-attached-bottom .popover-arrow:after { + bottom: 1px; + margin-left: -10px; + content: ""; + border-top-color: #fff; + border-bottom-width: 0; } + .popover.popover-right, + .popover.bs-tether-element-attached-left { + margin-left: 10px; } + .popover.popover-right .popover-arrow, + .popover.bs-tether-element-attached-left .popover-arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: rgba(0, 0, 0, 0.25); + border-left-width: 0; } + .popover.popover-right .popover-arrow:after, + .popover.bs-tether-element-attached-left .popover-arrow:after { + bottom: -10px; + left: 1px; + content: ""; + border-right-color: #fff; + border-left-width: 0; } + .popover.popover-bottom, + .popover.bs-tether-element-attached-top { + margin-top: 10px; } + .popover.popover-bottom .popover-arrow, + .popover.bs-tether-element-attached-top .popover-arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: rgba(0, 0, 0, 0.25); } + .popover.popover-bottom .popover-arrow:after, + .popover.bs-tether-element-attached-top .popover-arrow:after { + top: 1px; + margin-left: -10px; + content: ""; + border-top-width: 0; + border-bottom-color: #fff; } + .popover.popover-left, + .popover.bs-tether-element-attached-right { + margin-left: -10px; } + .popover.popover-left .popover-arrow, + .popover.bs-tether-element-attached-right .popover-arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: rgba(0, 0, 0, 0.25); } + .popover.popover-left .popover-arrow:after, + .popover.bs-tether-element-attached-right .popover-arrow:after { + right: 1px; + bottom: -10px; + content: ""; + border-right-width: 0; + border-left-color: #fff; } .popover-title { padding: 8px 14px; @@ -4844,163 +4083,81 @@ button.close { font-size: 1rem; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; - border-radius: -.7rem -.7rem 0 0; -} + border-radius: -0.7rem -0.7rem 0 0; } .popover-content { - padding: 9px 14px; -} + padding: 9px 14px; } -.popover-arrow, .popover-arrow:after { +.popover-arrow, +.popover-arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; - border-style: solid; -} + border-style: solid; } .popover-arrow { - border-width: 11px; -} + border-width: 11px; } .popover-arrow:after { content: ""; - border-width: 10px; -} - -.popover-top > .popover-arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: rgba(0, 0, 0, .25); - border-bottom-width: 0; -} -.popover-top > .popover-arrow:after { - bottom: 1px; - margin-left: -10px; - content: ""; - border-top-color: #fff; - border-bottom-width: 0; -} - -.popover-right > .popover-arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: rgba(0, 0, 0, .25); - border-left-width: 0; -} -.popover-right > .popover-arrow:after { - bottom: -10px; - left: 1px; - content: ""; - border-right-color: #fff; - border-left-width: 0; -} - -.popover-bottom > .popover-arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: rgba(0, 0, 0, .25); -} -.popover-bottom > .popover-arrow:after { - top: 1px; - margin-left: -10px; - content: ""; - border-top-width: 0; - border-bottom-color: #fff; -} - -.popover-left > .popover-arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: rgba(0, 0, 0, .25); -} -.popover-left > .popover-arrow:after { - right: 1px; - bottom: -10px; - content: ""; - border-right-width: 0; - border-left-color: #fff; -} + border-width: 10px; } .carousel { - position: relative; -} + position: relative; } .carousel-inner { position: relative; width: 100%; - overflow: hidden; -} -.carousel-inner > .carousel-item { - position: relative; - display: none; - -webkit-transition: .6s ease-in-out left; - -o-transition: .6s ease-in-out left; - transition: .6s ease-in-out left; -} -.carousel-inner > .carousel-item > img, .carousel-inner > .carousel-item > a > img { - line-height: 1; -} -@media all and (transform-3d), (-webkit-transform-3d) { + overflow: hidden; } .carousel-inner > .carousel-item { - -webkit-transition: -webkit-transform .6s ease-in-out; - -o-transition: -o-transform .6s ease-in-out; - transition: transform .6s ease-in-out; - - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-perspective: 1000; - perspective: 1000; - } - .carousel-inner > .carousel-item.next, .carousel-inner > .carousel-item.active.right { - left: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } - .carousel-inner > .carousel-item.prev, .carousel-inner > .carousel-item.active.left { - left: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } - .carousel-inner > .carousel-item.next.left, .carousel-inner > .carousel-item.prev.right, .carousel-inner > .carousel-item.active { - left: 0; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -.carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { - display: block; -} -.carousel-inner > .active { - left: 0; -} -.carousel-inner > .next, .carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} -.carousel-inner > .next { - left: 100%; -} -.carousel-inner > .prev { - left: -100%; -} -.carousel-inner > .next.left, .carousel-inner > .prev.right { - left: 0; -} -.carousel-inner > .active.left { - left: -100%; -} -.carousel-inner > .active.right { - left: 100%; -} + position: relative; + display: none; + transition: .6s ease-in-out left; } + .carousel-inner > .carousel-item > img, + .carousel-inner > .carousel-item > a > img { + line-height: 1; } + @media all and (transform-3d), (-webkit-transform-3d) { + .carousel-inner > .carousel-item { + transition: transform 0.6s ease-in-out; + backface-visibility: hidden; + perspective: 1000; } + .carousel-inner > .carousel-item.next, + .carousel-inner > .carousel-item.active.right { + left: 0; + transform: translate3d(100%, 0, 0); } + .carousel-inner > .carousel-item.prev, + .carousel-inner > .carousel-item.active.left { + left: 0; + transform: translate3d(-100%, 0, 0); } + .carousel-inner > .carousel-item.next.left, + .carousel-inner > .carousel-item.prev.right, + .carousel-inner > .carousel-item.active { + left: 0; + transform: translate3d(0, 0, 0); } } + .carousel-inner > .active, + .carousel-inner > .next, + .carousel-inner > .prev { + display: block; } + .carousel-inner > .active { + left: 0; } + .carousel-inner > .next, + .carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; } + .carousel-inner > .next { + left: 100%; } + .carousel-inner > .prev { + left: -100%; } + .carousel-inner > .next.left, + .carousel-inner > .prev.right { + left: 0; } + .carousel-inner > .active.left { + left: -100%; } + .carousel-inner > .active.right { + left: 100%; } .carousel-control { position: absolute; @@ -5011,58 +4168,45 @@ button.close { font-size: 20px; color: #fff; text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); - opacity: .5; -} -.carousel-control.left { - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control.right { - right: 0; - left: auto; - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control:focus, .carousel-control:hover { - color: #fff; - text-decoration: none; - outline: 0; - opacity: .9; -} -.carousel-control .icon-prev, .carousel-control .icon-next { - position: absolute; - top: 50%; - z-index: 5; - display: inline-block; - width: 20px; - height: 20px; - margin-top: -10px; - font-family: serif; - line-height: 1; -} -.carousel-control .icon-prev { - left: 50%; - margin-left: -10px; -} -.carousel-control .icon-next { - right: 50%; - margin-right: -10px; -} -.carousel-control .icon-prev:before { - content: "\2039"; -} -.carousel-control .icon-next:before { - content: "\203a"; -} + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); + opacity: 0.5; } + .carousel-control.left { + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); } + .carousel-control.right { + right: 0; + left: auto; + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); } + .carousel-control:focus, + .carousel-control:hover { + color: #fff; + text-decoration: none; + outline: 0; + opacity: .9; } + .carousel-control .icon-prev, + .carousel-control .icon-next { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; + width: 20px; + height: 20px; + margin-top: -10px; + font-family: serif; + line-height: 1; } + .carousel-control .icon-prev { + left: 50%; + margin-left: -10px; } + .carousel-control .icon-next { + right: 50%; + margin-right: -10px; } + .carousel-control .icon-prev:before { + content: "\2039"; } + .carousel-control .icon-next:before { + content: "\203a"; } .carousel-indicators { position: absolute; @@ -5073,25 +4217,22 @@ button.close { padding-left: 0; margin-left: -30%; text-align: center; - list-style: none; -} -.carousel-indicators li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - cursor: pointer; - background-color: transparent; - border: 1px solid #fff; - border-radius: 10px; -} -.carousel-indicators .active { - width: 12px; - height: 12px; - margin: 0; - background-color: #fff; -} + list-style: none; } + .carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: transparent; + border: 1px solid #fff; + border-radius: 10px; } + .carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff; } .carousel-caption { position: absolute; @@ -5103,56 +4244,46 @@ button.close { padding-bottom: 20px; color: #fff; text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); -} -.carousel-caption .btn { - text-shadow: none; -} + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); } + .carousel-caption .btn { + text-shadow: none; } @media (min-width: 34em) { - .carousel-control .icon-prev, .carousel-control .icon-next { + .carousel-control .icon-prev, + .carousel-control .icon-next { width: 30px; height: 30px; margin-top: -15px; - font-size: 30px; - } + font-size: 30px; } .carousel-control .icon-prev { - margin-left: -15px; - } + margin-left: -15px; } .carousel-control .icon-next { - margin-right: -15px; - } + margin-right: -15px; } .carousel-caption { right: 20%; left: 20%; - padding-bottom: 30px; - } + padding-bottom: 30px; } .carousel-indicators { - bottom: 20px; - } -} + bottom: 20px; } } -.clearfix:before, .clearfix:after { - display: table; - content: " "; -} +.clearfix:before, .clearfix:after { - clear: both; -} + content: " "; + display: table; } + +.clearfix:after { + clear: both; } .center-block { display: block; - margin-right: auto; margin-left: auto; -} + margin-right: auto; } .pull-right { - float: right !important; -} + float: right !important; } .pull-left { - float: left !important; -} + float: left !important; } .sr-only { position: absolute; @@ -5162,463 +4293,360 @@ button.close { margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); - border: 0; -} + border: 0; } -.sr-only-focusable:active, .sr-only-focusable:focus { +.sr-only-focusable:active, +.sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; - clip: auto; -} + clip: auto; } .m-a-0 { - margin: 0; -} + margin: 0; } .m-t-0 { - margin-top: 0; -} + margin-top: 0; } .m-r-0 { - margin-right: 0; -} + margin-right: 0; } .m-b-0 { - margin-bottom: 0; -} + margin-bottom: 0; } .m-l-0 { - margin-left: 0; -} + margin-left: 0; } .m-a { - margin: 1rem; -} + margin: 1rem; } .m-t { - margin-top: 1rem; -} + margin-top: 1rem; } .m-r { - margin-right: 1rem; -} + margin-right: 1rem; } .m-b { - margin-bottom: 1rem; -} + margin-bottom: 1rem; } .m-l { - margin-left: 1rem; -} + margin-left: 1rem; } .m-x { margin-right: 1rem; - margin-left: 1rem; -} + margin-left: 1rem; } .m-y { margin-top: 1rem; - margin-bottom: 1rem; -} + margin-bottom: 1rem; } .m-t-md { - margin-top: 1.5rem; -} + margin-top: 1.5rem; } .m-r-md { - margin-right: 1.5rem; -} + margin-right: 1.5rem; } .m-b-md { - margin-bottom: 1.5rem; -} + margin-bottom: 1.5rem; } .m-l-md { - margin-left: 1.5rem; -} + margin-left: 1.5rem; } .m-x-md { margin-right: 1.5rem; - margin-left: 1.5rem; -} + margin-left: 1.5rem; } .m-y-md { margin-top: 1.5rem; - margin-bottom: 1.5rem; -} + margin-bottom: 1.5rem; } .m-t-lg { - margin-top: 3rem; -} + margin-top: 3rem; } .m-r-lg { - margin-right: 3rem; -} + margin-right: 3rem; } .m-b-lg { - margin-bottom: 3rem; -} + margin-bottom: 3rem; } .m-l-lg { - margin-left: 3rem; -} + margin-left: 3rem; } .m-x-lg { margin-right: 3rem; - margin-left: 3rem; -} + margin-left: 3rem; } .m-y-lg { margin-top: 3rem; - margin-bottom: 3rem; -} + margin-bottom: 3rem; } .p-a-0 { - padding: 0; -} + padding: 0; } .p-t-0 { - padding-top: 0; -} + padding-top: 0; } .p-r-0 { - padding-right: 0; -} + padding-right: 0; } .p-b-0 { - padding-bottom: 0; -} + padding-bottom: 0; } .p-l-0 { - padding-left: 0; -} + padding-left: 0; } .p-a { - padding: 1rem; -} + padding: 1rem; } .p-t { - padding-top: 1rem; -} + padding-top: 1rem; } .p-r { - padding-right: 1rem; -} + padding-right: 1rem; } .p-b { - padding-bottom: 1rem; -} + padding-bottom: 1rem; } .p-l { - padding-left: 1rem; -} + padding-left: 1rem; } .p-x { padding-right: 1rem; - padding-left: 1rem; -} + padding-left: 1rem; } .p-y { padding-top: 1rem; - padding-bottom: 1rem; -} + padding-bottom: 1rem; } .p-t-md { - padding-top: 1.5rem; -} + padding-top: 1.5rem; } .p-r-md { - padding-right: 1.5rem; -} + padding-right: 1.5rem; } .p-b-md { - padding-bottom: 1.5rem; -} + padding-bottom: 1.5rem; } .p-l-md { - padding-left: 1.5rem; -} + padding-left: 1.5rem; } .p-x-md { padding-right: 1.5rem; - padding-left: 1.5rem; -} + padding-left: 1.5rem; } .p-y-md { padding-top: 1.5rem; - padding-bottom: 1.5rem; -} + padding-bottom: 1.5rem; } .p-t-lg { - padding-top: 3rem; -} + padding-top: 3rem; } .p-r-lg { - padding-right: 3rem; -} + padding-right: 3rem; } .p-b-lg { - padding-bottom: 3rem; -} + padding-bottom: 3rem; } .p-l-lg { - padding-left: 3rem; -} + padding-left: 3rem; } .p-x-lg { padding-right: 3rem; - padding-left: 3rem; -} + padding-left: 3rem; } .p-y-lg { padding-top: 3rem; - padding-bottom: 3rem; -} + padding-bottom: 3rem; } .pos-f-t { position: fixed; top: 0; right: 0; left: 0; - z-index: 1030; -} + z-index: 1030; } [hidden] { - display: none !important; -} + display: none !important; } .invisible { - visibility: hidden; -} + visibility: hidden; } .text-hide { font: "0/0" a; color: transparent; text-shadow: none; background-color: transparent; - border: 0; -} + border: 0; } .text-left { - text-align: left; -} + text-align: left; } .text-right { - text-align: right; -} + text-align: right; } .text-center { - text-align: center; -} + text-align: center; } .text-justify { - text-align: justify; -} + text-align: justify; } .text-nowrap { - white-space: nowrap; -} + white-space: nowrap; } .text-truncate { overflow: hidden; text-overflow: ellipsis; - white-space: nowrap; -} + white-space: nowrap; } .text-lowercase { - text-transform: lowercase; -} + text-transform: lowercase; } .text-uppercase { - text-transform: uppercase; -} + text-transform: uppercase; } .text-capitalize { - text-transform: capitalize; -} + text-transform: capitalize; } .text-muted { - color: #818a91; -} + color: #818a91; } .text-primary { - color: #0275d8; -} + color: #0275d8; } -a.text-primary:focus, a.text-primary:hover { - color: #025aa5; -} +a.text-primary:focus, +a.text-primary:hover { + color: #025aa5; } .text-success { - color: #3c763d; -} + color: #3c763d; } -a.text-success:focus, a.text-success:hover { - color: #2b542c; -} +a.text-success:focus, +a.text-success:hover { + color: #2b542c; } .text-info { - color: #31708f; -} + color: #31708f; } -a.text-info:focus, a.text-info:hover { - color: #245269; -} +a.text-info:focus, +a.text-info:hover { + color: #245269; } .text-warning { - color: #8a6d3b; -} + color: #8a6d3b; } -a.text-warning:focus, a.text-warning:hover { - color: #66512c; -} +a.text-warning:focus, +a.text-warning:hover { + color: #66512c; } .text-danger { - color: #a94442; -} + color: #a94442; } -a.text-danger:focus, a.text-danger:hover { - color: #843534; -} +a.text-danger:focus, +a.text-danger:hover { + color: #843534; } .inverse { color: #eceeef; - background-color: #373a3c; -} + background-color: #373a3c; } .bg-primary { - color: #fff; -} + color: #fff; } .bg-primary { - background-color: #0275d8; -} + background-color: #0275d8; } -a.bg-primary:focus, a.bg-primary:hover { - background-color: #025aa5; -} +a.bg-primary:focus, +a.bg-primary:hover { + background-color: #025aa5; } .bg-success { - background-color: #dff0d8; -} + background-color: #dff0d8; } -a.bg-success:focus, a.bg-success:hover { - background-color: #c1e2b3; -} +a.bg-success:focus, +a.bg-success:hover { + background-color: #c1e2b3; } .bg-info { - background-color: #d9edf7; -} + background-color: #d9edf7; } -a.bg-info:focus, a.bg-info:hover { - background-color: #afd9ee; -} +a.bg-info:focus, +a.bg-info:hover { + background-color: #afd9ee; } .bg-warning { - background-color: #fcf8e3; -} + background-color: #fcf8e3; } -a.bg-warning:focus, a.bg-warning:hover { - background-color: #f7ecb5; -} +a.bg-warning:focus, +a.bg-warning:hover { + background-color: #f7ecb5; } .bg-danger { - background-color: #f2dede; -} + background-color: #f2dede; } -a.bg-danger:focus, a.bg-danger:hover { - background-color: #e4b9b9; -} +a.bg-danger:focus, +a.bg-danger:hover { + background-color: #e4b9b9; } .hidden-xs-up { - display: none !important; -} + display: none !important; } @media (max-width: 33.9em) { .hidden-xs-down { - display: none !important; - } -} + display: none !important; } } @media (min-width: 34em) { .hidden-sm-up { - display: none !important; - } -} + display: none !important; } } @media (max-width: 47.9em) { .hidden-sm-down { - display: none !important; - } -} + display: none !important; } } @media (min-width: 48em) { .hidden-md-up { - display: none !important; - } -} + display: none !important; } } @media (max-width: 61.9em) { .hidden-md-down { - display: none !important; - } -} + display: none !important; } } @media (min-width: 62em) { .hidden-lg-up { - display: none !important; - } -} + display: none !important; } } @media (max-width: 74.9em) { .hidden-lg-down { - display: none !important; - } -} + display: none !important; } } @media (min-width: 75em) { .hidden-xl-up { - display: none !important; - } -} + display: none !important; } } .hidden-xl-down { - display: none !important; -} + display: none !important; } .visible-print-block { - display: none !important; -} -@media print { - .visible-print-block { - display: block !important; - } -} + display: none !important; } + @media print { + .visible-print-block { + display: block !important; } } .visible-print-inline { - display: none !important; -} -@media print { - .visible-print-inline { - display: inline !important; - } -} + display: none !important; } + @media print { + .visible-print-inline { + display: inline !important; } } .visible-print-inline-block { - display: none !important; -} -@media print { - .visible-print-inline-block { - display: inline-block !important; - } -} + display: none !important; } + @media print { + .visible-print-inline-block { + display: inline-block !important; } } @media print { .hidden-print .hidden-print { - display: none !important; - } -} -/*# sourceMappingURL=bootstrap.css.map */ + display: none !important; } } + +/*# sourceMappingURL=bootstrap.css.map */ \ No newline at end of file diff --git a/dist/css/bootstrap.css.map b/dist/css/bootstrap.css.map index 1d038873a..e21e231a9 100644 Binary files a/dist/css/bootstrap.css.map and b/dist/css/bootstrap.css.map differ diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index a6827d652..01f0a6dac 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -15,2348 +15,3491 @@ if (typeof jQuery === 'undefined') { } }(jQuery); -/* ======================================================================== - * Bootstrap: transition.js v3.3.4 - * http://getbootstrap.com/javascript/#transitions - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - +function ($) { - 'use strict'; - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ +'use strict'; - function transitionEnd() { - var el = document.createElement('bootstrap') +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Util = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Private TransitionEnd Helpers + * ------------------------------------------------------------------------ + */ + + var transition = false; + + var TransitionEndEvent = { + WebkitTransition: 'webkitTransitionEnd', + MozTransition: 'transitionend', + OTransition: 'oTransitionEnd otransitionend', + transition: 'transitionend' + }; + + // shoutout AngusCroll (https://goo.gl/pxwQGp) + function toType(obj) { + return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); + } + + function isElement(obj) { + return (obj[0] || obj).nodeType; + } + + function getSpecialTransitionEndEvent() { + return { + bindType: transition.end, + delegateType: transition.end, + handle: function handle(event) { + if ($(event.target).is(this)) { + return event.handleObj.handler.apply(this, arguments); + } + } + }; + } + + function transitionEndTest() { + if (window.QUnit) { + return false; } - for (var name in transEndEventNames) { + var el = document.createElement('bootstrap'); + + for (var name in TransitionEndEvent) { if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } + return { end: TransitionEndEvent[name] }; } } - return false // explicit for ie8 ( ._.) + return false; } - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this + function transitionEndEmulator(duration) { + var _this = this; + + var called = false; + + $(this).one(Util.TRANSITION_END, function () { + called = true; + }); + + setTimeout(function () { + if (!called) { + Util.triggerTransitionEnd(_this); + } + }, duration); + + return this; } - $(function () { - $.support.transition = transitionEnd() + function setTransitionEndSupport() { + transition = transitionEndTest(); - if (!$.support.transition) return + $.fn.emulateTransitionEnd = transitionEndEmulator; - $.event.special.bsTransitionEnd = { - bindType: $.support.transition.end, - delegateType: $.support.transition.end, - handle: function (e) { - if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + if (Util.supportsTransitionEnd()) { + $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); + } + } + + /** + * -------------------------------------------------------------------------- + * Public Util Api + * -------------------------------------------------------------------------- + */ + + var Util = { + + TRANSITION_END: 'bsTransitionEnd', + + getUID: function getUID(prefix) { + do prefix += ~ ~(Math.random() * 1000000); while (document.getElementById(prefix)); + return prefix; + }, + + getSelectorFromElement: function getSelectorFromElement(element) { + var selector = element.getAttribute('data-target'); + + if (!selector) { + selector = element.getAttribute('href') || ''; + selector = /^#[a-z]/i.test(selector) ? selector : null; + } + + return selector; + }, + + reflow: function reflow(element) { + new Function('bs', 'return bs')(element.offsetHeight); + }, + + triggerTransitionEnd: function triggerTransitionEnd(element) { + $(element).trigger(transition.end); + }, + + supportsTransitionEnd: function supportsTransitionEnd() { + return !!transition; + }, + + typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { + + for (var property in configTypes) { + var expectedTypes = configTypes[property]; + var value = config[property]; + var valueType = undefined; + + if (value && isElement(value)) valueType = 'element';else valueType = toType(value); + + if (!new RegExp(expectedTypes).test(valueType)) { + throw new Error('' + componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".')); + } } } - }) -}(jQuery); + }; -/* ======================================================================== - * Bootstrap: alert.js v3.3.4 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. + setTransitionEndSupport(); + + return Util; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + * -------------------------------------------------------------------------- + */ +var Alert = (function ($) { -+function ($) { - 'use strict'; + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - // ALERT CLASS DEFINITION - // ====================== + var NAME = 'alert'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.alert'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } + var Selector = { + DISMISS: '[data-dismiss="alert"]' + }; - Alert.VERSION = '3.3.4' + var Event = { + CLOSE: 'close' + EVENT_KEY, + CLOSED: 'closed' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; - Alert.TRANSITION_DURATION = 150 + var ClassName = { + ALERT: 'alert', + FADE: 'fade', + IN: 'in' + }; - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + var Alert = (function () { + function Alert(element) { + _classCallCheck(this, Alert); + + this._element = element; } - var $parent = $(selector) + _createClass(Alert, [{ + key: 'close', - if (e) e.preventDefault() + // public - if (!$parent.length) { - $parent = $this.closest('.alert') - } + value: function close(element) { + element = element || this._element; - $parent.trigger(e = $.Event('close.bs.alert')) + var rootElement = this._getRootElement(element); + var customEvent = this._triggerCloseEvent(rootElement); - if (e.isDefaultPrevented()) return + if (customEvent.isDefaultPrevented()) { + return; + } - $parent.removeClass('in') - - function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(Alert.TRANSITION_DURATION) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.alert - - $.fn.alert = Plugin - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: button.js v3.3.4 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.VERSION = '3.3.4' - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state += 'Text' - - if (data.resetText == null) $el.data('resetText', $el[val]()) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - $el[val](data[state] == null ? this.options[state] : data[state]) - - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d) + this._removeElement(rootElement); } - }, this), 0) - } - - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked')) changed = false - $parent.find('.active').removeClass('active') - this.$element.addClass('active') - } else if ($input.prop('type') == 'checkbox') { - if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false - this.$element.toggleClass('active') + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; } - $input.prop('checked', this.$element.hasClass('active')) - if (changed) $input.trigger('change') - } else { - this.$element.attr('aria-pressed', !this.$element.hasClass('active')) - this.$element.toggleClass('active') - } - } + }, { + key: '_getRootElement', + // private - // BUTTON PLUGIN DEFINITION - // ======================== + value: function _getRootElement(element) { + var parent = false; + var selector = Util.getSelectorFromElement(element); - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option + if (selector) { + parent = $(selector)[0]; + } - if (!data) $this.data('bs.button', (data = new Button(this, options))) + if (!parent) { + parent = $(element).closest('.' + ClassName.ALERT)[0]; + } - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } + return parent; + } + }, { + key: '_triggerCloseEvent', + value: function _triggerCloseEvent(element) { + var closeEvent = $.Event(Event.CLOSE); + $(element).trigger(closeEvent); + return closeEvent; + } + }, { + key: '_removeElement', + value: function _removeElement(element) { + $(element).removeClass(ClassName.IN); - var old = $.fn.button + if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element); + return; + } - $.fn.button = Plugin - $.fn.button.Constructor = Button + $(element).one(Util.TRANSITION_END, this._destroyElement.bind(this, element)).emulateTransitionEnd(TRANSITION_DURATION); + } + }, { + key: '_destroyElement', + value: function _destroyElement(element) { + $(element).detach().trigger(Event.CLOSED).remove(); + } + }], [{ + key: 'VERSION', + // getters - // BUTTON NO CONFLICT - // ================== + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } + // static + value: function _jQueryInterface(config) { + return this.each(function () { + var $element = $(this); + var data = $element.data(DATA_KEY); - // BUTTON DATA-API - // =============== + if (!data) { + data = new Alert(this); + $element.data(DATA_KEY, data); + } - $(document) - .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() - }) - .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) - }) + if (config === 'close') { + data[config](this); + } + }); + } + }, { + key: '_handleDismiss', + value: function _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault(); + } -}(jQuery); + alertInstance.close(this); + }; + } + }]); -/* ======================================================================== - * Bootstrap: carousel.js v3.3.4 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. + return Alert; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Alert._jQueryInterface; + $.fn[NAME].Constructor = Alert; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Alert._jQueryInterface; + }; + + return Alert; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + * -------------------------------------------------------------------------- + */ +var Button = (function ($) { -+function ($) { - 'use strict'; + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - // CAROUSEL CLASS DEFINITION - // ========================= + var NAME = 'button'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.button'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = null - this.sliding = null - this.interval = null - this.$active = null - this.$items = null + var ClassName = { + ACTIVE: 'active', + BUTTON: 'btn', + FOCUS: 'focus' + }; - this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) + var Selector = { + DATA_TOGGLE_CARROT: '[data-toggle^="button"]', + DATA_TOGGLE: '[data-toggle="buttons"]', + INPUT: 'input', + ACTIVE: '.active', + BUTTON: '.btn' + }; - this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) - } + var Event = { + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY, + FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + '' + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + '' + DATA_API_KEY) + }; - Carousel.VERSION = '3.3.4' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ - Carousel.TRANSITION_DURATION = 600 + var Button = (function () { + function Button(element) { + _classCallCheck(this, Button); - Carousel.DEFAULTS = { + this._element = element; + } + + _createClass(Button, [{ + key: 'toggle', + + // public + + value: function toggle() { + var triggerChangeEvent = true; + var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; + + if (rootElement) { + var input = $(this._element).find(Selector.INPUT)[0]; + + if (input) { + if (input.type === 'radio') { + if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { + triggerChangeEvent = false; + } else { + var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; + + if (activeElement) { + $(activeElement).removeClass(ClassName.ACTIVE); + } + } + } + + if (triggerChangeEvent) { + input.checked = !$(this._element).hasClass(ClassName.ACTIVE); + $(this._element).trigger('change'); + } + } + } else { + this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); + } + + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName.ACTIVE); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + + if (!data) { + data = new Button(this); + $(this).data(DATA_KEY, data); + } + + if (config === 'toggle') { + data[config](); + } + }); + } + }]); + + return Button; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + event.preventDefault(); + + var button = event.target; + + if (!$(button).hasClass(ClassName.BUTTON)) { + button = $(button).closest(Selector.BUTTON); + } + + Button._jQueryInterface.call($(button), 'toggle'); + }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + var button = $(event.target).closest(Selector.BUTTON)[0]; + $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Button._jQueryInterface; + $.fn[NAME].Constructor = Button; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Button._jQueryInterface; + }; + + return Button; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Carousel = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'carousel'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.carousel'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; + + var Default = { interval: 5000, + keyboard: true, + slide: false, pause: 'hover', - wrap: true, - keyboard: true - } + wrap: true + }; - Carousel.prototype.keydown = function (e) { - if (/input|textarea/i.test(e.target.tagName)) return - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return + var DefaultType = { + interval: '(number|boolean)', + keyboard: 'boolean', + slide: '(boolean|string)', + pause: '(string|boolean)', + wrap: 'boolean' + }; + + var Direction = { + NEXT: 'next', + PREVIOUS: 'prev' + }; + + var Event = { + SLIDE: 'slide' + EVENT_KEY, + SLID: 'slid' + EVENT_KEY, + KEYDOWN: 'keydown' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY, + LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + CAROUSEL: 'carousel', + ACTIVE: 'active', + SLIDE: 'slide', + RIGHT: 'right', + LEFT: 'left', + ITEM: 'carousel-item' + }; + + var Selector = { + ACTIVE: '.active', + ACTIVE_ITEM: '.active.carousel-item', + ITEM: '.carousel-item', + NEXT_PREV: '.next, .prev', + INDICATORS: '.carousel-indicators', + DATA_SLIDE: '[data-slide], [data-slide-to]', + DATA_RIDE: '[data-ride="carousel"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Carousel = (function () { + function Carousel(element, config) { + _classCallCheck(this, Carousel); + + this._items = null; + this._interval = null; + this._activeElement = null; + + this._isPaused = false; + this._isSliding = false; + + this._config = this._getConfig(config); + this._element = $(element)[0]; + this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; + + this._addEventListeners(); } - e.preventDefault() - } + _createClass(Carousel, [{ + key: 'next', - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) + // public - this.interval && clearInterval(this.interval) + value: function next() { + if (!this._isSliding) { + this._slide(Direction.NEXT); + } + } + }, { + key: 'prev', + value: function prev() { + if (!this._isSliding) { + this._slide(Direction.PREVIOUS); + } + } + }, { + key: 'pause', + value: function pause(event) { + if (!event) { + this._isPaused = true; + } - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { + Util.triggerTransitionEnd(this._element); + this.cycle(true); + } - return this - } + clearInterval(this._interval); + this._interval = null; + } + }, { + key: 'cycle', + value: function cycle(event) { + if (!event) { + this._isPaused = false; + } - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) - } + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } - Carousel.prototype.getItemForDirection = function (direction, active) { - var activeIndex = this.getItemIndex(active) - var willWrap = (direction == 'prev' && activeIndex === 0) - || (direction == 'next' && activeIndex == (this.$items.length - 1)) - if (willWrap && !this.options.wrap) return active - var delta = direction == 'prev' ? -1 : 1 - var itemIndex = (activeIndex + delta) % this.$items.length - return this.$items.eq(itemIndex) - } + if (this._config.interval && !this._isPaused) { + this._interval = setInterval($.proxy(this.next, this), this._config.interval); + } + } + }, { + key: 'to', + value: function to(index) { + var _this2 = this; - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) + this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; - if (pos > (this.$items.length - 1) || pos < 0) return + var activeIndex = this._getItemIndex(this._activeElement); - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" - if (activeIndex == pos) return this.pause().cycle() + if (index > this._items.length - 1 || index < 0) { + return; + } - return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) - } + if (this._isSliding) { + $(this._element).one(Event.SLID, function () { + return _this2.to(index); + }); + return; + } - Carousel.prototype.pause = function (e) { - e || (this.paused = true) + if (activeIndex == index) { + this.pause(); + this.cycle(); + return; + } - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } + var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; - this.interval = clearInterval(this.interval) + this._slide(direction, this._items[index]); + } + }, { + key: 'dispose', + value: function dispose() { + $(this._element).off(EVENT_KEY); + $.removeData(this._element, DATA_KEY); - return this - } + this._items = null; + this._config = null; + this._element = null; + this._interval = null; + this._isPaused = null; + this._isSliding = null; + this._activeElement = null; + this._indicatorsElement = null; + } + }, { + key: '_getConfig', - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } + // private - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } + value: function _getConfig(config) { + config = $.extend({}, Default, config); + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_addEventListeners', + value: function _addEventListeners() { + if (this._config.keyboard) { + $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this)); + } - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || this.getItemForDirection(type, $active) - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var that = this + if (this._config.pause == 'hover' && !('ontouchstart' in document.documentElement)) { + $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this)); + } + } + }, { + key: '_keydown', + value: function _keydown(event) { + event.preventDefault(); - if ($next.hasClass('active')) return (this.sliding = false) + if (/input|textarea/i.test(event.target.tagName)) return; - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return + switch (event.which) { + case 37: + this.prev();break; + case 39: + this.next();break; + default: + return; + } + } + }, { + key: '_getItemIndex', + value: function _getItemIndex(element) { + this._items = $.makeArray($(element).parent().find(Selector.ITEM)); + return this._items.indexOf(element); + } + }, { + key: '_getItemByDirection', + value: function _getItemByDirection(direction, activeElement) { + var isNextDirection = direction === Direction.NEXT; + var isPrevDirection = direction === Direction.PREVIOUS; + var activeIndex = this._getItemIndex(activeElement); + var lastItemIndex = this._items.length - 1; + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex == lastItemIndex; - this.sliding = true + if (isGoingToWrap && !this._config.wrap) { + return activeElement; + } - isCycling && this.pause() + var delta = direction == Direction.PREVIOUS ? -1 : 1; + var itemIndex = (activeIndex + delta) % this._items.length; - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') - } + return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; + } + }, { + key: '_triggerSlideEvent', + value: function _triggerSlideEvent(relatedTarget, directionalClassname) { + var slideEvent = $.Event(Event.SLIDE, { + relatedTarget: relatedTarget, + direction: directionalClassname + }); - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one('bsTransitionEnd', function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) - }) - .emulateTransitionEnd(Carousel.TRANSITION_DURATION) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger(slidEvent) - } + $(this._element).trigger(slideEvent); - isCycling && this.cycle() + return slideEvent; + } + }, { + key: '_setActiveIndicatorElement', + value: function _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); - return this - } + var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; + if (nextIndicator) { + $(nextIndicator).addClass(ClassName.ACTIVE); + } + } + } + }, { + key: '_slide', + value: function _slide(direction, element) { + var _this3 = this; - // CAROUSEL PLUGIN DEFINITION - // ========================== + var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide + var isCycling = !!this._interval; - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } + var directionalClassName = direction == Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; - var old = $.fn.carousel + if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { + this._isSliding = false; + return; + } - $.fn.carousel = Plugin - $.fn.carousel.Constructor = Carousel + var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); + if (slideEvent.isDefaultPrevented()) { + return; + } + if (!activeElement || !nextElement) { + // some weirdness is happening, so we bail + return; + } - // CAROUSEL NO CONFLICT - // ==================== + this._isSliding = true; - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } + if (isCycling) { + this.pause(); + } + this._setActiveIndicatorElement(nextElement); - // CAROUSEL DATA-API - // ================= + var slidEvent = $.Event(Event.SLID, { + relatedTarget: nextElement, + direction: directionalClassName + }); - var clickHandler = function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { - Plugin.call($target, options) + $(nextElement).addClass(direction); - if (slideIndex) { - $target.data('bs.carousel').to(slideIndex) - } + Util.reflow(nextElement); - e.preventDefault() - } + $(activeElement).addClass(directionalClassName); + $(nextElement).addClass(directionalClassName); - $(document) - .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) - .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) + $(activeElement).one(Util.TRANSITION_END, function () { + $(nextElement).removeClass(directionalClassName).removeClass(direction); - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) - }) - }) + $(nextElement).addClass(ClassName.ACTIVE); -}(jQuery); + $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); -/* ======================================================================== - * Bootstrap: collapse.js v3.3.4 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. + _this3._isSliding = false; + + setTimeout(function () { + return $(_this3._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(TRANSITION_DURATION); + } else { + $(activeElement).removeClass(ClassName.ACTIVE); + $(nextElement).addClass(ClassName.ACTIVE); + + this._isSliding = false; + $(this._element).trigger(slidEvent); + } + + if (isCycling) { + this.cycle(); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Default, $(this).data()); + + if (typeof config === 'object') { + $.extend(_config, config); + } + + var action = typeof config === 'string' ? config : _config.slide; + + if (!data) { + data = new Carousel(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config == 'number') { + data.to(config); + } else if (action) { + data[action](); + } else if (_config.interval) { + data.pause(); + data.cycle(); + } + }); + } + }, { + key: '_dataApiClickHandler', + value: function _dataApiClickHandler(event) { + var selector = Util.getSelectorFromElement(this); + + if (!selector) { + return; + } + + var target = $(selector)[0]; + + if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { + return; + } + + var config = $.extend({}, $(target).data(), $(this).data()); + + var slideIndex = this.getAttribute('data-slide-to'); + if (slideIndex) { + config.interval = false; + } + + Carousel._jQueryInterface.call($(target), config); + + if (slideIndex) { + $(target).data(DATA_KEY).to(slideIndex); + } + + event.preventDefault(); + } + }]); + + return Carousel; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); + + $(window).on(Event.LOAD_DATA_API, function () { + $(Selector.DATA_RIDE).each(function () { + var $carousel = $(this); + Carousel._jQueryInterface.call($carousel, $carousel.data()); + }); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Carousel._jQueryInterface; + $.fn[NAME].Constructor = Carousel; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Carousel._jQueryInterface; + }; + + return Carousel; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + - '[data-toggle="collapse"][data-target="#' + element.id + '"]') - this.transitioning = null - - if (this.options.parent) { - this.$parent = this.getParent() - } else { - this.addAriaAndCollapsedClass(this.$element, this.$trigger) - } - - if (this.options.toggle) this.toggle() - } - - Collapse.VERSION = '3.3.4' - - Collapse.TRANSITION_DURATION = 350 - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var activesData - var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') - - if (actives && actives.length) { - activesData = actives.data('bs.collapse') - if (activesData && activesData.transitioning) return - } - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - if (actives && actives.length) { - Plugin.call(actives, 'hide') - activesData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - .attr('aria-expanded', true) - - this.$trigger - .removeClass('collapsed') - .attr('aria-expanded', true) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element[dimension](this.$element[dimension]())[0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse in') - .attr('aria-expanded', false) - - this.$trigger - .addClass('collapsed') - .attr('aria-expanded', false) - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .removeClass('collapsing') - .addClass('collapse') - .trigger('hidden.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') - .each($.proxy(function (i, element) { - var $element = $(element) - this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) - }, this)) - .end() - } - - Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { - var isOpen = $element.hasClass('in') - - $element.attr('aria-expanded', isOpen) - $trigger - .toggleClass('collapsed', !isOpen) - .attr('aria-expanded', isOpen) - } - - function getTargetFromTrigger($trigger) { - var href - var target = $trigger.attr('data-target') - || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 - - return $(target) - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.collapse - - $.fn.collapse = Plugin - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this) - - if (!$this.attr('data-target')) e.preventDefault() - - var $target = getTargetFromTrigger($this) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - - Plugin.call($target, option) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: dropdown.js v3.3.4 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.VERSION = '3.3.4' - - function getParent($this) { - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = selector && $(selector) - - return $parent && $parent.length ? $parent : $this.parent() - } - - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } - - if (!$parent.hasClass('open')) return - - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return - - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) - }) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $(document.createElement('div')) - .addClass('dropdown-backdrop') - .insertAfter($(this)) - .on('click', clearMenus) + * -------------------------------------------------------------------------- + */ + +var Collapse = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'collapse'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.collapse'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; + + var Default = { + toggle: true, + parent: '' + }; + + var DefaultType = { + toggle: 'boolean', + parent: 'string' + }; + + var Event = { + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + IN: 'in', + COLLAPSE: 'collapse', + COLLAPSING: 'collapsing', + COLLAPSED: 'collapsed' + }; + + var Dimension = { + WIDTH: 'width', + HEIGHT: 'height' + }; + + var Selector = { + ACTIVES: '.panel > .in, .panel > .collapsing', + DATA_TOGGLE: '[data-toggle="collapse"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Collapse = (function () { + function Collapse(element, config) { + _classCallCheck(this, Collapse); + + this._isTransitioning = false; + this._element = element; + this._config = this._getConfig(config); + this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]'))); + + this._parent = this._config.parent ? this._getParent() : null; + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray); } - var relatedTarget = { relatedTarget: this } - $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this - .trigger('focus') - .attr('aria-expanded', 'true') - - $parent - .toggleClass('open') - .trigger('shown.bs.dropdown', relatedTarget) + if (this._config.toggle) { + this.toggle(); + } } - return false - } + _createClass(Collapse, [{ + key: 'toggle', - Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return + // public - var $this = $(this) + value: function toggle() { + if ($(this._element).hasClass(ClassName.IN)) { + this.hide(); + } else { + this.show(); + } + } + }, { + key: 'show', + value: function show() { + var _this4 = this; - e.preventDefault() - e.stopPropagation() + if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { + return; + } - if ($this.is('.disabled, :disabled')) return + var actives = undefined; + var activesData = undefined; - var $parent = getParent($this) - var isActive = $parent.hasClass('open') + if (this._parent) { + actives = $.makeArray($(Selector.ACTIVES)); + if (!actives.length) { + actives = null; + } + } - if (!isActive && e.which != 27 || isActive && e.which == 27) { - if (e.which == 27) $parent.find(toggle).trigger('focus') - return $this.trigger('click') - } + if (actives) { + activesData = $(actives).data(DATA_KEY); + if (activesData && activesData._isTransitioning) { + return; + } + } - var desc = ' li:not(.disabled):visible a' - var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) + var startEvent = $.Event(Event.SHOW); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } - if (!$items.length) return + if (actives) { + Collapse._jQueryInterface.call($(actives), 'hide'); + if (!activesData) { + $(actives).data(DATA_KEY, null); + } + } - var index = $items.index(e.target) + var dimension = this._getDimension(); - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 + $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); - $items.eq(index).trigger('focus') - } + this._element.style[dimension] = 0; + this._element.setAttribute('aria-expanded', true); + if (this._triggerArray.length) { + $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); + } - // DROPDOWN PLUGIN DEFINITION - // ========================== + this.setTransitioning(true); - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.dropdown') + var complete = function complete() { + $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); - if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } + _this4._element.style[dimension] = ''; - var old = $.fn.dropdown + _this4.setTransitioning(false); - $.fn.dropdown = Plugin - $.fn.dropdown.Constructor = Dropdown + $(_this4._element).trigger(Event.SHOWN); + }; + if (!Util.supportsTransitionEnd()) { + complete(); + return; + } - // DROPDOWN NO CONFLICT - // ==================== + var scrollSize = 'scroll' + (dimension[0].toUpperCase() + dimension.slice(1)); - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + this._element.style[dimension] = this._element[scrollSize] + 'px'; + } + }, { + key: 'hide', + value: function hide() { + var _this5 = this; - // APPLY TO STANDARD DROPDOWN ELEMENTS - // =================================== + if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { + return; + } - $(document) - .on('click.bs.dropdown.data-api', clearMenus) - .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) - .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) + var startEvent = $.Event(Event.HIDE); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } -}(jQuery); + var dimension = this._getDimension(); + var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; -/* ======================================================================== - * Bootstrap: modal.js v3.3.4 - * http://getbootstrap.com/javascript/#modals - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. + this._element.style[dimension] = this._element[offsetDimension] + 'px'; + + Util.reflow(this._element); + + $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); + + this._element.setAttribute('aria-expanded', false); + + if (this._triggerArray.length) { + $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); + } + + this.setTransitioning(true); + + var complete = function complete() { + _this5.setTransitioning(false); + $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); + }; + + this._element.style[dimension] = 0; + + if (!Util.supportsTransitionEnd()) { + return complete(); + } + + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } + }, { + key: 'setTransitioning', + value: function setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning; + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + + this._config = null; + this._parent = null; + this._element = null; + this._triggerArray = null; + this._isTransitioning = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + config.toggle = !!config.toggle; // coerce string values + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_getDimension', + value: function _getDimension() { + var hasWidth = $(this._element).hasClass(Dimension.WIDTH); + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; + } + }, { + key: '_getParent', + value: function _getParent() { + var _this6 = this; + + var parent = $(this._config.parent)[0]; + var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; + + $(parent).find(selector).each(function (i, element) { + _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); + }); + + return parent; + } + }, { + key: '_addAriaAndCollapsedClass', + value: function _addAriaAndCollapsedClass(element, triggerArray) { + if (element) { + var isOpen = $(element).hasClass(ClassName.IN); + element.setAttribute('aria-expanded', isOpen); + + if (triggerArray.length) { + $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + } + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_getTargetFromElement', + + // static + + value: function _getTargetFromElement(element) { + var selector = Util.getSelectorFromElement(element); + return selector ? $(selector)[0] : null; + } + }, { + key: '_jQueryInterface', + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config); + + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false; + } + + if (!data) { + data = new Collapse(this, _config); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Collapse; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + + var target = Collapse._getTargetFromElement(this); + + var data = $(target).data(DATA_KEY); + var config = data ? 'toggle' : $(this).data(); + + Collapse._jQueryInterface.call($(target), config); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Collapse._jQueryInterface; + $.fn[NAME].Constructor = Collapse; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Collapse._jQueryInterface; + }; + + return Collapse; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + * -------------------------------------------------------------------------- + */ +var Dropdown = (function ($) { -+function ($) { - 'use strict'; + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - // MODAL CLASS DEFINITION - // ====================== + var NAME = 'dropdown'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.dropdown'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$dialog = this.$element.find('.modal-dialog') - this.$backdrop = null - this.isShown = null - this.originalBodyPad = null - this.scrollbarWidth = 0 - this.ignoreBackdropClick = false + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY, + KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + '' + DATA_API_KEY + }; - if (this.options.remote) { - this.$element - .find('.modal-content') - .load(this.options.remote, $.proxy(function () { - this.$element.trigger('loaded.bs.modal') - }, this)) + var ClassName = { + BACKDROP: 'dropdown-backdrop', + DISABLED: 'disabled', + OPEN: 'open' + }; + + var Selector = { + BACKDROP: '.dropdown-backdrop', + DATA_TOGGLE: '[data-toggle="dropdown"]', + FORM_CHILD: '.dropdown form', + ROLE_MENU: '[role="menu"]', + ROLE_LISTBOX: '[role="listbox"]', + NAVBAR_NAV: '.navbar-nav', + VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Dropdown = (function () { + function Dropdown(element) { + _classCallCheck(this, Dropdown); + + this._element = element; + + this._addEventListeners(); } - } - Modal.VERSION = '3.3.4' + _createClass(Dropdown, [{ + key: 'toggle', - Modal.TRANSITION_DURATION = 300 - Modal.BACKDROP_TRANSITION_DURATION = 150 + // public - Modal.DEFAULTS = { + value: function toggle() { + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); + + Dropdown._clearMenus(); + + if (isActive) { + return false; + } + + if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { + + // if mobile we use a backdrop because click events don't delegate + var dropdown = document.createElement('div'); + dropdown.className = ClassName.BACKDROP; + $(dropdown).insertBefore(this); + $(dropdown).on('click', Dropdown._clearMenus); + } + + var relatedTarget = { relatedTarget: this }; + var showEvent = $.Event(Event.SHOW, relatedTarget); + + $(parent).trigger(showEvent); + + if (showEvent.isDefaultPrevented()) { + return; + } + + this.focus(); + this.setAttribute('aria-expanded', 'true'); + + $(parent).toggleClass(ClassName.OPEN); + $(parent).trigger(Event.SHOWN, relatedTarget); + + return false; + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + $(this._element).off(EVENT_KEY); + this._element = null; + } + }, { + key: '_addEventListeners', + + // private + + value: function _addEventListeners() { + $(this._element).on(Event.CLICK, this.toggle); + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + + if (!data) { + $(this).data(DATA_KEY, data = new Dropdown(this)); + } + + if (typeof config === 'string') { + data[config].call(this); + } + }); + } + }, { + key: '_clearMenus', + value: function _clearMenus(event) { + if (event && event.which === 3) { + return; + } + + var backdrop = $(Selector.BACKDROP)[0]; + if (backdrop) { + backdrop.parentNode.removeChild(backdrop); + } + + var toggles = $.makeArray($(Selector.DATA_TOGGLE)); + + for (var i = 0; i < toggles.length; i++) { + var _parent = Dropdown._getParentFromElement(toggles[i]); + var relatedTarget = { relatedTarget: toggles[i] }; + + if (!$(_parent).hasClass(ClassName.OPEN)) { + continue; + } + + if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) { + continue; + } + + var hideEvent = $.Event(Event.HIDE, relatedTarget); + $(_parent).trigger(hideEvent); + if (hideEvent.isDefaultPrevented()) { + continue; + } + + toggles[i].setAttribute('aria-expanded', 'false'); + + $(_parent).removeClass(ClassName.OPEN).trigger(Event.HIDDEN, relatedTarget); + } + } + }, { + key: '_getParentFromElement', + value: function _getParentFromElement(element) { + var parent = undefined; + var selector = Util.getSelectorFromElement(element); + + if (selector) { + parent = $(selector)[0]; + } + + return parent || element.parentNode; + } + }, { + key: '_dataApiKeydownHandler', + value: function _dataApiKeydownHandler(event) { + if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { + return; + } + + event.preventDefault(); + event.stopPropagation(); + + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); + + if (!isActive && event.which !== 27 || isActive && event.which === 27) { + + if (event.which === 27) { + var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; + $(toggle).trigger('focus'); + } + + $(this).trigger('click'); + return; + } + + var items = $.makeArray($(Selector.VISIBLE_ITEMS)); + + items = items.filter(function (item) { + return item.offsetWidth || item.offsetHeight; + }); + + if (!items.length) { + return; + } + + var index = items.indexOf(event.target); + + if (event.which === 38 && index > 0) index--; // up + if (event.which === 40 && index < items.length - 1) index++; // down + if (! ~index) index = 0; + + items[index].focus(); + } + }]); + + return Dropdown; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { + e.stopPropagation(); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Dropdown._jQueryInterface; + $.fn[NAME].Constructor = Dropdown; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Dropdown._jQueryInterface; + }; + + return Dropdown; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Modal = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'modal'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.modal'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 300; + var BACKDROP_TRANSITION_DURATION = 150; + + var Default = { backdrop: true, keyboard: true, + focus: true, show: true - } + }; - Modal.prototype.toggle = function (_relatedTarget) { - return this.isShown ? this.hide() : this.show(_relatedTarget) - } + var DefaultType = { + backdrop: '(boolean|string)', + keyboard: 'boolean', + focus: 'boolean', + show: 'boolean' + }; - Modal.prototype.show = function (_relatedTarget) { - var that = this - var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + RESIZE: 'resize' + EVENT_KEY, + CLICK_DISMISS: 'click.dismiss' + EVENT_KEY, + KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY, + MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY, + MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; - this.$element.trigger(e) + var ClassName = { + BACKDROP: 'modal-backdrop', + OPEN: 'modal-open', + FADE: 'fade', + IN: 'in' + }; - if (this.isShown || e.isDefaultPrevented()) return + var Selector = { + DIALOG: '.modal-dialog', + DATA_TOGGLE: '[data-toggle="modal"]', + DATA_DISMISS: '[data-dismiss="modal"]', + SCROLLBAR_MEASURER: 'modal-scrollbar-measure' + }; - this.isShown = true + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ - this.checkScrollbar() - this.setScrollbar() - this.$body.addClass('modal-open') + var Modal = (function () { + function Modal(element, config) { + _classCallCheck(this, Modal); - this.escape() - this.resize() + this._config = this._getConfig(config); + this._element = element; + this._dialog = $(element).find(Selector.DIALOG)[0]; + this._backdrop = null; + this._isShown = false; + this._isBodyOverflowing = false; + this._ignoreBackdropClick = false; + this._originalBodyPadding = 0; + this._scrollbarWidth = 0; + } - this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) + _createClass(Modal, [{ + key: 'toggle', - this.$dialog.on('mousedown.dismiss.bs.modal', function () { - that.$element.one('mouseup.dismiss.bs.modal', function (e) { - if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true - }) - }) + // public - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(that.$body) // don't move modals dom position + value: function toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget); } + }, { + key: 'show', + value: function show(relatedTarget) { + var _this7 = this; - that.$element - .show() - .scrollTop(0) + var showEvent = $.Event(Event.SHOW, { + relatedTarget: relatedTarget + }); - that.adjustDialog() + $(this._element).trigger(showEvent); - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - that.enforceFocus() - - var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) - - transition ? - that.$dialog // wait for modal to slide in - .one('bsTransitionEnd', function () { - that.$element.trigger('focus').trigger(e) - }) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - that.$element.trigger('focus').trigger(e) - }) - } - - Modal.prototype.hide = function (e) { - if (e) e.preventDefault() - - e = $.Event('hide.bs.modal') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - this.resize() - - $(document).off('focusin.bs.modal') - - this.$element - .removeClass('in') - .off('click.dismiss.bs.modal') - .off('mouseup.dismiss.bs.modal') - - this.$dialog.off('mousedown.dismiss.bs.modal') - - $.support.transition && this.$element.hasClass('fade') ? - this.$element - .one('bsTransitionEnd', $.proxy(this.hideModal, this)) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - this.hideModal() - } - - Modal.prototype.enforceFocus = function () { - $(document) - .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', $.proxy(function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.trigger('focus') + if (this._isShown || showEvent.isDefaultPrevented()) { + return; } - }, this)) - } - Modal.prototype.escape = function () { - if (this.isShown && this.options.keyboard) { - this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { - e.which == 27 && this.hide() - }, this)) - } else if (!this.isShown) { - this.$element.off('keydown.dismiss.bs.modal') - } - } + this._isShown = true; - Modal.prototype.resize = function () { - if (this.isShown) { - $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) - } else { - $(window).off('resize.bs.modal') - } - } + this._checkScrollbar(); + this._setScrollbar(); - Modal.prototype.hideModal = function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.$body.removeClass('modal-open') - that.resetAdjustments() - that.resetScrollbar() - that.$element.trigger('hidden.bs.modal') - }) - } + $(document.body).addClass(ClassName.OPEN); - Modal.prototype.removeBackdrop = function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } + this._setEscapeEvent(); + this._setResizeEvent(); - Modal.prototype.backdrop = function (callback) { - var that = this - var animate = this.$element.hasClass('fade') ? 'fade' : '' + $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate + $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { + $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) { + if ($(event.target).is(_this7._element)) { + that._ignoreBackdropClick = true; + } + }); + }); - this.$backdrop = $(document.createElement('div')) - .addClass('modal-backdrop ' + animate) - .appendTo(this.$body) - - this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { - if (this.ignoreBackdropClick) { - this.ignoreBackdropClick = false - return - } - if (e.target !== e.currentTarget) return - this.options.backdrop == 'static' - ? this.$element[0].focus() - : this.hide() - }, this)) - - if (doAnimate) this.$backdrop[0].offsetWidth // force reflow - - this.$backdrop.addClass('in') - - if (!callback) return - - doAnimate ? - this.$backdrop - .one('bsTransitionEnd', callback) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callback() - - } else if (!this.isShown && this.$backdrop) { - this.$backdrop.removeClass('in') - - var callbackRemove = function () { - that.removeBackdrop() - callback && callback() + this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); } - $.support.transition && this.$element.hasClass('fade') ? - this.$backdrop - .one('bsTransitionEnd', callbackRemove) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callbackRemove() + }, { + key: 'hide', + value: function hide(event) { + if (event) { + event.preventDefault(); + } - } else if (callback) { - callback() + var hideEvent = $.Event(Event.HIDE); + + $(this._element).trigger(hideEvent); + + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return; + } + + this._isShown = false; + + this._setEscapeEvent(); + this._setResizeEvent(); + + $(document).off(Event.FOCUSIN); + + $(this._element).removeClass(ClassName.IN); + + $(this._element).off(Event.CLICK_DISMISS); + $(this._dialog).off(Event.MOUSEDOWN_DISMISS); + + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + + $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); + } else { + this._hideModal(); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + + $(window).off(EVENT_KEY); + $(document).off(EVENT_KEY); + $(this._element).off(EVENT_KEY); + $(this._backdrop).off(EVENT_KEY); + + this._config = null; + this._element = null; + this._dialog = null; + this._backdrop = null; + this._isShown = null; + this._isBodyOverflowing = null; + this._ignoreBackdropClick = null; + this._originalBodyPadding = null; + this._scrollbarWidth = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_showElement', + value: function _showElement(relatedTarget) { + var _this8 = this; + + var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); + + if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // don't move modals dom position + document.body.appendChild(this._element); + } + + this._element.style.display = 'block'; + this._element.scrollTop = 0; + + if (transition) { + Util.reflow(this._element); + } + + $(this._element).addClass(ClassName.IN); + + if (this._config.focus) this._enforceFocus(); + + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: relatedTarget + }); + + var transitionComplete = function transitionComplete() { + if (_this8._config.focus) _this8._element.focus(); + $(_this8._element).trigger(shownEvent); + }; + + if (transition) { + $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + transitionComplete(); + } + } + }, { + key: '_enforceFocus', + value: function _enforceFocus() { + var _this9 = this; + + $(document).off(Event.FOCUSIN) // guard against infinite focus loop + .on(Event.FOCUSIN, function (event) { + if (_this9._element !== event.target && !$(_this9._element).has(event.target).length) { + _this9._element.focus(); + } + }); + } + }, { + key: '_setEscapeEvent', + value: function _setEscapeEvent() { + var _this10 = this; + + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { + if (event.which === 27) { + _this10.hide(); + } + }); + } else if (!this._isShown) { + $(this._element).off(Event.KEYDOWN_DISMISS); + } + } + }, { + key: '_setResizeEvent', + value: function _setResizeEvent() { + if (this._isShown) { + $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); + } else { + $(window).off(Event.RESIZE); + } + } + }, { + key: '_hideModal', + value: function _hideModal() { + var _this11 = this; + + this._element.style.display = 'none'; + this._showBackdrop(function () { + $(document.body).removeClass(ClassName.OPEN); + _this11._resetAdjustments(); + _this11._resetScrollbar(); + $(_this11._element).trigger(Event.HIDDEN); + }); + } + }, { + key: '_removeBackdrop', + value: function _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove(); + this._backdrop = null; + } + } + }, { + key: '_showBackdrop', + value: function _showBackdrop(callback) { + var _this12 = this; + + var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; + + if (this._isShown && this._config.backdrop) { + var doAnimate = Util.supportsTransitionEnd() && animate; + + this._backdrop = document.createElement('div'); + this._backdrop.className = ClassName.BACKDROP; + + if (animate) { + $(this._backdrop).addClass(animate); + } + + $(this._backdrop).appendTo(this.$body); + + $(this._element).on(Event.CLICK_DISMISS, function (event) { + if (_this12._ignoreBackdropClick) { + _this12._ignoreBackdropClick = false; + return; + } + if (event.target !== event.currentTarget) { + return; + } + if (_this12._config.backdrop === 'static') { + _this12._element.focus(); + } else { + _this12.hide(); + } + }); + + if (doAnimate) { + Util.reflow(this._backdrop); + } + + $(this._backdrop).addClass(ClassName.IN); + + if (!callback) { + return; + } + + if (!doAnimate) { + callback(); + return; + } + + $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName.IN); + + var callbackRemove = function callbackRemove() { + _this12._removeBackdrop(); + if (callback) { + callback(); + } + }; + + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else { + callbackRemove(); + } + } else if (callback) { + callback(); + } + } + }, { + key: '_handleUpdate', + + // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + + value: function _handleUpdate() { + this._adjustDialog(); + } + }, { + key: '_adjustDialog', + value: function _adjustDialog() { + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + 'px'; + } + + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + 'px'; + } + } + }, { + key: '_resetAdjustments', + value: function _resetAdjustments() { + this._element.style.paddingLeft = ''; + this._element.style.paddingRight = ''; + } + }, { + key: '_checkScrollbar', + value: function _checkScrollbar() { + var fullWindowWidth = window.innerWidth; + if (!fullWindowWidth) { + // workaround for missing window.innerWidth in IE8 + var documentElementRect = document.documentElement.getBoundingClientRect(); + fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left); + } + this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth; + this._scrollbarWidth = this._getScrollbarWidth(); + } + }, { + key: '_setScrollbar', + value: function _setScrollbar() { + var bodyPadding = parseInt($(document.body).css('padding-right') || 0, 10); + + this._originalBodyPadding = document.body.style.paddingRight || ''; + + if (this._isBodyOverflowing) { + document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; + } + } + }, { + key: '_resetScrollbar', + value: function _resetScrollbar() { + document.body.style.paddingRight = this._originalBodyPadding; + } + }, { + key: '_getScrollbarWidth', + value: function _getScrollbarWidth() { + // thx d.walsh + var scrollDiv = document.createElement('div'); + scrollDiv.className = Selector.SCROLLBAR_MEASURER; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config, relatedTarget) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config); + + if (!data) { + data = new Modal(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](relatedTarget); + } else if (_config.show) { + data.show(relatedTarget); + } + }); + } + }]); + + return Modal; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + var _this13 = this; + + var target = undefined; + var selector = Util.getSelectorFromElement(this); + + if (selector) { + target = $(selector)[0]; } - } - // these following methods are used to handle overflowing modals + var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data()); - Modal.prototype.handleUpdate = function () { - this.adjustDialog() - } - - Modal.prototype.adjustDialog = function () { - var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight - - this.$element.css({ - paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', - paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' - }) - } - - Modal.prototype.resetAdjustments = function () { - this.$element.css({ - paddingLeft: '', - paddingRight: '' - }) - } - - Modal.prototype.checkScrollbar = function () { - var fullWindowWidth = window.innerWidth - if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 - var documentElementRect = document.documentElement.getBoundingClientRect() - fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) + if (this.tagName === 'A') { + event.preventDefault(); } - this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth - this.scrollbarWidth = this.measureScrollbar() - } - Modal.prototype.setScrollbar = function () { - var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) - this.originalBodyPad = document.body.style.paddingRight || '' - if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) - } + var $target = $(target).one(Event.SHOW, function (showEvent) { + if (showEvent.isDefaultPrevented()) { + // only register focus restorer if modal will actually get shown + return; + } - Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', this.originalBodyPad) - } + $target.one(Event.HIDDEN, function () { + if ($(_this13).is(':visible')) { + _this13.focus(); + } + }); + }); - Modal.prototype.measureScrollbar = function () { // thx walsh - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - this.$body.append(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - this.$body[0].removeChild(scrollDiv) - return scrollbarWidth - } + Modal._jQueryInterface.call($(target), config, this); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - // MODAL PLUGIN DEFINITION - // ======================= + $.fn[NAME] = Modal._jQueryInterface; + $.fn[NAME].Constructor = Modal; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Modal._jQueryInterface; + }; - function Plugin(option, _relatedTarget) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.modal') - var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) + return Modal; +})(jQuery); - if (!data) $this.data('bs.modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option](_relatedTarget) - else if (options.show) data.show(_relatedTarget) - }) - } - - var old = $.fn.modal - - $.fn.modal = Plugin - $.fn.modal.Constructor = Modal - - - // MODAL NO CONFLICT - // ================= - - $.fn.modal.noConflict = function () { - $.fn.modal = old - return this - } - - - // MODAL DATA-API - // ============== - - $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { - var $this = $(this) - var href = $this.attr('href') - var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 - var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) - - if ($this.is('a')) e.preventDefault() - - $target.one('show.bs.modal', function (showEvent) { - if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown - $target.one('hidden.bs.modal', function () { - $this.is(':visible') && $this.trigger('focus') - }) - }) - Plugin.call($target, option, this) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tooltip.js v3.3.4 - * http://getbootstrap.com/javascript/#tooltip - * Inspired by the original jQuery.tipsy by Jason Frame - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): scrollspy.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + * -------------------------------------------------------------------------- + */ +var ScrollSpy = (function ($) { -+function ($) { - 'use strict'; + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - // TOOLTIP PUBLIC CLASS DEFINITION - // =============================== + var NAME = 'scrollspy'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.scrollspy'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Tooltip = function (element, options) { - this.type = null - this.options = null - this.enabled = null - this.timeout = null - this.hoverState = null - this.$element = null - this.inState = null + var Default = { + offset: 10, + method: 'auto', + target: '' + }; - this.init('tooltip', element, options) - } + var DefaultType = { + offset: 'number', + method: 'string', + target: '(string|element)' + }; - Tooltip.VERSION = '3.3.4' + var Event = { + ACTIVATE: 'activate' + EVENT_KEY, + SCROLL: 'scroll' + EVENT_KEY, + LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY + }; - Tooltip.TRANSITION_DURATION = 150 + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active' + }; - Tooltip.DEFAULTS = { + var Selector = { + DATA_SPY: '[data-spy="scroll"]', + ACTIVE: '.active', + LI: 'li', + LI_DROPDOWN: 'li.dropdown', + NAV_ANCHORS: '.nav li > a' + }; + + var OffsetMethod = { + OFFSET: 'offset', + POSITION: 'position' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var ScrollSpy = (function () { + function ScrollSpy(element, config) { + _classCallCheck(this, ScrollSpy); + + this._element = element; + this._scrollElement = element.tagName === 'BODY' ? window : element; + this._config = this._getConfig(config); + this._selector = '' + this._config.target + ' ' + Selector.NAV_ANCHORS; + this._offsets = []; + this._targets = []; + this._activeTarget = null; + this._scrollHeight = 0; + + $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)); + + this.refresh(); + this._process(); + } + + _createClass(ScrollSpy, [{ + key: 'refresh', + + // public + + value: function refresh() { + var _this14 = this; + + var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; + + var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; + + var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; + + this._offsets = []; + this._targets = []; + + this._scrollHeight = this._getScrollHeight(); + + var targets = $.makeArray($(this._selector)); + + targets.map(function (element) { + var target = undefined; + var targetSelector = Util.getSelectorFromElement(element); + + if (targetSelector) { + target = $(targetSelector)[0]; + } + + if (target && (target.offsetWidth || target.offsetHeight)) { + // todo (fat): remove sketch reliance on jQuery position/offset + return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; + } + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this14._offsets.push(item[0]); + _this14._targets.push(item[1]); + }); + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + $(this._scrollElement).off(EVENT_KEY); + + this._element = null; + this._scrollElement = null; + this._config = null; + this._selector = null; + this._offsets = null; + this._targets = null; + this._activeTarget = null; + this._scrollHeight = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + + if (typeof config.target !== 'string') { + var id = $(config.target).attr('id'); + if (!id) { + id = Util.getUID(NAME); + $(config.target).attr('id', id); + } + config.target = '#' + id; + } + + Util.typeCheckConfig(NAME, config, DefaultType); + + return config; + } + }, { + key: '_getScrollTop', + value: function _getScrollTop() { + return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; + } + }, { + key: '_getScrollHeight', + value: function _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); + } + }, { + key: '_process', + value: function _process() { + var scrollTop = this._getScrollTop() + this._config.offset; + var scrollHeight = this._getScrollHeight(); + var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; + + if (this._scrollHeight !== scrollHeight) { + this.refresh(); + } + + if (scrollTop >= maxScroll) { + var target = this._targets[this._targets.length - 1]; + + if (this._activeTarget !== target) { + this._activate(target); + } + } + + if (this._activeTarget && scrollTop < this._offsets[0]) { + this._activeTarget = null; + this._clear(); + return; + } + + for (var i = this._offsets.length; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); + + if (isActiveTarget) { + this._activate(this._targets[i]); + } + } + } + }, { + key: '_activate', + value: function _activate(target) { + this._activeTarget = target; + + this._clear(); + + var selector = '' + this._selector + '[data-target="' + target + '"],' + ('' + this._selector + '[href="' + target + '"]'); + + // todo (fat): getting all the raw li's up the tree is not great. + var parentListItems = $(selector).parents(Selector.LI); + + for (var i = parentListItems.length; i--;) { + $(parentListItems[i]).addClass(ClassName.ACTIVE); + + var itemParent = parentListItems[i].parentNode; + + if (itemParent && $(itemParent).hasClass(ClassName.DROPDOWN_MENU)) { + var closestDropdown = $(itemParent).closest(Selector.LI_DROPDOWN)[0]; + $(closestDropdown).addClass(ClassName.ACTIVE); + } + } + + $(this._scrollElement).trigger(Event.ACTIVATE, { + relatedTarget: target + }); + } + }, { + key: '_clear', + value: function _clear() { + var activeParents = $(this._selector).parentsUntil(this._config.target, Selector.ACTIVE); + + for (var i = activeParents.length; i--;) { + $(activeParents[i]).removeClass(ClassName.ACTIVE); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' && config || null; + + if (!data) { + data = new ScrollSpy(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return ScrollSpy; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(window).on(Event.LOAD_DATA_API, function () { + var scrollSpys = $.makeArray($(Selector.DATA_SPY)); + + for (var i = scrollSpys.length; i--;) { + var $spy = $(scrollSpys[i]); + ScrollSpy._jQueryInterface.call($spy, $spy.data()); + } + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = ScrollSpy._jQueryInterface; + $.fn[NAME].Constructor = ScrollSpy; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return ScrollSpy._jQueryInterface; + }; + + return ScrollSpy; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tab.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Tab = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'tab'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tab'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active', + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + A: 'a', + LI: 'li', + LI_DROPDOWN: 'li.dropdown', + UL: 'ul:not(.dropdown-menu)', + FADE_CHILD: '> .fade', + ACTIVE: '.active', + ACTIVE_CHILD: '> .active', + DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]', + DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu > .active' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tab = (function () { + function Tab(element) { + _classCallCheck(this, Tab); + + this._element = element; + } + + _createClass(Tab, [{ + key: 'show', + + // public + + value: function show() { + var _this15 = this; + + if (this._element.parentNode && this._element.parentNode.nodeType == Node.ELEMENT_NODE && $(this._element).parent().hasClass(ClassName.ACTIVE)) { + return; + } + + var target = undefined; + var previous = undefined; + var ulElement = $(this._element).closest(Selector.UL)[0]; + var selector = Util.getSelectorFromElement(this._element); + + if (ulElement) { + previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); + previous = previous[previous.length - 1]; + + if (previous) { + previous = $(previous).find(Selector.A)[0]; + } + } + + var hideEvent = $.Event(Event.HIDE, { + relatedTarget: this._element + }); + + var showEvent = $.Event(Event.SHOW, { + relatedTarget: previous + }); + + if (previous) { + $(previous).trigger(hideEvent); + } + + $(this._element).trigger(showEvent); + + if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { + return; + } + + if (selector) { + target = $(selector)[0]; + } + + this._activate($(this._element).closest(Selector.LI)[0], ulElement); + + var complete = function complete() { + var hiddenEvent = $.Event(Event.HIDDEN, { + relatedTarget: _this15._element + }); + + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: previous + }); + + $(previous).trigger(hiddenEvent); + $(_this15._element).trigger(shownEvent); + }; + + if (target) { + this._activate(target, target.parentNode, complete); + } else { + complete(); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeClass(this._element, DATA_KEY); + this._element = null; + } + }, { + key: '_activate', + + // private + + value: function _activate(element, container, callback) { + var active = $(container).find(Selector.ACTIVE_CHILD)[0]; + var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]); + + var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); + + if (active && isTransitioning) { + $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } + + if (active) { + $(active).removeClass(ClassName.IN); + } + } + }, { + key: '_transitionComplete', + value: function _transitionComplete(element, active, isTransitioning, callback) { + if (active) { + $(active).removeClass(ClassName.ACTIVE); + + var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; + if (dropdownChild) { + $(dropdownChild).removeClass(ClassName.ACTIVE); + } + + var activeToggle = $(active).find(Selector.DATA_TOGGLE)[0]; + if (activeToggle) { + activeToggle.setAttribute('aria-expanded', false); + } + } + + $(element).addClass(ClassName.ACTIVE); + + var elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + + if (isTransitioning) { + Util.reflow(element); + $(element).addClass(ClassName.IN); + } else { + $(element).removeClass(ClassName.FADE); + } + + if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { + + var dropdownElement = $(element).closest(Selector.LI_DROPDOWN)[0]; + if (dropdownElement) { + $(dropdownElement).addClass(ClassName.ACTIVE); + } + + elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + } + + if (callback) { + callback(); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + + if (!data) { + data = data = new Tab(this); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tab; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + Tab._jQueryInterface.call($(this), 'show'); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tab._jQueryInterface; + $.fn[NAME].Constructor = Tab; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tab._jQueryInterface; + }; + + return Tab; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tooltip.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Tooltip = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'tooltip'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tooltip'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + var CLASS_PREFIX = 'bs-tether'; + + var Default = { animation: true, - placement: 'top', - selector: false, - template: '', + template: '', trigger: 'hover focus', title: '', delay: 0, html: false, - container: false, - viewport: { - selector: 'body', - padding: 0 - } - } + selector: false, + placement: 'top', + offset: '0 0', + constraints: [] + }; - Tooltip.prototype.init = function (type, element, options) { - this.enabled = true - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) - this.inState = { click: false, hover: false, focus: false } + var DefaultType = { + animation: 'boolean', + template: 'string', + title: '(string|function)', + trigger: 'string', + delay: '(number|object)', + html: 'boolean', + selector: '(string|boolean)', + placement: '(string|function)', + offset: 'string', + constraints: 'array' + }; - if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') + var AttachmentMap = { + TOP: 'bottom center', + RIGHT: 'middle left', + BOTTOM: 'top center', + LEFT: 'middle right' + }; + + var HoverState = { + IN: 'in', + OUT: 'out' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + INSERTED: 'inserted' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + FOCUSOUT: 'focusout' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY + }; + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TOOLTIP: '.tooltip', + TOOLTIP_INNER: '.tooltip-inner' + }; + + var TetherClass = { + element: false, + enabled: false + }; + + var Trigger = { + HOVER: 'hover', + FOCUS: 'focus', + CLICK: 'click', + MANUAL: 'manual' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tooltip = (function () { + function Tooltip(element, config) { + _classCallCheck(this, Tooltip); + + // private + this._isEnabled = true; + this._timeout = 0; + this._hoverState = ''; + this._activeTrigger = {}; + this._tether = null; + + // protected + this.element = element; + this.config = this._getConfig(config); + this.tip = null; + + this._setListeners(); } - var triggers = this.options.trigger.split(' ') + _createClass(Tooltip, [{ + key: 'enable', - for (var i = triggers.length; i--;) { - var trigger = triggers[i] + // public - if (trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (trigger != 'manual') { - var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' - var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' - - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + value: function enable() { + this._isEnabled = true; } - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - Tooltip.prototype.getDefaults = function () { - return Tooltip.DEFAULTS - } - - Tooltip.prototype.getOptions = function (options) { - options = $.extend({}, this.getDefaults(), this.$element.data(), options) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay, - hide: options.delay + }, { + key: 'disable', + value: function disable() { + this._isEnabled = false; } - } - - return options - } - - Tooltip.prototype.getDelegateOptions = function () { - var options = {} - var defaults = this.getDefaults() - - this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) options[key] = value - }) - - return options - } - - Tooltip.prototype.enter = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true - } - - if (self.tip().hasClass('in') || self.hoverState == 'in') { - self.hoverState = 'in' - return - } - - clearTimeout(self.timeout) - - self.hoverState = 'in' - - if (!self.options.delay || !self.options.delay.show) return self.show() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - Tooltip.prototype.isInStateTrue = function () { - for (var key in this.inState) { - if (this.inState[key]) return true - } - - return false - } - - Tooltip.prototype.leave = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false - } - - if (self.isInStateTrue()) return - - clearTimeout(self.timeout) - - self.hoverState = 'out' - - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - Tooltip.prototype.show = function () { - var e = $.Event('show.bs.' + this.type) - - if (this.hasContent() && this.enabled) { - this.$element.trigger(e) - - var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) - if (e.isDefaultPrevented() || !inDom) return - var that = this - - var $tip = this.tip() - - var tipId = this.getUID(this.type) - - this.setContent() - $tip.attr('id', tipId) - this.$element.attr('aria-describedby', tipId) - - if (this.options.animation) $tip.addClass('fade') - - var placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - var autoToken = /\s?auto?\s?/i - var autoPlace = autoToken.test(placement) - if (autoPlace) placement = placement.replace(autoToken, '') || 'top' - - $tip - .detach() - .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) - .data('bs.' + this.type, this) - - this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) - this.$element.trigger('inserted.bs.' + this.type) - - var pos = this.getPosition() - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (autoPlace) { - var orgPlacement = placement - var viewportDim = this.getPosition(this.$viewport) - - placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : - placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : - placement - - $tip - .removeClass(orgPlacement) - .addClass(placement) + }, { + key: 'toggleEnabled', + value: function toggleEnabled() { + this._isEnabled = !this._isEnabled; } + }, { + key: 'toggle', + value: function toggle(event) { + var context = this; + var dataKey = this.constructor.DATA_KEY; - var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) + if (event) { + context = $(event.currentTarget).data(dataKey); - this.applyPlacement(calculatedOffset, placement) + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - var complete = function () { - var prevHoverState = that.hoverState - that.$element.trigger('shown.bs.' + that.type) - that.hoverState = null + context._activeTrigger.click = !context._activeTrigger.click; - if (prevHoverState == 'out') that.leave(that) + if (context._isWithActiveTrigger()) { + context._enter(null, context); + } else { + context._leave(null, context); + } + } else { + $(context.getTipElement()).hasClass(ClassName.IN) ? context._leave(null, context) : context._enter(null, context); + } } + }, { + key: 'dispose', + value: function dispose() { + clearTimeout(this._timeout); - $.support.transition && this.$tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - } - } + this.cleanupTether(); - Tooltip.prototype.applyPlacement = function (offset, placement) { - var $tip = this.tip() - var width = $tip[0].offsetWidth - var height = $tip[0].offsetHeight + $.removeData(this.element, this.constructor.DATA_KEY); - // manually read margins because getBoundingClientRect includes difference - var marginTop = parseInt($tip.css('margin-top'), 10) - var marginLeft = parseInt($tip.css('margin-left'), 10) + $(this.element).off(this.constructor.EVENT_KEY); - // we must check for NaN for ie 8/9 - if (isNaN(marginTop)) marginTop = 0 - if (isNaN(marginLeft)) marginLeft = 0 + if (this.tip) { + $(this.tip).remove(); + } - offset.top += marginTop - offset.left += marginLeft + this._isEnabled = null; + this._timeout = null; + this._hoverState = null; + this._activeTrigger = null; + this._tether = null; - // $.fn.offset doesn't round pixel values - // so we use setOffset directly with our own function B-0 - $.offset.setOffset($tip[0], $.extend({ - using: function (props) { - $tip.css({ - top: Math.round(props.top), - left: Math.round(props.left) - }) + this.element = null; + this.config = null; + this.tip = null; } - }, offset), 0) + }, { + key: 'show', + value: function show() { + var _this16 = this; - $tip.addClass('in') + var showEvent = $.Event(this.constructor.Event.SHOW); - // check to see if placing tip in new offset caused the tip to resize itself - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight + if (this.isWithContent() && this._isEnabled) { + $(this.element).trigger(showEvent); - if (placement == 'top' && actualHeight != height) { - offset.top = offset.top + height - actualHeight - } + var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); - var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return; + } - if (delta.left) offset.left += delta.left - else offset.top += delta.top + var tip = this.getTipElement(); + var tipId = Util.getUID(this.constructor.NAME); - var isVertical = /top|bottom/.test(placement) - var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight - var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' + tip.setAttribute('id', tipId); + this.element.setAttribute('aria-describedby', tipId); - $tip.offset(offset) - this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) - } + this.setContent(); - Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { - this.arrow() - .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') - .css(isVertical ? 'top' : 'left', '') - } + if (this.config.animation) { + $(tip).addClass(ClassName.FADE); + } - Tooltip.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } + var attachment = this._getAttachment(placement); - Tooltip.prototype.hide = function (callback) { - var that = this - var $tip = $(this.$tip) - var e = $.Event('hide.bs.' + this.type) + $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); - function complete() { - if (that.hoverState != 'in') $tip.detach() - that.$element - .removeAttr('aria-describedby') - .trigger('hidden.bs.' + that.type) - callback && callback() - } + $(this.element).trigger(this.constructor.Event.INSERTED); - this.$element.trigger(e) + this._tether = new Tether({ + element: tip, + target: this.element, + attachment: attachment, + classes: TetherClass, + classPrefix: CLASS_PREFIX, + offset: this.config.offset, + constraints: this.config.constraints + }); - if (e.isDefaultPrevented()) return + Util.reflow(tip); + this._tether.position(); - $tip.removeClass('in') + $(tip).addClass(ClassName.IN); - $.support.transition && $tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() + var complete = function complete() { + var prevHoverState = _this16._hoverState; + _this16._hoverState = null; - this.hoverState = null + $(_this16.element).trigger(_this16.constructor.Event.SHOWN); - return this - } + if (prevHoverState === HoverState.OUT) { + _this16._leave(null, _this16); + } + }; - Tooltip.prototype.fixTitle = function () { - var $e = this.$element - if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') - } - } - - Tooltip.prototype.hasContent = function () { - return this.getTitle() - } - - Tooltip.prototype.getPosition = function ($element) { - $element = $element || this.$element - - var el = $element[0] - var isBody = el.tagName == 'BODY' - - var elRect = el.getBoundingClientRect() - if (elRect.width == null) { - // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 - elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) - } - var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() - var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null - - return $.extend({}, elRect, scroll, outerDims, elOffset) - } - - Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { - return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : - /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } - - } - - Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { - var delta = { top: 0, left: 0 } - if (!this.$viewport) return delta - - var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 - var viewportDimensions = this.getPosition(this.$viewport) - - if (/right|left/.test(placement)) { - var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll - var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight - if (topEdgeOffset < viewportDimensions.top) { // top overflow - delta.top = viewportDimensions.top - topEdgeOffset - } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow - delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset + Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ? $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION) : complete(); + } } - } else { - var leftEdgeOffset = pos.left - viewportPadding - var rightEdgeOffset = pos.left + viewportPadding + actualWidth - if (leftEdgeOffset < viewportDimensions.left) { // left overflow - delta.left = viewportDimensions.left - leftEdgeOffset - } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow - delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset + }, { + key: 'hide', + value: function hide(callback) { + var _this17 = this; + + var tip = this.getTipElement(); + var hideEvent = $.Event(this.constructor.Event.HIDE); + var complete = function complete() { + if (_this17._hoverState !== HoverState.IN && tip.parentNode) { + tip.parentNode.removeChild(tip); + } + + _this17.element.removeAttribute('aria-describedby'); + $(_this17.element).trigger(_this17.constructor.Event.HIDDEN); + _this17.cleanupTether(); + + if (callback) { + callback(); + } + }; + + $(this.element).trigger(hideEvent); + + if (hideEvent.isDefaultPrevented()) { + return; + } + + $(tip).removeClass(ClassName.IN); + + if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { + + $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } + + this._hoverState = ''; } - } + }, { + key: 'isWithContent', - return delta - } + // protected - Tooltip.prototype.getTitle = function () { - var title - var $e = this.$element - var o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - Tooltip.prototype.getUID = function (prefix) { - do prefix += ~~(Math.random() * 1000000) - while (document.getElementById(prefix)) - return prefix - } - - Tooltip.prototype.tip = function () { - if (!this.$tip) { - this.$tip = $(this.options.template) - if (this.$tip.length != 1) { - throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') + value: function isWithContent() { + return !!this.getTitle(); } - } - return this.$tip - } - - Tooltip.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) - } - - Tooltip.prototype.enable = function () { - this.enabled = true - } - - Tooltip.prototype.disable = function () { - this.enabled = false - } - - Tooltip.prototype.toggleEnabled = function () { - this.enabled = !this.enabled - } - - Tooltip.prototype.toggle = function (e) { - var self = this - if (e) { - self = $(e.currentTarget).data('bs.' + this.type) - if (!self) { - self = new this.constructor(e.currentTarget, this.getDelegateOptions()) - $(e.currentTarget).data('bs.' + this.type, self) + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; } - } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var method = this.config.html ? 'innerHTML' : 'innerText'; - if (e) { - self.inState.click = !self.inState.click - if (self.isInStateTrue()) self.enter(self) - else self.leave(self) - } else { - self.tip().hasClass('in') ? self.leave(self) : self.enter(self) - } - } + $(tip).find(Selector.TOOLTIP_INNER)[0][method] = title; - Tooltip.prototype.destroy = function () { - var that = this - clearTimeout(this.timeout) - this.hide(function () { - that.$element.off('.' + that.type).removeData('bs.' + that.type) - if (that.$tip) { - that.$tip.detach() + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); + + this.cleanupTether(); } - that.$tip = null - that.$arrow = null - that.$viewport = null - }) - } + }, { + key: 'getTitle', + value: function getTitle() { + var title = this.element.getAttribute('data-original-title'); + if (!title) { + title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + } - // TOOLTIP PLUGIN DEFINITION - // ========================= + return title; + } + }, { + key: 'cleanupTether', + value: function cleanupTether() { + if (this._tether) { + this._tether.destroy(); - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option + // clean up after tether's junk classes + // remove after they fix issue + // (https://github.com/HubSpot/tether/issues/36) + $(this.element).removeClass(this._removeTetherClasses); + $(this.tip).removeClass(this._removeTetherClasses); + } + } + }, { + key: '_getAttachment', - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } + // private - var old = $.fn.tooltip + value: function _getAttachment(placement) { + return AttachmentMap[placement.toUpperCase()]; + } + }, { + key: '_setListeners', + value: function _setListeners() { + var _this18 = this; - $.fn.tooltip = Plugin - $.fn.tooltip.Constructor = Tooltip + var triggers = this.config.trigger.split(' '); + triggers.forEach(function (trigger) { + if (trigger === 'click') { + $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18)); + } else if (trigger !== Trigger.MANUAL) { + var eventIn = trigger == Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN; + var eventOut = trigger == Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT; - // TOOLTIP NO CONFLICT - // =================== + $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18)); + } + }); - $.fn.tooltip.noConflict = function () { - $.fn.tooltip = old - return this - } + if (this.config.selector) { + this.config = $.extend({}, this.config, { + trigger: 'manual', + selector: '' + }); + } else { + this._fixTitle(); + } + } + }, { + key: '_removeTetherClasses', + value: function _removeTetherClasses(i, css) { + return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' '); + } + }, { + key: '_fixTitle', + value: function _fixTitle() { + var titleType = typeof this.element.getAttribute('data-original-title'); + if (this.element.getAttribute('title') || titleType !== 'string') { + this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); + this.element.setAttribute('title', ''); + } + } + }, { + key: '_enter', + value: function _enter(event, context) { + var dataKey = this.constructor.DATA_KEY; -}(jQuery); + context = context || $(event.currentTarget).data(dataKey); -/* ======================================================================== - * Bootstrap: popover.js v3.3.4 - * http://getbootstrap.com/javascript/#popovers - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; + } + + if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { + context._hoverState = HoverState.IN; + return; + } + + clearTimeout(context._timeout); + + context._hoverState = HoverState.IN; + + if (!context.config.delay || !context.config.delay.show) { + context.show(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.IN) { + context.show(); + } + }, context.config.delay.show); + } + }, { + key: '_leave', + value: function _leave(event, context) { + var dataKey = this.constructor.DATA_KEY; + + context = context || $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type == 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; + } + + if (context._isWithActiveTrigger()) { + return; + } + + clearTimeout(context._timeout); + + context._hoverState = HoverState.OUT; + + if (!context.config.delay || !context.config.delay.hide) { + context.hide(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.OUT) { + context.hide(); + } + }, context.config.delay.hide); + } + }, { + key: '_isWithActiveTrigger', + value: function _isWithActiveTrigger() { + for (var trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true; + } + } + + return false; + } + }, { + key: '_getConfig', + value: function _getConfig(config) { + config = $.extend({}, this.constructor.Default, $(this.element).data(), config); + + if (config.delay && typeof config.delay === 'number') { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + + Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); + + return config; + } + }, { + key: '_getDelegateConfig', + value: function _getDelegateConfig() { + var config = {}; + + if (this.config) { + for (var key in this.config) { + var value = this.config[key]; + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + } + + return config; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: 'EVENT_KEY', + get: function () { + return EVENT_KEY; + } + }, { + key: 'DefaultType', + get: function () { + return DefaultType; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; + + if (!data && /destroy|hide/.test(config)) { + return; + } + + if (!data) { + data = new Tooltip(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tooltip; + })(); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tooltip._jQueryInterface; + $.fn[NAME].Constructor = Tooltip; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tooltip._jQueryInterface; + }; + + return Tooltip; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + * -------------------------------------------------------------------------- + */ +var Popover = (function ($) { -+function ($) { - 'use strict'; + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - // POPOVER PUBLIC CLASS DEFINITION - // =============================== + var NAME = 'popover'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.popover'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; - var Popover = function (element, options) { - this.init('popover', element, options) - } - - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') - - Popover.VERSION = '3.3.4' - - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { + var Default = $.extend({}, Tooltip.Default, { placement: 'right', trigger: 'click', content: '', - template: '' - }) - - - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ - - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) - - Popover.prototype.constructor = Popover - - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } - - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() - - $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) - $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events - this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' - ](content) - - $tip.removeClass('fade top bottom left right in') - - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } - - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } - - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options - - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } - - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } - - - // POPOVER PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.popover - - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover - - - // POPOVER NO CONFLICT - // =================== - - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: scrollspy.js v3.3.4 - * http://getbootstrap.com/javascript/#scrollspy - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.4' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(href) - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target - - this.clear() - - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' - - var active = $(selector) - .parents('li') - .addClass('active') - - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') - } - - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } - - - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.scrollspy - - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy - - - // SCROLLSPY NO CONFLICT - // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - - - // SCROLLSPY DATA-API - // ================== - - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tab.js v3.3.4 - * http://getbootstrap.com/javascript/#tabs - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TAB CLASS DEFINITION - // ==================== - - var Tab = function (element) { - // jscs:disable requireDollarBeforejQueryAssignment - this.element = $(element) - // jscs:enable requireDollarBeforejQueryAssignment - } - - Tab.VERSION = '3.3.4' - - Tab.TRANSITION_DURATION = 150 - - Tab.prototype.show = function () { - var $this = this.element - var $ul = $this.closest('ul:not(.dropdown-menu)') - var selector = $this.data('target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - if ($this.parent('li').hasClass('active')) return - - var $previous = $ul.find('.active:last a') - var hideEvent = $.Event('hide.bs.tab', { - relatedTarget: $this[0] - }) - var showEvent = $.Event('show.bs.tab', { - relatedTarget: $previous[0] - }) - - $previous.trigger(hideEvent) - $this.trigger(showEvent) - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return - - var $target = $(selector) - - this.activate($this.closest('li'), $ul) - this.activate($target, $target.parent(), function () { - $previous.trigger({ - type: 'hidden.bs.tab', - relatedTarget: $this[0] - }) - $this.trigger({ - type: 'shown.bs.tab', - relatedTarget: $previous[0] - }) - }) - } - - Tab.prototype.activate = function (element, container, callback) { - var $active = container.find('> .active') - var transition = callback - && $.support.transition - && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) - - function next() { - $active - .removeClass('active') - .find('> .dropdown-menu > .active') - .removeClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', false) - - element - .addClass('active') - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - - if (transition) { - element[0].offsetWidth // reflow for transition - element.addClass('in') - } else { - element.removeClass('fade') + template: '' + }); + + var DefaultType = $.extend({}, Tooltip.DefaultType, { + content: '(string|function)' + }); + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TITLE: '.popover-title', + CONTENT: '.popover-content', + ARROW: '.popover-arrow' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + INSERTED: 'inserted' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + FOCUSOUT: 'focusout' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Popover = (function (_Tooltip) { + function Popover() { + _classCallCheck(this, Popover); + + if (_Tooltip != null) { + _Tooltip.apply(this, arguments); } + } - if (element.parent('.dropdown-menu').length) { - element - .closest('li.dropdown') - .addClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) + _inherits(Popover, _Tooltip); + + _createClass(Popover, [{ + key: 'isWithContent', + + // overrides + + value: function isWithContent() { + return this.getTitle() || this._getContent(); } + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; + } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var content = this._getContent(); + var titleElement = $(tip).find(Selector.TITLE)[0]; - callback && callback() - } + if (titleElement) { + titleElement[this.config.html ? 'innerHTML' : 'innerText'] = title; + } - $active.length && transition ? - $active - .one('bsTransitionEnd', next) - .emulateTransitionEnd(Tab.TRANSITION_DURATION) : - next() + // we use append for html objects to maintain js events + $(tip).find(Selector.CONTENT).children().detach().end()[this.config.html ? typeof content === 'string' ? 'html' : 'append' : 'text'](content); - $active.removeClass('in') - } + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); + this.cleanupTether(); + } + }, { + key: '_getContent', - // TAB PLUGIN DEFINITION - // ===================== + // private - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tab') + value: function _getContent() { + return this.element.getAttribute('data-content') || (typeof this.config.content == 'function' ? this.config.content.call(this.element) : this.config.content); + } + }], [{ + key: 'VERSION', - if (!data) $this.data('bs.tab', (data = new Tab(this))) - if (typeof option == 'string') data[option]() - }) - } + // getters - var old = $.fn.tab + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: 'EVENT_KEY', + get: function () { + return EVENT_KEY; + } + }, { + key: 'DefaultType', + get: function () { + return DefaultType; + } + }, { + key: '_jQueryInterface', - $.fn.tab = Plugin - $.fn.tab.Constructor = Tab + // static + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; - // TAB NO CONFLICT - // =============== + if (!data && /destroy|hide/.test(config)) { + return; + } - $.fn.tab.noConflict = function () { - $.fn.tab = old - return this - } + if (!data) { + data = new Popover(this, _config); + $(this).data(DATA_KEY, data); + } + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); - // TAB DATA-API - // ============ + return Popover; + })(Tooltip); - var clickHandler = function (e) { - e.preventDefault() - Plugin.call($(this), 'show') - } + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - $(document) - .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) - .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: affix.js v3.3.4 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.VERSION = '3.3.4' - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0, - target: window - } - - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() - - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false - - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } - - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height - - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' - - return false - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) - - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') - } - - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.affix - - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop - - Plugin.call($spy, data) - }) - }) + $.fn[NAME] = Popover._jQueryInterface; + $.fn[NAME].Constructor = Popover; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Popover._jQueryInterface; + }; + + return Popover; +})(jQuery); }(jQuery); diff --git a/dist/js/bootstrap.min.js b/dist/js/bootstrap.min.js index 766575923..497cc8176 100644 --- a/dist/js/bootstrap.min.js +++ b/dist/js/bootstrap.min.js @@ -3,5 +3,6 @@ * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){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.4",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.4",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")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),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"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||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=null,this.sliding=null,this.interval=null,this.$active=null,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.4",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|hide/.test(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('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][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.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},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":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(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 c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}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.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){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(){"use strict";function a(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.__proto__=b)}function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}{var c=function(){function a(a,b){for(var c=0;cthis._items.length-1||0>b)){if(this._isSliding)return void a(this._element).one(o.SLID,function(){return c.to(b)});if(d==b)return this.pause(),void this.cycle();var e=b>d?n.NEXT:n.PREVIOUS;this._slide(e,this._items[b])}}},{key:"dispose",value:function(){a(this._element).off(h),a.removeData(this._element,g),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}},{key:"_getConfig",value:function(b){return b=a.extend({},l,b),d.typeCheckConfig(e,b,m),b}},{key:"_addEventListeners",value:function(){this._config.keyboard&&a(this._element).on(o.KEYDOWN,a.proxy(this._keydown,this)),"hover"!=this._config.pause||"ontouchstart"in document.documentElement||a(this._element).on(o.MOUSEENTER,a.proxy(this.pause,this)).on(o.MOUSELEAVE,a.proxy(this.cycle,this))}},{key:"_keydown",value:function(a){if(a.preventDefault(),!/input|textarea/i.test(a.target.tagName))switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}}},{key:"_getItemIndex",value:function(b){return this._items=a.makeArray(a(b).parent().find(q.ITEM)),this._items.indexOf(b)}},{key:"_getItemByDirection",value:function(a,b){var c=a===n.NEXT,d=a===n.PREVIOUS,e=this._getItemIndex(b),f=this._items.length-1,g=d&&0===e||c&&e==f;if(g&&!this._config.wrap)return b;var h=a==n.PREVIOUS?-1:1,i=(e+h)%this._items.length;return-1===i?this._items[this._items.length-1]:this._items[i]}},{key:"_triggerSlideEvent",value:function(b,c){var d=a.Event(o.SLIDE,{relatedTarget:b,direction:c});return a(this._element).trigger(d),d}},{key:"_setActiveIndicatorElement",value:function(b){if(this._indicatorsElement){a(this._indicatorsElement).find(q.ACTIVE).removeClass(p.ACTIVE);var c=this._indicatorsElement.children[this._getItemIndex(b)];c&&a(c).addClass(p.ACTIVE)}}},{key:"_slide",value:function(b,c){var e=this,f=a(this._element).find(q.ACTIVE_ITEM)[0],g=c||f&&this._getItemByDirection(b,f),h=!!this._interval,i=b==n.NEXT?p.LEFT:p.RIGHT;if(g&&a(g).hasClass(p.ACTIVE))return void(this._isSliding=!1);var j=this._triggerSlideEvent(g,i);if(!j.isDefaultPrevented()&&f&&g){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(g);var l=a.Event(o.SLID,{relatedTarget:g,direction:i});d.supportsTransitionEnd()&&a(this._element).hasClass(p.SLIDE)?(a(g).addClass(b),d.reflow(g),a(f).addClass(i),a(g).addClass(i),a(f).one(d.TRANSITION_END,function(){a(g).removeClass(i).removeClass(b),a(g).addClass(p.ACTIVE),a(f).removeClass(p.ACTIVE).removeClass(b).removeClass(i),e._isSliding=!1,setTimeout(function(){return a(e._element).trigger(l)},0)}).emulateTransitionEnd(k)):(a(f).removeClass(p.ACTIVE),a(g).addClass(p.ACTIVE),this._isSliding=!1,a(this._element).trigger(l)),h&&this.cycle()}}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return l}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d=a.extend({},l,a(this).data());"object"==typeof b&&a.extend(d,b);var e="string"==typeof b?b:d.slide;c||(c=new i(this,d),a(this).data(g,c)),"number"==typeof b?c.to(b):e?c[e]():d.interval&&(c.pause(),c.cycle())})}},{key:"_dataApiClickHandler",value:function(b){var c=d.getSelectorFromElement(this);if(c){var e=a(c)[0];if(e&&a(e).hasClass(p.CAROUSEL)){var f=a.extend({},a(e).data(),a(this).data()),h=this.getAttribute("data-slide-to");h&&(f.interval=!1),i._jQueryInterface.call(a(e),f),h&&a(e).data(g).to(h),b.preventDefault()}}}}]),i}();return a(document).on(o.CLICK_DATA_API,q.DATA_SLIDE,r._dataApiClickHandler),a(window).on(o.LOAD_DATA_API,function(){a(q.DATA_RIDE).each(function(){var b=a(this);r._jQueryInterface.call(b,b.data())})}),a.fn[e]=r._jQueryInterface,a.fn[e].Constructor=r,a.fn[e].noConflict=function(){return a.fn[e]=j,r._jQueryInterface},r}(jQuery),function(a){var e="collapse",f="4.0.0",g="bs.collapse",h="."+g,i=".data-api",j=a.fn[e],k=600,l={toggle:!0,parent:""},m={toggle:"boolean",parent:"string"},n={SHOW:"show"+h,SHOWN:"shown"+h,HIDE:"hide"+h,HIDDEN:"hidden"+h,CLICK_DATA_API:"click"+h+i},o={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},q={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},r=function(){function h(c,d){b(this,h),this._isTransitioning=!1,this._element=c,this._config=this._getConfig(d),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'+c.id+'"],'+('[data-toggle="collapse"][data-target="#'+c.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return c(h,[{key:"toggle",value:function(){a(this._element).hasClass(o.IN)?this.hide():this.show()}},{key:"show",value:function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(o.IN)){var c=void 0,e=void 0;if(this._parent&&(c=a.makeArray(a(q.ACTIVES)),c.length||(c=null)),!(c&&(e=a(c).data(g),e&&e._isTransitioning))){var f=a.Event(n.SHOW);if(a(this._element).trigger(f),!f.isDefaultPrevented()){c&&(h._jQueryInterface.call(a(c),"hide"),e||a(c).data(g,null));var i=this._getDimension();a(this._element).removeClass(o.COLLAPSE).addClass(o.COLLAPSING),this._element.style[i]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&a(this._triggerArray).removeClass(o.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var j=function(){a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).addClass(o.IN),b._element.style[i]="",b.setTransitioning(!1),a(b._element).trigger(n.SHOWN)};if(!d.supportsTransitionEnd())return void j();var l="scroll"+(i[0].toUpperCase()+i.slice(1));a(this._element).one(d.TRANSITION_END,j).emulateTransitionEnd(k),this._element.style[i]=this._element[l]+"px"}}}}},{key:"hide",value:function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(o.IN)){var c=a.Event(n.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var e=this._getDimension(),f=e===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[e]=this._element[f]+"px",d.reflow(this._element),a(this._element).addClass(o.COLLAPSING).removeClass(o.COLLAPSE).removeClass(o.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&a(this._triggerArray).addClass(o.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var g=function(){b.setTransitioning(!1),a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).trigger(n.HIDDEN)};return this._element.style[e]=0,d.supportsTransitionEnd()?void a(this._element).one(d.TRANSITION_END,g).emulateTransitionEnd(k):g()}}}},{key:"setTransitioning",value:function(a){this._isTransitioning=a}},{key:"dispose",value:function(){a.removeData(this._element,g),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(b){return b=a.extend({},l,b),b.toggle=!!b.toggle,d.typeCheckConfig(e,b,m),b}},{key:"_getDimension",value:function(){var b=a(this._element).hasClass(p.WIDTH);return b?p.WIDTH:p.HEIGHT}},{key:"_getParent",value:function(){var b=this,c=a(this._config.parent)[0],d='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return a(c).find(d).each(function(a,c){b._addAriaAndCollapsedClass(h._getTargetFromElement(c),[c])}),c}},{key:"_addAriaAndCollapsedClass",value:function(b,c){if(b){var d=a(b).hasClass(o.IN);b.setAttribute("aria-expanded",d),c.length&&a(c).toggleClass(o.COLLAPSED,!d).attr("aria-expanded",d)}}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return l}},{key:"_getTargetFromElement",value:function(b){var c=d.getSelectorFromElement(b);return c?a(c)[0]:null}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g),e=a.extend({},l,c.data(),"object"==typeof b&&b);!d&&e.toggle&&/show|hide/.test(b)&&(e.toggle=!1),d||(d=new h(this,e),c.data(g,d)),"string"==typeof b&&d[b]()})}}]),h}();return a(document).on(n.CLICK_DATA_API,q.DATA_TOGGLE,function(b){b.preventDefault();var c=r._getTargetFromElement(this),d=a(c).data(g),e=d?"toggle":a(this).data();r._jQueryInterface.call(a(c),e)}),a.fn[e]=r._jQueryInterface,a.fn[e].Constructor=r,a.fn[e].noConflict=function(){return a.fn[e]=j,r._jQueryInterface},r}(jQuery),function(a){var e="dropdown",f="4.0.0",g="bs.dropdown",h="."+g,i=".data-api",j=a.fn[e],k={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK:"click"+h,CLICK_DATA_API:"click"+h+i,KEYDOWN_DATA_API:"keydown"+h+i},l={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},m={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},n=function(){function e(a){b(this,e),this._element=a,this._addEventListeners()}return c(e,[{key:"toggle",value:function(){if(!this.disabled&&!a(this).hasClass(l.DISABLED)){var b=e._getParentFromElement(this),c=a(b).hasClass(l.OPEN);if(e._clearMenus(),c)return!1;if("ontouchstart"in document.documentElement&&!a(b).closest(m.NAVBAR_NAV).length){var d=document.createElement("div");d.className=l.BACKDROP,a(d).insertBefore(this),a(d).on("click",e._clearMenus)}var f={relatedTarget:this},g=a.Event(k.SHOW,f);if(a(b).trigger(g),!g.isDefaultPrevented())return this.focus(),this.setAttribute("aria-expanded","true"),a(b).toggleClass(l.OPEN),a(b).trigger(k.SHOWN,f),!1}}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._element).off(h),this._element=null}},{key:"_addEventListeners",value:function(){a(this._element).on(k.CLICK,this.toggle)}}],[{key:"VERSION",get:function(){return f}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g);c||a(this).data(g,c=new e(this)),"string"==typeof b&&c[b].call(this)})}},{key:"_clearMenus",value:function(b){if(!b||3!==b.which){var c=a(m.BACKDROP)[0];c&&c.parentNode.removeChild(c);for(var d=a.makeArray(a(m.DATA_TOGGLE)),f=0;f0&&h--,40===b.which&&hdocument.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px")}},{key:"_resetAdjustments",value:function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this._isBodyOverflowing=document.body.clientWidth a"},p={OFFSET:"offset",POSITION:"position"},q=function(){function i(c,d){b(this,i),this._element=c,this._scrollElement="BODY"===c.tagName?window:c,this._config=this._getConfig(d),this._selector=""+this._config.target+" "+o.NAV_ANCHORS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a(this._scrollElement).on(m.SCROLL,a.proxy(this._process,this)),this.refresh(),this._process()}return c(i,[{key:"refresh",value:function(){var b=this,c=this._scrollElement!==this._scrollElement.window?p.POSITION:p.OFFSET,e="auto"===this._config.method?c:this._config.method,f=e===p.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var g=a.makeArray(a(this._selector));g.map(function(b){var c=void 0,g=d.getSelectorFromElement(b);return g&&(c=a(g)[0]),c&&(c.offsetWidth||c.offsetHeight)?[a(c)[e]().top+f,g]:void 0}).filter(function(a){return a}).sort(function(a,b){return a[0]-b[0]}).forEach(function(a){b._offsets.push(a[0]),b._targets.push(a[1])})}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._scrollElement).off(h),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(b){if(b=a.extend({},k,b),"string"!=typeof b.target){var c=a(b.target).attr("id");c||(c=d.getUID(e),a(b.target).attr("id",c)),b.target="#"+c}return d.typeCheckConfig(e,b,l),b}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_process",value:function(){var a=this._getScrollTop()+this._config.offset,b=this._getScrollHeight(),c=this._config.offset+b-this._scrollElement.offsetHeight;if(this._scrollHeight!==b&&this.refresh(),a>=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a=this._offsets[e]&&(void 0===this._offsets[e+1]||a .fade",ACTIVE:".active",ACTIVE_CHILD:"> .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu > .active"},o=function(){function e(a){b(this,e),this._element=a}return c(e,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!=Node.ELEMENT_NODE||!a(this._element).parent().hasClass(m.ACTIVE)){var c=void 0,e=void 0,f=a(this._element).closest(n.UL)[0],g=d.getSelectorFromElement(this._element);f&&(e=a.makeArray(a(f).find(n.ACTIVE)),e=e[e.length-1],e&&(e=a(e).find(n.A)[0]));var h=a.Event(l.HIDE,{relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:e});if(e&&a(e).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(a(this._element).closest(n.LI)[0],f);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),d=a.Event(l.SHOWN,{relatedTarget:e});a(e).trigger(c),a(b._element).trigger(d)};c?this._activate(c,c.parentNode,j):j()}}}},{key:"dispose",value:function(){a.removeClass(this._element,g),this._element=null}},{key:"_activate",value:function(b,c,e){var f=a(c).find(n.ACTIVE_CHILD)[0],g=e&&d.supportsTransitionEnd()&&(f&&a(f).hasClass(m.FADE)||!!a(c).find(n.FADE_CHILD)[0]),h=a.proxy(this._transitionComplete,this,b,f,g,e); + +f&&g?a(f).one(d.TRANSITION_END,h).emulateTransitionEnd(k):h(),f&&a(f).removeClass(m.IN)}},{key:"_transitionComplete",value:function(b,c,e,f){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE);var h=a(c).find(n.DATA_TOGGLE)[0];h&&h.setAttribute("aria-expanded",!1)}a(b).addClass(m.ACTIVE);var i=a(b).find(n.DATA_TOGGLE)[0];if(i&&i.setAttribute("aria-expanded",!0),e?(d.reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var j=a(b).closest(n.LI_DROPDOWN)[0];j&&a(j).addClass(m.ACTIVE),i=a(b).find(n.DATA_TOGGLE)[0],i&&i.setAttribute("aria-expanded",!0)}f&&f()}}],[{key:"VERSION",get:function(){return f}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g);d||(d=d=new e(this),c.data(g,d)),"string"==typeof b&&d[b]()})}}]),e}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[e]=o._jQueryInterface,a.fn[e].Constructor=o,a.fn[e].noConflict=function(){return a.fn[e]=j,o._jQueryInterface},o}(jQuery),function(a){var e="tooltip",f="4.0.0",g="bs.tooltip",h="."+g,i=a.fn[e],j=150,k="bs-tether",l={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},m={animation:"boolean",template:"string",title:"(string|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array"},n={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},o={IN:"in",OUT:"out"},p={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,INSERTED:"inserted"+h,CLICK:"click"+h,FOCUSIN:"focusin"+h,FOCUSOUT:"focusout"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h},q={FADE:"fade",IN:"in"},r={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},s={element:!1,enabled:!1},t={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},u=function(){function i(a,c){b(this,i),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=a,this.config=this._getConfig(c),this.tip=null,this._setListeners()}return c(i,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(b){var c=this,d=this.constructor.DATA_KEY;b?(c=a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),c._activeTrigger.click=!c._activeTrigger.click,c._isWithActiveTrigger()?c._enter(null,c):c._leave(null,c)):a(c.getTipElement()).hasClass(q.IN)?c._leave(null,c):c._enter(null,c)}},{key:"dispose",value:function(){clearTimeout(this._timeout),this.cleanupTether(),a.removeData(this.element,this.constructor.DATA_KEY),a(this.element).off(this.constructor.EVENT_KEY),this.tip&&a(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null}},{key:"show",value:function(){var b=this,c=a.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a(this.element).trigger(c);var e=a.contains(this.element.ownerDocument.documentElement,this.element);if(c.isDefaultPrevented()||!e)return;var f=this.getTipElement(),g=d.getUID(this.constructor.NAME);f.setAttribute("id",g),this.element.setAttribute("aria-describedby",g),this.setContent(),this.config.animation&&a(f).addClass(q.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,f,this.element):this.config.placement,j=this._getAttachment(h);a(f).data(this.constructor.DATA_KEY,this).appendTo(document.body),a(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({element:f,target:this.element,attachment:j,classes:s,classPrefix:k,offset:this.config.offset,constraints:this.config.constraints}),d.reflow(f),this._tether.position(),a(f).addClass(q.IN);var l=function(){var c=b._hoverState;b._hoverState=null,a(b.element).trigger(b.constructor.Event.SHOWN),c===o.OUT&&b._leave(null,b)};d.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE)?a(this.tip).one(d.TRANSITION_END,l).emulateTransitionEnd(i._TRANSITION_DURATION):l()}}},{key:"hide",value:function(b){var c=this,e=this.getTipElement(),f=a.Event(this.constructor.Event.HIDE),g=function(){c._hoverState!==o.IN&&e.parentNode&&e.parentNode.removeChild(e),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),c.cleanupTether(),b&&b()};a(this.element).trigger(f),f.isDefaultPrevented()||(a(e).removeClass(q.IN),d.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE)?a(e).one(d.TRANSITION_END,g).emulateTransitionEnd(j):g(),this._hoverState="")}},{key:"isWithContent",value:function(){return!!this.getTitle()}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=this.getTipElement(),c=this.getTitle(),d=this.config.html?"innerHTML":"innerText";a(b).find(r.TOOLTIP_INNER)[0][d]=c,a(b).removeClass(q.FADE).removeClass(q.IN),this.cleanupTether()}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");return a||(a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),a}},{key:"cleanupTether",value:function(){this._tether&&(this._tether.destroy(),a(this.element).removeClass(this._removeTetherClasses),a(this.tip).removeClass(this._removeTetherClasses))}},{key:"_getAttachment",value:function(a){return n[a.toUpperCase()]}},{key:"_setListeners",value:function(){var b=this,c=this.config.trigger.split(" ");c.forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,a.proxy(b.toggle,b));else if(c!==t.MANUAL){var d=c==t.HOVER?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c==t.HOVER?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,a.proxy(b._enter,b)).on(e,b.config.selector,a.proxy(b._leave,b))}}),this.config.selector?this.config=a.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()}},{key:"_removeTetherClasses",value:function(a,b){return((b.baseVal||b).match(new RegExp("(^|\\s)"+k+"-\\S+","g"))||[]).join(" ")}},{key:"_fixTitle",value:function(){var a=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==a)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))}},{key:"_enter",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusin"==b.type?t.FOCUS:t.HOVER]=!0),a(c.getTipElement()).hasClass(q.IN)||c._hoverState===o.IN?void(c._hoverState=o.IN):(clearTimeout(c._timeout),c._hoverState=o.IN,c.config.delay&&c.config.delay.show?void(c._timeout=setTimeout(function(){c._hoverState===o.IN&&c.show()},c.config.delay.show)):void c.show())}},{key:"_leave",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusout"==b.type?t.FOCUS:t.HOVER]=!1),c._isWithActiveTrigger()?void 0:(clearTimeout(c._timeout),c._hoverState=o.OUT,c.config.delay&&c.config.delay.hide?void(c._timeout=setTimeout(function(){c._hoverState===o.OUT&&c.hide()},c.config.delay.hide)):void c.hide())}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1}},{key:"_getConfig",value:function(b){return b=a.extend({},this.constructor.Default,a(this.element).data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),d.typeCheckConfig(e,b,this.constructor.DefaultType),b}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config)for(var b in this.config){var c=this.config[b];this.constructor.Default[b]!==c&&(a[b]=c)}return a}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return g}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return h}},{key:"DefaultType",get:function(){return m}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b?b:null;(c||!/destroy|hide/.test(b))&&(c||(c=new i(this,d),a(this).data(g,c)),"string"==typeof b&&c[b]())})}}]),i}();return a.fn[e]=u._jQueryInterface,a.fn[e].Constructor=u,a.fn[e].noConflict=function(){return a.fn[e]=i,u._jQueryInterface},u}(jQuery));!function(d){var f="popover",g="4.0.0",h="bs.popover",i="."+h,j=d.fn[f],k=d.extend({},e.Default,{placement:"right",trigger:"click",content:"",template:''}),l=d.extend({},e.DefaultType,{content:"(string|function)"}),m={FADE:"fade",IN:"in"},n={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},o={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},p=function(e){function j(){b(this,j),null!=e&&e.apply(this,arguments)}return a(j,e),c(j,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||d(this.config.template)[0]}},{key:"setContent",value:function(){var a=this.getTipElement(),b=this.getTitle(),c=this._getContent(),e=d(a).find(n.TITLE)[0];e&&(e[this.config.html?"innerHTML":"innerText"]=b),d(a).find(n.CONTENT).children().detach().end()[this.config.html?"string"==typeof c?"html":"append":"text"](c),d(a).removeClass(m.FADE).removeClass(m.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"VERSION",get:function(){return g}},{key:"Default",get:function(){return k}},{key:"NAME",get:function(){return f}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return o}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return l}},{key:"_jQueryInterface",value:function(a){return this.each(function(){var b=d(this).data(h),c="object"==typeof a?a:null;(b||!/destroy|hide/.test(a))&&(b||(b=new j(this,c),d(this).data(h,b)),"string"==typeof a&&b[a]())})}}]),j}(e);return d.fn[f]=p._jQueryInterface,d.fn[f].Constructor=p,d.fn[f].noConflict=function(){return d.fn[f]=j,p._jQueryInterface},p}(jQuery)}}(jQuery); \ No newline at end of file diff --git a/dist/js/npm.js b/dist/js/npm.js index bf6aa8060..d0564681c 100644 --- a/dist/js/npm.js +++ b/dist/js/npm.js @@ -1,13 +1,12 @@ // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. -require('../../js/transition.js') -require('../../js/alert.js') -require('../../js/button.js') -require('../../js/carousel.js') -require('../../js/collapse.js') -require('../../js/dropdown.js') -require('../../js/modal.js') -require('../../js/tooltip.js') -require('../../js/popover.js') -require('../../js/scrollspy.js') -require('../../js/tab.js') -require('../../js/affix.js') \ No newline at end of file +require('./umd/util.js') +require('./umd/alert.js') +require('./umd/button.js') +require('./umd/carousel.js') +require('./umd/collapse.js') +require('./umd/dropdown.js') +require('./umd/modal.js') +require('./umd/scrollspy.js') +require('./umd/tab.js') +require('./umd/tooltip.js') +require('./umd/popover.js') \ No newline at end of file diff --git a/dist/js/umd/alert.js b/dist/js/umd/alert.js new file mode 100644 index 000000000..eae17ceb6 --- /dev/null +++ b/dist/js/umd/alert.js @@ -0,0 +1,211 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.alert = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): alert.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Alert = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'alert'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.alert'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var Selector = { + DISMISS: '[data-dismiss="alert"]' + }; + + var Event = { + CLOSE: 'close' + EVENT_KEY, + CLOSED: 'closed' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + ALERT: 'alert', + FADE: 'fade', + IN: 'in' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Alert = (function () { + function Alert(element) { + _classCallCheck(this, Alert); + + this._element = element; + } + + _createClass(Alert, [{ + key: 'close', + + // public + + value: function close(element) { + element = element || this._element; + + var rootElement = this._getRootElement(element); + var customEvent = this._triggerCloseEvent(rootElement); + + if (customEvent.isDefaultPrevented()) { + return; + } + + this._removeElement(rootElement); + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; + } + }, { + key: '_getRootElement', + + // private + + value: function _getRootElement(element) { + var parent = false; + var selector = _Util.getSelectorFromElement(element); + + if (selector) { + parent = $(selector)[0]; + } + + if (!parent) { + parent = $(element).closest('.' + ClassName.ALERT)[0]; + } + + return parent; + } + }, { + key: '_triggerCloseEvent', + value: function _triggerCloseEvent(element) { + var closeEvent = $.Event(Event.CLOSE); + $(element).trigger(closeEvent); + return closeEvent; + } + }, { + key: '_removeElement', + value: function _removeElement(element) { + $(element).removeClass(ClassName.IN); + + if (!_Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element); + return; + } + + $(element).one(_Util.TRANSITION_END, this._destroyElement.bind(this, element)).emulateTransitionEnd(TRANSITION_DURATION); + } + }, { + key: '_destroyElement', + value: function _destroyElement(element) { + $(element).detach().trigger(Event.CLOSED).remove(); + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var $element = $(this); + var data = $element.data(DATA_KEY); + + if (!data) { + data = new Alert(this); + $element.data(DATA_KEY, data); + } + + if (config === 'close') { + data[config](this); + } + }); + } + }, { + key: '_handleDismiss', + value: function _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault(); + } + + alertInstance.close(this); + }; + } + }]); + + return Alert; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Alert._jQueryInterface; + $.fn[NAME].Constructor = Alert; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Alert._jQueryInterface; + }; + + return Alert; + })(jQuery); + + module.exports = Alert; +}); \ No newline at end of file diff --git a/dist/js/umd/button.js b/dist/js/umd/button.js new file mode 100644 index 000000000..730b3ef01 --- /dev/null +++ b/dist/js/umd/button.js @@ -0,0 +1,189 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod); + global.button = mod.exports; + } +})(this, function (exports, module) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): button.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Button = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'button'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.button'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var ClassName = { + ACTIVE: 'active', + BUTTON: 'btn', + FOCUS: 'focus' + }; + + var Selector = { + DATA_TOGGLE_CARROT: '[data-toggle^="button"]', + DATA_TOGGLE: '[data-toggle="buttons"]', + INPUT: 'input', + ACTIVE: '.active', + BUTTON: '.btn' + }; + + var Event = { + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY, + FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + '' + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + '' + DATA_API_KEY) + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Button = (function () { + function Button(element) { + _classCallCheck(this, Button); + + this._element = element; + } + + _createClass(Button, [{ + key: 'toggle', + + // public + + value: function toggle() { + var triggerChangeEvent = true; + var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; + + if (rootElement) { + var input = $(this._element).find(Selector.INPUT)[0]; + + if (input) { + if (input.type === 'radio') { + if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { + triggerChangeEvent = false; + } else { + var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; + + if (activeElement) { + $(activeElement).removeClass(ClassName.ACTIVE); + } + } + } + + if (triggerChangeEvent) { + input.checked = !$(this._element).hasClass(ClassName.ACTIVE); + $(this._element).trigger('change'); + } + } + } else { + this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); + } + + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName.ACTIVE); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + + if (!data) { + data = new Button(this); + $(this).data(DATA_KEY, data); + } + + if (config === 'toggle') { + data[config](); + } + }); + } + }]); + + return Button; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + event.preventDefault(); + + var button = event.target; + + if (!$(button).hasClass(ClassName.BUTTON)) { + button = $(button).closest(Selector.BUTTON); + } + + Button._jQueryInterface.call($(button), 'toggle'); + }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + var button = $(event.target).closest(Selector.BUTTON)[0]; + $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Button._jQueryInterface; + $.fn[NAME].Constructor = Button; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Button._jQueryInterface; + }; + + return Button; + })(jQuery); + + module.exports = Button; +}); \ No newline at end of file diff --git a/dist/js/umd/carousel.js b/dist/js/umd/carousel.js new file mode 100644 index 000000000..1352a5dc2 --- /dev/null +++ b/dist/js/umd/carousel.js @@ -0,0 +1,485 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.carousel = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Carousel = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'carousel'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.carousel'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; + + var Default = { + interval: 5000, + keyboard: true, + slide: false, + pause: 'hover', + wrap: true + }; + + var DefaultType = { + interval: '(number|boolean)', + keyboard: 'boolean', + slide: '(boolean|string)', + pause: '(string|boolean)', + wrap: 'boolean' + }; + + var Direction = { + NEXT: 'next', + PREVIOUS: 'prev' + }; + + var Event = { + SLIDE: 'slide' + EVENT_KEY, + SLID: 'slid' + EVENT_KEY, + KEYDOWN: 'keydown' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY, + LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + CAROUSEL: 'carousel', + ACTIVE: 'active', + SLIDE: 'slide', + RIGHT: 'right', + LEFT: 'left', + ITEM: 'carousel-item' + }; + + var Selector = { + ACTIVE: '.active', + ACTIVE_ITEM: '.active.carousel-item', + ITEM: '.carousel-item', + NEXT_PREV: '.next, .prev', + INDICATORS: '.carousel-indicators', + DATA_SLIDE: '[data-slide], [data-slide-to]', + DATA_RIDE: '[data-ride="carousel"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Carousel = (function () { + function Carousel(element, config) { + _classCallCheck(this, Carousel); + + this._items = null; + this._interval = null; + this._activeElement = null; + + this._isPaused = false; + this._isSliding = false; + + this._config = this._getConfig(config); + this._element = $(element)[0]; + this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; + + this._addEventListeners(); + } + + _createClass(Carousel, [{ + key: 'next', + + // public + + value: function next() { + if (!this._isSliding) { + this._slide(Direction.NEXT); + } + } + }, { + key: 'prev', + value: function prev() { + if (!this._isSliding) { + this._slide(Direction.PREVIOUS); + } + } + }, { + key: 'pause', + value: function pause(event) { + if (!event) { + this._isPaused = true; + } + + if ($(this._element).find(Selector.NEXT_PREV)[0] && _Util.supportsTransitionEnd()) { + _Util.triggerTransitionEnd(this._element); + this.cycle(true); + } + + clearInterval(this._interval); + this._interval = null; + } + }, { + key: 'cycle', + value: function cycle(event) { + if (!event) { + this._isPaused = false; + } + + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } + + if (this._config.interval && !this._isPaused) { + this._interval = setInterval($.proxy(this.next, this), this._config.interval); + } + } + }, { + key: 'to', + value: function to(index) { + var _this = this; + + this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + + var activeIndex = this._getItemIndex(this._activeElement); + + if (index > this._items.length - 1 || index < 0) { + return; + } + + if (this._isSliding) { + $(this._element).one(Event.SLID, function () { + return _this.to(index); + }); + return; + } + + if (activeIndex == index) { + this.pause(); + this.cycle(); + return; + } + + var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; + + this._slide(direction, this._items[index]); + } + }, { + key: 'dispose', + value: function dispose() { + $(this._element).off(EVENT_KEY); + $.removeData(this._element, DATA_KEY); + + this._items = null; + this._config = null; + this._element = null; + this._interval = null; + this._isPaused = null; + this._isSliding = null; + this._activeElement = null; + this._indicatorsElement = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + _Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_addEventListeners', + value: function _addEventListeners() { + if (this._config.keyboard) { + $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this)); + } + + if (this._config.pause == 'hover' && !('ontouchstart' in document.documentElement)) { + $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this)); + } + } + }, { + key: '_keydown', + value: function _keydown(event) { + event.preventDefault(); + + if (/input|textarea/i.test(event.target.tagName)) return; + + switch (event.which) { + case 37: + this.prev();break; + case 39: + this.next();break; + default: + return; + } + } + }, { + key: '_getItemIndex', + value: function _getItemIndex(element) { + this._items = $.makeArray($(element).parent().find(Selector.ITEM)); + return this._items.indexOf(element); + } + }, { + key: '_getItemByDirection', + value: function _getItemByDirection(direction, activeElement) { + var isNextDirection = direction === Direction.NEXT; + var isPrevDirection = direction === Direction.PREVIOUS; + var activeIndex = this._getItemIndex(activeElement); + var lastItemIndex = this._items.length - 1; + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex == lastItemIndex; + + if (isGoingToWrap && !this._config.wrap) { + return activeElement; + } + + var delta = direction == Direction.PREVIOUS ? -1 : 1; + var itemIndex = (activeIndex + delta) % this._items.length; + + return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; + } + }, { + key: '_triggerSlideEvent', + value: function _triggerSlideEvent(relatedTarget, directionalClassname) { + var slideEvent = $.Event(Event.SLIDE, { + relatedTarget: relatedTarget, + direction: directionalClassname + }); + + $(this._element).trigger(slideEvent); + + return slideEvent; + } + }, { + key: '_setActiveIndicatorElement', + value: function _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); + + var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; + + if (nextIndicator) { + $(nextIndicator).addClass(ClassName.ACTIVE); + } + } + } + }, { + key: '_slide', + value: function _slide(direction, element) { + var _this2 = this; + + var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); + + var isCycling = !!this._interval; + + var directionalClassName = direction == Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; + + if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { + this._isSliding = false; + return; + } + + var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); + if (slideEvent.isDefaultPrevented()) { + return; + } + + if (!activeElement || !nextElement) { + // some weirdness is happening, so we bail + return; + } + + this._isSliding = true; + + if (isCycling) { + this.pause(); + } + + this._setActiveIndicatorElement(nextElement); + + var slidEvent = $.Event(Event.SLID, { + relatedTarget: nextElement, + direction: directionalClassName + }); + + if (_Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { + + $(nextElement).addClass(direction); + + _Util.reflow(nextElement); + + $(activeElement).addClass(directionalClassName); + $(nextElement).addClass(directionalClassName); + + $(activeElement).one(_Util.TRANSITION_END, function () { + $(nextElement).removeClass(directionalClassName).removeClass(direction); + + $(nextElement).addClass(ClassName.ACTIVE); + + $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); + + _this2._isSliding = false; + + setTimeout(function () { + return $(_this2._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(TRANSITION_DURATION); + } else { + $(activeElement).removeClass(ClassName.ACTIVE); + $(nextElement).addClass(ClassName.ACTIVE); + + this._isSliding = false; + $(this._element).trigger(slidEvent); + } + + if (isCycling) { + this.cycle(); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Default, $(this).data()); + + if (typeof config === 'object') { + $.extend(_config, config); + } + + var action = typeof config === 'string' ? config : _config.slide; + + if (!data) { + data = new Carousel(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config == 'number') { + data.to(config); + } else if (action) { + data[action](); + } else if (_config.interval) { + data.pause(); + data.cycle(); + } + }); + } + }, { + key: '_dataApiClickHandler', + value: function _dataApiClickHandler(event) { + var selector = _Util.getSelectorFromElement(this); + + if (!selector) { + return; + } + + var target = $(selector)[0]; + + if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { + return; + } + + var config = $.extend({}, $(target).data(), $(this).data()); + + var slideIndex = this.getAttribute('data-slide-to'); + if (slideIndex) { + config.interval = false; + } + + Carousel._jQueryInterface.call($(target), config); + + if (slideIndex) { + $(target).data(DATA_KEY).to(slideIndex); + } + + event.preventDefault(); + } + }]); + + return Carousel; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); + + $(window).on(Event.LOAD_DATA_API, function () { + $(Selector.DATA_RIDE).each(function () { + var $carousel = $(this); + Carousel._jQueryInterface.call($carousel, $carousel.data()); + }); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Carousel._jQueryInterface; + $.fn[NAME].Constructor = Carousel; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Carousel._jQueryInterface; + }; + + return Carousel; + })(jQuery); + + module.exports = Carousel; +}); \ No newline at end of file diff --git a/dist/js/umd/collapse.js b/dist/js/umd/collapse.js new file mode 100644 index 000000000..35c29c984 --- /dev/null +++ b/dist/js/umd/collapse.js @@ -0,0 +1,380 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.collapse = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): collapse.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Collapse = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'collapse'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.collapse'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; + + var Default = { + toggle: true, + parent: '' + }; + + var DefaultType = { + toggle: 'boolean', + parent: 'string' + }; + + var Event = { + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + IN: 'in', + COLLAPSE: 'collapse', + COLLAPSING: 'collapsing', + COLLAPSED: 'collapsed' + }; + + var Dimension = { + WIDTH: 'width', + HEIGHT: 'height' + }; + + var Selector = { + ACTIVES: '.panel > .in, .panel > .collapsing', + DATA_TOGGLE: '[data-toggle="collapse"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Collapse = (function () { + function Collapse(element, config) { + _classCallCheck(this, Collapse); + + this._isTransitioning = false; + this._element = element; + this._config = this._getConfig(config); + this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]'))); + + this._parent = this._config.parent ? this._getParent() : null; + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray); + } + + if (this._config.toggle) { + this.toggle(); + } + } + + _createClass(Collapse, [{ + key: 'toggle', + + // public + + value: function toggle() { + if ($(this._element).hasClass(ClassName.IN)) { + this.hide(); + } else { + this.show(); + } + } + }, { + key: 'show', + value: function show() { + var _this = this; + + if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { + return; + } + + var actives = undefined; + var activesData = undefined; + + if (this._parent) { + actives = $.makeArray($(Selector.ACTIVES)); + if (!actives.length) { + actives = null; + } + } + + if (actives) { + activesData = $(actives).data(DATA_KEY); + if (activesData && activesData._isTransitioning) { + return; + } + } + + var startEvent = $.Event(Event.SHOW); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } + + if (actives) { + Collapse._jQueryInterface.call($(actives), 'hide'); + if (!activesData) { + $(actives).data(DATA_KEY, null); + } + } + + var dimension = this._getDimension(); + + $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); + + this._element.style[dimension] = 0; + this._element.setAttribute('aria-expanded', true); + + if (this._triggerArray.length) { + $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); + } + + this.setTransitioning(true); + + var complete = function complete() { + $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); + + _this._element.style[dimension] = ''; + + _this.setTransitioning(false); + + $(_this._element).trigger(Event.SHOWN); + }; + + if (!_Util.supportsTransitionEnd()) { + complete(); + return; + } + + var scrollSize = 'scroll' + (dimension[0].toUpperCase() + dimension.slice(1)); + + $(this._element).one(_Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + + this._element.style[dimension] = this._element[scrollSize] + 'px'; + } + }, { + key: 'hide', + value: function hide() { + var _this2 = this; + + if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { + return; + } + + var startEvent = $.Event(Event.HIDE); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } + + var dimension = this._getDimension(); + var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; + + this._element.style[dimension] = this._element[offsetDimension] + 'px'; + + _Util.reflow(this._element); + + $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); + + this._element.setAttribute('aria-expanded', false); + + if (this._triggerArray.length) { + $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); + } + + this.setTransitioning(true); + + var complete = function complete() { + _this2.setTransitioning(false); + $(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); + }; + + this._element.style[dimension] = 0; + + if (!_Util.supportsTransitionEnd()) { + return complete(); + } + + $(this._element).one(_Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } + }, { + key: 'setTransitioning', + value: function setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning; + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + + this._config = null; + this._parent = null; + this._element = null; + this._triggerArray = null; + this._isTransitioning = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + config.toggle = !!config.toggle; // coerce string values + _Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_getDimension', + value: function _getDimension() { + var hasWidth = $(this._element).hasClass(Dimension.WIDTH); + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; + } + }, { + key: '_getParent', + value: function _getParent() { + var _this3 = this; + + var parent = $(this._config.parent)[0]; + var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; + + $(parent).find(selector).each(function (i, element) { + _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); + }); + + return parent; + } + }, { + key: '_addAriaAndCollapsedClass', + value: function _addAriaAndCollapsedClass(element, triggerArray) { + if (element) { + var isOpen = $(element).hasClass(ClassName.IN); + element.setAttribute('aria-expanded', isOpen); + + if (triggerArray.length) { + $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + } + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_getTargetFromElement', + + // static + + value: function _getTargetFromElement(element) { + var selector = _Util.getSelectorFromElement(element); + return selector ? $(selector)[0] : null; + } + }, { + key: '_jQueryInterface', + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config); + + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false; + } + + if (!data) { + data = new Collapse(this, _config); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Collapse; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + + var target = Collapse._getTargetFromElement(this); + + var data = $(target).data(DATA_KEY); + var config = data ? 'toggle' : $(this).data(); + + Collapse._jQueryInterface.call($(target), config); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Collapse._jQueryInterface; + $.fn[NAME].Constructor = Collapse; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Collapse._jQueryInterface; + }; + + return Collapse; + })(jQuery); + + module.exports = Collapse; +}); \ No newline at end of file diff --git a/dist/js/umd/dropdown.js b/dist/js/umd/dropdown.js new file mode 100644 index 000000000..86ac7500d --- /dev/null +++ b/dist/js/umd/dropdown.js @@ -0,0 +1,300 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.dropdown = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): dropdown.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Dropdown = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'dropdown'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.dropdown'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY, + KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + BACKDROP: 'dropdown-backdrop', + DISABLED: 'disabled', + OPEN: 'open' + }; + + var Selector = { + BACKDROP: '.dropdown-backdrop', + DATA_TOGGLE: '[data-toggle="dropdown"]', + FORM_CHILD: '.dropdown form', + ROLE_MENU: '[role="menu"]', + ROLE_LISTBOX: '[role="listbox"]', + NAVBAR_NAV: '.navbar-nav', + VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Dropdown = (function () { + function Dropdown(element) { + _classCallCheck(this, Dropdown); + + this._element = element; + + this._addEventListeners(); + } + + _createClass(Dropdown, [{ + key: 'toggle', + + // public + + value: function toggle() { + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); + + Dropdown._clearMenus(); + + if (isActive) { + return false; + } + + if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { + + // if mobile we use a backdrop because click events don't delegate + var dropdown = document.createElement('div'); + dropdown.className = ClassName.BACKDROP; + $(dropdown).insertBefore(this); + $(dropdown).on('click', Dropdown._clearMenus); + } + + var relatedTarget = { relatedTarget: this }; + var showEvent = $.Event(Event.SHOW, relatedTarget); + + $(parent).trigger(showEvent); + + if (showEvent.isDefaultPrevented()) { + return; + } + + this.focus(); + this.setAttribute('aria-expanded', 'true'); + + $(parent).toggleClass(ClassName.OPEN); + $(parent).trigger(Event.SHOWN, relatedTarget); + + return false; + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + $(this._element).off(EVENT_KEY); + this._element = null; + } + }, { + key: '_addEventListeners', + + // private + + value: function _addEventListeners() { + $(this._element).on(Event.CLICK, this.toggle); + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + + if (!data) { + $(this).data(DATA_KEY, data = new Dropdown(this)); + } + + if (typeof config === 'string') { + data[config].call(this); + } + }); + } + }, { + key: '_clearMenus', + value: function _clearMenus(event) { + if (event && event.which === 3) { + return; + } + + var backdrop = $(Selector.BACKDROP)[0]; + if (backdrop) { + backdrop.parentNode.removeChild(backdrop); + } + + var toggles = $.makeArray($(Selector.DATA_TOGGLE)); + + for (var i = 0; i < toggles.length; i++) { + var _parent = Dropdown._getParentFromElement(toggles[i]); + var relatedTarget = { relatedTarget: toggles[i] }; + + if (!$(_parent).hasClass(ClassName.OPEN)) { + continue; + } + + if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) { + continue; + } + + var hideEvent = $.Event(Event.HIDE, relatedTarget); + $(_parent).trigger(hideEvent); + if (hideEvent.isDefaultPrevented()) { + continue; + } + + toggles[i].setAttribute('aria-expanded', 'false'); + + $(_parent).removeClass(ClassName.OPEN).trigger(Event.HIDDEN, relatedTarget); + } + } + }, { + key: '_getParentFromElement', + value: function _getParentFromElement(element) { + var parent = undefined; + var selector = _Util.getSelectorFromElement(element); + + if (selector) { + parent = $(selector)[0]; + } + + return parent || element.parentNode; + } + }, { + key: '_dataApiKeydownHandler', + value: function _dataApiKeydownHandler(event) { + if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { + return; + } + + event.preventDefault(); + event.stopPropagation(); + + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); + + if (!isActive && event.which !== 27 || isActive && event.which === 27) { + + if (event.which === 27) { + var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; + $(toggle).trigger('focus'); + } + + $(this).trigger('click'); + return; + } + + var items = $.makeArray($(Selector.VISIBLE_ITEMS)); + + items = items.filter(function (item) { + return item.offsetWidth || item.offsetHeight; + }); + + if (!items.length) { + return; + } + + var index = items.indexOf(event.target); + + if (event.which === 38 && index > 0) index--; // up + if (event.which === 40 && index < items.length - 1) index++; // down + if (! ~index) index = 0; + + items[index].focus(); + } + }]); + + return Dropdown; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { + e.stopPropagation(); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Dropdown._jQueryInterface; + $.fn[NAME].Constructor = Dropdown; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Dropdown._jQueryInterface; + }; + + return Dropdown; + })(jQuery); + + module.exports = Dropdown; +}); \ No newline at end of file diff --git a/dist/js/umd/modal.js b/dist/js/umd/modal.js new file mode 100644 index 000000000..7d4196957 --- /dev/null +++ b/dist/js/umd/modal.js @@ -0,0 +1,548 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.modal = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Modal = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'modal'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.modal'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 300; + var BACKDROP_TRANSITION_DURATION = 150; + + var Default = { + backdrop: true, + keyboard: true, + focus: true, + show: true + }; + + var DefaultType = { + backdrop: '(boolean|string)', + keyboard: 'boolean', + focus: 'boolean', + show: 'boolean' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + RESIZE: 'resize' + EVENT_KEY, + CLICK_DISMISS: 'click.dismiss' + EVENT_KEY, + KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY, + MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY, + MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + BACKDROP: 'modal-backdrop', + OPEN: 'modal-open', + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + DIALOG: '.modal-dialog', + DATA_TOGGLE: '[data-toggle="modal"]', + DATA_DISMISS: '[data-dismiss="modal"]', + SCROLLBAR_MEASURER: 'modal-scrollbar-measure' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Modal = (function () { + function Modal(element, config) { + _classCallCheck(this, Modal); + + this._config = this._getConfig(config); + this._element = element; + this._dialog = $(element).find(Selector.DIALOG)[0]; + this._backdrop = null; + this._isShown = false; + this._isBodyOverflowing = false; + this._ignoreBackdropClick = false; + this._originalBodyPadding = 0; + this._scrollbarWidth = 0; + } + + _createClass(Modal, [{ + key: 'toggle', + + // public + + value: function toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget); + } + }, { + key: 'show', + value: function show(relatedTarget) { + var _this = this; + + var showEvent = $.Event(Event.SHOW, { + relatedTarget: relatedTarget + }); + + $(this._element).trigger(showEvent); + + if (this._isShown || showEvent.isDefaultPrevented()) { + return; + } + + this._isShown = true; + + this._checkScrollbar(); + this._setScrollbar(); + + $(document.body).addClass(ClassName.OPEN); + + this._setEscapeEvent(); + this._setResizeEvent(); + + $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); + + $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { + $(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { + if ($(event.target).is(_this._element)) { + that._ignoreBackdropClick = true; + } + }); + }); + + this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); + } + }, { + key: 'hide', + value: function hide(event) { + if (event) { + event.preventDefault(); + } + + var hideEvent = $.Event(Event.HIDE); + + $(this._element).trigger(hideEvent); + + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return; + } + + this._isShown = false; + + this._setEscapeEvent(); + this._setResizeEvent(); + + $(document).off(Event.FOCUSIN); + + $(this._element).removeClass(ClassName.IN); + + $(this._element).off(Event.CLICK_DISMISS); + $(this._dialog).off(Event.MOUSEDOWN_DISMISS); + + if (_Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + + $(this._element).one(_Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); + } else { + this._hideModal(); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + + $(window).off(EVENT_KEY); + $(document).off(EVENT_KEY); + $(this._element).off(EVENT_KEY); + $(this._backdrop).off(EVENT_KEY); + + this._config = null; + this._element = null; + this._dialog = null; + this._backdrop = null; + this._isShown = null; + this._isBodyOverflowing = null; + this._ignoreBackdropClick = null; + this._originalBodyPadding = null; + this._scrollbarWidth = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + _Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_showElement', + value: function _showElement(relatedTarget) { + var _this2 = this; + + var transition = _Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); + + if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // don't move modals dom position + document.body.appendChild(this._element); + } + + this._element.style.display = 'block'; + this._element.scrollTop = 0; + + if (transition) { + _Util.reflow(this._element); + } + + $(this._element).addClass(ClassName.IN); + + if (this._config.focus) this._enforceFocus(); + + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: relatedTarget + }); + + var transitionComplete = function transitionComplete() { + if (_this2._config.focus) _this2._element.focus(); + $(_this2._element).trigger(shownEvent); + }; + + if (transition) { + $(this._dialog).one(_Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + transitionComplete(); + } + } + }, { + key: '_enforceFocus', + value: function _enforceFocus() { + var _this3 = this; + + $(document).off(Event.FOCUSIN) // guard against infinite focus loop + .on(Event.FOCUSIN, function (event) { + if (_this3._element !== event.target && !$(_this3._element).has(event.target).length) { + _this3._element.focus(); + } + }); + } + }, { + key: '_setEscapeEvent', + value: function _setEscapeEvent() { + var _this4 = this; + + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { + if (event.which === 27) { + _this4.hide(); + } + }); + } else if (!this._isShown) { + $(this._element).off(Event.KEYDOWN_DISMISS); + } + } + }, { + key: '_setResizeEvent', + value: function _setResizeEvent() { + if (this._isShown) { + $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); + } else { + $(window).off(Event.RESIZE); + } + } + }, { + key: '_hideModal', + value: function _hideModal() { + var _this5 = this; + + this._element.style.display = 'none'; + this._showBackdrop(function () { + $(document.body).removeClass(ClassName.OPEN); + _this5._resetAdjustments(); + _this5._resetScrollbar(); + $(_this5._element).trigger(Event.HIDDEN); + }); + } + }, { + key: '_removeBackdrop', + value: function _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove(); + this._backdrop = null; + } + } + }, { + key: '_showBackdrop', + value: function _showBackdrop(callback) { + var _this6 = this; + + var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; + + if (this._isShown && this._config.backdrop) { + var doAnimate = _Util.supportsTransitionEnd() && animate; + + this._backdrop = document.createElement('div'); + this._backdrop.className = ClassName.BACKDROP; + + if (animate) { + $(this._backdrop).addClass(animate); + } + + $(this._backdrop).appendTo(this.$body); + + $(this._element).on(Event.CLICK_DISMISS, function (event) { + if (_this6._ignoreBackdropClick) { + _this6._ignoreBackdropClick = false; + return; + } + if (event.target !== event.currentTarget) { + return; + } + if (_this6._config.backdrop === 'static') { + _this6._element.focus(); + } else { + _this6.hide(); + } + }); + + if (doAnimate) { + _Util.reflow(this._backdrop); + } + + $(this._backdrop).addClass(ClassName.IN); + + if (!callback) { + return; + } + + if (!doAnimate) { + callback(); + return; + } + + $(this._backdrop).one(_Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName.IN); + + var callbackRemove = function callbackRemove() { + _this6._removeBackdrop(); + if (callback) { + callback(); + } + }; + + if (_Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + $(this._backdrop).one(_Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else { + callbackRemove(); + } + } else if (callback) { + callback(); + } + } + }, { + key: '_handleUpdate', + + // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + + value: function _handleUpdate() { + this._adjustDialog(); + } + }, { + key: '_adjustDialog', + value: function _adjustDialog() { + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + 'px'; + } + + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + 'px'; + } + } + }, { + key: '_resetAdjustments', + value: function _resetAdjustments() { + this._element.style.paddingLeft = ''; + this._element.style.paddingRight = ''; + } + }, { + key: '_checkScrollbar', + value: function _checkScrollbar() { + var fullWindowWidth = window.innerWidth; + if (!fullWindowWidth) { + // workaround for missing window.innerWidth in IE8 + var documentElementRect = document.documentElement.getBoundingClientRect(); + fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left); + } + this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth; + this._scrollbarWidth = this._getScrollbarWidth(); + } + }, { + key: '_setScrollbar', + value: function _setScrollbar() { + var bodyPadding = parseInt($(document.body).css('padding-right') || 0, 10); + + this._originalBodyPadding = document.body.style.paddingRight || ''; + + if (this._isBodyOverflowing) { + document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; + } + } + }, { + key: '_resetScrollbar', + value: function _resetScrollbar() { + document.body.style.paddingRight = this._originalBodyPadding; + } + }, { + key: '_getScrollbarWidth', + value: function _getScrollbarWidth() { + // thx d.walsh + var scrollDiv = document.createElement('div'); + scrollDiv.className = Selector.SCROLLBAR_MEASURER; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config, relatedTarget) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config); + + if (!data) { + data = new Modal(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](relatedTarget); + } else if (_config.show) { + data.show(relatedTarget); + } + }); + } + }]); + + return Modal; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + var _this7 = this; + + var target = undefined; + var selector = _Util.getSelectorFromElement(this); + + if (selector) { + target = $(selector)[0]; + } + + var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data()); + + if (this.tagName === 'A') { + event.preventDefault(); + } + + var $target = $(target).one(Event.SHOW, function (showEvent) { + if (showEvent.isDefaultPrevented()) { + // only register focus restorer if modal will actually get shown + return; + } + + $target.one(Event.HIDDEN, function () { + if ($(_this7).is(':visible')) { + _this7.focus(); + } + }); + }); + + Modal._jQueryInterface.call($(target), config, this); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Modal._jQueryInterface; + $.fn[NAME].Constructor = Modal; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Modal._jQueryInterface; + }; + + return Modal; + })(jQuery); + + module.exports = Modal; +}); \ No newline at end of file diff --git a/dist/js/umd/popover.js b/dist/js/umd/popover.js new file mode 100644 index 000000000..8be0b8056 --- /dev/null +++ b/dist/js/umd/popover.js @@ -0,0 +1,223 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './tooltip'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./tooltip')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Tooltip); + global.popover = mod.exports; + } +})(this, function (exports, module, _tooltip) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } + + var _Tooltip2 = _interopRequire(_tooltip); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): popover.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Popover = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'popover'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.popover'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Default = $.extend({}, _Tooltip2.Default, { + placement: 'right', + trigger: 'click', + content: '', + template: '' + }); + + var DefaultType = $.extend({}, _Tooltip2.DefaultType, { + content: '(string|function)' + }); + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TITLE: '.popover-title', + CONTENT: '.popover-content', + ARROW: '.popover-arrow' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + INSERTED: 'inserted' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + FOCUSOUT: 'focusout' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Popover = (function (_Tooltip) { + function Popover() { + _classCallCheck(this, Popover); + + if (_Tooltip != null) { + _Tooltip.apply(this, arguments); + } + } + + _inherits(Popover, _Tooltip); + + _createClass(Popover, [{ + key: 'isWithContent', + + // overrides + + value: function isWithContent() { + return this.getTitle() || this._getContent(); + } + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; + } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var content = this._getContent(); + var titleElement = $(tip).find(Selector.TITLE)[0]; + + if (titleElement) { + titleElement[this.config.html ? 'innerHTML' : 'innerText'] = title; + } + + // we use append for html objects to maintain js events + $(tip).find(Selector.CONTENT).children().detach().end()[this.config.html ? typeof content === 'string' ? 'html' : 'append' : 'text'](content); + + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); + + this.cleanupTether(); + } + }, { + key: '_getContent', + + // private + + value: function _getContent() { + return this.element.getAttribute('data-content') || (typeof this.config.content == 'function' ? this.config.content.call(this.element) : this.config.content); + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: 'EVENT_KEY', + get: function () { + return EVENT_KEY; + } + }, { + key: 'DefaultType', + get: function () { + return DefaultType; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; + + if (!data && /destroy|hide/.test(config)) { + return; + } + + if (!data) { + data = new Popover(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Popover; + })(_Tooltip2); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Popover._jQueryInterface; + $.fn[NAME].Constructor = Popover; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Popover._jQueryInterface; + }; + + return Popover; + })(jQuery); + + module.exports = Popover; +}); \ No newline at end of file diff --git a/dist/js/umd/scrollspy.js b/dist/js/umd/scrollspy.js new file mode 100644 index 000000000..feb77672c --- /dev/null +++ b/dist/js/umd/scrollspy.js @@ -0,0 +1,334 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.scrollspy = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): scrollspy.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var ScrollSpy = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'scrollspy'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.scrollspy'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Default = { + offset: 10, + method: 'auto', + target: '' + }; + + var DefaultType = { + offset: 'number', + method: 'string', + target: '(string|element)' + }; + + var Event = { + ACTIVATE: 'activate' + EVENT_KEY, + SCROLL: 'scroll' + EVENT_KEY, + LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active' + }; + + var Selector = { + DATA_SPY: '[data-spy="scroll"]', + ACTIVE: '.active', + LI: 'li', + LI_DROPDOWN: 'li.dropdown', + NAV_ANCHORS: '.nav li > a' + }; + + var OffsetMethod = { + OFFSET: 'offset', + POSITION: 'position' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var ScrollSpy = (function () { + function ScrollSpy(element, config) { + _classCallCheck(this, ScrollSpy); + + this._element = element; + this._scrollElement = element.tagName === 'BODY' ? window : element; + this._config = this._getConfig(config); + this._selector = '' + this._config.target + ' ' + Selector.NAV_ANCHORS; + this._offsets = []; + this._targets = []; + this._activeTarget = null; + this._scrollHeight = 0; + + $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)); + + this.refresh(); + this._process(); + } + + _createClass(ScrollSpy, [{ + key: 'refresh', + + // public + + value: function refresh() { + var _this = this; + + var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; + + var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; + + var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; + + this._offsets = []; + this._targets = []; + + this._scrollHeight = this._getScrollHeight(); + + var targets = $.makeArray($(this._selector)); + + targets.map(function (element) { + var target = undefined; + var targetSelector = _Util.getSelectorFromElement(element); + + if (targetSelector) { + target = $(targetSelector)[0]; + } + + if (target && (target.offsetWidth || target.offsetHeight)) { + // todo (fat): remove sketch reliance on jQuery position/offset + return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; + } + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this._offsets.push(item[0]); + _this._targets.push(item[1]); + }); + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + $(this._scrollElement).off(EVENT_KEY); + + this._element = null; + this._scrollElement = null; + this._config = null; + this._selector = null; + this._offsets = null; + this._targets = null; + this._activeTarget = null; + this._scrollHeight = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + + if (typeof config.target !== 'string') { + var id = $(config.target).attr('id'); + if (!id) { + id = _Util.getUID(NAME); + $(config.target).attr('id', id); + } + config.target = '#' + id; + } + + _Util.typeCheckConfig(NAME, config, DefaultType); + + return config; + } + }, { + key: '_getScrollTop', + value: function _getScrollTop() { + return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; + } + }, { + key: '_getScrollHeight', + value: function _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); + } + }, { + key: '_process', + value: function _process() { + var scrollTop = this._getScrollTop() + this._config.offset; + var scrollHeight = this._getScrollHeight(); + var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; + + if (this._scrollHeight !== scrollHeight) { + this.refresh(); + } + + if (scrollTop >= maxScroll) { + var target = this._targets[this._targets.length - 1]; + + if (this._activeTarget !== target) { + this._activate(target); + } + } + + if (this._activeTarget && scrollTop < this._offsets[0]) { + this._activeTarget = null; + this._clear(); + return; + } + + for (var i = this._offsets.length; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); + + if (isActiveTarget) { + this._activate(this._targets[i]); + } + } + } + }, { + key: '_activate', + value: function _activate(target) { + this._activeTarget = target; + + this._clear(); + + var selector = '' + this._selector + '[data-target="' + target + '"],' + ('' + this._selector + '[href="' + target + '"]'); + + // todo (fat): getting all the raw li's up the tree is not great. + var parentListItems = $(selector).parents(Selector.LI); + + for (var i = parentListItems.length; i--;) { + $(parentListItems[i]).addClass(ClassName.ACTIVE); + + var itemParent = parentListItems[i].parentNode; + + if (itemParent && $(itemParent).hasClass(ClassName.DROPDOWN_MENU)) { + var closestDropdown = $(itemParent).closest(Selector.LI_DROPDOWN)[0]; + $(closestDropdown).addClass(ClassName.ACTIVE); + } + } + + $(this._scrollElement).trigger(Event.ACTIVATE, { + relatedTarget: target + }); + } + }, { + key: '_clear', + value: function _clear() { + var activeParents = $(this._selector).parentsUntil(this._config.target, Selector.ACTIVE); + + for (var i = activeParents.length; i--;) { + $(activeParents[i]).removeClass(ClassName.ACTIVE); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' && config || null; + + if (!data) { + data = new ScrollSpy(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return ScrollSpy; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(window).on(Event.LOAD_DATA_API, function () { + var scrollSpys = $.makeArray($(Selector.DATA_SPY)); + + for (var i = scrollSpys.length; i--;) { + var $spy = $(scrollSpys[i]); + ScrollSpy._jQueryInterface.call($spy, $spy.data()); + } + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = ScrollSpy._jQueryInterface; + $.fn[NAME].Constructor = ScrollSpy; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return ScrollSpy._jQueryInterface; + }; + + return ScrollSpy; + })(jQuery); + + module.exports = ScrollSpy; +}); \ No newline at end of file diff --git a/dist/js/umd/tab.js b/dist/js/umd/tab.js new file mode 100644 index 000000000..3fbf4869c --- /dev/null +++ b/dist/js/umd/tab.js @@ -0,0 +1,292 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.tab = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tab.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Tab = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'tab'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tab'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active', + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + A: 'a', + LI: 'li', + LI_DROPDOWN: 'li.dropdown', + UL: 'ul:not(.dropdown-menu)', + FADE_CHILD: '> .fade', + ACTIVE: '.active', + ACTIVE_CHILD: '> .active', + DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]', + DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu > .active' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tab = (function () { + function Tab(element) { + _classCallCheck(this, Tab); + + this._element = element; + } + + _createClass(Tab, [{ + key: 'show', + + // public + + value: function show() { + var _this = this; + + if (this._element.parentNode && this._element.parentNode.nodeType == Node.ELEMENT_NODE && $(this._element).parent().hasClass(ClassName.ACTIVE)) { + return; + } + + var target = undefined; + var previous = undefined; + var ulElement = $(this._element).closest(Selector.UL)[0]; + var selector = _Util.getSelectorFromElement(this._element); + + if (ulElement) { + previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); + previous = previous[previous.length - 1]; + + if (previous) { + previous = $(previous).find(Selector.A)[0]; + } + } + + var hideEvent = $.Event(Event.HIDE, { + relatedTarget: this._element + }); + + var showEvent = $.Event(Event.SHOW, { + relatedTarget: previous + }); + + if (previous) { + $(previous).trigger(hideEvent); + } + + $(this._element).trigger(showEvent); + + if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { + return; + } + + if (selector) { + target = $(selector)[0]; + } + + this._activate($(this._element).closest(Selector.LI)[0], ulElement); + + var complete = function complete() { + var hiddenEvent = $.Event(Event.HIDDEN, { + relatedTarget: _this._element + }); + + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: previous + }); + + $(previous).trigger(hiddenEvent); + $(_this._element).trigger(shownEvent); + }; + + if (target) { + this._activate(target, target.parentNode, complete); + } else { + complete(); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeClass(this._element, DATA_KEY); + this._element = null; + } + }, { + key: '_activate', + + // private + + value: function _activate(element, container, callback) { + var active = $(container).find(Selector.ACTIVE_CHILD)[0]; + var isTransitioning = callback && _Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]); + + var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); + + if (active && isTransitioning) { + $(active).one(_Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } + + if (active) { + $(active).removeClass(ClassName.IN); + } + } + }, { + key: '_transitionComplete', + value: function _transitionComplete(element, active, isTransitioning, callback) { + if (active) { + $(active).removeClass(ClassName.ACTIVE); + + var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; + if (dropdownChild) { + $(dropdownChild).removeClass(ClassName.ACTIVE); + } + + var activeToggle = $(active).find(Selector.DATA_TOGGLE)[0]; + if (activeToggle) { + activeToggle.setAttribute('aria-expanded', false); + } + } + + $(element).addClass(ClassName.ACTIVE); + + var elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + + if (isTransitioning) { + _Util.reflow(element); + $(element).addClass(ClassName.IN); + } else { + $(element).removeClass(ClassName.FADE); + } + + if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { + + var dropdownElement = $(element).closest(Selector.LI_DROPDOWN)[0]; + if (dropdownElement) { + $(dropdownElement).addClass(ClassName.ACTIVE); + } + + elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + } + + if (callback) { + callback(); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + + if (!data) { + data = data = new Tab(this); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tab; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + Tab._jQueryInterface.call($(this), 'show'); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tab._jQueryInterface; + $.fn[NAME].Constructor = Tab; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tab._jQueryInterface; + }; + + return Tab; + })(jQuery); + + module.exports = Tab; +}); \ No newline at end of file diff --git a/dist/js/umd/tooltip.js b/dist/js/umd/tooltip.js new file mode 100644 index 000000000..07142ccd3 --- /dev/null +++ b/dist/js/umd/tooltip.js @@ -0,0 +1,613 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module', './util'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module, require('./util')); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod, global.Util); + global.tooltip = mod.exports; + } +})(this, function (exports, module, _util) { + 'use strict'; + + var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + + function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + + var _Util = _interopRequire(_util); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tooltip.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Tooltip = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'tooltip'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tooltip'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + var CLASS_PREFIX = 'bs-tether'; + + var Default = { + animation: true, + template: '', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + selector: false, + placement: 'top', + offset: '0 0', + constraints: [] + }; + + var DefaultType = { + animation: 'boolean', + template: 'string', + title: '(string|function)', + trigger: 'string', + delay: '(number|object)', + html: 'boolean', + selector: '(string|boolean)', + placement: '(string|function)', + offset: 'string', + constraints: 'array' + }; + + var AttachmentMap = { + TOP: 'bottom center', + RIGHT: 'middle left', + BOTTOM: 'top center', + LEFT: 'middle right' + }; + + var HoverState = { + IN: 'in', + OUT: 'out' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + INSERTED: 'inserted' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + FOCUSOUT: 'focusout' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY + }; + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TOOLTIP: '.tooltip', + TOOLTIP_INNER: '.tooltip-inner' + }; + + var TetherClass = { + element: false, + enabled: false + }; + + var Trigger = { + HOVER: 'hover', + FOCUS: 'focus', + CLICK: 'click', + MANUAL: 'manual' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tooltip = (function () { + function Tooltip(element, config) { + _classCallCheck(this, Tooltip); + + // private + this._isEnabled = true; + this._timeout = 0; + this._hoverState = ''; + this._activeTrigger = {}; + this._tether = null; + + // protected + this.element = element; + this.config = this._getConfig(config); + this.tip = null; + + this._setListeners(); + } + + _createClass(Tooltip, [{ + key: 'enable', + + // public + + value: function enable() { + this._isEnabled = true; + } + }, { + key: 'disable', + value: function disable() { + this._isEnabled = false; + } + }, { + key: 'toggleEnabled', + value: function toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + }, { + key: 'toggle', + value: function toggle(event) { + var context = this; + var dataKey = this.constructor.DATA_KEY; + + if (event) { + context = $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + context._activeTrigger.click = !context._activeTrigger.click; + + if (context._isWithActiveTrigger()) { + context._enter(null, context); + } else { + context._leave(null, context); + } + } else { + $(context.getTipElement()).hasClass(ClassName.IN) ? context._leave(null, context) : context._enter(null, context); + } + } + }, { + key: 'dispose', + value: function dispose() { + clearTimeout(this._timeout); + + this.cleanupTether(); + + $.removeData(this.element, this.constructor.DATA_KEY); + + $(this.element).off(this.constructor.EVENT_KEY); + + if (this.tip) { + $(this.tip).remove(); + } + + this._isEnabled = null; + this._timeout = null; + this._hoverState = null; + this._activeTrigger = null; + this._tether = null; + + this.element = null; + this.config = null; + this.tip = null; + } + }, { + key: 'show', + value: function show() { + var _this = this; + + var showEvent = $.Event(this.constructor.Event.SHOW); + + if (this.isWithContent() && this._isEnabled) { + $(this.element).trigger(showEvent); + + var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); + + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return; + } + + var tip = this.getTipElement(); + var tipId = _Util.getUID(this.constructor.NAME); + + tip.setAttribute('id', tipId); + this.element.setAttribute('aria-describedby', tipId); + + this.setContent(); + + if (this.config.animation) { + $(tip).addClass(ClassName.FADE); + } + + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; + + var attachment = this._getAttachment(placement); + + $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); + + $(this.element).trigger(this.constructor.Event.INSERTED); + + this._tether = new Tether({ + element: tip, + target: this.element, + attachment: attachment, + classes: TetherClass, + classPrefix: CLASS_PREFIX, + offset: this.config.offset, + constraints: this.config.constraints + }); + + _Util.reflow(tip); + this._tether.position(); + + $(tip).addClass(ClassName.IN); + + var complete = function complete() { + var prevHoverState = _this._hoverState; + _this._hoverState = null; + + $(_this.element).trigger(_this.constructor.Event.SHOWN); + + if (prevHoverState === HoverState.OUT) { + _this._leave(null, _this); + } + }; + + _Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ? $(this.tip).one(_Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION) : complete(); + } + } + }, { + key: 'hide', + value: function hide(callback) { + var _this2 = this; + + var tip = this.getTipElement(); + var hideEvent = $.Event(this.constructor.Event.HIDE); + var complete = function complete() { + if (_this2._hoverState !== HoverState.IN && tip.parentNode) { + tip.parentNode.removeChild(tip); + } + + _this2.element.removeAttribute('aria-describedby'); + $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); + _this2.cleanupTether(); + + if (callback) { + callback(); + } + }; + + $(this.element).trigger(hideEvent); + + if (hideEvent.isDefaultPrevented()) { + return; + } + + $(tip).removeClass(ClassName.IN); + + if (_Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { + + $(tip).one(_Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } + + this._hoverState = ''; + } + }, { + key: 'isWithContent', + + // protected + + value: function isWithContent() { + return !!this.getTitle(); + } + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; + } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var method = this.config.html ? 'innerHTML' : 'innerText'; + + $(tip).find(Selector.TOOLTIP_INNER)[0][method] = title; + + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); + + this.cleanupTether(); + } + }, { + key: 'getTitle', + value: function getTitle() { + var title = this.element.getAttribute('data-original-title'); + + if (!title) { + title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + } + + return title; + } + }, { + key: 'cleanupTether', + value: function cleanupTether() { + if (this._tether) { + this._tether.destroy(); + + // clean up after tether's junk classes + // remove after they fix issue + // (https://github.com/HubSpot/tether/issues/36) + $(this.element).removeClass(this._removeTetherClasses); + $(this.tip).removeClass(this._removeTetherClasses); + } + } + }, { + key: '_getAttachment', + + // private + + value: function _getAttachment(placement) { + return AttachmentMap[placement.toUpperCase()]; + } + }, { + key: '_setListeners', + value: function _setListeners() { + var _this3 = this; + + var triggers = this.config.trigger.split(' '); + + triggers.forEach(function (trigger) { + if (trigger === 'click') { + $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, $.proxy(_this3.toggle, _this3)); + } else if (trigger !== Trigger.MANUAL) { + var eventIn = trigger == Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; + var eventOut = trigger == Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; + + $(_this3.element).on(eventIn, _this3.config.selector, $.proxy(_this3._enter, _this3)).on(eventOut, _this3.config.selector, $.proxy(_this3._leave, _this3)); + } + }); + + if (this.config.selector) { + this.config = $.extend({}, this.config, { + trigger: 'manual', + selector: '' + }); + } else { + this._fixTitle(); + } + } + }, { + key: '_removeTetherClasses', + value: function _removeTetherClasses(i, css) { + return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' '); + } + }, { + key: '_fixTitle', + value: function _fixTitle() { + var titleType = typeof this.element.getAttribute('data-original-title'); + if (this.element.getAttribute('title') || titleType !== 'string') { + this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); + this.element.setAttribute('title', ''); + } + } + }, { + key: '_enter', + value: function _enter(event, context) { + var dataKey = this.constructor.DATA_KEY; + + context = context || $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; + } + + if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { + context._hoverState = HoverState.IN; + return; + } + + clearTimeout(context._timeout); + + context._hoverState = HoverState.IN; + + if (!context.config.delay || !context.config.delay.show) { + context.show(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.IN) { + context.show(); + } + }, context.config.delay.show); + } + }, { + key: '_leave', + value: function _leave(event, context) { + var dataKey = this.constructor.DATA_KEY; + + context = context || $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type == 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; + } + + if (context._isWithActiveTrigger()) { + return; + } + + clearTimeout(context._timeout); + + context._hoverState = HoverState.OUT; + + if (!context.config.delay || !context.config.delay.hide) { + context.hide(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.OUT) { + context.hide(); + } + }, context.config.delay.hide); + } + }, { + key: '_isWithActiveTrigger', + value: function _isWithActiveTrigger() { + for (var trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true; + } + } + + return false; + } + }, { + key: '_getConfig', + value: function _getConfig(config) { + config = $.extend({}, this.constructor.Default, $(this.element).data(), config); + + if (config.delay && typeof config.delay === 'number') { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + + _Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); + + return config; + } + }, { + key: '_getDelegateConfig', + value: function _getDelegateConfig() { + var config = {}; + + if (this.config) { + for (var key in this.config) { + var value = this.config[key]; + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + } + + return config; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: 'EVENT_KEY', + get: function () { + return EVENT_KEY; + } + }, { + key: 'DefaultType', + get: function () { + return DefaultType; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; + + if (!data && /destroy|hide/.test(config)) { + return; + } + + if (!data) { + data = new Tooltip(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tooltip; + })(); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tooltip._jQueryInterface; + $.fn[NAME].Constructor = Tooltip; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tooltip._jQueryInterface; + }; + + return Tooltip; + })(jQuery); + + module.exports = Tooltip; +}); \ No newline at end of file diff --git a/dist/js/umd/util.js b/dist/js/umd/util.js new file mode 100644 index 000000000..a813505c8 --- /dev/null +++ b/dist/js/umd/util.js @@ -0,0 +1,166 @@ +(function (global, factory) { + if (typeof define === 'function' && define.amd) { + define(['exports', 'module'], factory); + } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { + factory(exports, module); + } else { + var mod = { + exports: {} + }; + factory(mod.exports, mod); + global.util = mod.exports; + } +})(this, function (exports, module) { + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + 'use strict'; + + var Util = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Private TransitionEnd Helpers + * ------------------------------------------------------------------------ + */ + + var transition = false; + + var TransitionEndEvent = { + WebkitTransition: 'webkitTransitionEnd', + MozTransition: 'transitionend', + OTransition: 'oTransitionEnd otransitionend', + transition: 'transitionend' + }; + + // shoutout AngusCroll (https://goo.gl/pxwQGp) + function toType(obj) { + return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); + } + + function isElement(obj) { + return (obj[0] || obj).nodeType; + } + + function getSpecialTransitionEndEvent() { + return { + bindType: transition.end, + delegateType: transition.end, + handle: function handle(event) { + if ($(event.target).is(this)) { + return event.handleObj.handler.apply(this, arguments); + } + } + }; + } + + function transitionEndTest() { + if (window.QUnit) { + return false; + } + + var el = document.createElement('bootstrap'); + + for (var name in TransitionEndEvent) { + if (el.style[name] !== undefined) { + return { end: TransitionEndEvent[name] }; + } + } + + return false; + } + + function transitionEndEmulator(duration) { + var _this = this; + + var called = false; + + $(this).one(Util.TRANSITION_END, function () { + called = true; + }); + + setTimeout(function () { + if (!called) { + Util.triggerTransitionEnd(_this); + } + }, duration); + + return this; + } + + function setTransitionEndSupport() { + transition = transitionEndTest(); + + $.fn.emulateTransitionEnd = transitionEndEmulator; + + if (Util.supportsTransitionEnd()) { + $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); + } + } + + /** + * -------------------------------------------------------------------------- + * Public Util Api + * -------------------------------------------------------------------------- + */ + + var Util = { + + TRANSITION_END: 'bsTransitionEnd', + + getUID: function getUID(prefix) { + do prefix += ~ ~(Math.random() * 1000000); while (document.getElementById(prefix)); + return prefix; + }, + + getSelectorFromElement: function getSelectorFromElement(element) { + var selector = element.getAttribute('data-target'); + + if (!selector) { + selector = element.getAttribute('href') || ''; + selector = /^#[a-z]/i.test(selector) ? selector : null; + } + + return selector; + }, + + reflow: function reflow(element) { + new Function('bs', 'return bs')(element.offsetHeight); + }, + + triggerTransitionEnd: function triggerTransitionEnd(element) { + $(element).trigger(transition.end); + }, + + supportsTransitionEnd: function supportsTransitionEnd() { + return !!transition; + }, + + typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { + + for (var property in configTypes) { + var expectedTypes = configTypes[property]; + var value = config[property]; + var valueType = undefined; + + if (value && isElement(value)) valueType = 'element';else valueType = toType(value); + + if (!new RegExp(expectedTypes).test(valueType)) { + throw new Error('' + componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".')); + } + } + } + + }; + + setTransitionEndSupport(); + + return Util; + })(jQuery); + + module.exports = Util; +}); \ No newline at end of file diff --git a/docs/assets/css/docs.min.css b/docs/assets/css/docs.min.css index 96239e4c4..24ee63e54 100644 --- a/docs/assets/css/docs.min.css +++ b/docs/assets/css/docs.min.css @@ -3,4 +3,1256 @@ * Copyright 2011-2014 Twitter, Inc. * Licensed under the Creative Commons Attribution 3.0 Unported License. For * details, see http://creativecommons.org/licenses/by/3.0/. - */.bd-featurette,.bd-footer{border-top:1px solid #eee}.bd-example:after,.bd-header:after{clear:both}.ge,.sd{font-style:italic}.bd-container{position:relative;max-width:62rem;padding:0 1rem 1rem;margin-right:auto;margin-left:auto}@media (min-width:768px){.bd-container{padding:2rem}}@media (min-width:992px){.bd-container{padding:4rem}}.bd-container>table{display:block;width:100%;max-width:100%;overflow-y:auto;margin-bottom:1rem}.bd-container>table>tbody>tr>td,.bd-container>table>tbody>tr>th,.bd-container>table>tfoot>tr>td,.bd-container>table>tfoot>tr>th,.bd-container>table>thead>tr>td,.bd-container>table>thead>tr>th{padding:.75rem;line-height:1.5;vertical-align:top;border:1px solid #eceeef}.bd-container>table td:first-child>code{white-space:nowrap}.bd-content>h2{margin-top:3rem}.bd-content>h3{margin-top:1.5rem}.bd-content>ol li,.bd-content>ul li{margin-bottom:.25rem}@media (min-width:34em){.bd-title{font-size:4rem}.bd-title+p{font-size:1.5rem;font-weight:300}}.bd-sidebar{padding:0;margin-bottom:0;background-color:#fafafa}.bd-sidebar .navbar-toggler{position:absolute;top:1.25rem;right:0;z-index:5}.bd-sidebar .navbar-header{float:none;margin-right:-15px}.bd-sidebar .navbar-collapse{padding:0;border:0}@media (min-width:992px){.bd-docs{margin-left:240px}.bd-sidebar{position:fixed;top:0;bottom:0;left:0;width:240px;overflow-y:auto;border-right:1px solid #eee}}.bd-example,.bd-masthead,.bd-search{position:relative}.bd-sidebar .navbar-brand{display:block;float:none;height:auto;padding:1.75rem 1.25rem;font-size:20px;font-weight:500;line-height:1}.bd-sidebar-brand:focus,.bd-sidebar-brand:hover{text-decoration:none}.bd-search{margin-right:1.25rem;margin-bottom:1.5rem;margin-left:1.25rem}.bd-search .form-control{height:2.45rem;padding-top:.4rem;padding-bottom:.4rem}.bd-search-results{right:0;display:block;padding:0;overflow:hidden;font-size:.9rem}.bd-search-results:empty{display:none}.bd-search-results>li>a{padding-left:.75rem;padding-right:.75rem}.bd-search-results>li:first-child{margin-top:.25rem}.bd-search-results>li:last-child{margin-bottom:.25rem}.bd-search-results>.no-results{padding:.75rem 1rem;color:#7a7a7a;text-align:center}.bd-sidenav{display:none}.active>.bd-sidenav,.bd-toc-link{display:block}.bd-toc-link{padding:.25rem 1.25rem;color:#55595c}.bd-toc-link:focus,.bd-toc-link:hover{color:#0275d8;text-decoration:none}.active>.bd-toc-link{font-weight:500;color:#373a3c}.bd-toc-item.active{margin-top:1rem;margin-bottom:1rem}.bd-toc-item:first-child{margin-top:0}.bd-toc-item:last-child{margin-bottom:2rem}.bd-sidebar .nav>li>a{display:block;padding:.25rem 1.25rem;font-size:90%;color:#99979c}.bd-sidebar .nav>li>a:focus,.bd-sidebar .nav>li>a:hover{color:#0275d8;text-decoration:none;background-color:transparent}.bd-sidebar .nav>.active:focus>a,.bd-sidebar .nav>.active:hover>a,.bd-sidebar .nav>.active>a{font-weight:500;color:#373a3c;background-color:transparent}.bd-sidebar .nav .nav{display:none;padding-bottom:.75rem}.bd-booticon,.bd-sidebar .nav>.active>.nav{display:block}.bd-sidebar .nav .nav>li>a{padding-top:1px;padding-bottom:1px;font-weight:400;padding-top:.125rem;padding-bottom:.125rem;padding-left:2rem;font-size:80%}.bd-sidebar .nav .nav>.active:focus>a,.bd-sidebar .nav .nav>.active:hover>a,.bd-sidebar .nav .nav>.active>a{font-weight:500}.bd-booticon{width:9rem;height:9rem;font-size:6.5rem;line-height:9rem;color:#fff;text-align:center;cursor:default;background-color:#563d7c;border-radius:15%}.bd-brand-logos,.bd-callout,.bd-callout code,.bd-team img,.color-swatch{border-radius:.25rem}.carbonad,.carbonad-tag,.carbonad-text{width:auto!important;height:auto!important}.bd-booticon.inverse{color:#563d7c;background-color:#fff}.bd-booticon.outline{background-color:transparent;border:1px solid #cdbfe3}.bd-nav-home{margin-bottom:0;background-color:#563d7c;border-bottom:0}.bd-nav-home .navbar-brand>a{font-weight:500;color:#fff}.bd-nav-home .nav-link{font-weight:500;color:#cdbfe3}.bd-nav-home .nav-link:focus,.bd-nav-home .nav-link:hover{color:#fff;background-color:rgba(0,0,0,.5)}.bd-header{padding-bottom:.5rem;margin-bottom:1rem;border-bottom:1px solid rgba(255,255,255,.25)}.bd-header:after,.bd-header:before{content:" ";display:table}.bd-header .bd-header-mark{float:left;padding-top:.6em;padding-bottom:.6em;font-size:1.25rem;font-weight:500}.bd-header-nav{float:right}.bd-header-nav .nav-link{float:left}.bd-header-nav .nav-link:hover{background-color:transparent}.bd-masthead{padding:2rem 0;text-align:center}.bd-masthead .bd-booticon{margin:0 auto 2rem;color:#55595c;border-color:#55595c}.bd-masthead h1{font-weight:300;line-height:1}.bd-masthead .lead{margin-left:auto;margin-right:auto;margin-bottom:2rem;font-size:1.25rem}.bd-masthead .version{margin-top:-1rem;margin-bottom:2rem}.bd-masthead .btn{width:100%;padding:1rem 2rem;font-size:1.25rem;font-weight:500;color:#55595c;border-color:#55595c}.bd-masthead .btn:hover{color:#fff;background-color:#55595c}@media (min-width:480px){.bd-masthead .btn{width:auto}}@media (min-width:768px){.bd-masthead{padding:2rem 0 4rem}.bd-header{margin-bottom:4rem}.bd-masthead h1{font-size:4rem}.bd-masthead .lead{font-size:1.5rem}}@media (min-width:992px){.bd-masthead .lead{width:80%;font-size:2rem}}.bd-featurette{padding-top:3rem;padding-bottom:3rem;font-size:1rem;line-height:1.5;color:#555;text-align:center;background-color:#fff}.bd-featurette .highlight,.carbonad{text-align:left}.bd-featurette-title{margin-bottom:.5rem;font-size:2rem;font-weight:400;color:#333}.half-rule{width:6rem;margin:2.5rem auto}.bd-featurette h4{margin-top:1rem;margin-bottom:.5rem;font-weight:400;color:#333}.bd-featurette-img{display:block;margin-bottom:1.25rem;color:#333}.bd-featurette-img:hover{color:#0275d8;text-decoration:none}.bd-featurette-img img{display:block;margin-bottom:1rem}@media (min-width:480px){.bd-featurette .img-responsive{margin-top:2rem}}@media (min-width:768px){.bd-featurette{padding-top:6rem;padding-bottom:6rem}.bd-featurette-title{font-size:2.5rem}.bd-featurette .lead{max-width:80%;margin-right:auto;margin-left:auto}.bd-featurette .img-responsive{margin-top:0}}.bd-featured-sites{margin-right:-1px;margin-left:-1px}.bd-featured-sites .col-xs-6{padding:1px}.bd-featured-sites .img-responsive{margin-top:0}.carbonad{padding:1.25rem!important;margin:0 -1rem 2rem!important;overflow:hidden;font-size:.8rem!important;line-height:1rem!important;color:#55595c!important;background:#f5f5f5!important;border:0!important}.carbonad-img{margin:0!important}.carbonad-tag,.carbonad-text{display:block!important;float:none!important;margin-left:145px!important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important}.carbonad-text{padding-top:0!important}.carbonad-tag{color:inherit!important;text-align:left!important}.anchorjs-link,.bd-brand-item,.bd-example-tooltips,.responsive-utilities td{text-align:center}.carbonad-tag a,.carbonad-text a{color:#55595c!important}.carbonad-tag a:hover,.carbonad-text a:hover{color:#0275d8!important}.carbonad #azcarbon>img{display:none}@media (min-width:34em){.carbonad{width:330px!important;margin:1.5rem auto!important;border-width:1px!important;border-radius:.25rem}.bd-masthead .carbonad{margin:3rem auto 0!important}}@media (min-width:48em){.carbonad{margin-right:0!important;margin-left:0!important}}@media (min-width:62em){.carbonad{float:right;width:330px!important;padding:1rem!important;margin:.5rem 0 1rem 2rem!important}.bd-masthead .carbonad{float:none;margin:0 auto!important}}.bd-footer{padding-top:2rem;margin-top:2rem;font-size:85%;color:#777}.bd-footer-links{padding-left:0;margin-top:20px;color:#999}.bd-footer-links li{display:inline;padding:0 2px}.bd-footer-links li:first-child{padding-left:0}@media (min-width:768px){.bd-featured-sites .col-sm-3:first-child img{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.bd-featured-sites .col-sm-3:last-child img{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.bd-footer p{margin-bottom:0}}.bd-social{margin-bottom:1.5rem;margin-left:-.5rem}.bd-social-buttons{display:inline-block;padding-left:0;margin-bottom:0;list-style:none}.bd-social-buttons li{display:inline-block;padding:.25rem .5rem;line-height:1}.bd-social-buttons .twitter-follow-button{width:225px!important}.bd-social-buttons .twitter-share-button{width:98px!important}.github-btn{overflow:hidden;border:0}.bd-example-row .row{margin-bottom:1rem}.bd-example-row .row>[class^=col-]{padding-top:.75rem;padding-bottom:.75rem;background-color:rgba(86,61,124,.15);border:1px solid rgba(86,61,124,.2)}.bd-example{padding:1rem;margin:1rem -1rem;border:solid #f7f7f9;border-width:.2rem 0 0}.bd-example:after,.bd-example:before{content:" ";display:table}@media (min-width:34em){.bd-example{margin-left:0;margin-right:0;margin-bottom:0;padding:1.5rem;border-width:.2rem}}.bd-example+.highlight{margin-top:-1rem}.bd-example+.zero-clipboard+.highlight{margin-top:0}.bd-example+p{margin-top:2rem}.bd-example .container{width:auto}.bd-example>.alert+.alert,.bd-example>.nav+.nav,.bd-example>.navbar+.navbar,.bd-example>.progress+.btn,.bd-example>.progress+.progress{margin-top:1rem}.bd-example>.dropdown-menu:first-child{position:static;display:block}.bd-example>.table-responsive:last-child>.table,.bd-example>:last-child{margin-bottom:0!important}.bd-example>.close{float:none}.bd-example-type .table .type-info{color:#999;vertical-align:middle}.bd-example-type .table td{padding:1rem 0;border-color:#eee}.bd-example-type .table tr:first-child td{border-top:0}.bd-example-type h1,.bd-example-type h2,.bd-example-type h3,.bd-example-type h4,.bd-example-type h5,.bd-example-type h6{margin:0}.bd-example-bg-classes p{padding:1rem}.bd-example>img+img{margin-left:.5rem}.bd-example>.btn-group{margin-top:.25rem;margin-bottom:.25rem}.bd-example-control-sizing input[type=text]+input[type=text],.bd-example-control-sizing select,.bd-example>.btn-toolbar+.btn-toolbar{margin-top:.5rem}.bd-example-form .input-group{margin-bottom:.5rem}.bd-example>textarea.form-control{resize:vertical}.bd-example>.list-group{max-width:400px}.bd-example .navbar:last-child{margin-bottom:0}.bd-navbar-bottom-example,.bd-navbar-top-example{z-index:1;padding:0;overflow:hidden}.bd-navbar-bottom-example .navbar-header,.bd-navbar-top-example .navbar-header{margin-left:0}.bd-navbar-bottom-example .navbar-fixed-bottom,.bd-navbar-top-example .navbar-fixed-top{position:relative;margin-right:0;margin-left:0}.bd-navbar-top-example{padding-bottom:45px}.bd-navbar-top-example .navbar-fixed-top{top:-1px}.bd-navbar-bottom-example{padding-top:45px}.bd-navbar-bottom-example .navbar-fixed-bottom{bottom:-1px}.bd-navbar-bottom-example .navbar{margin-bottom:0}@media (min-width:768px){.bd-navbar-bottom-example .navbar-fixed-bottom,.bd-navbar-top-example .navbar-fixed-top{position:absolute}}.bd-example .pagination{margin-top:.5rem;margin-bottom:.5rem}.bd-example>.pager{margin-top:0}.bd-example-modal{background-color:#f5f5f5}.bd-example-modal .modal{position:relative;top:auto;right:auto;bottom:auto;left:auto;z-index:1;display:block}.bd-example-modal .modal-dialog{left:auto;margin-right:auto;margin-left:auto}.bd-example>.dropdown>.dropdown-toggle{float:left}.bd-example>.dropdown>.dropdown-menu{position:static;display:block;margin-bottom:.25rem;clear:left}.bd-example-tabs .nav-tabs{margin-bottom:1rem}.bd-example-tooltips>.btn{margin-top:.25rem;margin-bottom:.25rem}.bd-example-popover{padding-bottom:1.5rem;background-color:#f9f9f9}.bd-example-popover .popover{position:relative;display:block;float:left;width:260px;margin:1.25rem}.bd-example-tooltip .tooltip{position:relative;display:inline-block;margin:10px 20px;opacity:1}.scrollspy-example{position:relative;height:200px;margin-top:.5rem;overflow:auto}.bd-example>.center-block:not(img){max-width:200px;padding:.5rem;background-color:#eee}.bd-example>.bg-danger,.bd-example>.bg-info,.bd-example>.bg-primary,.bd-example>.bg-success,.bd-example>.bg-warning{padding:.5rem;margin-top:.5rem;margin-bottom:.5rem}.highlight{padding:1rem;margin:1rem -1rem;background-color:#f7f7f9}@media (min-width:34em){.highlight{padding:1.5rem;margin-right:0;margin-left:0}}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0}.highlight pre code{font-size:inherit;color:#373a3c}#focusedInput{border-color:#66afe9;outline:0;outline:dotted thin;-webkit-box-shadow:0 0 .5rem rgba(102,175,233,.6);box-shadow:0 0 .5rem rgba(102,175,233,.6)}.table-responsive .highlight pre{white-space:normal}.bd-table th small,.responsive-utilities th small{display:block;font-weight:400;color:#999}.responsive-utilities tbody th{font-weight:400}.responsive-utilities td.is-visible{color:#468847;background-color:#dff0d8!important}.responsive-utilities td.is-hidden{color:#ccc;background-color:#f9f9f9!important}.responsive-utilities-test{margin-top:.25rem}.responsive-utilities-test .col-xs-6{margin-bottom:.5rem}.responsive-utilities-test span{display:block;padding:1rem .5rem;font-size:1rem;font-weight:700;line-height:1.1;text-align:center;border-radius:.25rem}.hidden-on .col-xs-6>.not-visible,.visible-on .col-xs-6>.not-visible{color:#999;border:1px solid #ddd}.hidden-on .col-xs-6 .visible,.visible-on .col-xs-6 .visible{color:#468847;background-color:#dff0d8;border:1px solid #d6e9c6}@media (max-width:33.9em){.hidden-xs-only{display:none!important}}@media (min-width:34em)and (max-width:47.9em){.hidden-sm-only{display:none!important}}@media (min-width:48em)and (max-width:61.9em){.hidden-md-only{display:none!important}}@media (min-width:62em)and (max-width:74.9em){.hidden-lg-only{display:none!important}}@media (min-width:75em){.hidden-xl-only{display:none!important}}.btn-outline{color:#563d7c;background-color:transparent;border-color:#563d7c}.btn-outline:active,.btn-outline:focus,.btn-outline:hover{color:#fff;background-color:#563d7c;border-color:#563d7c}.btn-outline-inverse{color:#fff;background-color:transparent;border-color:#cdbfe3}.btn-outline-inverse:active,.btn-outline-inverse:focus,.btn-outline-inverse:hover{color:#563d7c;text-shadow:none;background-color:#fff;border-color:#fff}.bd-callout{padding:1.25rem;margin-top:1.25rem;margin-bottom:1.25rem;border:1px solid #eee;border-left-width:.25rem}.bd-callout h4{margin-top:0;margin-bottom:.25rem}.bd-callout p:last-child{margin-bottom:0}.bd-callout+.bd-callout{margin-top:-.25rem}.bd-callout-info{border-left-color:#5bc0de}.bd-callout-info h4{color:#5bc0de}.bd-callout-warning{border-left-color:#f0ad4e}.bd-callout-warning h4{color:#f0ad4e}.bd-callout-danger{border-left-color:#d9534f}.bd-callout-danger h4{color:#d9534f}.bd-examples .img-thumbnail{margin-bottom:.75rem}.bd-examples h4{margin-bottom:.25rem}.bd-examples p{margin-bottom:1.25rem}@media (max-width:480px){.bd-examples{margin-right:-.75rem;margin-left:-.75rem}.bd-examples>[class^=col-]{padding-right:.75rem;padding-left:.75rem}}.bd-team .team-member{line-height:2rem;color:#555}.bd-team .team-member:hover{color:#333;text-decoration:none}.bd-team .github-btn{float:right;width:180px;height:1.25rem;margin-top:.25rem}.bd-team img{float:left;width:2rem;margin-right:.5rem}.bd-browser-bugs td p{margin-bottom:0}.bd-browser-bugs th:first-child{width:18%}.bd-brand-logos{display:table;width:100%;margin-bottom:1rem;overflow:hidden;color:#563d7c;background-color:#f9f9f9}.bd-brand-logos .inverse,.color-swatches .bd-purple{background-color:#563d7c}.bd-brand-item{padding:4rem 0}.bd-brand-item+.bd-brand-item{border-top:1px solid #fff}.bd-brand-logos .inverse{color:#fff}.bd-brand-item h1,.bd-brand-item h3{margin-top:0;margin-bottom:0}.bd-brand-item .bd-booticon{margin-right:auto;margin-left:auto}@media (min-width:768px){.bd-brand-item{display:table-cell;width:1%}.bd-brand-item+.bd-brand-item{border-top:0;border-left:1px solid #fff}.bd-brand-item h1{font-size:4rem}}.color-swatches{margin:0 -5px;overflow:hidden}.color-swatch{float:left;width:4rem;height:4rem;margin-right:.25rem;margin-left:.25rem}.color-swatches .bd-purple-light{background-color:#cdbfe3}.color-swatches .bd-purple-lighter{background-color:#e5e1ea}.color-swatches .bd-gray{background-color:#f9f9f9}.zero-clipboard{position:relative;display:none;float:right}.btn-clipboard{position:absolute;top:0;right:0;z-index:10;display:block;padding:.25rem .5rem;font-size:75%;color:#818a91;cursor:pointer;background-color:#eceeef;border-radius:0 .2rem}.btn-clipboard-hover{color:#fff;background-color:#027de7}@media (min-width:768px){.color-swatch{width:6rem;height:6rem}.zero-clipboard{display:block}}.hll{background-color:#ffc}.c{color:#999}.err{color:#A00;background-color:#FAA}.k{color:#069}.o{color:#555}.cm{color:#999}.cp{color:#099}.c1,.cs{color:#999}.gd{background-color:#FCC;border:1px solid #C00}.gr{color:red}.gh{color:#030}.gi{background-color:#CFC;border:1px solid #0C0}.go{color:#AAA}.gp{color:#009}.gu{color:#030}.gt{color:#9C6}.kc,.kd,.kn,.kp,.kr{color:#069}.kt{color:#078}.m{color:#F60}.s{color:#d44950}.na{color:#4f9fcf}.nb{color:#366}.nc{color:#0A8}.no{color:#360}.nd{color:#99F}.ni{color:#999}.ne{color:#C00}.nf{color:#C0F}.nl{color:#99F}.nn{color:#0CF}.nt{color:#2f6f9f}.nv{color:#033}.ow{color:#000}.w{color:#bbb}.mf,.mh,.mi,.mo{color:#F60}.s2,.sb,.sc,.sd,.se,.sh{color:#C30}.si{color:#A00}.sx{color:#C30}.sr{color:#3AA}.s1{color:#C30}.ss{color:#FC3}.bp{color:#366}.vc,.vg,.vi{color:#033}.il{color:#F60}.css .nt+.nt,.css .o,.css .o+.nt{color:#999}@font-face{font-family:anchorjs-icons;src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8yoAAAC8AAAAYGNtYXDL8RqdAAABHAAAADxnYXNwAAAAEAAAAVgAAAAIZ2x5Zkm2oNUAAAFgAAABWGhlYWQAHd4cAAACuAAAADZoaGVhB3sECwAAAvAAAAAkaG10eAYAAEcAAAMUAAAADGxvY2EACgCsAAADIAAAAAhtYXhwAAYAcAAAAygAAAAgbmFtZUQXtNYAAANIAAABOXBvc3QAAwAAAAAEhAAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAAPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEACgAAAAGAAQAAQACACDmAP//AAAAIOYA////4RoCAAEAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAIARwAHA7kDeQA2AG0AAAEnLgEiBg8BDgEUFh8BHgMXNy4DLwEuATQ2PwE+ATIWHwEeARQGDwEeAxU3PgE0JicBLgMnBx4DHwEeARQGDwEOASImLwEuATQ2PwEuAzUHDgEUFh8BHgEyNj8BPgE0Ji8BA7kEI1ldWiPaIyQkIwQDBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMk/r4DBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMkBCNZXVoj2iMkJCMEA3UEJCMjJNojWV1aIwQDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkj/sYDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkjBCQjIyTaI1ldWiMEAAEAAAABAABR/4xQXw889QALBAAAAAAAzqNM0wAAAADOo0zTAAAAAAO5A3kAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAABHA7kAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAgAAAAQAAEcAAAAAAAoArAABAAAAAwBuAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIADgBHAAEAAAAAAAMADgAkAAEAAAAAAAQADgBVAAEAAAAAAAUAFgAOAAEAAAAAAAYABwAyAAEAAAAAAAoAKABjAAMAAQQJAAEADgAAAAMAAQQJAAIADgBHAAMAAQQJAAMADgAkAAMAAQQJAAQADgBVAAMAAQQJAAUAFgAOAAMAAQQJAAYADgA5AAMAAQQJAAoAKABjAGkAYwBvAG0AbwBvAG4AVgBlAHIAcwBpAG8AbgAgADAALgAwAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG4AUgBlAGcAdQBsAGEAcgBpAGMAbwBtAG8AbwBuAEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAATwAAsAAAAABKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDq/zKmNtYXAAAAFoAAAAPAAAADzL8RqdZ2FzcAAAAaQAAAAIAAAACAAAABBnbHlmAAABrAAAAVgAAAFYSbag1WhlYWQAAAMEAAAANgAAADYAHd4caGhlYQAAAzwAAAAkAAAAJAd7BAtobXR4AAADYAAAAAwAAAAMBgAAR2xvY2EAAANsAAAACAAAAAgACgCsbWF4cAAAA3QAAAAgAAAAIAAGAHBuYW1lAAADlAAAATkAAAE5RBe01nBvc3QAAATQAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAg5gADwP/A/8ADwABAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABAAoAAAABgAEAAEAAgAg5gD//wAAACDmAP///+EaAgABAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAACAEcABwO5A3kANgBtAAABJy4BIgYPAQ4BFBYfAR4DFzcuAy8BLgE0Nj8BPgEyFh8BHgEUBg8BHgMVNz4BNCYnAS4DJwceAx8BHgEUBg8BDgEiJi8BLgE0Nj8BLgM1Bw4BFBYfAR4BMjY/AT4BNCYvAQO5BCNZXVoj2iMkJCMEAwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJP6+AwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJAQjWV1aI9ojJCQjBAN1BCQjIyTaI1ldWiMEAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZI/7GAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZIwQkIyMk2iNZXVojBAABAAAAAQAAUf+MUF8PPPUACwQAAAAAAM6jTNMAAAAAzqNM0wAAAAADuQN5AAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAARwO5AAEAAAAAAAAAAAAAAAAAAAADAAAAAAIAAAAEAABHAAAAAAAKAKwAAQAAAAMAbgACAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAA4AAAABAAAAAAACAA4ARwABAAAAAAADAA4AJAABAAAAAAAEAA4AVQABAAAAAAAFABYADgABAAAAAAAGAAcAMgABAAAAAAAKACgAYwADAAEECQABAA4AAAADAAEECQACAA4ARwADAAEECQADAA4AJAADAAEECQAEAA4AVQADAAEECQAFABYADgADAAEECQAGAA4AOQADAAEECQAKACgAYwBpAGMAbwBtAG8AbwBuAFYAZQByAHMAaQBvAG4AIAAwAC4AMABpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuAFIAZQBnAHUAbABhAHIAaQBjAG8AbQBvAG8AbgBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');font-style:normal;font-weight:400}.anchorjs-icon{font-family:anchorjs-icons;font-style:normal;font-variant:normal;font-weight:400;line-height:1;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.anchorjs-link{opacity:0;text-decoration:none}.anchorjs-link:focus,:hover>.anchorjs-link{opacity:1;-webkit-transition:color .16s linear;-o-transition:color .16s linear;transition:color .16s linear}.anchorjs-description{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.anchorjs-link{float:left;width:1.2em;height:1em;padding-right:.2em;margin-top:.25em;margin-left:-1.2em;font-size:70%;color:inherit}:hover>.anchorjs-link:hover{color:#0275d8;text-decoration:none}.anchorjs-icon:before{content:'\e600'}@media (max-width:47.9em){.anchorjs-link{display:none}} \ No newline at end of file + */ +.bd-container { + position: relative; + max-width: 62rem; + padding: 0 1rem 1rem; + margin-right: auto; + margin-left: auto; } + @media (min-width: 768px) { + .bd-container { + padding: 2rem; } } + @media (min-width: 992px) { + .bd-container { + padding: 4rem; } } + .bd-container > table { + display: block; + width: 100%; + max-width: 100%; + overflow-y: auto; + margin-bottom: 1rem; } + .bd-container > table > thead > tr > th, + .bd-container > table > thead > tr > td, + .bd-container > table > tbody > tr > th, + .bd-container > table > tbody > tr > td, + .bd-container > table > tfoot > tr > th, + .bd-container > table > tfoot > tr > td { + padding: 0.75rem; + line-height: 1.5; + vertical-align: top; + border: 1px solid #eceeef; } + .bd-container > table td:first-child > code { + white-space: nowrap; } + +.bd-content > h2 { + margin-top: 3rem; } + +.bd-content > h3 { + margin-top: 1.5rem; } + +.bd-content > ul li, +.bd-content > ol li { + margin-bottom: .25rem; } + +@media (min-width: 34em) { + .bd-title { + font-size: 4rem; } + .bd-title + p { + font-size: 1.5rem; + font-weight: 300; } } + +.bd-sidebar { + padding: 0; + margin-bottom: 0; + background-color: #fafafa; } + .bd-sidebar .navbar-toggler { + position: absolute; + top: 1.25rem; + right: 0; + z-index: 5; } + +.bd-sidebar .navbar-header { + float: none; + margin-right: -15px; } + +.bd-sidebar .navbar-collapse { + padding: 0; + border: 0; } + +@media (min-width: 992px) { + .bd-docs { + margin-left: 240px; } + .bd-sidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + width: 240px; + overflow-y: auto; + border-right: 1px solid #eee; } } + +.bd-sidebar .navbar-brand { + display: block; + float: none; + height: auto; + padding: 1.75rem 1.25rem; + font-size: 20px; + font-weight: 500; + line-height: 1; } + +.bd-sidebar-brand:hover, +.bd-sidebar-brand:focus { + text-decoration: none; } + +.bd-search { + position: relative; + margin-right: 1.25rem; + margin-bottom: 1.5rem; + margin-left: 1.25rem; } + .bd-search .form-control { + height: 2.45rem; + padding-top: .4rem; + padding-bottom: .4rem; } + +.bd-search-results { + right: 0; + display: block; + padding: 0; + overflow: hidden; + font-size: .9rem; } + .bd-search-results:empty { + display: none; } + .bd-search-results > li > a { + padding-left: .75rem; + padding-right: .75rem; } + .bd-search-results > li:first-child { + margin-top: .25rem; } + .bd-search-results > li:last-child { + margin-bottom: .25rem; } + .bd-search-results > .no-results { + padding: 0.75rem 1rem; + color: #7a7a7a; + text-align: center; } + +.bd-sidenav { + display: none; } + +.bd-toc-link { + display: block; + padding: 0.25rem 1.25rem; + color: #55595c; } + +.bd-toc-link:hover, +.bd-toc-link:focus { + color: #0275d8; + text-decoration: none; } + +.active > .bd-toc-link { + font-weight: 500; + color: #373a3c; } + +.active > .bd-sidenav { + display: block; } + +.bd-toc-item.active { + margin-top: 1rem; + margin-bottom: 1rem; } + +.bd-toc-item:first-child { + margin-top: 0; } + +.bd-toc-item:last-child { + margin-bottom: 2rem; } + +.bd-sidebar .nav > li > a { + display: block; + padding: 0.25rem 1.25rem; + font-size: 90%; + color: #99979c; } + +.bd-sidebar .nav > li > a:hover, +.bd-sidebar .nav > li > a:focus { + color: #0275d8; + text-decoration: none; + background-color: transparent; } + +.bd-sidebar .nav > .active > a, +.bd-sidebar .nav > .active:hover > a, +.bd-sidebar .nav > .active:focus > a { + font-weight: 500; + color: #373a3c; + background-color: transparent; } + +.bd-sidebar .nav .nav { + display: none; + padding-bottom: .75rem; } + +.bd-sidebar .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 2rem; + font-size: 75%; + font-weight: normal; } + +.bd-sidebar .nav .nav > .active > a, +.bd-sidebar .nav .nav > .active:hover > a, +.bd-sidebar .nav .nav > .active:focus > a { + font-weight: 500; } + +.bd-sidebar .nav > .active > .nav { + display: block; } + +.bd-sidebar .nav .nav > li > a { + padding-top: .125rem; + padding-bottom: .125rem; + padding-left: 2rem; + font-size: 80%; } + +.bd-booticon { + display: block; + width: 9rem; + height: 9rem; + font-size: 6.5rem; + line-height: 9rem; + color: #fff; + text-align: center; + cursor: default; + background-color: #563d7c; + border-radius: 15%; } + .bd-booticon.inverse { + color: #563d7c; + background-color: #fff; } + .bd-booticon.outline { + background-color: transparent; + border: 1px solid #cdbfe3; } + +.bd-nav-home { + margin-bottom: 0; + background-color: #563d7c; + border-bottom: 0; } + .bd-nav-home .navbar-brand > a { + font-weight: 500; + color: #fff; } + .bd-nav-home .nav-link { + font-weight: 500; + color: #cdbfe3; } + .bd-nav-home .nav-link:hover, + .bd-nav-home .nav-link:focus { + color: #fff; + background-color: rgba(0, 0, 0, 0.5); } + +.bd-header { + padding-bottom: .5rem; + margin-bottom: 1rem; + border-bottom: 1px solid rgba(255, 255, 255, 0.25); } + .bd-header:before, + .bd-header:after { + content: " "; + display: table; } + .bd-header:after { + clear: both; } + .bd-header .bd-header-mark { + float: left; + padding-top: .6em; + padding-bottom: .6em; + font-size: 1.25rem; + font-weight: 500; } + +.bd-header-nav { + float: right; } + .bd-header-nav .nav-link { + float: left; } + .bd-header-nav .nav-link:hover { + background-color: transparent; } + +.bd-masthead { + position: relative; + padding: 2rem 0; + text-align: center; } + +.bd-masthead .bd-booticon { + margin: 0 auto 2rem; + color: #55595c; + border-color: #55595c; } + +.bd-masthead h1 { + font-weight: 300; + line-height: 1; } + +.bd-masthead .lead { + margin-left: auto; + margin-right: auto; + margin-bottom: 2rem; + font-size: 1.25rem; } + +.bd-masthead .version { + margin-top: -1rem; + margin-bottom: 2rem; } + +.bd-masthead .btn { + width: 100%; + padding: 1rem 2rem; + font-size: 1.25rem; + font-weight: 500; + color: #55595c; + border-color: #55595c; } + .bd-masthead .btn:hover { + color: #fff; + background-color: #55595c; } + +@media (min-width: 480px) { + .bd-masthead .btn { + width: auto; } } + +@media (min-width: 768px) { + .bd-masthead { + padding: 2rem 0 4rem; } + .bd-header { + margin-bottom: 4rem; } + .bd-masthead h1 { + font-size: 4rem; } + .bd-masthead .lead { + font-size: 1.5rem; } } + +@media (min-width: 992px) { + .bd-masthead .lead { + width: 80%; + font-size: 2rem; } } + +.bd-featurette { + padding-top: 3rem; + padding-bottom: 3rem; + font-size: 1rem; + line-height: 1.5; + color: #555; + text-align: center; + background-color: #fff; + border-top: 1px solid #eee; } + .bd-featurette .highlight { + text-align: left; } + +.bd-featurette-title { + margin-bottom: .5rem; + font-size: 2rem; + font-weight: normal; + color: #333; } + +.half-rule { + width: 6rem; + margin: 2.5rem auto; } + +.bd-featurette h4 { + margin-top: 1rem; + margin-bottom: .5rem; + font-weight: normal; + color: #333; } + +.bd-featurette-img { + display: block; + margin-bottom: 1.25rem; + color: #333; } + +.bd-featurette-img:hover { + color: #0275d8; + text-decoration: none; } + +.bd-featurette-img img { + display: block; + margin-bottom: 1rem; } + +@media (min-width: 480px) { + .bd-featurette .img-responsive { + margin-top: 2rem; } } + +@media (min-width: 768px) { + .bd-featurette { + padding-top: 6rem; + padding-bottom: 6rem; } + .bd-featurette-title { + font-size: 2.5rem; } + .bd-featurette .lead { + max-width: 80%; + margin-right: auto; + margin-left: auto; } + .bd-featurette .img-responsive { + margin-top: 0; } } + +.bd-featured-sites { + margin-right: -1px; + margin-left: -1px; } + +.bd-featured-sites .col-xs-6 { + padding: 1px; } + +.bd-featured-sites .img-responsive { + margin-top: 0; } + +@media (min-width: 768px) { + .bd-featured-sites .col-sm-3:first-child img { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; } + .bd-featured-sites .col-sm-3:last-child img { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; } } + +.carbonad { + width: auto !important; + height: auto !important; + padding: 1.25rem !important; + margin: 0 -1rem 2rem !important; + overflow: hidden; + /* clearfix */ + font-size: .8rem !important; + line-height: 1rem !important; + color: #55595c !important; + text-align: left; + background: #f5f5f5 !important; + border: 0 !important; } + +.carbonad-img { + margin: 0 !important; } + +.carbonad-text, +.carbonad-tag { + display: block !important; + float: none !important; + width: auto !important; + height: auto !important; + margin-left: 145px !important; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; } + +.carbonad-text { + padding-top: 0 !important; } + +.carbonad-tag { + color: inherit !important; + text-align: left !important; } + +.carbonad-text a, +.carbonad-tag a { + color: #55595c !important; } + .carbonad-text a:hover, + .carbonad-tag a:hover { + color: #0275d8 !important; } + +.carbonad #azcarbon > img { + display: none; } + +@media (min-width: 34em) { + .carbonad { + width: 330px !important; + margin: 1.5rem auto !important; + border-width: 1px !important; + border-radius: .25rem; } + .bd-masthead .carbonad { + margin: 3rem auto 0 !important; } } + +@media (min-width: 48em) { + .carbonad { + margin-right: 0 !important; + margin-left: 0 !important; } } + +@media (min-width: 62em) { + .carbonad { + float: right; + width: 330px !important; + padding: 1rem !important; + margin: 0.5rem 0 1rem 2rem !important; } + .bd-masthead .carbonad { + float: none; + margin: 0 auto !important; } } + +.bd-footer { + padding-top: 2rem; + margin-top: 2rem; + font-size: 85%; + color: #777; + border-top: 1px solid #eee; } + +.bd-footer-links { + padding-left: 0; + margin-top: 20px; + color: #999; } + +.bd-footer-links li { + display: inline; + padding: 0 2px; } + +.bd-footer-links li:first-child { + padding-left: 0; } + +@media (min-width: 768px) { + .bd-footer p { + margin-bottom: 0; } } + +.bd-social { + margin-bottom: 1.5rem; + margin-left: -.5rem; } + +.bd-social-buttons { + display: inline-block; + padding-left: 0; + margin-bottom: 0; + list-style: none; } + +.bd-social-buttons li { + display: inline-block; + padding: 0.25rem 0.5rem; + line-height: 1; } + +.bd-social-buttons .twitter-follow-button { + width: 225px !important; } + +.bd-social-buttons .twitter-share-button { + width: 98px !important; } + +.github-btn { + overflow: hidden; + border: 0; } + +.bd-example-row .row { + margin-bottom: 1rem; } + .bd-example-row .row > [class^="col-"] { + padding-top: .75rem; + padding-bottom: .75rem; + background-color: rgba(86, 61, 124, 0.15); + border: 1px solid rgba(86, 61, 124, 0.2); } + +.bd-example { + position: relative; + padding: 1rem; + margin: 1rem -1rem; + border: solid #f7f7f9; + border-width: .2rem 0 0; } + .bd-example:before, + .bd-example:after { + content: " "; + display: table; } + .bd-example:after { + clear: both; } + @media (min-width: 34em) { + .bd-example { + margin-left: 0; + margin-right: 0; + margin-bottom: 0; + padding: 1.5rem; + border-width: .2rem; } } + .bd-example + .highlight { + margin-top: -1rem; } + .bd-example + .zero-clipboard + .highlight { + margin-top: 0; } + .bd-example + p { + margin-top: 2rem; } + .bd-example .container { + width: auto; } + .bd-example > .nav + .nav, + .bd-example > .alert + .alert, + .bd-example > .navbar + .navbar, + .bd-example > .progress + .progress, + .bd-example > .progress + .btn { + margin-top: 1rem; } + .bd-example > .dropdown-menu:first-child { + position: static; + display: block; } + +.bd-example > *:last-child, +.bd-example > .table-responsive:last-child > .table { + margin-bottom: 0 !important; } + +.bd-example > .close { + float: none; } + +.bd-example-type .table .type-info { + color: #999; + vertical-align: middle; } + +.bd-example-type .table td { + padding: 1rem 0; + border-color: #eee; } + +.bd-example-type .table tr:first-child td { + border-top: 0; } + +.bd-example-type h1, +.bd-example-type h2, +.bd-example-type h3, +.bd-example-type h4, +.bd-example-type h5, +.bd-example-type h6 { + margin: 0; } + +.bd-example-bg-classes p { + padding: 1rem; } + +.bd-example > img + img { + margin-left: .5rem; } + +.bd-example > .btn-group { + margin-top: .25rem; + margin-bottom: .25rem; } + +.bd-example > .btn-toolbar + .btn-toolbar { + margin-top: .5rem; } + +.bd-example-control-sizing select, +.bd-example-control-sizing input[type="text"] + input[type="text"] { + margin-top: .5rem; } + +.bd-example-form .input-group { + margin-bottom: .5rem; } + +.bd-example > textarea.form-control { + resize: vertical; } + +.bd-example > .list-group { + max-width: 400px; } + +.bd-example .navbar:last-child { + margin-bottom: 0; } + +.bd-navbar-top-example, +.bd-navbar-bottom-example { + z-index: 1; + padding: 0; + overflow: hidden; } + +.bd-navbar-top-example .navbar-header, +.bd-navbar-bottom-example .navbar-header { + margin-left: 0; } + +.bd-navbar-top-example .navbar-fixed-top, +.bd-navbar-bottom-example .navbar-fixed-bottom { + position: relative; + margin-right: 0; + margin-left: 0; } + +.bd-navbar-top-example { + padding-bottom: 45px; } + +.bd-navbar-top-example .navbar-fixed-top { + top: -1px; } + +.bd-navbar-bottom-example { + padding-top: 45px; } + +.bd-navbar-bottom-example .navbar-fixed-bottom { + bottom: -1px; } + +.bd-navbar-bottom-example .navbar { + margin-bottom: 0; } + +@media (min-width: 768px) { + .bd-navbar-top-example .navbar-fixed-top, + .bd-navbar-bottom-example .navbar-fixed-bottom { + position: absolute; } } + +.bd-example .pagination { + margin-top: .5rem; + margin-bottom: .5rem; } + +.bd-example > .pager { + margin-top: 0; } + +.bd-example-modal { + background-color: #f5f5f5; } + +.bd-example-modal .modal { + position: relative; + top: auto; + right: auto; + bottom: auto; + left: auto; + z-index: 1; + display: block; } + +.bd-example-modal .modal-dialog { + left: auto; + margin-right: auto; + margin-left: auto; } + +.bd-example > .dropdown > .dropdown-toggle { + float: left; } + +.bd-example > .dropdown > .dropdown-menu { + position: static; + display: block; + margin-bottom: .25rem; + clear: left; } + +.bd-example-tabs .nav-tabs { + margin-bottom: 1rem; } + +.bd-example-tooltips { + text-align: center; } + +.bd-example-tooltips > .btn { + margin-top: .25rem; + margin-bottom: .25rem; } + +.bd-example-popover { + padding-bottom: 1.5rem; + background-color: #f9f9f9; } + +.bd-example-popover .popover { + position: relative; + display: block; + float: left; + width: 260px; + margin: 1.25rem; } + +.bd-example-tooltip .tooltip { + position: relative; + display: inline-block; + margin: 10px 20px; + opacity: 1; } + +.scrollspy-example { + position: relative; + height: 200px; + margin-top: .5rem; + overflow: auto; } + +.bd-example > .center-block:not(img) { + max-width: 200px; + padding: .5rem; + background-color: #eee; } + +.bd-example > .bg-primary, +.bd-example > .bg-success, +.bd-example > .bg-info, +.bd-example > .bg-warning, +.bd-example > .bg-danger { + padding: .5rem; + margin-top: .5rem; + margin-bottom: .5rem; } + +.highlight { + padding: 1rem; + margin: 1rem -1rem; + background-color: #f7f7f9; } + @media (min-width: 34em) { + .highlight { + padding: 1.5rem; + margin-right: 0; + margin-left: 0; } } + +.highlight pre { + padding: 0; + margin-top: 0; + margin-bottom: 0; + background-color: transparent; + border: 0; } + +.highlight pre code { + font-size: inherit; + color: #373a3c; } + +#focusedInput { + border-color: #66afe9; + outline: 0; + outline: thin dotted \9; + box-shadow: 0 0 0.5rem rgba(102, 175, 233, 0.6); } + +.table-responsive .highlight pre { + white-space: normal; } + +.bd-table th small, +.responsive-utilities th small { + display: block; + font-weight: normal; + color: #999; } + +.responsive-utilities tbody th { + font-weight: normal; } + +.responsive-utilities td { + text-align: center; } + +.responsive-utilities td.is-visible { + color: #468847; + background-color: #dff0d8 !important; } + +.responsive-utilities td.is-hidden { + color: #ccc; + background-color: #f9f9f9 !important; } + +.responsive-utilities-test { + margin-top: .25rem; } + +.responsive-utilities-test .col-xs-6 { + margin-bottom: .5rem; } + +.responsive-utilities-test span { + display: block; + padding: 1rem 0.5rem; + font-size: 1rem; + font-weight: bold; + line-height: 1.1; + text-align: center; + border-radius: .25rem; } + +.visible-on .col-xs-6 > .not-visible, +.hidden-on .col-xs-6 > .not-visible { + color: #999; + border: 1px solid #ddd; } + +.visible-on .col-xs-6 .visible, +.hidden-on .col-xs-6 .visible { + color: #468847; + background-color: #dff0d8; + border: 1px solid #d6e9c6; } + +@media (max-width: 33.9em) { + .hidden-xs-only { + display: none !important; } } + +@media (min-width: 34em) and (max-width: 47.9em) { + .hidden-sm-only { + display: none !important; } } + +@media (min-width: 48em) and (max-width: 61.9em) { + .hidden-md-only { + display: none !important; } } + +@media (min-width: 62em) and (max-width: 74.9em) { + .hidden-lg-only { + display: none !important; } } + +@media (min-width: 75em) { + .hidden-xl-only { + display: none !important; } } + +.btn-outline { + color: #563d7c; + background-color: transparent; + border-color: #563d7c; } + .btn-outline:hover, + .btn-outline:focus, + .btn-outline:active { + color: #fff; + background-color: #563d7c; + border-color: #563d7c; } + +.btn-outline-inverse { + color: #fff; + background-color: transparent; + border-color: #cdbfe3; } + .btn-outline-inverse:hover, + .btn-outline-inverse:focus, + .btn-outline-inverse:active { + color: #563d7c; + text-shadow: none; + background-color: #fff; + border-color: #fff; } + +.bd-callout { + padding: 1.25rem; + margin-top: 1.25rem; + margin-bottom: 1.25rem; + border: 1px solid #eee; + border-left-width: .25rem; + border-radius: .25rem; } + +.bd-callout h4 { + margin-top: 0; + margin-bottom: .25rem; } + +.bd-callout p:last-child { + margin-bottom: 0; } + +.bd-callout code { + border-radius: .25rem; } + +.bd-callout + .bd-callout { + margin-top: -.25rem; } + +.bd-callout-info { + border-left-color: #5bc0de; } + .bd-callout-info h4 { + color: #5bc0de; } + +.bd-callout-warning { + border-left-color: #f0ad4e; } + .bd-callout-warning h4 { + color: #f0ad4e; } + +.bd-callout-danger { + border-left-color: #d9534f; } + .bd-callout-danger h4 { + color: #d9534f; } + +.bd-examples .img-thumbnail { + margin-bottom: .75rem; } + +.bd-examples h4 { + margin-bottom: .25rem; } + +.bd-examples p { + margin-bottom: 1.25rem; } + +@media (max-width: 480px) { + .bd-examples { + margin-right: -.75rem; + margin-left: -.75rem; } + .bd-examples > [class^="col-"] { + padding-right: .75rem; + padding-left: .75rem; } } + +.bd-team .team-member { + line-height: 2rem; + color: #555; } + +.bd-team .team-member:hover { + color: #333; + text-decoration: none; } + +.bd-team .github-btn { + float: right; + width: 180px; + height: 1.25rem; + margin-top: .25rem; } + +.bd-team img { + float: left; + width: 2rem; + margin-right: .5rem; + border-radius: .25rem; } + +.bd-browser-bugs td p { + margin-bottom: 0; } + +.bd-browser-bugs th:first-child { + width: 18%; } + +.bd-brand-logos { + display: table; + width: 100%; + margin-bottom: 1rem; + overflow: hidden; + color: #563d7c; + background-color: #f9f9f9; + border-radius: .25rem; } + +.bd-brand-item { + padding: 4rem 0; + text-align: center; } + +.bd-brand-item + .bd-brand-item { + border-top: 1px solid #fff; } + +.bd-brand-logos .inverse { + color: #fff; + background-color: #563d7c; } + +.bd-brand-item h1, +.bd-brand-item h3 { + margin-top: 0; + margin-bottom: 0; } + +.bd-brand-item .bd-booticon { + margin-right: auto; + margin-left: auto; } + +@media (min-width: 768px) { + .bd-brand-item { + display: table-cell; + width: 1%; } + .bd-brand-item + .bd-brand-item { + border-top: 0; + border-left: 1px solid #fff; } + .bd-brand-item h1 { + font-size: 4rem; } } + +.color-swatches { + margin: 0 -5px; + overflow: hidden; } + +.color-swatch { + float: left; + width: 4rem; + height: 4rem; + margin-right: .25rem; + margin-left: .25rem; + border-radius: .25rem; } + @media (min-width: 768px) { + .color-swatch { + width: 6rem; + height: 6rem; } } + +.color-swatches .bd-purple { + background-color: #563d7c; } + +.color-swatches .bd-purple-light { + background-color: #cdbfe3; } + +.color-swatches .bd-purple-lighter { + background-color: #e5e1ea; } + +.color-swatches .bd-gray { + background-color: #f9f9f9; } + +.zero-clipboard { + position: relative; + display: none; + float: right; } + +.btn-clipboard { + position: absolute; + top: 0; + right: 0; + z-index: 10; + display: block; + padding: 0.25rem 0.5rem; + font-size: 75%; + color: #818a91; + cursor: pointer; + background-color: #eceeef; + border-radius: 0 0.2rem 0 0.2rem; } + +.btn-clipboard-hover { + color: #fff; + background-color: #027de7; } + +@media (min-width: 768px) { + .zero-clipboard { + display: block; } } + +.hll { + background-color: #ffffcc; } + +.c { + color: #999; } + +.err { + color: #AA0000; + background-color: #FFAAAA; } + +.k { + color: #006699; } + +.o { + color: #555555; } + +.cm { + color: #999; } + +.cp { + color: #009999; } + +.c1 { + color: #999; } + +.cs { + color: #999; } + +.gd { + background-color: #FFCCCC; + border: 1px solid #CC0000; } + +.ge { + font-style: italic; } + +.gr { + color: #FF0000; } + +.gh { + color: #003300; } + +.gi { + background-color: #CCFFCC; + border: 1px solid #00CC00; } + +.go { + color: #AAAAAA; } + +.gp { + color: #000099; } + +.gu { + color: #003300; } + +.gt { + color: #99CC66; } + +.kc { + color: #006699; } + +.kd { + color: #006699; } + +.kn { + color: #006699; } + +.kp { + color: #006699; } + +.kr { + color: #006699; } + +.kt { + color: #007788; } + +.m { + color: #FF6600; } + +.s { + color: #d44950; } + +.na { + color: #4f9fcf; } + +.nb { + color: #336666; } + +.nc { + color: #00AA88; } + +.no { + color: #336600; } + +.nd { + color: #9999FF; } + +.ni { + color: #999999; } + +.ne { + color: #CC0000; } + +.nf { + color: #CC00FF; } + +.nl { + color: #9999FF; } + +.nn { + color: #00CCFF; } + +.nt { + color: #2f6f9f; } + +.nv { + color: #003333; } + +.ow { + color: #000000; } + +.w { + color: #bbbbbb; } + +.mf { + color: #FF6600; } + +.mh { + color: #FF6600; } + +.mi { + color: #FF6600; } + +.mo { + color: #FF6600; } + +.sb { + color: #CC3300; } + +.sc { + color: #CC3300; } + +.sd { + color: #CC3300; + font-style: italic; } + +.s2 { + color: #CC3300; } + +.se { + color: #CC3300; } + +.sh { + color: #CC3300; } + +.si { + color: #AA0000; } + +.sx { + color: #CC3300; } + +.sr { + color: #33AAAA; } + +.s1 { + color: #CC3300; } + +.ss { + color: #FFCC33; } + +.bp { + color: #336666; } + +.vc { + color: #003333; } + +.vg { + color: #003333; } + +.vi { + color: #003333; } + +.il { + color: #FF6600; } + +.css .o, +.css .o + .nt, +.css .nt + .nt { + color: #999; } + +@font-face { + font-family: 'anchorjs-icons'; + src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8yoAAAC8AAAAYGNtYXDL8RqdAAABHAAAADxnYXNwAAAAEAAAAVgAAAAIZ2x5Zkm2oNUAAAFgAAABWGhlYWQAHd4cAAACuAAAADZoaGVhB3sECwAAAvAAAAAkaG10eAYAAEcAAAMUAAAADGxvY2EACgCsAAADIAAAAAhtYXhwAAYAcAAAAygAAAAgbmFtZUQXtNYAAANIAAABOXBvc3QAAwAAAAAEhAAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAAPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEACgAAAAGAAQAAQACACDmAP//AAAAIOYA////4RoCAAEAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAIARwAHA7kDeQA2AG0AAAEnLgEiBg8BDgEUFh8BHgMXNy4DLwEuATQ2PwE+ATIWHwEeARQGDwEeAxU3PgE0JicBLgMnBx4DHwEeARQGDwEOASImLwEuATQ2PwEuAzUHDgEUFh8BHgEyNj8BPgE0Ji8BA7kEI1ldWiPaIyQkIwQDBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMk/r4DBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMkBCNZXVoj2iMkJCMEA3UEJCMjJNojWV1aIwQDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkj/sYDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkjBCQjIyTaI1ldWiMEAAEAAAABAABR/4xQXw889QALBAAAAAAAzqNM0wAAAADOo0zTAAAAAAO5A3kAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAABHA7kAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAgAAAAQAAEcAAAAAAAoArAABAAAAAwBuAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIADgBHAAEAAAAAAAMADgAkAAEAAAAAAAQADgBVAAEAAAAAAAUAFgAOAAEAAAAAAAYABwAyAAEAAAAAAAoAKABjAAMAAQQJAAEADgAAAAMAAQQJAAIADgBHAAMAAQQJAAMADgAkAAMAAQQJAAQADgBVAAMAAQQJAAUAFgAOAAMAAQQJAAYADgA5AAMAAQQJAAoAKABjAGkAYwBvAG0AbwBvAG4AVgBlAHIAcwBpAG8AbgAgADAALgAwAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG4AUgBlAGcAdQBsAGEAcgBpAGMAbwBtAG8AbwBuAEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format("truetype"), url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAATwAAsAAAAABKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDq/zKmNtYXAAAAFoAAAAPAAAADzL8RqdZ2FzcAAAAaQAAAAIAAAACAAAABBnbHlmAAABrAAAAVgAAAFYSbag1WhlYWQAAAMEAAAANgAAADYAHd4caGhlYQAAAzwAAAAkAAAAJAd7BAtobXR4AAADYAAAAAwAAAAMBgAAR2xvY2EAAANsAAAACAAAAAgACgCsbWF4cAAAA3QAAAAgAAAAIAAGAHBuYW1lAAADlAAAATkAAAE5RBe01nBvc3QAAATQAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAg5gADwP/A/8ADwABAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABAAoAAAABgAEAAEAAgAg5gD//wAAACDmAP///+EaAgABAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAACAEcABwO5A3kANgBtAAABJy4BIgYPAQ4BFBYfAR4DFzcuAy8BLgE0Nj8BPgEyFh8BHgEUBg8BHgMVNz4BNCYnAS4DJwceAx8BHgEUBg8BDgEiJi8BLgE0Nj8BLgM1Bw4BFBYfAR4BMjY/AT4BNCYvAQO5BCNZXVoj2iMkJCMEAwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJP6+AwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJAQjWV1aI9ojJCQjBAN1BCQjIyTaI1ldWiMEAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZI/7GAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZIwQkIyMk2iNZXVojBAABAAAAAQAAUf+MUF8PPPUACwQAAAAAAM6jTNMAAAAAzqNM0wAAAAADuQN5AAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAARwO5AAEAAAAAAAAAAAAAAAAAAAADAAAAAAIAAAAEAABHAAAAAAAKAKwAAQAAAAMAbgACAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAA4AAAABAAAAAAACAA4ARwABAAAAAAADAA4AJAABAAAAAAAEAA4AVQABAAAAAAAFABYADgABAAAAAAAGAAcAMgABAAAAAAAKACgAYwADAAEECQABAA4AAAADAAEECQACAA4ARwADAAEECQADAA4AJAADAAEECQAEAA4AVQADAAEECQAFABYADgADAAEECQAGAA4AOQADAAEECQAKACgAYwBpAGMAbwBtAG8AbwBuAFYAZQByAHMAaQBvAG4AIAAwAC4AMABpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuAFIAZQBnAHUAbABhAHIAaQBjAG8AbQBvAG8AbgBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("woff"); + font-style: normal; + font-weight: normal; } + +.anchorjs-icon { + font-family: 'anchorjs-icons'; + font-style: normal; + font-variant: normal; + font-weight: normal; + line-height: 1; + speak: none; + text-transform: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } + +.anchorjs-link { + opacity: 0; + text-decoration: none; } + +*:hover > .anchorjs-link, +.anchorjs-link:focus { + opacity: 1; + transition: color 0.16s linear; } + +.anchorjs-description { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; } + +.anchorjs-link { + float: left; + width: 1.2em; + height: 1em; + padding-right: .2em; + margin-top: .25em; + margin-left: -1.2em; + font-size: 70%; + color: inherit; + text-align: center; } + +*:hover > .anchorjs-link:hover { + color: #0275d8; + text-decoration: none; } + +.anchorjs-icon:before { + content: '\e600'; } + +@media (max-width: 47.9em) { + .anchorjs-link { + display: none; } } + +/*# sourceMappingURL=docs.min.css.map */ \ No newline at end of file diff --git a/docs/assets/css/docs.min.css.map b/docs/assets/css/docs.min.css.map index c00d288af..a90258684 100644 Binary files a/docs/assets/css/docs.min.css.map and b/docs/assets/css/docs.min.css.map differ diff --git a/grunt/bs-commonjs-generator.js b/grunt/bs-commonjs-generator.js index 5a3fc156d..700b839ce 100644 --- a/grunt/bs-commonjs-generator.js +++ b/grunt/bs-commonjs-generator.js @@ -9,8 +9,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) var destDir = path.dirname(destFilepath); function srcPathToDestRequire(srcFilepath) { - var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/'); - return 'require(\'' + requirePath + '\')'; + return 'require(\'' + srcFilepath + '\')'; } var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); diff --git a/js/.jscsrc b/js/.jscsrc index 9544d2d2b..8d5ef3e56 100644 --- a/js/.jscsrc +++ b/js/.jscsrc @@ -1,4 +1,5 @@ { + "esnext": true, "disallowEmptyBlocks": true, "disallowKeywords": ["with"], "disallowMixedSpacesAndTabs": true, diff --git a/js/.jshintrc b/js/.jshintrc deleted file mode 100644 index a59e1d00a..000000000 --- a/js/.jshintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "asi" : true, - "browser" : true, - "eqeqeq" : false, - "eqnull" : true, - "es3" : true, - "expr" : true, - "jquery" : true, - "latedef" : true, - "laxbreak" : true, - "nonbsp" : true, - "strict" : true, - "undef" : true, - "unused" : true -} diff --git a/js/affix.js b/js/affix.js deleted file mode 100644 index 999737912..000000000 --- a/js/affix.js +++ /dev/null @@ -1,162 +0,0 @@ -/* ======================================================================== - * Bootstrap: affix.js v3.3.4 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.VERSION = '3.3.4' - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0, - target: window - } - - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() - - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false - - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } - - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height - - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' - - return false - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) - - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') - } - - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.affix - - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop - - Plugin.call($spy, data) - }) - }) - -}(jQuery); diff --git a/js/alert.js b/js/alert.js deleted file mode 100644 index 1925ef011..000000000 --- a/js/alert.js +++ /dev/null @@ -1,94 +0,0 @@ -/* ======================================================================== - * Bootstrap: alert.js v3.3.4 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.VERSION = '3.3.4' - - Alert.TRANSITION_DURATION = 150 - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.closest('.alert') - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(Alert.TRANSITION_DURATION) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.alert - - $.fn.alert = Plugin - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); diff --git a/js/button.js b/js/button.js deleted file mode 100644 index 3e2e34512..000000000 --- a/js/button.js +++ /dev/null @@ -1,120 +0,0 @@ -/* ======================================================================== - * Bootstrap: button.js v3.3.4 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.VERSION = '3.3.4' - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state += 'Text' - - if (data.resetText == null) $el.data('resetText', $el[val]()) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - $el[val](data[state] == null ? this.options[state] : data[state]) - - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d) - } - }, this), 0) - } - - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked')) changed = false - $parent.find('.active').removeClass('active') - this.$element.addClass('active') - } else if ($input.prop('type') == 'checkbox') { - if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false - this.$element.toggleClass('active') - } - $input.prop('checked', this.$element.hasClass('active')) - if (changed) $input.trigger('change') - } else { - this.$element.attr('aria-pressed', !this.$element.hasClass('active')) - this.$element.toggleClass('active') - } - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - var old = $.fn.button - - $.fn.button = Plugin - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document) - .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() - }) - .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) - }) - -}(jQuery); diff --git a/js/carousel.js b/js/carousel.js deleted file mode 100644 index a38ef14d0..000000000 --- a/js/carousel.js +++ /dev/null @@ -1,237 +0,0 @@ -/* ======================================================================== - * Bootstrap: carousel.js v3.3.4 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = null - this.sliding = null - this.interval = null - this.$active = null - this.$items = null - - this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) - - this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) - } - - Carousel.VERSION = '3.3.4' - - Carousel.TRANSITION_DURATION = 600 - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true, - keyboard: true - } - - Carousel.prototype.keydown = function (e) { - if (/input|textarea/i.test(e.target.tagName)) return - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return - } - - e.preventDefault() - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) - } - - Carousel.prototype.getItemForDirection = function (direction, active) { - var activeIndex = this.getItemIndex(active) - var willWrap = (direction == 'prev' && activeIndex === 0) - || (direction == 'next' && activeIndex == (this.$items.length - 1)) - if (willWrap && !this.options.wrap) return active - var delta = direction == 'prev' ? -1 : 1 - var itemIndex = (activeIndex + delta) % this.$items.length - return this.$items.eq(itemIndex) - } - - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || this.getItemForDirection(type, $active) - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var that = this - - if ($next.hasClass('active')) return (this.sliding = false) - - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return - - this.sliding = true - - isCycling && this.pause() - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') - } - - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one('bsTransitionEnd', function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) - }) - .emulateTransitionEnd(Carousel.TRANSITION_DURATION) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger(slidEvent) - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - var old = $.fn.carousel - - $.fn.carousel = Plugin - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - var clickHandler = function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false - - Plugin.call($target, options) - - if (slideIndex) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - } - - $(document) - .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) - .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) - }) - }) - -}(jQuery); diff --git a/js/collapse.js b/js/collapse.js deleted file mode 100644 index 954513c5e..000000000 --- a/js/collapse.js +++ /dev/null @@ -1,211 +0,0 @@ -/* ======================================================================== - * Bootstrap: collapse.js v3.3.4 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + - '[data-toggle="collapse"][data-target="#' + element.id + '"]') - this.transitioning = null - - if (this.options.parent) { - this.$parent = this.getParent() - } else { - this.addAriaAndCollapsedClass(this.$element, this.$trigger) - } - - if (this.options.toggle) this.toggle() - } - - Collapse.VERSION = '3.3.4' - - Collapse.TRANSITION_DURATION = 350 - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var activesData - var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') - - if (actives && actives.length) { - activesData = actives.data('bs.collapse') - if (activesData && activesData.transitioning) return - } - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - if (actives && actives.length) { - Plugin.call(actives, 'hide') - activesData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - .attr('aria-expanded', true) - - this.$trigger - .removeClass('collapsed') - .attr('aria-expanded', true) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element[dimension](this.$element[dimension]())[0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse in') - .attr('aria-expanded', false) - - this.$trigger - .addClass('collapsed') - .attr('aria-expanded', false) - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .removeClass('collapsing') - .addClass('collapse') - .trigger('hidden.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') - .each($.proxy(function (i, element) { - var $element = $(element) - this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) - }, this)) - .end() - } - - Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { - var isOpen = $element.hasClass('in') - - $element.attr('aria-expanded', isOpen) - $trigger - .toggleClass('collapsed', !isOpen) - .attr('aria-expanded', isOpen) - } - - function getTargetFromTrigger($trigger) { - var href - var target = $trigger.attr('data-target') - || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 - - return $(target) - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.collapse - - $.fn.collapse = Plugin - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this) - - if (!$this.attr('data-target')) e.preventDefault() - - var $target = getTargetFromTrigger($this) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - - Plugin.call($target, option) - }) - -}(jQuery); diff --git a/js/dist/alert.js b/js/dist/alert.js new file mode 100644 index 000000000..876a5f3d0 --- /dev/null +++ b/js/dist/alert.js @@ -0,0 +1,192 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): alert.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Alert = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'alert'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.alert'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var Selector = { + DISMISS: '[data-dismiss="alert"]' + }; + + var Event = { + CLOSE: 'close' + EVENT_KEY, + CLOSED: 'closed' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + ALERT: 'alert', + FADE: 'fade', + IN: 'in' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Alert = (function () { + function Alert(element) { + _classCallCheck(this, Alert); + + this._element = element; + } + + _createClass(Alert, [{ + key: 'close', + + // public + + value: function close(element) { + element = element || this._element; + + var rootElement = this._getRootElement(element); + var customEvent = this._triggerCloseEvent(rootElement); + + if (customEvent.isDefaultPrevented()) { + return; + } + + this._removeElement(rootElement); + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; + } + }, { + key: '_getRootElement', + + // private + + value: function _getRootElement(element) { + var parent = false; + var selector = Util.getSelectorFromElement(element); + + if (selector) { + parent = $(selector)[0]; + } + + if (!parent) { + parent = $(element).closest('.' + ClassName.ALERT)[0]; + } + + return parent; + } + }, { + key: '_triggerCloseEvent', + value: function _triggerCloseEvent(element) { + var closeEvent = $.Event(Event.CLOSE); + $(element).trigger(closeEvent); + return closeEvent; + } + }, { + key: '_removeElement', + value: function _removeElement(element) { + $(element).removeClass(ClassName.IN); + + if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element); + return; + } + + $(element).one(Util.TRANSITION_END, this._destroyElement.bind(this, element)).emulateTransitionEnd(TRANSITION_DURATION); + } + }, { + key: '_destroyElement', + value: function _destroyElement(element) { + $(element).detach().trigger(Event.CLOSED).remove(); + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var $element = $(this); + var data = $element.data(DATA_KEY); + + if (!data) { + data = new Alert(this); + $element.data(DATA_KEY, data); + } + + if (config === 'close') { + data[config](this); + } + }); + } + }, { + key: '_handleDismiss', + value: function _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault(); + } + + alertInstance.close(this); + }; + } + }]); + + return Alert; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Alert._jQueryInterface; + $.fn[NAME].Constructor = Alert; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Alert._jQueryInterface; + }; + + return Alert; +})(jQuery); +//# sourceMappingURL=alert.js.map \ No newline at end of file diff --git a/js/dist/alert.js.map b/js/dist/alert.js.map new file mode 100644 index 000000000..a030fb73c Binary files /dev/null and b/js/dist/alert.js.map differ diff --git a/js/dist/button.js b/js/dist/button.js new file mode 100644 index 000000000..fe6cfe981 --- /dev/null +++ b/js/dist/button.js @@ -0,0 +1,174 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): button.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Button = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'button'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.button'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var ClassName = { + ACTIVE: 'active', + BUTTON: 'btn', + FOCUS: 'focus' + }; + + var Selector = { + DATA_TOGGLE_CARROT: '[data-toggle^="button"]', + DATA_TOGGLE: '[data-toggle="buttons"]', + INPUT: 'input', + ACTIVE: '.active', + BUTTON: '.btn' + }; + + var Event = { + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY, + FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + '' + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + '' + DATA_API_KEY) + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Button = (function () { + function Button(element) { + _classCallCheck(this, Button); + + this._element = element; + } + + _createClass(Button, [{ + key: 'toggle', + + // public + + value: function toggle() { + var triggerChangeEvent = true; + var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; + + if (rootElement) { + var input = $(this._element).find(Selector.INPUT)[0]; + + if (input) { + if (input.type === 'radio') { + if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { + triggerChangeEvent = false; + } else { + var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; + + if (activeElement) { + $(activeElement).removeClass(ClassName.ACTIVE); + } + } + } + + if (triggerChangeEvent) { + input.checked = !$(this._element).hasClass(ClassName.ACTIVE); + $(this._element).trigger('change'); + } + } + } else { + this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); + } + + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName.ACTIVE); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + this._element = null; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + + if (!data) { + data = new Button(this); + $(this).data(DATA_KEY, data); + } + + if (config === 'toggle') { + data[config](); + } + }); + } + }]); + + return Button; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + event.preventDefault(); + + var button = event.target; + + if (!$(button).hasClass(ClassName.BUTTON)) { + button = $(button).closest(Selector.BUTTON); + } + + Button._jQueryInterface.call($(button), 'toggle'); + }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + var button = $(event.target).closest(Selector.BUTTON)[0]; + $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Button._jQueryInterface; + $.fn[NAME].Constructor = Button; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Button._jQueryInterface; + }; + + return Button; +})(jQuery); +//# sourceMappingURL=button.js.map \ No newline at end of file diff --git a/js/dist/button.js.map b/js/dist/button.js.map new file mode 100644 index 000000000..109755be8 Binary files /dev/null and b/js/dist/button.js.map differ diff --git a/js/dist/carousel.js b/js/dist/carousel.js new file mode 100644 index 000000000..029c69fdb --- /dev/null +++ b/js/dist/carousel.js @@ -0,0 +1,466 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Carousel = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'carousel'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.carousel'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; + + var Default = { + interval: 5000, + keyboard: true, + slide: false, + pause: 'hover', + wrap: true + }; + + var DefaultType = { + interval: '(number|boolean)', + keyboard: 'boolean', + slide: '(boolean|string)', + pause: '(string|boolean)', + wrap: 'boolean' + }; + + var Direction = { + NEXT: 'next', + PREVIOUS: 'prev' + }; + + var Event = { + SLIDE: 'slide' + EVENT_KEY, + SLID: 'slid' + EVENT_KEY, + KEYDOWN: 'keydown' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY, + LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + CAROUSEL: 'carousel', + ACTIVE: 'active', + SLIDE: 'slide', + RIGHT: 'right', + LEFT: 'left', + ITEM: 'carousel-item' + }; + + var Selector = { + ACTIVE: '.active', + ACTIVE_ITEM: '.active.carousel-item', + ITEM: '.carousel-item', + NEXT_PREV: '.next, .prev', + INDICATORS: '.carousel-indicators', + DATA_SLIDE: '[data-slide], [data-slide-to]', + DATA_RIDE: '[data-ride="carousel"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Carousel = (function () { + function Carousel(element, config) { + _classCallCheck(this, Carousel); + + this._items = null; + this._interval = null; + this._activeElement = null; + + this._isPaused = false; + this._isSliding = false; + + this._config = this._getConfig(config); + this._element = $(element)[0]; + this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; + + this._addEventListeners(); + } + + _createClass(Carousel, [{ + key: 'next', + + // public + + value: function next() { + if (!this._isSliding) { + this._slide(Direction.NEXT); + } + } + }, { + key: 'prev', + value: function prev() { + if (!this._isSliding) { + this._slide(Direction.PREVIOUS); + } + } + }, { + key: 'pause', + value: function pause(event) { + if (!event) { + this._isPaused = true; + } + + if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { + Util.triggerTransitionEnd(this._element); + this.cycle(true); + } + + clearInterval(this._interval); + this._interval = null; + } + }, { + key: 'cycle', + value: function cycle(event) { + if (!event) { + this._isPaused = false; + } + + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } + + if (this._config.interval && !this._isPaused) { + this._interval = setInterval($.proxy(this.next, this), this._config.interval); + } + } + }, { + key: 'to', + value: function to(index) { + var _this = this; + + this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + + var activeIndex = this._getItemIndex(this._activeElement); + + if (index > this._items.length - 1 || index < 0) { + return; + } + + if (this._isSliding) { + $(this._element).one(Event.SLID, function () { + return _this.to(index); + }); + return; + } + + if (activeIndex == index) { + this.pause(); + this.cycle(); + return; + } + + var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; + + this._slide(direction, this._items[index]); + } + }, { + key: 'dispose', + value: function dispose() { + $(this._element).off(EVENT_KEY); + $.removeData(this._element, DATA_KEY); + + this._items = null; + this._config = null; + this._element = null; + this._interval = null; + this._isPaused = null; + this._isSliding = null; + this._activeElement = null; + this._indicatorsElement = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_addEventListeners', + value: function _addEventListeners() { + if (this._config.keyboard) { + $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this)); + } + + if (this._config.pause == 'hover' && !('ontouchstart' in document.documentElement)) { + $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this)); + } + } + }, { + key: '_keydown', + value: function _keydown(event) { + event.preventDefault(); + + if (/input|textarea/i.test(event.target.tagName)) return; + + switch (event.which) { + case 37: + this.prev();break; + case 39: + this.next();break; + default: + return; + } + } + }, { + key: '_getItemIndex', + value: function _getItemIndex(element) { + this._items = $.makeArray($(element).parent().find(Selector.ITEM)); + return this._items.indexOf(element); + } + }, { + key: '_getItemByDirection', + value: function _getItemByDirection(direction, activeElement) { + var isNextDirection = direction === Direction.NEXT; + var isPrevDirection = direction === Direction.PREVIOUS; + var activeIndex = this._getItemIndex(activeElement); + var lastItemIndex = this._items.length - 1; + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex == lastItemIndex; + + if (isGoingToWrap && !this._config.wrap) { + return activeElement; + } + + var delta = direction == Direction.PREVIOUS ? -1 : 1; + var itemIndex = (activeIndex + delta) % this._items.length; + + return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; + } + }, { + key: '_triggerSlideEvent', + value: function _triggerSlideEvent(relatedTarget, directionalClassname) { + var slideEvent = $.Event(Event.SLIDE, { + relatedTarget: relatedTarget, + direction: directionalClassname + }); + + $(this._element).trigger(slideEvent); + + return slideEvent; + } + }, { + key: '_setActiveIndicatorElement', + value: function _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); + + var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; + + if (nextIndicator) { + $(nextIndicator).addClass(ClassName.ACTIVE); + } + } + } + }, { + key: '_slide', + value: function _slide(direction, element) { + var _this2 = this; + + var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); + + var isCycling = !!this._interval; + + var directionalClassName = direction == Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; + + if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { + this._isSliding = false; + return; + } + + var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); + if (slideEvent.isDefaultPrevented()) { + return; + } + + if (!activeElement || !nextElement) { + // some weirdness is happening, so we bail + return; + } + + this._isSliding = true; + + if (isCycling) { + this.pause(); + } + + this._setActiveIndicatorElement(nextElement); + + var slidEvent = $.Event(Event.SLID, { + relatedTarget: nextElement, + direction: directionalClassName + }); + + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { + + $(nextElement).addClass(direction); + + Util.reflow(nextElement); + + $(activeElement).addClass(directionalClassName); + $(nextElement).addClass(directionalClassName); + + $(activeElement).one(Util.TRANSITION_END, function () { + $(nextElement).removeClass(directionalClassName).removeClass(direction); + + $(nextElement).addClass(ClassName.ACTIVE); + + $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); + + _this2._isSliding = false; + + setTimeout(function () { + return $(_this2._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(TRANSITION_DURATION); + } else { + $(activeElement).removeClass(ClassName.ACTIVE); + $(nextElement).addClass(ClassName.ACTIVE); + + this._isSliding = false; + $(this._element).trigger(slidEvent); + } + + if (isCycling) { + this.cycle(); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Default, $(this).data()); + + if (typeof config === 'object') { + $.extend(_config, config); + } + + var action = typeof config === 'string' ? config : _config.slide; + + if (!data) { + data = new Carousel(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config == 'number') { + data.to(config); + } else if (action) { + data[action](); + } else if (_config.interval) { + data.pause(); + data.cycle(); + } + }); + } + }, { + key: '_dataApiClickHandler', + value: function _dataApiClickHandler(event) { + var selector = Util.getSelectorFromElement(this); + + if (!selector) { + return; + } + + var target = $(selector)[0]; + + if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { + return; + } + + var config = $.extend({}, $(target).data(), $(this).data()); + + var slideIndex = this.getAttribute('data-slide-to'); + if (slideIndex) { + config.interval = false; + } + + Carousel._jQueryInterface.call($(target), config); + + if (slideIndex) { + $(target).data(DATA_KEY).to(slideIndex); + } + + event.preventDefault(); + } + }]); + + return Carousel; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); + + $(window).on(Event.LOAD_DATA_API, function () { + $(Selector.DATA_RIDE).each(function () { + var $carousel = $(this); + Carousel._jQueryInterface.call($carousel, $carousel.data()); + }); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Carousel._jQueryInterface; + $.fn[NAME].Constructor = Carousel; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Carousel._jQueryInterface; + }; + + return Carousel; +})(jQuery); +//# sourceMappingURL=carousel.js.map \ No newline at end of file diff --git a/js/dist/carousel.js.map b/js/dist/carousel.js.map new file mode 100644 index 000000000..0978f4836 Binary files /dev/null and b/js/dist/carousel.js.map differ diff --git a/js/dist/collapse.js b/js/dist/collapse.js new file mode 100644 index 000000000..9db1b8e60 --- /dev/null +++ b/js/dist/collapse.js @@ -0,0 +1,361 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): collapse.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Collapse = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'collapse'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.collapse'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; + + var Default = { + toggle: true, + parent: '' + }; + + var DefaultType = { + toggle: 'boolean', + parent: 'string' + }; + + var Event = { + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + IN: 'in', + COLLAPSE: 'collapse', + COLLAPSING: 'collapsing', + COLLAPSED: 'collapsed' + }; + + var Dimension = { + WIDTH: 'width', + HEIGHT: 'height' + }; + + var Selector = { + ACTIVES: '.panel > .in, .panel > .collapsing', + DATA_TOGGLE: '[data-toggle="collapse"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Collapse = (function () { + function Collapse(element, config) { + _classCallCheck(this, Collapse); + + this._isTransitioning = false; + this._element = element; + this._config = this._getConfig(config); + this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]'))); + + this._parent = this._config.parent ? this._getParent() : null; + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray); + } + + if (this._config.toggle) { + this.toggle(); + } + } + + _createClass(Collapse, [{ + key: 'toggle', + + // public + + value: function toggle() { + if ($(this._element).hasClass(ClassName.IN)) { + this.hide(); + } else { + this.show(); + } + } + }, { + key: 'show', + value: function show() { + var _this = this; + + if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { + return; + } + + var actives = undefined; + var activesData = undefined; + + if (this._parent) { + actives = $.makeArray($(Selector.ACTIVES)); + if (!actives.length) { + actives = null; + } + } + + if (actives) { + activesData = $(actives).data(DATA_KEY); + if (activesData && activesData._isTransitioning) { + return; + } + } + + var startEvent = $.Event(Event.SHOW); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } + + if (actives) { + Collapse._jQueryInterface.call($(actives), 'hide'); + if (!activesData) { + $(actives).data(DATA_KEY, null); + } + } + + var dimension = this._getDimension(); + + $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); + + this._element.style[dimension] = 0; + this._element.setAttribute('aria-expanded', true); + + if (this._triggerArray.length) { + $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); + } + + this.setTransitioning(true); + + var complete = function complete() { + $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); + + _this._element.style[dimension] = ''; + + _this.setTransitioning(false); + + $(_this._element).trigger(Event.SHOWN); + }; + + if (!Util.supportsTransitionEnd()) { + complete(); + return; + } + + var scrollSize = 'scroll' + (dimension[0].toUpperCase() + dimension.slice(1)); + + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + + this._element.style[dimension] = this._element[scrollSize] + 'px'; + } + }, { + key: 'hide', + value: function hide() { + var _this2 = this; + + if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { + return; + } + + var startEvent = $.Event(Event.HIDE); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } + + var dimension = this._getDimension(); + var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; + + this._element.style[dimension] = this._element[offsetDimension] + 'px'; + + Util.reflow(this._element); + + $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); + + this._element.setAttribute('aria-expanded', false); + + if (this._triggerArray.length) { + $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); + } + + this.setTransitioning(true); + + var complete = function complete() { + _this2.setTransitioning(false); + $(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); + }; + + this._element.style[dimension] = 0; + + if (!Util.supportsTransitionEnd()) { + return complete(); + } + + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } + }, { + key: 'setTransitioning', + value: function setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning; + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + + this._config = null; + this._parent = null; + this._element = null; + this._triggerArray = null; + this._isTransitioning = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + config.toggle = !!config.toggle; // coerce string values + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_getDimension', + value: function _getDimension() { + var hasWidth = $(this._element).hasClass(Dimension.WIDTH); + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; + } + }, { + key: '_getParent', + value: function _getParent() { + var _this3 = this; + + var parent = $(this._config.parent)[0]; + var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; + + $(parent).find(selector).each(function (i, element) { + _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); + }); + + return parent; + } + }, { + key: '_addAriaAndCollapsedClass', + value: function _addAriaAndCollapsedClass(element, triggerArray) { + if (element) { + var isOpen = $(element).hasClass(ClassName.IN); + element.setAttribute('aria-expanded', isOpen); + + if (triggerArray.length) { + $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + } + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_getTargetFromElement', + + // static + + value: function _getTargetFromElement(element) { + var selector = Util.getSelectorFromElement(element); + return selector ? $(selector)[0] : null; + } + }, { + key: '_jQueryInterface', + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config); + + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false; + } + + if (!data) { + data = new Collapse(this, _config); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Collapse; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + + var target = Collapse._getTargetFromElement(this); + + var data = $(target).data(DATA_KEY); + var config = data ? 'toggle' : $(this).data(); + + Collapse._jQueryInterface.call($(target), config); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Collapse._jQueryInterface; + $.fn[NAME].Constructor = Collapse; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Collapse._jQueryInterface; + }; + + return Collapse; +})(jQuery); +//# sourceMappingURL=collapse.js.map \ No newline at end of file diff --git a/js/dist/collapse.js.map b/js/dist/collapse.js.map new file mode 100644 index 000000000..abd2bac68 Binary files /dev/null and b/js/dist/collapse.js.map differ diff --git a/js/dist/dropdown.js b/js/dist/dropdown.js new file mode 100644 index 000000000..2ab5cf700 --- /dev/null +++ b/js/dist/dropdown.js @@ -0,0 +1,281 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): dropdown.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Dropdown = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'dropdown'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.dropdown'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY, + KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + BACKDROP: 'dropdown-backdrop', + DISABLED: 'disabled', + OPEN: 'open' + }; + + var Selector = { + BACKDROP: '.dropdown-backdrop', + DATA_TOGGLE: '[data-toggle="dropdown"]', + FORM_CHILD: '.dropdown form', + ROLE_MENU: '[role="menu"]', + ROLE_LISTBOX: '[role="listbox"]', + NAVBAR_NAV: '.navbar-nav', + VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Dropdown = (function () { + function Dropdown(element) { + _classCallCheck(this, Dropdown); + + this._element = element; + + this._addEventListeners(); + } + + _createClass(Dropdown, [{ + key: 'toggle', + + // public + + value: function toggle() { + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); + + Dropdown._clearMenus(); + + if (isActive) { + return false; + } + + if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { + + // if mobile we use a backdrop because click events don't delegate + var dropdown = document.createElement('div'); + dropdown.className = ClassName.BACKDROP; + $(dropdown).insertBefore(this); + $(dropdown).on('click', Dropdown._clearMenus); + } + + var relatedTarget = { relatedTarget: this }; + var showEvent = $.Event(Event.SHOW, relatedTarget); + + $(parent).trigger(showEvent); + + if (showEvent.isDefaultPrevented()) { + return; + } + + this.focus(); + this.setAttribute('aria-expanded', 'true'); + + $(parent).toggleClass(ClassName.OPEN); + $(parent).trigger(Event.SHOWN, relatedTarget); + + return false; + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + $(this._element).off(EVENT_KEY); + this._element = null; + } + }, { + key: '_addEventListeners', + + // private + + value: function _addEventListeners() { + $(this._element).on(Event.CLICK, this.toggle); + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + + if (!data) { + $(this).data(DATA_KEY, data = new Dropdown(this)); + } + + if (typeof config === 'string') { + data[config].call(this); + } + }); + } + }, { + key: '_clearMenus', + value: function _clearMenus(event) { + if (event && event.which === 3) { + return; + } + + var backdrop = $(Selector.BACKDROP)[0]; + if (backdrop) { + backdrop.parentNode.removeChild(backdrop); + } + + var toggles = $.makeArray($(Selector.DATA_TOGGLE)); + + for (var i = 0; i < toggles.length; i++) { + var _parent = Dropdown._getParentFromElement(toggles[i]); + var relatedTarget = { relatedTarget: toggles[i] }; + + if (!$(_parent).hasClass(ClassName.OPEN)) { + continue; + } + + if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) { + continue; + } + + var hideEvent = $.Event(Event.HIDE, relatedTarget); + $(_parent).trigger(hideEvent); + if (hideEvent.isDefaultPrevented()) { + continue; + } + + toggles[i].setAttribute('aria-expanded', 'false'); + + $(_parent).removeClass(ClassName.OPEN).trigger(Event.HIDDEN, relatedTarget); + } + } + }, { + key: '_getParentFromElement', + value: function _getParentFromElement(element) { + var parent = undefined; + var selector = Util.getSelectorFromElement(element); + + if (selector) { + parent = $(selector)[0]; + } + + return parent || element.parentNode; + } + }, { + key: '_dataApiKeydownHandler', + value: function _dataApiKeydownHandler(event) { + if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { + return; + } + + event.preventDefault(); + event.stopPropagation(); + + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); + + if (!isActive && event.which !== 27 || isActive && event.which === 27) { + + if (event.which === 27) { + var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; + $(toggle).trigger('focus'); + } + + $(this).trigger('click'); + return; + } + + var items = $.makeArray($(Selector.VISIBLE_ITEMS)); + + items = items.filter(function (item) { + return item.offsetWidth || item.offsetHeight; + }); + + if (!items.length) { + return; + } + + var index = items.indexOf(event.target); + + if (event.which === 38 && index > 0) index--; // up + if (event.which === 40 && index < items.length - 1) index++; // down + if (! ~index) index = 0; + + items[index].focus(); + } + }]); + + return Dropdown; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { + e.stopPropagation(); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Dropdown._jQueryInterface; + $.fn[NAME].Constructor = Dropdown; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Dropdown._jQueryInterface; + }; + + return Dropdown; +})(jQuery); +//# sourceMappingURL=dropdown.js.map \ No newline at end of file diff --git a/js/dist/dropdown.js.map b/js/dist/dropdown.js.map new file mode 100644 index 000000000..fa59184e9 Binary files /dev/null and b/js/dist/dropdown.js.map differ diff --git a/js/dist/modal.js b/js/dist/modal.js new file mode 100644 index 000000000..2a6387725 --- /dev/null +++ b/js/dist/modal.js @@ -0,0 +1,529 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Modal = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'modal'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.modal'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 300; + var BACKDROP_TRANSITION_DURATION = 150; + + var Default = { + backdrop: true, + keyboard: true, + focus: true, + show: true + }; + + var DefaultType = { + backdrop: '(boolean|string)', + keyboard: 'boolean', + focus: 'boolean', + show: 'boolean' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + RESIZE: 'resize' + EVENT_KEY, + CLICK_DISMISS: 'click.dismiss' + EVENT_KEY, + KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY, + MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY, + MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + BACKDROP: 'modal-backdrop', + OPEN: 'modal-open', + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + DIALOG: '.modal-dialog', + DATA_TOGGLE: '[data-toggle="modal"]', + DATA_DISMISS: '[data-dismiss="modal"]', + SCROLLBAR_MEASURER: 'modal-scrollbar-measure' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Modal = (function () { + function Modal(element, config) { + _classCallCheck(this, Modal); + + this._config = this._getConfig(config); + this._element = element; + this._dialog = $(element).find(Selector.DIALOG)[0]; + this._backdrop = null; + this._isShown = false; + this._isBodyOverflowing = false; + this._ignoreBackdropClick = false; + this._originalBodyPadding = 0; + this._scrollbarWidth = 0; + } + + _createClass(Modal, [{ + key: 'toggle', + + // public + + value: function toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget); + } + }, { + key: 'show', + value: function show(relatedTarget) { + var _this = this; + + var showEvent = $.Event(Event.SHOW, { + relatedTarget: relatedTarget + }); + + $(this._element).trigger(showEvent); + + if (this._isShown || showEvent.isDefaultPrevented()) { + return; + } + + this._isShown = true; + + this._checkScrollbar(); + this._setScrollbar(); + + $(document.body).addClass(ClassName.OPEN); + + this._setEscapeEvent(); + this._setResizeEvent(); + + $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); + + $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { + $(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { + if ($(event.target).is(_this._element)) { + that._ignoreBackdropClick = true; + } + }); + }); + + this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); + } + }, { + key: 'hide', + value: function hide(event) { + if (event) { + event.preventDefault(); + } + + var hideEvent = $.Event(Event.HIDE); + + $(this._element).trigger(hideEvent); + + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return; + } + + this._isShown = false; + + this._setEscapeEvent(); + this._setResizeEvent(); + + $(document).off(Event.FOCUSIN); + + $(this._element).removeClass(ClassName.IN); + + $(this._element).off(Event.CLICK_DISMISS); + $(this._dialog).off(Event.MOUSEDOWN_DISMISS); + + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + + $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); + } else { + this._hideModal(); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + + $(window).off(EVENT_KEY); + $(document).off(EVENT_KEY); + $(this._element).off(EVENT_KEY); + $(this._backdrop).off(EVENT_KEY); + + this._config = null; + this._element = null; + this._dialog = null; + this._backdrop = null; + this._isShown = null; + this._isBodyOverflowing = null; + this._ignoreBackdropClick = null; + this._originalBodyPadding = null; + this._scrollbarWidth = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + } + }, { + key: '_showElement', + value: function _showElement(relatedTarget) { + var _this2 = this; + + var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); + + if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // don't move modals dom position + document.body.appendChild(this._element); + } + + this._element.style.display = 'block'; + this._element.scrollTop = 0; + + if (transition) { + Util.reflow(this._element); + } + + $(this._element).addClass(ClassName.IN); + + if (this._config.focus) this._enforceFocus(); + + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: relatedTarget + }); + + var transitionComplete = function transitionComplete() { + if (_this2._config.focus) _this2._element.focus(); + $(_this2._element).trigger(shownEvent); + }; + + if (transition) { + $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + transitionComplete(); + } + } + }, { + key: '_enforceFocus', + value: function _enforceFocus() { + var _this3 = this; + + $(document).off(Event.FOCUSIN) // guard against infinite focus loop + .on(Event.FOCUSIN, function (event) { + if (_this3._element !== event.target && !$(_this3._element).has(event.target).length) { + _this3._element.focus(); + } + }); + } + }, { + key: '_setEscapeEvent', + value: function _setEscapeEvent() { + var _this4 = this; + + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { + if (event.which === 27) { + _this4.hide(); + } + }); + } else if (!this._isShown) { + $(this._element).off(Event.KEYDOWN_DISMISS); + } + } + }, { + key: '_setResizeEvent', + value: function _setResizeEvent() { + if (this._isShown) { + $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); + } else { + $(window).off(Event.RESIZE); + } + } + }, { + key: '_hideModal', + value: function _hideModal() { + var _this5 = this; + + this._element.style.display = 'none'; + this._showBackdrop(function () { + $(document.body).removeClass(ClassName.OPEN); + _this5._resetAdjustments(); + _this5._resetScrollbar(); + $(_this5._element).trigger(Event.HIDDEN); + }); + } + }, { + key: '_removeBackdrop', + value: function _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove(); + this._backdrop = null; + } + } + }, { + key: '_showBackdrop', + value: function _showBackdrop(callback) { + var _this6 = this; + + var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; + + if (this._isShown && this._config.backdrop) { + var doAnimate = Util.supportsTransitionEnd() && animate; + + this._backdrop = document.createElement('div'); + this._backdrop.className = ClassName.BACKDROP; + + if (animate) { + $(this._backdrop).addClass(animate); + } + + $(this._backdrop).appendTo(this.$body); + + $(this._element).on(Event.CLICK_DISMISS, function (event) { + if (_this6._ignoreBackdropClick) { + _this6._ignoreBackdropClick = false; + return; + } + if (event.target !== event.currentTarget) { + return; + } + if (_this6._config.backdrop === 'static') { + _this6._element.focus(); + } else { + _this6.hide(); + } + }); + + if (doAnimate) { + Util.reflow(this._backdrop); + } + + $(this._backdrop).addClass(ClassName.IN); + + if (!callback) { + return; + } + + if (!doAnimate) { + callback(); + return; + } + + $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName.IN); + + var callbackRemove = function callbackRemove() { + _this6._removeBackdrop(); + if (callback) { + callback(); + } + }; + + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else { + callbackRemove(); + } + } else if (callback) { + callback(); + } + } + }, { + key: '_handleUpdate', + + // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + + value: function _handleUpdate() { + this._adjustDialog(); + } + }, { + key: '_adjustDialog', + value: function _adjustDialog() { + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + 'px'; + } + + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + 'px'; + } + } + }, { + key: '_resetAdjustments', + value: function _resetAdjustments() { + this._element.style.paddingLeft = ''; + this._element.style.paddingRight = ''; + } + }, { + key: '_checkScrollbar', + value: function _checkScrollbar() { + var fullWindowWidth = window.innerWidth; + if (!fullWindowWidth) { + // workaround for missing window.innerWidth in IE8 + var documentElementRect = document.documentElement.getBoundingClientRect(); + fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left); + } + this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth; + this._scrollbarWidth = this._getScrollbarWidth(); + } + }, { + key: '_setScrollbar', + value: function _setScrollbar() { + var bodyPadding = parseInt($(document.body).css('padding-right') || 0, 10); + + this._originalBodyPadding = document.body.style.paddingRight || ''; + + if (this._isBodyOverflowing) { + document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; + } + } + }, { + key: '_resetScrollbar', + value: function _resetScrollbar() { + document.body.style.paddingRight = this._originalBodyPadding; + } + }, { + key: '_getScrollbarWidth', + value: function _getScrollbarWidth() { + // thx d.walsh + var scrollDiv = document.createElement('div'); + scrollDiv.className = Selector.SCROLLBAR_MEASURER; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config, relatedTarget) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config); + + if (!data) { + data = new Modal(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](relatedTarget); + } else if (_config.show) { + data.show(relatedTarget); + } + }); + } + }]); + + return Modal; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + var _this7 = this; + + var target = undefined; + var selector = Util.getSelectorFromElement(this); + + if (selector) { + target = $(selector)[0]; + } + + var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data()); + + if (this.tagName === 'A') { + event.preventDefault(); + } + + var $target = $(target).one(Event.SHOW, function (showEvent) { + if (showEvent.isDefaultPrevented()) { + // only register focus restorer if modal will actually get shown + return; + } + + $target.one(Event.HIDDEN, function () { + if ($(_this7).is(':visible')) { + _this7.focus(); + } + }); + }); + + Modal._jQueryInterface.call($(target), config, this); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Modal._jQueryInterface; + $.fn[NAME].Constructor = Modal; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Modal._jQueryInterface; + }; + + return Modal; +})(jQuery); +//# sourceMappingURL=modal.js.map \ No newline at end of file diff --git a/js/dist/modal.js.map b/js/dist/modal.js.map new file mode 100644 index 000000000..5d10cd6d3 Binary files /dev/null and b/js/dist/modal.js.map differ diff --git a/js/dist/popover.js b/js/dist/popover.js new file mode 100644 index 000000000..8a30917c3 --- /dev/null +++ b/js/dist/popover.js @@ -0,0 +1,204 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): popover.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Popover = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'popover'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.popover'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Default = $.extend({}, Tooltip.Default, { + placement: 'right', + trigger: 'click', + content: '', + template: '' + }); + + var DefaultType = $.extend({}, Tooltip.DefaultType, { + content: '(string|function)' + }); + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TITLE: '.popover-title', + CONTENT: '.popover-content', + ARROW: '.popover-arrow' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + INSERTED: 'inserted' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + FOCUSOUT: 'focusout' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Popover = (function (_Tooltip) { + function Popover() { + _classCallCheck(this, Popover); + + if (_Tooltip != null) { + _Tooltip.apply(this, arguments); + } + } + + _inherits(Popover, _Tooltip); + + _createClass(Popover, [{ + key: 'isWithContent', + + // overrides + + value: function isWithContent() { + return this.getTitle() || this._getContent(); + } + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; + } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var content = this._getContent(); + var titleElement = $(tip).find(Selector.TITLE)[0]; + + if (titleElement) { + titleElement[this.config.html ? 'innerHTML' : 'innerText'] = title; + } + + // we use append for html objects to maintain js events + $(tip).find(Selector.CONTENT).children().detach().end()[this.config.html ? typeof content === 'string' ? 'html' : 'append' : 'text'](content); + + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); + + this.cleanupTether(); + } + }, { + key: '_getContent', + + // private + + value: function _getContent() { + return this.element.getAttribute('data-content') || (typeof this.config.content == 'function' ? this.config.content.call(this.element) : this.config.content); + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: 'EVENT_KEY', + get: function () { + return EVENT_KEY; + } + }, { + key: 'DefaultType', + get: function () { + return DefaultType; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; + + if (!data && /destroy|hide/.test(config)) { + return; + } + + if (!data) { + data = new Popover(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Popover; + })(Tooltip); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Popover._jQueryInterface; + $.fn[NAME].Constructor = Popover; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Popover._jQueryInterface; + }; + + return Popover; +})(jQuery); +//# sourceMappingURL=popover.js.map \ No newline at end of file diff --git a/js/dist/popover.js.map b/js/dist/popover.js.map new file mode 100644 index 000000000..edc130101 Binary files /dev/null and b/js/dist/popover.js.map differ diff --git a/js/dist/scrollspy.js b/js/dist/scrollspy.js new file mode 100644 index 000000000..b214f86ee --- /dev/null +++ b/js/dist/scrollspy.js @@ -0,0 +1,315 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): scrollspy.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var ScrollSpy = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'scrollspy'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.scrollspy'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Default = { + offset: 10, + method: 'auto', + target: '' + }; + + var DefaultType = { + offset: 'number', + method: 'string', + target: '(string|element)' + }; + + var Event = { + ACTIVATE: 'activate' + EVENT_KEY, + SCROLL: 'scroll' + EVENT_KEY, + LOAD_DATA_API: 'load' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active' + }; + + var Selector = { + DATA_SPY: '[data-spy="scroll"]', + ACTIVE: '.active', + LI: 'li', + LI_DROPDOWN: 'li.dropdown', + NAV_ANCHORS: '.nav li > a' + }; + + var OffsetMethod = { + OFFSET: 'offset', + POSITION: 'position' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var ScrollSpy = (function () { + function ScrollSpy(element, config) { + _classCallCheck(this, ScrollSpy); + + this._element = element; + this._scrollElement = element.tagName === 'BODY' ? window : element; + this._config = this._getConfig(config); + this._selector = '' + this._config.target + ' ' + Selector.NAV_ANCHORS; + this._offsets = []; + this._targets = []; + this._activeTarget = null; + this._scrollHeight = 0; + + $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)); + + this.refresh(); + this._process(); + } + + _createClass(ScrollSpy, [{ + key: 'refresh', + + // public + + value: function refresh() { + var _this = this; + + var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; + + var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; + + var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; + + this._offsets = []; + this._targets = []; + + this._scrollHeight = this._getScrollHeight(); + + var targets = $.makeArray($(this._selector)); + + targets.map(function (element) { + var target = undefined; + var targetSelector = Util.getSelectorFromElement(element); + + if (targetSelector) { + target = $(targetSelector)[0]; + } + + if (target && (target.offsetWidth || target.offsetHeight)) { + // todo (fat): remove sketch reliance on jQuery position/offset + return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; + } + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this._offsets.push(item[0]); + _this._targets.push(item[1]); + }); + } + }, { + key: 'dispose', + value: function dispose() { + $.removeData(this._element, DATA_KEY); + $(this._scrollElement).off(EVENT_KEY); + + this._element = null; + this._scrollElement = null; + this._config = null; + this._selector = null; + this._offsets = null; + this._targets = null; + this._activeTarget = null; + this._scrollHeight = null; + } + }, { + key: '_getConfig', + + // private + + value: function _getConfig(config) { + config = $.extend({}, Default, config); + + if (typeof config.target !== 'string') { + var id = $(config.target).attr('id'); + if (!id) { + id = Util.getUID(NAME); + $(config.target).attr('id', id); + } + config.target = '#' + id; + } + + Util.typeCheckConfig(NAME, config, DefaultType); + + return config; + } + }, { + key: '_getScrollTop', + value: function _getScrollTop() { + return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; + } + }, { + key: '_getScrollHeight', + value: function _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); + } + }, { + key: '_process', + value: function _process() { + var scrollTop = this._getScrollTop() + this._config.offset; + var scrollHeight = this._getScrollHeight(); + var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; + + if (this._scrollHeight !== scrollHeight) { + this.refresh(); + } + + if (scrollTop >= maxScroll) { + var target = this._targets[this._targets.length - 1]; + + if (this._activeTarget !== target) { + this._activate(target); + } + } + + if (this._activeTarget && scrollTop < this._offsets[0]) { + this._activeTarget = null; + this._clear(); + return; + } + + for (var i = this._offsets.length; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); + + if (isActiveTarget) { + this._activate(this._targets[i]); + } + } + } + }, { + key: '_activate', + value: function _activate(target) { + this._activeTarget = target; + + this._clear(); + + var selector = '' + this._selector + '[data-target="' + target + '"],' + ('' + this._selector + '[href="' + target + '"]'); + + // todo (fat): getting all the raw li's up the tree is not great. + var parentListItems = $(selector).parents(Selector.LI); + + for (var i = parentListItems.length; i--;) { + $(parentListItems[i]).addClass(ClassName.ACTIVE); + + var itemParent = parentListItems[i].parentNode; + + if (itemParent && $(itemParent).hasClass(ClassName.DROPDOWN_MENU)) { + var closestDropdown = $(itemParent).closest(Selector.LI_DROPDOWN)[0]; + $(closestDropdown).addClass(ClassName.ACTIVE); + } + } + + $(this._scrollElement).trigger(Event.ACTIVATE, { + relatedTarget: target + }); + } + }, { + key: '_clear', + value: function _clear() { + var activeParents = $(this._selector).parentsUntil(this._config.target, Selector.ACTIVE); + + for (var i = activeParents.length; i--;) { + $(activeParents[i]).removeClass(ClassName.ACTIVE); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' && config || null; + + if (!data) { + data = new ScrollSpy(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return ScrollSpy; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(window).on(Event.LOAD_DATA_API, function () { + var scrollSpys = $.makeArray($(Selector.DATA_SPY)); + + for (var i = scrollSpys.length; i--;) { + var $spy = $(scrollSpys[i]); + ScrollSpy._jQueryInterface.call($spy, $spy.data()); + } + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = ScrollSpy._jQueryInterface; + $.fn[NAME].Constructor = ScrollSpy; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return ScrollSpy._jQueryInterface; + }; + + return ScrollSpy; +})(jQuery); +//# sourceMappingURL=scrollspy.js.map \ No newline at end of file diff --git a/js/dist/scrollspy.js.map b/js/dist/scrollspy.js.map new file mode 100644 index 000000000..bde96eda3 Binary files /dev/null and b/js/dist/scrollspy.js.map differ diff --git a/js/dist/tab.js b/js/dist/tab.js new file mode 100644 index 000000000..95c561940 --- /dev/null +++ b/js/dist/tab.js @@ -0,0 +1,273 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tab.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Tab = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'tab'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tab'; + var EVENT_KEY = '.' + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + CLICK_DATA_API: 'click' + EVENT_KEY + '' + DATA_API_KEY + }; + + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active', + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + A: 'a', + LI: 'li', + LI_DROPDOWN: 'li.dropdown', + UL: 'ul:not(.dropdown-menu)', + FADE_CHILD: '> .fade', + ACTIVE: '.active', + ACTIVE_CHILD: '> .active', + DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]', + DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu > .active' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tab = (function () { + function Tab(element) { + _classCallCheck(this, Tab); + + this._element = element; + } + + _createClass(Tab, [{ + key: 'show', + + // public + + value: function show() { + var _this = this; + + if (this._element.parentNode && this._element.parentNode.nodeType == Node.ELEMENT_NODE && $(this._element).parent().hasClass(ClassName.ACTIVE)) { + return; + } + + var target = undefined; + var previous = undefined; + var ulElement = $(this._element).closest(Selector.UL)[0]; + var selector = Util.getSelectorFromElement(this._element); + + if (ulElement) { + previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); + previous = previous[previous.length - 1]; + + if (previous) { + previous = $(previous).find(Selector.A)[0]; + } + } + + var hideEvent = $.Event(Event.HIDE, { + relatedTarget: this._element + }); + + var showEvent = $.Event(Event.SHOW, { + relatedTarget: previous + }); + + if (previous) { + $(previous).trigger(hideEvent); + } + + $(this._element).trigger(showEvent); + + if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { + return; + } + + if (selector) { + target = $(selector)[0]; + } + + this._activate($(this._element).closest(Selector.LI)[0], ulElement); + + var complete = function complete() { + var hiddenEvent = $.Event(Event.HIDDEN, { + relatedTarget: _this._element + }); + + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: previous + }); + + $(previous).trigger(hiddenEvent); + $(_this._element).trigger(shownEvent); + }; + + if (target) { + this._activate(target, target.parentNode, complete); + } else { + complete(); + } + } + }, { + key: 'dispose', + value: function dispose() { + $.removeClass(this._element, DATA_KEY); + this._element = null; + } + }, { + key: '_activate', + + // private + + value: function _activate(element, container, callback) { + var active = $(container).find(Selector.ACTIVE_CHILD)[0]; + var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]); + + var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); + + if (active && isTransitioning) { + $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } + + if (active) { + $(active).removeClass(ClassName.IN); + } + } + }, { + key: '_transitionComplete', + value: function _transitionComplete(element, active, isTransitioning, callback) { + if (active) { + $(active).removeClass(ClassName.ACTIVE); + + var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; + if (dropdownChild) { + $(dropdownChild).removeClass(ClassName.ACTIVE); + } + + var activeToggle = $(active).find(Selector.DATA_TOGGLE)[0]; + if (activeToggle) { + activeToggle.setAttribute('aria-expanded', false); + } + } + + $(element).addClass(ClassName.ACTIVE); + + var elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + + if (isTransitioning) { + Util.reflow(element); + $(element).addClass(ClassName.IN); + } else { + $(element).removeClass(ClassName.FADE); + } + + if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { + + var dropdownElement = $(element).closest(Selector.LI_DROPDOWN)[0]; + if (dropdownElement) { + $(dropdownElement).addClass(ClassName.ACTIVE); + } + + elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + } + + if (callback) { + callback(); + } + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + + if (!data) { + data = data = new Tab(this); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tab; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + Tab._jQueryInterface.call($(this), 'show'); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tab._jQueryInterface; + $.fn[NAME].Constructor = Tab; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tab._jQueryInterface; + }; + + return Tab; +})(jQuery); +//# sourceMappingURL=tab.js.map \ No newline at end of file diff --git a/js/dist/tab.js.map b/js/dist/tab.js.map new file mode 100644 index 000000000..82a86ecb1 Binary files /dev/null and b/js/dist/tab.js.map differ diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js new file mode 100644 index 000000000..864e0bb76 --- /dev/null +++ b/js/dist/tooltip.js @@ -0,0 +1,594 @@ +'use strict'; + +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tooltip.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +var Tooltip = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'tooltip'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tooltip'; + var EVENT_KEY = '.' + DATA_KEY; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + var CLASS_PREFIX = 'bs-tether'; + + var Default = { + animation: true, + template: '', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + selector: false, + placement: 'top', + offset: '0 0', + constraints: [] + }; + + var DefaultType = { + animation: 'boolean', + template: 'string', + title: '(string|function)', + trigger: 'string', + delay: '(number|object)', + html: 'boolean', + selector: '(string|boolean)', + placement: '(string|function)', + offset: 'string', + constraints: 'array' + }; + + var AttachmentMap = { + TOP: 'bottom center', + RIGHT: 'middle left', + BOTTOM: 'top center', + LEFT: 'middle right' + }; + + var HoverState = { + IN: 'in', + OUT: 'out' + }; + + var Event = { + HIDE: 'hide' + EVENT_KEY, + HIDDEN: 'hidden' + EVENT_KEY, + SHOW: 'show' + EVENT_KEY, + SHOWN: 'shown' + EVENT_KEY, + INSERTED: 'inserted' + EVENT_KEY, + CLICK: 'click' + EVENT_KEY, + FOCUSIN: 'focusin' + EVENT_KEY, + FOCUSOUT: 'focusout' + EVENT_KEY, + MOUSEENTER: 'mouseenter' + EVENT_KEY, + MOUSELEAVE: 'mouseleave' + EVENT_KEY + }; + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TOOLTIP: '.tooltip', + TOOLTIP_INNER: '.tooltip-inner' + }; + + var TetherClass = { + element: false, + enabled: false + }; + + var Trigger = { + HOVER: 'hover', + FOCUS: 'focus', + CLICK: 'click', + MANUAL: 'manual' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tooltip = (function () { + function Tooltip(element, config) { + _classCallCheck(this, Tooltip); + + // private + this._isEnabled = true; + this._timeout = 0; + this._hoverState = ''; + this._activeTrigger = {}; + this._tether = null; + + // protected + this.element = element; + this.config = this._getConfig(config); + this.tip = null; + + this._setListeners(); + } + + _createClass(Tooltip, [{ + key: 'enable', + + // public + + value: function enable() { + this._isEnabled = true; + } + }, { + key: 'disable', + value: function disable() { + this._isEnabled = false; + } + }, { + key: 'toggleEnabled', + value: function toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + }, { + key: 'toggle', + value: function toggle(event) { + var context = this; + var dataKey = this.constructor.DATA_KEY; + + if (event) { + context = $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + context._activeTrigger.click = !context._activeTrigger.click; + + if (context._isWithActiveTrigger()) { + context._enter(null, context); + } else { + context._leave(null, context); + } + } else { + $(context.getTipElement()).hasClass(ClassName.IN) ? context._leave(null, context) : context._enter(null, context); + } + } + }, { + key: 'dispose', + value: function dispose() { + clearTimeout(this._timeout); + + this.cleanupTether(); + + $.removeData(this.element, this.constructor.DATA_KEY); + + $(this.element).off(this.constructor.EVENT_KEY); + + if (this.tip) { + $(this.tip).remove(); + } + + this._isEnabled = null; + this._timeout = null; + this._hoverState = null; + this._activeTrigger = null; + this._tether = null; + + this.element = null; + this.config = null; + this.tip = null; + } + }, { + key: 'show', + value: function show() { + var _this = this; + + var showEvent = $.Event(this.constructor.Event.SHOW); + + if (this.isWithContent() && this._isEnabled) { + $(this.element).trigger(showEvent); + + var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); + + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return; + } + + var tip = this.getTipElement(); + var tipId = Util.getUID(this.constructor.NAME); + + tip.setAttribute('id', tipId); + this.element.setAttribute('aria-describedby', tipId); + + this.setContent(); + + if (this.config.animation) { + $(tip).addClass(ClassName.FADE); + } + + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; + + var attachment = this._getAttachment(placement); + + $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); + + $(this.element).trigger(this.constructor.Event.INSERTED); + + this._tether = new Tether({ + element: tip, + target: this.element, + attachment: attachment, + classes: TetherClass, + classPrefix: CLASS_PREFIX, + offset: this.config.offset, + constraints: this.config.constraints + }); + + Util.reflow(tip); + this._tether.position(); + + $(tip).addClass(ClassName.IN); + + var complete = function complete() { + var prevHoverState = _this._hoverState; + _this._hoverState = null; + + $(_this.element).trigger(_this.constructor.Event.SHOWN); + + if (prevHoverState === HoverState.OUT) { + _this._leave(null, _this); + } + }; + + Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ? $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION) : complete(); + } + } + }, { + key: 'hide', + value: function hide(callback) { + var _this2 = this; + + var tip = this.getTipElement(); + var hideEvent = $.Event(this.constructor.Event.HIDE); + var complete = function complete() { + if (_this2._hoverState !== HoverState.IN && tip.parentNode) { + tip.parentNode.removeChild(tip); + } + + _this2.element.removeAttribute('aria-describedby'); + $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); + _this2.cleanupTether(); + + if (callback) { + callback(); + } + }; + + $(this.element).trigger(hideEvent); + + if (hideEvent.isDefaultPrevented()) { + return; + } + + $(tip).removeClass(ClassName.IN); + + if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { + + $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } + + this._hoverState = ''; + } + }, { + key: 'isWithContent', + + // protected + + value: function isWithContent() { + return !!this.getTitle(); + } + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; + } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var method = this.config.html ? 'innerHTML' : 'innerText'; + + $(tip).find(Selector.TOOLTIP_INNER)[0][method] = title; + + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); + + this.cleanupTether(); + } + }, { + key: 'getTitle', + value: function getTitle() { + var title = this.element.getAttribute('data-original-title'); + + if (!title) { + title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + } + + return title; + } + }, { + key: 'cleanupTether', + value: function cleanupTether() { + if (this._tether) { + this._tether.destroy(); + + // clean up after tether's junk classes + // remove after they fix issue + // (https://github.com/HubSpot/tether/issues/36) + $(this.element).removeClass(this._removeTetherClasses); + $(this.tip).removeClass(this._removeTetherClasses); + } + } + }, { + key: '_getAttachment', + + // private + + value: function _getAttachment(placement) { + return AttachmentMap[placement.toUpperCase()]; + } + }, { + key: '_setListeners', + value: function _setListeners() { + var _this3 = this; + + var triggers = this.config.trigger.split(' '); + + triggers.forEach(function (trigger) { + if (trigger === 'click') { + $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, $.proxy(_this3.toggle, _this3)); + } else if (trigger !== Trigger.MANUAL) { + var eventIn = trigger == Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; + var eventOut = trigger == Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; + + $(_this3.element).on(eventIn, _this3.config.selector, $.proxy(_this3._enter, _this3)).on(eventOut, _this3.config.selector, $.proxy(_this3._leave, _this3)); + } + }); + + if (this.config.selector) { + this.config = $.extend({}, this.config, { + trigger: 'manual', + selector: '' + }); + } else { + this._fixTitle(); + } + } + }, { + key: '_removeTetherClasses', + value: function _removeTetherClasses(i, css) { + return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' '); + } + }, { + key: '_fixTitle', + value: function _fixTitle() { + var titleType = typeof this.element.getAttribute('data-original-title'); + if (this.element.getAttribute('title') || titleType !== 'string') { + this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); + this.element.setAttribute('title', ''); + } + } + }, { + key: '_enter', + value: function _enter(event, context) { + var dataKey = this.constructor.DATA_KEY; + + context = context || $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; + } + + if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { + context._hoverState = HoverState.IN; + return; + } + + clearTimeout(context._timeout); + + context._hoverState = HoverState.IN; + + if (!context.config.delay || !context.config.delay.show) { + context.show(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.IN) { + context.show(); + } + }, context.config.delay.show); + } + }, { + key: '_leave', + value: function _leave(event, context) { + var dataKey = this.constructor.DATA_KEY; + + context = context || $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type == 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; + } + + if (context._isWithActiveTrigger()) { + return; + } + + clearTimeout(context._timeout); + + context._hoverState = HoverState.OUT; + + if (!context.config.delay || !context.config.delay.hide) { + context.hide(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.OUT) { + context.hide(); + } + }, context.config.delay.hide); + } + }, { + key: '_isWithActiveTrigger', + value: function _isWithActiveTrigger() { + for (var trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true; + } + } + + return false; + } + }, { + key: '_getConfig', + value: function _getConfig(config) { + config = $.extend({}, this.constructor.Default, $(this.element).data(), config); + + if (config.delay && typeof config.delay === 'number') { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + + Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); + + return config; + } + }, { + key: '_getDelegateConfig', + value: function _getDelegateConfig() { + var config = {}; + + if (this.config) { + for (var key in this.config) { + var value = this.config[key]; + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + } + + return config; + } + }], [{ + key: 'VERSION', + + // getters + + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: 'EVENT_KEY', + get: function () { + return EVENT_KEY; + } + }, { + key: 'DefaultType', + get: function () { + return DefaultType; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; + + if (!data && /destroy|hide/.test(config)) { + return; + } + + if (!data) { + data = new Tooltip(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tooltip; + })(); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tooltip._jQueryInterface; + $.fn[NAME].Constructor = Tooltip; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tooltip._jQueryInterface; + }; + + return Tooltip; +})(jQuery); +//# sourceMappingURL=tooltip.js.map \ No newline at end of file diff --git a/js/dist/tooltip.js.map b/js/dist/tooltip.js.map new file mode 100644 index 000000000..e823424cb Binary files /dev/null and b/js/dist/tooltip.js.map differ diff --git a/js/dist/util.js b/js/dist/util.js new file mode 100644 index 000000000..a135c3f38 --- /dev/null +++ b/js/dist/util.js @@ -0,0 +1,151 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +'use strict'; + +var Util = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Private TransitionEnd Helpers + * ------------------------------------------------------------------------ + */ + + var transition = false; + + var TransitionEndEvent = { + WebkitTransition: 'webkitTransitionEnd', + MozTransition: 'transitionend', + OTransition: 'oTransitionEnd otransitionend', + transition: 'transitionend' + }; + + // shoutout AngusCroll (https://goo.gl/pxwQGp) + function toType(obj) { + return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); + } + + function isElement(obj) { + return (obj[0] || obj).nodeType; + } + + function getSpecialTransitionEndEvent() { + return { + bindType: transition.end, + delegateType: transition.end, + handle: function handle(event) { + if ($(event.target).is(this)) { + return event.handleObj.handler.apply(this, arguments); + } + } + }; + } + + function transitionEndTest() { + if (window.QUnit) { + return false; + } + + var el = document.createElement('bootstrap'); + + for (var name in TransitionEndEvent) { + if (el.style[name] !== undefined) { + return { end: TransitionEndEvent[name] }; + } + } + + return false; + } + + function transitionEndEmulator(duration) { + var _this = this; + + var called = false; + + $(this).one(Util.TRANSITION_END, function () { + called = true; + }); + + setTimeout(function () { + if (!called) { + Util.triggerTransitionEnd(_this); + } + }, duration); + + return this; + } + + function setTransitionEndSupport() { + transition = transitionEndTest(); + + $.fn.emulateTransitionEnd = transitionEndEmulator; + + if (Util.supportsTransitionEnd()) { + $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); + } + } + + /** + * -------------------------------------------------------------------------- + * Public Util Api + * -------------------------------------------------------------------------- + */ + + var Util = { + + TRANSITION_END: 'bsTransitionEnd', + + getUID: function getUID(prefix) { + do prefix += ~ ~(Math.random() * 1000000); while (document.getElementById(prefix)); + return prefix; + }, + + getSelectorFromElement: function getSelectorFromElement(element) { + var selector = element.getAttribute('data-target'); + + if (!selector) { + selector = element.getAttribute('href') || ''; + selector = /^#[a-z]/i.test(selector) ? selector : null; + } + + return selector; + }, + + reflow: function reflow(element) { + new Function('bs', 'return bs')(element.offsetHeight); + }, + + triggerTransitionEnd: function triggerTransitionEnd(element) { + $(element).trigger(transition.end); + }, + + supportsTransitionEnd: function supportsTransitionEnd() { + return !!transition; + }, + + typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { + + for (var property in configTypes) { + var expectedTypes = configTypes[property]; + var value = config[property]; + var valueType = undefined; + + if (value && isElement(value)) valueType = 'element';else valueType = toType(value); + + if (!new RegExp(expectedTypes).test(valueType)) { + throw new Error('' + componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".')); + } + } + } + + }; + + setTransitionEndSupport(); + + return Util; +})(jQuery); +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/js/dist/util.js.map b/js/dist/util.js.map new file mode 100644 index 000000000..7c73c492e Binary files /dev/null and b/js/dist/util.js.map differ diff --git a/js/dropdown.js b/js/dropdown.js deleted file mode 100644 index 8fd86a025..000000000 --- a/js/dropdown.js +++ /dev/null @@ -1,165 +0,0 @@ -/* ======================================================================== - * Bootstrap: dropdown.js v3.3.4 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.VERSION = '3.3.4' - - function getParent($this) { - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = selector && $(selector) - - return $parent && $parent.length ? $parent : $this.parent() - } - - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } - - if (!$parent.hasClass('open')) return - - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return - - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) - }) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $(document.createElement('div')) - .addClass('dropdown-backdrop') - .insertAfter($(this)) - .on('click', clearMenus) - } - - var relatedTarget = { relatedTarget: this } - $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this - .trigger('focus') - .attr('aria-expanded', 'true') - - $parent - .toggleClass('open') - .trigger('shown.bs.dropdown', relatedTarget) - } - - return false - } - - Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return - - var $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - if (!isActive && e.which != 27 || isActive && e.which == 27) { - if (e.which == 27) $parent.find(toggle).trigger('focus') - return $this.trigger('click') - } - - var desc = ' li:not(.disabled):visible a' - var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) - - if (!$items.length) return - - var index = $items.index(e.target) - - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 - - $items.eq(index).trigger('focus') - } - - - // DROPDOWN PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.dropdown') - - if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.dropdown - - $.fn.dropdown = Plugin - $.fn.dropdown.Constructor = Dropdown - - - // DROPDOWN NO CONFLICT - // ==================== - - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } - - - // APPLY TO STANDARD DROPDOWN ELEMENTS - // =================================== - - $(document) - .on('click.bs.dropdown.data-api', clearMenus) - .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) - .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) - -}(jQuery); diff --git a/js/modal.js b/js/modal.js deleted file mode 100644 index 0426561af..000000000 --- a/js/modal.js +++ /dev/null @@ -1,337 +0,0 @@ -/* ======================================================================== - * Bootstrap: modal.js v3.3.4 - * http://getbootstrap.com/javascript/#modals - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // MODAL CLASS DEFINITION - // ====================== - - var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$dialog = this.$element.find('.modal-dialog') - this.$backdrop = null - this.isShown = null - this.originalBodyPad = null - this.scrollbarWidth = 0 - this.ignoreBackdropClick = false - - if (this.options.remote) { - this.$element - .find('.modal-content') - .load(this.options.remote, $.proxy(function () { - this.$element.trigger('loaded.bs.modal') - }, this)) - } - } - - Modal.VERSION = '3.3.4' - - Modal.TRANSITION_DURATION = 300 - Modal.BACKDROP_TRANSITION_DURATION = 150 - - Modal.DEFAULTS = { - backdrop: true, - keyboard: true, - show: true - } - - Modal.prototype.toggle = function (_relatedTarget) { - return this.isShown ? this.hide() : this.show(_relatedTarget) - } - - Modal.prototype.show = function (_relatedTarget) { - var that = this - var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - this.isShown = true - - this.checkScrollbar() - this.setScrollbar() - this.$body.addClass('modal-open') - - this.escape() - this.resize() - - this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) - - this.$dialog.on('mousedown.dismiss.bs.modal', function () { - that.$element.one('mouseup.dismiss.bs.modal', function (e) { - if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true - }) - }) - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(that.$body) // don't move modals dom position - } - - that.$element - .show() - .scrollTop(0) - - that.adjustDialog() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - that.enforceFocus() - - var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) - - transition ? - that.$dialog // wait for modal to slide in - .one('bsTransitionEnd', function () { - that.$element.trigger('focus').trigger(e) - }) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - that.$element.trigger('focus').trigger(e) - }) - } - - Modal.prototype.hide = function (e) { - if (e) e.preventDefault() - - e = $.Event('hide.bs.modal') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - this.resize() - - $(document).off('focusin.bs.modal') - - this.$element - .removeClass('in') - .off('click.dismiss.bs.modal') - .off('mouseup.dismiss.bs.modal') - - this.$dialog.off('mousedown.dismiss.bs.modal') - - $.support.transition && this.$element.hasClass('fade') ? - this.$element - .one('bsTransitionEnd', $.proxy(this.hideModal, this)) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - this.hideModal() - } - - Modal.prototype.enforceFocus = function () { - $(document) - .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', $.proxy(function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.trigger('focus') - } - }, this)) - } - - Modal.prototype.escape = function () { - if (this.isShown && this.options.keyboard) { - this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { - e.which == 27 && this.hide() - }, this)) - } else if (!this.isShown) { - this.$element.off('keydown.dismiss.bs.modal') - } - } - - Modal.prototype.resize = function () { - if (this.isShown) { - $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) - } else { - $(window).off('resize.bs.modal') - } - } - - Modal.prototype.hideModal = function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.$body.removeClass('modal-open') - that.resetAdjustments() - that.resetScrollbar() - that.$element.trigger('hidden.bs.modal') - }) - } - - Modal.prototype.removeBackdrop = function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } - - Modal.prototype.backdrop = function (callback) { - var that = this - var animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $(document.createElement('div')) - .addClass('modal-backdrop ' + animate) - .appendTo(this.$body) - - this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { - if (this.ignoreBackdropClick) { - this.ignoreBackdropClick = false - return - } - if (e.target !== e.currentTarget) return - this.options.backdrop == 'static' - ? this.$element[0].focus() - : this.hide() - }, this)) - - if (doAnimate) this.$backdrop[0].offsetWidth // force reflow - - this.$backdrop.addClass('in') - - if (!callback) return - - doAnimate ? - this.$backdrop - .one('bsTransitionEnd', callback) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callback() - - } else if (!this.isShown && this.$backdrop) { - this.$backdrop.removeClass('in') - - var callbackRemove = function () { - that.removeBackdrop() - callback && callback() - } - $.support.transition && this.$element.hasClass('fade') ? - this.$backdrop - .one('bsTransitionEnd', callbackRemove) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callbackRemove() - - } else if (callback) { - callback() - } - } - - // these following methods are used to handle overflowing modals - - Modal.prototype.handleUpdate = function () { - this.adjustDialog() - } - - Modal.prototype.adjustDialog = function () { - var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight - - this.$element.css({ - paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', - paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' - }) - } - - Modal.prototype.resetAdjustments = function () { - this.$element.css({ - paddingLeft: '', - paddingRight: '' - }) - } - - Modal.prototype.checkScrollbar = function () { - var fullWindowWidth = window.innerWidth - if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 - var documentElementRect = document.documentElement.getBoundingClientRect() - fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) - } - this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth - this.scrollbarWidth = this.measureScrollbar() - } - - Modal.prototype.setScrollbar = function () { - var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) - this.originalBodyPad = document.body.style.paddingRight || '' - if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) - } - - Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', this.originalBodyPad) - } - - Modal.prototype.measureScrollbar = function () { // thx walsh - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - this.$body.append(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - this.$body[0].removeChild(scrollDiv) - return scrollbarWidth - } - - - // MODAL PLUGIN DEFINITION - // ======================= - - function Plugin(option, _relatedTarget) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.modal') - var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data) $this.data('bs.modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option](_relatedTarget) - else if (options.show) data.show(_relatedTarget) - }) - } - - var old = $.fn.modal - - $.fn.modal = Plugin - $.fn.modal.Constructor = Modal - - - // MODAL NO CONFLICT - // ================= - - $.fn.modal.noConflict = function () { - $.fn.modal = old - return this - } - - - // MODAL DATA-API - // ============== - - $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { - var $this = $(this) - var href = $this.attr('href') - var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 - var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) - - if ($this.is('a')) e.preventDefault() - - $target.one('show.bs.modal', function (showEvent) { - if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown - $target.one('hidden.bs.modal', function () { - $this.is(':visible') && $this.trigger('focus') - }) - }) - Plugin.call($target, option, this) - }) - -}(jQuery); diff --git a/js/popover.js b/js/popover.js deleted file mode 100644 index 0b0755ee2..000000000 --- a/js/popover.js +++ /dev/null @@ -1,108 +0,0 @@ -/* ======================================================================== - * Bootstrap: popover.js v3.3.4 - * http://getbootstrap.com/javascript/#popovers - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // POPOVER PUBLIC CLASS DEFINITION - // =============================== - - var Popover = function (element, options) { - this.init('popover', element, options) - } - - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') - - Popover.VERSION = '3.3.4' - - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { - placement: 'right', - trigger: 'click', - content: '', - template: '' - }) - - - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ - - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) - - Popover.prototype.constructor = Popover - - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } - - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() - - $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) - $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events - this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' - ](content) - - $tip.removeClass('fade top bottom left right in') - - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } - - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } - - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options - - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } - - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } - - - // POPOVER PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.popover - - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover - - - // POPOVER NO CONFLICT - // =================== - - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } - -}(jQuery); diff --git a/js/scrollspy.js b/js/scrollspy.js deleted file mode 100644 index f860c1aba..000000000 --- a/js/scrollspy.js +++ /dev/null @@ -1,172 +0,0 @@ -/* ======================================================================== - * Bootstrap: scrollspy.js v3.3.4 - * http://getbootstrap.com/javascript/#scrollspy - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.4' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(href) - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target - - this.clear() - - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' - - var active = $(selector) - .parents('li') - .addClass('active') - - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') - } - - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } - - - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.scrollspy - - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy - - - // SCROLLSPY NO CONFLICT - // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - - - // SCROLLSPY DATA-API - // ================== - - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) - -}(jQuery); diff --git a/js/src/alert.js b/js/src/alert.js new file mode 100644 index 000000000..eda74d706 --- /dev/null +++ b/js/src/alert.js @@ -0,0 +1,192 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): alert.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Alert = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'alert' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.alert' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const TRANSITION_DURATION = 150 + + const Selector = { + DISMISS : '[data-dismiss="alert"]' + } + + const Event = { + CLOSE : `close${EVENT_KEY}`, + CLOSED : `closed${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + ALERT : 'alert', + FADE : 'fade', + IN : 'in' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Alert { + + constructor(element) { + this._element = element + } + + + // getters + + static get VERSION() { + return VERSION + } + + + // public + + close(element) { + element = element || this._element + + let rootElement = this._getRootElement(element) + let customEvent = this._triggerCloseEvent(rootElement) + + if (customEvent.isDefaultPrevented()) { + return + } + + this._removeElement(rootElement) + } + + dispose() { + $.removeData(this._element, DATA_KEY) + this._element = null + } + + + // private + + _getRootElement(element) { + let parent = false + let selector = Util.getSelectorFromElement(element) + + if (selector) { + parent = $(selector)[0] + } + + if (!parent) { + parent = $(element).closest(`.${ClassName.ALERT}`)[0] + } + + return parent + } + + _triggerCloseEvent(element) { + var closeEvent = $.Event(Event.CLOSE) + $(element).trigger(closeEvent) + return closeEvent + } + + _removeElement(element) { + $(element).removeClass(ClassName.IN) + + if (!Util.supportsTransitionEnd() || + !$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element) + return + } + + $(element) + .one(Util.TRANSITION_END, this._destroyElement.bind(this, element)) + .emulateTransitionEnd(TRANSITION_DURATION) + } + + _destroyElement(element) { + $(element) + .detach() + .trigger(Event.CLOSED) + .remove() + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let $element = $(this) + let data = $element.data(DATA_KEY) + + if (!data) { + data = new Alert(this) + $element.data(DATA_KEY, data) + } + + if (config === 'close') { + data[config](this) + } + }) + } + + static _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault() + } + + alertInstance.close(this) + } + } + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on( + Event.CLICK_DATA_API, + Selector.DISMISS, + Alert._handleDismiss(new Alert()) + ) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Alert._jQueryInterface + $.fn[NAME].Constructor = Alert + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Alert._jQueryInterface + } + + return Alert + +})(jQuery) + +export default Alert diff --git a/js/src/button.js b/js/src/button.js new file mode 100644 index 000000000..8210e8ae0 --- /dev/null +++ b/js/src/button.js @@ -0,0 +1,174 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): button.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Button = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'button' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.button' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const TRANSITION_DURATION = 150 + + const ClassName = { + ACTIVE : 'active', + BUTTON : 'btn', + FOCUS : 'focus' + } + + const Selector = { + DATA_TOGGLE_CARROT : '[data-toggle^="button"]', + DATA_TOGGLE : '[data-toggle="buttons"]', + INPUT : 'input', + ACTIVE : '.active', + BUTTON : '.btn' + } + + const Event = { + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`, + FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} ` + + `blur${EVENT_KEY}${DATA_API_KEY}` + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Button { + + constructor(element) { + this._element = element + } + + + // getters + + static get VERSION() { + return VERSION + } + + + // public + + toggle() { + let triggerChangeEvent = true + let rootElement = $(this._element).closest( + Selector.DATA_TOGGLE + )[0] + + if (rootElement) { + let input = $(this._element).find(Selector.INPUT)[0] + + if (input) { + if (input.type === 'radio') { + if (input.checked && + $(this._element).hasClass(ClassName.ACTIVE)) { + triggerChangeEvent = false + + } else { + let activeElement = $(rootElement).find(Selector.ACTIVE)[0] + + if (activeElement) { + $(activeElement).removeClass(ClassName.ACTIVE) + } + } + } + + if (triggerChangeEvent) { + input.checked = !$(this._element).hasClass(ClassName.ACTIVE) + $(this._element).trigger('change') + } + } + } else { + this._element.setAttribute('aria-pressed', + !$(this._element).hasClass(ClassName.ACTIVE)) + } + + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName.ACTIVE) + } + } + + dispose() { + $.removeData(this._element, DATA_KEY) + this._element = null + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + + if (!data) { + data = new Button(this) + $(this).data(DATA_KEY, data) + } + + if (config === 'toggle') { + data[config]() + } + }) + } + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document) + .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + event.preventDefault() + + let button = event.target + + if (!$(button).hasClass(ClassName.BUTTON)) { + button = $(button).closest(Selector.BUTTON) + } + + Button._jQueryInterface.call($(button), 'toggle') + }) + .on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + var button = $(event.target).closest(Selector.BUTTON)[0] + $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)) + }) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Button._jQueryInterface + $.fn[NAME].Constructor = Button + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Button._jQueryInterface + } + + return Button + +})(jQuery) + +export default Button diff --git a/js/src/carousel.js b/js/src/carousel.js new file mode 100644 index 000000000..c11f0a599 --- /dev/null +++ b/js/src/carousel.js @@ -0,0 +1,468 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Carousel = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'carousel' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.carousel' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const TRANSITION_DURATION = 600 + + const Default = { + interval : 5000, + keyboard : true, + slide : false, + pause : 'hover', + wrap : true + } + + const DefaultType = { + interval : '(number|boolean)', + keyboard : 'boolean', + slide : '(boolean|string)', + pause : '(string|boolean)', + wrap : 'boolean' + } + + const Direction = { + NEXT : 'next', + PREVIOUS : 'prev' + } + + const Event = { + SLIDE : `slide${EVENT_KEY}`, + SLID : `slid${EVENT_KEY}`, + KEYDOWN : `keydown${EVENT_KEY}`, + MOUSEENTER : `mouseenter${EVENT_KEY}`, + MOUSELEAVE : `mouseleave${EVENT_KEY}`, + LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + CAROUSEL : 'carousel', + ACTIVE : 'active', + SLIDE : 'slide', + RIGHT : 'right', + LEFT : 'left', + ITEM : 'carousel-item' + } + + const Selector = { + ACTIVE : '.active', + ACTIVE_ITEM : '.active.carousel-item', + ITEM : '.carousel-item', + NEXT_PREV : '.next, .prev', + INDICATORS : '.carousel-indicators', + DATA_SLIDE : '[data-slide], [data-slide-to]', + DATA_RIDE : '[data-ride="carousel"]' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Carousel { + + constructor(element, config) { + this._items = null + this._interval = null + this._activeElement = null + + this._isPaused = false + this._isSliding = false + + this._config = this._getConfig(config) + this._element = $(element)[0] + this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0] + + this._addEventListeners() + } + + + // getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + + // public + + next() { + if (!this._isSliding) { + this._slide(Direction.NEXT) + } + } + + prev() { + if (!this._isSliding) { + this._slide(Direction.PREVIOUS) + } + } + + pause(event) { + if (!event) { + this._isPaused = true + } + + if ($(this._element).find(Selector.NEXT_PREV)[0] && + Util.supportsTransitionEnd()) { + Util.triggerTransitionEnd(this._element) + this.cycle(true) + } + + clearInterval(this._interval) + this._interval = null + } + + cycle(event) { + if (!event) { + this._isPaused = false + } + + if (this._interval) { + clearInterval(this._interval) + this._interval = null + } + + if (this._config.interval && !this._isPaused) { + this._interval = setInterval( + $.proxy(this.next, this), this._config.interval + ) + } + } + + to(index) { + this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0] + + let activeIndex = this._getItemIndex(this._activeElement) + + if (index > (this._items.length - 1) || index < 0) { + return + } + + if (this._isSliding) { + $(this._element).one(Event.SLID, () => this.to(index)) + return + } + + if (activeIndex == index) { + this.pause() + this.cycle() + return + } + + var direction = index > activeIndex ? + Direction.NEXT : + Direction.PREVIOUS + + this._slide(direction, this._items[index]) + } + + dispose() { + $(this._element).off(EVENT_KEY) + $.removeData(this._element, DATA_KEY) + + this._items = null + this._config = null + this._element = null + this._interval = null + this._isPaused = null + this._isSliding = null + this._activeElement = null + this._indicatorsElement = null + } + + + // private + + _getConfig(config) { + config = $.extend({}, Default, config) + Util.typeCheckConfig(NAME, config, DefaultType) + return config + } + + _addEventListeners() { + if (this._config.keyboard) { + $(this._element) + .on(Event.KEYDOWN, $.proxy(this._keydown, this)) + } + + if (this._config.pause == 'hover' && + !('ontouchstart' in document.documentElement)) { + $(this._element) + .on(Event.MOUSEENTER, $.proxy(this.pause, this)) + .on(Event.MOUSELEAVE, $.proxy(this.cycle, this)) + } + } + + _keydown(event) { + event.preventDefault() + + if (/input|textarea/i.test(event.target.tagName)) return + + switch (event.which) { + case 37: this.prev(); break + case 39: this.next(); break + default: return + } + } + + _getItemIndex(element) { + this._items = $.makeArray($(element).parent().find(Selector.ITEM)) + return this._items.indexOf(element) + } + + _getItemByDirection(direction, activeElement) { + let isNextDirection = direction === Direction.NEXT + let isPrevDirection = direction === Direction.PREVIOUS + let activeIndex = this._getItemIndex(activeElement) + let lastItemIndex = (this._items.length - 1) + let isGoingToWrap = (isPrevDirection && activeIndex === 0) || + (isNextDirection && activeIndex == lastItemIndex) + + if (isGoingToWrap && !this._config.wrap) { + return activeElement + } + + let delta = direction == Direction.PREVIOUS ? -1 : 1 + let itemIndex = (activeIndex + delta) % this._items.length + + return itemIndex === -1 ? + this._items[this._items.length - 1] : this._items[itemIndex] + } + + + _triggerSlideEvent(relatedTarget, directionalClassname) { + let slideEvent = $.Event(Event.SLIDE, { + relatedTarget: relatedTarget, + direction: directionalClassname + }) + + $(this._element).trigger(slideEvent) + + return slideEvent + } + + _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + $(this._indicatorsElement) + .find(Selector.ACTIVE) + .removeClass(ClassName.ACTIVE) + + let nextIndicator = this._indicatorsElement.children[ + this._getItemIndex(element) + ] + + if (nextIndicator) { + $(nextIndicator).addClass(ClassName.ACTIVE) + } + } + } + + _slide(direction, element) { + let activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0] + let nextElement = element || activeElement && + this._getItemByDirection(direction, activeElement) + + let isCycling = !!this._interval + + let directionalClassName = direction == Direction.NEXT ? + ClassName.LEFT : + ClassName.RIGHT + + if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { + this._isSliding = false + return + } + + let slideEvent = this._triggerSlideEvent(nextElement, directionalClassName) + if (slideEvent.isDefaultPrevented()) { + return + } + + if (!activeElement || !nextElement) { + // some weirdness is happening, so we bail + return + } + + this._isSliding = true + + if (isCycling) { + this.pause() + } + + this._setActiveIndicatorElement(nextElement) + + var slidEvent = $.Event(Event.SLID, { + relatedTarget: nextElement, + direction: directionalClassName + }) + + if (Util.supportsTransitionEnd() && + $(this._element).hasClass(ClassName.SLIDE)) { + + $(nextElement).addClass(direction) + + Util.reflow(nextElement) + + $(activeElement).addClass(directionalClassName) + $(nextElement).addClass(directionalClassName) + + $(activeElement) + .one(Util.TRANSITION_END, () => { + $(nextElement) + .removeClass(directionalClassName) + .removeClass(direction) + + $(nextElement).addClass(ClassName.ACTIVE) + + $(activeElement) + .removeClass(ClassName.ACTIVE) + .removeClass(direction) + .removeClass(directionalClassName) + + this._isSliding = false + + setTimeout(() => $(this._element).trigger(slidEvent), 0) + + }) + .emulateTransitionEnd(TRANSITION_DURATION) + + } else { + $(activeElement).removeClass(ClassName.ACTIVE) + $(nextElement).addClass(ClassName.ACTIVE) + + this._isSliding = false + $(this._element).trigger(slidEvent) + } + + if (isCycling) { + this.cycle() + } + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = $.extend({}, Default, $(this).data()) + + if (typeof config === 'object') { + $.extend(_config, config) + } + + let action = typeof config === 'string' ? config : _config.slide + + if (!data) { + data = new Carousel(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config == 'number') { + data.to(config) + + } else if (action) { + data[action]() + + } else if (_config.interval) { + data.pause() + data.cycle() + } + }) + } + + static _dataApiClickHandler(event) { + let selector = Util.getSelectorFromElement(this) + + if (!selector) { + return + } + + let target = $(selector)[0] + + if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { + return + } + + let config = $.extend({}, $(target).data(), $(this).data()) + + let slideIndex = this.getAttribute('data-slide-to') + if (slideIndex) { + config.interval = false + } + + Carousel._jQueryInterface.call($(target), config) + + if (slideIndex) { + $(target).data(DATA_KEY).to(slideIndex) + } + + event.preventDefault() + } + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document) + .on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler) + + $(window).on(Event.LOAD_DATA_API, function () { + $(Selector.DATA_RIDE).each(function () { + let $carousel = $(this) + Carousel._jQueryInterface.call($carousel, $carousel.data()) + }) + }) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Carousel._jQueryInterface + $.fn[NAME].Constructor = Carousel + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Carousel._jQueryInterface + } + + return Carousel + +})(jQuery) + +export default Carousel diff --git a/js/src/collapse.js b/js/src/collapse.js new file mode 100644 index 000000000..e911c98d1 --- /dev/null +++ b/js/src/collapse.js @@ -0,0 +1,379 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): collapse.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Collapse = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'collapse' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.collapse' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const TRANSITION_DURATION = 600 + + const Default = { + toggle : true, + parent : '' + } + + const DefaultType = { + toggle : 'boolean', + parent : 'string' + } + + const Event = { + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + IN : 'in', + COLLAPSE : 'collapse', + COLLAPSING : 'collapsing', + COLLAPSED : 'collapsed' + } + + const Dimension = { + WIDTH : 'width', + HEIGHT : 'height' + } + + const Selector = { + ACTIVES : '.panel > .in, .panel > .collapsing', + DATA_TOGGLE : '[data-toggle="collapse"]' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Collapse { + + constructor(element, config) { + this._isTransitioning = false + this._element = element + this._config = this._getConfig(config) + this._triggerArray = $.makeArray($( + `[data-toggle="collapse"][href="#${element.id}"],` + + `[data-toggle="collapse"][data-target="#${element.id}"]` + )) + + this._parent = this._config.parent ? this._getParent() : null + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray) + } + + if (this._config.toggle) { + this.toggle() + } + } + + + // getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + + // public + + toggle() { + if ($(this._element).hasClass(ClassName.IN)) { + this.hide() + } else { + this.show() + } + } + + show() { + if (this._isTransitioning || + $(this._element).hasClass(ClassName.IN)) { + return + } + + let actives + let activesData + + if (this._parent) { + actives = $.makeArray($(Selector.ACTIVES)) + if (!actives.length) { + actives = null + } + } + + if (actives) { + activesData = $(actives).data(DATA_KEY) + if (activesData && activesData._isTransitioning) { + return + } + } + + let startEvent = $.Event(Event.SHOW) + $(this._element).trigger(startEvent) + if (startEvent.isDefaultPrevented()) { + return + } + + if (actives) { + Collapse._jQueryInterface.call($(actives), 'hide') + if (!activesData) { + $(actives).data(DATA_KEY, null) + } + } + + let dimension = this._getDimension() + + $(this._element) + .removeClass(ClassName.COLLAPSE) + .addClass(ClassName.COLLAPSING) + + this._element.style[dimension] = 0 + this._element.setAttribute('aria-expanded', true) + + if (this._triggerArray.length) { + $(this._triggerArray) + .removeClass(ClassName.COLLAPSED) + .attr('aria-expanded', true) + } + + this.setTransitioning(true) + + let complete = () => { + $(this._element) + .removeClass(ClassName.COLLAPSING) + .addClass(ClassName.COLLAPSE) + .addClass(ClassName.IN) + + this._element.style[dimension] = '' + + this.setTransitioning(false) + + $(this._element).trigger(Event.SHOWN) + } + + if (!Util.supportsTransitionEnd()) { + complete() + return + } + + let scrollSize = 'scroll' + + (dimension[0].toUpperCase() + + dimension.slice(1)) + + $(this._element) + .one(Util.TRANSITION_END, complete) + .emulateTransitionEnd(TRANSITION_DURATION) + + this._element.style[dimension] = this._element[scrollSize] + 'px' + } + + hide() { + if (this._isTransitioning || + !$(this._element).hasClass(ClassName.IN)) { + return + } + + let startEvent = $.Event(Event.HIDE) + $(this._element).trigger(startEvent) + if (startEvent.isDefaultPrevented()) { + return + } + + let dimension = this._getDimension() + let offsetDimension = dimension === Dimension.WIDTH ? + 'offsetWidth' : 'offsetHeight' + + this._element.style[dimension] = this._element[offsetDimension] + 'px' + + Util.reflow(this._element) + + $(this._element) + .addClass(ClassName.COLLAPSING) + .removeClass(ClassName.COLLAPSE) + .removeClass(ClassName.IN) + + this._element.setAttribute('aria-expanded', false) + + if (this._triggerArray.length) { + $(this._triggerArray) + .addClass(ClassName.COLLAPSED) + .attr('aria-expanded', false) + } + + this.setTransitioning(true) + + let complete = () => { + this.setTransitioning(false) + $(this._element) + .removeClass(ClassName.COLLAPSING) + .addClass(ClassName.COLLAPSE) + .trigger(Event.HIDDEN) + } + + this._element.style[dimension] = 0 + + if (!Util.supportsTransitionEnd()) { + return complete() + } + + $(this._element) + .one(Util.TRANSITION_END, complete) + .emulateTransitionEnd(TRANSITION_DURATION) + } + + setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning + } + + dispose() { + $.removeData(this._element, DATA_KEY) + + this._config = null + this._parent = null + this._element = null + this._triggerArray = null + this._isTransitioning = null + } + + + // private + + _getConfig(config) { + config = $.extend({}, Default, config) + config.toggle = !!config.toggle // coerce string values + Util.typeCheckConfig(NAME, config, DefaultType) + return config + } + + _getDimension() { + let hasWidth = $(this._element).hasClass(Dimension.WIDTH) + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT + } + + _getParent() { + let parent = $(this._config.parent)[0] + let selector = + `[data-toggle="collapse"][data-parent="${this._config.parent}"]` + + $(parent).find(selector).each((i, element) => { + this._addAriaAndCollapsedClass( + Collapse._getTargetFromElement(element), + [element] + ) + }) + + return parent + } + + _addAriaAndCollapsedClass(element, triggerArray) { + if (element) { + let isOpen = $(element).hasClass(ClassName.IN) + element.setAttribute('aria-expanded', isOpen) + + if (triggerArray.length) { + $(triggerArray) + .toggleClass(ClassName.COLLAPSED, !isOpen) + .attr('aria-expanded', isOpen) + } + } + } + + + // static + + static _getTargetFromElement(element) { + let selector = Util.getSelectorFromElement(element) + return selector ? $(selector)[0] : null + } + + static _jQueryInterface(config) { + return this.each(function () { + let $this = $(this) + let data = $this.data(DATA_KEY) + let _config = $.extend( + {}, + Default, + $this.data(), + typeof config === 'object' && config + ) + + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false + } + + if (!data) { + data = new Collapse(this, _config) + $this.data(DATA_KEY, data) + } + + if (typeof config === 'string') { + data[config]() + } + }) + } + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault() + + let target = Collapse._getTargetFromElement(this) + + let data = $(target).data(DATA_KEY) + let config = data ? 'toggle' : $(this).data() + + Collapse._jQueryInterface.call($(target), config) + }) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Collapse._jQueryInterface + $.fn[NAME].Constructor = Collapse + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Collapse._jQueryInterface + } + + return Collapse + +})(jQuery) + +export default Collapse diff --git a/js/src/dropdown.js b/js/src/dropdown.js new file mode 100644 index 000000000..bae0f7adb --- /dev/null +++ b/js/src/dropdown.js @@ -0,0 +1,286 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): dropdown.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Dropdown = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'dropdown' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.dropdown' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Event = { + HIDE   : `hide${EVENT_KEY}`, + HIDDEN   : `hidden${EVENT_KEY}`, + SHOW   : `show${EVENT_KEY}`, + SHOWN   : `shown${EVENT_KEY}`, + CLICK   : `click${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`, + KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + BACKDROP : 'dropdown-backdrop', + DISABLED : 'disabled', + OPEN : 'open' + } + + const Selector = { + BACKDROP : '.dropdown-backdrop', + DATA_TOGGLE : '[data-toggle="dropdown"]', + FORM_CHILD : '.dropdown form', + ROLE_MENU : '[role="menu"]', + ROLE_LISTBOX : '[role="listbox"]', + NAVBAR_NAV : '.navbar-nav', + VISIBLE_ITEMS : '[role="menu"] li:not(.disabled) a, ' + + '[role="listbox"] li:not(.disabled) a' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Dropdown { + + constructor(element) { + this._element = element + + this._addEventListeners() + } + + + // getters + + static get VERSION() { + return VERSION + } + + + // public + + toggle() { + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return + } + + let parent = Dropdown._getParentFromElement(this) + let isActive = $(parent).hasClass(ClassName.OPEN) + + Dropdown._clearMenus() + + if (isActive) { + return false + } + + if ('ontouchstart' in document.documentElement && + (!$(parent).closest(Selector.NAVBAR_NAV).length)) { + + // if mobile we use a backdrop because click events don't delegate + let dropdown = document.createElement('div') + dropdown.className = ClassName.BACKDROP + $(dropdown).insertBefore(this) + $(dropdown).on('click', Dropdown._clearMenus) + } + + let relatedTarget = { relatedTarget : this } + let showEvent = $.Event(Event.SHOW, relatedTarget) + + $(parent).trigger(showEvent) + + if (showEvent.isDefaultPrevented()) { + return + } + + this.focus() + this.setAttribute('aria-expanded', 'true') + + $(parent).toggleClass(ClassName.OPEN) + $(parent).trigger(Event.SHOWN, relatedTarget) + + return false + } + + dispose() { + $.removeData(this._element, DATA_KEY) + $(this._element).off(EVENT_KEY) + this._element = null + } + + + // private + + _addEventListeners() { + $(this._element).on(Event.CLICK, this.toggle) + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + + if (!data) { + $(this).data(DATA_KEY, (data = new Dropdown(this))) + } + + if (typeof config === 'string') { + data[config].call(this) + } + }) + } + + static _clearMenus(event) { + if (event && event.which === 3) { + return + } + + let backdrop = $(Selector.BACKDROP)[0] + if (backdrop) { + backdrop.parentNode.removeChild(backdrop) + } + + let toggles = $.makeArray($(Selector.DATA_TOGGLE)) + + for (let i = 0; i < toggles.length; i++) { + let parent = Dropdown._getParentFromElement(toggles[i]) + let relatedTarget = { relatedTarget : toggles[i] } + + if (!$(parent).hasClass(ClassName.OPEN)) { + continue + } + + if (event && event.type === 'click' && + (/input|textarea/i.test(event.target.tagName)) && + ($.contains(parent, event.target))) { + continue + } + + let hideEvent = $.Event(Event.HIDE, relatedTarget) + $(parent).trigger(hideEvent) + if (hideEvent.isDefaultPrevented()) { + continue + } + + toggles[i].setAttribute('aria-expanded', 'false') + + $(parent) + .removeClass(ClassName.OPEN) + .trigger(Event.HIDDEN, relatedTarget) + } + } + + static _getParentFromElement(element) { + let parent + let selector = Util.getSelectorFromElement(element) + + if (selector) { + parent = $(selector)[0] + } + + return parent || element.parentNode + } + + static _dataApiKeydownHandler(event) { + if (!/(38|40|27|32)/.test(event.which) || + /input|textarea/i.test(event.target.tagName)) { + return + } + + event.preventDefault() + event.stopPropagation() + + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return + } + + let parent = Dropdown._getParentFromElement(this) + let isActive = $(parent).hasClass(ClassName.OPEN) + + if ((!isActive && event.which !== 27) || + (isActive && event.which === 27)) { + + if (event.which === 27) { + let toggle = $(parent).find(Selector.DATA_TOGGLE)[0] + $(toggle).trigger('focus') + } + + $(this).trigger('click') + return + } + + let items = $.makeArray($(Selector.VISIBLE_ITEMS)) + + items = items.filter((item) => { + return item.offsetWidth || item.offsetHeight + }) + + if (!items.length) { + return + } + + let index = items.indexOf(event.target) + + if (event.which === 38 && index > 0) index-- // up + if (event.which === 40 && index < items.length - 1) index++ // down + if (!~index) index = 0 + + items[index].focus() + } + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document) + .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler) + .on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler) + .on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler) + .on(Event.CLICK_DATA_API, Dropdown._clearMenus) + .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle) + .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { + e.stopPropagation() + }) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Dropdown._jQueryInterface + $.fn[NAME].Constructor = Dropdown + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Dropdown._jQueryInterface + } + + return Dropdown + +})(jQuery) + +export default Dropdown diff --git a/js/src/modal.js b/js/src/modal.js new file mode 100644 index 000000000..2ca603b23 --- /dev/null +++ b/js/src/modal.js @@ -0,0 +1,527 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Modal = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'modal' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.modal' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const TRANSITION_DURATION = 300 + const BACKDROP_TRANSITION_DURATION = 150 + + const Default = { + backdrop : true, + keyboard : true, + focus : true, + show : true + } + + const DefaultType = { + backdrop : '(boolean|string)', + keyboard : 'boolean', + focus : 'boolean', + show : 'boolean' + } + + const Event = { + HIDE   : `hide${EVENT_KEY}`, + HIDDEN   : `hidden${EVENT_KEY}`, + SHOW   : `show${EVENT_KEY}`, + SHOWN   : `shown${EVENT_KEY}`, + FOCUSIN : `focusin${EVENT_KEY}`, + RESIZE : `resize${EVENT_KEY}`, + CLICK_DISMISS : `click.dismiss${EVENT_KEY}`, + KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`, + MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`, + MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + BACKDROP : 'modal-backdrop', + OPEN : 'modal-open', + FADE : 'fade', + IN : 'in' + } + + const Selector = { + DIALOG : '.modal-dialog', + DATA_TOGGLE : '[data-toggle="modal"]', + DATA_DISMISS : '[data-dismiss="modal"]', + SCROLLBAR_MEASURER : 'modal-scrollbar-measure' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Modal { + + constructor(element, config) { + this._config = this._getConfig(config) + this._element = element + this._dialog = $(element).find(Selector.DIALOG)[0] + this._backdrop = null + this._isShown = false + this._isBodyOverflowing = false + this._ignoreBackdropClick = false + this._originalBodyPadding = 0 + this._scrollbarWidth = 0 + } + + + // getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + + // public + + toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget) + } + + show(relatedTarget) { + let showEvent = $.Event(Event.SHOW, { + relatedTarget: relatedTarget + }) + + $(this._element).trigger(showEvent) + + if (this._isShown || showEvent.isDefaultPrevented()) { + return + } + + this._isShown = true + + this._checkScrollbar() + this._setScrollbar() + + $(document.body).addClass(ClassName.OPEN) + + this._setEscapeEvent() + this._setResizeEvent() + + $(this._element).on( + Event.CLICK_DISMISS, + Selector.DATA_DISMISS, + $.proxy(this.hide, this) + ) + + $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => { + $(this._element).one(Event.MOUSEUP_DISMISS, (event) => { + if ($(event.target).is(this._element)) { + that._ignoreBackdropClick = true + } + }) + }) + + this._showBackdrop( + $.proxy(this._showElement, this, relatedTarget) + ) + } + + hide(event) { + if (event) { + event.preventDefault() + } + + let hideEvent = $.Event(Event.HIDE) + + $(this._element).trigger(hideEvent) + + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return + } + + this._isShown = false + + this._setEscapeEvent() + this._setResizeEvent() + + $(document).off(Event.FOCUSIN) + + $(this._element).removeClass(ClassName.IN) + + $(this._element).off(Event.CLICK_DISMISS) + $(this._dialog).off(Event.MOUSEDOWN_DISMISS) + + if (Util.supportsTransitionEnd() && + ($(this._element).hasClass(ClassName.FADE))) { + + $(this._element) + .one(Util.TRANSITION_END, $.proxy(this._hideModal, this)) + .emulateTransitionEnd(TRANSITION_DURATION) + } else { + this._hideModal() + } + } + + dispose() { + $.removeData(this._element, DATA_KEY) + + $(window).off(EVENT_KEY) + $(document).off(EVENT_KEY) + $(this._element).off(EVENT_KEY) + $(this._backdrop).off(EVENT_KEY) + + this._config = null + this._element = null + this._dialog = null + this._backdrop = null + this._isShown = null + this._isBodyOverflowing = null + this._ignoreBackdropClick = null + this._originalBodyPadding = null + this._scrollbarWidth = null + } + + + // private + + _getConfig(config) { + config = $.extend({}, Default, config) + Util.typeCheckConfig(NAME, config, DefaultType) + return config + } + + _showElement(relatedTarget) { + let transition = Util.supportsTransitionEnd() && + $(this._element).hasClass(ClassName.FADE) + + if (!this._element.parentNode || + (this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) { + // don't move modals dom position + document.body.appendChild(this._element) + } + + this._element.style.display = 'block' + this._element.scrollTop = 0 + + if (transition) { + Util.reflow(this._element) + } + + $(this._element).addClass(ClassName.IN) + + if (this._config.focus) this._enforceFocus() + + let shownEvent = $.Event(Event.SHOWN, { + relatedTarget: relatedTarget + }) + + let transitionComplete = () => { + if (this._config.focus) this._element.focus() + $(this._element).trigger(shownEvent) + } + + if (transition) { + $(this._dialog) + .one(Util.TRANSITION_END, transitionComplete) + .emulateTransitionEnd(TRANSITION_DURATION) + } else { + transitionComplete() + } + } + + _enforceFocus() { + $(document) + .off(Event.FOCUSIN) // guard against infinite focus loop + .on(Event.FOCUSIN, (event) => { + if (this._element !== event.target && + (!$(this._element).has(event.target).length)) { + this._element.focus() + } + }) + } + + _setEscapeEvent() { + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event.KEYDOWN_DISMISS, (event) => { + if (event.which === 27) { + this.hide() + } + }) + + } else if (!this._isShown) { + $(this._element).off(Event.KEYDOWN_DISMISS) + } + } + + _setResizeEvent() { + if (this._isShown) { + $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)) + } else { + $(window).off(Event.RESIZE) + } + } + + _hideModal() { + this._element.style.display = 'none' + this._showBackdrop(() => { + $(document.body).removeClass(ClassName.OPEN) + this._resetAdjustments() + this._resetScrollbar() + $(this._element).trigger(Event.HIDDEN) + }) + } + + _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove() + this._backdrop = null + } + } + + _showBackdrop(callback) { + let animate = $(this._element).hasClass(ClassName.FADE) ? + ClassName.FADE : '' + + if (this._isShown && this._config.backdrop) { + let doAnimate = Util.supportsTransitionEnd() && animate + + this._backdrop = document.createElement('div') + this._backdrop.className = ClassName.BACKDROP + + if (animate) { + $(this._backdrop).addClass(animate) + } + + $(this._backdrop).appendTo(this.$body) + + $(this._element).on(Event.CLICK_DISMISS, (event) => { + if (this._ignoreBackdropClick) { + this._ignoreBackdropClick = false + return + } + if (event.target !== event.currentTarget) { + return + } + if (this._config.backdrop === 'static') { + this._element.focus() + } else { + this.hide() + } + }) + + if (doAnimate) { + Util.reflow(this._backdrop) + } + + $(this._backdrop).addClass(ClassName.IN) + + if (!callback) { + return + } + + if (!doAnimate) { + callback() + return + } + + $(this._backdrop) + .one(Util.TRANSITION_END, callback) + .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION) + + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName.IN) + + let callbackRemove = () => { + this._removeBackdrop() + if (callback) { + callback() + } + } + + if (Util.supportsTransitionEnd() && + ($(this._element).hasClass(ClassName.FADE))) { + $(this._backdrop) + .one(Util.TRANSITION_END, callbackRemove) + .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION) + } else { + callbackRemove() + } + + } else if (callback) { + callback() + } + } + + + // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + + _handleUpdate() { + this._adjustDialog() + } + + _adjustDialog() { + let isModalOverflowing = + this._element.scrollHeight > document.documentElement.clientHeight + + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + 'px' + } + + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + 'px' + } + } + + _resetAdjustments() { + this._element.style.paddingLeft = '' + this._element.style.paddingRight = '' + } + + _checkScrollbar() { + let fullWindowWidth = window.innerWidth + if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 + let documentElementRect = document.documentElement.getBoundingClientRect() + fullWindowWidth = + documentElementRect.right - Math.abs(documentElementRect.left) + } + this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth + this._scrollbarWidth = this._getScrollbarWidth() + } + + _setScrollbar() { + let bodyPadding = parseInt( + $(document.body).css('padding-right') || 0, + 10 + ) + + this._originalBodyPadding = document.body.style.paddingRight || '' + + if (this._isBodyOverflowing) { + document.body.style.paddingRight = + bodyPadding + this._scrollbarWidth + 'px' + } + } + + _resetScrollbar() { + document.body.style.paddingRight = this._originalBodyPadding + } + + _getScrollbarWidth() { // thx d.walsh + let scrollDiv = document.createElement('div') + scrollDiv.className = Selector.SCROLLBAR_MEASURER + document.body.appendChild(scrollDiv) + let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth + document.body.removeChild(scrollDiv) + return scrollbarWidth + } + + + // static + + static _jQueryInterface(config, relatedTarget) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = $.extend( + {}, + Modal.Default, + $(this).data(), + typeof config === 'object' && config + ) + + if (!data) { + data = new Modal(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'string') { + data[config](relatedTarget) + + } else if (_config.show) { + data.show(relatedTarget) + } + }) + } + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + let target + let selector = Util.getSelectorFromElement(this) + + if (selector) { + target = $(selector)[0] + } + + let config = $(target).data(DATA_KEY) ? + 'toggle' : $.extend({}, $(target).data(), $(this).data()) + + if (this.tagName === 'A') { + event.preventDefault() + } + + let $target = $(target).one(Event.SHOW, (showEvent) => { + if (showEvent.isDefaultPrevented()) { + // only register focus restorer if modal will actually get shown + return + } + + $target.one(Event.HIDDEN, () => { + if ($(this).is(':visible')) { + this.focus() + } + }) + }) + + Modal._jQueryInterface.call($(target), config, this) + }) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Modal._jQueryInterface + $.fn[NAME].Constructor = Modal + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Modal._jQueryInterface + } + + return Modal + +})(jQuery) + +export default Modal diff --git a/js/src/popover.js b/js/src/popover.js new file mode 100644 index 000000000..31c7a3ae1 --- /dev/null +++ b/js/src/popover.js @@ -0,0 +1,191 @@ +import Tooltip from './tooltip' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): popover.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Popover = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'popover' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.popover' + const EVENT_KEY = `.${DATA_KEY}` + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Default = $.extend({}, Tooltip.Default, { + placement : 'right', + trigger : 'click', + content : '', + template : '' + }) + + const DefaultType = $.extend({}, Tooltip.DefaultType, { + content : '(string|function)' + }) + + const ClassName = { + FADE : 'fade', + IN : 'in' + } + + const Selector = { + TITLE : '.popover-title', + CONTENT : '.popover-content', + ARROW : '.popover-arrow' + } + + const Event = { + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + INSERTED : `inserted${EVENT_KEY}`, + CLICK : `click${EVENT_KEY}`, + FOCUSIN : `focusin${EVENT_KEY}`, + FOCUSOUT : `focusout${EVENT_KEY}`, + MOUSEENTER : `mouseenter${EVENT_KEY}`, + MOUSELEAVE : `mouseleave${EVENT_KEY}` + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Popover extends Tooltip { + + + // getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + static get NAME() { + return NAME + } + + static get DATA_KEY() { + return DATA_KEY + } + + static get Event() { + return Event + } + + static get EVENT_KEY() { + return EVENT_KEY + } + + static get DefaultType() { + return DefaultType + } + + + // overrides + + isWithContent() { + return this.getTitle() || this._getContent() + } + + getTipElement() { + return (this.tip = this.tip || $(this.config.template)[0]) + } + + setContent() { + let tip = this.getTipElement() + let title = this.getTitle() + let content = this._getContent() + let titleElement = $(tip).find(Selector.TITLE)[0] + + if (titleElement) { + titleElement[ + this.config.html ? 'innerHTML' : 'innerText' + ] = title + } + + // we use append for html objects to maintain js events + $(tip).find(Selector.CONTENT).children().detach().end()[ + this.config.html ? + (typeof content === 'string' ? 'html' : 'append') : 'text' + ](content) + + $(tip) + .removeClass(ClassName.FADE) + .removeClass(ClassName.IN) + + this.cleanupTether() + } + + // private + + _getContent() { + return this.element.getAttribute('data-content') + || (typeof this.config.content == 'function' ? + this.config.content.call(this.element) : + this.config.content) + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = typeof config === 'object' ? config : null + + if (!data && /destroy|hide/.test(config)) { + return + } + + if (!data) { + data = new Popover(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'string') { + data[config]() + } + }) + } + } + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Popover._jQueryInterface + $.fn[NAME].Constructor = Popover + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Popover._jQueryInterface + } + + return Popover + +})(jQuery) + +export default Popover diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js new file mode 100644 index 000000000..a407511f6 --- /dev/null +++ b/js/src/scrollspy.js @@ -0,0 +1,323 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): scrollspy.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const ScrollSpy = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'scrollspy' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.scrollspy' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + + const Default = { + offset : 10, + method : 'auto', + target : '' + } + + const DefaultType = { + offset : 'number', + method : 'string', + target : '(string|element)' + } + + const Event = { + ACTIVATE : `activate${EVENT_KEY}`, + SCROLL : `scroll${EVENT_KEY}`, + LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + DROPDOWN_MENU : 'dropdown-menu', + ACTIVE : 'active' + } + + const Selector = { + DATA_SPY : '[data-spy="scroll"]', + ACTIVE : '.active', + LI : 'li', + LI_DROPDOWN : 'li.dropdown', + NAV_ANCHORS : '.nav li > a' + } + + const OffsetMethod = { + OFFSET : 'offset', + POSITION : 'position' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class ScrollSpy { + + constructor(element, config) { + this._element = element + this._scrollElement = element.tagName === 'BODY' ? window : element + this._config = this._getConfig(config) + this._selector = `${this._config.target} ${Selector.NAV_ANCHORS}` + this._offsets = [] + this._targets = [] + this._activeTarget = null + this._scrollHeight = 0 + + $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)) + + this.refresh() + this._process() + } + + + // getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + + // public + + refresh() { + let autoMethod = this._scrollElement !== this._scrollElement.window ? + OffsetMethod.POSITION : OffsetMethod.OFFSET + + let offsetMethod = this._config.method === 'auto' ? + autoMethod : this._config.method + + let offsetBase = offsetMethod === OffsetMethod.POSITION ? + this._getScrollTop() : 0 + + this._offsets = [] + this._targets = [] + + this._scrollHeight = this._getScrollHeight() + + let targets = $.makeArray($(this._selector)) + + targets + .map((element) => { + let target + let targetSelector = Util.getSelectorFromElement(element) + + if (targetSelector) { + target = $(targetSelector)[0] + } + + if (target && (target.offsetWidth || target.offsetHeight)) { + // todo (fat): remove sketch reliance on jQuery position/offset + return [ + $(target)[offsetMethod]().top + offsetBase, + targetSelector + ] + } + }) + .filter((item) => item) + .sort((a, b) => a[0] - b[0]) + .forEach((item) => { + this._offsets.push(item[0]) + this._targets.push(item[1]) + }) + } + + dispose() { + $.removeData(this._element, DATA_KEY) + $(this._scrollElement).off(EVENT_KEY) + + this._element = null + this._scrollElement = null + this._config = null + this._selector = null + this._offsets = null + this._targets = null + this._activeTarget = null + this._scrollHeight = null + } + + + // private + + _getConfig(config) { + config = $.extend({}, Default, config) + + if (typeof config.target !== 'string') { + let id = $(config.target).attr('id') + if (!id) { + id = Util.getUID(NAME) + $(config.target).attr('id', id) + } + config.target = `#${id}` + } + + Util.typeCheckConfig(NAME, config, DefaultType) + + return config + } + + _getScrollTop() { + return this._scrollElement === window ? + this._scrollElement.scrollY : this._scrollElement.scrollTop + } + + _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max( + document.body.scrollHeight, + document.documentElement.scrollHeight + ) + } + + _process() { + let scrollTop = this._getScrollTop() + this._config.offset + let scrollHeight = this._getScrollHeight() + let maxScroll = this._config.offset + + scrollHeight + - this._scrollElement.offsetHeight + + if (this._scrollHeight !== scrollHeight) { + this.refresh() + } + + if (scrollTop >= maxScroll) { + let target = this._targets[this._targets.length - 1] + + if (this._activeTarget !== target) { + this._activate(target) + } + } + + if (this._activeTarget && scrollTop < this._offsets[0]) { + this._activeTarget = null + this._clear() + return + } + + for (let i = this._offsets.length; i--;) { + let isActiveTarget = this._activeTarget !== this._targets[i] + && scrollTop >= this._offsets[i] + && (this._offsets[i + 1] === undefined || + scrollTop < this._offsets[i + 1]) + + if (isActiveTarget) { + this._activate(this._targets[i]) + } + } + } + + _activate(target) { + this._activeTarget = target + + this._clear() + + let selector = + `${this._selector}[data-target="${target}"],` + + `${this._selector}[href="${target}"]` + + // todo (fat): getting all the raw li's up the tree is not great. + let parentListItems = $(selector).parents(Selector.LI) + + for (let i = parentListItems.length; i--;) { + $(parentListItems[i]).addClass(ClassName.ACTIVE) + + let itemParent = parentListItems[i].parentNode + + if (itemParent && $(itemParent).hasClass(ClassName.DROPDOWN_MENU)) { + let closestDropdown = $(itemParent) + .closest(Selector.LI_DROPDOWN)[0] + $(closestDropdown).addClass(ClassName.ACTIVE) + } + } + + $(this._scrollElement).trigger(Event.ACTIVATE, { + relatedTarget: target + }) + } + + _clear() { + let activeParents = $(this._selector).parentsUntil( + this._config.target, + Selector.ACTIVE + ) + + for (let i = activeParents.length; i--;) { + $(activeParents[i]).removeClass(ClassName.ACTIVE) + } + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = typeof config === 'object' && config || null + + if (!data) { + data = new ScrollSpy(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'string') { + data[config]() + } + }) + } + + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(window).on(Event.LOAD_DATA_API, function () { + let scrollSpys = $.makeArray($(Selector.DATA_SPY)) + + for (let i = scrollSpys.length; i--;) { + let $spy = $(scrollSpys[i]) + ScrollSpy._jQueryInterface.call($spy, $spy.data()) + } + }) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = ScrollSpy._jQueryInterface + $.fn[NAME].Constructor = ScrollSpy + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return ScrollSpy._jQueryInterface + } + + return ScrollSpy + +})(jQuery) + +export default ScrollSpy diff --git a/js/src/tab.js b/js/src/tab.js new file mode 100644 index 000000000..4d8d7dec8 --- /dev/null +++ b/js/src/tab.js @@ -0,0 +1,287 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tab.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Tab = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'tab' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.tab' + const EVENT_KEY = `.${DATA_KEY}` + const DATA_API_KEY = '.data-api' + const JQUERY_NO_CONFLICT = $.fn[NAME] + const TRANSITION_DURATION = 150 + + const Event = { + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}` + } + + const ClassName = { + DROPDOWN_MENU : 'dropdown-menu', + ACTIVE : 'active', + FADE : 'fade', + IN : 'in' + } + + const Selector = { + A : 'a', + LI : 'li', + LI_DROPDOWN : 'li.dropdown', + UL : 'ul:not(.dropdown-menu)', + FADE_CHILD : '> .fade', + ACTIVE : '.active', + ACTIVE_CHILD : '> .active', + DATA_TOGGLE : '[data-toggle="tab"], [data-toggle="pill"]', + DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu > .active' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Tab { + + constructor(element) { + this._element = element + } + + + // getters + + static get VERSION() { + return VERSION + } + + + // public + + show() { + if (this._element.parentNode && + (this._element.parentNode.nodeType == Node.ELEMENT_NODE) && + ($(this._element).parent().hasClass(ClassName.ACTIVE))) { + return + } + + let target + let previous + let ulElement = $(this._element).closest(Selector.UL)[0] + let selector = Util.getSelectorFromElement(this._element) + + if (ulElement) { + previous = $.makeArray($(ulElement).find(Selector.ACTIVE)) + previous = previous[previous.length - 1] + + if (previous) { + previous = $(previous).find(Selector.A)[0] + } + } + + let hideEvent = $.Event(Event.HIDE, { + relatedTarget: this._element + }) + + let showEvent = $.Event(Event.SHOW, { + relatedTarget: previous + }) + + if (previous) { + $(previous).trigger(hideEvent) + } + + $(this._element).trigger(showEvent) + + if (showEvent.isDefaultPrevented() || + (hideEvent.isDefaultPrevented())) { + return + } + + if (selector) { + target = $(selector)[0] + } + + this._activate( + $(this._element).closest(Selector.LI)[0], + ulElement + ) + + let complete = () => { + let hiddenEvent = $.Event(Event.HIDDEN, { + relatedTarget: this._element + }) + + let shownEvent = $.Event(Event.SHOWN, { + relatedTarget: previous + }) + + $(previous).trigger(hiddenEvent) + $(this._element).trigger(shownEvent) + } + + if (target) { + this._activate(target, target.parentNode, complete) + } else { + complete() + } + } + + dispose() { + $.removeClass(this._element, DATA_KEY) + this._element = null + } + + + // private + + _activate(element, container, callback) { + let active = $(container).find(Selector.ACTIVE_CHILD)[0] + let isTransitioning = callback + && Util.supportsTransitionEnd() + && ((active && $(active).hasClass(ClassName.FADE)) + || !!$(container).find(Selector.FADE_CHILD)[0]) + + let complete = $.proxy( + this._transitionComplete, + this, + element, + active, + isTransitioning, + callback + ) + + if (active && isTransitioning) { + $(active) + .one(Util.TRANSITION_END, complete) + .emulateTransitionEnd(TRANSITION_DURATION) + + } else { + complete() + } + + if (active) { + $(active).removeClass(ClassName.IN) + } + } + + _transitionComplete(element, active, isTransitioning, callback) { + if (active) { + $(active).removeClass(ClassName.ACTIVE) + + let dropdownChild = $(active).find( + Selector.DROPDOWN_ACTIVE_CHILD + )[0] + if (dropdownChild) { + $(dropdownChild).removeClass(ClassName.ACTIVE) + } + + let activeToggle = $(active).find(Selector.DATA_TOGGLE)[0] + if (activeToggle) { + activeToggle.setAttribute('aria-expanded', false) + } + } + + $(element).addClass(ClassName.ACTIVE) + + let elementToggle = $(element).find(Selector.DATA_TOGGLE)[0] + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true) + } + + if (isTransitioning) { + Util.reflow(element) + $(element).addClass(ClassName.IN) + } else { + $(element).removeClass(ClassName.FADE) + } + + if (element.parentNode && + ($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) { + + let dropdownElement = $(element).closest(Selector.LI_DROPDOWN)[0] + if (dropdownElement) { + $(dropdownElement).addClass(ClassName.ACTIVE) + } + + elementToggle = $(element).find(Selector.DATA_TOGGLE)[0] + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true) + } + } + + if (callback) { + callback() + } + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let $this = $(this) + let data = $this.data(DATA_KEY) + + if (!data) { + data = data = new Tab(this) + $this.data(DATA_KEY, data) + } + + if (typeof config === 'string') { + data[config]() + } + }) + } + + } + + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document) + .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault() + Tab._jQueryInterface.call($(this), 'show') + }) + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tab._jQueryInterface + $.fn[NAME].Constructor = Tab + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Tab._jQueryInterface + } + + return Tab + +})(jQuery) + +export default Tab diff --git a/js/src/tooltip.js b/js/src/tooltip.js new file mode 100644 index 000000000..5d62e154a --- /dev/null +++ b/js/src/tooltip.js @@ -0,0 +1,632 @@ +import Util from './util' + + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tooltip.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Tooltip = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + const NAME = 'tooltip' + const VERSION = '4.0.0' + const DATA_KEY = 'bs.tooltip' + const EVENT_KEY = `.${DATA_KEY}` + const JQUERY_NO_CONFLICT = $.fn[NAME] + const TRANSITION_DURATION = 150 + const CLASS_PREFIX = 'bs-tether' + + const Default = { + animation : true, + template : '', + trigger : 'hover focus', + title : '', + delay : 0, + html : false, + selector : false, + placement : 'top', + offset : '0 0', + constraints : [] + } + + const DefaultType = { + animation : 'boolean', + template : 'string', + title : '(string|function)', + trigger : 'string', + delay : '(number|object)', + html : 'boolean', + selector : '(string|boolean)', + placement : '(string|function)', + offset : 'string', + constraints : 'array' + } + + const AttachmentMap = { + TOP : 'bottom center', + RIGHT : 'middle left', + BOTTOM : 'top center', + LEFT : 'middle right' + } + + const HoverState = { + IN : 'in', + OUT : 'out' + } + + const Event = { + HIDE : `hide${EVENT_KEY}`, + HIDDEN : `hidden${EVENT_KEY}`, + SHOW : `show${EVENT_KEY}`, + SHOWN : `shown${EVENT_KEY}`, + INSERTED : `inserted${EVENT_KEY}`, + CLICK : `click${EVENT_KEY}`, + FOCUSIN : `focusin${EVENT_KEY}`, + FOCUSOUT : `focusout${EVENT_KEY}`, + MOUSEENTER : `mouseenter${EVENT_KEY}`, + MOUSELEAVE : `mouseleave${EVENT_KEY}` + } + + const ClassName = { + FADE : 'fade', + IN : 'in' + } + + const Selector = { + TOOLTIP : '.tooltip', + TOOLTIP_INNER : '.tooltip-inner' + } + + const TetherClass = { + element : false, + enabled : false + } + + const Trigger = { + HOVER : 'hover', + FOCUS : 'focus', + CLICK : 'click', + MANUAL : 'manual' + } + + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + class Tooltip { + + constructor(element, config) { + + // private + this._isEnabled = true + this._timeout = 0 + this._hoverState = '' + this._activeTrigger = {} + this._tether = null + + // protected + this.element = element + this.config = this._getConfig(config) + this.tip = null + + this._setListeners() + + } + + + // getters + + static get VERSION() { + return VERSION + } + + static get Default() { + return Default + } + + static get NAME() { + return NAME + } + + static get DATA_KEY() { + return DATA_KEY + } + + static get Event() { + return Event + } + + static get EVENT_KEY() { + return EVENT_KEY + } + + static get DefaultType() { + return DefaultType + } + + + // public + + enable() { + this._isEnabled = true + } + + disable() { + this._isEnabled = false + } + + toggleEnabled() { + this._isEnabled = !this._isEnabled + } + + toggle(event) { + let context = this + let dataKey = this.constructor.DATA_KEY + + if (event) { + context = $(event.currentTarget).data(dataKey) + + if (!context) { + context = new this.constructor( + event.currentTarget, + this._getDelegateConfig() + ) + $(event.currentTarget).data(dataKey, context) + } + + context._activeTrigger.click = !context._activeTrigger.click + + if (context._isWithActiveTrigger()) { + context._enter(null, context) + } else { + context._leave(null, context) + } + + } else { + $(context.getTipElement()).hasClass(ClassName.IN) ? + context._leave(null, context) : + context._enter(null, context) + } + } + + dispose() { + clearTimeout(this._timeout) + + this.cleanupTether() + + $.removeData(this.element, this.constructor.DATA_KEY) + + $(this.element).off(this.constructor.EVENT_KEY) + + if (this.tip) { + $(this.tip).remove() + } + + this._isEnabled = null + this._timeout = null + this._hoverState = null + this._activeTrigger = null + this._tether = null + + this.element = null + this.config = null + this.tip = null + } + + show() { + let showEvent = $.Event(this.constructor.Event.SHOW) + + if (this.isWithContent() && this._isEnabled) { + $(this.element).trigger(showEvent) + + let isInTheDom = $.contains( + this.element.ownerDocument.documentElement, + this.element + ) + + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return + } + + let tip = this.getTipElement() + let tipId = Util.getUID(this.constructor.NAME) + + tip.setAttribute('id', tipId) + this.element.setAttribute('aria-describedby', tipId) + + this.setContent() + + if (this.config.animation) { + $(tip).addClass(ClassName.FADE) + } + + let placement = typeof this.config.placement === 'function' ? + this.config.placement.call(this, tip, this.element) : + this.config.placement + + let attachment = this._getAttachment(placement) + + $(tip) + .data(this.constructor.DATA_KEY, this) + .appendTo(document.body) + + $(this.element).trigger(this.constructor.Event.INSERTED) + + this._tether = new Tether({ + element : tip, + target : this.element, + attachment : attachment, + classes : TetherClass, + classPrefix : CLASS_PREFIX, + offset : this.config.offset, + constraints : this.config.constraints + }) + + Util.reflow(tip) + this._tether.position() + + $(tip).addClass(ClassName.IN) + + let complete = () => { + let prevHoverState = this._hoverState + this._hoverState = null + + $(this.element).trigger(this.constructor.Event.SHOWN) + + if (prevHoverState === HoverState.OUT) { + this._leave(null, this) + } + } + + Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ? + $(this.tip) + .one(Util.TRANSITION_END, complete) + .emulateTransitionEnd(Tooltip._TRANSITION_DURATION) : + complete() + } + } + + hide(callback) { + let tip = this.getTipElement() + let hideEvent = $.Event(this.constructor.Event.HIDE) + let complete = () => { + if (this._hoverState !== HoverState.IN && tip.parentNode) { + tip.parentNode.removeChild(tip) + } + + this.element.removeAttribute('aria-describedby') + $(this.element).trigger(this.constructor.Event.HIDDEN) + this.cleanupTether() + + if (callback) { + callback() + } + } + + $(this.element).trigger(hideEvent) + + if (hideEvent.isDefaultPrevented()) { + return + } + + $(tip).removeClass(ClassName.IN) + + if (Util.supportsTransitionEnd() && + ($(this.tip).hasClass(ClassName.FADE))) { + + $(tip) + .one(Util.TRANSITION_END, complete) + .emulateTransitionEnd(TRANSITION_DURATION) + + } else { + complete() + } + + this._hoverState = '' + } + + + // protected + + isWithContent() { + return !!this.getTitle() + } + + getTipElement() { + return (this.tip = this.tip || $(this.config.template)[0]) + } + + setContent() { + let tip = this.getTipElement() + let title = this.getTitle() + let method = this.config.html ? 'innerHTML' : 'innerText' + + $(tip).find(Selector.TOOLTIP_INNER)[0][method] = title + + $(tip) + .removeClass(ClassName.FADE) + .removeClass(ClassName.IN) + + this.cleanupTether() + } + + getTitle() { + let title = this.element.getAttribute('data-original-title') + + if (!title) { + title = typeof this.config.title === 'function' ? + this.config.title.call(this.element) : + this.config.title + } + + return title + } + + cleanupTether() { + if (this._tether) { + this._tether.destroy() + + // clean up after tether's junk classes + // remove after they fix issue + // (https://github.com/HubSpot/tether/issues/36) + $(this.element).removeClass(this._removeTetherClasses) + $(this.tip).removeClass(this._removeTetherClasses) + } + } + + + // private + + _getAttachment(placement) { + return AttachmentMap[placement.toUpperCase()] + } + + _setListeners() { + let triggers = this.config.trigger.split(' ') + + triggers.forEach((trigger) => { + if (trigger === 'click') { + $(this.element).on( + this.constructor.Event.CLICK, + this.config.selector, + $.proxy(this.toggle, this) + ) + + } else if (trigger !== Trigger.MANUAL) { + let eventIn = trigger == Trigger.HOVER ? + this.constructor.Event.MOUSEENTER : + this.constructor.Event.FOCUSIN + let eventOut = trigger == Trigger.HOVER ? + this.constructor.Event.MOUSELEAVE : + this.constructor.Event.FOCUSOUT + + $(this.element) + .on( + eventIn, + this.config.selector, + $.proxy(this._enter, this) + ) + .on( + eventOut, + this.config.selector, + $.proxy(this._leave, this) + ) + } + }) + + if (this.config.selector) { + this.config = $.extend({}, this.config, { + trigger : 'manual', + selector : '' + }) + } else { + this._fixTitle() + } + } + + _removeTetherClasses(i, css) { + return ((css.baseVal || css).match( + new RegExp(`(^|\\s)${CLASS_PREFIX}-\\S+`, 'g')) || [] + ).join(' ') + } + + _fixTitle() { + let titleType = typeof this.element.getAttribute('data-original-title') + if (this.element.getAttribute('title') || + (titleType !== 'string')) { + this.element.setAttribute( + 'data-original-title', + this.element.getAttribute('title') || '' + ) + this.element.setAttribute('title', '') + } + } + + _enter(event, context) { + let dataKey = this.constructor.DATA_KEY + + context = context || $(event.currentTarget).data(dataKey) + + if (!context) { + context = new this.constructor( + event.currentTarget, + this._getDelegateConfig() + ) + $(event.currentTarget).data(dataKey, context) + } + + if (event) { + context._activeTrigger[ + event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER + ] = true + } + + if ($(context.getTipElement()).hasClass(ClassName.IN) || + (context._hoverState === HoverState.IN)) { + context._hoverState = HoverState.IN + return + } + + clearTimeout(context._timeout) + + context._hoverState = HoverState.IN + + if (!context.config.delay || !context.config.delay.show) { + context.show() + return + } + + context._timeout = setTimeout(() => { + if (context._hoverState === HoverState.IN) { + context.show() + } + }, context.config.delay.show) + } + + _leave(event, context) { + let dataKey = this.constructor.DATA_KEY + + context = context || $(event.currentTarget).data(dataKey) + + if (!context) { + context = new this.constructor( + event.currentTarget, + this._getDelegateConfig() + ) + $(event.currentTarget).data(dataKey, context) + } + + if (event) { + context._activeTrigger[ + event.type == 'focusout' ? Trigger.FOCUS : Trigger.HOVER + ] = false + } + + if (context._isWithActiveTrigger()) { + return + } + + clearTimeout(context._timeout) + + context._hoverState = HoverState.OUT + + if (!context.config.delay || !context.config.delay.hide) { + context.hide() + return + } + + context._timeout = setTimeout(() => { + if (context._hoverState === HoverState.OUT) { + context.hide() + } + }, context.config.delay.hide) + } + + _isWithActiveTrigger() { + for (let trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true + } + } + + return false + } + + _getConfig(config) { + config = $.extend( + {}, + this.constructor.Default, + $(this.element).data(), + config + ) + + if (config.delay && typeof config.delay === 'number') { + config.delay = { + show : config.delay, + hide : config.delay + } + } + + Util.typeCheckConfig( + NAME, + config, + this.constructor.DefaultType + ) + + return config + } + + _getDelegateConfig() { + let config = {} + + if (this.config) { + for (let key in this.config) { + let value = this.config[key] + if (this.constructor.Default[key] !== value) { + config[key] = value + } + } + } + + return config + } + + + // static + + static _jQueryInterface(config) { + return this.each(function () { + let data = $(this).data(DATA_KEY) + let _config = typeof config === 'object' ? + config : null + + if (!data && /destroy|hide/.test(config)) { + return + } + + if (!data) { + data = new Tooltip(this, _config) + $(this).data(DATA_KEY, data) + } + + if (typeof config === 'string') { + data[config]() + } + }) + } + + } + + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tooltip._jQueryInterface + $.fn[NAME].Constructor = Tooltip + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT + return Tooltip._jQueryInterface + } + + return Tooltip + +})(jQuery) + +export default Tooltip diff --git a/js/src/util.js b/js/src/util.js new file mode 100644 index 000000000..86bea6578 --- /dev/null +++ b/js/src/util.js @@ -0,0 +1,156 @@ +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + +const Util = (($) => { + + + /** + * ------------------------------------------------------------------------ + * Private TransitionEnd Helpers + * ------------------------------------------------------------------------ + */ + + let transition = false + + const TransitionEndEvent = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + } + + // shoutout AngusCroll (https://goo.gl/pxwQGp) + function toType(obj) { + return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase() + } + + function isElement(obj) { + return (obj[0] || obj).nodeType; + } + + function getSpecialTransitionEndEvent() { + return { + bindType: transition.end, + delegateType: transition.end, + handle: function (event) { + if ($(event.target).is(this)) { + return event.handleObj.handler.apply(this, arguments) + } + } + } + } + + function transitionEndTest() { + if (window.QUnit) { + return false + } + + let el = document.createElement('bootstrap') + + for (var name in TransitionEndEvent) { + if (el.style[name] !== undefined) { + return { end: TransitionEndEvent[name] } + } + } + + return false + } + + function transitionEndEmulator(duration) { + let called = false + + $(this).one(Util.TRANSITION_END, function () { + called = true + }) + + setTimeout(() => { + if (!called) { + Util.triggerTransitionEnd(this) + } + }, duration) + + return this + } + + function setTransitionEndSupport() { + transition = transitionEndTest() + + $.fn.emulateTransitionEnd = transitionEndEmulator + + if (Util.supportsTransitionEnd()) { + $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent() + } + } + + + /** + * -------------------------------------------------------------------------- + * Public Util Api + * -------------------------------------------------------------------------- + */ + + let Util = { + + TRANSITION_END: 'bsTransitionEnd', + + getUID(prefix) { + do prefix += ~~(Math.random() * 1000000) + while (document.getElementById(prefix)) + return prefix + }, + + getSelectorFromElement(element) { + let selector = element.getAttribute('data-target') + + if (!selector) { + selector = element.getAttribute('href') || '' + selector = /^#[a-z]/i.test(selector) ? selector : null + } + + return selector + }, + + reflow(element) { + new Function('bs', 'return bs')(element.offsetHeight) + }, + + triggerTransitionEnd(element) { + $(element).trigger(transition.end) + }, + + supportsTransitionEnd() { + return !!transition + }, + + typeCheckConfig(componentName, config, configTypes) { + + for (let property in configTypes) { + let expectedTypes = configTypes[property] + let value = config[property] + let valueType + + if (value && isElement(value)) valueType = 'element' + else valueType = toType(value) + + if (!new RegExp(expectedTypes).test(valueType)) { + throw new Error( + `${componentName.toUpperCase()}: ` + + `Option "${property}" provided type "${valueType}" ` + + `but expected type "${expectedTypes}".`) + } + } + } + + } + + setTransitionEndSupport() + + return Util + +})(jQuery) + +export default Util diff --git a/js/tab.js b/js/tab.js deleted file mode 100644 index 416189e3d..000000000 --- a/js/tab.js +++ /dev/null @@ -1,155 +0,0 @@ -/* ======================================================================== - * Bootstrap: tab.js v3.3.4 - * http://getbootstrap.com/javascript/#tabs - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TAB CLASS DEFINITION - // ==================== - - var Tab = function (element) { - // jscs:disable requireDollarBeforejQueryAssignment - this.element = $(element) - // jscs:enable requireDollarBeforejQueryAssignment - } - - Tab.VERSION = '3.3.4' - - Tab.TRANSITION_DURATION = 150 - - Tab.prototype.show = function () { - var $this = this.element - var $ul = $this.closest('ul:not(.dropdown-menu)') - var selector = $this.data('target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - if ($this.parent('li').hasClass('active')) return - - var $previous = $ul.find('.active:last a') - var hideEvent = $.Event('hide.bs.tab', { - relatedTarget: $this[0] - }) - var showEvent = $.Event('show.bs.tab', { - relatedTarget: $previous[0] - }) - - $previous.trigger(hideEvent) - $this.trigger(showEvent) - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return - - var $target = $(selector) - - this.activate($this.closest('li'), $ul) - this.activate($target, $target.parent(), function () { - $previous.trigger({ - type: 'hidden.bs.tab', - relatedTarget: $this[0] - }) - $this.trigger({ - type: 'shown.bs.tab', - relatedTarget: $previous[0] - }) - }) - } - - Tab.prototype.activate = function (element, container, callback) { - var $active = container.find('> .active') - var transition = callback - && $.support.transition - && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) - - function next() { - $active - .removeClass('active') - .find('> .dropdown-menu > .active') - .removeClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', false) - - element - .addClass('active') - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - - if (transition) { - element[0].offsetWidth // reflow for transition - element.addClass('in') - } else { - element.removeClass('fade') - } - - if (element.parent('.dropdown-menu').length) { - element - .closest('li.dropdown') - .addClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - } - - callback && callback() - } - - $active.length && transition ? - $active - .one('bsTransitionEnd', next) - .emulateTransitionEnd(Tab.TRANSITION_DURATION) : - next() - - $active.removeClass('in') - } - - - // TAB PLUGIN DEFINITION - // ===================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tab') - - if (!data) $this.data('bs.tab', (data = new Tab(this))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tab - - $.fn.tab = Plugin - $.fn.tab.Constructor = Tab - - - // TAB NO CONFLICT - // =============== - - $.fn.tab.noConflict = function () { - $.fn.tab = old - return this - } - - - // TAB DATA-API - // ============ - - var clickHandler = function (e) { - e.preventDefault() - Plugin.call($(this), 'show') - } - - $(document) - .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) - .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) - -}(jQuery); diff --git a/js/tests/index.html b/js/tests/index.html index fab2ebc16..0e2bdd012 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -7,6 +7,7 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + @@ -154,7 +154,6 @@ - diff --git a/js/tests/unit/affix.js b/js/tests/unit/affix.js deleted file mode 100644 index 3a6918f86..000000000 --- a/js/tests/unit/affix.js +++ /dev/null @@ -1,107 +0,0 @@ -$(function () { - 'use strict'; - - QUnit.module('affix plugin') - - QUnit.test('should be defined on jquery object', function (assert) { - assert.expect(1) - assert.ok($(document.body).affix, 'affix method is defined') - }) - - QUnit.module('affix', { - beforeEach: function () { - // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode - $.fn.bootstrapAffix = $.fn.affix.noConflict() - }, - afterEach: function () { - $.fn.affix = $.fn.bootstrapAffix - delete $.fn.bootstrapAffix - } - }) - - QUnit.test('should provide no conflict', function (assert) { - assert.expect(1) - assert.strictEqual($.fn.affix, undefined, 'affix was set back to undefined (org value)') - }) - - QUnit.test('should return jquery collection containing the element', function (assert) { - assert.expect(2) - var $el = $('
') - var $affix = $el.bootstrapAffix() - assert.ok($affix instanceof $, 'returns jquery collection') - assert.strictEqual($affix[0], $el[0], 'collection contains element') - }) - - QUnit.test('should exit early if element is not visible', function (assert) { - assert.expect(1) - var $affix = $('
').bootstrapAffix() - $affix.data('bs.affix').checkPosition() - assert.ok(!$affix.hasClass('affix'), 'affix class was not added') - }) - - QUnit.test('should trigger affixed event after affix', function (assert) { - assert.expect(2) - var done = assert.async() - - var templateHTML = '
' - + '
    ' - + '
  • Please affix
  • ' - + '
  • And unaffix
  • ' - + '
' - + '
' - + '
' - $(templateHTML).appendTo(document.body) - - $('#affixTarget').bootstrapAffix({ - offset: $('#affixTarget ul').position() - }) - - $('#affixTarget') - .on('affix.bs.affix', function () { - assert.ok(true, 'affix event fired') - }).on('affixed.bs.affix', function () { - assert.ok(true, 'affixed event fired') - $('#affixTarget, #affixAfter').remove() - done() - }) - - setTimeout(function () { - window.scrollTo(0, document.body.scrollHeight) - - setTimeout(function () { - window.scroll(0, 0) - }, 16) // for testing in a browser - }, 0) - }) - - QUnit.test('should affix-top when scrolling up to offset when parent has padding', function (assert) { - assert.expect(1) - var done = assert.async() - - var templateHTML = '
' - + '
' - + '

Testing affix-top class is added

' - + '
' - + '
' - + '
' - $(templateHTML).appendTo(document.body) - - $('#affixTopTarget') - .bootstrapAffix({ - offset: { top: 120, bottom: 0 } - }) - .on('affixed-top.bs.affix', function () { - assert.ok($('#affixTopTarget').hasClass('affix-top'), 'affix-top class applied') - $('#padding-offset').remove() - done() - }) - - setTimeout(function () { - window.scrollTo(0, document.body.scrollHeight) - - setTimeout(function () { - window.scroll(0, 119) - }, 250) - }, 250) - }) -}) diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index 6be990a51..97818960a 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -38,7 +38,8 @@ $(function () { + '×' + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' + '
' - var $alert = $(alertHTML).bootstrapAlert() + + var $alert = $(alertHTML).bootstrapAlert().appendTo($('#qunit-fixture')) $alert.find('.close').trigger('click') diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index 691796c42..5648506cf 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -32,64 +32,6 @@ $(function () { assert.strictEqual($button[0], $el[0], 'collection contains element') }) - QUnit.test('should return set state to loading', function (assert) { - assert.expect(4) - var $btn = $('') - assert.strictEqual($btn.html(), 'mdo', 'btn text equals mdo') - $btn.bootstrapButton('loading') - var done = assert.async() - setTimeout(function () { - assert.strictEqual($btn.html(), 'fat', 'btn text equals fat') - assert.ok($btn[0].hasAttribute('disabled'), 'btn is disabled') - assert.ok($btn.hasClass('disabled'), 'btn has disabled class') - done() - }, 0) - }) - - QUnit.test('should return reset state', function (assert) { - assert.expect(7) - var $btn = $('') - assert.strictEqual($btn.html(), 'mdo', 'btn text equals mdo') - $btn.bootstrapButton('loading') - var doneOne = assert.async() - setTimeout(function () { - assert.strictEqual($btn.html(), 'fat', 'btn text equals fat') - assert.ok($btn[0].hasAttribute('disabled'), 'btn is disabled') - assert.ok($btn.hasClass('disabled'), 'btn has disabled class') - doneOne() - var doneTwo = assert.async() - $btn.bootstrapButton('reset') - setTimeout(function () { - assert.strictEqual($btn.html(), 'mdo', 'btn text equals mdo') - assert.ok(!$btn[0].hasAttribute('disabled'), 'btn is not disabled') - assert.ok(!$btn.hasClass('disabled'), 'btn does not have disabled class') - doneTwo() - }, 0) - }, 0) - }) - - QUnit.test('should work with an empty string as reset state', function (assert) { - assert.expect(7) - var $btn = $('') diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 39d250598..017bd9bee 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -32,6 +32,38 @@ $(function () { assert.strictEqual($carousel[0], $el[0], 'collection contains element') }) + QUnit.test('should type check config options', function (assert) { + assert.expect(2) + + var message + var expectedMessage = 'CAROUSEL: Option "interval" provided type "string" but expected type "(number|boolean)".' + var config = { + interval: 'fat sux' + } + + try { + $('
').bootstrapCarousel(config) + } catch (e) { + message = e.message + } + + assert.ok(message === expectedMessage, 'correct error message') + + config = { + keyboard: document.createElement('div') + } + expectedMessage = 'CAROUSEL: Option "keyboard" provided type "element" but expected type "boolean".' + + try { + $('
').bootstrapCarousel(config) + } catch (e) { + message = e.message + } + + assert.ok(message === expectedMessage, 'correct error message') + }) + + QUnit.test('should not fire slid when slide is prevented', function (assert) { assert.expect(1) var done = assert.async() @@ -56,13 +88,13 @@ $(function () { + '
  • ' + '' + '