Commit 408b6f2a authored by Abinaya Sudhir's avatar Abinaya Sudhir

replaced bootstrap with bootstrap-native

parent 4c3523d7
/* Bootstrap 3 for IE8 without Modernizr
* CSS is still the better performance
*/
.container { width: 980px; }
.modal-dialog { width: 600px; margin: 30px auto;}
.col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9 { float: left; }
.col-sm-12 {width: 100%;}
.col-sm-11 {width: 91.66666667%;}
.col-sm-10 {width: 83.33333333%;}
.col-sm-9 {width: 75%;}
.col-sm-8 {width: 66.66666667%;}
.col-sm-7 {width: 58.33333333%;}
.col-sm-6 {width: 50%;}
.col-sm-5 {width: 41.66666667%;}
.col-sm-4 {width: 33.33333333%;}
.col-sm-3 {width: 25%;}
.col-sm-2 {width: 16.66666667%;}
.col-sm-1 {width: 8.33333333%;}
.navbar-toggle {display: none;}
.navbar-header {float: left;}
.navbar-collapse.collapse {
display: block!important;
height: auto!important;
padding-bottom: 0;
overflow: visible!important;
padding-right: 0;
padding-left: 0;
width: auto;
border-top: 0;
}
.navbar .navbar-nav { margin-right: 15px; float: right; }
.navbar-nav { float: left; margin: 0; }
.navbar-nav>li { float: left; }
.navbar-nav>li>a { padding-top: 15px; padding-bottom: 15px; }
.btn-group>.btn { margin-left: -1px; }
label {max-width: none; width:auto}
[data-toggle=buttons]>.btn input[type=checkbox],
[data-toggle=buttons]>.btn input[type=radio],
[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],
[data-toggle=buttons]>.btn-group>.btn input[type=radio] {
display: none; left: -999em
}
\ No newline at end of file
/*!
* Bootstrap Docs (https://getbootstrap.com)
* Copyright 2011-2017 The Bootstrap Authors
* Copyright 2011-2017 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see https://creativecommons.org/licenses/by/3.0/.
*/.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-navbar .navbar-nav .nav-link{color:#8e869d}.bd-navbar .navbar-nav .nav-link.active,.bd-navbar .navbar-nav .nav-link:focus,.bd-navbar .navbar-nav .nav-link:hover{color:#292b2c;background-color:transparent}.bd-navbar .navbar-nav .nav-link.active{font-weight:500;color:#040404}.bd-navbar .dropdown-menu{font-size:inherit}.bd-masthead{position:relative;padding:3rem 15px 2rem;color:#cdbfe3;text-align:center;background-image:-webkit-linear-gradient(315deg,#271b38,#563d7c,#7952b3);background-image:-o-linear-gradient(315deg,#271b38,#563d7c,#7952b3);background-image:linear-gradient(135deg,#271b38,#563d7c,#7952b3)}.bd-masthead .bd-booticon{margin:0 auto 2rem;color:#cdbfe3;border-color:#cdbfe3}.bd-masthead h1{font-weight:300;line-height:1}.bd-masthead .lead{margin-right:auto;margin-bottom:2rem;margin-left:auto;font-size:1.25rem;color:#fff}.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:#ffe484;border-color:#ffe484}.bd-masthead .btn:focus,.bd-masthead .btn:hover{color:#2a2730;background-color:#ffe484;border-color:#ffe484}.bd-masthead .carbonad{margin-bottom:-2rem!important}@media (min-width:576px){.bd-masthead{padding-top:8rem;padding-bottom:2rem}.bd-masthead .btn{width:auto}.bd-masthead .carbonad{margin-bottom:0!important}}@media (min-width:768px){.bd-masthead{padding-bottom:4rem}.bd-masthead .bd-header{margin-bottom:4rem}.bd-masthead h1{font-size:4rem}.bd-masthead .lead{font-size:1.5rem}.bd-masthead .carbonad{margin-top:3rem!important}}@media (min-width:992px){.bd-masthead .lead{width:85%;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 .lead{margin-right:auto;margin-bottom:2rem;margin-left:auto;font-size:1rem;text-align:center}@media (min-width:576px){.bd-featurette{text-align:left}}@media (min-width:768px){.bd-featurette .col-sm-6:first-child{padding-right:45px}.bd-featurette .col-sm-6:last-child{padding-left:45px}}.bd-featurette-title{margin-bottom:.5rem;font-size:2rem;font-weight:400;color:#333;text-align:center}.half-rule{width:6rem;margin:2.5rem auto}@media (min-width:576px){.half-rule{margin-right:0;margin-left:0}}.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-fluid{margin-top:2rem}}@media (min-width:768px){.bd-featurette{padding-top:6rem;padding-bottom:6rem}.bd-featurette-title{font-size:2.5rem}.bd-featurette-title+.lead{font-size:1.5rem}.bd-featurette .lead{max-width:80%}.bd-featurette .img-fluid{margin-top:0}}.bd-featured-sites{margin-right:-1px;margin-left:-1px}.bd-featured-sites .col-6{padding:1px}.bd-featured-sites .img-fluid{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}}#carbonads{display:block;padding:15px 15px 15px 160px;margin:50px -15px 0;overflow:hidden;font-size:13px;line-height:1.5;text-align:left;border:solid #866ab3;border-width:1px 0 0}#carbonads a{color:#fff;text-decoration:none}@media (min-width:576px){#carbonads{max-width:330px;margin:50px auto 0;border-width:1px;border-radius:4px}}@media (min-width:992px){#carbonads{position:absolute;top:0;right:15px;margin-top:0}.bd-masthead #carbonads{position:static}}.carbon-img{float:left;margin-left:-145px}.carbon-poweredby{display:block;color:#cdbfe3!important}.bd-content>table{display:block;width:100%;max-width:100%;margin-bottom:1rem;overflow-y:auto}.bd-content>table>tbody>tr>td,.bd-content>table>tbody>tr>th,.bd-content>table>tfoot>tr>td,.bd-content>table>tfoot>tr>th,.bd-content>table>thead>tr>td,.bd-content>table>thead>tr>th{padding:.75rem;vertical-align:top;border:1px solid #eceeef}.bd-content>table>tbody>tr>td>p:last-child,.bd-content>table>tbody>tr>th>p:last-child,.bd-content>table>tfoot>tr>td>p:last-child,.bd-content>table>tfoot>tr>th>p:last-child,.bd-content>table>thead>tr>td>p:last-child,.bd-content>table>thead>tr>th>p:last-child{margin-bottom:0}.bd-content>table td:first-child>code{white-space:nowrap}.bd-content>h2:not(:first-child){margin-top:3rem}.bd-content>h3{margin-top:1.5rem}.bd-content>ol li,.bd-content>ul li{margin-bottom:.25rem}@media (min-width:576px){.bd-title{font-size:3rem}.bd-title+p{font-size:1.25rem;font-weight:300}}#markdown-toc>li:first-child{display:none}#markdown-toc ul{padding-left:2rem;margin-top:.25rem;margin-bottom:.25rem}.bd-pageheader{padding:2rem 15px;margin-bottom:1.5rem;color:#cdbfe3;text-align:center;background-color:#563d7c}.bd-pageheader .container{position:relative}.bd-pageheader h1{font-size:3rem;font-weight:400;color:#fff}.bd-pageheader p{margin-bottom:0;font-size:1.25rem;font-weight:300}@media (min-width:576px){.bd-pageheader{padding-top:4rem;padding-bottom:4rem;margin-bottom:3rem;text-align:left}.bd-pageheader .carbonad{margin:2rem 0 0!important}}@media (min-width:768px){.bd-pageheader h1{font-size:4rem}.bd-pageheader p{font-size:1.5rem}}@media (min-width:992px){.bd-pageheader h1,.bd-pageheader p{margin-right:380px}.bd-pageheader .carbonad{position:absolute;top:0;right:.75rem;margin:0!important}}#skippy{display:block;padding:1em;color:#fff;background-color:#563d7c;outline:0}#skippy .skiplink-text{padding:.5em;outline:1px dotted}@media (min-width:768px){.bd-sidebar{padding-left:1rem}}.bd-search{position:relative;margin-bottom:1.5rem}.bd-search .form-control{height:2.45rem;padding-top:.4rem;padding-bottom:.4rem;background-color:#fafafa}.bd-search .form-control:focus{background-color:#fff}.bd-search-results{right:0;display:block;padding:0;overflow:hidden;font-size:.9rem}.bd-search-results:empty{display:none}.bd-search-results .dropdown-item{padding-right:.75rem;padding-left:.75rem}.bd-search-results .dropdown-item:first-child{margin-top:.25rem}.bd-search-results .dropdown-item:last-child{margin-bottom:.25rem}.bd-search-results .no-results{padding:.75rem 1rem;color:#7a7a7a;text-align:center;white-space:normal}.bd-sidenav{display:none}.bd-toc-link{display:block;padding:.25rem .75rem;color:#464a4c}.bd-toc-link:focus,.bd-toc-link:hover{color:#0275d8;text-decoration:none}.active>.bd-toc-link{font-weight:500;color:#292b2c}.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:.25rem .75rem;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:#292b2c;background-color:transparent}.bd-footer{padding:4rem 0;margin-top:4rem;font-size:85%;text-align:center;background-color:#f7f7f7}.bd-footer a{font-weight:500;color:#464a4c}.bd-footer a:focus,.bd-footer a:hover{color:#0275d8}.bd-footer p{margin-bottom:0}@media (min-width:576px){.bd-footer{text-align:left}}.bd-footer-links{padding-left:0;margin-bottom:1rem}.bd-footer-links li{display:inline-block}.bd-footer-links li+li{margin-left:1rem}.bd-example-row .row+.row{margin-top:1rem}.bd-example-row .row>.col,.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-row .flex-items-bottom,.bd-example-row .flex-items-middle,.bd-example-row .flex-items-top{min-height:6rem;background-color:rgba(255,0,0,.1)}.bd-example-row-flex-cols .row{min-height:10rem;background-color:rgba(255,0,0,.1)}.bd-highlight{background-color:rgba(86,61,124,.15);border:1px solid rgba(86,61,124,.15)}.bd-example-container{min-width:16rem;max-width:25rem;margin-right:auto;margin-left:auto}.bd-example-container-header{height:3rem;margin-bottom:.5rem;background-color:#daeeff;border-radius:.25rem}.bd-example-container-sidebar{float:right;width:4rem;height:8rem;background-color:#fae3c4;border-radius:.25rem}.bd-example-container-body{height:8rem;margin-right:4.5rem;background-color:#957bbe;border-radius:.25rem}.bd-example-container-fluid{max-width:none}.bd-example{position:relative;padding:1rem;margin:1rem -15px;border:solid #f7f7f9;border-width:.2rem 0 0}.bd-example::after{display:block;content:"";clear:both}@media (min-width:576px){.bd-example{padding:1.5rem;margin-right:0;margin-bottom:0;margin-left:0;border-width:.2rem}}.bd-example+.clipboard+.highlight,.bd-example+.highlight{margin-top:0}.bd-example+p{margin-top:2rem}.bd-example .pos-f-t{position:relative;margin:-1rem}@media (min-width:576px){.bd-example .pos-f-t{margin:-1.5rem}}.bd-example>.form-control+.form-control{margin-top:.5rem}.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>.form-group:last-child{margin-bottom:0}.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 input[type=text]+input[type=text],.bd-example-control-sizing select{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 .fixed-top,.bd-example .sticky-top{position:static;margin:-1rem -1rem 1rem}.bd-example .fixed-bottom{position:static;margin:1rem -1rem -1rem}@media (min-width:576px){.bd-example .fixed-top,.bd-example .sticky-top{margin:-1.5rem -1.5rem 1rem}.bd-example .fixed-bottom{margin:1rem -1.5rem -1.5rem}}.bd-example .pagination{margin-top:.5rem;margin-bottom:.5rem}.bd-example-modal{background-color:#fafafa}.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-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-static{padding-bottom:1.5rem;background-color:#f9f9f9}.bd-example-popover-static .popover{position:relative;display:block;float:left;width:260px;margin:1.25rem}.tooltip-demo a{white-space:nowrap}.bd-example-tooltip-static .tooltip{position:relative;display:inline-block;margin:10px 20px;opacity:1}.scrollspy-example{position:relative;height:200px;margin-top:.5rem;overflow:auto}.bd-example>.bg-danger:not(.navbar),.bd-example>.bg-faded:not(.navbar),.bd-example>.bg-info:not(.navbar),.bd-example>.bg-inverse:not(.navbar),.bd-example>.bg-primary:not(.navbar),.bd-example>.bg-success:not(.navbar),.bd-example>.bg-warning:not(.navbar){padding:.5rem;margin-top:.5rem;margin-bottom:.5rem}.bd-example-border-utils [class^=border-]{display:inline-block;width:6rem;height:6rem;margin:.25rem;background-color:#f5f5f5;border:1px solid}.highlight{padding:1rem;margin:1rem -15px;background-color:#f7f7f9;-ms-overflow-style:-ms-autohiding-scrollbar}@media (min-width:576px){.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:#292b2c}.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{text-align:center}.responsive-utilities .is-visible{color:#468847;background-color:#dff0d8!important}.responsive-utilities .is-hidden{color:#ccc;background-color:#f9f9f9!important}.responsive-utilities-test{margin-top:.25rem}.responsive-utilities-test .col-6{margin-top:.5rem;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-6>.not-visible,.visible-on .col-6>.not-visible{color:#999;border:1px solid #ddd}.hidden-on .col-6 .visible,.visible-on .col-6 .visible{color:#468847;background-color:#dff0d8;border:1px solid #d6e9c6}@media (max-width:575px){.hidden-xs-only{display:none!important}}@media (min-width:576px) and (max-width:767px){.hidden-sm-only{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-md-only{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-lg-only{display:none!important}}@media (min-width:1200px){.hidden-xl-only{display:none!important}}.btn-bs{font-weight:500;color:#7952b3;border-color:#7952b3}.btn-bs:active,.btn-bs:focus,.btn-bs:hover{color:#fff;background-color:#7952b3;border-color:#7952b3}.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{margin-bottom:1.5rem}.bd-team .team-member{line-height:2rem;color:#555}.bd-team .team-member:focus,.bd-team .team-member:hover{color:#333}.bd-team .team-member:hover{text-decoration:none}.bd-team .github-btn{float:right;width:180px;height:1.25rem;margin-top:.25rem;border:0}.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}.bd-clipboard{position:relative;display:none;float:right}.bd-clipboard+.highlight{margin-top:0}.btn-clipboard{position:absolute;top:.5rem;right:.5rem;z-index:10;display:block;padding:.25rem .5rem;font-size:75%;color:#818a91;cursor:pointer;background-color:transparent;border-radius:.25rem}.btn-clipboard:hover{color:#fff;background-color:#027de7}@media (min-width:768px){.bd-clipboard{display:block}}.hll{background-color:#ffc}.c{color:#999}.k{color:#069}.o{color:#555}.cm{color:#999}.cp{color:#099}.c1{color:#999}.cs{color:#999}.gd{background-color:#fcc;border:1px solid #c00}.ge{font-style:italic}.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{color:#069}.kd{color:#069}.kn{color:#069}.kp{color:#069}.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{color:#f60}.mh{color:#f60}.mi{color:#f60}.mo{color:#f60}.sb{color:#c30}.sc{color:#c30}.sd{font-style:italic;color:#c30}.s2{color:#c30}.se{color:#c30}.sh{color:#c30}.si{color:#a00}.sx{color:#c30}.sr{color:#3aa}.s1{color:#c30}.ss{color:#fc3}.bp{color:#366}.vc{color:#033}.vg{color:#033}.vi{color:#033}.il{color:#f60}.css .nt+.nt,.css .o,.css .o+.nt{color:#999}.language-bash::before{color:#009;content:"$ ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.language-powershell::before{color:#009;content:"PM> ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.anchorjs-link{color:inherit}@media (max-width:480px){.anchorjs-link{display:none}}:hover>.anchorjs-link{opacity:.75;-webkit-transition:color .16s linear;-o-transition:color .16s linear;transition:color .16s linear}.anchorjs-link:focus,:hover>.anchorjs-link:hover{text-decoration:none;opacity:1}
\ No newline at end of file
/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript */
/**
* okaidia theme for JavaScript, CSS and HTML
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
* @author ocodia
*/
code[class*="language-"],
pre[class*="language-"] {
color: #f8f8f2;
background: none;
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border-radius: 0.3em;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #272822;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #f8f8f2;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #f92672;
}
.token.boolean,
.token.number {
color: #ae81ff;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #a6e22e;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #f8f8f2;
}
.token.atrule,
.token.attr-value,
.token.function {
color: #e6db74;
}
.token.keyword {
color: #66d9ef;
}
.token.regex,
.token.important {
color: #fd971f;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
/* REQUIRED STYLING */
/* styles the close button for the dismissible popovers */
.popover .close { position: absolute; top: 7px; right: 10px; }
/* REQUIRED STYLING */
/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */
body {
color: #5a5a5a;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
#main-container {padding-top: 20px;}
footer { padding: 20px 0 10px; background: #e6f0f8 }
/* some typo */
h1,h2,h3,h4,h5,strong,b { color: #111 }
h1 { letter-spacing: -2px }
h2 { letter-spacing: -3px; font-size: 56px; font-weight: bold }
h3:not(.popover-title) {
font-size: 32px;
font-weight: bold;
letter-spacing: -2px;
}
hr.clearfix {clear: both; width: 100%; float: left}
/* colors */
.bg-bootstrap { background-color: #563d7c }
.bg-pink { background-color: #E91E63 }
.bg-indigo { background-color: #673ab7 }
.bg-purple { background-color: #9c27b0 }
.bg-red { background-color: #e51c23 }
/* CONTENT STYLING
-------------------------------------------------- */
/* required for scrollspy to work perfect */
section { position: relative; display: inline-block; width: 100%; }
.scrollspy-example {
position: relative; height: 150px; overflow: auto; margin-bottom: 20px;
padding: 0 15px; border: 1px solid #ddd; border-radius: 4px 0 0 4px;
}
/* required for scrollspy to work perfect */
/* some content customization | because why not */
#componentTab .nav-tabs, #componentTab .nav-pills, #componentTab .navbar-nav, #componentTab .nav-stacked { margin-bottom: 15px }
#componentTab .nav-stacked li a {padding: 5px 10px}
#componentTab .nav-stacked,
#componentTab .nav.panel { float: left; margin: 0 15px 20px 0 }
#componentTab .nav-list { float: left; margin: 0 15px 20px 0; border-right: 1px solid #ddd }
#componentTab .nav.panel > li.active > a,
#componentTab .nav-list > li.active > a { background: #286090; color: #fff }
#componentTab .nav.panel > li:first-child > a { border-radius: 3px 3px 0 0; }
#componentTab .nav.panel > li:last-child > a { border-radius: 0 0 3px 3px; }
#componentTab .navbar-nav { background: #eee; width: 100%; border-radius: 3px; }
#componentTab .navbar-nav > li:first-child > a { border-radius: 3px 0 0 3px; }
#componentTab .navbar-nav > li.active > a { background: #286090; color: #fff }
#componentTab .nav.nav-stacked .dropdown-menu,
#componentTab .nav.panel .dropdown-menu,
#componentTab .nav-list .dropdown-menu { margin: 0; top: 0; left: 103%; }
#componentTab .nav.panel + .tab-content,
#componentTab .nav.nav-list + .tab-content { display: table-cell }
/*#componentTab .btn-group { position: absolute; top:8px; left: 85px }*/
#componentTab .btn-group > .btn { margin: 0}
#componentTab .btn-group { margin: 0 0 20px }
/* buttons */
p .btn, p .form-control {vertical-align: top}
p .btn, p .form-control {margin-bottom: 20px; vertical-align: top}
/*p .btn-group {margin-bottom: 20px}*/
#collapseExampleWrapper { padding: 20px 20px 10px }
#collapseExample .well {margin-bottom: 10px}
.btn-group .btn {margin-bottom: 0}
#components {padding-bottom: 20px }
/* nested dropdowns */
.dropdown-menu .dropdown-menu.left {
top: -1px;
left: auto; right: 100%;
margin: 0 3px 0 0;
}
.dropdown-menu .dropdown-menu.right {
top: -1px;
left: 100%;
margin: 0 0 0 3px;
}
/* when on mobile, disable affix position */
#side-nav {clear: both}
#side-nav .nav.affix,
#side-nav .nav.affix.affix-bottom { position: relative; margin: 20px 0; backface-visibility: hidden; }
#side-nav > .nav li.active > a,
#side-nav > .nav li.active:hover > a { background-color: #e6f0f8 }
#side-nav > .nav li:hover > a { background-color: #f5f9fc }
/* CUSTOMIZE THE NAVBAR
-------------------------------------------------- */
.navbar-inverse .navbar-brand { color: #fff }
.navbar-nav .open .dropdown-menu { left: auto; right:0 }
.navbar-collapse.collapsing {overflow-y: hidden}
.navbar-nav { float: none }
.navbar-fixed-top { padding: .5rem 0; border:0 }
.navbar-brand { font-size: 20px }
.navbar-brand svg { display: inline-block; vertical-align:top; margin: -8px 0 0 0 }
.navbar-brand span { display: inline-block; vertical-align: top }
.navbar-inverse .navbar-nav>.open>a,
.navbar-inverse .navbar-nav>.open>a:focus,
.navbar-inverse .navbar-nav>.open>a:hover {
background-color: transparent;
}
.navbar-inverse .navbar-toggle {
border-color: #eee;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
border-color: #fff;
}
.navbar-inverse .navbar-toggle:focus, .navbar-inverse .navbar-toggle:hover {
background-color: #673ab7;
}
/* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */
/* Carousel base class */
#myCarousel.carousel {
height: 500px;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
z-index: 10;
}
/* do some transition */
#myCarousel .item {
-webkit-transition-timing-function: cubic-bezier(.45,.18,0,1);
transition-timing-function: cubic-bezier(.45,.18,0,1);
}
#myCarousel .carousel-caption {
-webkit-transition: all 0.3s;
transition: all 0.3s;
-webkit-transition-timing-function: cubic-bezier(0,.24,0,1);
transition-timing-function: cubic-bezier(0,.24,0,1);
opacity: 0;
}
/* when going forward, captions slide left */
#myCarousel .next .carousel-caption {
-webkit-transform: translate3d(50%, 0, 0);
transform: translate3d(50%, 0, 0);
}
#myCarousel .prev .carousel-caption {
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
}
/* when going backward, captions move different */
#myCarousel .right.next .carousel-caption {
-webkit-transform: /*translate3d(50%, 0, 0)*/ rotateX(90deg);
transform: /*translate3d(50%, 0, 0)*/ rotateX(90deg);
}
#myCarousel .right.prev .carousel-caption {
-webkit-transform: /*translate3d(-50%, 0, 0)*/ rotateX(-90deg);
transform: /*translate3d(-50%, 0, 0)*/ rotateX(-90deg);
}
#myCarousel .carousel-caption.slide {
-webkit-transform: translate3d( 0%, 0, 0);
transform: translate3d(0%, 0, 0);
opacity:1;
/*visibility: visible; */
}
/* Declare heights because of positioning of img element */
#myCarousel .item {
height: 500px; width: 100%;
background-color: #777;
}
.carousel h2 { letter-spacing: -1px; font-size: 30px; font-weight: bold }
.carousel .item.prev,
.carousel .item.next {display: block}
#myCarousel .carousel-inner > .item > .item-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 500px;
}
.carousel .btn-default.btn-empty { border-width: 2px; color: #fff; border-color: #fff; background: none transparent }
.carousel .btn-default.btn-empty:hover { color: #337ab7; background: #fff }
.carousel h1,.carousel h2,.carousel h3,.carousel strong,.carousel b { color: #fff }
.carousel a { color: #fff; text-decoration:underline }
.carousel a:hover { color: #eee }
.carousel a.btn { text-decoration:none }
/* the small carousel thumbnail */
#carousel-example-generic { margin: 0 }
#carousel-example-generic,
#carousel-example-generic .carousel-inner > .item > img { height: auto }
/* dropdown form */
.form-vertical {
padding: 10px 10px 5px 10px;
width: 250px;
}
/* side navigation */
#side-nav { margin-top: 40px; clear: none }
/*#side-nav > .nav > li > ul { margin-top: 2px; height:0; opacity: 0; padding-left: 15px; transition: all 0.3s ease-out; }*/
#side-nav > .nav li > ul { height:0; opacity: 0; padding-left: 15px; transition: height 0.3s ease-out, opacity 0.3s ease; }
#side-nav > .nav li { overflow: hidden }
#side-nav > .nav li.active > ul { opacity: 1; margin-top: 2px; }
#side-nav > .nav li.active.list2 > ul { height: 66px; height: calc(32px*2 + 2px); }
#side-nav > .nav li.active.list3 > ul { height: 100px; height: calc(32px*3 + 2px*2); }
#side-nav > .nav li.active.list4 > ul { height: 134px; height: calc(32px*4 + 2px*3); }
#side-nav > .nav li.active.list5 > ul { height: 168px; height: calc(32px*5 + 2px*4); }
#side-nav > .nav li.active.list6 > ul { height: 202px; height: calc(32px*6 + 2px*5); }
#side-nav > .nav li.active.list7 > ul { height: 236px; height: calc(32px*7 + 2px*6); }
#side-nav > .nav li.active.list8 > ul { height: 270px; height: calc(32px*8 + 2px*7); }
#side-nav > .nav li.active.list9 > ul { height: 304px; height: calc(32px*9 + 2px*8); }
#side-nav > .nav li.active.list11 > ul { height: 338px; height: calc(32px*11 + 2px*10); }
#side-nav > .nav li.active.list11.additional > ul { height: 506px; height: calc(32px*11 + 2px*10 + 32px*5 + 2px*4); }
#side-nav > .nav li > a { z-index: 1; padding: 6px 10px; }
#side-nav > .nav li > ul { z-index: 0 }
.tooltip b, .tooltip strong {color: #fff}
/* RESPONSIVE CSS
-------------------------------------------------- */
@media screen and (max-width: 1200px) {
.carousel-caption {
right: 10%;
left: 10%;
padding-bottom: 30px;
}
}
@media (min-width: 768px) {
/* affix example */
#side-nav .nav.affix,
#side-nav .nav.affix-bottom { position: fixed !important; width: 263px; }
#side-nav .nav.affix { top: 50px; }
#side-nav .nav.affix-bottom { top: auto; bottom: 100px }
/* Navbar positioning foo */
.navbar .navbar-nav {margin-right: 15px; float: right}
/* Bump up size of carousel content */
.carousel-caption p {
margin-bottom: 20px;
font-size: 21px;
line-height: 1.4;
}
.carousel h2 { letter-spacing: -3px; font-size: 56px; font-weight: bold }
}
/* IE8 without modernizr */
.ie8 #side-nav .nav.affix { position: fixed !important; width: 215px; top: 0; }
.ie8 #side-nav .nav.affix.affix-bottom { top: auto; bottom: 100px; }
.ie8 .navbar-wrapper { margin-top: 40px; }
.ie8 .navbar-wrapper .container { padding-right: 15px; padding-left: 15px; }
.ie8 .navbar-wrapper .navbar { padding-right: 0; padding-left: 0; }
.ie8 .navbar .navbar-nav {margin-right: 15px; float: right}
/* IE8 without modernizr */
/* code wrapping */
pre {
display: block;
padding: 10px 15px !important;
/*margin: 0 0 20px !important;*/
line-height: 2.08;
color: #999;
word-break: break-all;
background-color: rgb(33,33,33);
background-color: rgba(11,11,11,0.8);
border: none;
border-radius: 4px;
text-align: left;
position: relative;
}
pre code {background: none;padding: 0; font-weight: normal; font-size: 100%;}
\ No newline at end of file
.fixed-top { background: #563d7c }
#myCarousel { margin-bottom: 4rem }
#myCarousel .carousel-inner > .carousel-item > .item-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 500px;
}
#myCarousel .carousel-item {
height: 500px;
width: 100%;
}
.carousel-item {
-webkit-transition-timing-function: cubic-bezier(.45,.18,0,1);
transition-timing-function: cubic-bezier(.45,.18,0,1);
}
@media (min-width: 768px) {
.carousel h1 {
letter-spacing: -3px;
font-size: 56px;
font-weight: bold;
}
}
.dropdown-menu .dropdown-menu {
top: -1px;
left: 100%;
margin: 0 0 0 3px;
}
@media (max-width: 575px) {
#myCarousel .container {
width: 100%;
}
.hidden-xs {display: none !important}
}
h2 {
letter-spacing: -3px;
font-size: 56px;
font-weight: bold;
}
h3:not(.popover-header) {
font-size: 32px;
font-weight: bold;
letter-spacing: -2px;
}
.bg-bootstrap { background-color: #563d7c }
.bg-pink { background-color: #E91E63 }
.bg-indigo { background-color: #9c27b0 }
\ No newline at end of file
......@@ -6,7 +6,7 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
<link href="css/login.min.css" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- <link href="css/lavish-bootstrap.css" rel="stylesheet"> -->
<link rel="stylesheet" type="text/css" href="css/menu.css"/>
<link href="css/Login.css" rel="stylesheet">
......@@ -55,9 +55,7 @@
</head>
<body>
<div id="app"></div>
<script src="js/bootstrap-native.min.js"></script>
<script src="bundle.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
// Native Javascript for Bootstrap 4 v2.0.23 | © dnp_theme | MIT-License
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD support:
define([], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like:
module.exports = factory();
} else {
// Browser globals (root is window)
var bsn = factory();
root.Alert = bsn.Alert;
root.Button = bsn.Button;
root.Carousel = bsn.Carousel;
root.Collapse = bsn.Collapse;
root.Dropdown = bsn.Dropdown;
root.Modal = bsn.Modal;
root.Popover = bsn.Popover;
root.ScrollSpy = bsn.ScrollSpy;
root.Tab = bsn.Tab;
root.Tooltip = bsn.Tooltip;
}
}(this, function () {
/* Native Javascript for Bootstrap 4 | Internal Utility Functions
----------------------------------------------------------------*/
"use strict";
// globals
var globalObject = typeof global !== 'undefined' ? global : this||window,
DOC = document, HTML = DOC.documentElement, body = 'body', // allow the library to be used in <head>
// Native Javascript for Bootstrap Global Object
BSN = globalObject.BSN = {},
supports = BSN.supports = [],
// function toggle attributes
dataToggle = 'data-toggle',
dataDismiss = 'data-dismiss',
dataSpy = 'data-spy',
dataRide = 'data-ride',
// components
stringAlert = 'Alert',
stringButton = 'Button',
stringCarousel = 'Carousel',
stringCollapse = 'Collapse',
stringDropdown = 'Dropdown',
stringModal = 'Modal',
stringPopover = 'Popover',
stringScrollSpy = 'ScrollSpy',
stringTab = 'Tab',
stringTooltip = 'Tooltip',
// options DATA API
databackdrop = 'data-backdrop',
dataKeyboard = 'data-keyboard',
dataTarget = 'data-target',
dataInterval = 'data-interval',
dataHeight = 'data-height',
dataPause = 'data-pause',
dataTitle = 'data-title',
dataOriginalTitle = 'data-original-title',
dataOriginalText = 'data-original-text',
dataDismissible = 'data-dismissible',
dataTrigger = 'data-trigger',
dataAnimation = 'data-animation',
dataContainer = 'data-container',
dataPlacement = 'data-placement',
dataDelay = 'data-delay',
dataOffsetTop = 'data-offset-top',
dataOffsetBottom = 'data-offset-bottom',
// option keys
backdrop = 'backdrop', keyboard = 'keyboard', delay = 'delay',
content = 'content', target = 'target',
interval = 'interval', pause = 'pause', animation = 'animation',
placement = 'placement', container = 'container',
// box model
offsetTop = 'offsetTop', offsetBottom = 'offsetBottom',
offsetLeft = 'offsetLeft',
scrollTop = 'scrollTop', scrollLeft = 'scrollLeft',
clientWidth = 'clientWidth', clientHeight = 'clientHeight',
offsetWidth = 'offsetWidth', offsetHeight = 'offsetHeight',
innerWidth = 'innerWidth', innerHeight = 'innerHeight',
scrollHeight = 'scrollHeight', height = 'height',
// aria
ariaExpanded = 'aria-expanded',
ariaHidden = 'aria-hidden',
// event names
clickEvent = 'click',
hoverEvent = 'hover',
keydownEvent = 'keydown',
keyupEvent = 'keyup',
resizeEvent = 'resize',
scrollEvent = 'scroll',
// originalEvents
showEvent = 'show',
shownEvent = 'shown',
hideEvent = 'hide',
hiddenEvent = 'hidden',
closeEvent = 'close',
closedEvent = 'closed',
slidEvent = 'slid',
slideEvent = 'slide',
changeEvent = 'change',
// other
getAttribute = 'getAttribute',
setAttribute = 'setAttribute',
hasAttribute = 'hasAttribute',
createElement = 'createElement',
appendChild = 'appendChild',
innerHTML = 'innerHTML',
getElementsByTagName = 'getElementsByTagName',
preventDefault = 'preventDefault',
getBoundingClientRect = 'getBoundingClientRect',
querySelectorAll = 'querySelectorAll',
getElementsByCLASSNAME = 'getElementsByClassName',
indexOf = 'indexOf',
parentNode = 'parentNode',
length = 'length',
toLowerCase = 'toLowerCase',
Transition = 'Transition',
Webkit = 'Webkit',
style = 'style',
push = 'push',
tabindex = 'tabindex',
contains = 'contains',
active = 'active',
showClass = 'show',
collapsing = 'collapsing',
disabled = 'disabled',
loading = 'loading',
left = 'left',
right = 'right',
top = 'top',
bottom = 'bottom',
// tooltip / popover
mouseHover = ('onmouseleave' in DOC) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ],
tipPositions = /\b(top|bottom|left|right)+/,
// modal
modalOverlay = 0,
fixedTop = 'fixed-top',
fixedBottom = 'fixed-bottom',
// transitionEnd since 2.0.4
supportTransitions = Webkit+Transition in HTML[style] || Transition[toLowerCase]() in HTML[style],
transitionEndEvent = Webkit+Transition in HTML[style] ? Webkit[toLowerCase]()+Transition+'End' : Transition[toLowerCase]()+'end',
// set new focus element since 2.0.3
setFocus = function(element){
element.focus ? element.focus() : element.setActive();
},
// class manipulation, since 2.0.0 requires polyfill.js
addClass = function(element,classNAME) {
element.classList.add(classNAME);
},
removeClass = function(element,classNAME) {
element.classList.remove(classNAME);
},
hasClass = function(element,classNAME){ // since 2.0.0
return element.classList[contains](classNAME);
},
// selection methods
getElementsByClassName = function(element,classNAME) { // returns Array
return [].slice.call(element[getElementsByCLASSNAME]( classNAME ));
},
queryElement = function (selector, parent) {
var lookUp = parent ? parent : DOC;
return typeof selector === 'object' ? selector : lookUp.querySelector(selector);
},
getClosest = function (element, selector) { //element is the element and selector is for the closest parent element to find
// source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
var firstChar = selector.charAt(0), selectorSubstring = selector.substr(1);
if ( firstChar === '.' ) {// If selector is a class
for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selectorSubstring) ) { return element; }
}
} else if ( firstChar === '#' ) { // If selector is an ID
for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
if ( element.id === selectorSubstring ) { return element; }
}
}
return false;
},
// event attach jQuery style / trigger since 1.2.0
on = function (element, event, handler) {
element.addEventListener(event, handler, false);
},
off = function(element, event, handler) {
element.removeEventListener(event, handler, false);
},
one = function (element, event, handler) { // one since 2.0.4
on(element, event, function handlerWrapper(e){
handler(e);
off(element, event, handlerWrapper);
});
},
emulateTransitionEnd = function(element,handler){ // emulateTransitionEnd since 2.0.4
if (supportTransitions) { one(element, transitionEndEvent, function(e){ handler(e); }); }
else { handler(); }
},
bootstrapCustomEvent = function (eventName, componentName, related) {
var OriginalCustomEvent = new CustomEvent( eventName + '.bs.' + componentName);
OriginalCustomEvent.relatedTarget = related;
this.dispatchEvent(OriginalCustomEvent);
},
// tooltip / popover stuff
getScroll = function() { // also Affix and ScrollSpy uses it
return {
y : globalObject.pageYOffset || HTML[scrollTop],
x : globalObject.pageXOffset || HTML[scrollLeft]
}
},
styleTip = function(link,element,position,parent) { // both popovers and tooltips (target,tooltip,placement,elementToAppendTo)
var elementDimensions = { w : element[offsetWidth], h: element[offsetHeight] },
windowWidth = (HTML[clientWidth] || DOC[body][clientWidth]),
windowHeight = (HTML[clientHeight] || DOC[body][clientHeight]),
rect = link[getBoundingClientRect](),
scroll = parent === DOC[body] ? getScroll() : { x: parent[offsetLeft] + parent[scrollLeft], y: parent[offsetTop] + parent[scrollTop] },
linkDimensions = { w: rect[right] - rect[left], h: rect[bottom] - rect[top] },
isPopover = hasClass(element,'popover'),
topPosition, leftPosition,
arrow = queryElement('.arrow',element),
arrowTop, arrowLeft, arrowWidth, arrowHeight,
halfTopExceed = rect[top] + linkDimensions.h/2 - elementDimensions.h/2 < 0,
halfLeftExceed = rect[left] + linkDimensions.w/2 - elementDimensions.w/2 < 0,
halfRightExceed = rect[left] + elementDimensions.w/2 + linkDimensions.w/2 >= windowWidth,
halfBottomExceed = rect[top] + elementDimensions.h/2 + linkDimensions.h/2 >= windowHeight,
topExceed = rect[top] - elementDimensions.h < 0,
leftExceed = rect[left] - elementDimensions.w < 0,
bottomExceed = rect[top] + elementDimensions.h + linkDimensions.h >= windowHeight,
rightExceed = rect[left] + elementDimensions.w + linkDimensions.w >= windowWidth;
// recompute position
position = (position === left || position === right) && leftExceed && rightExceed ? top : position; // first, when both left and right limits are exceeded, we fall back to top|bottom
position = position === top && topExceed ? bottom : position;
position = position === bottom && bottomExceed ? top : position;
position = position === left && leftExceed ? right : position;
position = position === right && rightExceed ? left : position;
// update tooltip/popover class
element.className[indexOf](position) === -1 && (element.className = element.className.replace(tipPositions,position));
// we check the computed width & height and update here
arrowWidth = arrow[offsetWidth]; arrowHeight = arrow[offsetHeight];
// apply styling to tooltip or popover
if ( position === left || position === right ) { // secondary|side positions
if ( position === left ) { // LEFT
leftPosition = rect[left] + scroll.x - elementDimensions.w - ( isPopover ? arrowWidth : 0 );
} else { // RIGHT
leftPosition = rect[left] + scroll.x + linkDimensions.w;
}
// adjust top and arrow
if (halfTopExceed) {
topPosition = rect[top] + scroll.y;
arrowTop = linkDimensions.h/2 - arrowWidth;
} else if (halfBottomExceed) {
topPosition = rect[top] + scroll.y - elementDimensions.h + linkDimensions.h;
arrowTop = elementDimensions.h - linkDimensions.h/2 - arrowWidth;
} else {
topPosition = rect[top] + scroll.y - elementDimensions.h/2 + linkDimensions.h/2;
arrowTop = elementDimensions.h/2 - (isPopover ? arrowHeight*0.9 : arrowHeight/2);
}
} else if ( position === top || position === bottom ) { // primary|vertical positions
if ( position === top) { // TOP
topPosition = rect[top] + scroll.y - elementDimensions.h - ( isPopover ? arrowHeight : 0 );
} else { // BOTTOM
topPosition = rect[top] + scroll.y + linkDimensions.h;
}
// adjust left | right and also the arrow
if (halfLeftExceed) {
leftPosition = 0;
arrowLeft = rect[left] + linkDimensions.w/2 - arrowWidth;
} else if (halfRightExceed) {
leftPosition = windowWidth - elementDimensions.w*1.01;
arrowLeft = elementDimensions.w - ( windowWidth - rect[left] ) + linkDimensions.w/2 - arrowWidth/2;
} else {
leftPosition = rect[left] + scroll.x - elementDimensions.w/2 + linkDimensions.w/2;
arrowLeft = elementDimensions.w/2 - arrowWidth/2;
}
}
// apply style to tooltip/popover and its arrow
element[style][top] = topPosition + 'px';
element[style][left] = leftPosition + 'px';
arrowTop && (arrow[style][top] = arrowTop + 'px');
arrowLeft && (arrow[style][left] = arrowLeft + 'px');
};
BSN.version = '2.0.23';
/* Native Javascript for Bootstrap 4 | Alert
-------------------------------------------*/
// ALERT DEFINITION
// ================
var Alert = function( element ) {
// initialization element
element = queryElement(element);
// bind, target alert, duration and stuff
var self = this, component = 'alert',
alert = getClosest(element,'.'+component),
triggerHandler = function(){ hasClass(alert,'fade') ? emulateTransitionEnd(alert,transitionEndHandler) : transitionEndHandler(); },
// handlers
clickHandler = function(e){
alert = getClosest(e[target],'.'+component);
element = queryElement('['+dataDismiss+'="'+component+'"]',alert);
element && alert && (element === e[target] || element[contains](e[target])) && self.close();
},
transitionEndHandler = function(){
bootstrapCustomEvent.call(alert, closedEvent, component);
off(element, clickEvent, clickHandler); // detach it's listener
alert[parentNode].removeChild(alert);
};
// public method
this.close = function() {
if ( alert && element && hasClass(alert,showClass) ) {
bootstrapCustomEvent.call(alert, closeEvent, component);
removeClass(alert,showClass);
alert && triggerHandler();
}
};
// init
if ( !(stringAlert in element ) ) { // prevent adding event handlers twice
on(element, clickEvent, clickHandler);
}
element[stringAlert] = self;
};
// ALERT DATA API
// ==============
supports[push]([stringAlert, Alert, '['+dataDismiss+'="alert"]']);
/* Native Javascript for Bootstrap 4 | Button
---------------------------------------------*/
// BUTTON DEFINITION
// ===================
var Button = function( element ) {
// initialization element
element = queryElement(element);
// constant
var toggled = false, // toggled makes sure to prevent triggering twice the change.bs.button events
// strings
component = 'button',
checked = 'checked',
reset = 'reset',
LABEL = 'LABEL',
INPUT = 'INPUT',
// private methods
keyHandler = function(e){
var key = e.which || e.keyCode;
key === 32 && e[target] === DOC.activeElement && toggle(e);
},
preventScroll = function(e){
var key = e.which || e.keyCode;
key === 32 && e[preventDefault]();
},
toggle = function(e) {
var label = e[target].tagName === LABEL ? e[target] : e[target][parentNode].tagName === LABEL ? e[target][parentNode] : null; // the .btn label
if ( !label ) return; //react if a label or its immediate child is clicked
var eventTarget = e[target], // the button itself, the target of the handler function
labels = getElementsByClassName(eventTarget[parentNode],'btn'), // all the button group buttons
input = label[getElementsByTagName](INPUT)[0];
if ( !input ) return; //return if no input found
// manage the dom manipulation
if ( input.type === 'checkbox' ) { //checkboxes
if ( !input[checked] ) {
addClass(label,active);
input[getAttribute](checked);
input[setAttribute](checked,checked);
input[checked] = true;
} else {
removeClass(label,active);
input[getAttribute](checked);
input.removeAttribute(checked);
input[checked] = false;
}
if (!toggled) { // prevent triggering the event twice
toggled = true;
bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
}
}
if ( input.type === 'radio' && !toggled ) { // radio buttons
if ( !input[checked] ) { // don't trigger if already active
addClass(label,active);
input[setAttribute](checked,checked);
input[checked] = true;
bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
toggled = true;
for (var i = 0, ll = labels[length]; i<ll; i++) {
var otherLabel = labels[i], otherInput = otherLabel[getElementsByTagName](INPUT)[0];
if ( otherLabel !== label && hasClass(otherLabel,active) ) {
removeClass(otherLabel,active);
otherInput.removeAttribute(checked);
otherInput[checked] = false;
bootstrapCustomEvent.call(otherInput, changeEvent, component); // trigger the change
}
}
}
}
setTimeout( function() { toggled = false; }, 50 );
};
// init
if ( !( stringButton in element ) ) { // prevent adding event handlers twice
on( element, clickEvent, toggle );
queryElement('['+tabindex+']',element) && on( element, keyupEvent, keyHandler ),
on( element, keydownEvent, preventScroll );
}
// activate items on load
var labelsToACtivate = getElementsByClassName(element, 'btn'), lbll = labelsToACtivate[length];
for (var i=0; i<lbll; i++) {
!hasClass(labelsToACtivate[i],active) && queryElement('input:checked',labelsToACtivate[i])
&& addClass(labelsToACtivate[i],active);
}
element[stringButton] = this;
};
// BUTTON DATA API
// =================
supports[push]( [ stringButton, Button, '['+dataToggle+'="buttons"]' ] );
/* Native Javascript for Bootstrap 4 | Carousel
----------------------------------------------*/
// CAROUSEL DEFINITION
// ===================
var Carousel = function( element, options ) {
// initialization element
element = queryElement( element );
// set options
options = options || {};
// DATA API
var intervalAttribute = element[getAttribute](dataInterval),
intervalOption = options[interval],
intervalData = intervalAttribute === 'false' ? 0 : parseInt(intervalAttribute),
pauseData = element[getAttribute](dataPause) === hoverEvent || false,
keyboardData = element[getAttribute](dataKeyboard) === 'true' || false,
// strings
component = 'carousel',
paused = 'paused',
direction = 'direction',
carouselItem = 'carousel-item',
dataSlideTo = 'data-slide-to';
this[keyboard] = options[keyboard] === true || keyboardData;
this[pause] = (options[pause] === hoverEvent || pauseData) ? hoverEvent : false; // false / hover
this[interval] = typeof intervalOption === 'number' ? intervalOption
: intervalData === 0 || intervalData === false ? 0
: 5000; // bootstrap carousel default interval
// bind, event targets
var self = this, index = element.index = 0, timer = element.timer = 0,
isSliding = false, // isSliding prevents click event handlers when animation is running
slides = getElementsByClassName(element,carouselItem), total = slides[length],
slideDirection = this[direction] = left,
leftArrow = getElementsByClassName(element,component+'-control-prev')[0],
rightArrow = getElementsByClassName(element,component+'-control-next')[0],
indicator = queryElement( '.'+component+'-indicators', element ),
indicators = indicator && indicator[getElementsByTagName]( "LI" ) || [];
// handlers
var pauseHandler = function () {
if ( self[interval] !==false && !hasClass(element,paused) ) {
addClass(element,paused);
!isSliding && clearInterval( timer );
}
},
resumeHandler = function() {
if ( self[interval] !== false && hasClass(element,paused) ) {
removeClass(element,paused);
!isSliding && clearInterval( timer );
!isSliding && self.cycle();
}
},
indicatorHandler = function(e) {
e[preventDefault]();
if (isSliding) return;
var eventTarget = e[target]; // event target | the current active item
if ( eventTarget && !hasClass(eventTarget,active) && eventTarget[getAttribute](dataSlideTo) ) {
index = parseInt( eventTarget[getAttribute](dataSlideTo), 10 );
} else { return false; }
self.slideTo( index ); //Do the slide
},
controlsHandler = function (e) {
e[preventDefault]();
if (isSliding) return;
var eventTarget = e.currentTarget || e.srcElement;
if ( eventTarget === rightArrow ) {
index++;
} else if ( eventTarget === leftArrow ) {
index--;
}
self.slideTo( index ); //Do the slide
},
keyHandler = function (e) {
if (isSliding) return;
switch (e.which) {
case 39:
index++;
break;
case 37:
index--;
break;
default: return;
}
self.slideTo( index ); //Do the slide
},
// private methods
isElementInScrollRange = function () {
var rect = element[getBoundingClientRect](),
viewportHeight = globalObject[innerHeight] || HTML[clientHeight]
return rect[top] <= viewportHeight && rect[bottom] >= 0; // bottom && top
},
setActivePage = function( pageIndex ) { //indicators
for ( var i = 0, icl = indicators[length]; i < icl; i++ ) {
removeClass(indicators[i],active);
}
if (indicators[pageIndex]) addClass(indicators[pageIndex], active);
};
// public methods
this.cycle = function() {
timer = setInterval(function() {
isElementInScrollRange() && (index++, self.slideTo( index ) );
}, this[interval]);
};
this.slideTo = function( next ) {
if (isSliding) return; // when controled via methods, make sure to check again
var activeItem = this.getActiveIndex(), // the current active
orientation;
// determine slideDirection first
if ( (activeItem < next ) || (activeItem === 0 && next === total -1 ) ) {
slideDirection = self[direction] = left; // next
} else if ( (activeItem > next) || (activeItem === total - 1 && next === 0 ) ) {
slideDirection = self[direction] = right; // prev
}
// find the right next index
if ( next < 0 ) { next = total - 1; }
else if ( next === total ){ next = 0; }
// update index
index = next;
orientation = slideDirection === left ? 'next' : 'prev'; //determine type
bootstrapCustomEvent.call(element, slideEvent, component, slides[next]); // here we go with the slide
isSliding = true;
clearInterval(timer);
setActivePage( next );
if ( supportTransitions && hasClass(element,'slide') ) {
addClass(slides[next],carouselItem +'-'+ orientation);
slides[next][offsetWidth];
addClass(slides[next],carouselItem +'-'+ slideDirection);
addClass(slides[activeItem],carouselItem +'-'+ slideDirection);
one(slides[activeItem], transitionEndEvent, function(e) {
var timeout = e[target] !== slides[activeItem] ? e.elapsedTime*1000 : 0;
setTimeout(function(){
isSliding = false;
addClass(slides[next],active);
removeClass(slides[activeItem],active);
removeClass(slides[next],carouselItem +'-'+ orientation);
removeClass(slides[next],carouselItem +'-'+ slideDirection);
removeClass(slides[activeItem],carouselItem +'-'+ slideDirection);
bootstrapCustomEvent.call(element, slidEvent, component, slides[next]);
if ( !DOC.hidden && self[interval] && !hasClass(element,paused) ) {
self.cycle();
}
},timeout+100);
});
} else {
addClass(slides[next],active);
slides[next][offsetWidth];
removeClass(slides[activeItem],active);
setTimeout(function() {
isSliding = false;
if ( self[interval] && !hasClass(element,paused) ) {
self.cycle();
}
bootstrapCustomEvent.call(element, slidEvent, component, slides[next]);
}, 100 );
}
};
this.getActiveIndex = function () {
return slides[indexOf](getElementsByClassName(element,carouselItem+' active')[0]) || 0;
};
// init
if ( !(stringCarousel in element ) ) { // prevent adding event handlers twice
if ( self[pause] && self[interval] ) {
on( element, mouseHover[0], pauseHandler );
on( element, mouseHover[1], resumeHandler );
on( element, 'touchstart', pauseHandler );
on( element, 'touchend', resumeHandler );
}
rightArrow && on( rightArrow, clickEvent, controlsHandler );
leftArrow && on( leftArrow, clickEvent, controlsHandler );
indicator && on( indicator, clickEvent, indicatorHandler );
self[keyboard] === true && on( globalObject, keydownEvent, keyHandler );
}
if (self.getActiveIndex()<0) {
slides[length] && addClass(slides[0],active);
indicators[length] && setActivePage(0);
}
if ( self[interval] ){ self.cycle(); }
element[stringCarousel] = self;
};
// CAROUSEL DATA API
// =================
supports[push]( [ stringCarousel, Carousel, '['+dataRide+'="carousel"]' ] );
/* Native Javascript for Bootstrap 4 | Collapse
-----------------------------------------------*/
// COLLAPSE DEFINITION
// ===================
var Collapse = function( element, options ) {
// initialization element
element = queryElement(element);
// set options
options = options || {};
// event targets and constants
var accordion = null, collapse = null, self = this,
isAnimating = false, // when true it will prevent click handlers
accordionData = element[getAttribute]('data-parent'),
// component strings
component = 'collapse',
collapsed = 'collapsed',
// private methods
openAction = function(collapseElement,toggle) {
bootstrapCustomEvent.call(collapseElement, showEvent, component);
isAnimating = true;
addClass(collapseElement,collapsing);
removeClass(collapseElement,component);
collapseElement[style][height] = collapseElement[scrollHeight] + 'px';
emulateTransitionEnd(collapseElement, function() {
isAnimating = false;
collapseElement[setAttribute](ariaExpanded,'true');
toggle[setAttribute](ariaExpanded,'true');
removeClass(collapseElement,collapsing);
addClass(collapseElement, component);
addClass(collapseElement,showClass);
collapseElement[style][height] = '';
bootstrapCustomEvent.call(collapseElement, shownEvent, component);
});
},
closeAction = function(collapseElement,toggle) {
bootstrapCustomEvent.call(collapseElement, hideEvent, component);
isAnimating = true;
collapseElement[style][height] = collapseElement[scrollHeight] + 'px'; // set height first
removeClass(collapseElement,component);
removeClass(collapseElement,showClass);
addClass(collapseElement,collapsing);
collapseElement[offsetWidth]; // force reflow to enable transition
collapseElement[style][height] = '0px';
emulateTransitionEnd(collapseElement, function() {
isAnimating = false;
collapseElement[setAttribute](ariaExpanded,'false');
toggle[setAttribute](ariaExpanded,'false');
removeClass(collapseElement,collapsing);
addClass(collapseElement,component);
collapseElement[style][height] = '';
bootstrapCustomEvent.call(collapseElement, hiddenEvent, component);
});
},
getTarget = function() {
var href = element.href && element[getAttribute]('href'),
parent = element[getAttribute](dataTarget),
id = href || ( parent && parent.charAt(0) === '#' ) && parent;
return id && queryElement(id);
};
// public methods
this.toggle = function(e) {
e[preventDefault]();
if (isAnimating) return;
if (!hasClass(collapse,showClass)) { self.show(); }
else { self.hide(); }
};
this.hide = function() {
closeAction(collapse,element);
addClass(element,collapsed);
};
this.show = function() {
if ( accordion ) {
var activeCollapse = queryElement('.'+component+'.'+showClass,accordion),
toggle = activeCollapse && (queryElement('['+dataToggle+'="'+component+'"]['+dataTarget+'="#'+activeCollapse.id+'"]',accordion)
|| queryElement('['+dataToggle+'="'+component+'"][href="#'+activeCollapse.id+'"]',accordion) ),
correspondingCollapse = toggle && (toggle[getAttribute](dataTarget) || toggle.href);
if ( activeCollapse && toggle && activeCollapse !== collapse ) {
closeAction(activeCollapse,toggle);
if ( correspondingCollapse.split('#')[1] !== collapse.id ) { addClass(toggle,collapsed); }
else { removeClass(toggle,collapsed); }
}
}
openAction(collapse,element);
removeClass(element,collapsed);
};
// init
if ( !(stringCollapse in element ) ) { // prevent adding event handlers twice
on(element, clickEvent, self.toggle);
}
collapse = getTarget();
accordion = queryElement(options.parent) || accordionData && getClosest(element, accordionData);
element[stringCollapse] = self;
};
// COLLAPSE DATA API
// =================
supports[push]( [ stringCollapse, Collapse, '['+dataToggle+'="collapse"]' ] );
/* Native Javascript for Bootstrap 4 | Dropdown
----------------------------------------------*/
// DROPDOWN DEFINITION
// ===================
var Dropdown = function( element, option ) {
// initialization element
element = queryElement(element);
// set option
this.persist = option === true || element[getAttribute]('data-persist') === 'true' || false;
// constants, event targets, strings
var self = this, children = 'children',
parent = element[parentNode],
component = 'dropdown', open = 'open',
relatedTarget = null,
menu = queryElement('.dropdown-menu', parent),
menuItems = (function(){
var set = menu[children], newSet = [];
for ( var i=0; i<set[length]; i++ ){
set[i][children][length] && (set[i][children][0].tagName === 'A' && newSet[push](set[i][children][0]));
set[i].tagName === 'A' && newSet[push](set[i]);
}
return newSet;
})(),
// preventDefault on empty anchor links
preventEmptyAnchor = function(anchor){
(anchor.href && anchor.href.slice(-1) === '#' || anchor[parentNode] && anchor[parentNode].href
&& anchor[parentNode].href.slice(-1) === '#') && this[preventDefault]();
},
// toggle dismissible events
toggleDismiss = function(){
var type = element[open] ? on : off;
type(DOC, clickEvent, dismissHandler);
type(DOC, keydownEvent, preventScroll);
type(DOC, keyupEvent, keyHandler);
},
// handlers
dismissHandler = function(e) {
var eventTarget = e[target], hasData = eventTarget && (stringDropdown in eventTarget || stringDropdown in eventTarget[parentNode]);
if ( (eventTarget === menu || menu[contains](eventTarget)) && (self.persist || hasData) ) { return; }
else {
relatedTarget = eventTarget === element || element[contains](eventTarget) ? element : null;
hide();
}
preventEmptyAnchor.call(e,eventTarget);
},
clickHandler = function(e) {
relatedTarget = element;
show();
preventEmptyAnchor.call(e,e[target]);
},
preventScroll = function(e){
var key = e.which || e.keyCode;
if( key === 38 || key === 40 ) { e[preventDefault](); }
},
keyHandler = function(e){
var key = e.which || e.keyCode,
activeItem = DOC.activeElement,
idx = menuItems[indexOf](activeItem),
isSameElement = activeItem === element,
isInsideMenu = menu[contains](activeItem),
isMenuItem = activeItem[parentNode] === menu || activeItem[parentNode][parentNode] === menu;
if ( isMenuItem || isSameElement ) { // navigate up | down
idx = isSameElement ? 0
: key === 38 ? (idx>1?idx-1:0)
: key === 40 ? (idx<menuItems[length]-1?idx+1:idx) : idx;
menuItems[idx] && setFocus(menuItems[idx]);
}
if ( (menuItems[length] && isMenuItem // menu has items
|| !menuItems[length] && (isInsideMenu || isSameElement) // menu might be a form
|| !isInsideMenu ) // or the focused element is not in the menu at all
&& element[open] && key === 27 // menu must be open
) {
self.toggle();
relatedTarget = null;
}
},
// private methods
show = function() {
bootstrapCustomEvent.call(parent, showEvent, component, relatedTarget);
addClass(menu,showClass);
addClass(parent,showClass);
menu[setAttribute](ariaExpanded,true);
bootstrapCustomEvent.call(parent, shownEvent, component, relatedTarget);
element[open] = true;
off(element, clickEvent, clickHandler);
setTimeout(function(){
setFocus( menu[getElementsByTagName]('INPUT')[0] || element ); // focus the first input item | element
toggleDismiss();
},1);
},
hide = function() {
bootstrapCustomEvent.call(parent, hideEvent, component, relatedTarget);
removeClass(menu,showClass);
removeClass(parent,showClass);
menu[setAttribute](ariaExpanded,false);
bootstrapCustomEvent.call(parent, hiddenEvent, component, relatedTarget);
element[open] = false;
toggleDismiss();
setFocus(element);
setTimeout(function(){ on(element, clickEvent, clickHandler); },1);
};
// set initial state to closed
element[open] = false;
// public methods
this.toggle = function() {
if (hasClass(parent,showClass) && element[open]) { hide(); }
else { show(); }
};
// init
if ( !(stringDropdown in element) ) { // prevent adding event handlers twice
!tabindex in menu && menu[setAttribute](tabindex, '0'); // Fix onblur on Chrome | Safari
on(element, clickEvent, clickHandler);
}
element[stringDropdown] = self;
};
// DROPDOWN DATA API
// =================
supports[push]( [stringDropdown, Dropdown, '['+dataToggle+'="dropdown"]'] );
/* Native Javascript for Bootstrap 4 | Modal
-------------------------------------------*/
// MODAL DEFINITION
// ===============
var Modal = function(element, options) { // element can be the modal/triggering button
// the modal (both JavaScript / DATA API init) / triggering button element (DATA API)
element = queryElement(element);
// determine modal, triggering element
var btnCheck = element[getAttribute](dataTarget)||element[getAttribute]('href'),
checkModal = queryElement( btnCheck ),
modal = hasClass(element,'modal') ? element : checkModal,
// strings
component = 'modal',
staticString = 'static',
paddingLeft = 'paddingLeft',
paddingRight = 'paddingRight',
modalBackdropString = 'modal-backdrop';
if ( hasClass(element,'modal') ) { element = null; } // modal is now independent of it's triggering element
if ( !modal ) { return; } // invalidate
// set options
options = options || {};
this[keyboard] = options[keyboard] === false || modal[getAttribute](dataKeyboard) === 'false' ? false : true;
this[backdrop] = options[backdrop] === staticString || modal[getAttribute](databackdrop) === staticString ? staticString : true;
this[backdrop] = options[backdrop] === false || modal[getAttribute](databackdrop) === 'false' ? false : this[backdrop];
this[content] = options[content]; // JavaScript only
// bind, constants, event targets and other vars
var self = this, relatedTarget = null,
bodyIsOverflowing, modalIsOverflowing, scrollbarWidth, overlay,
// also find fixed-top / fixed-bottom items
fixedItems = getElementsByClassName(HTML,fixedTop).concat(getElementsByClassName(HTML,fixedBottom)),
// private methods
getWindowWidth = function() {
var htmlRect = HTML[getBoundingClientRect]();
return globalObject[innerWidth] || (htmlRect[right] - Math.abs(htmlRect[left]));
},
setScrollbar = function () {
var bodyStyle = globalObject.getComputedStyle(DOC[body]),
bodyPad = parseInt((bodyStyle[paddingRight]), 10), itemPad;
if (bodyIsOverflowing) {
DOC[body][style][paddingRight] = (bodyPad + scrollbarWidth) + 'px';
if (fixedItems[length]){
for (var i = 0; i < fixedItems[length]; i++) {
itemPad = globalObject.getComputedStyle(fixedItems[i])[paddingRight];
fixedItems[i][style][paddingRight] = ( parseInt(itemPad) + scrollbarWidth) + 'px';
}
}
}
},
resetScrollbar = function () {
DOC[body][style][paddingRight] = '';
if (fixedItems[length]){
for (var i = 0; i < fixedItems[length]; i++) {
fixedItems[i][style][paddingRight] = '';
}
}
},
measureScrollbar = function () { // thx walsh
var scrollDiv = DOC[createElement]('div'), scrollBarWidth;
scrollDiv.className = component+'-scrollbar-measure'; // this is here to stay
DOC[body][appendChild](scrollDiv);
scrollBarWidth = scrollDiv[offsetWidth] - scrollDiv[clientWidth];
DOC[body].removeChild(scrollDiv);
return scrollBarWidth;
},
checkScrollbar = function () {
bodyIsOverflowing = DOC[body][clientWidth] < getWindowWidth();
modalIsOverflowing = modal[scrollHeight] > HTML[clientHeight];
scrollbarWidth = measureScrollbar();
},
adjustDialog = function () {
modal[style][paddingLeft] = !bodyIsOverflowing && modalIsOverflowing ? scrollbarWidth + 'px' : '';
modal[style][paddingRight] = bodyIsOverflowing && !modalIsOverflowing ? scrollbarWidth + 'px' : '';
},
resetAdjustments = function () {
modal[style][paddingLeft] = '';
modal[style][paddingRight] = '';
},
createOverlay = function() {
modalOverlay = 1;
var newOverlay = DOC[createElement]('div');
overlay = queryElement('.'+modalBackdropString);
if ( overlay === null ) {
newOverlay[setAttribute]('class',modalBackdropString+' fade');
overlay = newOverlay;
DOC[body][appendChild](overlay);
}
},
removeOverlay = function() {
overlay = queryElement('.'+modalBackdropString);
if ( overlay && overlay !== null && typeof overlay === 'object' ) {
modalOverlay = 0;
DOC[body].removeChild(overlay); overlay = null;
}
bootstrapCustomEvent.call(modal, hiddenEvent, component);
},
keydownHandlerToggle = function() {
if (hasClass(modal,showClass)) {
on(DOC, keydownEvent, keyHandler);
} else {
off(DOC, keydownEvent, keyHandler);
}
},
resizeHandlerToggle = function() {
if (hasClass(modal,showClass)) {
on(globalObject, resizeEvent, self.update);
} else {
off(globalObject, resizeEvent, self.update);
}
},
dismissHandlerToggle = function() {
if (hasClass(modal,showClass)) {
on(modal, clickEvent, dismissHandler);
} else {
off(modal, clickEvent, dismissHandler);
}
},
// triggers
triggerShow = function() {
setFocus(modal);
bootstrapCustomEvent.call(modal, shownEvent, component, relatedTarget);
},
triggerHide = function() {
modal[style].display = '';
element && (setFocus(element));
(function(){
if (!getElementsByClassName(DOC,component+' '+showClass)[0]) {
resetAdjustments();
resetScrollbar();
removeClass(DOC[body],component+'-open');
overlay && hasClass(overlay,'fade') ? (removeClass(overlay,showClass), emulateTransitionEnd(overlay,removeOverlay))
: removeOverlay();
resizeHandlerToggle();
dismissHandlerToggle();
keydownHandlerToggle();
}
}());
},
// handlers
clickHandler = function(e) {
var clickTarget = e[target];
clickTarget = clickTarget[hasAttribute](dataTarget) || clickTarget[hasAttribute]('href') ? clickTarget : clickTarget[parentNode];
if ( clickTarget === element && !hasClass(modal,showClass) ) {
modal.modalTrigger = element;
relatedTarget = element;
self.show();
e[preventDefault]();
}
},
keyHandler = function(e) {
if (self[keyboard] && e.which == 27 && hasClass(modal,showClass)) {
self.hide();
}
},
dismissHandler = function(e) {
var clickTarget = e[target];
if ( hasClass(modal,showClass) && (clickTarget[parentNode][getAttribute](dataDismiss) === component
|| clickTarget[getAttribute](dataDismiss) === component
|| (clickTarget === modal && self[backdrop] !== staticString) ) ) {
self.hide(); relatedTarget = null;
e[preventDefault]();
}
};
// public methods
this.toggle = function() {
if ( hasClass(modal,showClass) ) {this.hide();} else {this.show();}
};
this.show = function() {
bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget);
// we elegantly hide any opened modal
var currentOpen = getElementsByClassName(DOC,component+' '+showClass)[0];
currentOpen && currentOpen !== modal && currentOpen.modalTrigger[stringModal].hide();
if ( this[backdrop] ) {
!modalOverlay && createOverlay();
}
if ( overlay && modalOverlay && !hasClass(overlay,showClass)) {
overlay[offsetWidth]; // force reflow to enable trasition
addClass(overlay, showClass);
}
setTimeout( function() {
modal[style].display = 'block';
checkScrollbar();
setScrollbar();
adjustDialog();
addClass(DOC[body],component+'-open');
addClass(modal,showClass);
modal[setAttribute](ariaHidden, false);
resizeHandlerToggle();
dismissHandlerToggle();
keydownHandlerToggle();
hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow();
}, supportTransitions ? 150 : 0);
};
this.hide = function() {
bootstrapCustomEvent.call(modal, hideEvent, component);
overlay = queryElement('.'+modalBackdropString);
removeClass(modal,showClass);
modal[setAttribute](ariaHidden, true);
(function(){
hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide();
}());
};
this.setContent = function( content ) {
queryElement('.'+component+'-content',modal)[innerHTML] = content;
};
this.update = function() {
if (hasClass(modal,showClass)) {
checkScrollbar();
setScrollbar();
adjustDialog();
}
};
// init
// prevent adding event handlers over and over
// modal is independent of a triggering element
if ( !!element && !(stringModal in element) ) {
on(element, clickEvent, clickHandler);
}
if ( !!self[content] ) { self.setContent( self[content] ); }
!!element && (element[stringModal] = self);
};
// DATA API
supports[push]( [ stringModal, Modal, '['+dataToggle+'="modal"]' ] );
/* Native Javascript for Bootstrap 4 | Popover
----------------------------------------------*/
// POPOVER DEFINITION
// ==================
var Popover = function( element, options ) {
// initialization element
element = queryElement(element);
// set options
options = options || {};
// DATA API
var triggerData = element[getAttribute](dataTrigger), // click / hover / focus
animationData = element[getAttribute](dataAnimation), // true / false
placementData = element[getAttribute](dataPlacement),
dismissibleData = element[getAttribute](dataDismissible),
delayData = element[getAttribute](dataDelay),
containerData = element[getAttribute](dataContainer),
// internal strings
component = 'popover',
template = 'template',
trigger = 'trigger',
classString = 'class',
div = 'div',
fade = 'fade',
content = 'content',
dataContent = 'data-content',
dismissible = 'dismissible',
closeBtn = '<button type="button" class="close">×</button>',
// check container
containerElement = queryElement(options[container]),
containerDataElement = queryElement(containerData),
// maybe the element is inside a modal
modal = getClosest(element,'.modal'),
// maybe the element is inside a fixed navbar
navbarFixedTop = getClosest(element,'.'+fixedTop),
navbarFixedBottom = getClosest(element,'.'+fixedBottom);
// set instance options
this[template] = options[template] ? options[template] : null; // JavaScript only
this[trigger] = options[trigger] ? options[trigger] : triggerData || hoverEvent;
this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
this[placement] = options[placement] ? options[placement] : placementData || top;
this[delay] = parseInt(options[delay] || delayData) || 200;
this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false;
this[container] = containerElement ? containerElement
: containerDataElement ? containerDataElement
: navbarFixedTop ? navbarFixedTop
: navbarFixedBottom ? navbarFixedBottom
: modal ? modal : DOC[body];
// bind, content
var self = this,
titleString = element[getAttribute](dataTitle) || null,
contentString = element[getAttribute](dataContent) || null;
if ( !contentString && !this[template] ) return; // invalidate
// constants, vars
var popover = null, timer = 0, placementSetting = this[placement],
// handlers
dismissibleHandler = function(e) {
if (popover !== null && e[target] === queryElement('.close',popover)) {
self.hide();
}
},
// private methods
removePopover = function() {
self[container].removeChild(popover);
timer = null; popover = null;
},
createPopover = function() {
titleString = element[getAttribute](dataTitle); // check content again
contentString = element[getAttribute](dataContent);
popover = DOC[createElement](div);
// popover arrow
var popoverArrow = DOC[createElement](div);
popoverArrow[setAttribute](classString,'arrow');
popover[appendChild](popoverArrow);
if ( contentString !== null && self[template] === null ) { //create the popover from data attributes
popover[setAttribute]('role','tooltip');
if (titleString !== null) {
var popoverTitle = DOC[createElement]('h3');
popoverTitle[setAttribute](classString,component+'-header');
popoverTitle[innerHTML] = self[dismissible] ? titleString + closeBtn : titleString;
popover[appendChild](popoverTitle);
}
//set popover content
var popoverContent = DOC[createElement](div);
popoverContent[setAttribute](classString,component+'-body');
popoverContent[innerHTML] = self[dismissible] && titleString === null ? contentString + closeBtn : contentString;
popover[appendChild](popoverContent);
} else { // or create the popover from template
var popoverTemplate = DOC[createElement](div);
popoverTemplate[innerHTML] = self[template];
popover[innerHTML] = popoverTemplate.firstChild[innerHTML];
}
//append to the container
self[container][appendChild](popover);
popover[style].display = 'block';
popover[setAttribute](classString, component+ ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
},
showPopover = function () {
!hasClass(popover,showClass) && ( addClass(popover,showClass) );
},
updatePopover = function() {
styleTip(element,popover,placementSetting,self[container]);
},
// event toggle
dismissHandlerToggle = function(type){
if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
!self[dismissible] && type( element, 'blur', self.hide );
}
self[dismissible] && type( DOC, clickEvent, dismissibleHandler );
type( globalObject, resizeEvent, self.hide );
},
// triggers
showTrigger = function() {
dismissHandlerToggle(on);
bootstrapCustomEvent.call(element, shownEvent, component);
},
hideTrigger = function() {
dismissHandlerToggle(off);
removePopover();
bootstrapCustomEvent.call(element, hiddenEvent, component);
};
// public methods / handlers
this.toggle = function() {
if (popover === null) { self.show(); }
else { self.hide(); }
};
this.show = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (popover === null) {
placementSetting = self[placement]; // we reset placement in all cases
createPopover();
updatePopover();
showPopover();
bootstrapCustomEvent.call(element, showEvent, component);
!!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger();
}
}, 20 );
};
this.hide = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (popover && popover !== null && hasClass(popover,showClass)) {
bootstrapCustomEvent.call(element, hideEvent, component);
removeClass(popover,showClass);
!!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger();
}
}, self[delay] );
};
// init
if ( !(stringPopover in element) ) { // prevent adding event handlers twice
if (self[trigger] === hoverEvent) {
on( element, mouseHover[0], self.show );
if (!self[dismissible]) { on( element, mouseHover[1], self.hide ); }
} else if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
on( element, self[trigger], self.toggle );
}
}
element[stringPopover] = self;
};
// POPOVER DATA API
// ================
supports[push]( [ stringPopover, Popover, '['+dataToggle+'="popover"]' ] );
/* Native Javascript for Bootstrap 4 | ScrollSpy
-----------------------------------------------*/
// SCROLLSPY DEFINITION
// ====================
var ScrollSpy = function(element, options) {
// initialization element, the element we spy on
element = queryElement(element);
// DATA API
var targetData = queryElement(element[getAttribute](dataTarget)),
offsetData = element[getAttribute]('data-offset');
// set options
options = options || {};
if ( !options[target] && !targetData ) { return; } // invalidate
// event targets, constants
var self = this, spyTarget = options[target] && queryElement(options[target]) || targetData,
links = spyTarget && spyTarget[getElementsByTagName]('A'),
offset = parseInt(offsetData || options['offset']) || 10,
items = [], targetItems = [], scrollOffset,
scrollTarget = element[offsetHeight] < element[scrollHeight] ? element : globalObject, // determine which is the real scrollTarget
isWindow = scrollTarget === globalObject;
// populate items and targets
for (var i=0, il=links[length]; i<il; i++) {
var href = links[i][getAttribute]('href'),
targetItem = href && href.charAt(0) === '#' && href.slice(-1) !== '#' && queryElement(href);
if ( !!targetItem ) {
items[push](links[i]);
targetItems[push](targetItem);
}
}
// private methods
var updateItem = function(index) {
var item = items[index],
targetItem = targetItems[index], // the menu item targets this element
dropdown = item[parentNode][parentNode],
dropdownLink = hasClass(dropdown,'dropdown') && dropdown[getElementsByTagName]('A')[0],
targetRect = isWindow && targetItem[getBoundingClientRect](),
isActive = hasClass(item,active) || false,
topEdge = (isWindow ? targetRect[top] + scrollOffset : targetItem[offsetTop]) - offset,
bottomEdge = isWindow ? targetRect[bottom] + scrollOffset - offset : targetItems[index+1] ? targetItems[index+1][offsetTop] - offset : element[scrollHeight],
inside = scrollOffset >= topEdge && bottomEdge > scrollOffset;
if ( !isActive && inside ) {
if ( !hasClass(item,active) ) {
addClass(item,active);
if (dropdownLink && !hasClass(dropdownLink,active) ) {
addClass(dropdownLink,active);
}
bootstrapCustomEvent.call(element, 'activate', 'scrollspy', items[index]);
}
} else if ( !inside ) {
if ( hasClass(item,active) ) {
removeClass(item,active);
if (dropdownLink && hasClass(dropdownLink,active) && !getElementsByClassName(item[parentNode],active).length ) {
removeClass(dropdownLink,active);
}
}
} else if ( !inside && !isActive || isActive && inside ) {
return;
}
},
updateItems = function(){
scrollOffset = isWindow ? getScroll().y : element[scrollTop];
for (var index=0, itl=items[length]; index<itl; index++) {
updateItem(index)
}
};
// public method
this.refresh = function () {
updateItems();
}
// init
if ( !(stringScrollSpy in element) ) { // prevent adding event handlers twice
on( scrollTarget, scrollEvent, self.refresh );
on( globalObject, resizeEvent, self.refresh );
}
self.refresh();
element[stringScrollSpy] = self;
};
// SCROLLSPY DATA API
// ==================
supports[push]( [ stringScrollSpy, ScrollSpy, '['+dataSpy+'="scroll"]' ] );
/* Native Javascript for Bootstrap 4 | Tab
-----------------------------------------*/
// TAB DEFINITION
// ==============
var Tab = function( element, options ) {
// initialization element
element = queryElement(element);
// DATA API
var heightData = element[getAttribute](dataHeight),
// strings
component = 'tab', height = 'height', float = 'float', isAnimating = 'isAnimating';
// set options
options = options || {};
this[height] = supportTransitions ? (options[height] || heightData === 'true') : false;
// bind, event targets
var self = this, next,
tabs = getClosest(element,'.nav'),
tabsContentContainer = false,
dropdown = tabs && queryElement('.dropdown-toggle',tabs),
activeTab, activeContent, nextContent, containerHeight, equalContents, nextHeight,
// trigger
triggerEnd = function(){
tabsContentContainer[style][height] = '';
removeClass(tabsContentContainer,collapsing);
tabs[isAnimating] = false;
},
triggerShow = function() {
if (tabsContentContainer) { // height animation
if ( equalContents ) {
triggerEnd();
} else {
setTimeout(function(){ // enables height animation
tabsContentContainer[style][height] = nextHeight + 'px'; // height animation
tabsContentContainer[offsetWidth];
emulateTransitionEnd(tabsContentContainer, triggerEnd);
},1);
}
} else {
tabs[isAnimating] = false;
}
bootstrapCustomEvent.call(next, shownEvent, component, activeTab);
},
triggerHide = function() {
if (tabsContentContainer) {
activeContent[style][float] = left;
nextContent[style][float] = left;
containerHeight = activeContent[scrollHeight];
}
addClass(nextContent,active);
bootstrapCustomEvent.call(next, showEvent, component, activeTab);
removeClass(activeContent,active);
bootstrapCustomEvent.call(activeTab, hiddenEvent, component, next);
if (tabsContentContainer) {
nextHeight = nextContent[scrollHeight];
equalContents = nextHeight === containerHeight;
addClass(tabsContentContainer,collapsing);
tabsContentContainer[style][height] = containerHeight + 'px'; // height animation
tabsContentContainer[offsetHeight];
activeContent[style][float] = '';
nextContent[style][float] = '';
}
if ( hasClass(nextContent, 'fade') ) {
setTimeout(function(){
addClass(nextContent,showClass);
emulateTransitionEnd(nextContent,triggerShow);
},20);
} else { triggerShow(); }
};
if (!tabs) return; // invalidate
// set default animation state
tabs[isAnimating] = false;
// private methods
var getActiveTab = function() {
var activeTabs = getElementsByClassName(tabs,active), activeTab;
if ( activeTabs[length] === 1 && !hasClass(activeTabs[0][parentNode],'dropdown') ) {
activeTab = activeTabs[0];
} else if ( activeTabs[length] > 1 ) {
activeTab = activeTabs[activeTabs[length]-1];
}
return activeTab;
},
getActiveContent = function() {
return queryElement(getActiveTab()[getAttribute]('href'));
},
// handler
clickHandler = function(e) {
var href = e[target][getAttribute]('href');
e[preventDefault]();
next = e[target][getAttribute](dataToggle) === component || (href && href.charAt(0) === '#')
? e[target] : e[target][parentNode]; // allow for child elements like icons to use the handler
!tabs[isAnimating] && !hasClass(next,active) && self.show();
};
// public method
this.show = function() { // the tab we clicked is now the next tab
next = next || element;
nextContent = queryElement(next[getAttribute]('href')); //this is the actual object, the next tab content to activate
activeTab = getActiveTab();
activeContent = getActiveContent();
tabs[isAnimating] = true;
removeClass(activeTab,active);
addClass(next,active);
if ( dropdown ) {
if ( !hasClass(element[parentNode],'dropdown-menu') ) {
if (hasClass(dropdown,active)) removeClass(dropdown,active);
} else {
if (!hasClass(dropdown,active)) addClass(dropdown,active);
}
}
bootstrapCustomEvent.call(activeTab, hideEvent, component, next);
if (hasClass(activeContent, 'fade')) {
removeClass(activeContent,showClass);
emulateTransitionEnd(activeContent, triggerHide);
} else { triggerHide(); }
};
// init
if ( !(stringTab in element) ) { // prevent adding event handlers twice
on(element, clickEvent, clickHandler);
}
if (self[height]) { tabsContentContainer = getActiveContent()[parentNode]; }
element[stringTab] = self;
};
// TAB DATA API
// ============
supports[push]( [ stringTab, Tab, '['+dataToggle+'="tab"]' ] );
/* Native Javascript for Bootstrap 4 | Tooltip
---------------------------------------------*/
// TOOLTIP DEFINITION
// ==================
var Tooltip = function( element,options ) {
// initialization element
element = queryElement(element);
// set options
options = options || {};
// DATA API
var animationData = element[getAttribute](dataAnimation),
placementData = element[getAttribute](dataPlacement),
delayData = element[getAttribute](dataDelay),
containerData = element[getAttribute](dataContainer),
// strings
component = 'tooltip',
classString = 'class',
title = 'title',
fade = 'fade',
div = 'div',
// check container
containerElement = queryElement(options[container]),
containerDataElement = queryElement(containerData),
// maybe the element is inside a modal
modal = getClosest(element,'.modal'),
// maybe the element is inside a fixed navbar
navbarFixedTop = getClosest(element,'.'+fixedTop),
navbarFixedBottom = getClosest(element,'.'+fixedBottom);
// set instance options
this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
this[placement] = options[placement] ? options[placement] : placementData || top;
this[delay] = parseInt(options[delay] || delayData) || 200;
this[container] = containerElement ? containerElement
: containerDataElement ? containerDataElement
: navbarFixedTop ? navbarFixedTop
: navbarFixedBottom ? navbarFixedBottom
: modal ? modal : DOC[body];
// bind, event targets, title and constants
var self = this, timer = 0, placementSetting = this[placement], tooltip = null,
titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle);
if ( !titleString || titleString == "" ) return; // invalidate
// private methods
var removeToolTip = function() {
self[container].removeChild(tooltip);
tooltip = null; timer = null;
},
createToolTip = function() {
titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle); // read the title again
if ( !titleString || titleString == "" ) return false; // invalidate
tooltip = DOC[createElement](div);
tooltip[setAttribute]('role',component);
// tooltip arrow
var tooltipArrow = DOC[createElement](div);
tooltipArrow[setAttribute](classString,'arrow');
tooltip[appendChild](tooltipArrow);
var tooltipInner = DOC[createElement](div);
tooltipInner[setAttribute](classString,component+'-inner');
tooltip[appendChild](tooltipInner);
tooltipInner[innerHTML] = titleString;
self[container][appendChild](tooltip);
tooltip[setAttribute](classString, component + ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
},
updateTooltip = function () {
styleTip(element,tooltip,placementSetting,self[container]);
},
showTooltip = function () {
!hasClass(tooltip,showClass) && ( addClass(tooltip,showClass) );
},
// triggers
showTrigger = function() {
on( globalObject, resizeEvent, self.hide );
bootstrapCustomEvent.call(element, shownEvent, component);
},
hideTrigger = function() {
off( globalObject, resizeEvent, self.hide );
removeToolTip();
bootstrapCustomEvent.call(element, hiddenEvent, component);
};
// public methods
this.show = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (tooltip === null) {
placementSetting = self[placement]; // we reset placement in all cases
if(createToolTip() == false) return;
updateTooltip();
showTooltip();
bootstrapCustomEvent.call(element, showEvent, component);
!!self[animation] ? emulateTransitionEnd(tooltip, showTrigger) : showTrigger();
}
}, 20 );
};
this.hide = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (tooltip && hasClass(tooltip,showClass)) {
bootstrapCustomEvent.call(element, hideEvent, component);
removeClass(tooltip,showClass);
!!self[animation] ? emulateTransitionEnd(tooltip, hideTrigger) : hideTrigger();
}
}, self[delay]);
};
this.toggle = function() {
if (!tooltip) { self.show(); }
else { self.hide(); }
};
// init
if ( !(stringTooltip in element) ) { // prevent adding event handlers twice
element[setAttribute](dataOriginalTitle,titleString);
element.removeAttribute(title);
on(element, mouseHover[0], self.show);
on(element, mouseHover[1], self.hide);
}
element[stringTooltip] = self;
};
// TOOLTIP DATA API
// =================
supports[push]( [ stringTooltip, Tooltip, '['+dataToggle+'="tooltip"]' ] );
/* Native Javascript for Bootstrap 4 | Initialize Data API
--------------------------------------------------------*/
var initializeDataAPI = function( constructor, collection ){
for (var i=0, l=collection[length]; i<l; i++) {
new constructor(collection[i]);
}
},
initCallback = BSN.initCallback = function(lookUp){
lookUp = lookUp || DOC;
for (var i=0, l=supports[length]; i<l; i++) {
initializeDataAPI( supports[i][1], lookUp[querySelectorAll] (supports[i][2]) );
}
};
// bulk initialize all components
DOC[body] ? initCallback() : on( DOC, 'DOMContentLoaded', function(){ initCallback(); } );
return {
Alert: Alert,
Button: Button,
Carousel: Carousel,
Collapse: Collapse,
Dropdown: Dropdown,
Modal: Modal,
Popover: Popover,
ScrollSpy: ScrollSpy,
Tab: Tab,
Tooltip: Tooltip
};
}));
// Native Javascript for Bootstrap 4 v2.0.23 | © dnp_theme | MIT-License
!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var n=e();t.Alert=n.Alert,t.Button=n.Button,t.Carousel=n.Carousel,t.Collapse=n.Collapse,t.Dropdown=n.Dropdown,t.Modal=n.Modal,t.Popover=n.Popover,t.ScrollSpy=n.ScrollSpy,t.Tab=n.Tab,t.Tooltip=n.Tooltip}}(this,function(){"use strict";var t="undefined"!=typeof global?global:this||window,e=document,n=e.documentElement,i="body",o=t.BSN={},a=o.supports=[],l="data-toggle",r="data-dismiss",c="data-spy",u="data-ride",s="Alert",f="Button",h="Carousel",d="Collapse",v="Dropdown",p="Modal",m="Popover",g="ScrollSpy",w="Tab",b="Tooltip",y="data-backdrop",T="data-keyboard",x="data-target",C="data-interval",A="data-height",k="data-pause",I="data-title",L="data-original-title",N="data-dismissible",E="data-trigger",S="data-animation",B="data-container",M="data-placement",D="data-delay",P="backdrop",H="keyboard",O="delay",W="content",j="target",q="interval",R="pause",U="animation",z="placement",X="container",Y="offsetTop",F="offsetLeft",G="scrollTop",J="scrollLeft",K="clientWidth",Q="clientHeight",V="offsetWidth",Z="offsetHeight",$="innerWidth",_="innerHeight",tt="scrollHeight",et="height",nt="aria-expanded",it="aria-hidden",ot="click",at="hover",lt="keydown",rt="keyup",ct="resize",ut="scroll",st="show",ft="shown",ht="hide",dt="hidden",vt="close",pt="closed",mt="slid",gt="slide",wt="change",bt="getAttribute",yt="setAttribute",Tt="hasAttribute",xt="createElement",Ct="appendChild",At="innerHTML",kt="getElementsByTagName",It="preventDefault",Lt="getBoundingClientRect",Nt="querySelectorAll",Et="getElementsByClassName",St="indexOf",Bt="parentNode",Mt="length",Dt="toLowerCase",Pt="Transition",Ht="Webkit",Ot="style",Wt="push",jt="tabindex",qt="contains",Rt="active",Ut="show",zt="collapsing",Xt="left",Yt="right",Ft="top",Gt="bottom",Jt="onmouseleave"in e?["mouseenter","mouseleave"]:["mouseover","mouseout"],Kt=/\b(top|bottom|left|right)+/,Qt=0,Vt="fixed-top",Zt="fixed-bottom",$t=Ht+Pt in n[Ot]||Pt[Dt]()in n[Ot],_t=Ht+Pt in n[Ot]?Ht[Dt]()+Pt+"End":Pt[Dt]()+"end",te=function(t){t.focus?t.focus():t.setActive()},ee=function(t,e){t.classList.add(e)},ne=function(t,e){t.classList.remove(e)},ie=function(t,e){return t.classList[qt](e)},oe=function(t,e){return[].slice.call(t[Et](e))},ae=function(t,n){var i=n?n:e;return"object"==typeof t?t:i.querySelector(t)},le=function(t,n){var i=n.charAt(0),o=n.substr(1);if("."===i){for(;t&&t!==e;t=t[Bt])if(null!==ae(n,t[Bt])&&ie(t,o))return t}else if("#"===i)for(;t&&t!==e;t=t[Bt])if(t.id===o)return t;return!1},re=function(t,e,n){t.addEventListener(e,n,!1)},ce=function(t,e,n){t.removeEventListener(e,n,!1)},ue=function(t,e,n){re(t,e,function i(o){n(o),ce(t,e,i)})},se=function(t,e){$t?ue(t,_t,function(t){e(t)}):e()},fe=function(t,e,n){var i=new CustomEvent(t+".bs."+e);i.relatedTarget=n,this.dispatchEvent(i)},he=function(){return{y:t.pageYOffset||n[G],x:t.pageXOffset||n[J]}},de=function(t,o,a,l){var r,c,u,s,f,h,d={w:o[V],h:o[Z]},v=n[K]||e[i][K],p=n[Q]||e[i][Q],m=t[Lt](),g=l===e[i]?he():{x:l[F]+l[J],y:l[Y]+l[G]},w={w:m[Yt]-m[Xt],h:m[Gt]-m[Ft]},b=ie(o,"popover"),y=ae(".arrow",o),T=m[Ft]+w.h/2-d.h/2<0,x=m[Xt]+w.w/2-d.w/2<0,C=m[Xt]+d.w/2+w.w/2>=v,A=m[Ft]+d.h/2+w.h/2>=p,k=m[Ft]-d.h<0,I=m[Xt]-d.w<0,L=m[Ft]+d.h+w.h>=p,N=m[Xt]+d.w+w.w>=v;a=(a===Xt||a===Yt)&&I&&N?Ft:a,a=a===Ft&&k?Gt:a,a=a===Gt&&L?Ft:a,a=a===Xt&&I?Yt:a,a=a===Yt&&N?Xt:a,o.className[St](a)===-1&&(o.className=o.className.replace(Kt,a)),f=y[V],h=y[Z],a===Xt||a===Yt?(c=a===Xt?m[Xt]+g.x-d.w-(b?f:0):m[Xt]+g.x+w.w,T?(r=m[Ft]+g.y,u=w.h/2-f):A?(r=m[Ft]+g.y-d.h+w.h,u=d.h-w.h/2-f):(r=m[Ft]+g.y-d.h/2+w.h/2,u=d.h/2-(b?.9*h:h/2))):a!==Ft&&a!==Gt||(r=a===Ft?m[Ft]+g.y-d.h-(b?h:0):m[Ft]+g.y+w.h,x?(c=0,s=m[Xt]+w.w/2-f):C?(c=v-1.01*d.w,s=d.w-(v-m[Xt])+w.w/2-f/2):(c=m[Xt]+g.x-d.w/2+w.w/2,s=d.w/2-f/2)),o[Ot][Ft]=r+"px",o[Ot][Xt]=c+"px",u&&(y[Ot][Ft]=u+"px"),s&&(y[Ot][Xt]=s+"px")};o.version="2.0.23";var ve=function(t){t=ae(t);var e=this,n="alert",i=le(t,"."+n),o=function(){ie(i,"fade")?se(i,l):l()},a=function(o){i=le(o[j],"."+n),t=ae("["+r+'="'+n+'"]',i),t&&i&&(t===o[j]||t[qt](o[j]))&&e.close()},l=function(){fe.call(i,pt,n),ce(t,ot,a),i[Bt].removeChild(i)};this.close=function(){i&&t&&ie(i,Ut)&&(fe.call(i,vt,n),ne(i,Ut),i&&o())},s in t||re(t,ot,a),t[s]=e};a[Wt]([s,ve,"["+r+'="alert"]']);var pe=function(t){t=ae(t);var n=!1,i="button",o="checked",a="LABEL",l="INPUT",r=function(t){var n=t.which||t.keyCode;32===n&&t[j]===e.activeElement&&u(t)},c=function(t){var e=t.which||t.keyCode;32===e&&t[It]()},u=function(e){var r=e[j].tagName===a?e[j]:e[j][Bt].tagName===a?e[j][Bt]:null;if(r){var c=e[j],u=oe(c[Bt],"btn"),s=r[kt](l)[0];if(s){if("checkbox"===s.type&&(s[o]?(ne(r,Rt),s[bt](o),s.removeAttribute(o),s[o]=!1):(ee(r,Rt),s[bt](o),s[yt](o,o),s[o]=!0),n||(n=!0,fe.call(s,wt,i),fe.call(t,wt,i))),"radio"===s.type&&!n&&!s[o]){ee(r,Rt),s[yt](o,o),s[o]=!0,fe.call(s,wt,i),fe.call(t,wt,i),n=!0;for(var f=0,h=u[Mt];f<h;f++){var d=u[f],v=d[kt](l)[0];d!==r&&ie(d,Rt)&&(ne(d,Rt),v.removeAttribute(o),v[o]=!1,fe.call(v,wt,i))}}setTimeout(function(){n=!1},50)}}};f in t||(re(t,ot,u),ae("["+jt+"]",t)&&re(t,rt,r),re(t,lt,c));for(var s=oe(t,"btn"),h=s[Mt],d=0;d<h;d++)!ie(s[d],Rt)&&ae("input:checked",s[d])&&ee(s[d],Rt);t[f]=this};a[Wt]([f,pe,"["+l+'="buttons"]']);var me=function(i,o){i=ae(i),o=o||{};var a=i[bt](C),l=o[q],r="false"===a?0:parseInt(a),c=i[bt](k)===at||!1,u="true"===i[bt](T)||!1,s="carousel",f="paused",d="direction",v="carousel-item",p="data-slide-to";this[H]=o[H]===!0||u,this[R]=!(o[R]!==at&&!c)&&at,this[q]="number"==typeof l?l:0===r||r===!1?0:5e3;var m=this,g=i.index=0,w=i.timer=0,b=!1,y=oe(i,v),x=y[Mt],A=this[d]=Xt,I=oe(i,s+"-control-prev")[0],L=oe(i,s+"-control-next")[0],N=ae("."+s+"-indicators",i),E=N&&N[kt]("LI")||[],S=function(){m[q]===!1||ie(i,f)||(ee(i,f),!b&&clearInterval(w))},B=function(){m[q]!==!1&&ie(i,f)&&(ne(i,f),!b&&clearInterval(w),!b&&m.cycle())},M=function(t){if(t[It](),!b){var e=t[j];if(!e||ie(e,Rt)||!e[bt](p))return!1;g=parseInt(e[bt](p),10),m.slideTo(g)}},D=function(t){if(t[It](),!b){var e=t.currentTarget||t.srcElement;e===L?g++:e===I&&g--,m.slideTo(g)}},P=function(t){if(!b){switch(t.which){case 39:g++;break;case 37:g--;break;default:return}m.slideTo(g)}},O=function(){var e=i[Lt](),o=t[_]||n[Q];return e[Ft]<=o&&e[Gt]>=0},W=function(t){for(var e=0,n=E[Mt];e<n;e++)ne(E[e],Rt);E[t]&&ee(E[t],Rt)};this.cycle=function(){w=setInterval(function(){O()&&(g++,m.slideTo(g))},this[q])},this.slideTo=function(t){if(!b){var n,o=this.getActiveIndex();o<t||0===o&&t===x-1?A=m[d]=Xt:(o>t||o===x-1&&0===t)&&(A=m[d]=Yt),t<0?t=x-1:t===x&&(t=0),g=t,n=A===Xt?"next":"prev",fe.call(i,gt,s,y[t]),b=!0,clearInterval(w),W(t),$t&&ie(i,"slide")?(ee(y[t],v+"-"+n),y[t][V],ee(y[t],v+"-"+A),ee(y[o],v+"-"+A),ue(y[o],_t,function(a){var l=a[j]!==y[o]?1e3*a.elapsedTime:0;setTimeout(function(){b=!1,ee(y[t],Rt),ne(y[o],Rt),ne(y[t],v+"-"+n),ne(y[t],v+"-"+A),ne(y[o],v+"-"+A),fe.call(i,mt,s,y[t]),e.hidden||!m[q]||ie(i,f)||m.cycle()},l+100)})):(ee(y[t],Rt),y[t][V],ne(y[o],Rt),setTimeout(function(){b=!1,m[q]&&!ie(i,f)&&m.cycle(),fe.call(i,mt,s,y[t])},100))}},this.getActiveIndex=function(){return y[St](oe(i,v+" active")[0])||0},h in i||(m[R]&&m[q]&&(re(i,Jt[0],S),re(i,Jt[1],B),re(i,"touchstart",S),re(i,"touchend",B)),L&&re(L,ot,D),I&&re(I,ot,D),N&&re(N,ot,M),m[H]===!0&&re(t,lt,P)),m.getActiveIndex()<0&&(y[Mt]&&ee(y[0],Rt),E[Mt]&&W(0)),m[q]&&m.cycle(),i[h]=m};a[Wt]([h,me,"["+u+'="carousel"]']);var ge=function(t,e){t=ae(t),e=e||{};var n=null,i=null,o=this,a=!1,r=t[bt]("data-parent"),c="collapse",u="collapsed",s=function(t,e){fe.call(t,st,c),a=!0,ee(t,zt),ne(t,c),t[Ot][et]=t[tt]+"px",se(t,function(){a=!1,t[yt](nt,"true"),e[yt](nt,"true"),ne(t,zt),ee(t,c),ee(t,Ut),t[Ot][et]="",fe.call(t,ft,c)})},f=function(t,e){fe.call(t,ht,c),a=!0,t[Ot][et]=t[tt]+"px",ne(t,c),ne(t,Ut),ee(t,zt),t[V],t[Ot][et]="0px",se(t,function(){a=!1,t[yt](nt,"false"),e[yt](nt,"false"),ne(t,zt),ee(t,c),t[Ot][et]="",fe.call(t,dt,c)})},h=function(){var e=t.href&&t[bt]("href"),n=t[bt](x),i=e||n&&"#"===n.charAt(0)&&n;return i&&ae(i)};this.toggle=function(t){t[It](),a||(ie(i,Ut)?o.hide():o.show())},this.hide=function(){f(i,t),ee(t,u)},this.show=function(){if(n){var e=ae("."+c+"."+Ut,n),o=e&&(ae("["+l+'="'+c+'"]['+x+'="#'+e.id+'"]',n)||ae("["+l+'="'+c+'"][href="#'+e.id+'"]',n)),a=o&&(o[bt](x)||o.href);e&&o&&e!==i&&(f(e,o),a.split("#")[1]!==i.id?ee(o,u):ne(o,u))}s(i,t),ne(t,u)},d in t||re(t,ot,o.toggle),i=h(),n=ae(e.parent)||r&&le(t,r),t[d]=o};a[Wt]([d,ge,"["+l+'="collapse"]']);var we=function(t,n){t=ae(t),this.persist=n===!0||"true"===t[bt]("data-persist")||!1;var i=this,o="children",a=t[Bt],l="dropdown",r="open",c=null,u=ae(".dropdown-menu",a),s=function(){for(var t=u[o],e=[],n=0;n<t[Mt];n++)t[n][o][Mt]&&"A"===t[n][o][0].tagName&&e[Wt](t[n][o][0]),"A"===t[n].tagName&&e[Wt](t[n]);return e}(),f=function(t){(t.href&&"#"===t.href.slice(-1)||t[Bt]&&t[Bt].href&&"#"===t[Bt].href.slice(-1))&&this[It]()},h=function(){var n=t[r]?re:ce;n(e,ot,d),n(e,lt,m),n(e,rt,g)},d=function(e){var n=e[j],o=n&&(v in n||v in n[Bt]);(n!==u&&!u[qt](n)||!i.persist&&!o)&&(c=n===t||t[qt](n)?t:null,b(),f.call(e,n))},p=function(e){c=t,w(),f.call(e,e[j])},m=function(t){var e=t.which||t.keyCode;38!==e&&40!==e||t[It]()},g=function(n){var o=n.which||n.keyCode,a=e.activeElement,l=s[St](a),f=a===t,h=u[qt](a),d=a[Bt]===u||a[Bt][Bt]===u;(d||f)&&(l=f?0:38===o?l>1?l-1:0:40===o&&l<s[Mt]-1?l+1:l,s[l]&&te(s[l])),(s[Mt]&&d||!s[Mt]&&(h||f)||!h)&&t[r]&&27===o&&(i.toggle(),c=null)},w=function(){fe.call(a,st,l,c),ee(u,Ut),ee(a,Ut),u[yt](nt,!0),fe.call(a,ft,l,c),t[r]=!0,ce(t,ot,p),setTimeout(function(){te(u[kt]("INPUT")[0]||t),h()},1)},b=function(){fe.call(a,ht,l,c),ne(u,Ut),ne(a,Ut),u[yt](nt,!1),fe.call(a,dt,l,c),t[r]=!1,h(),te(t),setTimeout(function(){re(t,ot,p)},1)};t[r]=!1,this.toggle=function(){ie(a,Ut)&&t[r]?b():w()},v in t||(!jt in u&&u[yt](jt,"0"),re(t,ot,p)),t[v]=i};a[Wt]([v,we,"["+l+'="dropdown"]']);var be=function(o,a){o=ae(o);var l=o[bt](x)||o[bt]("href"),c=ae(l),u=ie(o,"modal")?o:c,s="modal",f="static",h="paddingLeft",d="paddingRight",v="modal-backdrop";if(ie(o,"modal")&&(o=null),u){a=a||{},this[H]=a[H]!==!1&&"false"!==u[bt](T),this[P]=a[P]!==f&&u[bt](y)!==f||f,this[P]=a[P]!==!1&&"false"!==u[bt](y)&&this[P],this[W]=a[W];var m,g,w,b,C=this,A=null,k=oe(n,Vt).concat(oe(n,Zt)),I=function(){var e=n[Lt]();return t[$]||e[Yt]-Math.abs(e[Xt])},L=function(){var n,o=t.getComputedStyle(e[i]),a=parseInt(o[d],10);if(m&&(e[i][Ot][d]=a+w+"px",k[Mt]))for(var l=0;l<k[Mt];l++)n=t.getComputedStyle(k[l])[d],k[l][Ot][d]=parseInt(n)+w+"px"},N=function(){if(e[i][Ot][d]="",k[Mt])for(var t=0;t<k[Mt];t++)k[t][Ot][d]=""},E=function(){var t,n=e[xt]("div");return n.className=s+"-scrollbar-measure",e[i][Ct](n),t=n[V]-n[K],e[i].removeChild(n),t},S=function(){m=e[i][K]<I(),g=u[tt]>n[Q],w=E()},B=function(){u[Ot][h]=!m&&g?w+"px":"",u[Ot][d]=m&&!g?w+"px":""},M=function(){u[Ot][h]="",u[Ot][d]=""},D=function(){Qt=1;var t=e[xt]("div");b=ae("."+v),null===b&&(t[yt]("class",v+" fade"),b=t,e[i][Ct](b))},O=function(){b=ae("."+v),b&&null!==b&&"object"==typeof b&&(Qt=0,e[i].removeChild(b),b=null),fe.call(u,dt,s)},q=function(){ie(u,Ut)?re(e,lt,F):ce(e,lt,F)},R=function(){ie(u,Ut)?re(t,ct,C.update):ce(t,ct,C.update)},U=function(){ie(u,Ut)?re(u,ot,G):ce(u,ot,G)},z=function(){te(u),fe.call(u,ft,s,A)},X=function(){u[Ot].display="",o&&te(o),function(){oe(e,s+" "+Ut)[0]||(M(),N(),ne(e[i],s+"-open"),b&&ie(b,"fade")?(ne(b,Ut),se(b,O)):O(),R(),U(),q())}()},Y=function(t){var e=t[j];e=e[Tt](x)||e[Tt]("href")?e:e[Bt],e!==o||ie(u,Ut)||(u.modalTrigger=o,A=o,C.show(),t[It]())},F=function(t){C[H]&&27==t.which&&ie(u,Ut)&&C.hide()},G=function(t){var e=t[j];ie(u,Ut)&&(e[Bt][bt](r)===s||e[bt](r)===s||e===u&&C[P]!==f)&&(C.hide(),A=null,t[It]())};this.toggle=function(){ie(u,Ut)?this.hide():this.show()},this.show=function(){fe.call(u,st,s,A);var t=oe(e,s+" "+Ut)[0];t&&t!==u&&t.modalTrigger[p].hide(),this[P]&&!Qt&&D(),b&&Qt&&!ie(b,Ut)&&(b[V],ee(b,Ut)),setTimeout(function(){u[Ot].display="block",S(),L(),B(),ee(e[i],s+"-open"),ee(u,Ut),u[yt](it,!1),R(),U(),q(),ie(u,"fade")?se(u,z):z()},$t?150:0)},this.hide=function(){fe.call(u,ht,s),b=ae("."+v),ne(u,Ut),u[yt](it,!0),function(){ie(u,"fade")?se(u,X):X()}()},this.setContent=function(t){ae("."+s+"-content",u)[At]=t},this.update=function(){ie(u,Ut)&&(S(),L(),B())},!o||p in o||re(o,ot,Y),C[W]&&C.setContent(C[W]),!!o&&(o[p]=C)}};a[Wt]([p,be,"["+l+'="modal"]']);var ye=function(n,o){n=ae(n),o=o||{};var a=n[bt](E),l=n[bt](S),r=n[bt](M),c=n[bt](N),u=n[bt](D),s=n[bt](B),f="popover",h="template",d="trigger",v="class",p="div",g="fade",w="data-content",b="dismissible",y='<button type="button" class="close">×</button>',T=ae(o[X]),x=ae(s),C=le(n,".modal"),A=le(n,"."+Vt),k=le(n,"."+Zt);this[h]=o[h]?o[h]:null,this[d]=o[d]?o[d]:a||at,this[U]=o[U]&&o[U]!==g?o[U]:l||g,this[z]=o[z]?o[z]:r||Ft,this[O]=parseInt(o[O]||u)||200,this[b]=!(!o[b]&&"true"!==c),this[X]=T?T:x?x:A?A:k?k:C?C:e[i];var L=this,P=n[bt](I)||null,H=n[bt](w)||null;if(H||this[h]){var W=null,q=0,R=this[z],Y=function(t){null!==W&&t[j]===ae(".close",W)&&L.hide()},F=function(){L[X].removeChild(W),q=null,W=null},G=function(){P=n[bt](I),H=n[bt](w),W=e[xt](p);var t=e[xt](p);if(t[yt](v,"arrow"),W[Ct](t),null!==H&&null===L[h]){if(W[yt]("role","tooltip"),null!==P){var i=e[xt]("h3");i[yt](v,f+"-header"),i[At]=L[b]?P+y:P,W[Ct](i)}var o=e[xt](p);o[yt](v,f+"-body"),o[At]=L[b]&&null===P?H+y:H,W[Ct](o)}else{var a=e[xt](p);a[At]=L[h],W[At]=a.firstChild[At]}L[X][Ct](W),W[Ot].display="block",W[yt](v,f+" bs-"+f+"-"+R+" "+L[U])},J=function(){!ie(W,Ut)&&ee(W,Ut)},K=function(){de(n,W,R,L[X])},Q=function(i){ot!=L[d]&&"focus"!=L[d]||!L[b]&&i(n,"blur",L.hide),L[b]&&i(e,ot,Y),i(t,ct,L.hide)},V=function(){Q(re),fe.call(n,ft,f)},Z=function(){Q(ce),F(),fe.call(n,dt,f)};this.toggle=function(){null===W?L.show():L.hide()},this.show=function(){clearTimeout(q),q=setTimeout(function(){null===W&&(R=L[z],G(),K(),J(),fe.call(n,st,f),L[U]?se(W,V):V())},20)},this.hide=function(){clearTimeout(q),q=setTimeout(function(){W&&null!==W&&ie(W,Ut)&&(fe.call(n,ht,f),ne(W,Ut),L[U]?se(W,Z):Z())},L[O])},m in n||(L[d]===at?(re(n,Jt[0],L.show),L[b]||re(n,Jt[1],L.hide)):ot!=L[d]&&"focus"!=L[d]||re(n,L[d],L.toggle)),n[m]=L}};a[Wt]([m,ye,"["+l+'="popover"]']);var Te=function(e,n){e=ae(e);var i=ae(e[bt](x)),o=e[bt]("data-offset");if(n=n||{},n[j]||i){for(var a,l=this,r=n[j]&&ae(n[j])||i,c=r&&r[kt]("A"),u=parseInt(o||n.offset)||10,s=[],f=[],h=e[Z]<e[tt]?e:t,d=h===t,v=0,p=c[Mt];v<p;v++){var m=c[v][bt]("href"),w=m&&"#"===m.charAt(0)&&"#"!==m.slice(-1)&&ae(m);w&&(s[Wt](c[v]),f[Wt](w))}var b=function(t){var n=s[t],i=f[t],o=n[Bt][Bt],l=ie(o,"dropdown")&&o[kt]("A")[0],r=d&&i[Lt](),c=ie(n,Rt)||!1,h=(d?r[Ft]+a:i[Y])-u,v=d?r[Gt]+a-u:f[t+1]?f[t+1][Y]-u:e[tt],p=a>=h&&v>a;if(!c&&p)ie(n,Rt)||(ee(n,Rt),l&&!ie(l,Rt)&&ee(l,Rt),fe.call(e,"activate","scrollspy",s[t]));else if(p){if(!p&&!c||c&&p)return}else ie(n,Rt)&&(ne(n,Rt),l&&ie(l,Rt)&&!oe(n[Bt],Rt).length&&ne(l,Rt))},y=function(){a=d?he().y:e[G];for(var t=0,n=s[Mt];t<n;t++)b(t)};this.refresh=function(){y()},g in e||(re(h,ut,l.refresh),re(t,ct,l.refresh)),l.refresh(),e[g]=l}};a[Wt]([g,Te,"["+c+'="scroll"]']);var xe=function(t,e){t=ae(t);var n=t[bt](A),i="tab",o="height",a="float",r="isAnimating";e=e||{},this[o]=!!$t&&(e[o]||"true"===n);var c,u,s,f,h,d,v,p=this,m=le(t,".nav"),g=!1,b=m&&ae(".dropdown-toggle",m),y=function(){g[Ot][o]="",ne(g,zt),m[r]=!1},T=function(){g?d?y():setTimeout(function(){g[Ot][o]=v+"px",g[V],se(g,y)},1):m[r]=!1,fe.call(c,ft,i,u)},x=function(){g&&(s[Ot][a]=Xt,f[Ot][a]=Xt,h=s[tt]),ee(f,Rt),fe.call(c,st,i,u),ne(s,Rt),fe.call(u,dt,i,c),g&&(v=f[tt],d=v===h,ee(g,zt),g[Ot][o]=h+"px",g[Z],s[Ot][a]="",f[Ot][a]=""),ie(f,"fade")?setTimeout(function(){ee(f,Ut),se(f,T)},20):T()};if(m){m[r]=!1;var C=function(){var t,e=oe(m,Rt);return 1!==e[Mt]||ie(e[0][Bt],"dropdown")?e[Mt]>1&&(t=e[e[Mt]-1]):t=e[0],t},k=function(){return ae(C()[bt]("href"))},I=function(t){var e=t[j][bt]("href");t[It](),c=t[j][bt](l)===i||e&&"#"===e.charAt(0)?t[j]:t[j][Bt],!m[r]&&!ie(c,Rt)&&p.show()};this.show=function(){c=c||t,f=ae(c[bt]("href")),u=C(),s=k(),m[r]=!0,ne(u,Rt),ee(c,Rt),b&&(ie(t[Bt],"dropdown-menu")?ie(b,Rt)||ee(b,Rt):ie(b,Rt)&&ne(b,Rt)),fe.call(u,ht,i,c),ie(s,"fade")?(ne(s,Ut),se(s,x)):x()},w in t||re(t,ot,I),p[o]&&(g=k()[Bt]),t[w]=p}};a[Wt]([w,xe,"["+l+'="tab"]']);var Ce=function(n,o){n=ae(n),o=o||{};var a=n[bt](S),l=n[bt](M),r=n[bt](D),c=n[bt](B),u="tooltip",s="class",f="title",h="fade",d="div",v=ae(o[X]),p=ae(c),m=le(n,".modal"),g=le(n,"."+Vt),w=le(n,"."+Zt);this[U]=o[U]&&o[U]!==h?o[U]:a||h,this[z]=o[z]?o[z]:l||Ft,this[O]=parseInt(o[O]||r)||200,this[X]=v?v:p?p:g?g:w?w:m?m:e[i];var y=this,T=0,x=this[z],C=null,A=n[bt](f)||n[bt](I)||n[bt](L);if(A&&""!=A){var k=function(){y[X].removeChild(C),C=null,T=null},N=function(){if(A=n[bt](f)||n[bt](I)||n[bt](L),!A||""==A)return!1;C=e[xt](d),C[yt]("role",u);var t=e[xt](d);t[yt](s,"arrow"),C[Ct](t);var i=e[xt](d);i[yt](s,u+"-inner"),C[Ct](i),i[At]=A,y[X][Ct](C),C[yt](s,u+" bs-"+u+"-"+x+" "+y[U])},E=function(){de(n,C,x,y[X])},P=function(){!ie(C,Ut)&&ee(C,Ut)},H=function(){re(t,ct,y.hide),fe.call(n,ft,u)},W=function(){ce(t,ct,y.hide),k(),fe.call(n,dt,u)};this.show=function(){clearTimeout(T),T=setTimeout(function(){if(null===C){if(x=y[z],0==N())return;E(),P(),fe.call(n,st,u),y[U]?se(C,H):H()}},20)},this.hide=function(){clearTimeout(T),T=setTimeout(function(){C&&ie(C,Ut)&&(fe.call(n,ht,u),ne(C,Ut),y[U]?se(C,W):W())},y[O])},this.toggle=function(){C?y.hide():y.show()},b in n||(n[yt](L,A),n.removeAttribute(f),re(n,Jt[0],y.show),re(n,Jt[1],y.hide)),n[b]=y}};a[Wt]([b,Ce,"["+l+'="tooltip"]']);var Ae=function(t,e){for(var n=0,i=e[Mt];n<i;n++)new t(e[n])},ke=o.initCallback=function(t){t=t||e;for(var n=0,i=a[Mt];n<i;n++)Ae(a[n][1],t[Nt](a[n][2]))};return e[i]?ke():re(e,"DOMContentLoaded",function(){ke()}),{Alert:ve,Button:pe,Carousel:me,Collapse:ge,Dropdown:we,Modal:be,Popover:ye,ScrollSpy:Te,Tab:xe,Tooltip:Ce}});
// Native Javascript for Bootstrap 3 v2.0.23 | © dnp_theme | MIT-License
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD support:
define([], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like:
module.exports = factory();
} else {
// Browser globals (root is window)
var bsn = factory();
root.Affix = bsn.Affix;
root.Alert = bsn.Alert;
root.Button = bsn.Button;
root.Carousel = bsn.Carousel;
root.Collapse = bsn.Collapse;
root.Dropdown = bsn.Dropdown;
root.Modal = bsn.Modal;
root.Popover = bsn.Popover;
root.ScrollSpy = bsn.ScrollSpy;
root.Tab = bsn.Tab;
root.Tooltip = bsn.Tooltip;
}
}(this, function () {
/* Native Javascript for Bootstrap 3 | Internal Utility Functions
----------------------------------------------------------------*/
"use strict";
// globals
var globalObject = typeof global !== 'undefined' ? global : this||window,
DOC = document, HTML = DOC.documentElement, body = 'body', // allow the library to be used in <head>
// Native Javascript for Bootstrap Global Object
BSN = globalObject.BSN = {},
supports = BSN.supports = [],
// function toggle attributes
dataToggle = 'data-toggle',
dataDismiss = 'data-dismiss',
dataSpy = 'data-spy',
dataRide = 'data-ride',
// components
stringAffix = 'Affix',
stringAlert = 'Alert',
stringButton = 'Button',
stringCarousel = 'Carousel',
stringCollapse = 'Collapse',
stringDropdown = 'Dropdown',
stringModal = 'Modal',
stringPopover = 'Popover',
stringScrollSpy = 'ScrollSpy',
stringTab = 'Tab',
stringTooltip = 'Tooltip',
// options DATA API
databackdrop = 'data-backdrop',
dataKeyboard = 'data-keyboard',
dataTarget = 'data-target',
dataInterval = 'data-interval',
dataHeight = 'data-height',
dataPause = 'data-pause',
dataTitle = 'data-title',
dataOriginalTitle = 'data-original-title',
dataOriginalText = 'data-original-text',
dataDismissible = 'data-dismissible',
dataTrigger = 'data-trigger',
dataAnimation = 'data-animation',
dataContainer = 'data-container',
dataPlacement = 'data-placement',
dataDelay = 'data-delay',
dataOffsetTop = 'data-offset-top',
dataOffsetBottom = 'data-offset-bottom',
// option keys
backdrop = 'backdrop', keyboard = 'keyboard', delay = 'delay',
content = 'content', target = 'target',
interval = 'interval', pause = 'pause', animation = 'animation',
placement = 'placement', container = 'container',
// box model
offsetTop = 'offsetTop', offsetBottom = 'offsetBottom',
offsetLeft = 'offsetLeft',
scrollTop = 'scrollTop', scrollLeft = 'scrollLeft',
clientWidth = 'clientWidth', clientHeight = 'clientHeight',
offsetWidth = 'offsetWidth', offsetHeight = 'offsetHeight',
innerWidth = 'innerWidth', innerHeight = 'innerHeight',
scrollHeight = 'scrollHeight', height = 'height',
// aria
ariaExpanded = 'aria-expanded',
ariaHidden = 'aria-hidden',
// event names
clickEvent = 'click',
hoverEvent = 'hover',
keydownEvent = 'keydown',
keyupEvent = 'keyup',
resizeEvent = 'resize',
scrollEvent = 'scroll',
// originalEvents
showEvent = 'show',
shownEvent = 'shown',
hideEvent = 'hide',
hiddenEvent = 'hidden',
closeEvent = 'close',
closedEvent = 'closed',
slidEvent = 'slid',
slideEvent = 'slide',
changeEvent = 'change',
// other
getAttribute = 'getAttribute',
setAttribute = 'setAttribute',
hasAttribute = 'hasAttribute',
createElement = 'createElement',
appendChild = 'appendChild',
innerHTML = 'innerHTML',
getElementsByTagName = 'getElementsByTagName',
preventDefault = 'preventDefault',
getBoundingClientRect = 'getBoundingClientRect',
querySelectorAll = 'querySelectorAll',
getElementsByCLASSNAME = 'getElementsByClassName',
indexOf = 'indexOf',
parentNode = 'parentNode',
length = 'length',
toLowerCase = 'toLowerCase',
Transition = 'Transition',
Webkit = 'Webkit',
style = 'style',
push = 'push',
tabindex = 'tabindex',
contains = 'contains',
active = 'active',
inClass = 'in',
collapsing = 'collapsing',
disabled = 'disabled',
loading = 'loading',
left = 'left',
right = 'right',
top = 'top',
bottom = 'bottom',
// IE8 browser detect
isIE8 = !('opacity' in HTML[style]),
// tooltip / popover
mouseHover = ('onmouseleave' in DOC) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ],
tipPositions = /\b(top|bottom|left|right)+/,
// modal
modalOverlay = 0,
fixedTop = 'navbar-fixed-top',
fixedBottom = 'navbar-fixed-bottom',
// transitionEnd since 2.0.4
supportTransitions = Webkit+Transition in HTML[style] || Transition[toLowerCase]() in HTML[style],
transitionEndEvent = Webkit+Transition in HTML[style] ? Webkit[toLowerCase]()+Transition+'End' : Transition[toLowerCase]()+'end',
// set new focus element since 2.0.3
setFocus = function(element){
element.focus ? element.focus() : element.setActive();
},
// class manipulation, since 2.0.0 requires polyfill.js
addClass = function(element,classNAME) {
element.classList.add(classNAME);
},
removeClass = function(element,classNAME) {
element.classList.remove(classNAME);
},
hasClass = function(element,classNAME){ // since 2.0.0
return element.classList[contains](classNAME);
},
// selection methods
nodeListToArray = function(nodeList){
var childItems = []; for (var i = 0, nll = nodeList[length]; i<nll; i++) { childItems[push]( nodeList[i] ) }
return childItems;
},
getElementsByClassName = function(element,classNAME) { // getElementsByClassName IE8+
var selectionMethod = isIE8 ? querySelectorAll : getElementsByCLASSNAME;
return nodeListToArray(element[selectionMethod]( isIE8 ? '.' + classNAME.replace(/\s(?=[a-z])/g,'.') : classNAME ));
},
queryElement = function (selector, parent) {
var lookUp = parent ? parent : DOC;
return typeof selector === 'object' ? selector : lookUp.querySelector(selector);
},
getClosest = function (element, selector) { //element is the element and selector is for the closest parent element to find
// source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
var firstChar = selector.charAt(0), selectorSubstring = selector.substr(1);
if ( firstChar === '.' ) {// If selector is a class
for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selectorSubstring) ) { return element; }
}
} else if ( firstChar === '#' ) { // If selector is an ID
for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
if ( element.id === selectorSubstring ) { return element; }
}
}
return false;
},
// event attach jQuery style / trigger since 1.2.0
on = function (element, event, handler) {
element.addEventListener(event, handler, false);
},
off = function(element, event, handler) {
element.removeEventListener(event, handler, false);
},
one = function (element, event, handler) { // one since 2.0.4
on(element, event, function handlerWrapper(e){
handler(e);
off(element, event, handlerWrapper);
});
},
emulateTransitionEnd = function(element,handler){ // emulateTransitionEnd since 2.0.4
if (supportTransitions) { one(element, transitionEndEvent, function(e){ handler(e); }); }
else { handler(); }
},
bootstrapCustomEvent = function (eventName, componentName, related) {
var OriginalCustomEvent = new CustomEvent( eventName + '.bs.' + componentName);
OriginalCustomEvent.relatedTarget = related;
this.dispatchEvent(OriginalCustomEvent);
},
// tooltip / popover stuff
getScroll = function() { // also Affix and ScrollSpy uses it
return {
y : globalObject.pageYOffset || HTML[scrollTop],
x : globalObject.pageXOffset || HTML[scrollLeft]
}
},
styleTip = function(link,element,position,parent) { // both popovers and tooltips (target,tooltip/popover,placement,elementToAppendTo)
var elementDimensions = { w : element[offsetWidth], h: element[offsetHeight] },
windowWidth = (HTML[clientWidth] || DOC[body][clientWidth]),
windowHeight = (HTML[clientHeight] || DOC[body][clientHeight]),
rect = link[getBoundingClientRect](),
scroll = parent === DOC[body] ? getScroll() : { x: parent[offsetLeft] + parent[scrollLeft], y: parent[offsetTop] + parent[scrollTop] },
linkDimensions = { w: rect[right] - rect[left], h: rect[bottom] - rect[top] },
arrow = queryElement('[class*="arrow"]',element),
topPosition, leftPosition, arrowTop, arrowLeft,
halfTopExceed = rect[top] + linkDimensions.h/2 - elementDimensions.h/2 < 0,
halfLeftExceed = rect[left] + linkDimensions.w/2 - elementDimensions.w/2 < 0,
halfRightExceed = rect[left] + elementDimensions.w/2 + linkDimensions.w/2 >= windowWidth,
halfBottomExceed = rect[top] + elementDimensions.h/2 + linkDimensions.h/2 >= windowHeight,
topExceed = rect[top] - elementDimensions.h < 0,
leftExceed = rect[left] - elementDimensions.w < 0,
bottomExceed = rect[top] + elementDimensions.h + linkDimensions.h >= windowHeight,
rightExceed = rect[left] + elementDimensions.w + linkDimensions.w >= windowWidth;
// recompute position
position = (position === left || position === right) && leftExceed && rightExceed ? top : position; // first, when both left and right limits are exceeded, we fall back to top|bottom
position = position === top && topExceed ? bottom : position;
position = position === bottom && bottomExceed ? top : position;
position = position === left && leftExceed ? right : position;
position = position === right && rightExceed ? left : position;
// apply styling to tooltip or popover
if ( position === left || position === right ) { // secondary|side positions
if ( position === left ) { // LEFT
leftPosition = rect[left] + scroll.x - elementDimensions.w;
} else { // RIGHT
leftPosition = rect[left] + scroll.x + linkDimensions.w;
}
// adjust top and arrow
if (halfTopExceed) {
topPosition = rect[top] + scroll.y;
arrowTop = linkDimensions.h/2;
} else if (halfBottomExceed) {
topPosition = rect[top] + scroll.y - elementDimensions.h + linkDimensions.h;
arrowTop = elementDimensions.h - linkDimensions.h/2;
} else {
topPosition = rect[top] + scroll.y - elementDimensions.h/2 + linkDimensions.h/2;
}
} else if ( position === top || position === bottom ) { // primary|vertical positions
if ( position === top) { // TOP
topPosition = rect[top] + scroll.y - elementDimensions.h;
} else { // BOTTOM
topPosition = rect[top] + scroll.y + linkDimensions.h;
}
// adjust left | right and also the arrow
if (halfLeftExceed) {
leftPosition = 0;
arrowLeft = rect[left] + linkDimensions.w/2;
} else if (halfRightExceed) {
leftPosition = windowWidth - elementDimensions.w*1.01;
arrowLeft = elementDimensions.w - ( windowWidth - rect[left] ) + linkDimensions.w/2;
} else {
leftPosition = rect[left] + scroll.x - elementDimensions.w/2 + linkDimensions.w/2;
}
}
// apply style to tooltip/popover and it's arrow
element[style][top] = topPosition + 'px';
element[style][left] = leftPosition + 'px';
arrowTop && (arrow[style][top] = arrowTop + 'px');
arrowLeft && (arrow[style][left] = arrowLeft + 'px');
element.className[indexOf](position) === -1 && (element.className = element.className.replace(tipPositions,position));
};
BSN.version = '2.0.23';
/* Native Javascript for Bootstrap 3 | Affix
-------------------------------------------*/
//AFFIX DEFINITION
var Affix = function(element, options) {
// initialization element
element = queryElement(element);
// set options
options = options || {};
// read DATA API
var targetData = element[getAttribute](dataTarget),
offsetTopData = element[getAttribute](dataOffsetTop),
offsetBottomData = element[getAttribute](dataOffsetBottom),
// component specific strings
affix = 'affix', affixed = 'affixed', fn = 'function', update = 'update',
affixTop = 'affix-top', affixedTop = 'affixed-top',
affixBottom = 'affix-bottom', affixedBottom = 'affixed-bottom';
this[target] = options[target] ? queryElement(options[target]) : queryElement(targetData) || null; // target is an object
this[offsetTop] = options[offsetTop] ? options[offsetTop] : parseInt(offsetTopData) || 0; // offset option is an integer number or function to determine that number
this[offsetBottom] = options[offsetBottom] ? options[offsetBottom]: parseInt(offsetBottomData) || 0;
if ( !this[target] && !( this[offsetTop] || this[offsetBottom] ) ) { return; } // invalidate
// internal bind
var self = this,
// constants
pinOffsetTop, pinOffsetBottom, maxScroll, scrollY, pinnedTop, pinnedBottom,
affixedToTop = false, affixedToBottom = false,
// private methods
getMaxScroll = function(){
return Math.max( DOC[body][scrollHeight], DOC[body][offsetHeight], HTML[clientHeight], HTML[scrollHeight], HTML[offsetHeight] );
},
getOffsetTop = function () {
if ( self[target] !== null ) {
return self[target][getBoundingClientRect]()[top] + scrollY;
} else if ( self[offsetTop] ) {
return parseInt(typeof self[offsetTop] === fn ? self[offsetTop]() : self[offsetTop] || 0);
}
},
getOffsetBottom = function () {
if ( self[offsetBottom] ) {
return maxScroll - element[offsetHeight] - parseInt( typeof self[offsetBottom] === fn ? self[offsetBottom]() : self[offsetBottom] || 0 );
}
},
checkPosition = function () {
maxScroll = getMaxScroll();
scrollY = parseInt(getScroll().y,0);
pinOffsetTop = getOffsetTop();
pinOffsetBottom = getOffsetBottom();
pinnedTop = ( parseInt(pinOffsetTop) - scrollY < 0) && (scrollY > parseInt(pinOffsetTop) );
pinnedBottom = ( parseInt(pinOffsetBottom) - scrollY < 0) && (scrollY > parseInt(pinOffsetBottom) );
},
pinTop = function () {
if ( !affixedToTop && !hasClass(element,affix) ) { // on loading a page halfway scrolled these events don't trigger in Chrome
bootstrapCustomEvent.call(element, affix, affix);
bootstrapCustomEvent.call(element, affixTop, affix);
addClass(element,affix);
affixedToTop = true;
bootstrapCustomEvent.call(element, affixed, affix);
bootstrapCustomEvent.call(element, affixedTop, affix);
}
},
unPinTop = function () {
if ( affixedToTop && hasClass(element,affix) ) {
removeClass(element,affix);
affixedToTop = false;
}
},
pinBottom = function () {
if ( !affixedToBottom && !hasClass(element, affixBottom) ) {
bootstrapCustomEvent.call(element, affix, affix);
bootstrapCustomEvent.call(element, affixBottom, affix);
addClass(element,affixBottom);
affixedToBottom = true;
bootstrapCustomEvent.call(element, affixed, affix);
bootstrapCustomEvent.call(element, affixedBottom, affix);
}
},
unPinBottom = function () {
if ( affixedToBottom && hasClass(element,affixBottom) ) {
removeClass(element,affixBottom);
affixedToBottom = false;
}
},
updatePin = function () {
if ( pinnedBottom ) {
if ( pinnedTop ) { unPinTop(); }
pinBottom();
} else {
unPinBottom();
if ( pinnedTop ) { pinTop(); }
else { unPinTop(); }
}
};
// public method
this[update] = function () {
checkPosition();
updatePin();
};
// init
if ( !(stringAffix in element ) ) { // prevent adding event handlers twice
on( globalObject, scrollEvent, self[update] );
!isIE8 && on( globalObject, resizeEvent, self[update] );
}
element[stringAffix] = self;
self[update]();
};
// AFFIX DATA API
// =================
supports[push]([stringAffix, Affix, '['+dataSpy+'="affix"]']);
/* Native Javascript for Bootstrap 3 | Alert
-------------------------------------------*/
// ALERT DEFINITION
// ================
var Alert = function( element ) {
// initialization element
element = queryElement(element);
// bind, target alert, duration and stuff
var self = this, component = 'alert',
alert = getClosest(element,'.'+component),
triggerHandler = function(){ hasClass(alert,'fade') ? emulateTransitionEnd(alert,transitionEndHandler) : transitionEndHandler(); },
// handlers
clickHandler = function(e){
alert = getClosest(e[target],'.'+component);
element = queryElement('['+dataDismiss+'="'+component+'"]',alert);
element && alert && (element === e[target] || element[contains](e[target])) && self.close();
},
transitionEndHandler = function(){
bootstrapCustomEvent.call(alert, closedEvent, component);
off(element, clickEvent, clickHandler); // detach it's listener
alert[parentNode].removeChild(alert);
};
// public method
this.close = function() {
if ( alert && element && hasClass(alert,inClass) ) {
bootstrapCustomEvent.call(alert, closeEvent, component);
removeClass(alert,inClass);
alert && triggerHandler();
}
};
// init
if ( !(stringAlert in element ) ) { // prevent adding event handlers twice
on(element, clickEvent, clickHandler);
}
element[stringAlert] = self;
};
// ALERT DATA API
// ==============
supports[push]([stringAlert, Alert, '['+dataDismiss+'="alert"]']);
/* Native Javascript for Bootstrap 3 | Button
---------------------------------------------*/
// BUTTON DEFINITION
// ===================
var Button = function( element, option ) {
// initialization element
element = queryElement(element);
// set option
option = option || null;
// constant
var toggled = false, // toggled makes sure to prevent triggering twice the change.bs.button events
// strings
component = 'button',
checked = 'checked',
reset = 'reset',
LABEL = 'LABEL',
INPUT = 'INPUT',
// private methods
setState = function() {
if ( !! option && option !== reset ) {
if ( option === loading ) {
addClass(element,disabled);
element[setAttribute](disabled,disabled);
element[setAttribute](dataOriginalText, element[innerHTML].trim()); // trim the text
}
element[innerHTML] = element[getAttribute]('data-'+option+'-text');
}
},
resetState = function() {
if (element[getAttribute](dataOriginalText)) {
if ( hasClass(element,disabled) || element[getAttribute](disabled) === disabled ) {
removeClass(element,disabled);
element.removeAttribute(disabled);
}
element[innerHTML] = element[getAttribute](dataOriginalText);
}
},
keyHandler = function(e){
var key = e.which || e.keyCode;
key === 32 && e[target] === DOC.activeElement && toggle(e);
},
preventScroll = function(e){
var key = e.which || e.keyCode;
key === 32 && e[preventDefault]();
},
toggle = function(e) {
var label = e[target].tagName === LABEL ? e[target] : e[target][parentNode].tagName === LABEL ? e[target][parentNode] : null; // the .btn label
if ( !label ) return; //react if a label or its immediate child is clicked
var eventTarget = e[target], // the button itself, the target of the handler function
labels = getElementsByClassName(eventTarget[parentNode],'btn'), // all the button group buttons
input = label[getElementsByTagName](INPUT)[0];
if ( !input ) return; //return if no input found
// manage the dom manipulation
if ( input.type === 'checkbox' ) { //checkboxes
if ( !input[checked] ) {
addClass(label,active);
input[getAttribute](checked);
input[setAttribute](checked,checked);
input[checked] = true;
} else {
removeClass(label,active);
input[getAttribute](checked);
input.removeAttribute(checked);
input[checked] = false;
}
if (!toggled) { // prevent triggering the event twice
toggled = true;
bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
}
}
if ( input.type === 'radio' && !toggled ) { // radio buttons
if ( !input[checked] ) { // don't trigger if already active
addClass(label,active);
input[setAttribute](checked,checked);
input[checked] = true;
bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
toggled = true;
for (var i = 0, ll = labels[length]; i<ll; i++) {
var otherLabel = labels[i], otherInput = otherLabel[getElementsByTagName](INPUT)[0];
if ( otherLabel !== label && hasClass(otherLabel,active) ) {
removeClass(otherLabel,active);
otherInput.removeAttribute(checked);
otherInput[checked] = false;
bootstrapCustomEvent.call(otherInput, changeEvent, component); // trigger the change
}
}
}
}
setTimeout( function() { toggled = false; }, 50 );
};
// init
if ( hasClass(element,'btn') ) { // when Button text is used we execute it as an instance method
if ( option !== null ) {
if ( option !== reset ) { setState(); }
else { resetState(); }
}
} else { // if ( hasClass(element,'btn-group') ) // we allow the script to work outside btn-group component
if ( !( stringButton in element ) ) { // prevent adding event handlers twice
on( element, clickEvent, toggle );
queryElement('['+tabindex+']',element) && on( element, keyupEvent, keyHandler ),
on( element, keydownEvent, preventScroll );
}
// activate items on load
var labelsToACtivate = getElementsByClassName(element, 'btn'), lbll = labelsToACtivate[length];
for (var i=0; i<lbll; i++) {
!hasClass(labelsToACtivate[i],active) && queryElement('input',labelsToACtivate[i])[getAttribute](checked)
&& addClass(labelsToACtivate[i],active);
}
element[stringButton] = this;
}
};
// BUTTON DATA API
// =================
supports[push]( [ stringButton, Button, '['+dataToggle+'="buttons"]' ] );
/* Native Javascript for Bootstrap 3 | Carousel
----------------------------------------------*/
// CAROUSEL DEFINITION
// ===================
var Carousel = function( element, options ) {
// initialization element
element = queryElement( element );
// set options
options = options || {};
// DATA API
var intervalAttribute = element[getAttribute](dataInterval),
intervalOption = options[interval],
intervalData = intervalAttribute === 'false' ? 0 : parseInt(intervalAttribute),
pauseData = element[getAttribute](dataPause) === hoverEvent || false,
keyboardData = element[getAttribute](dataKeyboard) === 'true' || false,
// strings
component = 'carousel',
paused = 'paused',
direction = 'direction',
dataSlideTo = 'data-slide-to';
this[keyboard] = options[keyboard] === true || keyboardData;
this[pause] = (options[pause] === hoverEvent || pauseData) ? hoverEvent : false; // false / hover
this[interval] = typeof intervalOption === 'number' ? intervalOption
: intervalData === 0 || intervalData === false ? 0
: 5000; // bootstrap carousel default interval
// bind, event targets
var self = this, index = element.index = 0, timer = element.timer = 0,
isSliding = false, // isSliding prevents click event handlers when animation is running
slides = getElementsByClassName(element,'item'), total = slides[length],
slideDirection = this[direction] = left,
controls = getElementsByClassName(element,component+'-control'),
leftArrow = controls[0], rightArrow = controls[1],
indicator = queryElement( '.'+component+'-indicators', element ),
indicators = indicator && indicator[getElementsByTagName]( "LI" ) || [];
// handlers
var pauseHandler = function () {
if ( self[interval] !==false && !hasClass(element,paused) ) {
addClass(element,paused);
!isSliding && clearInterval( timer );
}
},
resumeHandler = function() {
if ( self[interval] !== false && hasClass(element,paused) ) {
removeClass(element,paused);
!isSliding && clearInterval( timer );
!isSliding && self.cycle();
}
},
indicatorHandler = function(e) {
e[preventDefault]();
if (isSliding) return;
var eventTarget = e[target]; // event target | the current active item
if ( eventTarget && !hasClass(eventTarget,active) && eventTarget[getAttribute](dataSlideTo) ) {
index = parseInt( eventTarget[getAttribute](dataSlideTo), 10 );
} else { return false; }
self.slideTo( index ); //Do the slide
},
controlsHandler = function (e) {
e[preventDefault]();
if (isSliding) return;
var eventTarget = e.currentTarget || e.srcElement;
if ( eventTarget === rightArrow ) {
index++;
} else if ( eventTarget === leftArrow ) {
index--;
}
self.slideTo( index ); //Do the slide
},
keyHandler = function (e) {
if (isSliding) return;
switch (e.which) {
case 39:
index++;
break;
case 37:
index--;
break;
default: return;
}
self.slideTo( index ); //Do the slide
},
// private methods
isElementInScrollRange = function () {
var rect = element[getBoundingClientRect](),
viewportHeight = globalObject[innerHeight] || HTML[clientHeight]
return rect[top] <= viewportHeight && rect[bottom] >= 0; // bottom && top
},
setActivePage = function( pageIndex ) { //indicators
for ( var i = 0, icl = indicators[length]; i < icl; i++ ) {
removeClass(indicators[i],active);
}
if (indicators[pageIndex]) addClass(indicators[pageIndex], active);
};
// public methods
this.cycle = function() {
timer = setInterval(function() {
isElementInScrollRange() && (index++, self.slideTo( index ) );
}, this[interval]);
};
this.slideTo = function( next ) {
if (isSliding) return; // when controled via methods, make sure to check again
var activeItem = this.getActiveIndex(), // the current active
orientation;
// determine slideDirection first
if ( (activeItem < next ) || (activeItem === 0 && next === total -1 ) ) {
slideDirection = self[direction] = left; // next
} else if ( (activeItem > next) || (activeItem === total - 1 && next === 0 ) ) {
slideDirection = self[direction] = right; // prev
}
// find the right next index
if ( next < 0 ) { next = total - 1; }
else if ( next === total ){ next = 0; }
// update index
index = next;
orientation = slideDirection === left ? 'next' : 'prev'; //determine type
bootstrapCustomEvent.call(element, slideEvent, component, slides[next]); // here we go with the slide
isSliding = true;
clearInterval(timer);
setActivePage( next );
if ( supportTransitions && hasClass(element,'slide') ) {
addClass(slides[next],orientation);
slides[next][offsetWidth];
addClass(slides[next],slideDirection);
addClass(slides[activeItem],slideDirection);
one(slides[activeItem], transitionEndEvent, function(e) {
var timeout = e[target] !== slides[activeItem] ? e.elapsedTime*1000 : 0;
setTimeout(function(){
isSliding = false;
addClass(slides[next],active);
removeClass(slides[activeItem],active);
removeClass(slides[next],orientation);
removeClass(slides[next],slideDirection);
removeClass(slides[activeItem],slideDirection);
bootstrapCustomEvent.call(element, slidEvent, component, slides[next]);
if ( self[interval] && !hasClass(element,paused) ) {
self.cycle();
}
},timeout+100);
});
} else {
addClass(slides[next],active);
slides[next][offsetWidth];
removeClass(slides[activeItem],active);
setTimeout(function() {
isSliding = false;
if ( self[interval] && !hasClass(element,paused) ) {
self.cycle();
}
bootstrapCustomEvent.call(element, slidEvent, component, slides[next]); // here we go with the slid event
}, 100 );
}
};
this.getActiveIndex = function () {
return slides[indexOf](getElementsByClassName(element,'item active')[0]) || 0;
};
// init
if ( !(stringCarousel in element ) ) { // prevent adding event handlers twice
if ( self[pause] && self[interval] ) {
on( element, mouseHover[0], pauseHandler );
on( element, mouseHover[1], resumeHandler );
on( element, 'touchstart', pauseHandler );
on( element, 'touchend', resumeHandler );
}
rightArrow && on( rightArrow, clickEvent, controlsHandler );
leftArrow && on( leftArrow, clickEvent, controlsHandler );
indicator && on( indicator, clickEvent, indicatorHandler );
self[keyboard] && on( globalObject, keydownEvent, keyHandler );
}
if (self.getActiveIndex()<0) {
slides[length] && addClass(slides[0],active);
indicators[length] && setActivePage(0);
}
if ( self[interval] ){ self.cycle(); }
element[stringCarousel] = self;
};
// CAROUSEL DATA API
// =================
supports[push]( [ stringCarousel, Carousel, '['+dataRide+'="carousel"]' ] );
/* Native Javascript for Bootstrap 3 | Collapse
-----------------------------------------------*/
// COLLAPSE DEFINITION
// ===================
var Collapse = function( element, options ) {
// initialization element
element = queryElement(element);
// set options
options = options || {};
// event targets and constants
var accordion = null, collapse = null, self = this,
isAnimating = false, // when true it will prevent click handlers
accordionData = element[getAttribute]('data-parent'),
// component strings
component = 'collapse',
collapsed = 'collapsed',
// private methods
openAction = function(collapseElement,toggle) {
bootstrapCustomEvent.call(collapseElement, showEvent, component);
isAnimating = true;
addClass(collapseElement,collapsing);
removeClass(collapseElement,component);
collapseElement[style][height] = collapseElement[scrollHeight] + 'px';
emulateTransitionEnd(collapseElement, function() {
isAnimating = false;
collapseElement[setAttribute](ariaExpanded,'true');
toggle[setAttribute](ariaExpanded,'true');
removeClass(collapseElement,collapsing);
addClass(collapseElement, component);
addClass(collapseElement, inClass);
collapseElement[style][height] = '';
bootstrapCustomEvent.call(collapseElement, shownEvent, component);
});
},
closeAction = function(collapseElement,toggle) {
bootstrapCustomEvent.call(collapseElement, hideEvent, component);
isAnimating = true;
collapseElement[style][height] = collapseElement[scrollHeight] + 'px'; // set height first
removeClass(collapseElement,component);
removeClass(collapseElement, inClass);
addClass(collapseElement, collapsing);
collapseElement[offsetWidth]; // force reflow to enable transition
collapseElement[style][height] = '0px';
emulateTransitionEnd(collapseElement, function() {
isAnimating = false;
collapseElement[setAttribute](ariaExpanded,'false');
toggle[setAttribute](ariaExpanded,'false');
removeClass(collapseElement,collapsing);
addClass(collapseElement,component);
collapseElement[style][height] = '';
bootstrapCustomEvent.call(collapseElement, hiddenEvent, component);
});
},
getTarget = function() {
var href = element.href && element[getAttribute]('href'),
parent = element[getAttribute](dataTarget),
id = href || ( parent && parent.charAt(0) === '#' ) && parent;
return id && queryElement(id);
};
// public methods
this.toggle = function(e) {
e[preventDefault]();
if ( isAnimating ) return;
if (!hasClass(collapse,inClass)) { self.show(); }
else { self.hide(); }
};
this.hide = function() {
closeAction(collapse,element);
addClass(element,collapsed);
};
this.show = function() {
if ( accordion ) {
var activeCollapse = queryElement('.'+component+'.'+inClass,accordion),
toggle = activeCollapse && (queryElement('['+dataToggle+'="'+component+'"]['+dataTarget+'="#'+activeCollapse.id+'"]',accordion)
|| queryElement('['+dataToggle+'="'+component+'"][href="#'+activeCollapse.id+'"]',accordion) ),
correspondingCollapse = toggle && (toggle[getAttribute](dataTarget) || toggle.href);
if ( activeCollapse && toggle && activeCollapse !== collapse ) {
closeAction(activeCollapse,toggle);
if ( correspondingCollapse.split('#')[1] !== collapse.id ) { addClass(toggle,collapsed); }
else { removeClass(toggle,collapsed); }
}
}
openAction(collapse,element);
removeClass(element,collapsed);
};
// init
if ( !(stringCollapse in element ) ) { // prevent adding event handlers twice
on(element, clickEvent, self.toggle);
}
collapse = getTarget();
accordion = queryElement(options.parent) || accordionData && getClosest(element, accordionData);
element[stringCollapse] = self;
};
// COLLAPSE DATA API
// =================
supports[push]( [ stringCollapse, Collapse, '['+dataToggle+'="collapse"]' ] );
/* Native Javascript for Bootstrap 3 | Dropdown
----------------------------------------------*/
// DROPDOWN DEFINITION
// ===================
var Dropdown = function( element, option ) {
// initialization element
element = queryElement(element);
// set option
this.persist = option === true || element[getAttribute]('data-persist') === 'true' || false;
// constants, event targets, strings
var self = this, children = 'children',
parent = element[parentNode],
component = 'dropdown', open = 'open',
relatedTarget = null,
menu = queryElement('.dropdown-menu', parent),
menuItems = (function(){
var set = menu[children], newSet = [];
for ( var i=0; i<set[length]; i++ ){
set[i][children][length] && (set[i][children][0].tagName === 'A' && newSet[push](set[i]));
}
return newSet;
})(),
// preventDefault on empty anchor links
preventEmptyAnchor = function(anchor){
(anchor.href && anchor.href.slice(-1) === '#' || anchor[parentNode] && anchor[parentNode].href
&& anchor[parentNode].href.slice(-1) === '#') && this[preventDefault]();
},
// toggle dismissible events
toggleDismiss = function(){
var type = element[open] ? on : off;
type(DOC, clickEvent, dismissHandler);
type(DOC, keydownEvent, preventScroll);
type(DOC, keyupEvent, keyHandler);
},
// handlers
dismissHandler = function(e) {
var eventTarget = e[target], hasData = eventTarget && (stringDropdown in eventTarget || stringDropdown in eventTarget[parentNode]);
if ( (eventTarget === menu || menu[contains](eventTarget)) && (self.persist || hasData) ) { return; }
else {
relatedTarget = eventTarget === element || element[contains](eventTarget) ? element : null;
hide();
}
preventEmptyAnchor.call(e,eventTarget);
},
clickHandler = function(e) {
relatedTarget = element;
show();
preventEmptyAnchor.call(e,e[target]);
},
preventScroll = function(e){
var key = e.which || e.keyCode;
if( key === 38 || key === 40 ) { e[preventDefault](); }
},
keyHandler = function(e){
var key = e.which || e.keyCode,
activeItem = DOC.activeElement,
idx = menuItems[indexOf](activeItem[parentNode]),
isSameElement = activeItem === element,
isInsideMenu = menu[contains](activeItem),
isMenuItem = activeItem[parentNode][parentNode] === menu;
if ( isMenuItem || isSameElement ) { // navigate up | down
idx = isSameElement ? 0
: key === 38 ? (idx>1?idx-1:0)
: key === 40 ? (idx<menuItems[length]-1?idx+1:idx) : idx;
menuItems[idx] && setFocus(menuItems[idx][children][0]);
}
if ( (menuItems[length] && isMenuItem // menu has items
|| !menuItems[length] && (isInsideMenu || isSameElement) // menu might be a form
|| !isInsideMenu ) // or the focused element is not in the menu at all
&& element[open] && key === 27 // menu must be open
) {
self.toggle();
relatedTarget = null;
}
},
// private methods
show = function() {
bootstrapCustomEvent.call(parent, showEvent, component, relatedTarget);
addClass(parent,open);
menu[setAttribute](ariaExpanded,true);
bootstrapCustomEvent.call(parent, shownEvent, component, relatedTarget);
element[open] = true;
off(element, clickEvent, clickHandler);
setTimeout(function(){
setFocus( menu[getElementsByTagName]('INPUT')[0] || element ); // focus the first input item | element
toggleDismiss();
},1);
},
hide = function() {
bootstrapCustomEvent.call(parent, hideEvent, component, relatedTarget);
removeClass(parent,open);
menu[setAttribute](ariaExpanded,false);
bootstrapCustomEvent.call(parent, hiddenEvent, component, relatedTarget);
element[open] = false;
toggleDismiss();
setFocus(element);
setTimeout(function(){ on(element, clickEvent, clickHandler); },1);
};
// set initial state to closed
element[open] = false;
// public methods
this.toggle = function() {
if (hasClass(parent,open) && element[open]) { hide(); }
else { show(); }
};
// init
if (!(stringDropdown in element)) { // prevent adding event handlers twice
!tabindex in menu && menu[setAttribute](tabindex, '0'); // Fix onblur on Chrome | Safari
on(element, clickEvent, clickHandler);
}
element[stringDropdown] = self;
};
// DROPDOWN DATA API
// =================
supports[push]( [stringDropdown, Dropdown, '['+dataToggle+'="dropdown"]'] );
/* Native Javascript for Bootstrap 3 | Modal
-------------------------------------------*/
// MODAL DEFINITION
// ===============
var Modal = function(element, options) { // element can be the modal/triggering button
// the modal (both JavaScript / DATA API init) / triggering button element (DATA API)
element = queryElement(element);
// determine modal, triggering element
var btnCheck = element[getAttribute](dataTarget)||element[getAttribute]('href'),
checkModal = queryElement( btnCheck ),
modal = hasClass(element,'modal') ? element : checkModal,
// strings
component = 'modal',
staticString = 'static',
paddingLeft = 'paddingLeft',
paddingRight = 'paddingRight',
modalBackdropString = 'modal-backdrop';
if ( hasClass(element,'modal') ) { element = null; } // modal is now independent of it's triggering element
if ( !modal ) { return; } // invalidate
// set options
options = options || {};
this[keyboard] = options[keyboard] === false || modal[getAttribute](dataKeyboard) === 'false' ? false : true;
this[backdrop] = options[backdrop] === staticString || modal[getAttribute](databackdrop) === staticString ? staticString : true;
this[backdrop] = options[backdrop] === false || modal[getAttribute](databackdrop) === 'false' ? false : this[backdrop];
this[content] = options[content]; // JavaScript only
// bind, constants, event targets and other vars
var self = this, relatedTarget = null,
bodyIsOverflowing, modalIsOverflowing, scrollbarWidth, overlay,
// also find fixed-top / fixed-bottom items
fixedItems = getElementsByClassName(HTML,fixedTop).concat(getElementsByClassName(HTML,fixedBottom)),
// private methods
getWindowWidth = function() {
var htmlRect = HTML[getBoundingClientRect]();
return globalObject[innerWidth] || (htmlRect[right] - Math.abs(htmlRect[left]));
},
setScrollbar = function () {
var bodyStyle = DOC[body].currentStyle || globalObject.getComputedStyle(DOC[body]),
bodyPad = parseInt((bodyStyle[paddingRight]), 10), itemPad;
if (bodyIsOverflowing) {
DOC[body][style][paddingRight] = (bodyPad + scrollbarWidth) + 'px';
if (fixedItems[length]){
for (var i = 0; i < fixedItems[length]; i++) {
itemPad = (fixedItems[i].currentStyle || globalObject.getComputedStyle(fixedItems[i]))[paddingRight];
fixedItems[i][style][paddingRight] = ( parseInt(itemPad) + scrollbarWidth) + 'px';
}
}
}
},
resetScrollbar = function () {
DOC[body][style][paddingRight] = '';
if (fixedItems[length]){
for (var i = 0; i < fixedItems[length]; i++) {
fixedItems[i][style][paddingRight] = '';
}
}
},
measureScrollbar = function () { // thx walsh
var scrollDiv = DOC[createElement]('div'), scrollBarWidth;
scrollDiv.className = component+'-scrollbar-measure'; // this is here to stay
DOC[body][appendChild](scrollDiv);
scrollBarWidth = scrollDiv[offsetWidth] - scrollDiv[clientWidth];
DOC[body].removeChild(scrollDiv);
return scrollBarWidth;
},
checkScrollbar = function () {
bodyIsOverflowing = DOC[body][clientWidth] < getWindowWidth();
modalIsOverflowing = modal[scrollHeight] > HTML[clientHeight];
scrollbarWidth = measureScrollbar();
},
adjustDialog = function () {
modal[style][paddingLeft] = !bodyIsOverflowing && modalIsOverflowing ? scrollbarWidth + 'px' : '';
modal[style][paddingRight] = bodyIsOverflowing && !modalIsOverflowing ? scrollbarWidth + 'px' : '';
},
resetAdjustments = function () {
modal[style][paddingLeft] = '';
modal[style][paddingRight] = '';
},
createOverlay = function() {
modalOverlay = 1;
var newOverlay = DOC[createElement]('div');
overlay = queryElement('.'+modalBackdropString);
if ( overlay === null ) {
newOverlay[setAttribute]('class',modalBackdropString+' fade');
overlay = newOverlay;
DOC[body][appendChild](overlay);
}
},
removeOverlay = function() {
overlay = queryElement('.'+modalBackdropString);
if ( overlay && overlay !== null && typeof overlay === 'object' ) {
modalOverlay = 0;
DOC[body].removeChild(overlay); overlay = null;
}
bootstrapCustomEvent.call(modal, hiddenEvent, component);
},
keydownHandlerToggle = function() {
if (hasClass(modal,inClass)) {
on(DOC, keydownEvent, keyHandler);
} else {
off(DOC, keydownEvent, keyHandler);
}
},
resizeHandlerToggle = function() {
if (hasClass(modal,inClass)) {
on(globalObject, resizeEvent, self.update);
} else {
off(globalObject, resizeEvent, self.update);
}
},
dismissHandlerToggle = function() {
if (hasClass(modal,inClass)) {
on(modal, clickEvent, dismissHandler);
} else {
off(modal, clickEvent, dismissHandler);
}
},
// triggers
triggerShow = function() {
setFocus(modal);
bootstrapCustomEvent.call(modal, shownEvent, component, relatedTarget);
},
triggerHide = function() {
modal[style].display = '';
element && (setFocus(element));
(function(){
if (!getElementsByClassName(DOC,component+' '+inClass)[0]) {
resetAdjustments();
resetScrollbar();
removeClass(DOC[body],component+'-open');
overlay && hasClass(overlay,'fade') ? (removeClass(overlay,inClass), emulateTransitionEnd(overlay,removeOverlay))
: removeOverlay();
resizeHandlerToggle();
dismissHandlerToggle();
keydownHandlerToggle();
}
}());
},
// handlers
clickHandler = function(e) {
var clickTarget = e[target];
clickTarget = clickTarget[hasAttribute](dataTarget) || clickTarget[hasAttribute]('href') ? clickTarget : clickTarget[parentNode];
if ( clickTarget === element && !hasClass(modal,inClass) ) {
modal.modalTrigger = element;
relatedTarget = element;
self.show();
e[preventDefault]();
}
},
keyHandler = function(e) {
var key = e.which || e.keyCode; // keyCode for IE8
if (self[keyboard] && key == 27 && hasClass(modal,inClass)) {
self.hide();
}
},
dismissHandler = function(e) {
var clickTarget = e[target];
if ( hasClass(modal,inClass) && (clickTarget[parentNode][getAttribute](dataDismiss) === component
|| clickTarget[getAttribute](dataDismiss) === component
|| (clickTarget === modal && self[backdrop] !== staticString) ) ) {
self.hide(); relatedTarget = null;
e[preventDefault]();
}
};
// public methods
this.toggle = function() {
if ( hasClass(modal,inClass) ) {this.hide();} else {this.show();}
};
this.show = function() {
bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget);
// we elegantly hide any opened modal
var currentOpen = getElementsByClassName(DOC,component+' in')[0];
currentOpen && currentOpen !== modal && currentOpen.modalTrigger[stringModal].hide();
if ( this[backdrop] ) {
!modalOverlay && createOverlay();
}
if ( overlay && modalOverlay && !hasClass(overlay,inClass)) {
overlay[offsetWidth]; // force reflow to enable trasition
addClass(overlay,inClass);
}
(function() {
modal[style].display = 'block';
checkScrollbar();
setScrollbar();
adjustDialog();
addClass(DOC[body],component+'-open');
addClass(modal,inClass);
modal[setAttribute](ariaHidden, false);
resizeHandlerToggle();
dismissHandlerToggle();
keydownHandlerToggle();
hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow();
}());
};
this.hide = function() {
bootstrapCustomEvent.call(modal, hideEvent, component);
overlay = queryElement('.'+modalBackdropString);
removeClass(modal,inClass);
modal[setAttribute](ariaHidden, true);
setTimeout(function(){
hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide();
}, supportTransitions ? 150 : 0);
};
this.setContent = function( content ) {
queryElement('.'+component+'-content',modal)[innerHTML] = content;
};
this.update = function() {
if (hasClass(modal,inClass)) {
checkScrollbar();
setScrollbar();
adjustDialog();
}
};
// init
// prevent adding event handlers over and over
// modal is independent of a triggering element
if ( !!element && !(stringModal in element) ) {
on(element, clickEvent, clickHandler);
}
if ( !!self[content] ) { self.setContent( self[content] ); }
!!element && (element[stringModal] = self);
};
// DATA API
supports[push]( [ stringModal, Modal, '['+dataToggle+'="modal"]' ] );
/* Native Javascript for Bootstrap 3 | Popover
----------------------------------------------*/
// POPOVER DEFINITION
// ==================
var Popover = function( element, options ) {
// initialization element
element = queryElement(element);
// set options
options = options || {};
// DATA API
var triggerData = element[getAttribute](dataTrigger), // click / hover / focus
animationData = element[getAttribute](dataAnimation), // true / false
placementData = element[getAttribute](dataPlacement),
dismissibleData = element[getAttribute](dataDismissible),
delayData = element[getAttribute](dataDelay),
containerData = element[getAttribute](dataContainer),
// internal strings
component = 'popover',
template = 'template',
trigger = 'trigger',
classString = 'class',
div = 'div',
fade = 'fade',
content = 'content',
dataContent = 'data-content',
dismissible = 'dismissible',
closeBtn = '<button type="button" class="close">×</button>',
// check container
containerElement = queryElement(options[container]),
containerDataElement = queryElement(containerData),
// maybe the element is inside a modal
modal = getClosest(element,'.modal'),
// maybe the element is inside a fixed navbar
navbarFixedTop = getClosest(element,'.'+fixedTop),
navbarFixedBottom = getClosest(element,'.'+fixedBottom);
// set instance options
this[template] = options[template] ? options[template] : null; // JavaScript only
this[trigger] = options[trigger] ? options[trigger] : triggerData || hoverEvent;
this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
this[placement] = options[placement] ? options[placement] : placementData || top;
this[delay] = parseInt(options[delay] || delayData) || 200;
this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false;
this[container] = containerElement ? containerElement
: containerDataElement ? containerDataElement
: navbarFixedTop ? navbarFixedTop
: navbarFixedBottom ? navbarFixedBottom
: modal ? modal : DOC[body];
// bind, content
var self = this,
titleString = element[getAttribute](dataTitle) || null,
contentString = element[getAttribute](dataContent) || null;
if ( !contentString && !this[template] ) return; // invalidate
// constants, vars
var popover = null, timer = 0, placementSetting = this[placement],
// handlers
dismissibleHandler = function(e) {
if (popover !== null && e[target] === queryElement('.close',popover)) {
self.hide();
}
},
// private methods
removePopover = function() {
self[container].removeChild(popover);
timer = null; popover = null;
},
createPopover = function() {
titleString = element[getAttribute](dataTitle); // check content again
contentString = element[getAttribute](dataContent);
popover = DOC[createElement](div);
if ( contentString !== null && self[template] === null ) { //create the popover from data attributes
popover[setAttribute]('role','tooltip');
if (titleString !== null) {
var popoverTitle = DOC[createElement]('h3');
popoverTitle[setAttribute](classString,component+'-title');
popoverTitle[innerHTML] = self[dismissible] ? titleString + closeBtn : titleString;
popover[appendChild](popoverTitle);
}
var popoverArrow = DOC[createElement](div), popoverContent = DOC[createElement](div);
popoverArrow[setAttribute](classString,'arrow'); popoverContent[setAttribute](classString,component+'-content');
popover[appendChild](popoverArrow); popover[appendChild](popoverContent);
//set popover content
popoverContent[innerHTML] = self[dismissible] && titleString === null ? contentString + closeBtn : contentString;
} else { // or create the popover from template
var popoverTemplate = DOC[createElement](div);
popoverTemplate[innerHTML] = self[template];
popover[innerHTML] = popoverTemplate.firstChild[innerHTML];
}
//append to the container
self[container][appendChild](popover);
popover[style].display = 'block';
popover[setAttribute](classString, component+ ' ' + placementSetting + ' ' + self[animation]);
},
showPopover = function () {
!hasClass(popover,inClass) && ( addClass(popover,inClass) );
},
updatePopover = function() {
styleTip(element,popover,placementSetting,self[container]);
},
// event toggle
dismissHandlerToggle = function(type){
if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
!self[dismissible] && type( element, 'blur', self.hide );
}
self[dismissible] && type( DOC, clickEvent, dismissibleHandler );
!isIE8 && type( globalObject, resizeEvent, self.hide );
},
// triggers
showTrigger = function() {
dismissHandlerToggle(on);
bootstrapCustomEvent.call(element, shownEvent, component);
},
hideTrigger = function() {
dismissHandlerToggle(off);
removePopover();
bootstrapCustomEvent.call(element, hiddenEvent, component);
};
// public methods / handlers
this.toggle = function() {
if (popover === null) { self.show(); }
else { self.hide(); }
};
this.show = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (popover === null) {
placementSetting = self[placement]; // we reset placement in all cases
createPopover();
updatePopover();
showPopover();
bootstrapCustomEvent.call(element, showEvent, component);
!!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger();
}
}, 20 );
};
this.hide = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (popover && popover !== null && hasClass(popover,inClass)) {
bootstrapCustomEvent.call(element, hideEvent, component);
removeClass(popover,inClass);
!!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger();
}
}, self[delay] );
};
// init
if ( !(stringPopover in element) ) { // prevent adding event handlers twice
if (self[trigger] === hoverEvent) {
on( element, mouseHover[0], self.show );
if (!self[dismissible]) { on( element, mouseHover[1], self.hide ); }
} else if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
on( element, self[trigger], self.toggle );
}
}
element[stringPopover] = self;
};
// POPOVER DATA API
// ================
supports[push]( [ stringPopover, Popover, '['+dataToggle+'="popover"]' ] );
/* Native Javascript for Bootstrap 3 | ScrollSpy
-----------------------------------------------*/
// SCROLLSPY DEFINITION
// ====================
var ScrollSpy = function(element, options) {
// initialization element, the element we spy on
element = queryElement(element);
// DATA API
var targetData = queryElement(element[getAttribute](dataTarget)),
offsetData = element[getAttribute]('data-offset');
// set options
options = options || {};
if ( !options[target] && !targetData ) { return; } // invalidate
// event targets, constants
var self = this, spyTarget = options[target] && queryElement(options[target]) || targetData,
links = spyTarget && spyTarget[getElementsByTagName]('A'),
offset = parseInt(offsetData || options['offset']) || 10,
items = [], targetItems = [], scrollOffset,
scrollTarget = element[offsetHeight] < element[scrollHeight] ? element : globalObject, // determine which is the real scrollTarget
isWindow = scrollTarget === globalObject;
// populate items and targets
for (var i=0, il=links[length]; i<il; i++) {
var href = links[i][getAttribute]('href'),
targetItem = href && href.charAt(0) === '#' && href.slice(-1) !== '#' && queryElement(href);
if ( !!targetItem ) {
items[push](links[i]);
targetItems[push](targetItem);
}
}
// private methods
var updateItem = function(index) {
var parent = items[index][parentNode], // item's parent LI element
targetItem = targetItems[index], // the menu item targets this element
dropdown = getClosest(parent,'.dropdown'),
targetRect = isWindow && targetItem[getBoundingClientRect](),
isActive = hasClass(parent,active) || false,
topEdge = (isWindow ? targetRect[top] + scrollOffset : targetItem[offsetTop]) - offset,
bottomEdge = isWindow ? targetRect[bottom] + scrollOffset - offset : targetItems[index+1] ? targetItems[index+1][offsetTop] - offset : element[scrollHeight],
inside = scrollOffset >= topEdge && bottomEdge > scrollOffset;
if ( !isActive && inside ) {
if ( parent.tagName === 'LI' && !hasClass(parent,active) ) {
addClass(parent,active);
if (dropdown && !hasClass(dropdown,active) ) {
addClass(dropdown,active);
}
bootstrapCustomEvent.call(element, 'activate', 'scrollspy', items[index]);
}
} else if ( !inside ) {
if ( parent.tagName === 'LI' && hasClass(parent,active) ) {
removeClass(parent,active);
if (dropdown && hasClass(dropdown,active) && !getElementsByClassName(parent[parentNode],active).length ) {
removeClass(dropdown,active);
}
}
} else if ( !inside && !isActive || isActive && inside ) {
return;
}
},
updateItems = function(){
scrollOffset = isWindow ? getScroll().y : element[scrollTop];
for (var index=0, itl=items[length]; index<itl; index++) {
updateItem(index)
}
};
// public method
this.refresh = function () {
updateItems();
}
// init
if ( !(stringScrollSpy in element) ) { // prevent adding event handlers twice
on( scrollTarget, scrollEvent, self.refresh );
!isIE8 && on( globalObject, resizeEvent, self.refresh );
}
self.refresh();
element[stringScrollSpy] = self;
};
// SCROLLSPY DATA API
// ==================
supports[push]( [ stringScrollSpy, ScrollSpy, '['+dataSpy+'="scroll"]' ] );
/* Native Javascript for Bootstrap 3 | Tab
-----------------------------------------*/
// TAB DEFINITION
// ==============
var Tab = function( element, options ) {
// initialization element
element = queryElement(element);
// DATA API
var heightData = element[getAttribute](dataHeight),
// strings
component = 'tab', height = 'height', float = 'float', isAnimating = 'isAnimating';
// set options
options = options || {};
this[height] = supportTransitions ? (options[height] || heightData === 'true') : false; // filter legacy browsers
// bind, event targets
var self = this, next,
tabs = getClosest(element,'.nav'),
tabsContentContainer = false,
dropdown = tabs && queryElement('.dropdown',tabs),
activeTab, activeContent, nextContent, containerHeight, equalContents, nextHeight,
// trigger
triggerEnd = function(){
tabsContentContainer[style][height] = '';
removeClass(tabsContentContainer,collapsing);
tabs[isAnimating] = false;
},
triggerShow = function() {
if (tabsContentContainer) { // height animation
if ( equalContents ) {
triggerEnd();
} else {
setTimeout(function(){ // enables height animation
tabsContentContainer[style][height] = nextHeight + 'px'; // height animation
tabsContentContainer[offsetWidth];
emulateTransitionEnd(tabsContentContainer, triggerEnd);
},1);
}
} else {
tabs[isAnimating] = false;
}
bootstrapCustomEvent.call(next, shownEvent, component, activeTab);
},
triggerHide = function() {
if (tabsContentContainer) {
activeContent[style][float] = left;
nextContent[style][float] = left;
containerHeight = activeContent[scrollHeight];
}
addClass(nextContent,active);
bootstrapCustomEvent.call(next, showEvent, component, activeTab);
removeClass(activeContent,active);
bootstrapCustomEvent.call(activeTab, hiddenEvent, component, next);
if (tabsContentContainer) {
nextHeight = nextContent[scrollHeight];
equalContents = nextHeight === containerHeight;
addClass(tabsContentContainer,collapsing);
tabsContentContainer[style][height] = containerHeight + 'px'; // height animation
tabsContentContainer[offsetHeight];
activeContent[style][float] = '';
nextContent[style][float] = '';
}
if ( hasClass(nextContent, 'fade') ) {
setTimeout(function(){ // makes sure to go forward
addClass(nextContent,inClass);
emulateTransitionEnd(nextContent,triggerShow);
},20);
} else { triggerShow(); }
};
if (!tabs) return; // invalidate
// set default animation state
tabs[isAnimating] = false;
// private methods
var getActiveTab = function() {
var activeTabs = getElementsByClassName(tabs,active), activeTab;
if ( activeTabs[length] === 1 && !hasClass(activeTabs[0],'dropdown') ) {
activeTab = activeTabs[0];
} else if ( activeTabs[length] > 1 ) {
activeTab = activeTabs[activeTabs[length]-1];
}
return activeTab[getElementsByTagName]('A')[0];
},
getActiveContent = function() {
return queryElement(getActiveTab()[getAttribute]('href'));
},
// handler
clickHandler = function(e) {
var href = e[target][getAttribute]('href');
e[preventDefault]();
next = e[target][getAttribute](dataToggle) === component || (href && href.charAt(0) === '#')
? e[target] : e[target][parentNode]; // allow for child elements like icons to use the handler
!tabs[isAnimating] && !hasClass(next[parentNode],active) && self.show();
};
// public method
this.show = function() { // the tab we clicked is now the next tab
next = next || element;
nextContent = queryElement(next[getAttribute]('href')); //this is the actual object, the next tab content to activate
activeTab = getActiveTab();
activeContent = getActiveContent();
tabs[isAnimating] = true;
removeClass(activeTab[parentNode],active);
addClass(next[parentNode],active);
if ( dropdown ) {
if ( !hasClass(element[parentNode][parentNode],'dropdown-menu') ) {
if (hasClass(dropdown,active)) removeClass(dropdown,active);
} else {
if (!hasClass(dropdown,active)) addClass(dropdown,active);
}
}
bootstrapCustomEvent.call(activeTab, hideEvent, component, next);
if (hasClass(activeContent, 'fade')) {
removeClass(activeContent,inClass);
emulateTransitionEnd(activeContent, triggerHide);
} else { triggerHide(); }
};
// init
if ( !(stringTab in element) ) { // prevent adding event handlers twice
on(element, clickEvent, clickHandler);
}
if (self[height]) { tabsContentContainer = getActiveContent()[parentNode]; }
element[stringTab] = self;
};
// TAB DATA API
// ============
supports[push]( [ stringTab, Tab, '['+dataToggle+'="tab"]' ] );
/* Native Javascript for Bootstrap 3 | Tooltip
---------------------------------------------*/
// TOOLTIP DEFINITION
// ==================
var Tooltip = function( element,options ) {
// initialization element
element = queryElement(element);
// set options
options = options || {};
// DATA API
var animationData = element[getAttribute](dataAnimation),
placementData = element[getAttribute](dataPlacement),
delayData = element[getAttribute](dataDelay),
containerData = element[getAttribute](dataContainer),
// strings
component = 'tooltip',
classString = 'class',
title = 'title',
fade = 'fade',
div = 'div',
// check container
containerElement = queryElement(options[container]),
containerDataElement = queryElement(containerData),
// maybe the element is inside a modal
modal = getClosest(element,'.modal'),
// maybe the element is inside a fixed navbar
navbarFixedTop = getClosest(element,'.'+fixedTop),
navbarFixedBottom = getClosest(element,'.'+fixedBottom);
// set instance options
this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
this[placement] = options[placement] ? options[placement] : placementData || top;
this[delay] = parseInt(options[delay] || delayData) || 200;
this[container] = containerElement ? containerElement
: containerDataElement ? containerDataElement
: navbarFixedTop ? navbarFixedTop
: navbarFixedBottom ? navbarFixedBottom
: modal ? modal : DOC[body];
// bind, event targets, title and constants
var self = this, timer = 0, placementSetting = this[placement], tooltip = null,
titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle);
if ( !titleString || titleString == "" ) return; // invalidate
// private methods
var removeToolTip = function() {
self[container].removeChild(tooltip);
tooltip = null; timer = null;
},
createToolTip = function() {
titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle); // read the title again
if ( !titleString || titleString == "" ) return false; // invalidate
tooltip = DOC[createElement](div);
tooltip[setAttribute]('role',component);
var tooltipArrow = DOC[createElement](div), tooltipInner = DOC[createElement](div);
tooltipArrow[setAttribute](classString, component+'-arrow'); tooltipInner[setAttribute](classString,component+'-inner');
tooltip[appendChild](tooltipArrow); tooltip[appendChild](tooltipInner);
tooltipInner[innerHTML] = titleString;
self[container][appendChild](tooltip);
tooltip[setAttribute](classString, component + ' ' + placementSetting + ' ' + self[animation]);
},
updateTooltip = function () {
styleTip(element,tooltip,placementSetting,self[container]);
},
showTooltip = function () {
!hasClass(tooltip,inClass) && ( addClass(tooltip,inClass) );
},
// triggers
showTrigger = function() {
bootstrapCustomEvent.call(element, shownEvent, component);
!isIE8 && on( globalObject, resizeEvent, self.hide );
},
hideTrigger = function() {
!isIE8 && off( globalObject, resizeEvent, self.hide );
removeToolTip();
bootstrapCustomEvent.call(element, hiddenEvent, component);
};
// public methods
this.show = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (tooltip === null) {
placementSetting = self[placement]; // we reset placement in all cases
if(createToolTip() == false) return;
updateTooltip();
showTooltip();
bootstrapCustomEvent.call(element, showEvent, component);
!!self[animation] ? emulateTransitionEnd(tooltip, showTrigger) : showTrigger();
}
}, 20 );
};
this.hide = function() {
clearTimeout(timer);
timer = setTimeout( function() {
if (tooltip && hasClass(tooltip,inClass)) {
bootstrapCustomEvent.call(element, hideEvent, component);
removeClass(tooltip,inClass);
!!self[animation] ? emulateTransitionEnd(tooltip, hideTrigger) : hideTrigger();
}
}, self[delay]);
};
this.toggle = function() {
if (!tooltip) { self.show(); }
else { self.hide(); }
};
// init
if ( !(stringTooltip in element) ) { // prevent adding event handlers twice
element[setAttribute](dataOriginalTitle,titleString);
element.removeAttribute(title);
on(element, mouseHover[0], self.show);
on(element, mouseHover[1], self.hide);
}
element[stringTooltip] = self;
};
// TOOLTIP DATA API
// =================
supports[push]( [ stringTooltip, Tooltip, '['+dataToggle+'="tooltip"]' ] );
/* Native Javascript for Bootstrap 3 | Initialize Data API
--------------------------------------------------------*/
var initializeDataAPI = function( constructor, collection ){
for (var i=0, l=collection[length]; i<l; i++) {
new constructor(collection[i]);
}
},
initCallback = BSN.initCallback = function(lookUp){
lookUp = lookUp || DOC;
for (var i=0, l=supports[length]; i<l; i++) {
initializeDataAPI( supports[i][1], lookUp[querySelectorAll] (supports[i][2]) );
}
};
// bulk initialize all components
DOC[body] ? initCallback() : on( DOC, 'DOMContentLoaded', function(){ initCallback(); } );
return {
Affix: Affix,
Alert: Alert,
Button: Button,
Carousel: Carousel,
Collapse: Collapse,
Dropdown: Dropdown,
Modal: Modal,
Popover: Popover,
ScrollSpy: ScrollSpy,
Tab: Tab,
Tooltip: Tooltip
};
}));
// Native Javascript for Bootstrap 3 v2.0.23 | © dnp_theme | MIT-License
!function(t,n){if("function"==typeof define&&define.amd)define([],n);else if("object"==typeof module&&module.exports)module.exports=n();else{var e=n();t.Affix=e.Affix,t.Alert=e.Alert,t.Button=e.Button,t.Carousel=e.Carousel,t.Collapse=e.Collapse,t.Dropdown=e.Dropdown,t.Modal=e.Modal,t.Popover=e.Popover,t.ScrollSpy=e.ScrollSpy,t.Tab=e.Tab,t.Tooltip=e.Tooltip}}(this,function(){"use strict";var t="undefined"!=typeof global?global:this||window,n=document,e=n.documentElement,i="body",o=t.BSN={},a=o.supports=[],l="data-toggle",r="data-dismiss",c="data-spy",u="data-ride",f="Affix",s="Alert",d="Button",h="Carousel",p="Collapse",v="Dropdown",m="Modal",g="Popover",w="ScrollSpy",b="Tab",y="Tooltip",x="data-backdrop",T="data-keyboard",C="data-target",A="data-interval",I="data-height",k="data-pause",L="data-title",N="data-original-title",S="data-original-text",E="data-dismissible",B="data-trigger",M="data-animation",D="data-container",P="data-placement",H="data-delay",O="data-offset-top",W="data-offset-bottom",j="backdrop",q="keyboard",z="delay",R="content",U="target",X="interval",Y="pause",F="animation",G="placement",J="container",K="offsetTop",Q="offsetBottom",V="offsetLeft",Z="scrollTop",$="scrollLeft",_="clientWidth",tt="clientHeight",nt="offsetWidth",et="offsetHeight",it="innerWidth",ot="innerHeight",at="scrollHeight",lt="height",rt="aria-expanded",ct="aria-hidden",ut="click",ft="hover",st="keydown",dt="keyup",ht="resize",pt="scroll",vt="show",mt="shown",gt="hide",wt="hidden",bt="close",yt="closed",xt="slid",Tt="slide",Ct="change",At="getAttribute",It="setAttribute",kt="hasAttribute",Lt="createElement",Nt="appendChild",St="innerHTML",Et="getElementsByTagName",Bt="preventDefault",Mt="getBoundingClientRect",Dt="querySelectorAll",Pt="getElementsByClassName",Ht="indexOf",Ot="parentNode",Wt="length",jt="toLowerCase",qt="Transition",zt="Webkit",Rt="style",Ut="push",Xt="tabindex",Yt="contains",Ft="active",Gt="in",Jt="collapsing",Kt="disabled",Qt="loading",Vt="left",Zt="right",$t="top",_t="bottom",tn=!("opacity"in e[Rt]),nn="onmouseleave"in n?["mouseenter","mouseleave"]:["mouseover","mouseout"],en=/\b(top|bottom|left|right)+/,on=0,an="navbar-fixed-top",ln="navbar-fixed-bottom",rn=zt+qt in e[Rt]||qt[jt]()in e[Rt],cn=zt+qt in e[Rt]?zt[jt]()+qt+"End":qt[jt]()+"end",un=function(t){t.focus?t.focus():t.setActive()},fn=function(t,n){t.classList.add(n)},sn=function(t,n){t.classList.remove(n)},dn=function(t,n){return t.classList[Yt](n)},hn=function(t){for(var n=[],e=0,i=t[Wt];e<i;e++)n[Ut](t[e]);return n},pn=function(t,n){var e=tn?Dt:Pt;return hn(t[e](tn?"."+n.replace(/\s(?=[a-z])/g,"."):n))},vn=function(t,e){var i=e?e:n;return"object"==typeof t?t:i.querySelector(t)},mn=function(t,e){var i=e.charAt(0),o=e.substr(1);if("."===i){for(;t&&t!==n;t=t[Ot])if(null!==vn(e,t[Ot])&&dn(t,o))return t}else if("#"===i)for(;t&&t!==n;t=t[Ot])if(t.id===o)return t;return!1},gn=function(t,n,e){t.addEventListener(n,e,!1)},wn=function(t,n,e){t.removeEventListener(n,e,!1)},bn=function(t,n,e){gn(t,n,function i(o){e(o),wn(t,n,i)})},yn=function(t,n){rn?bn(t,cn,function(t){n(t)}):n()},xn=function(t,n,e){var i=new CustomEvent(t+".bs."+n);i.relatedTarget=e,this.dispatchEvent(i)},Tn=function(){return{y:t.pageYOffset||e[Z],x:t.pageXOffset||e[$]}},Cn=function(t,o,a,l){var r,c,u,f,s={w:o[nt],h:o[et]},d=e[_]||n[i][_],h=e[tt]||n[i][tt],p=t[Mt](),v=l===n[i]?Tn():{x:l[V]+l[$],y:l[K]+l[Z]},m={w:p[Zt]-p[Vt],h:p[_t]-p[$t]},g=vn('[class*="arrow"]',o),w=p[$t]+m.h/2-s.h/2<0,b=p[Vt]+m.w/2-s.w/2<0,y=p[Vt]+s.w/2+m.w/2>=d,x=p[$t]+s.h/2+m.h/2>=h,T=p[$t]-s.h<0,C=p[Vt]-s.w<0,A=p[$t]+s.h+m.h>=h,I=p[Vt]+s.w+m.w>=d;a=(a===Vt||a===Zt)&&C&&I?$t:a,a=a===$t&&T?_t:a,a=a===_t&&A?$t:a,a=a===Vt&&C?Zt:a,a=a===Zt&&I?Vt:a,a===Vt||a===Zt?(c=a===Vt?p[Vt]+v.x-s.w:p[Vt]+v.x+m.w,w?(r=p[$t]+v.y,u=m.h/2):x?(r=p[$t]+v.y-s.h+m.h,u=s.h-m.h/2):r=p[$t]+v.y-s.h/2+m.h/2):a!==$t&&a!==_t||(r=a===$t?p[$t]+v.y-s.h:p[$t]+v.y+m.h,b?(c=0,f=p[Vt]+m.w/2):y?(c=d-1.01*s.w,f=s.w-(d-p[Vt])+m.w/2):c=p[Vt]+v.x-s.w/2+m.w/2),o[Rt][$t]=r+"px",o[Rt][Vt]=c+"px",u&&(g[Rt][$t]=u+"px"),f&&(g[Rt][Vt]=f+"px"),o.className[Ht](a)===-1&&(o.className=o.className.replace(en,a))};o.version="2.0.23";var An=function(o,a){o=vn(o),a=a||{};var l=o[At](C),r=o[At](O),c=o[At](W),u="affix",s="affixed",d="function",h="update",p="affix-top",v="affixed-top",m="affix-bottom",g="affixed-bottom";if(this[U]=a[U]?vn(a[U]):vn(l)||null,this[K]=a[K]?a[K]:parseInt(r)||0,this[Q]=a[Q]?a[Q]:parseInt(c)||0,this[U]||this[K]||this[Q]){var w,b,y,x,T,A,I=this,k=!1,L=!1,N=function(){return Math.max(n[i][at],n[i][et],e[tt],e[at],e[et])},S=function(){return null!==I[U]?I[U][Mt]()[$t]+x:I[K]?parseInt(typeof I[K]===d?I[K]():I[K]||0):void 0},E=function(){if(I[Q])return y-o[et]-parseInt(typeof I[Q]===d?I[Q]():I[Q]||0)},B=function(){y=N(),x=parseInt(Tn().y,0),w=S(),b=E(),T=parseInt(w)-x<0&&x>parseInt(w),A=parseInt(b)-x<0&&x>parseInt(b)},M=function(){k||dn(o,u)||(xn.call(o,u,u),xn.call(o,p,u),fn(o,u),k=!0,xn.call(o,s,u),xn.call(o,v,u))},D=function(){k&&dn(o,u)&&(sn(o,u),k=!1)},P=function(){L||dn(o,m)||(xn.call(o,u,u),xn.call(o,m,u),fn(o,m),L=!0,xn.call(o,s,u),xn.call(o,g,u))},H=function(){L&&dn(o,m)&&(sn(o,m),L=!1)},j=function(){A?(T&&D(),P()):(H(),T?M():D())};this[h]=function(){B(),j()},f in o||(gn(t,pt,I[h]),!tn&&gn(t,ht,I[h])),o[f]=I,I[h]()}};a[Ut]([f,An,"["+c+'="affix"]']);var In=function(t){t=vn(t);var n=this,e="alert",i=mn(t,"."+e),o=function(){dn(i,"fade")?yn(i,l):l()},a=function(o){i=mn(o[U],"."+e),t=vn("["+r+'="'+e+'"]',i),t&&i&&(t===o[U]||t[Yt](o[U]))&&n.close()},l=function(){xn.call(i,yt,e),wn(t,ut,a),i[Ot].removeChild(i)};this.close=function(){i&&t&&dn(i,Gt)&&(xn.call(i,bt,e),sn(i,Gt),i&&o())},s in t||gn(t,ut,a),t[s]=n};a[Ut]([s,In,"["+r+'="alert"]']);var kn=function(t,e){t=vn(t),e=e||null;var i=!1,o="button",a="checked",l="reset",r="LABEL",c="INPUT",u=function(){e&&e!==l&&(e===Qt&&(fn(t,Kt),t[It](Kt,Kt),t[It](S,t[St].trim())),t[St]=t[At]("data-"+e+"-text"))},f=function(){t[At](S)&&((dn(t,Kt)||t[At](Kt)===Kt)&&(sn(t,Kt),t.removeAttribute(Kt)),t[St]=t[At](S))},s=function(t){var e=t.which||t.keyCode;32===e&&t[U]===n.activeElement&&p(t)},h=function(t){var n=t.which||t.keyCode;32===n&&t[Bt]()},p=function(n){var e=n[U].tagName===r?n[U]:n[U][Ot].tagName===r?n[U][Ot]:null;if(e){var l=n[U],u=pn(l[Ot],"btn"),f=e[Et](c)[0];if(f){if("checkbox"===f.type&&(f[a]?(sn(e,Ft),f[At](a),f.removeAttribute(a),f[a]=!1):(fn(e,Ft),f[At](a),f[It](a,a),f[a]=!0),i||(i=!0,xn.call(f,Ct,o),xn.call(t,Ct,o))),"radio"===f.type&&!i&&!f[a]){fn(e,Ft),f[It](a,a),f[a]=!0,xn.call(f,Ct,o),xn.call(t,Ct,o),i=!0;for(var s=0,d=u[Wt];s<d;s++){var h=u[s],p=h[Et](c)[0];h!==e&&dn(h,Ft)&&(sn(h,Ft),p.removeAttribute(a),p[a]=!1,xn.call(p,Ct,o))}}setTimeout(function(){i=!1},50)}}};if(dn(t,"btn"))null!==e&&(e!==l?u():f());else{d in t||(gn(t,ut,p),vn("["+Xt+"]",t)&&gn(t,dt,s),gn(t,st,h));for(var v=pn(t,"btn"),m=v[Wt],g=0;g<m;g++)!dn(v[g],Ft)&&vn("input",v[g])[At](a)&&fn(v[g],Ft);t[d]=this}};a[Ut]([d,kn,"["+l+'="buttons"]']);var Ln=function(n,i){n=vn(n),i=i||{};var o=n[At](A),a=i[X],l="false"===o?0:parseInt(o),r=n[At](k)===ft||!1,c="true"===n[At](T)||!1,u="carousel",f="paused",s="direction",d="data-slide-to";this[q]=i[q]===!0||c,this[Y]=!(i[Y]!==ft&&!r)&&ft,this[X]="number"==typeof a?a:0===l||l===!1?0:5e3;var p=this,v=n.index=0,m=n.timer=0,g=!1,w=pn(n,"item"),b=w[Wt],y=this[s]=Vt,x=pn(n,u+"-control"),C=x[0],I=x[1],L=vn("."+u+"-indicators",n),N=L&&L[Et]("LI")||[],S=function(){p[X]===!1||dn(n,f)||(fn(n,f),!g&&clearInterval(m))},E=function(){p[X]!==!1&&dn(n,f)&&(sn(n,f),!g&&clearInterval(m),!g&&p.cycle())},B=function(t){if(t[Bt](),!g){var n=t[U];if(!n||dn(n,Ft)||!n[At](d))return!1;v=parseInt(n[At](d),10),p.slideTo(v)}},M=function(t){if(t[Bt](),!g){var n=t.currentTarget||t.srcElement;n===I?v++:n===C&&v--,p.slideTo(v)}},D=function(t){if(!g){switch(t.which){case 39:v++;break;case 37:v--;break;default:return}p.slideTo(v)}},P=function(){var i=n[Mt](),o=t[ot]||e[tt];return i[$t]<=o&&i[_t]>=0},H=function(t){for(var n=0,e=N[Wt];n<e;n++)sn(N[n],Ft);N[t]&&fn(N[t],Ft)};this.cycle=function(){m=setInterval(function(){P()&&(v++,p.slideTo(v))},this[X])},this.slideTo=function(t){if(!g){var e,i=this.getActiveIndex();i<t||0===i&&t===b-1?y=p[s]=Vt:(i>t||i===b-1&&0===t)&&(y=p[s]=Zt),t<0?t=b-1:t===b&&(t=0),v=t,e=y===Vt?"next":"prev",xn.call(n,Tt,u,w[t]),g=!0,clearInterval(m),H(t),rn&&dn(n,"slide")?(fn(w[t],e),w[t][nt],fn(w[t],y),fn(w[i],y),bn(w[i],cn,function(o){var a=o[U]!==w[i]?1e3*o.elapsedTime:0;setTimeout(function(){g=!1,fn(w[t],Ft),sn(w[i],Ft),sn(w[t],e),sn(w[t],y),sn(w[i],y),xn.call(n,xt,u,w[t]),p[X]&&!dn(n,f)&&p.cycle()},a+100)})):(fn(w[t],Ft),w[t][nt],sn(w[i],Ft),setTimeout(function(){g=!1,p[X]&&!dn(n,f)&&p.cycle(),xn.call(n,xt,u,w[t])},100))}},this.getActiveIndex=function(){return w[Ht](pn(n,"item active")[0])||0},h in n||(p[Y]&&p[X]&&(gn(n,nn[0],S),gn(n,nn[1],E),gn(n,"touchstart",S),gn(n,"touchend",E)),I&&gn(I,ut,M),C&&gn(C,ut,M),L&&gn(L,ut,B),p[q]&&gn(t,st,D)),p.getActiveIndex()<0&&(w[Wt]&&fn(w[0],Ft),N[Wt]&&H(0)),p[X]&&p.cycle(),n[h]=p};a[Ut]([h,Ln,"["+u+'="carousel"]']);var Nn=function(t,n){t=vn(t),n=n||{};var e=null,i=null,o=this,a=!1,r=t[At]("data-parent"),c="collapse",u="collapsed",f=function(t,n){xn.call(t,vt,c),a=!0,fn(t,Jt),sn(t,c),t[Rt][lt]=t[at]+"px",yn(t,function(){a=!1,t[It](rt,"true"),n[It](rt,"true"),sn(t,Jt),fn(t,c),fn(t,Gt),t[Rt][lt]="",xn.call(t,mt,c)})},s=function(t,n){xn.call(t,gt,c),a=!0,t[Rt][lt]=t[at]+"px",sn(t,c),sn(t,Gt),fn(t,Jt),t[nt],t[Rt][lt]="0px",yn(t,function(){a=!1,t[It](rt,"false"),n[It](rt,"false"),sn(t,Jt),fn(t,c),t[Rt][lt]="",xn.call(t,wt,c)})},d=function(){var n=t.href&&t[At]("href"),e=t[At](C),i=n||e&&"#"===e.charAt(0)&&e;return i&&vn(i)};this.toggle=function(t){t[Bt](),a||(dn(i,Gt)?o.hide():o.show())},this.hide=function(){s(i,t),fn(t,u)},this.show=function(){if(e){var n=vn("."+c+"."+Gt,e),o=n&&(vn("["+l+'="'+c+'"]['+C+'="#'+n.id+'"]',e)||vn("["+l+'="'+c+'"][href="#'+n.id+'"]',e)),a=o&&(o[At](C)||o.href);n&&o&&n!==i&&(s(n,o),a.split("#")[1]!==i.id?fn(o,u):sn(o,u))}f(i,t),sn(t,u)},p in t||gn(t,ut,o.toggle),i=d(),e=vn(n.parent)||r&&mn(t,r),t[p]=o};a[Ut]([p,Nn,"["+l+'="collapse"]']);var Sn=function(t,e){t=vn(t),this.persist=e===!0||"true"===t[At]("data-persist")||!1;var i=this,o="children",a=t[Ot],l="dropdown",r="open",c=null,u=vn(".dropdown-menu",a),f=function(){for(var t=u[o],n=[],e=0;e<t[Wt];e++)t[e][o][Wt]&&"A"===t[e][o][0].tagName&&n[Ut](t[e]);return n}(),s=function(t){(t.href&&"#"===t.href.slice(-1)||t[Ot]&&t[Ot].href&&"#"===t[Ot].href.slice(-1))&&this[Bt]()},d=function(){var e=t[r]?gn:wn;e(n,ut,h),e(n,st,m),e(n,dt,g)},h=function(n){var e=n[U],o=e&&(v in e||v in e[Ot]);(e!==u&&!u[Yt](e)||!i.persist&&!o)&&(c=e===t||t[Yt](e)?t:null,b(),s.call(n,e))},p=function(n){c=t,w(),s.call(n,n[U])},m=function(t){var n=t.which||t.keyCode;38!==n&&40!==n||t[Bt]()},g=function(e){var a=e.which||e.keyCode,l=n.activeElement,s=f[Ht](l[Ot]),d=l===t,h=u[Yt](l),p=l[Ot][Ot]===u;(p||d)&&(s=d?0:38===a?s>1?s-1:0:40===a&&s<f[Wt]-1?s+1:s,f[s]&&un(f[s][o][0])),(f[Wt]&&p||!f[Wt]&&(h||d)||!h)&&t[r]&&27===a&&(i.toggle(),c=null)},w=function(){xn.call(a,vt,l,c),fn(a,r),u[It](rt,!0),xn.call(a,mt,l,c),t[r]=!0,wn(t,ut,p),setTimeout(function(){un(u[Et]("INPUT")[0]||t),d()},1)},b=function(){xn.call(a,gt,l,c),sn(a,r),u[It](rt,!1),xn.call(a,wt,l,c),t[r]=!1,d(),un(t),setTimeout(function(){gn(t,ut,p)},1)};t[r]=!1,this.toggle=function(){dn(a,r)&&t[r]?b():w()},v in t||(!Xt in u&&u[It](Xt,"0"),gn(t,ut,p)),t[v]=i};a[Ut]([v,Sn,"["+l+'="dropdown"]']);var En=function(o,a){o=vn(o);var l=o[At](C)||o[At]("href"),c=vn(l),u=dn(o,"modal")?o:c,f="modal",s="static",d="paddingLeft",h="paddingRight",p="modal-backdrop";if(dn(o,"modal")&&(o=null),u){a=a||{},this[q]=a[q]!==!1&&"false"!==u[At](T),this[j]=a[j]!==s&&u[At](x)!==s||s,this[j]=a[j]!==!1&&"false"!==u[At](x)&&this[j],this[R]=a[R];var v,g,w,b,y=this,A=null,I=pn(e,an).concat(pn(e,ln)),k=function(){var n=e[Mt]();return t[it]||n[Zt]-Math.abs(n[Vt])},L=function(){var e,o=n[i].currentStyle||t.getComputedStyle(n[i]),a=parseInt(o[h],10);if(v&&(n[i][Rt][h]=a+w+"px",I[Wt]))for(var l=0;l<I[Wt];l++)e=(I[l].currentStyle||t.getComputedStyle(I[l]))[h],I[l][Rt][h]=parseInt(e)+w+"px"},N=function(){if(n[i][Rt][h]="",I[Wt])for(var t=0;t<I[Wt];t++)I[t][Rt][h]=""},S=function(){var t,e=n[Lt]("div");return e.className=f+"-scrollbar-measure",n[i][Nt](e),t=e[nt]-e[_],n[i].removeChild(e),t},E=function(){v=n[i][_]<k(),g=u[at]>e[tt],w=S()},B=function(){u[Rt][d]=!v&&g?w+"px":"",u[Rt][h]=v&&!g?w+"px":""},M=function(){u[Rt][d]="",u[Rt][h]=""},D=function(){on=1;var t=n[Lt]("div");b=vn("."+p),null===b&&(t[It]("class",p+" fade"),b=t,n[i][Nt](b))},P=function(){b=vn("."+p),b&&null!==b&&"object"==typeof b&&(on=0,n[i].removeChild(b),b=null),xn.call(u,wt,f)},H=function(){dn(u,Gt)?gn(n,st,F):wn(n,st,F)},O=function(){dn(u,Gt)?gn(t,ht,y.update):wn(t,ht,y.update)},W=function(){dn(u,Gt)?gn(u,ut,G):wn(u,ut,G)},z=function(){un(u),xn.call(u,mt,f,A)},X=function(){u[Rt].display="",o&&un(o),function(){pn(n,f+" "+Gt)[0]||(M(),N(),sn(n[i],f+"-open"),b&&dn(b,"fade")?(sn(b,Gt),yn(b,P)):P(),O(),W(),H())}()},Y=function(t){var n=t[U];n=n[kt](C)||n[kt]("href")?n:n[Ot],n!==o||dn(u,Gt)||(u.modalTrigger=o,A=o,y.show(),t[Bt]())},F=function(t){var n=t.which||t.keyCode;y[q]&&27==n&&dn(u,Gt)&&y.hide()},G=function(t){var n=t[U];dn(u,Gt)&&(n[Ot][At](r)===f||n[At](r)===f||n===u&&y[j]!==s)&&(y.hide(),A=null,t[Bt]())};this.toggle=function(){dn(u,Gt)?this.hide():this.show()},this.show=function(){xn.call(u,vt,f,A);var t=pn(n,f+" in")[0];t&&t!==u&&t.modalTrigger[m].hide(),this[j]&&!on&&D(),b&&on&&!dn(b,Gt)&&(b[nt],fn(b,Gt)),function(){u[Rt].display="block",E(),L(),B(),fn(n[i],f+"-open"),fn(u,Gt),u[It](ct,!1),O(),W(),H(),dn(u,"fade")?yn(u,z):z()}()},this.hide=function(){xn.call(u,gt,f),b=vn("."+p),sn(u,Gt),u[It](ct,!0),setTimeout(function(){dn(u,"fade")?yn(u,X):X()},rn?150:0)},this.setContent=function(t){vn("."+f+"-content",u)[St]=t},this.update=function(){dn(u,Gt)&&(E(),L(),B())},!o||m in o||gn(o,ut,Y),y[R]&&y.setContent(y[R]),!!o&&(o[m]=y)}};a[Ut]([m,En,"["+l+'="modal"]']);var Bn=function(e,o){e=vn(e),o=o||{};var a=e[At](B),l=e[At](M),r=e[At](P),c=e[At](E),u=e[At](H),f=e[At](D),s="popover",d="template",h="trigger",p="class",v="div",m="fade",w="data-content",b="dismissible",y='<button type="button" class="close">×</button>',x=vn(o[J]),T=vn(f),C=mn(e,".modal"),A=mn(e,"."+an),I=mn(e,"."+ln);this[d]=o[d]?o[d]:null,this[h]=o[h]?o[h]:a||ft,this[F]=o[F]&&o[F]!==m?o[F]:l||m,this[G]=o[G]?o[G]:r||$t,this[z]=parseInt(o[z]||u)||200,this[b]=!(!o[b]&&"true"!==c),this[J]=x?x:T?T:A?A:I?I:C?C:n[i];var k=this,N=e[At](L)||null,S=e[At](w)||null;if(S||this[d]){var O=null,W=0,j=this[G],q=function(t){null!==O&&t[U]===vn(".close",O)&&k.hide()},R=function(){k[J].removeChild(O),W=null,O=null},X=function(){if(N=e[At](L),S=e[At](w),O=n[Lt](v),null!==S&&null===k[d]){if(O[It]("role","tooltip"),null!==N){var t=n[Lt]("h3");t[It](p,s+"-title"),t[St]=k[b]?N+y:N,O[Nt](t)}var i=n[Lt](v),o=n[Lt](v);i[It](p,"arrow"),o[It](p,s+"-content"),O[Nt](i),O[Nt](o),o[St]=k[b]&&null===N?S+y:S}else{var a=n[Lt](v);a[St]=k[d],O[St]=a.firstChild[St]}k[J][Nt](O),O[Rt].display="block",O[It](p,s+" "+j+" "+k[F])},Y=function(){!dn(O,Gt)&&fn(O,Gt)},K=function(){Cn(e,O,j,k[J])},Q=function(i){ut!=k[h]&&"focus"!=k[h]||!k[b]&&i(e,"blur",k.hide),k[b]&&i(n,ut,q),!tn&&i(t,ht,k.hide)},V=function(){Q(gn),xn.call(e,mt,s)},Z=function(){Q(wn),R(),xn.call(e,wt,s)};this.toggle=function(){null===O?k.show():k.hide()},this.show=function(){clearTimeout(W),W=setTimeout(function(){null===O&&(j=k[G],X(),K(),Y(),xn.call(e,vt,s),k[F]?yn(O,V):V())},20)},this.hide=function(){clearTimeout(W),W=setTimeout(function(){O&&null!==O&&dn(O,Gt)&&(xn.call(e,gt,s),sn(O,Gt),k[F]?yn(O,Z):Z())},k[z])},g in e||(k[h]===ft?(gn(e,nn[0],k.show),k[b]||gn(e,nn[1],k.hide)):ut!=k[h]&&"focus"!=k[h]||gn(e,k[h],k.toggle)),e[g]=k}};a[Ut]([g,Bn,"["+l+'="popover"]']);var Mn=function(n,e){n=vn(n);var i=vn(n[At](C)),o=n[At]("data-offset");if(e=e||{},e[U]||i){for(var a,l=this,r=e[U]&&vn(e[U])||i,c=r&&r[Et]("A"),u=parseInt(o||e.offset)||10,f=[],s=[],d=n[et]<n[at]?n:t,h=d===t,p=0,v=c[Wt];p<v;p++){var m=c[p][At]("href"),g=m&&"#"===m.charAt(0)&&"#"!==m.slice(-1)&&vn(m);g&&(f[Ut](c[p]),s[Ut](g))}var b=function(t){var e=f[t][Ot],i=s[t],o=mn(e,".dropdown"),l=h&&i[Mt](),r=dn(e,Ft)||!1,c=(h?l[$t]+a:i[K])-u,d=h?l[_t]+a-u:s[t+1]?s[t+1][K]-u:n[at],p=a>=c&&d>a;if(!r&&p)"LI"!==e.tagName||dn(e,Ft)||(fn(e,Ft),o&&!dn(o,Ft)&&fn(o,Ft),xn.call(n,"activate","scrollspy",f[t]));else if(p){if(!p&&!r||r&&p)return}else"LI"===e.tagName&&dn(e,Ft)&&(sn(e,Ft),o&&dn(o,Ft)&&!pn(e[Ot],Ft).length&&sn(o,Ft))},y=function(){a=h?Tn().y:n[Z];for(var t=0,e=f[Wt];t<e;t++)b(t)};this.refresh=function(){y()},w in n||(gn(d,pt,l.refresh),!tn&&gn(t,ht,l.refresh)),l.refresh(),n[w]=l}};a[Ut]([w,Mn,"["+c+'="scroll"]']);var Dn=function(t,n){t=vn(t);var e=t[At](I),i="tab",o="height",a="float",r="isAnimating";n=n||{},this[o]=!!rn&&(n[o]||"true"===e);var c,u,f,s,d,h,p,v=this,m=mn(t,".nav"),g=!1,w=m&&vn(".dropdown",m),y=function(){g[Rt][o]="",sn(g,Jt),m[r]=!1},x=function(){g?h?y():setTimeout(function(){g[Rt][o]=p+"px",g[nt],yn(g,y)},1):m[r]=!1,xn.call(c,mt,i,u)},T=function(){g&&(f[Rt][a]=Vt,s[Rt][a]=Vt,d=f[at]),fn(s,Ft),xn.call(c,vt,i,u),sn(f,Ft),xn.call(u,wt,i,c),g&&(p=s[at],h=p===d,fn(g,Jt),g[Rt][o]=d+"px",g[et],f[Rt][a]="",s[Rt][a]=""),dn(s,"fade")?setTimeout(function(){fn(s,Gt),yn(s,x)},20):x()};if(m){m[r]=!1;var C=function(){var t,n=pn(m,Ft);return 1!==n[Wt]||dn(n[0],"dropdown")?n[Wt]>1&&(t=n[n[Wt]-1]):t=n[0],t[Et]("A")[0]},A=function(){return vn(C()[At]("href"))},k=function(t){var n=t[U][At]("href");t[Bt](),c=t[U][At](l)===i||n&&"#"===n.charAt(0)?t[U]:t[U][Ot],!m[r]&&!dn(c[Ot],Ft)&&v.show()};this.show=function(){c=c||t,s=vn(c[At]("href")),u=C(),f=A(),m[r]=!0,sn(u[Ot],Ft),fn(c[Ot],Ft),w&&(dn(t[Ot][Ot],"dropdown-menu")?dn(w,Ft)||fn(w,Ft):dn(w,Ft)&&sn(w,Ft)),xn.call(u,gt,i,c),dn(f,"fade")?(sn(f,Gt),yn(f,T)):T()},b in t||gn(t,ut,k),v[o]&&(g=A()[Ot]),t[b]=v}};a[Ut]([b,Dn,"["+l+'="tab"]']);var Pn=function(e,o){e=vn(e),o=o||{};var a=e[At](M),l=e[At](P),r=e[At](H),c=e[At](D),u="tooltip",f="class",s="title",d="fade",h="div",p=vn(o[J]),v=vn(c),m=mn(e,".modal"),g=mn(e,"."+an),w=mn(e,"."+ln);this[F]=o[F]&&o[F]!==d?o[F]:a||d,this[G]=o[G]?o[G]:l||$t,this[z]=parseInt(o[z]||r)||200,this[J]=p?p:v?v:g?g:w?w:m?m:n[i];var b=this,x=0,T=this[G],C=null,A=e[At](s)||e[At](L)||e[At](N);if(A&&""!=A){var I=function(){b[J].removeChild(C),C=null,x=null},k=function(){if(A=e[At](s)||e[At](L)||e[At](N),!A||""==A)return!1;C=n[Lt](h),C[It]("role",u);var t=n[Lt](h),i=n[Lt](h);t[It](f,u+"-arrow"),i[It](f,u+"-inner"),C[Nt](t),C[Nt](i),i[St]=A,b[J][Nt](C),C[It](f,u+" "+T+" "+b[F])},S=function(){Cn(e,C,T,b[J])},E=function(){!dn(C,Gt)&&fn(C,Gt)},B=function(){xn.call(e,mt,u),!tn&&gn(t,ht,b.hide)},O=function(){!tn&&wn(t,ht,b.hide),I(),xn.call(e,wt,u)};this.show=function(){clearTimeout(x),x=setTimeout(function(){if(null===C){if(T=b[G],0==k())return;S(),E(),xn.call(e,vt,u),b[F]?yn(C,B):B()}},20)},this.hide=function(){clearTimeout(x),x=setTimeout(function(){C&&dn(C,Gt)&&(xn.call(e,gt,u),sn(C,Gt),b[F]?yn(C,O):O())},b[z])},this.toggle=function(){C?b.hide():b.show()},y in e||(e[It](N,A),e.removeAttribute(s),gn(e,nn[0],b.show),gn(e,nn[1],b.hide)),e[y]=b}};a[Ut]([y,Pn,"["+l+'="tooltip"]']);var Hn=function(t,n){for(var e=0,i=n[Wt];e<i;e++)new t(n[e])},On=o.initCallback=function(t){t=t||n;for(var e=0,i=a[Wt];e<i;e++)Hn(a[e][1],t[Dt](a[e][2]))};return n[i]?On():gn(n,"DOMContentLoaded",function(){On()}),{Affix:An,Alert:In,Button:kn,Carousel:Ln,Collapse:Nn,Dropdown:Sn,Modal:En,Popover:Bn,ScrollSpy:Mn,Tab:Dn,Tooltip:Pn}});
/**
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
\ No newline at end of file
/* Native JavaScript for Bootstrap 3 IE8+ Polyfill
--------------------------------------------*/
(function(){
// all repeated strings get a single reference
// document | window | element + corrections
var Doc = 'Document', doc = document, DOCUMENT = this[Doc] || this.HTMLDocument, // IE8
WIN = 'Window', win = window, WINDOW = this.constructor || this[WIN] || Window, // old Safari
HTMLELEMENT = 'HTMLElement', documentElement = 'documentElement', ELEMENT = Element,
// classList related
className = 'className', add = 'add', classList = 'classList', remove = 'remove', contains = 'contains',
CLASS = 'class', setATTRIBUTE = 'setAttribute', getATTRIBUTE = 'getAttribute',
// object | array related
prototype = 'prototype', indexOf = 'indexOf', length = 'length', split = 'split', trim = 'trim',
// event related
EVENT = 'Event', CustomEvent = 'CustomEvent', IE8EVENTS = '_events',
etype = 'type', target = 'target', currentTarget = 'currentTarget', relatedTarget = 'relatedTarget',
cancelable = 'cancelable', bubbles = 'bubbles', cancelBubble = 'cancelBubble', cancelImmediate = 'cancelImmediate', detail = 'detail',
addEventListener = 'addEventListener', removeEventListener = 'removeEventListener', dispatchEvent = 'dispatchEvent';
// Element
if (!win[HTMLELEMENT]) { win[HTMLELEMENT] = win[ELEMENT]; }
// Array[prototype][indexOf]
if (!Array[prototype][indexOf]) {
Array[prototype][indexOf] = function(searchElement) {
if (this === undefined || this === null) {
throw new TypeError(this + ' is not an object');
}
var arraylike = this instanceof String ? this[split]('') : this,
lengthValue = Math.max(Math.min(arraylike[length], 9007199254740991), 0) || 0,
index = Number(arguments[1]) || 0;
index = (index < 0 ? Math.max(lengthValue + index, 0) : index) - 1;
while (++index < lengthValue) {
if (index in arraylike && arraylike[index] === searchElement) {
return index;
}
}
return -1;
};
}
if (!String[prototype][trim]) {
String[prototype][trim] = function () {
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
};
}
// Element.prototype.classList by thednp
if( !(classList in ELEMENT[prototype]) ) {
var ClassLIST = function(elem){
var classArr = (elem[getATTRIBUTE](CLASS)||'').replace(/^\s+|\s+$/g,'')[split](/\s+/) || [];
// methods
hasClass = this[contains] = function(classNAME){
return classArr[indexOf](classNAME) > -1;
},
addClass = this[add] = function(classNAME){
if (!hasClass(classNAME)) {
classArr.push(classNAME);
elem[setATTRIBUTE](CLASS, classArr.join(' '));
}
},
removeClass = this[remove] = function(classNAME){
if (hasClass(classNAME)) {
classArr.splice(classArr[indexOf](classNAME),1);
elem[setATTRIBUTE](CLASS, classArr.join(' '));
}
},
toggleClass = this.toggle = function(classNAME){
if ( hasClass(classNAME) ) { removeClass(classNAME); }
else { addClass(classNAME); }
};
}
Object.defineProperty(ELEMENT[prototype], classList, { get: function () { return new ClassLIST(this); } });
}
// Event
if (!win[EVENT]||!WINDOW[prototype][EVENT]) {
win[EVENT] = WINDOW[prototype][EVENT] = DOCUMENT[prototype][EVENT] = ELEMENT[prototype][EVENT] = function(type, eventInitDict) {
if (!type) { throw new Error('Not enough arguments'); }
var event,
bubblesValue = eventInitDict && eventInitDict[bubbles] !== undefined ? eventInitDict[bubbles] : false,
cancelableValue = eventInitDict && eventInitDict[cancelable] !== undefined ? eventInitDict[cancelable] : false;
if ( 'createEvent' in doc ) {
event = doc.createEvent(EVENT);
event.initEvent(type, bubblesValue, cancelableValue);
} else {
event = doc.createEventObject();
event[etype] = type;
event[bubbles] = bubblesValue;
event[cancelable] = cancelableValue;
}
return event;
};
}
// CustomEvent
if (!(CustomEvent in win) || !(CustomEvent in WINDOW[prototype])) {
win[CustomEvent] = WINDOW[prototype][CustomEvent] = DOCUMENT[prototype][CustomEvent] = Element[prototype][CustomEvent] = function(type, eventInitDict) {
if (!type) {
throw Error('CustomEvent TypeError: An event name must be provided.');
}
var event = new Event(type, eventInitDict);
event[detail] = eventInitDict && eventInitDict[detail] || null;
return event;
};
}
// addEventListener | removeEventListener
if (!win[addEventListener]||!WINDOW[prototype][addEventListener]) {
win[addEventListener] = WINDOW[prototype][addEventListener] = DOCUMENT[prototype][addEventListener] = ELEMENT[prototype][addEventListener] = function() {
var element = this,
type = arguments[0],
listener = arguments[1];
if (!element[IE8EVENTS]) { element[IE8EVENTS] = {}; }
if (!element[IE8EVENTS][type]) {
element[IE8EVENTS][type] = function (event) {
var list = element[IE8EVENTS][event[etype]].list,
events = list.slice(),
index = -1,
lengthValue = events[length],
eventElement;
event.preventDefault = function() {
if (event[cancelable] !== false) {
event.returnValue = false;
}
};
event.stopPropagation = function() {
event[cancelBubble] = true;
};
event.stopImmediatePropagation = function() {
event[cancelBubble] = true;
event[cancelImmediate] = true;
};
event[currentTarget] = element;
event[relatedTarget] = event[relatedTarget] || event.fromElement || null;
event[target] = event[target] || event.srcElement || element;
event.timeStamp = new Date().getTime();
if (event.clientX) {
event.pageX = event.clientX + doc[documentElement].scrollLeft;
event.pageY = event.clientY + doc[documentElement].scrollTop;
}
while (++index < lengthValue && !event[cancelImmediate]) {
if (index in events) {
eventElement = events[index];
if (list[indexOf](eventElement) !== -1 && typeof eventElement === 'function') {
eventElement.call(element, event);
}
}
}
};
element[IE8EVENTS][type].list = [];
if (element.attachEvent) {
element.attachEvent('on' + type, element[IE8EVENTS][type]);
}
}
element[IE8EVENTS][type].list.push(listener);
};
win[removeEventListener] = WINDOW[prototype][removeEventListener] = DOCUMENT[prototype][removeEventListener] = ELEMENT[prototype][removeEventListener] = function() {
var element = this,
type = arguments[0],
listener = arguments[1],
index;
if (element[IE8EVENTS] && element[IE8EVENTS][type] && element[IE8EVENTS][type].list) {
index = element[IE8EVENTS][type].list[indexOf](listener);
if (index !== -1) {
element[IE8EVENTS][type].list.splice(index, 1);
if (!element[IE8EVENTS][type].list[length]) {
if (element.detachEvent) {
element.detachEvent('on' + type, element[IE8EVENTS][type]);
}
delete element[IE8EVENTS][type];
}
}
}
};
}
// Event dispatcher
if (!win[dispatchEvent]||!WINDOW[prototype][dispatchEvent]||!DOCUMENT[prototype][dispatchEvent]||!ELEMENT[prototype][dispatchEvent]) {
win[dispatchEvent] = WINDOW[prototype][dispatchEvent] = DOCUMENT[prototype][dispatchEvent] = ELEMENT[prototype][dispatchEvent] = function (event) {
if (!arguments[length]) {
throw new Error('Not enough arguments');
}
if (!event || typeof event[etype] !== 'string') {
throw new Error('DOM Events Exception 0');
}
var element = this, type = event[etype];
try {
if (!event[bubbles]) {
event[cancelBubble] = true;
var cancelBubbleEvent = function (event) {
event[cancelBubble] = true;
(element || win).detachEvent('on' + type, cancelBubbleEvent);
};
this.attachEvent('on' + type, cancelBubbleEvent);
}
this.fireEvent('on' + type, event);
} catch (error) {
event[target] = element;
do {
event[currentTarget] = element;
if (IE8EVENTS in element && typeof element[IE8EVENTS][type] === 'function') {
element[IE8EVENTS][type].call(element, event);
}
if (typeof element['on' + type] === 'function') {
element['on' + type].call(element, event);
}
element = element.nodeType === 9 ? element.parentWindow : element.parentNode;
} while (element && !event[cancelBubble]);
}
return true;
};
}
}());
\ No newline at end of file
// Native JavaScript for Bootstrap 3/4 Polyfill
(function(){var F="Document",i=document,g=this[F]||this.HTMLDocument,l="Window",E=window,p=this.constructor||this[l]||Window,u="HTMLElement",k="documentElement",D=Element,J="className",d="add",c="classList",x="remove",z="contains",s="class",e="setAttribute",A="getAttribute",t="prototype",o="indexOf",r="length",y="split",b="trim",f="Event",I="CustomEvent",C="_events",n="type",a="target",m="currentTarget",B="relatedTarget",v="cancelable",q="bubbles",w="cancelBubble",H="cancelImmediate",K="detail",L="addEventListener",h="removeEventListener",j="dispatchEvent";if(!E[u]){E[u]=E[D]}if(!Array[t][o]){Array[t][o]=function(O){if(this===undefined||this===null){throw new TypeError(this+" is not an object")}var N=this instanceof String?this[y](""):this,P=Math.max(Math.min(N[r],9007199254740991),0)||0,M=Number(arguments[1])||0;M=(M<0?Math.max(P+M,0):M)-1;while(++M<P){if(M in N&&N[M]===O){return M}}return -1}}if(!String[t][b]){String[t][b]=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}if(!(c in D[t])){var G=function(M){var N=(M[A](s)||"").replace(/^\s+|\s+$/g,"")[y](/\s+/)||[];hasClass=this[z]=function(O){return N[o](O)>-1},addClass=this[d]=function(O){if(!hasClass(O)){N.push(O);M[e](s,N.join(" "))}},removeClass=this[x]=function(O){if(hasClass(O)){N.splice(N[o](O),1);M[e](s,N.join(" "))}},toggleClass=this.toggle=function(O){if(hasClass(O)){removeClass(O)}else{addClass(O)}}};Object.defineProperty(D[t],c,{get:function(){return new G(this)}})}if(!E[f]||!p[t][f]){E[f]=p[t][f]=g[t][f]=D[t][f]=function(O,Q){if(!O){throw new Error("Not enough arguments")}var P,N=Q&&Q[q]!==undefined?Q[q]:false,M=Q&&Q[v]!==undefined?Q[v]:false;if("createEvent" in i){P=i.createEvent(f);P.initEvent(O,N,M)}else{P=i.createEventObject();P[n]=O;P[q]=N;P[v]=M}return P}}if(!(I in E)||!(I in p[t])){E[I]=p[t][I]=g[t][I]=Element[t][I]=function(M,O){if(!M){throw Error("CustomEvent TypeError: An event name must be provided.")}var N=new Event(M,O);N[K]=O&&O[K]||null;return N}}if(!E[L]||!p[t][L]){E[L]=p[t][L]=g[t][L]=D[t][L]=function(){var M=this,N=arguments[0],O=arguments[1];if(!M[C]){M[C]={}}if(!M[C][N]){M[C][N]=function(T){var U=M[C][T[n]].list,R=U.slice(),Q=-1,S=R[r],P;T.preventDefault=function(){if(T[v]!==false){T.returnValue=false}};T.stopPropagation=function(){T[w]=true};T.stopImmediatePropagation=function(){T[w]=true;T[H]=true};T[m]=M;T[B]=T[B]||T.fromElement||null;T[a]=T[a]||T.srcElement||M;T.timeStamp=new Date().getTime();if(T.clientX){T.pageX=T.clientX+i[k].scrollLeft;T.pageY=T.clientY+i[k].scrollTop}while(++Q<S&&!T[H]){if(Q in R){P=R[Q];if(U[o](P)!==-1&&typeof P==="function"){P.call(M,T)}}}};M[C][N].list=[];if(M.attachEvent){M.attachEvent("on"+N,M[C][N])}}M[C][N].list.push(O)};E[h]=p[t][h]=g[t][h]=D[t][h]=function(){var N=this,O=arguments[0],P=arguments[1],M;if(N[C]&&N[C][O]&&N[C][O].list){M=N[C][O].list[o](P);if(M!==-1){N[C][O].list.splice(M,1);if(!N[C][O].list[r]){if(N.detachEvent){N.detachEvent("on"+O,N[C][O])}delete N[C][O]}}}}}if(!E[j]||!p[t][j]||!g[t][j]||!D[t][j]){E[j]=p[t][j]=g[t][j]=D[t][j]=function(Q){if(!arguments[r]){throw new Error("Not enough arguments")}if(!Q||typeof Q[n]!=="string"){throw new Error("DOM Events Exception 0")}var N=this,P=Q[n];try{if(!Q[q]){Q[w]=true;var O=function(R){R[w]=true;(N||E).detachEvent("on"+P,O)};this.attachEvent("on"+P,O)}this.fireEvent("on"+P,Q)}catch(M){Q[a]=N;do{Q[m]=N;if(C in N&&typeof N[C][P]==="function"){N[C][P].call(N,Q)}if(typeof N["on"+P]==="function"){N["on"+P].call(N,Q)}N=N.nodeType===9?N.parentWindow:N.parentNode}while(N&&!Q[w])}return true}}}());
\ No newline at end of file
/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript */
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=n.util.clone(e[r]));return a;case"Array":return e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)a[r]=t[r];return a},insertBefore:function(e,t,a,r){r=r||n.languages;var i=r[e];if(2==arguments.length){a=arguments[1];for(var l in a)a.hasOwnProperty(l)&&(i[l]=a[l]);return i}var o={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var l in a)a.hasOwnProperty(l)&&(o[l]=a[l]);o[s]=i[s]}return n.languages.DFS(n.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=o)}),r[e]=o},DFS:function(e,t,a,r){r=r||{};for(var i in e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],a||i),"Object"!==n.util.type(e[i])||r[n.util.objId(e[i])]?"Array"!==n.util.type(e[i])||r[n.util.objId(e[i])]||(r[n.util.objId(e[i])]=!0,n.languages.DFS(e[i],t,i,r)):(r[n.util.objId(e[i])]=!0,n.languages.DFS(e[i],t,null,r)))}},plugins:{},highlightAll:function(e,t){var a={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var r,i=a.elements||document.querySelectorAll(a.selector),l=0;r=i[l++];)n.highlightElement(r,e===!0,a.callback)},highlightElement:function(t,a,r){for(var i,l,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(i=(o.className.match(e)||[,""])[1].toLowerCase(),l=n.languages[i]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+i,o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+i);var s=t.textContent,u={element:t,language:i,grammar:l,code:s};if(n.hooks.run("before-sanity-check",u),!u.code||!u.grammar)return u.code&&(n.hooks.run("before-highlight",u),u.element.textContent=u.code,n.hooks.run("after-highlight",u)),n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),a&&_self.Worker){var g=new Worker(n.filename);g.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,r&&r.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,r){var i=n.tokenize(e,t);return a.stringify(n.util.encode(i),r)},matchGrammar:function(e,t,a,r,i,l,o){var s=n.Token;for(var u in a)if(a.hasOwnProperty(u)&&a[u]){if(u==o)return;var g=a[u];g="Array"===n.util.type(g)?g:[g];for(var c=0;c<g.length;++c){var h=g[c],f=h.inside,d=!!h.lookbehind,m=!!h.greedy,p=0,y=h.alias;if(m&&!h.pattern.global){var v=h.pattern.toString().match(/[imuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}h=h.pattern||h;for(var b=r,k=i;b<t.length;k+=t[b].length,++b){var w=t[b];if(t.length>e.length)return;if(!(w instanceof s)){h.lastIndex=0;var _=h.exec(w),P=1;if(!_&&m&&b!=t.length-1){if(h.lastIndex=k,_=h.exec(e),!_)break;for(var A=_.index+(d?_[1].length:0),j=_.index+_[0].length,x=b,O=k,S=t.length;S>x&&(j>O||!t[x].type&&!t[x-1].greedy);++x)O+=t[x].length,A>=O&&(++b,k=O);if(t[b]instanceof s||t[x-1].greedy)continue;P=x-b,w=e.slice(k,O),_.index-=k}if(_){d&&(p=_[1].length);var A=_.index+p,_=_[0].slice(p),j=A+_.length,N=w.slice(0,A),C=w.slice(j),E=[b,P];N&&(++b,k+=N.length,E.push(N));var I=new s(u,f?n.tokenize(_,f):_,y,_,m);if(E.push(I),C&&E.push(C),Array.prototype.splice.apply(t,E),1!=P&&n.matchGrammar(e,t,a,b,k,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var i in r)t[i]=r[i];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var i={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if(e.alias){var l="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}n.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+"</"+i.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,i=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),i&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag));
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|\d*\.?\d+(?:[Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)\s*=>))/i,alias:"function"}}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript"}}),Prism.languages.js=Prism.languages.javascript;
var myModal = document.getElementById('myModal'); // we need a blank modal to fill up and target our object function
myModal.addEventListener('show.bs.modal', function(e) {
console.log('show.bs.modal triggered for #'+e.target.id);
console.log('event.relatedTarget is '+e.relatedTarget.tagName+'.'+e.relatedTarget.className.replace(/\s/g,'.'));
}, false);
// Modal initialized with JavaScript
var myModalJS = document.getElementById('myModalJS'); // we need a blank modal to fill up and target our object function
var btnModal = document.getElementById('openModalViaJS');
var firstModalContent = '<div class="modal-header">'
+'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'
+'<h4 class="modal-title" id="myModalJSLabel">Modal title</h4>'
+'</div>'
+'<div class="modal-body">'
+'<p>This is a damn awesome modal content template configured via Javascript, using the specific modal events like <code>show.bs.modal</code>, so please open your console and check the log entries.</p>'
+'</div>'
+'<div class="modal-footer">'
+'<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>'
+'<button type="button" class="btn btn-primary">Save changes</button>'
+'</div>';
// init the modal
var modalInitJS = new Modal(myModalJS, {
content: firstModalContent,
backdrop: 'static'
});
btnModal.addEventListener('click',function(e){
modalInitJS.show();
},false);
// another button
var btnModal2 = document.getElementById('openModalViaJS2');
var externalModalContent = {
title: 'Some title coming from space, a custom variable',
content: 'This example also uses the specific modal events like <code>show.bs.modal</code>, so please open your console and check the logs. This is also a variable here, efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar solutions without functional solutions.',
};
// set new content for the modal and show it
btnModal2.addEventListener('click', function() {
//template content for modal example 2
modalInitJS.setContent('<div class="modal-header">'
+'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'
+'<h4 class="modal-title" id="myModalJSLabel">'+externalModalContent.title+'</h4>'
+'</div>'
+'<div class="modal-body">'
+'<p>'+externalModalContent.content+'</p>'
+'</div>'
+'<div class="modal-footer">'
+'<button type="button" class="btn btn-danger">Delete</button>'
+'<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>'
+'</div>');
modalInitJS.show();
}, false);
// another button to be used to reset modal content
var btnModalNotTrigger = document.getElementById('modalNotTriggerJS');
btnModalNotTrigger.addEventListener('click', function(e) {
e.preventDefault();
modalInitJS.setContent(firstModalContent);
modalInitJS.show();
}, false);
// NEW added events to Modal
myModalJS.addEventListener('show.bs.modal', function(e) {
var related = ', relatedTarget: '+ (e.relatedTarget ? e.relatedTarget.tagName + '.'+e.relatedTarget.className.replace(/\s/g,'.') : 'null');
console.log( 'The "show.bs.modal" event fired for #' + e.target.id + related );
}, false);
myModalJS.addEventListener('shown.bs.modal', function(e) {
var related = ', relatedTarget: '+ (e.relatedTarget ? e.relatedTarget.tagName + '.'+e.relatedTarget.className.replace(/\s/g,'.') : 'null');
console.log( 'The "shown.bs.modal" event fired for #' + e.target.id + related );
}, false);
myModalJS.addEventListener('hide.bs.modal', function(e) { console.log( 'The "hide.bs.modal" event fired for #' + e.target.id ); }, false);
myModalJS.addEventListener('hidden.bs.modal', function(e) { console.log( 'The "hidden.bs.modal" event fired for #' + e.target.id ); }, false);
// updating modal while visible
var modalUpdate = document.getElementById('modalUpdate'), // the trigger
anotherStaticModal = document.getElementById('anotherStaticModal'), // the modal
currentStaticModalBody = anotherStaticModal.querySelector('.modal-body'), // the body of the current modal
currentStaticModalBodyContent = currentStaticModalBody.innerHTML, // we cache the content of the body
modalUpdateInit = modalUpdate.Modal, // the initialization
changeModal1 = document.getElementById('changeModal1'), // the change buttons
changeModal2 = document.getElementById('changeModal2');
changeModal1.addEventListener('click', function(){
if (!/scroll/i.test(currentStaticModalBody.innerHTML)){
changeModal1.className += ' hidden';
changeModal2.className = changeModal2.className.replace(new RegExp('(\\s|^)hidden(\\s|$)','g'),'');
currentStaticModalBody.innerHTML = currentStaticModalBodyContent; // set
modalUpdateInit.update(); // trigger the update
}
}, false);
changeModal2.addEventListener('click', function(){
if (/scroll/i.test(currentStaticModalBody.innerHTML)){
changeModal2.className += ' hidden';
changeModal1.className = changeModal1.className.replace(new RegExp('(\\s|^)hidden(\\s|$)','g'),' ');
currentStaticModalBody.innerHTML = '<h4>This modal changed via JavaScript</h4><p>OK now this is a different content.</p>';
modalUpdateInit.update();
}
}, false);
// Dropdown init via JS
var makeMeDropdown = document.getElementById('makeMeDropdown');
var myDropdownTemplate = '<div class="dropdown btn-group">'
+'<button id="formDropdown" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" role="button" aria-expanded="false" tabindex="0">Login <span class="caret"></span></button>'
+'<form class="form-vertical dropdown-menu">'
+'<div class="form-group">'
+'<label for="inputEmail3" class="control-label">Email</label>'
+'<div class="">'
+'<input type="email" class="form-control" id="inputEmail3" placeholder="Email">'
+'</div>'
+'</div>'
+'<div class="form-group">'
+'<label for="inputPassword3" class="control-label">Password</label>'
+'<div class="">'
+'<input type="password" class="form-control" id="inputPassword3" placeholder="Password">'
+'</div>'
+'</div>'
+'<div class="form-group">'
+'<div class="">'
+'<div class="checkbox">'
+'<label>'
+'<input type="checkbox"> Remember me'
+'</label>'
+'</div>'
+'</div>'
+'</div>'
+'<div class="form-group">'
+'<div class="">'
+'<button type="submit" class="btn btn-default">Sign in</button>'
+'</div>'
+'</div>'
+'</form>'
+'</div>';
makeMeDropdown.addEventListener('click', function(e){
e.preventDefault();
if ( !/\bdisabled/.test(makeMeDropdown.className) ){
// invalidate the makeMeDropdown
this.setAttribute('disabled',true);
this.className = 'btn btn-default disabled';
this.innerHTML = 'All done';
this.parentNode.innerHTML += myDropdownTemplate;
//get the new dropdown
var formDropdown = document.getElementById('formDropdown');
// initiate with option
var DropdownInit = new Dropdown(formDropdown, true);
// NEW: attach Dropdown original events
formDropdown.parentNode.addEventListener('show.bs.dropdown', function(e){
var related = null;
related = ', relatedTarget: '+ (e.relatedTarget ? e.relatedTarget.tagName + '.'+e.relatedTarget.className.replace(/\s/g,'.') : 'null');
console.log('The show.bs.dropdown event fired for parent of #' + formDropdown.id + related );
}, false);
formDropdown.parentNode.addEventListener('shown.bs.dropdown', function(e){
var related = null;
related = ', relatedTarget: '+ (e.relatedTarget ? e.relatedTarget.tagName + '.'+e.relatedTarget.className.replace(/\s/g,'.') : 'null');
console.log('The shown.bs.dropdown event fired for parent of #' + formDropdown.id + related );
}, false);
formDropdown.parentNode.addEventListener('hide.bs.dropdown', function(e){
var related = null;
related = ', relatedTarget: '+ (e.relatedTarget ? e.relatedTarget.tagName + '.'+e.relatedTarget.className.replace(/\s/g,'.') : 'null');
console.log('The hide.bs.dropdown event fired for parent of #' + formDropdown.id + related );
}, false);
formDropdown.parentNode.addEventListener('hidden.bs.dropdown', function(e){
var related = null;
related = ', relatedTarget: '+ (e.relatedTarget ? e.relatedTarget.tagName + '.'+e.relatedTarget.className.replace(/\s/g,'.') : 'null');
console.log('The hidden.bs.dropdown event fired for parent of #' + formDropdown.id + related );
}, false);
}
}, false);
//switch views for tabs
var exampleTab = document.getElementById('exampleTab');
var tabsToggleView = document.getElementById('tabSwitcher');
var tabsDemo = document.getElementById('myTab');
tabsToggleView.addEventListener('click', function(e){
e.preventDefault();
if ( e.target.tagName === 'A' && e.target.getAttribute('data-nclass') !== undefined ) {
tabsDemo.className = e.target.getAttribute('data-nclass'); tabsToggleView.querySelector('button').innerHTML = 'Viewing ' + e.target.innerHTML
} else {
return false;
}
});
//demo alert fun
var dangerAlert = document.querySelector('.alert-danger'),
siblings = dangerAlert.parentNode.childNodes;
dangerAlert.addEventListener('closed.bs.alert', function(e) {
var successAlert = document.createElement('div');
successAlert.setAttribute('class','alert alert-success fade');
successAlert.setAttribute('role','alert');
successAlert.innerHTML = '<h4>Wow you REALLY got no error!</h4><p>Javascript isn\'t fun? Well, think again.</p>';
successAlert.innerHTML += '<p>I just didn\'t want this section to be empty, looks awful..</p>';
dangerAlert.parentNode.insertBefore(successAlert,siblings[siblings.length-2]);
if (successAlert.classList) {
successAlert.classList.add('in');
} else {
successAlert.className += ' in';
}
});
// NEW Alert events
document.getElementById('alertDemo').addEventListener('close.bs.alert', function(e) { console.log( 'The "close.bs.alert" event fired for #' + e.target.id ); });
document.getElementById('alertDemo').addEventListener('closed.bs.alert', function(e) { console.log( 'The "closed.bs.alert" event fired for #' + e.target.id ); });
//demo popover. trigger via click
var popover1 = new Popover('#popover-via-click', { trigger: 'click'} );
// demo popover, using template
var someTitleFromOtherCode = 'Popover via JavaScript <span class="label label-primary">FOCUS</span>';
var someContentFromOuterSpace = '<p>Some sample message from outer space wrapped in &lt;p&gt; tags. You can add your own functions to combine with Popover template as you wish.</p>';
var popover2 = new Popover('.popover-via-template', {
trigger: 'focus',
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title">'+someTitleFromOtherCode+'</h3><div class="popover-content">'+someContentFromOuterSpace+'</div></div>'
});
// new Popover events
var popoverEvents = document.getElementById('popoverWithEvents');
popoverEvents.addEventListener('show.bs.popover', function(){ console.log('The show.bs.popover event fired for #' + popoverEvents.id); }, false);
popoverEvents.addEventListener('shown.bs.popover', function(){ console.log('The shown.bs.popover event fired for #' + popoverEvents.id); }, false);
popoverEvents.addEventListener('hide.bs.popover', function(){ console.log('The hide.bs.popover event fired for #' + popoverEvents.id); }, false);
popoverEvents.addEventListener('hidden.bs.popover', function(){ console.log('The hidden.bs.popover event fired for #' + popoverEvents.id); }, false);
//demo button
var btn = document.getElementById('myButton');
var success = document.getElementById('successButton'), successOuter = success.outerHTML;
btn.addEventListener('click', function() {
Button(btn,'loading');
setTimeout(function() {
if ( !document.getElementById('successButton') ) {
var newSuccess = document.createElement('div');
btn.parentNode.parentNode.insertBefore(newSuccess, btn.parentNode.nextSibling);
newSuccess.outerHTML = successOuter;
// reidentify the new alert and reinit alert
success = document.getElementById('successButton');
new Alert(success.querySelector('[data-dismiss="alert"]')); // initialize if not already
}
success.style.display = 'block';
setTimeout(function(){
success.className += ' in';
}, 10)
Button(btn,'reset');
}, 2000)
});
//demo carousel-example-generic demonstrating the slid and slide events
var genericCarousel = document.getElementById('carousel-example-generic');
genericCarousel.addEventListener('slide.bs.carousel', function(e) {
console.log( 'The #' + e.target.id + ' is about to slide, and this was the "slide" event, direction: ' + genericCarousel.Carousel.direction + ', relatedTarget: ' + e.relatedTarget.tagName + '.' + e.relatedTarget.className );
});
genericCarousel.addEventListener('slid.bs.carousel', function(e) {
console.log( 'The #' + e.target.id + ' has finished the slide transition, and this was the "slid" event, direction: ' + genericCarousel.Carousel.direction + ', relatedTarget: ' + e.relatedTarget.tagName + '.' + e.relatedTarget.className );
});
//demo myCarousel demonstrating the slid and slide events
var mainSlider = document.getElementById('myCarousel');
var mainSliderItems = mainSlider.querySelectorAll('.item');
mainSlider.addEventListener('slide.bs.carousel', function(e) {
var currentActive = mainSlider.Carousel.getActiveIndex();
var activeCaption = mainSliderItems[currentActive].querySelector('.carousel-caption');
activeCaption.classList.remove('slide');
});
mainSlider.addEventListener('slid.bs.carousel', function(e) {
var activeCaption = e.relatedTarget.querySelector('.carousel-caption');
activeCaption.classList.add('slide');
});
// JS init for carousel example
// var exampleCarousel = document.getElementById('carousel-example-generic');
// var exampleCarouselInit = new Carousel(exampleCarousel);
/* side-nav autoresize on window scroll and resize */
var sideNav = document.getElementById('side-nav');
if ( document.documentElement && !/ie/.test(document.documentElement.className) ) {
function resetNav() {
document.getElementById('nav-scrollspy').style.width = '';
}
function adjustNav() {
var ww = window.innerWidth || document.documentElement.clientWidth;
if ( ww >= 768 ) {
document.getElementById('nav-scrollspy').style.width = (sideNav.offsetWidth - 15) + 'px';
} else { resetNav() }
}
adjustNav();
window.addEventListener('resize', adjustNav, false)// adjust on resize
}
// KUTE.js scrollTo
var sideLinks = sideNav.getElementsByTagName("A"),
scrollTo = function(e){
var target = document.getElementById(e.target.getAttribute('href').replace('#',''));
e.preventDefault();
document.documentElement.scrollTop = target.getBoundingClientRect().top + (window.pageYOffset||document.documentElement.scrollTop) - (i===0?0:60);
};
for (var i=0, sll=sideLinks.length; i<sll; i++) {
sideLinks[i].addEventListener('click', scrollTo, false);
}
// scrollSpy stuff
var mainContainerSpy = document.querySelector('[data-target="#side-nav"]');
mainContainerSpy.addEventListener('activate.bs.scrollspy', function(e){
var navScrollspy = document.getElementById('nav-scrollspy');
var componentsItem = navScrollspy.querySelector('li.list11');
var target = e.relatedTarget;
if ( componentsItem === target.parentNode || componentsItem.querySelector('li.active') === target.parentNode ) {
if ( componentsItem.querySelector('.list5.active') ){
componentsItem.classList.add('additional');
} else {
componentsItem.classList.remove('additional');
}
}
}, false);
/* BOOTSTRAP ORIGINAL EVENTS
---------------------------*/
// demo for Button toggle, renamed from bs.button.change to change.bs.button
var checkboxes = document.getElementById('checkboxButtons'); // checkboxes grpup
var radioButtons = document.getElementById('radioButtons'); // radioButtons grpup
var checkBtns = checkboxes.querySelectorAll('input[type="checkbox"]'); // checkboxes
var radioBtns = radioButtons.querySelectorAll('input[type="radio"]'); // radios
checkboxes.addEventListener('change.bs.button', function() { console.log( 'The button group with CHECKBOXES changed' ); });
checkBtns[0].addEventListener('change.bs.button',function() { console.log( 'Hopa! This handler is bound by the "change" of the FIRST CHECKBOX only.' ); });
document.getElementById('radioButtons').addEventListener('change.bs.button', function() { console.log( 'The button group with RADIOS changed' ); });
radioBtns[0].addEventListener('change.bs.button', function() { console.log( 'This handler is bound by the "change" of the FIRST RADIO button only.' ); });
// new Affix events, well some of them
var navScrollspy = document.getElementById('nav-scrollspy');
navScrollspy.addEventListener('affix.bs.affix', function(e) { console.log( 'The "affix.bs.affix" event fired for #' + e.target.id );}, false );
navScrollspy.addEventListener('affix-top.bs.affix', function(e) { console.log( 'The "affix-top.bs.affix" event fired for #' + e.target.id );}, false );
navScrollspy.addEventListener('affix-bottom.bs.affix', function(e) { console.log( 'The "affix-bottom.bs.affix" event fired for #' + e.target.id ); }, false );
// new Collapse events
var collapseExample = document.getElementById('collapseExample');
collapseExample.addEventListener('show.bs.collapse', function(){ console.log('The show.bs.collapse event fired for #' + collapseExample.id); },false);
collapseExample.addEventListener('shown.bs.collapse', function(){ console.log('The shown.bs.collapse event fired for #' + collapseExample.id); },false);
collapseExample.addEventListener('hide.bs.collapse', function(){ console.log('The hide.bs.collapse event fired for #' + collapseExample.id); },false);
collapseExample.addEventListener('hidden.bs.collapse', function(){ console.log('The hidden.bs.collapse event fired for #' + collapseExample.id); },false);
// new ScrollSpy events
var scrollSpyElement = document.querySelector('[data-target="#navbar-example"]');
scrollSpyElement.addEventListener('activate.bs.scrollspy', function(e){
var related = e.relatedTarget ? (' by relatedTarget: ' + e.relatedTarget.tagName + '.' + e.relatedTarget.getAttribute('href') ) : '';
console.log('The activate.bs.scrollspy event fired for div[data-target="#navbar-example"]' + related );
}, false);
// new Tab events
var tabEventsExample = document.getElementById('tabEventsExample'),
tabEventsExampleInit = new Tab(tabEventsExample, {preserve: true});
tabEventsExample.addEventListener('show.bs.tab', function() { console.log('The show.bs.tab event fired for #' + tabEventsExample.id); }, false);
tabEventsExample.addEventListener('shown.bs.tab', function() { console.log('The shown.bs.tab event fired for #' + tabEventsExample.id); }, false);
tabEventsExample.addEventListener('hide.bs.tab', function() { console.log('The hide.bs.tab event fired for #' + tabEventsExample.id); }, false);
tabEventsExample.addEventListener('hidden.bs.tab', function() { console.log('The hidden.bs.tab event fired for #' + tabEventsExample.id); }, false);
// new Tooltip events
var tooltipEvents = document.getElementById('tooltipWithEvents');
tooltipEvents.addEventListener('show.bs.tooltip', function(){ console.log('The show.bs.tooltip event fired for #' + tooltipEvents.id); }, false);
tooltipEvents.addEventListener('shown.bs.tooltip', function(){ console.log('The shown.bs.tooltip event fired for #' + tooltipEvents.id); }, false);
tooltipEvents.addEventListener('hide.bs.tooltip', function(){ console.log('The hide.bs.tooltip event fired for #' + tooltipEvents.id); }, false);
tooltipEvents.addEventListener('hidden.bs.tooltip', function(){ console.log('The hidden.bs.tooltip event fired for #' + tooltipEvents.id); }, false);
// transparent navbar
var navbar = document.querySelector('.navbar-fixed-top'), scrollTimer = null,
mouseHover = ('onmouseleave' in document) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ];
navbar.style.backfaceVisibility = 'hidden';
navbar.style.transition = 'opacity 0.5s linear 0s';
navbar.style.WebkitTransition = 'opacity 0.5s linear 0s';
function setNavbarOpacity(){
clearTimeout(scrollTimer);
scrollTimer = !navbar.classList.contains('HOVER') ? setTimeout(function(){
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if ( scrollTop < 120 ){
navbar.style.opacity = 1
} else {
navbar.style.opacity = 0.7
}
},50) : function() {return false;}
}
function setNavbarOpacityOnEnter(){
clearTimeout(scrollTimer);
scrollTimer = setTimeout(function(){
if (!navbar.classList.contains('HOVER')) {
navbar.classList.add('HOVER');
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if ( scrollTop > 120 ){
navbar.style.opacity = 1
}
}
},0)
}
function setNavbarOpacityOnLeave(){
clearTimeout(scrollTimer);
scrollTimer = setTimeout(function(){
if (navbar.classList.contains('HOVER')) {
navbar.classList.remove('HOVER');
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if ( scrollTop > 120 ){
navbar.style.opacity = 0.7
}
}
},0)
}
document.addEventListener('DOMContentLoaded', setNavbarOpacity, false);
window.addEventListener('scroll', setNavbarOpacity, false);
navbar.addEventListener(mouseHover[0],setNavbarOpacityOnEnter,false);
navbar.addEventListener(mouseHover[1],setNavbarOpacityOnLeave,false);
// transparent navbar
var navbar = document.querySelector('.fixed-top'), scrollTimer = null,
mouseHover = ('onmouseleave' in document) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ];
navbar.style.backfaceVisibility = 'hidden';
navbar.style.transition = 'opacity 0.5s linear 0s';
navbar.style.WebkitTransition = 'opacity 0.5s linear 0s';
function setNavbarOpacity(){
clearTimeout(scrollTimer);
scrollTimer = !navbar.classList.contains('HOVER') ? setTimeout(function(){
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if ( scrollTop < 120 ){
navbar.style.opacity = 1
} else {
navbar.style.opacity = 0.7
}
},50) : function() {return false;}
}
function setNavbarOpacityOnEnter(){
clearTimeout(scrollTimer);
scrollTimer = setTimeout(function(){
if (!navbar.classList.contains('HOVER')) {
navbar.classList.add('HOVER');
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if ( scrollTop > 120 ){
navbar.style.opacity = 1
}
}
},0)
}
function setNavbarOpacityOnLeave(){
clearTimeout(scrollTimer);
scrollTimer = setTimeout(function(){
if (navbar.classList.contains('HOVER')) {
navbar.classList.remove('HOVER');
var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if ( scrollTop > 120 ){
navbar.style.opacity = 0.7
}
}
},0)
}
document.addEventListener('DOMContentLoaded', setNavbarOpacity, false);
window.addEventListener('scroll', setNavbarOpacity, false);
navbar.addEventListener(mouseHover[0],setNavbarOpacityOnEnter,false);
navbar.addEventListener(mouseHover[1],setNavbarOpacityOnLeave,false);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment