diff --git a/public/css/app.css b/public/css/app.css
index 49883b03..49910bb0 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -1,9942 +1,9 @@
-@charset "UTF-8";
 /*!
  * Bootstrap v4.4.1 (https://getbootstrap.com/)
  * Copyright 2011-2019 The Bootstrap Authors
  * Copyright 2011-2019 Twitter, Inc.
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-:root {
-  --blue: #007bff;
-  --indigo: #6610f2;
-  --purple: #6f42c1;
-  --pink: #e83e8c;
-  --red: #dc3545;
-  --orange: #fd7e14;
-  --yellow: #ffc107;
-  --green: #28a745;
-  --teal: #20c997;
-  --cyan: #17a2b8;
-  --white: #fff;
-  --gray: #6c757d;
-  --gray-dark: #343a40;
-  --primary: #007bff;
-  --secondary: #6c757d;
-  --success: #28a745;
-  --info: #17a2b8;
-  --warning: #ffc107;
-  --danger: #dc3545;
-  --light: #f8f9fa;
-  --dark: #343a40;
-  --breakpoint-xs: 0;
-  --breakpoint-sm: 576px;
-  --breakpoint-md: 768px;
-  --breakpoint-lg: 992px;
-  --breakpoint-xl: 1200px;
-  --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
-}
-
-*,
-*::before,
-*::after {
-  box-sizing: border-box;
-}
-
-html {
-  font-family: sans-serif;
-  line-height: 1.15;
-  -webkit-text-size-adjust: 100%;
-  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-
-article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
-  display: block;
-}
-
-body {
-  margin: 0;
-  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-  font-size: 1rem;
-  font-weight: 400;
-  line-height: 1.5;
-  color: #212529;
-  text-align: left;
-  background-color: #fff;
-}
-
-[tabindex="-1"]:focus:not(:focus-visible) {
-  outline: 0 !important;
-}
-
-hr {
-  box-sizing: content-box;
-  height: 0;
-  overflow: visible;
-}
-
-h1, h2, h3, h4, h5, h6 {
-  margin-top: 0;
-  margin-bottom: 0.5rem;
-}
-
-p {
-  margin-top: 0;
-  margin-bottom: 1rem;
-}
-
-abbr[title],
-abbr[data-original-title] {
-  text-decoration: underline;
-  -webkit-text-decoration: underline dotted;
-          text-decoration: underline dotted;
-  cursor: help;
-  border-bottom: 0;
-  -webkit-text-decoration-skip-ink: none;
-          text-decoration-skip-ink: none;
-}
-
-address {
-  margin-bottom: 1rem;
-  font-style: normal;
-  line-height: inherit;
-}
-
-ol,
-ul,
-dl {
-  margin-top: 0;
-  margin-bottom: 1rem;
-}
-
-ol ol,
-ul ul,
-ol ul,
-ul ol {
-  margin-bottom: 0;
-}
-
-dt {
-  font-weight: 700;
-}
-
-dd {
-  margin-bottom: 0.5rem;
-  margin-left: 0;
-}
-
-blockquote {
-  margin: 0 0 1rem;
-}
-
-b,
-strong {
-  font-weight: bolder;
-}
-
-small {
-  font-size: 80%;
-}
-
-sub,
-sup {
-  position: relative;
-  font-size: 75%;
-  line-height: 0;
-  vertical-align: baseline;
-}
-
-sub {
-  bottom: -0.25em;
-}
-
-sup {
-  top: -0.5em;
-}
-
-a {
-  color: #007bff;
-  text-decoration: none;
-  background-color: transparent;
-}
-a:hover {
-  color: #0056b3;
-  text-decoration: underline;
-}
-
-a:not([href]) {
-  color: inherit;
-  text-decoration: none;
-}
-a:not([href]):hover {
-  color: inherit;
-  text-decoration: none;
-}
-
-pre,
-code,
-kbd,
-samp {
-  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
-  font-size: 1em;
-}
-
-pre {
-  margin-top: 0;
-  margin-bottom: 1rem;
-  overflow: auto;
-}
-
-figure {
-  margin: 0 0 1rem;
-}
-
-img {
-  vertical-align: middle;
-  border-style: none;
-}
-
-svg {
-  overflow: hidden;
-  vertical-align: middle;
-}
-
-table {
-  border-collapse: collapse;
-}
-
-caption {
-  padding-top: 0.75rem;
-  padding-bottom: 0.75rem;
-  color: #6c757d;
-  text-align: left;
-  caption-side: bottom;
-}
-
-th {
-  text-align: inherit;
-}
-
-label {
-  display: inline-block;
-  margin-bottom: 0.5rem;
-}
-
-button {
-  border-radius: 0;
-}
-
-button:focus {
-  outline: 1px dotted;
-  outline: 5px auto -webkit-focus-ring-color;
-}
-
-input,
-button,
-select,
-optgroup,
-textarea {
-  margin: 0;
-  font-family: inherit;
-  font-size: inherit;
-  line-height: inherit;
-}
-
-button,
-input {
-  overflow: visible;
-}
-
-button,
-select {
-  text-transform: none;
-}
-
-select {
-  word-wrap: normal;
-}
-
-button,
-[type=button],
-[type=reset],
-[type=submit] {
-  -webkit-appearance: button;
-}
-
-button:not(:disabled),
-[type=button]:not(:disabled),
-[type=reset]:not(:disabled),
-[type=submit]:not(:disabled) {
-  cursor: pointer;
-}
-
-button::-moz-focus-inner,
-[type=button]::-moz-focus-inner,
-[type=reset]::-moz-focus-inner,
-[type=submit]::-moz-focus-inner {
-  padding: 0;
-  border-style: none;
-}
-
-input[type=radio],
-input[type=checkbox] {
-  box-sizing: border-box;
-  padding: 0;
-}
-
-input[type=date],
-input[type=time],
-input[type=datetime-local],
-input[type=month] {
-  -webkit-appearance: listbox;
-}
-
-textarea {
-  overflow: auto;
-  resize: vertical;
-}
-
-fieldset {
-  min-width: 0;
-  padding: 0;
-  margin: 0;
-  border: 0;
-}
-
-legend {
-  display: block;
-  width: 100%;
-  max-width: 100%;
-  padding: 0;
-  margin-bottom: 0.5rem;
-  font-size: 1.5rem;
-  line-height: inherit;
-  color: inherit;
-  white-space: normal;
-}
-
-progress {
-  vertical-align: baseline;
-}
-
-[type=number]::-webkit-inner-spin-button,
-[type=number]::-webkit-outer-spin-button {
-  height: auto;
-}
-
-[type=search] {
-  outline-offset: -2px;
-  -webkit-appearance: none;
-}
-
-[type=search]::-webkit-search-decoration {
-  -webkit-appearance: none;
-}
-
-::-webkit-file-upload-button {
-  font: inherit;
-  -webkit-appearance: button;
-}
-
-output {
-  display: inline-block;
-}
-
-summary {
-  display: list-item;
-  cursor: pointer;
-}
-
-template {
-  display: none;
-}
-
-[hidden] {
-  display: none !important;
-}
-
-h1, h2, h3, h4, h5, h6,
-.h1, .h2, .h3, .h4, .h5, .h6 {
-  margin-bottom: 0.5rem;
-  font-weight: 500;
-  line-height: 1.2;
-}
-
-h1, .h1 {
-  font-size: 2.5rem;
-}
-
-h2, .h2 {
-  font-size: 2rem;
-}
-
-h3, .h3 {
-  font-size: 1.75rem;
-}
-
-h4, .h4 {
-  font-size: 1.5rem;
-}
-
-h5, .h5 {
-  font-size: 1.25rem;
-}
-
-h6, .h6 {
-  font-size: 1rem;
-}
-
-.lead {
-  font-size: 1.25rem;
-  font-weight: 300;
-}
-
-.display-1 {
-  font-size: 6rem;
-  font-weight: 300;
-  line-height: 1.2;
-}
-
-.display-2 {
-  font-size: 5.5rem;
-  font-weight: 300;
-  line-height: 1.2;
-}
-
-.display-3 {
-  font-size: 4.5rem;
-  font-weight: 300;
-  line-height: 1.2;
-}
-
-.display-4 {
-  font-size: 3.5rem;
-  font-weight: 300;
-  line-height: 1.2;
-}
-
-hr {
-  margin-top: 1rem;
-  margin-bottom: 1rem;
-  border: 0;
-  border-top: 1px solid rgba(0, 0, 0, 0.1);
-}
-
-small,
-.small {
-  font-size: 80%;
-  font-weight: 400;
-}
-
-mark,
-.mark {
-  padding: 0.2em;
-  background-color: #fcf8e3;
-}
-
-.list-unstyled {
-  padding-left: 0;
-  list-style: none;
-}
-
-.list-inline {
-  padding-left: 0;
-  list-style: none;
-}
-
-.list-inline-item {
-  display: inline-block;
-}
-.list-inline-item:not(:last-child) {
-  margin-right: 0.5rem;
-}
-
-.initialism {
-  font-size: 90%;
-  text-transform: uppercase;
-}
-
-.blockquote {
-  margin-bottom: 1rem;
-  font-size: 1.25rem;
-}
-
-.blockquote-footer {
-  display: block;
-  font-size: 80%;
-  color: #6c757d;
-}
-.blockquote-footer::before {
-  content: "— ";
-}
-
-.img-fluid {
-  max-width: 100%;
-  height: auto;
-}
-
-.img-thumbnail {
-  padding: 0.25rem;
-  background-color: #fff;
-  border: 1px solid #dee2e6;
-  border-radius: 0.25rem;
-  max-width: 100%;
-  height: auto;
-}
-
-.figure {
-  display: inline-block;
-}
-
-.figure-img {
-  margin-bottom: 0.5rem;
-  line-height: 1;
-}
-
-.figure-caption {
-  font-size: 90%;
-  color: #6c757d;
-}
-
-code {
-  font-size: 87.5%;
-  color: #e83e8c;
-  word-wrap: break-word;
-}
-a > code {
-  color: inherit;
-}
-
-kbd {
-  padding: 0.2rem 0.4rem;
-  font-size: 87.5%;
-  color: #fff;
-  background-color: #212529;
-  border-radius: 0.2rem;
-}
-kbd kbd {
-  padding: 0;
-  font-size: 100%;
-  font-weight: 700;
-}
-
-pre {
-  display: block;
-  font-size: 87.5%;
-  color: #212529;
-}
-pre code {
-  font-size: inherit;
-  color: inherit;
-  word-break: normal;
-}
-
-.pre-scrollable {
-  max-height: 340px;
-  overflow-y: scroll;
-}
-
-.container {
-  width: 100%;
-  padding-right: 15px;
-  padding-left: 15px;
-  margin-right: auto;
-  margin-left: auto;
-}
-@media (min-width: 576px) {
-  .container {
-    max-width: 540px;
-  }
-}
-@media (min-width: 768px) {
-  .container {
-    max-width: 720px;
-  }
-}
-@media (min-width: 992px) {
-  .container {
-    max-width: 960px;
-  }
-}
-@media (min-width: 1200px) {
-  .container {
-    max-width: 1140px;
-  }
-}
-
-.container-fluid, .container-xl, .container-lg, .container-md, .container-sm {
-  width: 100%;
-  padding-right: 15px;
-  padding-left: 15px;
-  margin-right: auto;
-  margin-left: auto;
-}
-
-@media (min-width: 576px) {
-  .container-sm, .container {
-    max-width: 540px;
-  }
-}
-@media (min-width: 768px) {
-  .container-md, .container-sm, .container {
-    max-width: 720px;
-  }
-}
-@media (min-width: 992px) {
-  .container-lg, .container-md, .container-sm, .container {
-    max-width: 960px;
-  }
-}
-@media (min-width: 1200px) {
-  .container-xl, .container-lg, .container-md, .container-sm, .container {
-    max-width: 1140px;
-  }
-}
-.row {
-  display: flex;
-  flex-wrap: wrap;
-  margin-right: -15px;
-  margin-left: -15px;
-}
-
-.no-gutters {
-  margin-right: 0;
-  margin-left: 0;
-}
-.no-gutters > .col,
-.no-gutters > [class*=col-] {
-  padding-right: 0;
-  padding-left: 0;
-}
-
-.col-xl,
-.col-xl-auto, .col-xl-12, .col-xl-11, .col-xl-10, .col-xl-9, .col-xl-8, .col-xl-7, .col-xl-6, .col-xl-5, .col-xl-4, .col-xl-3, .col-xl-2, .col-xl-1, .col-lg,
-.col-lg-auto, .col-lg-12, .col-lg-11, .col-lg-10, .col-lg-9, .col-lg-8, .col-lg-7, .col-lg-6, .col-lg-5, .col-lg-4, .col-lg-3, .col-lg-2, .col-lg-1, .col-md,
-.col-md-auto, .col-md-12, .col-md-11, .col-md-10, .col-md-9, .col-md-8, .col-md-7, .col-md-6, .col-md-5, .col-md-4, .col-md-3, .col-md-2, .col-md-1, .col-sm,
-.col-sm-auto, .col-sm-12, .col-sm-11, .col-sm-10, .col-sm-9, .col-sm-8, .col-sm-7, .col-sm-6, .col-sm-5, .col-sm-4, .col-sm-3, .col-sm-2, .col-sm-1, .col,
-.col-auto, .col-12, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 {
-  position: relative;
-  width: 100%;
-  padding-right: 15px;
-  padding-left: 15px;
-}
-
-.col {
-  flex-basis: 0;
-  flex-grow: 1;
-  max-width: 100%;
-}
-
-.row-cols-1 > * {
-  flex: 0 0 100%;
-  max-width: 100%;
-}
-
-.row-cols-2 > * {
-  flex: 0 0 50%;
-  max-width: 50%;
-}
-
-.row-cols-3 > * {
-  flex: 0 0 33.3333333333%;
-  max-width: 33.3333333333%;
-}
-
-.row-cols-4 > * {
-  flex: 0 0 25%;
-  max-width: 25%;
-}
-
-.row-cols-5 > * {
-  flex: 0 0 20%;
-  max-width: 20%;
-}
-
-.row-cols-6 > * {
-  flex: 0 0 16.6666666667%;
-  max-width: 16.6666666667%;
-}
-
-.col-auto {
-  flex: 0 0 auto;
-  width: auto;
-  max-width: 100%;
-}
-
-.col-1 {
-  flex: 0 0 8.3333333333%;
-  max-width: 8.3333333333%;
-}
-
-.col-2 {
-  flex: 0 0 16.6666666667%;
-  max-width: 16.6666666667%;
-}
-
-.col-3 {
-  flex: 0 0 25%;
-  max-width: 25%;
-}
-
-.col-4 {
-  flex: 0 0 33.3333333333%;
-  max-width: 33.3333333333%;
-}
-
-.col-5 {
-  flex: 0 0 41.6666666667%;
-  max-width: 41.6666666667%;
-}
-
-.col-6 {
-  flex: 0 0 50%;
-  max-width: 50%;
-}
-
-.col-7 {
-  flex: 0 0 58.3333333333%;
-  max-width: 58.3333333333%;
-}
-
-.col-8 {
-  flex: 0 0 66.6666666667%;
-  max-width: 66.6666666667%;
-}
-
-.col-9 {
-  flex: 0 0 75%;
-  max-width: 75%;
-}
-
-.col-10 {
-  flex: 0 0 83.3333333333%;
-  max-width: 83.3333333333%;
-}
-
-.col-11 {
-  flex: 0 0 91.6666666667%;
-  max-width: 91.6666666667%;
-}
-
-.col-12 {
-  flex: 0 0 100%;
-  max-width: 100%;
-}
-
-.order-first {
-  order: -1;
-}
-
-.order-last {
-  order: 13;
-}
-
-.order-0 {
-  order: 0;
-}
-
-.order-1 {
-  order: 1;
-}
-
-.order-2 {
-  order: 2;
-}
-
-.order-3 {
-  order: 3;
-}
-
-.order-4 {
-  order: 4;
-}
-
-.order-5 {
-  order: 5;
-}
-
-.order-6 {
-  order: 6;
-}
-
-.order-7 {
-  order: 7;
-}
-
-.order-8 {
-  order: 8;
-}
-
-.order-9 {
-  order: 9;
-}
-
-.order-10 {
-  order: 10;
-}
-
-.order-11 {
-  order: 11;
-}
-
-.order-12 {
-  order: 12;
-}
-
-.offset-1 {
-  margin-left: 8.3333333333%;
-}
-
-.offset-2 {
-  margin-left: 16.6666666667%;
-}
-
-.offset-3 {
-  margin-left: 25%;
-}
-
-.offset-4 {
-  margin-left: 33.3333333333%;
-}
-
-.offset-5 {
-  margin-left: 41.6666666667%;
-}
-
-.offset-6 {
-  margin-left: 50%;
-}
-
-.offset-7 {
-  margin-left: 58.3333333333%;
-}
-
-.offset-8 {
-  margin-left: 66.6666666667%;
-}
-
-.offset-9 {
-  margin-left: 75%;
-}
-
-.offset-10 {
-  margin-left: 83.3333333333%;
-}
-
-.offset-11 {
-  margin-left: 91.6666666667%;
-}
-
-@media (min-width: 576px) {
-  .col-sm {
-    flex-basis: 0;
-    flex-grow: 1;
-    max-width: 100%;
-  }
-
-  .row-cols-sm-1 > * {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .row-cols-sm-2 > * {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .row-cols-sm-3 > * {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .row-cols-sm-4 > * {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .row-cols-sm-5 > * {
-    flex: 0 0 20%;
-    max-width: 20%;
-  }
-
-  .row-cols-sm-6 > * {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-sm-auto {
-    flex: 0 0 auto;
-    width: auto;
-    max-width: 100%;
-  }
-
-  .col-sm-1 {
-    flex: 0 0 8.3333333333%;
-    max-width: 8.3333333333%;
-  }
-
-  .col-sm-2 {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-sm-3 {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .col-sm-4 {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .col-sm-5 {
-    flex: 0 0 41.6666666667%;
-    max-width: 41.6666666667%;
-  }
-
-  .col-sm-6 {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .col-sm-7 {
-    flex: 0 0 58.3333333333%;
-    max-width: 58.3333333333%;
-  }
-
-  .col-sm-8 {
-    flex: 0 0 66.6666666667%;
-    max-width: 66.6666666667%;
-  }
-
-  .col-sm-9 {
-    flex: 0 0 75%;
-    max-width: 75%;
-  }
-
-  .col-sm-10 {
-    flex: 0 0 83.3333333333%;
-    max-width: 83.3333333333%;
-  }
-
-  .col-sm-11 {
-    flex: 0 0 91.6666666667%;
-    max-width: 91.6666666667%;
-  }
-
-  .col-sm-12 {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .order-sm-first {
-    order: -1;
-  }
-
-  .order-sm-last {
-    order: 13;
-  }
-
-  .order-sm-0 {
-    order: 0;
-  }
-
-  .order-sm-1 {
-    order: 1;
-  }
-
-  .order-sm-2 {
-    order: 2;
-  }
-
-  .order-sm-3 {
-    order: 3;
-  }
-
-  .order-sm-4 {
-    order: 4;
-  }
-
-  .order-sm-5 {
-    order: 5;
-  }
-
-  .order-sm-6 {
-    order: 6;
-  }
-
-  .order-sm-7 {
-    order: 7;
-  }
-
-  .order-sm-8 {
-    order: 8;
-  }
-
-  .order-sm-9 {
-    order: 9;
-  }
-
-  .order-sm-10 {
-    order: 10;
-  }
-
-  .order-sm-11 {
-    order: 11;
-  }
-
-  .order-sm-12 {
-    order: 12;
-  }
-
-  .offset-sm-0 {
-    margin-left: 0;
-  }
-
-  .offset-sm-1 {
-    margin-left: 8.3333333333%;
-  }
-
-  .offset-sm-2 {
-    margin-left: 16.6666666667%;
-  }
-
-  .offset-sm-3 {
-    margin-left: 25%;
-  }
-
-  .offset-sm-4 {
-    margin-left: 33.3333333333%;
-  }
-
-  .offset-sm-5 {
-    margin-left: 41.6666666667%;
-  }
-
-  .offset-sm-6 {
-    margin-left: 50%;
-  }
-
-  .offset-sm-7 {
-    margin-left: 58.3333333333%;
-  }
-
-  .offset-sm-8 {
-    margin-left: 66.6666666667%;
-  }
-
-  .offset-sm-9 {
-    margin-left: 75%;
-  }
-
-  .offset-sm-10 {
-    margin-left: 83.3333333333%;
-  }
-
-  .offset-sm-11 {
-    margin-left: 91.6666666667%;
-  }
-}
-@media (min-width: 768px) {
-  .col-md {
-    flex-basis: 0;
-    flex-grow: 1;
-    max-width: 100%;
-  }
-
-  .row-cols-md-1 > * {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .row-cols-md-2 > * {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .row-cols-md-3 > * {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .row-cols-md-4 > * {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .row-cols-md-5 > * {
-    flex: 0 0 20%;
-    max-width: 20%;
-  }
-
-  .row-cols-md-6 > * {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-md-auto {
-    flex: 0 0 auto;
-    width: auto;
-    max-width: 100%;
-  }
-
-  .col-md-1 {
-    flex: 0 0 8.3333333333%;
-    max-width: 8.3333333333%;
-  }
-
-  .col-md-2 {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-md-3 {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .col-md-4 {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .col-md-5 {
-    flex: 0 0 41.6666666667%;
-    max-width: 41.6666666667%;
-  }
-
-  .col-md-6 {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .col-md-7 {
-    flex: 0 0 58.3333333333%;
-    max-width: 58.3333333333%;
-  }
-
-  .col-md-8 {
-    flex: 0 0 66.6666666667%;
-    max-width: 66.6666666667%;
-  }
-
-  .col-md-9 {
-    flex: 0 0 75%;
-    max-width: 75%;
-  }
-
-  .col-md-10 {
-    flex: 0 0 83.3333333333%;
-    max-width: 83.3333333333%;
-  }
-
-  .col-md-11 {
-    flex: 0 0 91.6666666667%;
-    max-width: 91.6666666667%;
-  }
-
-  .col-md-12 {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .order-md-first {
-    order: -1;
-  }
-
-  .order-md-last {
-    order: 13;
-  }
-
-  .order-md-0 {
-    order: 0;
-  }
-
-  .order-md-1 {
-    order: 1;
-  }
-
-  .order-md-2 {
-    order: 2;
-  }
-
-  .order-md-3 {
-    order: 3;
-  }
-
-  .order-md-4 {
-    order: 4;
-  }
-
-  .order-md-5 {
-    order: 5;
-  }
-
-  .order-md-6 {
-    order: 6;
-  }
-
-  .order-md-7 {
-    order: 7;
-  }
-
-  .order-md-8 {
-    order: 8;
-  }
-
-  .order-md-9 {
-    order: 9;
-  }
-
-  .order-md-10 {
-    order: 10;
-  }
-
-  .order-md-11 {
-    order: 11;
-  }
-
-  .order-md-12 {
-    order: 12;
-  }
-
-  .offset-md-0 {
-    margin-left: 0;
-  }
-
-  .offset-md-1 {
-    margin-left: 8.3333333333%;
-  }
-
-  .offset-md-2 {
-    margin-left: 16.6666666667%;
-  }
-
-  .offset-md-3 {
-    margin-left: 25%;
-  }
-
-  .offset-md-4 {
-    margin-left: 33.3333333333%;
-  }
-
-  .offset-md-5 {
-    margin-left: 41.6666666667%;
-  }
-
-  .offset-md-6 {
-    margin-left: 50%;
-  }
-
-  .offset-md-7 {
-    margin-left: 58.3333333333%;
-  }
-
-  .offset-md-8 {
-    margin-left: 66.6666666667%;
-  }
-
-  .offset-md-9 {
-    margin-left: 75%;
-  }
-
-  .offset-md-10 {
-    margin-left: 83.3333333333%;
-  }
-
-  .offset-md-11 {
-    margin-left: 91.6666666667%;
-  }
-}
-@media (min-width: 992px) {
-  .col-lg {
-    flex-basis: 0;
-    flex-grow: 1;
-    max-width: 100%;
-  }
-
-  .row-cols-lg-1 > * {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .row-cols-lg-2 > * {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .row-cols-lg-3 > * {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .row-cols-lg-4 > * {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .row-cols-lg-5 > * {
-    flex: 0 0 20%;
-    max-width: 20%;
-  }
-
-  .row-cols-lg-6 > * {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-lg-auto {
-    flex: 0 0 auto;
-    width: auto;
-    max-width: 100%;
-  }
-
-  .col-lg-1 {
-    flex: 0 0 8.3333333333%;
-    max-width: 8.3333333333%;
-  }
-
-  .col-lg-2 {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-lg-3 {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .col-lg-4 {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .col-lg-5 {
-    flex: 0 0 41.6666666667%;
-    max-width: 41.6666666667%;
-  }
-
-  .col-lg-6 {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .col-lg-7 {
-    flex: 0 0 58.3333333333%;
-    max-width: 58.3333333333%;
-  }
-
-  .col-lg-8 {
-    flex: 0 0 66.6666666667%;
-    max-width: 66.6666666667%;
-  }
-
-  .col-lg-9 {
-    flex: 0 0 75%;
-    max-width: 75%;
-  }
-
-  .col-lg-10 {
-    flex: 0 0 83.3333333333%;
-    max-width: 83.3333333333%;
-  }
-
-  .col-lg-11 {
-    flex: 0 0 91.6666666667%;
-    max-width: 91.6666666667%;
-  }
-
-  .col-lg-12 {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .order-lg-first {
-    order: -1;
-  }
-
-  .order-lg-last {
-    order: 13;
-  }
-
-  .order-lg-0 {
-    order: 0;
-  }
-
-  .order-lg-1 {
-    order: 1;
-  }
-
-  .order-lg-2 {
-    order: 2;
-  }
-
-  .order-lg-3 {
-    order: 3;
-  }
-
-  .order-lg-4 {
-    order: 4;
-  }
-
-  .order-lg-5 {
-    order: 5;
-  }
-
-  .order-lg-6 {
-    order: 6;
-  }
-
-  .order-lg-7 {
-    order: 7;
-  }
-
-  .order-lg-8 {
-    order: 8;
-  }
-
-  .order-lg-9 {
-    order: 9;
-  }
-
-  .order-lg-10 {
-    order: 10;
-  }
-
-  .order-lg-11 {
-    order: 11;
-  }
-
-  .order-lg-12 {
-    order: 12;
-  }
-
-  .offset-lg-0 {
-    margin-left: 0;
-  }
-
-  .offset-lg-1 {
-    margin-left: 8.3333333333%;
-  }
-
-  .offset-lg-2 {
-    margin-left: 16.6666666667%;
-  }
-
-  .offset-lg-3 {
-    margin-left: 25%;
-  }
-
-  .offset-lg-4 {
-    margin-left: 33.3333333333%;
-  }
-
-  .offset-lg-5 {
-    margin-left: 41.6666666667%;
-  }
-
-  .offset-lg-6 {
-    margin-left: 50%;
-  }
-
-  .offset-lg-7 {
-    margin-left: 58.3333333333%;
-  }
-
-  .offset-lg-8 {
-    margin-left: 66.6666666667%;
-  }
-
-  .offset-lg-9 {
-    margin-left: 75%;
-  }
-
-  .offset-lg-10 {
-    margin-left: 83.3333333333%;
-  }
-
-  .offset-lg-11 {
-    margin-left: 91.6666666667%;
-  }
-}
-@media (min-width: 1200px) {
-  .col-xl {
-    flex-basis: 0;
-    flex-grow: 1;
-    max-width: 100%;
-  }
-
-  .row-cols-xl-1 > * {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .row-cols-xl-2 > * {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .row-cols-xl-3 > * {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .row-cols-xl-4 > * {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .row-cols-xl-5 > * {
-    flex: 0 0 20%;
-    max-width: 20%;
-  }
-
-  .row-cols-xl-6 > * {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-xl-auto {
-    flex: 0 0 auto;
-    width: auto;
-    max-width: 100%;
-  }
-
-  .col-xl-1 {
-    flex: 0 0 8.3333333333%;
-    max-width: 8.3333333333%;
-  }
-
-  .col-xl-2 {
-    flex: 0 0 16.6666666667%;
-    max-width: 16.6666666667%;
-  }
-
-  .col-xl-3 {
-    flex: 0 0 25%;
-    max-width: 25%;
-  }
-
-  .col-xl-4 {
-    flex: 0 0 33.3333333333%;
-    max-width: 33.3333333333%;
-  }
-
-  .col-xl-5 {
-    flex: 0 0 41.6666666667%;
-    max-width: 41.6666666667%;
-  }
-
-  .col-xl-6 {
-    flex: 0 0 50%;
-    max-width: 50%;
-  }
-
-  .col-xl-7 {
-    flex: 0 0 58.3333333333%;
-    max-width: 58.3333333333%;
-  }
-
-  .col-xl-8 {
-    flex: 0 0 66.6666666667%;
-    max-width: 66.6666666667%;
-  }
-
-  .col-xl-9 {
-    flex: 0 0 75%;
-    max-width: 75%;
-  }
-
-  .col-xl-10 {
-    flex: 0 0 83.3333333333%;
-    max-width: 83.3333333333%;
-  }
-
-  .col-xl-11 {
-    flex: 0 0 91.6666666667%;
-    max-width: 91.6666666667%;
-  }
-
-  .col-xl-12 {
-    flex: 0 0 100%;
-    max-width: 100%;
-  }
-
-  .order-xl-first {
-    order: -1;
-  }
-
-  .order-xl-last {
-    order: 13;
-  }
-
-  .order-xl-0 {
-    order: 0;
-  }
-
-  .order-xl-1 {
-    order: 1;
-  }
-
-  .order-xl-2 {
-    order: 2;
-  }
-
-  .order-xl-3 {
-    order: 3;
-  }
-
-  .order-xl-4 {
-    order: 4;
-  }
-
-  .order-xl-5 {
-    order: 5;
-  }
-
-  .order-xl-6 {
-    order: 6;
-  }
-
-  .order-xl-7 {
-    order: 7;
-  }
-
-  .order-xl-8 {
-    order: 8;
-  }
-
-  .order-xl-9 {
-    order: 9;
-  }
-
-  .order-xl-10 {
-    order: 10;
-  }
-
-  .order-xl-11 {
-    order: 11;
-  }
-
-  .order-xl-12 {
-    order: 12;
-  }
-
-  .offset-xl-0 {
-    margin-left: 0;
-  }
-
-  .offset-xl-1 {
-    margin-left: 8.3333333333%;
-  }
-
-  .offset-xl-2 {
-    margin-left: 16.6666666667%;
-  }
-
-  .offset-xl-3 {
-    margin-left: 25%;
-  }
-
-  .offset-xl-4 {
-    margin-left: 33.3333333333%;
-  }
-
-  .offset-xl-5 {
-    margin-left: 41.6666666667%;
-  }
-
-  .offset-xl-6 {
-    margin-left: 50%;
-  }
-
-  .offset-xl-7 {
-    margin-left: 58.3333333333%;
-  }
-
-  .offset-xl-8 {
-    margin-left: 66.6666666667%;
-  }
-
-  .offset-xl-9 {
-    margin-left: 75%;
-  }
-
-  .offset-xl-10 {
-    margin-left: 83.3333333333%;
-  }
-
-  .offset-xl-11 {
-    margin-left: 91.6666666667%;
-  }
-}
-.table {
-  width: 100%;
-  margin-bottom: 1rem;
-  color: #212529;
-}
-.table th,
-.table td {
-  padding: 0.75rem;
-  vertical-align: top;
-  border-top: 1px solid #dee2e6;
-}
-.table thead th {
-  vertical-align: bottom;
-  border-bottom: 2px solid #dee2e6;
-}
-.table tbody + tbody {
-  border-top: 2px solid #dee2e6;
-}
-
-.table-sm th,
-.table-sm td {
-  padding: 0.3rem;
-}
-
-.table-bordered {
-  border: 1px solid #dee2e6;
-}
-.table-bordered th,
-.table-bordered td {
-  border: 1px solid #dee2e6;
-}
-.table-bordered thead th,
-.table-bordered thead td {
-  border-bottom-width: 2px;
-}
-
-.table-borderless th,
-.table-borderless td,
-.table-borderless thead th,
-.table-borderless tbody + tbody {
-  border: 0;
-}
-
-.table-striped tbody tr:nth-of-type(odd) {
-  background-color: rgba(0, 0, 0, 0.05);
-}
-
-.table-hover tbody tr:hover {
-  color: #212529;
-  background-color: rgba(0, 0, 0, 0.075);
-}
-
-.table-primary,
-.table-primary > th,
-.table-primary > td {
-  background-color: #b8daff;
-}
-.table-primary th,
-.table-primary td,
-.table-primary thead th,
-.table-primary tbody + tbody {
-  border-color: #7abaff;
-}
-
-.table-hover .table-primary:hover {
-  background-color: #9fcdff;
-}
-.table-hover .table-primary:hover > td,
-.table-hover .table-primary:hover > th {
-  background-color: #9fcdff;
-}
-
-.table-secondary,
-.table-secondary > th,
-.table-secondary > td {
-  background-color: #d6d8db;
-}
-.table-secondary th,
-.table-secondary td,
-.table-secondary thead th,
-.table-secondary tbody + tbody {
-  border-color: #b3b7bb;
-}
-
-.table-hover .table-secondary:hover {
-  background-color: #c8cbcf;
-}
-.table-hover .table-secondary:hover > td,
-.table-hover .table-secondary:hover > th {
-  background-color: #c8cbcf;
-}
-
-.table-success,
-.table-success > th,
-.table-success > td {
-  background-color: #c3e6cb;
-}
-.table-success th,
-.table-success td,
-.table-success thead th,
-.table-success tbody + tbody {
-  border-color: #8fd19e;
-}
-
-.table-hover .table-success:hover {
-  background-color: #b1dfbb;
-}
-.table-hover .table-success:hover > td,
-.table-hover .table-success:hover > th {
-  background-color: #b1dfbb;
-}
-
-.table-info,
-.table-info > th,
-.table-info > td {
-  background-color: #bee5eb;
-}
-.table-info th,
-.table-info td,
-.table-info thead th,
-.table-info tbody + tbody {
-  border-color: #86cfda;
-}
-
-.table-hover .table-info:hover {
-  background-color: #abdde5;
-}
-.table-hover .table-info:hover > td,
-.table-hover .table-info:hover > th {
-  background-color: #abdde5;
-}
-
-.table-warning,
-.table-warning > th,
-.table-warning > td {
-  background-color: #ffeeba;
-}
-.table-warning th,
-.table-warning td,
-.table-warning thead th,
-.table-warning tbody + tbody {
-  border-color: #ffdf7e;
-}
-
-.table-hover .table-warning:hover {
-  background-color: #ffe8a1;
-}
-.table-hover .table-warning:hover > td,
-.table-hover .table-warning:hover > th {
-  background-color: #ffe8a1;
-}
-
-.table-danger,
-.table-danger > th,
-.table-danger > td {
-  background-color: #f5c6cb;
-}
-.table-danger th,
-.table-danger td,
-.table-danger thead th,
-.table-danger tbody + tbody {
-  border-color: #ed969e;
-}
-
-.table-hover .table-danger:hover {
-  background-color: #f1b0b7;
-}
-.table-hover .table-danger:hover > td,
-.table-hover .table-danger:hover > th {
-  background-color: #f1b0b7;
-}
-
-.table-light,
-.table-light > th,
-.table-light > td {
-  background-color: #fdfdfe;
-}
-.table-light th,
-.table-light td,
-.table-light thead th,
-.table-light tbody + tbody {
-  border-color: #fbfcfc;
-}
-
-.table-hover .table-light:hover {
-  background-color: #ececf6;
-}
-.table-hover .table-light:hover > td,
-.table-hover .table-light:hover > th {
-  background-color: #ececf6;
-}
-
-.table-dark,
-.table-dark > th,
-.table-dark > td {
-  background-color: #c6c8ca;
-}
-.table-dark th,
-.table-dark td,
-.table-dark thead th,
-.table-dark tbody + tbody {
-  border-color: #95999c;
-}
-
-.table-hover .table-dark:hover {
-  background-color: #b9bbbe;
-}
-.table-hover .table-dark:hover > td,
-.table-hover .table-dark:hover > th {
-  background-color: #b9bbbe;
-}
-
-.table-active,
-.table-active > th,
-.table-active > td {
-  background-color: rgba(0, 0, 0, 0.075);
-}
-
-.table-hover .table-active:hover {
-  background-color: rgba(0, 0, 0, 0.075);
-}
-.table-hover .table-active:hover > td,
-.table-hover .table-active:hover > th {
-  background-color: rgba(0, 0, 0, 0.075);
-}
-
-.table .thead-dark th {
-  color: #fff;
-  background-color: #343a40;
-  border-color: #454d55;
-}
-.table .thead-light th {
-  color: #495057;
-  background-color: #e9ecef;
-  border-color: #dee2e6;
-}
-
-.table-dark {
-  color: #fff;
-  background-color: #343a40;
-}
-.table-dark th,
-.table-dark td,
-.table-dark thead th {
-  border-color: #454d55;
-}
-.table-dark.table-bordered {
-  border: 0;
-}
-.table-dark.table-striped tbody tr:nth-of-type(odd) {
-  background-color: rgba(255, 255, 255, 0.05);
-}
-.table-dark.table-hover tbody tr:hover {
-  color: #fff;
-  background-color: rgba(255, 255, 255, 0.075);
-}
-
-@media (max-width: 575.98px) {
-  .table-responsive-sm {
-    display: block;
-    width: 100%;
-    overflow-x: auto;
-    -webkit-overflow-scrolling: touch;
-  }
-  .table-responsive-sm > .table-bordered {
-    border: 0;
-  }
-}
-@media (max-width: 767.98px) {
-  .table-responsive-md {
-    display: block;
-    width: 100%;
-    overflow-x: auto;
-    -webkit-overflow-scrolling: touch;
-  }
-  .table-responsive-md > .table-bordered {
-    border: 0;
-  }
-}
-@media (max-width: 991.98px) {
-  .table-responsive-lg {
-    display: block;
-    width: 100%;
-    overflow-x: auto;
-    -webkit-overflow-scrolling: touch;
-  }
-  .table-responsive-lg > .table-bordered {
-    border: 0;
-  }
-}
-@media (max-width: 1199.98px) {
-  .table-responsive-xl {
-    display: block;
-    width: 100%;
-    overflow-x: auto;
-    -webkit-overflow-scrolling: touch;
-  }
-  .table-responsive-xl > .table-bordered {
-    border: 0;
-  }
-}
-.table-responsive {
-  display: block;
-  width: 100%;
-  overflow-x: auto;
-  -webkit-overflow-scrolling: touch;
-}
-.table-responsive > .table-bordered {
-  border: 0;
-}
-
-.form-control {
-  display: block;
-  width: 100%;
-  height: calc(1.5em + 0.75rem + 2px);
-  padding: 0.375rem 0.75rem;
-  font-size: 1rem;
-  font-weight: 400;
-  line-height: 1.5;
-  color: #495057;
-  background-color: #fff;
-  background-clip: padding-box;
-  border: 1px solid #ced4da;
-  border-radius: 0.25rem;
-  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-}
-@media (prefers-reduced-motion: reduce) {
-  .form-control {
-    transition: none;
-  }
-}
-.form-control::-ms-expand {
-  background-color: transparent;
-  border: 0;
-}
-.form-control:-moz-focusring {
-  color: transparent;
-  text-shadow: 0 0 0 #495057;
-}
-.form-control:focus {
-  color: #495057;
-  background-color: #fff;
-  border-color: #80bdff;
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.form-control::-moz-placeholder {
-  color: #6c757d;
-  opacity: 1;
-}
-.form-control:-ms-input-placeholder {
-  color: #6c757d;
-  opacity: 1;
-}
-.form-control::placeholder {
-  color: #6c757d;
-  opacity: 1;
-}
-.form-control:disabled, .form-control[readonly] {
-  background-color: #e9ecef;
-  opacity: 1;
-}
-
-select.form-control:focus::-ms-value {
-  color: #495057;
-  background-color: #fff;
-}
-
-.form-control-file,
-.form-control-range {
-  display: block;
-  width: 100%;
-}
-
-.col-form-label {
-  padding-top: calc(0.375rem + 1px);
-  padding-bottom: calc(0.375rem + 1px);
-  margin-bottom: 0;
-  font-size: inherit;
-  line-height: 1.5;
-}
-
-.col-form-label-lg {
-  padding-top: calc(0.5rem + 1px);
-  padding-bottom: calc(0.5rem + 1px);
-  font-size: 1.25rem;
-  line-height: 1.5;
-}
-
-.col-form-label-sm {
-  padding-top: calc(0.25rem + 1px);
-  padding-bottom: calc(0.25rem + 1px);
-  font-size: 0.875rem;
-  line-height: 1.5;
-}
-
-.form-control-plaintext {
-  display: block;
-  width: 100%;
-  padding: 0.375rem 0;
-  margin-bottom: 0;
-  font-size: 1rem;
-  line-height: 1.5;
-  color: #212529;
-  background-color: transparent;
-  border: solid transparent;
-  border-width: 1px 0;
-}
-.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg {
-  padding-right: 0;
-  padding-left: 0;
-}
-
-.form-control-sm {
-  height: calc(1.5em + 0.5rem + 2px);
-  padding: 0.25rem 0.5rem;
-  font-size: 0.875rem;
-  line-height: 1.5;
-  border-radius: 0.2rem;
-}
-
-.form-control-lg {
-  height: calc(1.5em + 1rem + 2px);
-  padding: 0.5rem 1rem;
-  font-size: 1.25rem;
-  line-height: 1.5;
-  border-radius: 0.3rem;
-}
-
-select.form-control[size], select.form-control[multiple] {
-  height: auto;
-}
-
-textarea.form-control {
-  height: auto;
-}
-
-.form-group {
-  margin-bottom: 1rem;
-}
-
-.form-text {
-  display: block;
-  margin-top: 0.25rem;
-}
-
-.form-row {
-  display: flex;
-  flex-wrap: wrap;
-  margin-right: -5px;
-  margin-left: -5px;
-}
-.form-row > .col,
-.form-row > [class*=col-] {
-  padding-right: 5px;
-  padding-left: 5px;
-}
-
-.form-check {
-  position: relative;
-  display: block;
-  padding-left: 1.25rem;
-}
-
-.form-check-input {
-  position: absolute;
-  margin-top: 0.3rem;
-  margin-left: -1.25rem;
-}
-.form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label {
-  color: #6c757d;
-}
-
-.form-check-label {
-  margin-bottom: 0;
-}
-
-.form-check-inline {
-  display: inline-flex;
-  align-items: center;
-  padding-left: 0;
-  margin-right: 0.75rem;
-}
-.form-check-inline .form-check-input {
-  position: static;
-  margin-top: 0;
-  margin-right: 0.3125rem;
-  margin-left: 0;
-}
-
-.valid-feedback {
-  display: none;
-  width: 100%;
-  margin-top: 0.25rem;
-  font-size: 80%;
-  color: #28a745;
-}
-
-.valid-tooltip {
-  position: absolute;
-  top: 100%;
-  z-index: 5;
-  display: none;
-  max-width: 100%;
-  padding: 0.25rem 0.5rem;
-  margin-top: 0.1rem;
-  font-size: 0.875rem;
-  line-height: 1.5;
-  color: #fff;
-  background-color: rgba(40, 167, 69, 0.9);
-  border-radius: 0.25rem;
-}
-
-.was-validated :valid ~ .valid-feedback,
-.was-validated :valid ~ .valid-tooltip,
-.is-valid ~ .valid-feedback,
-.is-valid ~ .valid-tooltip {
-  display: block;
-}
-
-.was-validated .form-control:valid, .form-control.is-valid {
-  border-color: #28a745;
-  padding-right: calc(1.5em + 0.75rem);
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
-  background-repeat: no-repeat;
-  background-position: right calc(0.375em + 0.1875rem) center;
-  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
-}
-.was-validated .form-control:valid:focus, .form-control.is-valid:focus {
-  border-color: #28a745;
-  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
-}
-
-.was-validated textarea.form-control:valid, textarea.form-control.is-valid {
-  padding-right: calc(1.5em + 0.75rem);
-  background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
-}
-
-.was-validated .custom-select:valid, .custom-select.is-valid {
-  border-color: #28a745;
-  padding-right: calc(0.75em + 2.3125rem);
-  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
-}
-.was-validated .custom-select:valid:focus, .custom-select.is-valid:focus {
-  border-color: #28a745;
-  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
-}
-
-.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label {
-  color: #28a745;
-}
-.was-validated .form-check-input:valid ~ .valid-feedback,
-.was-validated .form-check-input:valid ~ .valid-tooltip, .form-check-input.is-valid ~ .valid-feedback,
-.form-check-input.is-valid ~ .valid-tooltip {
-  display: block;
-}
-
-.was-validated .custom-control-input:valid ~ .custom-control-label, .custom-control-input.is-valid ~ .custom-control-label {
-  color: #28a745;
-}
-.was-validated .custom-control-input:valid ~ .custom-control-label::before, .custom-control-input.is-valid ~ .custom-control-label::before {
-  border-color: #28a745;
-}
-.was-validated .custom-control-input:valid:checked ~ .custom-control-label::before, .custom-control-input.is-valid:checked ~ .custom-control-label::before {
-  border-color: #34ce57;
-  background-color: #34ce57;
-}
-.was-validated .custom-control-input:valid:focus ~ .custom-control-label::before, .custom-control-input.is-valid:focus ~ .custom-control-label::before {
-  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
-}
-.was-validated .custom-control-input:valid:focus:not(:checked) ~ .custom-control-label::before, .custom-control-input.is-valid:focus:not(:checked) ~ .custom-control-label::before {
-  border-color: #28a745;
-}
-
-.was-validated .custom-file-input:valid ~ .custom-file-label, .custom-file-input.is-valid ~ .custom-file-label {
-  border-color: #28a745;
-}
-.was-validated .custom-file-input:valid:focus ~ .custom-file-label, .custom-file-input.is-valid:focus ~ .custom-file-label {
-  border-color: #28a745;
-  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
-}
-
-.invalid-feedback {
-  display: none;
-  width: 100%;
-  margin-top: 0.25rem;
-  font-size: 80%;
-  color: #dc3545;
-}
-
-.invalid-tooltip {
-  position: absolute;
-  top: 100%;
-  z-index: 5;
-  display: none;
-  max-width: 100%;
-  padding: 0.25rem 0.5rem;
-  margin-top: 0.1rem;
-  font-size: 0.875rem;
-  line-height: 1.5;
-  color: #fff;
-  background-color: rgba(220, 53, 69, 0.9);
-  border-radius: 0.25rem;
-}
-
-.was-validated :invalid ~ .invalid-feedback,
-.was-validated :invalid ~ .invalid-tooltip,
-.is-invalid ~ .invalid-feedback,
-.is-invalid ~ .invalid-tooltip {
-  display: block;
-}
-
-.was-validated .form-control:invalid, .form-control.is-invalid {
-  border-color: #dc3545;
-  padding-right: calc(1.5em + 0.75rem);
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
-  background-repeat: no-repeat;
-  background-position: right calc(0.375em + 0.1875rem) center;
-  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
-}
-.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus {
-  border-color: #dc3545;
-  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
-}
-
-.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid {
-  padding-right: calc(1.5em + 0.75rem);
-  background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
-}
-
-.was-validated .custom-select:invalid, .custom-select.is-invalid {
-  border-color: #dc3545;
-  padding-right: calc(0.75em + 2.3125rem);
-  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
-}
-.was-validated .custom-select:invalid:focus, .custom-select.is-invalid:focus {
-  border-color: #dc3545;
-  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
-}
-
-.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label {
-  color: #dc3545;
-}
-.was-validated .form-check-input:invalid ~ .invalid-feedback,
-.was-validated .form-check-input:invalid ~ .invalid-tooltip, .form-check-input.is-invalid ~ .invalid-feedback,
-.form-check-input.is-invalid ~ .invalid-tooltip {
-  display: block;
-}
-
-.was-validated .custom-control-input:invalid ~ .custom-control-label, .custom-control-input.is-invalid ~ .custom-control-label {
-  color: #dc3545;
-}
-.was-validated .custom-control-input:invalid ~ .custom-control-label::before, .custom-control-input.is-invalid ~ .custom-control-label::before {
-  border-color: #dc3545;
-}
-.was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before, .custom-control-input.is-invalid:checked ~ .custom-control-label::before {
-  border-color: #e4606d;
-  background-color: #e4606d;
-}
-.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before, .custom-control-input.is-invalid:focus ~ .custom-control-label::before {
-  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
-}
-.was-validated .custom-control-input:invalid:focus:not(:checked) ~ .custom-control-label::before, .custom-control-input.is-invalid:focus:not(:checked) ~ .custom-control-label::before {
-  border-color: #dc3545;
-}
-
-.was-validated .custom-file-input:invalid ~ .custom-file-label, .custom-file-input.is-invalid ~ .custom-file-label {
-  border-color: #dc3545;
-}
-.was-validated .custom-file-input:invalid:focus ~ .custom-file-label, .custom-file-input.is-invalid:focus ~ .custom-file-label {
-  border-color: #dc3545;
-  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
-}
-
-.form-inline {
-  display: flex;
-  flex-flow: row wrap;
-  align-items: center;
-}
-.form-inline .form-check {
-  width: 100%;
-}
-@media (min-width: 576px) {
-  .form-inline label {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-bottom: 0;
-  }
-  .form-inline .form-group {
-    display: flex;
-    flex: 0 0 auto;
-    flex-flow: row wrap;
-    align-items: center;
-    margin-bottom: 0;
-  }
-  .form-inline .form-control {
-    display: inline-block;
-    width: auto;
-    vertical-align: middle;
-  }
-  .form-inline .form-control-plaintext {
-    display: inline-block;
-  }
-  .form-inline .input-group,
-.form-inline .custom-select {
-    width: auto;
-  }
-  .form-inline .form-check {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    width: auto;
-    padding-left: 0;
-  }
-  .form-inline .form-check-input {
-    position: relative;
-    flex-shrink: 0;
-    margin-top: 0;
-    margin-right: 0.25rem;
-    margin-left: 0;
-  }
-  .form-inline .custom-control {
-    align-items: center;
-    justify-content: center;
-  }
-  .form-inline .custom-control-label {
-    margin-bottom: 0;
-  }
-}
-
-.btn {
-  display: inline-block;
-  font-weight: 400;
-  color: #212529;
-  text-align: center;
-  vertical-align: middle;
-  cursor: pointer;
-  -webkit-user-select: none;
-     -moz-user-select: none;
-      -ms-user-select: none;
-          user-select: none;
-  background-color: transparent;
-  border: 1px solid transparent;
-  padding: 0.375rem 0.75rem;
-  font-size: 1rem;
-  line-height: 1.5;
-  border-radius: 0.25rem;
-  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-}
-@media (prefers-reduced-motion: reduce) {
-  .btn {
-    transition: none;
-  }
-}
-.btn:hover {
-  color: #212529;
-  text-decoration: none;
-}
-.btn:focus, .btn.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.btn.disabled, .btn:disabled {
-  opacity: 0.65;
-}
-a.btn.disabled,
-fieldset:disabled a.btn {
-  pointer-events: none;
-}
-
-.btn-primary {
-  color: #fff;
-  background-color: #007bff;
-  border-color: #007bff;
-}
-.btn-primary:hover {
-  color: #fff;
-  background-color: #0069d9;
-  border-color: #0062cc;
-}
-.btn-primary:focus, .btn-primary.focus {
-  color: #fff;
-  background-color: #0069d9;
-  border-color: #0062cc;
-  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
-}
-.btn-primary.disabled, .btn-primary:disabled {
-  color: #fff;
-  background-color: #007bff;
-  border-color: #007bff;
-}
-.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle {
-  color: #fff;
-  background-color: #0062cc;
-  border-color: #005cbf;
-}
-.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
-}
-
-.btn-secondary {
-  color: #fff;
-  background-color: #6c757d;
-  border-color: #6c757d;
-}
-.btn-secondary:hover {
-  color: #fff;
-  background-color: #5a6268;
-  border-color: #545b62;
-}
-.btn-secondary:focus, .btn-secondary.focus {
-  color: #fff;
-  background-color: #5a6268;
-  border-color: #545b62;
-  box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
-}
-.btn-secondary.disabled, .btn-secondary:disabled {
-  color: #fff;
-  background-color: #6c757d;
-  border-color: #6c757d;
-}
-.btn-secondary:not(:disabled):not(.disabled):active, .btn-secondary:not(:disabled):not(.disabled).active, .show > .btn-secondary.dropdown-toggle {
-  color: #fff;
-  background-color: #545b62;
-  border-color: #4e555b;
-}
-.btn-secondary:not(:disabled):not(.disabled):active:focus, .btn-secondary:not(:disabled):not(.disabled).active:focus, .show > .btn-secondary.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
-}
-
-.btn-success {
-  color: #fff;
-  background-color: #28a745;
-  border-color: #28a745;
-}
-.btn-success:hover {
-  color: #fff;
-  background-color: #218838;
-  border-color: #1e7e34;
-}
-.btn-success:focus, .btn-success.focus {
-  color: #fff;
-  background-color: #218838;
-  border-color: #1e7e34;
-  box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);
-}
-.btn-success.disabled, .btn-success:disabled {
-  color: #fff;
-  background-color: #28a745;
-  border-color: #28a745;
-}
-.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, .show > .btn-success.dropdown-toggle {
-  color: #fff;
-  background-color: #1e7e34;
-  border-color: #1c7430;
-}
-.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, .show > .btn-success.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);
-}
-
-.btn-info {
-  color: #fff;
-  background-color: #17a2b8;
-  border-color: #17a2b8;
-}
-.btn-info:hover {
-  color: #fff;
-  background-color: #138496;
-  border-color: #117a8b;
-}
-.btn-info:focus, .btn-info.focus {
-  color: #fff;
-  background-color: #138496;
-  border-color: #117a8b;
-  box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);
-}
-.btn-info.disabled, .btn-info:disabled {
-  color: #fff;
-  background-color: #17a2b8;
-  border-color: #17a2b8;
-}
-.btn-info:not(:disabled):not(.disabled):active, .btn-info:not(:disabled):not(.disabled).active, .show > .btn-info.dropdown-toggle {
-  color: #fff;
-  background-color: #117a8b;
-  border-color: #10707f;
-}
-.btn-info:not(:disabled):not(.disabled):active:focus, .btn-info:not(:disabled):not(.disabled).active:focus, .show > .btn-info.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);
-}
-
-.btn-warning {
-  color: #212529;
-  background-color: #ffc107;
-  border-color: #ffc107;
-}
-.btn-warning:hover {
-  color: #212529;
-  background-color: #e0a800;
-  border-color: #d39e00;
-}
-.btn-warning:focus, .btn-warning.focus {
-  color: #212529;
-  background-color: #e0a800;
-  border-color: #d39e00;
-  box-shadow: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);
-}
-.btn-warning.disabled, .btn-warning:disabled {
-  color: #212529;
-  background-color: #ffc107;
-  border-color: #ffc107;
-}
-.btn-warning:not(:disabled):not(.disabled):active, .btn-warning:not(:disabled):not(.disabled).active, .show > .btn-warning.dropdown-toggle {
-  color: #212529;
-  background-color: #d39e00;
-  border-color: #c69500;
-}
-.btn-warning:not(:disabled):not(.disabled):active:focus, .btn-warning:not(:disabled):not(.disabled).active:focus, .show > .btn-warning.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);
-}
-
-.btn-danger {
-  color: #fff;
-  background-color: #dc3545;
-  border-color: #dc3545;
-}
-.btn-danger:hover {
-  color: #fff;
-  background-color: #c82333;
-  border-color: #bd2130;
-}
-.btn-danger:focus, .btn-danger.focus {
-  color: #fff;
-  background-color: #c82333;
-  border-color: #bd2130;
-  box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);
-}
-.btn-danger.disabled, .btn-danger:disabled {
-  color: #fff;
-  background-color: #dc3545;
-  border-color: #dc3545;
-}
-.btn-danger:not(:disabled):not(.disabled):active, .btn-danger:not(:disabled):not(.disabled).active, .show > .btn-danger.dropdown-toggle {
-  color: #fff;
-  background-color: #bd2130;
-  border-color: #b21f2d;
-}
-.btn-danger:not(:disabled):not(.disabled):active:focus, .btn-danger:not(:disabled):not(.disabled).active:focus, .show > .btn-danger.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);
-}
-
-.btn-light {
-  color: #212529;
-  background-color: #f8f9fa;
-  border-color: #f8f9fa;
-}
-.btn-light:hover {
-  color: #212529;
-  background-color: #e2e6ea;
-  border-color: #dae0e5;
-}
-.btn-light:focus, .btn-light.focus {
-  color: #212529;
-  background-color: #e2e6ea;
-  border-color: #dae0e5;
-  box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
-}
-.btn-light.disabled, .btn-light:disabled {
-  color: #212529;
-  background-color: #f8f9fa;
-  border-color: #f8f9fa;
-}
-.btn-light:not(:disabled):not(.disabled):active, .btn-light:not(:disabled):not(.disabled).active, .show > .btn-light.dropdown-toggle {
-  color: #212529;
-  background-color: #dae0e5;
-  border-color: #d3d9df;
-}
-.btn-light:not(:disabled):not(.disabled):active:focus, .btn-light:not(:disabled):not(.disabled).active:focus, .show > .btn-light.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
-}
-
-.btn-dark {
-  color: #fff;
-  background-color: #343a40;
-  border-color: #343a40;
-}
-.btn-dark:hover {
-  color: #fff;
-  background-color: #23272b;
-  border-color: #1d2124;
-}
-.btn-dark:focus, .btn-dark.focus {
-  color: #fff;
-  background-color: #23272b;
-  border-color: #1d2124;
-  box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5);
-}
-.btn-dark.disabled, .btn-dark:disabled {
-  color: #fff;
-  background-color: #343a40;
-  border-color: #343a40;
-}
-.btn-dark:not(:disabled):not(.disabled):active, .btn-dark:not(:disabled):not(.disabled).active, .show > .btn-dark.dropdown-toggle {
-  color: #fff;
-  background-color: #1d2124;
-  border-color: #171a1d;
-}
-.btn-dark:not(:disabled):not(.disabled):active:focus, .btn-dark:not(:disabled):not(.disabled).active:focus, .show > .btn-dark.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5);
-}
-
-.btn-outline-primary {
-  color: #007bff;
-  border-color: #007bff;
-}
-.btn-outline-primary:hover {
-  color: #fff;
-  background-color: #007bff;
-  border-color: #007bff;
-}
-.btn-outline-primary:focus, .btn-outline-primary.focus {
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
-}
-.btn-outline-primary.disabled, .btn-outline-primary:disabled {
-  color: #007bff;
-  background-color: transparent;
-}
-.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active, .show > .btn-outline-primary.dropdown-toggle {
-  color: #fff;
-  background-color: #007bff;
-  border-color: #007bff;
-}
-.btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-primary.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
-}
-
-.btn-outline-secondary {
-  color: #6c757d;
-  border-color: #6c757d;
-}
-.btn-outline-secondary:hover {
-  color: #fff;
-  background-color: #6c757d;
-  border-color: #6c757d;
-}
-.btn-outline-secondary:focus, .btn-outline-secondary.focus {
-  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
-}
-.btn-outline-secondary.disabled, .btn-outline-secondary:disabled {
-  color: #6c757d;
-  background-color: transparent;
-}
-.btn-outline-secondary:not(:disabled):not(.disabled):active, .btn-outline-secondary:not(:disabled):not(.disabled).active, .show > .btn-outline-secondary.dropdown-toggle {
-  color: #fff;
-  background-color: #6c757d;
-  border-color: #6c757d;
-}
-.btn-outline-secondary:not(:disabled):not(.disabled):active:focus, .btn-outline-secondary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-secondary.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
-}
-
-.btn-outline-success {
-  color: #28a745;
-  border-color: #28a745;
-}
-.btn-outline-success:hover {
-  color: #fff;
-  background-color: #28a745;
-  border-color: #28a745;
-}
-.btn-outline-success:focus, .btn-outline-success.focus {
-  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
-}
-.btn-outline-success.disabled, .btn-outline-success:disabled {
-  color: #28a745;
-  background-color: transparent;
-}
-.btn-outline-success:not(:disabled):not(.disabled):active, .btn-outline-success:not(:disabled):not(.disabled).active, .show > .btn-outline-success.dropdown-toggle {
-  color: #fff;
-  background-color: #28a745;
-  border-color: #28a745;
-}
-.btn-outline-success:not(:disabled):not(.disabled):active:focus, .btn-outline-success:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-success.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
-}
-
-.btn-outline-info {
-  color: #17a2b8;
-  border-color: #17a2b8;
-}
-.btn-outline-info:hover {
-  color: #fff;
-  background-color: #17a2b8;
-  border-color: #17a2b8;
-}
-.btn-outline-info:focus, .btn-outline-info.focus {
-  box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
-}
-.btn-outline-info.disabled, .btn-outline-info:disabled {
-  color: #17a2b8;
-  background-color: transparent;
-}
-.btn-outline-info:not(:disabled):not(.disabled):active, .btn-outline-info:not(:disabled):not(.disabled).active, .show > .btn-outline-info.dropdown-toggle {
-  color: #fff;
-  background-color: #17a2b8;
-  border-color: #17a2b8;
-}
-.btn-outline-info:not(:disabled):not(.disabled):active:focus, .btn-outline-info:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-info.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
-}
-
-.btn-outline-warning {
-  color: #ffc107;
-  border-color: #ffc107;
-}
-.btn-outline-warning:hover {
-  color: #212529;
-  background-color: #ffc107;
-  border-color: #ffc107;
-}
-.btn-outline-warning:focus, .btn-outline-warning.focus {
-  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
-}
-.btn-outline-warning.disabled, .btn-outline-warning:disabled {
-  color: #ffc107;
-  background-color: transparent;
-}
-.btn-outline-warning:not(:disabled):not(.disabled):active, .btn-outline-warning:not(:disabled):not(.disabled).active, .show > .btn-outline-warning.dropdown-toggle {
-  color: #212529;
-  background-color: #ffc107;
-  border-color: #ffc107;
-}
-.btn-outline-warning:not(:disabled):not(.disabled):active:focus, .btn-outline-warning:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-warning.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
-}
-
-.btn-outline-danger {
-  color: #dc3545;
-  border-color: #dc3545;
-}
-.btn-outline-danger:hover {
-  color: #fff;
-  background-color: #dc3545;
-  border-color: #dc3545;
-}
-.btn-outline-danger:focus, .btn-outline-danger.focus {
-  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);
-}
-.btn-outline-danger.disabled, .btn-outline-danger:disabled {
-  color: #dc3545;
-  background-color: transparent;
-}
-.btn-outline-danger:not(:disabled):not(.disabled):active, .btn-outline-danger:not(:disabled):not(.disabled).active, .show > .btn-outline-danger.dropdown-toggle {
-  color: #fff;
-  background-color: #dc3545;
-  border-color: #dc3545;
-}
-.btn-outline-danger:not(:disabled):not(.disabled):active:focus, .btn-outline-danger:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-danger.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);
-}
-
-.btn-outline-light {
-  color: #f8f9fa;
-  border-color: #f8f9fa;
-}
-.btn-outline-light:hover {
-  color: #212529;
-  background-color: #f8f9fa;
-  border-color: #f8f9fa;
-}
-.btn-outline-light:focus, .btn-outline-light.focus {
-  box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
-}
-.btn-outline-light.disabled, .btn-outline-light:disabled {
-  color: #f8f9fa;
-  background-color: transparent;
-}
-.btn-outline-light:not(:disabled):not(.disabled):active, .btn-outline-light:not(:disabled):not(.disabled).active, .show > .btn-outline-light.dropdown-toggle {
-  color: #212529;
-  background-color: #f8f9fa;
-  border-color: #f8f9fa;
-}
-.btn-outline-light:not(:disabled):not(.disabled):active:focus, .btn-outline-light:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-light.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
-}
-
-.btn-outline-dark {
-  color: #343a40;
-  border-color: #343a40;
-}
-.btn-outline-dark:hover {
-  color: #fff;
-  background-color: #343a40;
-  border-color: #343a40;
-}
-.btn-outline-dark:focus, .btn-outline-dark.focus {
-  box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
-}
-.btn-outline-dark.disabled, .btn-outline-dark:disabled {
-  color: #343a40;
-  background-color: transparent;
-}
-.btn-outline-dark:not(:disabled):not(.disabled):active, .btn-outline-dark:not(:disabled):not(.disabled).active, .show > .btn-outline-dark.dropdown-toggle {
-  color: #fff;
-  background-color: #343a40;
-  border-color: #343a40;
-}
-.btn-outline-dark:not(:disabled):not(.disabled):active:focus, .btn-outline-dark:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-dark.dropdown-toggle:focus {
-  box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
-}
-
-.btn-link {
-  font-weight: 400;
-  color: #007bff;
-  text-decoration: none;
-}
-.btn-link:hover {
-  color: #0056b3;
-  text-decoration: underline;
-}
-.btn-link:focus, .btn-link.focus {
-  text-decoration: underline;
-  box-shadow: none;
-}
-.btn-link:disabled, .btn-link.disabled {
-  color: #6c757d;
-  pointer-events: none;
-}
-
-.btn-lg, .btn-group-lg > .btn {
-  padding: 0.5rem 1rem;
-  font-size: 1.25rem;
-  line-height: 1.5;
-  border-radius: 0.3rem;
-}
-
-.btn-sm, .btn-group-sm > .btn {
-  padding: 0.25rem 0.5rem;
-  font-size: 0.875rem;
-  line-height: 1.5;
-  border-radius: 0.2rem;
-}
-
-.btn-block {
-  display: block;
-  width: 100%;
-}
-.btn-block + .btn-block {
-  margin-top: 0.5rem;
-}
-
-input[type=submit].btn-block,
-input[type=reset].btn-block,
-input[type=button].btn-block {
-  width: 100%;
-}
-
-.fade {
-  transition: opacity 0.15s linear;
-}
-@media (prefers-reduced-motion: reduce) {
-  .fade {
-    transition: none;
-  }
-}
-.fade:not(.show) {
-  opacity: 0;
-}
-
-.collapse:not(.show) {
-  display: none;
-}
-
-.collapsing {
-  position: relative;
-  height: 0;
-  overflow: hidden;
-  transition: height 0.35s ease;
-}
-@media (prefers-reduced-motion: reduce) {
-  .collapsing {
-    transition: none;
-  }
-}
-
-.dropup,
-.dropright,
-.dropdown,
-.dropleft {
-  position: relative;
-}
-
-.dropdown-toggle {
-  white-space: nowrap;
-}
-.dropdown-toggle::after {
-  display: inline-block;
-  margin-left: 0.255em;
-  vertical-align: 0.255em;
-  content: "";
-  border-top: 0.3em solid;
-  border-right: 0.3em solid transparent;
-  border-bottom: 0;
-  border-left: 0.3em solid transparent;
-}
-.dropdown-toggle:empty::after {
-  margin-left: 0;
-}
-
-.dropdown-menu {
-  position: absolute;
-  top: 100%;
-  left: 0;
-  z-index: 1000;
-  display: none;
-  float: left;
-  min-width: 10rem;
-  padding: 0.5rem 0;
-  margin: 0.125rem 0 0;
-  font-size: 1rem;
-  color: #212529;
-  text-align: left;
-  list-style: none;
-  background-color: #fff;
-  background-clip: padding-box;
-  border: 1px solid rgba(0, 0, 0, 0.15);
-  border-radius: 0.25rem;
-}
-
-.dropdown-menu-left {
-  right: auto;
-  left: 0;
-}
-
-.dropdown-menu-right {
-  right: 0;
-  left: auto;
-}
-
-@media (min-width: 576px) {
-  .dropdown-menu-sm-left {
-    right: auto;
-    left: 0;
-  }
-
-  .dropdown-menu-sm-right {
-    right: 0;
-    left: auto;
-  }
-}
-@media (min-width: 768px) {
-  .dropdown-menu-md-left {
-    right: auto;
-    left: 0;
-  }
-
-  .dropdown-menu-md-right {
-    right: 0;
-    left: auto;
-  }
-}
-@media (min-width: 992px) {
-  .dropdown-menu-lg-left {
-    right: auto;
-    left: 0;
-  }
-
-  .dropdown-menu-lg-right {
-    right: 0;
-    left: auto;
-  }
-}
-@media (min-width: 1200px) {
-  .dropdown-menu-xl-left {
-    right: auto;
-    left: 0;
-  }
-
-  .dropdown-menu-xl-right {
-    right: 0;
-    left: auto;
-  }
-}
-.dropup .dropdown-menu {
-  top: auto;
-  bottom: 100%;
-  margin-top: 0;
-  margin-bottom: 0.125rem;
-}
-.dropup .dropdown-toggle::after {
-  display: inline-block;
-  margin-left: 0.255em;
-  vertical-align: 0.255em;
-  content: "";
-  border-top: 0;
-  border-right: 0.3em solid transparent;
-  border-bottom: 0.3em solid;
-  border-left: 0.3em solid transparent;
-}
-.dropup .dropdown-toggle:empty::after {
-  margin-left: 0;
-}
-
-.dropright .dropdown-menu {
-  top: 0;
-  right: auto;
-  left: 100%;
-  margin-top: 0;
-  margin-left: 0.125rem;
-}
-.dropright .dropdown-toggle::after {
-  display: inline-block;
-  margin-left: 0.255em;
-  vertical-align: 0.255em;
-  content: "";
-  border-top: 0.3em solid transparent;
-  border-right: 0;
-  border-bottom: 0.3em solid transparent;
-  border-left: 0.3em solid;
-}
-.dropright .dropdown-toggle:empty::after {
-  margin-left: 0;
-}
-.dropright .dropdown-toggle::after {
-  vertical-align: 0;
-}
-
-.dropleft .dropdown-menu {
-  top: 0;
-  right: 100%;
-  left: auto;
-  margin-top: 0;
-  margin-right: 0.125rem;
-}
-.dropleft .dropdown-toggle::after {
-  display: inline-block;
-  margin-left: 0.255em;
-  vertical-align: 0.255em;
-  content: "";
-}
-.dropleft .dropdown-toggle::after {
-  display: none;
-}
-.dropleft .dropdown-toggle::before {
-  display: inline-block;
-  margin-right: 0.255em;
-  vertical-align: 0.255em;
-  content: "";
-  border-top: 0.3em solid transparent;
-  border-right: 0.3em solid;
-  border-bottom: 0.3em solid transparent;
-}
-.dropleft .dropdown-toggle:empty::after {
-  margin-left: 0;
-}
-.dropleft .dropdown-toggle::before {
-  vertical-align: 0;
-}
-
-.dropdown-menu[x-placement^=top], .dropdown-menu[x-placement^=right], .dropdown-menu[x-placement^=bottom], .dropdown-menu[x-placement^=left] {
-  right: auto;
-  bottom: auto;
-}
-
-.dropdown-divider {
-  height: 0;
-  margin: 0.5rem 0;
-  overflow: hidden;
-  border-top: 1px solid #e9ecef;
-}
-
-.dropdown-item {
-  display: block;
-  width: 100%;
-  padding: 0.25rem 1.5rem;
-  clear: both;
-  font-weight: 400;
-  color: #212529;
-  text-align: inherit;
-  white-space: nowrap;
-  background-color: transparent;
-  border: 0;
-}
-.dropdown-item:hover, .dropdown-item:focus {
-  color: #16181b;
-  text-decoration: none;
-  background-color: #f8f9fa;
-}
-.dropdown-item.active, .dropdown-item:active {
-  color: #fff;
-  text-decoration: none;
-  background-color: #007bff;
-}
-.dropdown-item.disabled, .dropdown-item:disabled {
-  color: #6c757d;
-  pointer-events: none;
-  background-color: transparent;
-}
-
-.dropdown-menu.show {
-  display: block;
-}
-
-.dropdown-header {
-  display: block;
-  padding: 0.5rem 1.5rem;
-  margin-bottom: 0;
-  font-size: 0.875rem;
-  color: #6c757d;
-  white-space: nowrap;
-}
-
-.dropdown-item-text {
-  display: block;
-  padding: 0.25rem 1.5rem;
-  color: #212529;
-}
-
-.btn-group,
-.btn-group-vertical {
-  position: relative;
-  display: inline-flex;
-  vertical-align: middle;
-}
-.btn-group > .btn,
-.btn-group-vertical > .btn {
-  position: relative;
-  flex: 1 1 auto;
-}
-.btn-group > .btn:hover,
-.btn-group-vertical > .btn:hover {
-  z-index: 1;
-}
-.btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active,
-.btn-group-vertical > .btn:focus,
-.btn-group-vertical > .btn:active,
-.btn-group-vertical > .btn.active {
-  z-index: 1;
-}
-
-.btn-toolbar {
-  display: flex;
-  flex-wrap: wrap;
-  justify-content: flex-start;
-}
-.btn-toolbar .input-group {
-  width: auto;
-}
-
-.btn-group > .btn:not(:first-child),
-.btn-group > .btn-group:not(:first-child) {
-  margin-left: -1px;
-}
-.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
-.btn-group > .btn-group:not(:last-child) > .btn {
-  border-top-right-radius: 0;
-  border-bottom-right-radius: 0;
-}
-.btn-group > .btn:not(:first-child),
-.btn-group > .btn-group:not(:first-child) > .btn {
-  border-top-left-radius: 0;
-  border-bottom-left-radius: 0;
-}
-
-.dropdown-toggle-split {
-  padding-right: 0.5625rem;
-  padding-left: 0.5625rem;
-}
-.dropdown-toggle-split::after, .dropup .dropdown-toggle-split::after, .dropright .dropdown-toggle-split::after {
-  margin-left: 0;
-}
-.dropleft .dropdown-toggle-split::before {
-  margin-right: 0;
-}
-
-.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split {
-  padding-right: 0.375rem;
-  padding-left: 0.375rem;
-}
-
-.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split {
-  padding-right: 0.75rem;
-  padding-left: 0.75rem;
-}
-
-.btn-group-vertical {
-  flex-direction: column;
-  align-items: flex-start;
-  justify-content: center;
-}
-.btn-group-vertical > .btn,
-.btn-group-vertical > .btn-group {
-  width: 100%;
-}
-.btn-group-vertical > .btn:not(:first-child),
-.btn-group-vertical > .btn-group:not(:first-child) {
-  margin-top: -1px;
-}
-.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle),
-.btn-group-vertical > .btn-group:not(:last-child) > .btn {
-  border-bottom-right-radius: 0;
-  border-bottom-left-radius: 0;
-}
-.btn-group-vertical > .btn:not(:first-child),
-.btn-group-vertical > .btn-group:not(:first-child) > .btn {
-  border-top-left-radius: 0;
-  border-top-right-radius: 0;
-}
-
-.btn-group-toggle > .btn,
-.btn-group-toggle > .btn-group > .btn {
-  margin-bottom: 0;
-}
-.btn-group-toggle > .btn input[type=radio],
-.btn-group-toggle > .btn input[type=checkbox],
-.btn-group-toggle > .btn-group > .btn input[type=radio],
-.btn-group-toggle > .btn-group > .btn input[type=checkbox] {
-  position: absolute;
-  clip: rect(0, 0, 0, 0);
-  pointer-events: none;
-}
-
-.input-group {
-  position: relative;
-  display: flex;
-  flex-wrap: wrap;
-  align-items: stretch;
-  width: 100%;
-}
-.input-group > .form-control,
-.input-group > .form-control-plaintext,
-.input-group > .custom-select,
-.input-group > .custom-file {
-  position: relative;
-  flex: 1 1 0%;
-  min-width: 0;
-  margin-bottom: 0;
-}
-.input-group > .form-control + .form-control,
-.input-group > .form-control + .custom-select,
-.input-group > .form-control + .custom-file,
-.input-group > .form-control-plaintext + .form-control,
-.input-group > .form-control-plaintext + .custom-select,
-.input-group > .form-control-plaintext + .custom-file,
-.input-group > .custom-select + .form-control,
-.input-group > .custom-select + .custom-select,
-.input-group > .custom-select + .custom-file,
-.input-group > .custom-file + .form-control,
-.input-group > .custom-file + .custom-select,
-.input-group > .custom-file + .custom-file {
-  margin-left: -1px;
-}
-.input-group > .form-control:focus,
-.input-group > .custom-select:focus,
-.input-group > .custom-file .custom-file-input:focus ~ .custom-file-label {
-  z-index: 3;
-}
-.input-group > .custom-file .custom-file-input:focus {
-  z-index: 4;
-}
-.input-group > .form-control:not(:last-child),
-.input-group > .custom-select:not(:last-child) {
-  border-top-right-radius: 0;
-  border-bottom-right-radius: 0;
-}
-.input-group > .form-control:not(:first-child),
-.input-group > .custom-select:not(:first-child) {
-  border-top-left-radius: 0;
-  border-bottom-left-radius: 0;
-}
-.input-group > .custom-file {
-  display: flex;
-  align-items: center;
-}
-.input-group > .custom-file:not(:last-child) .custom-file-label, .input-group > .custom-file:not(:last-child) .custom-file-label::after {
-  border-top-right-radius: 0;
-  border-bottom-right-radius: 0;
-}
-.input-group > .custom-file:not(:first-child) .custom-file-label {
-  border-top-left-radius: 0;
-  border-bottom-left-radius: 0;
-}
-
-.input-group-prepend,
-.input-group-append {
-  display: flex;
-}
-.input-group-prepend .btn,
-.input-group-append .btn {
-  position: relative;
-  z-index: 2;
-}
-.input-group-prepend .btn:focus,
-.input-group-append .btn:focus {
-  z-index: 3;
-}
-.input-group-prepend .btn + .btn,
-.input-group-prepend .btn + .input-group-text,
-.input-group-prepend .input-group-text + .input-group-text,
-.input-group-prepend .input-group-text + .btn,
-.input-group-append .btn + .btn,
-.input-group-append .btn + .input-group-text,
-.input-group-append .input-group-text + .input-group-text,
-.input-group-append .input-group-text + .btn {
-  margin-left: -1px;
-}
-
-.input-group-prepend {
-  margin-right: -1px;
-}
-
-.input-group-append {
-  margin-left: -1px;
-}
-
-.input-group-text {
-  display: flex;
-  align-items: center;
-  padding: 0.375rem 0.75rem;
-  margin-bottom: 0;
-  font-size: 1rem;
-  font-weight: 400;
-  line-height: 1.5;
-  color: #495057;
-  text-align: center;
-  white-space: nowrap;
-  background-color: #e9ecef;
-  border: 1px solid #ced4da;
-  border-radius: 0.25rem;
-}
-.input-group-text input[type=radio],
-.input-group-text input[type=checkbox] {
-  margin-top: 0;
-}
-
-.input-group-lg > .form-control:not(textarea),
-.input-group-lg > .custom-select {
-  height: calc(1.5em + 1rem + 2px);
-}
-
-.input-group-lg > .form-control,
-.input-group-lg > .custom-select,
-.input-group-lg > .input-group-prepend > .input-group-text,
-.input-group-lg > .input-group-append > .input-group-text,
-.input-group-lg > .input-group-prepend > .btn,
-.input-group-lg > .input-group-append > .btn {
-  padding: 0.5rem 1rem;
-  font-size: 1.25rem;
-  line-height: 1.5;
-  border-radius: 0.3rem;
-}
-
-.input-group-sm > .form-control:not(textarea),
-.input-group-sm > .custom-select {
-  height: calc(1.5em + 0.5rem + 2px);
-}
-
-.input-group-sm > .form-control,
-.input-group-sm > .custom-select,
-.input-group-sm > .input-group-prepend > .input-group-text,
-.input-group-sm > .input-group-append > .input-group-text,
-.input-group-sm > .input-group-prepend > .btn,
-.input-group-sm > .input-group-append > .btn {
-  padding: 0.25rem 0.5rem;
-  font-size: 0.875rem;
-  line-height: 1.5;
-  border-radius: 0.2rem;
-}
-
-.input-group-lg > .custom-select,
-.input-group-sm > .custom-select {
-  padding-right: 1.75rem;
-}
-
-.input-group > .input-group-prepend > .btn,
-.input-group > .input-group-prepend > .input-group-text,
-.input-group > .input-group-append:not(:last-child) > .btn,
-.input-group > .input-group-append:not(:last-child) > .input-group-text,
-.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
-.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
-  border-top-right-radius: 0;
-  border-bottom-right-radius: 0;
-}
-
-.input-group > .input-group-append > .btn,
-.input-group > .input-group-append > .input-group-text,
-.input-group > .input-group-prepend:not(:first-child) > .btn,
-.input-group > .input-group-prepend:not(:first-child) > .input-group-text,
-.input-group > .input-group-prepend:first-child > .btn:not(:first-child),
-.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
-  border-top-left-radius: 0;
-  border-bottom-left-radius: 0;
-}
-
-.custom-control {
-  position: relative;
-  display: block;
-  min-height: 1.5rem;
-  padding-left: 1.5rem;
-}
-
-.custom-control-inline {
-  display: inline-flex;
-  margin-right: 1rem;
-}
-
-.custom-control-input {
-  position: absolute;
-  left: 0;
-  z-index: -1;
-  width: 1rem;
-  height: 1.25rem;
-  opacity: 0;
-}
-.custom-control-input:checked ~ .custom-control-label::before {
-  color: #fff;
-  border-color: #007bff;
-  background-color: #007bff;
-}
-.custom-control-input:focus ~ .custom-control-label::before {
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
-  border-color: #80bdff;
-}
-.custom-control-input:not(:disabled):active ~ .custom-control-label::before {
-  color: #fff;
-  background-color: #b3d7ff;
-  border-color: #b3d7ff;
-}
-.custom-control-input[disabled] ~ .custom-control-label, .custom-control-input:disabled ~ .custom-control-label {
-  color: #6c757d;
-}
-.custom-control-input[disabled] ~ .custom-control-label::before, .custom-control-input:disabled ~ .custom-control-label::before {
-  background-color: #e9ecef;
-}
-
-.custom-control-label {
-  position: relative;
-  margin-bottom: 0;
-  vertical-align: top;
-}
-.custom-control-label::before {
-  position: absolute;
-  top: 0.25rem;
-  left: -1.5rem;
-  display: block;
-  width: 1rem;
-  height: 1rem;
-  pointer-events: none;
-  content: "";
-  background-color: #fff;
-  border: #adb5bd solid 1px;
-}
-.custom-control-label::after {
-  position: absolute;
-  top: 0.25rem;
-  left: -1.5rem;
-  display: block;
-  width: 1rem;
-  height: 1rem;
-  content: "";
-  background: no-repeat 50%/50% 50%;
-}
-
-.custom-checkbox .custom-control-label::before {
-  border-radius: 0.25rem;
-}
-.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e");
-}
-.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before {
-  border-color: #007bff;
-  background-color: #007bff;
-}
-.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after {
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e");
-}
-.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before {
-  background-color: rgba(0, 123, 255, 0.5);
-}
-.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before {
-  background-color: rgba(0, 123, 255, 0.5);
-}
-
-.custom-radio .custom-control-label::before {
-  border-radius: 50%;
-}
-.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
-}
-.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before {
-  background-color: rgba(0, 123, 255, 0.5);
-}
-
-.custom-switch {
-  padding-left: 2.25rem;
-}
-.custom-switch .custom-control-label::before {
-  left: -2.25rem;
-  width: 1.75rem;
-  pointer-events: all;
-  border-radius: 0.5rem;
-}
-.custom-switch .custom-control-label::after {
-  top: calc(0.25rem + 2px);
-  left: calc(-2.25rem + 2px);
-  width: calc(1rem - 4px);
-  height: calc(1rem - 4px);
-  background-color: #adb5bd;
-  border-radius: 0.5rem;
-  transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-}
-@media (prefers-reduced-motion: reduce) {
-  .custom-switch .custom-control-label::after {
-    transition: none;
-  }
-}
-.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
-  background-color: #fff;
-  transform: translateX(0.75rem);
-}
-.custom-switch .custom-control-input:disabled:checked ~ .custom-control-label::before {
-  background-color: rgba(0, 123, 255, 0.5);
-}
-
-.custom-select {
-  display: inline-block;
-  width: 100%;
-  height: calc(1.5em + 0.75rem + 2px);
-  padding: 0.375rem 1.75rem 0.375rem 0.75rem;
-  font-size: 1rem;
-  font-weight: 400;
-  line-height: 1.5;
-  color: #495057;
-  vertical-align: middle;
-  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right 0.75rem center/8px 10px;
-  border: 1px solid #ced4da;
-  border-radius: 0.25rem;
-  -webkit-appearance: none;
-     -moz-appearance: none;
-          appearance: none;
-}
-.custom-select:focus {
-  border-color: #80bdff;
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.custom-select:focus::-ms-value {
-  color: #495057;
-  background-color: #fff;
-}
-.custom-select[multiple], .custom-select[size]:not([size="1"]) {
-  height: auto;
-  padding-right: 0.75rem;
-  background-image: none;
-}
-.custom-select:disabled {
-  color: #6c757d;
-  background-color: #e9ecef;
-}
-.custom-select::-ms-expand {
-  display: none;
-}
-.custom-select:-moz-focusring {
-  color: transparent;
-  text-shadow: 0 0 0 #495057;
-}
-
-.custom-select-sm {
-  height: calc(1.5em + 0.5rem + 2px);
-  padding-top: 0.25rem;
-  padding-bottom: 0.25rem;
-  padding-left: 0.5rem;
-  font-size: 0.875rem;
-}
-
-.custom-select-lg {
-  height: calc(1.5em + 1rem + 2px);
-  padding-top: 0.5rem;
-  padding-bottom: 0.5rem;
-  padding-left: 1rem;
-  font-size: 1.25rem;
-}
-
-.custom-file {
-  position: relative;
-  display: inline-block;
-  width: 100%;
-  height: calc(1.5em + 0.75rem + 2px);
-  margin-bottom: 0;
-}
-
-.custom-file-input {
-  position: relative;
-  z-index: 2;
-  width: 100%;
-  height: calc(1.5em + 0.75rem + 2px);
-  margin: 0;
-  opacity: 0;
-}
-.custom-file-input:focus ~ .custom-file-label {
-  border-color: #80bdff;
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.custom-file-input[disabled] ~ .custom-file-label, .custom-file-input:disabled ~ .custom-file-label {
-  background-color: #e9ecef;
-}
-.custom-file-input:lang(en) ~ .custom-file-label::after {
-  content: "Browse";
-}
-.custom-file-input ~ .custom-file-label[data-browse]::after {
-  content: attr(data-browse);
-}
-
-.custom-file-label {
-  position: absolute;
-  top: 0;
-  right: 0;
-  left: 0;
-  z-index: 1;
-  height: calc(1.5em + 0.75rem + 2px);
-  padding: 0.375rem 0.75rem;
-  font-weight: 400;
-  line-height: 1.5;
-  color: #495057;
-  background-color: #fff;
-  border: 1px solid #ced4da;
-  border-radius: 0.25rem;
-}
-.custom-file-label::after {
-  position: absolute;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  z-index: 3;
-  display: block;
-  height: calc(1.5em + 0.75rem);
-  padding: 0.375rem 0.75rem;
-  line-height: 1.5;
-  color: #495057;
-  content: "Browse";
-  background-color: #e9ecef;
-  border-left: inherit;
-  border-radius: 0 0.25rem 0.25rem 0;
-}
-
-.custom-range {
-  width: 100%;
-  height: 1.4rem;
-  padding: 0;
-  background-color: transparent;
-  -webkit-appearance: none;
-     -moz-appearance: none;
-          appearance: none;
-}
-.custom-range:focus {
-  outline: none;
-}
-.custom-range:focus::-webkit-slider-thumb {
-  box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.custom-range:focus::-moz-range-thumb {
-  box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.custom-range:focus::-ms-thumb {
-  box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-.custom-range::-moz-focus-outer {
-  border: 0;
-}
-.custom-range::-webkit-slider-thumb {
-  width: 1rem;
-  height: 1rem;
-  margin-top: -0.25rem;
-  background-color: #007bff;
-  border: 0;
-  border-radius: 1rem;
-  -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-  -webkit-appearance: none;
-          appearance: none;
-}
-@media (prefers-reduced-motion: reduce) {
-  .custom-range::-webkit-slider-thumb {
-    -webkit-transition: none;
-    transition: none;
-  }
-}
-.custom-range::-webkit-slider-thumb:active {
-  background-color: #b3d7ff;
-}
-.custom-range::-webkit-slider-runnable-track {
-  width: 100%;
-  height: 0.5rem;
-  color: transparent;
-  cursor: pointer;
-  background-color: #dee2e6;
-  border-color: transparent;
-  border-radius: 1rem;
-}
-.custom-range::-moz-range-thumb {
-  width: 1rem;
-  height: 1rem;
-  background-color: #007bff;
-  border: 0;
-  border-radius: 1rem;
-  -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-  -moz-appearance: none;
-       appearance: none;
-}
-@media (prefers-reduced-motion: reduce) {
-  .custom-range::-moz-range-thumb {
-    -moz-transition: none;
-    transition: none;
-  }
-}
-.custom-range::-moz-range-thumb:active {
-  background-color: #b3d7ff;
-}
-.custom-range::-moz-range-track {
-  width: 100%;
-  height: 0.5rem;
-  color: transparent;
-  cursor: pointer;
-  background-color: #dee2e6;
-  border-color: transparent;
-  border-radius: 1rem;
-}
-.custom-range::-ms-thumb {
-  width: 1rem;
-  height: 1rem;
-  margin-top: 0;
-  margin-right: 0.2rem;
-  margin-left: 0.2rem;
-  background-color: #007bff;
-  border: 0;
-  border-radius: 1rem;
-  -ms-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-  appearance: none;
-}
-@media (prefers-reduced-motion: reduce) {
-  .custom-range::-ms-thumb {
-    -ms-transition: none;
-    transition: none;
-  }
-}
-.custom-range::-ms-thumb:active {
-  background-color: #b3d7ff;
-}
-.custom-range::-ms-track {
-  width: 100%;
-  height: 0.5rem;
-  color: transparent;
-  cursor: pointer;
-  background-color: transparent;
-  border-color: transparent;
-  border-width: 0.5rem;
-}
-.custom-range::-ms-fill-lower {
-  background-color: #dee2e6;
-  border-radius: 1rem;
-}
-.custom-range::-ms-fill-upper {
-  margin-right: 15px;
-  background-color: #dee2e6;
-  border-radius: 1rem;
-}
-.custom-range:disabled::-webkit-slider-thumb {
-  background-color: #adb5bd;
-}
-.custom-range:disabled::-webkit-slider-runnable-track {
-  cursor: default;
-}
-.custom-range:disabled::-moz-range-thumb {
-  background-color: #adb5bd;
-}
-.custom-range:disabled::-moz-range-track {
-  cursor: default;
-}
-.custom-range:disabled::-ms-thumb {
-  background-color: #adb5bd;
-}
-
-.custom-control-label::before,
-.custom-file-label,
-.custom-select {
-  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-}
-@media (prefers-reduced-motion: reduce) {
-  .custom-control-label::before,
-.custom-file-label,
-.custom-select {
-    transition: none;
-  }
-}
-
-.nav {
-  display: flex;
-  flex-wrap: wrap;
-  padding-left: 0;
-  margin-bottom: 0;
-  list-style: none;
-}
-
-.nav-link {
-  display: block;
-  padding: 0.5rem 1rem;
-}
-.nav-link:hover, .nav-link:focus {
-  text-decoration: none;
-}
-.nav-link.disabled {
-  color: #6c757d;
-  pointer-events: none;
-  cursor: default;
-}
-
-.nav-tabs {
-  border-bottom: 1px solid #dee2e6;
-}
-.nav-tabs .nav-item {
-  margin-bottom: -1px;
-}
-.nav-tabs .nav-link {
-  border: 1px solid transparent;
-  border-top-left-radius: 0.25rem;
-  border-top-right-radius: 0.25rem;
-}
-.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
-  border-color: #e9ecef #e9ecef #dee2e6;
-}
-.nav-tabs .nav-link.disabled {
-  color: #6c757d;
-  background-color: transparent;
-  border-color: transparent;
-}
-.nav-tabs .nav-link.active,
-.nav-tabs .nav-item.show .nav-link {
-  color: #495057;
-  background-color: #fff;
-  border-color: #dee2e6 #dee2e6 #fff;
-}
-.nav-tabs .dropdown-menu {
-  margin-top: -1px;
-  border-top-left-radius: 0;
-  border-top-right-radius: 0;
-}
-
-.nav-pills .nav-link {
-  border-radius: 0.25rem;
-}
-.nav-pills .nav-link.active,
-.nav-pills .show > .nav-link {
-  color: #fff;
-  background-color: #007bff;
-}
-
-.nav-fill .nav-item {
-  flex: 1 1 auto;
-  text-align: center;
-}
-
-.nav-justified .nav-item {
-  flex-basis: 0;
-  flex-grow: 1;
-  text-align: center;
-}
-
-.tab-content > .tab-pane {
-  display: none;
-}
-.tab-content > .active {
-  display: block;
-}
-
-.navbar {
-  position: relative;
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-  justify-content: space-between;
-  padding: 0.5rem 1rem;
-}
-.navbar .container,
-.navbar .container-fluid,
-.navbar .container-sm,
-.navbar .container-md,
-.navbar .container-lg,
-.navbar .container-xl {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-  justify-content: space-between;
-}
-.navbar-brand {
-  display: inline-block;
-  padding-top: 0.3125rem;
-  padding-bottom: 0.3125rem;
-  margin-right: 1rem;
-  font-size: 1.25rem;
-  line-height: inherit;
-  white-space: nowrap;
-}
-.navbar-brand:hover, .navbar-brand:focus {
-  text-decoration: none;
-}
-
-.navbar-nav {
-  display: flex;
-  flex-direction: column;
-  padding-left: 0;
-  margin-bottom: 0;
-  list-style: none;
-}
-.navbar-nav .nav-link {
-  padding-right: 0;
-  padding-left: 0;
-}
-.navbar-nav .dropdown-menu {
-  position: static;
-  float: none;
-}
-
-.navbar-text {
-  display: inline-block;
-  padding-top: 0.5rem;
-  padding-bottom: 0.5rem;
-}
-
-.navbar-collapse {
-  flex-basis: 100%;
-  flex-grow: 1;
-  align-items: center;
-}
-
-.navbar-toggler {
-  padding: 0.25rem 0.75rem;
-  font-size: 1.25rem;
-  line-height: 1;
-  background-color: transparent;
-  border: 1px solid transparent;
-  border-radius: 0.25rem;
-}
-.navbar-toggler:hover, .navbar-toggler:focus {
-  text-decoration: none;
-}
-
-.navbar-toggler-icon {
-  display: inline-block;
-  width: 1.5em;
-  height: 1.5em;
-  vertical-align: middle;
-  content: "";
-  background: no-repeat center center;
-  background-size: 100% 100%;
-}
-
-@media (max-width: 575.98px) {
-  .navbar-expand-sm > .container,
-.navbar-expand-sm > .container-fluid,
-.navbar-expand-sm > .container-sm,
-.navbar-expand-sm > .container-md,
-.navbar-expand-sm > .container-lg,
-.navbar-expand-sm > .container-xl {
-    padding-right: 0;
-    padding-left: 0;
-  }
-}
-@media (min-width: 576px) {
-  .navbar-expand-sm {
-    flex-flow: row nowrap;
-    justify-content: flex-start;
-  }
-  .navbar-expand-sm .navbar-nav {
-    flex-direction: row;
-  }
-  .navbar-expand-sm .navbar-nav .dropdown-menu {
-    position: absolute;
-  }
-  .navbar-expand-sm .navbar-nav .nav-link {
-    padding-right: 0.5rem;
-    padding-left: 0.5rem;
-  }
-  .navbar-expand-sm > .container,
-.navbar-expand-sm > .container-fluid,
-.navbar-expand-sm > .container-sm,
-.navbar-expand-sm > .container-md,
-.navbar-expand-sm > .container-lg,
-.navbar-expand-sm > .container-xl {
-    flex-wrap: nowrap;
-  }
-  .navbar-expand-sm .navbar-collapse {
-    display: flex !important;
-    flex-basis: auto;
-  }
-  .navbar-expand-sm .navbar-toggler {
-    display: none;
-  }
-}
-@media (max-width: 767.98px) {
-  .navbar-expand-md > .container,
-.navbar-expand-md > .container-fluid,
-.navbar-expand-md > .container-sm,
-.navbar-expand-md > .container-md,
-.navbar-expand-md > .container-lg,
-.navbar-expand-md > .container-xl {
-    padding-right: 0;
-    padding-left: 0;
-  }
-}
-@media (min-width: 768px) {
-  .navbar-expand-md {
-    flex-flow: row nowrap;
-    justify-content: flex-start;
-  }
-  .navbar-expand-md .navbar-nav {
-    flex-direction: row;
-  }
-  .navbar-expand-md .navbar-nav .dropdown-menu {
-    position: absolute;
-  }
-  .navbar-expand-md .navbar-nav .nav-link {
-    padding-right: 0.5rem;
-    padding-left: 0.5rem;
-  }
-  .navbar-expand-md > .container,
-.navbar-expand-md > .container-fluid,
-.navbar-expand-md > .container-sm,
-.navbar-expand-md > .container-md,
-.navbar-expand-md > .container-lg,
-.navbar-expand-md > .container-xl {
-    flex-wrap: nowrap;
-  }
-  .navbar-expand-md .navbar-collapse {
-    display: flex !important;
-    flex-basis: auto;
-  }
-  .navbar-expand-md .navbar-toggler {
-    display: none;
-  }
-}
-@media (max-width: 991.98px) {
-  .navbar-expand-lg > .container,
-.navbar-expand-lg > .container-fluid,
-.navbar-expand-lg > .container-sm,
-.navbar-expand-lg > .container-md,
-.navbar-expand-lg > .container-lg,
-.navbar-expand-lg > .container-xl {
-    padding-right: 0;
-    padding-left: 0;
-  }
-}
-@media (min-width: 992px) {
-  .navbar-expand-lg {
-    flex-flow: row nowrap;
-    justify-content: flex-start;
-  }
-  .navbar-expand-lg .navbar-nav {
-    flex-direction: row;
-  }
-  .navbar-expand-lg .navbar-nav .dropdown-menu {
-    position: absolute;
-  }
-  .navbar-expand-lg .navbar-nav .nav-link {
-    padding-right: 0.5rem;
-    padding-left: 0.5rem;
-  }
-  .navbar-expand-lg > .container,
-.navbar-expand-lg > .container-fluid,
-.navbar-expand-lg > .container-sm,
-.navbar-expand-lg > .container-md,
-.navbar-expand-lg > .container-lg,
-.navbar-expand-lg > .container-xl {
-    flex-wrap: nowrap;
-  }
-  .navbar-expand-lg .navbar-collapse {
-    display: flex !important;
-    flex-basis: auto;
-  }
-  .navbar-expand-lg .navbar-toggler {
-    display: none;
-  }
-}
-@media (max-width: 1199.98px) {
-  .navbar-expand-xl > .container,
-.navbar-expand-xl > .container-fluid,
-.navbar-expand-xl > .container-sm,
-.navbar-expand-xl > .container-md,
-.navbar-expand-xl > .container-lg,
-.navbar-expand-xl > .container-xl {
-    padding-right: 0;
-    padding-left: 0;
-  }
-}
-@media (min-width: 1200px) {
-  .navbar-expand-xl {
-    flex-flow: row nowrap;
-    justify-content: flex-start;
-  }
-  .navbar-expand-xl .navbar-nav {
-    flex-direction: row;
-  }
-  .navbar-expand-xl .navbar-nav .dropdown-menu {
-    position: absolute;
-  }
-  .navbar-expand-xl .navbar-nav .nav-link {
-    padding-right: 0.5rem;
-    padding-left: 0.5rem;
-  }
-  .navbar-expand-xl > .container,
-.navbar-expand-xl > .container-fluid,
-.navbar-expand-xl > .container-sm,
-.navbar-expand-xl > .container-md,
-.navbar-expand-xl > .container-lg,
-.navbar-expand-xl > .container-xl {
-    flex-wrap: nowrap;
-  }
-  .navbar-expand-xl .navbar-collapse {
-    display: flex !important;
-    flex-basis: auto;
-  }
-  .navbar-expand-xl .navbar-toggler {
-    display: none;
-  }
-}
-.navbar-expand {
-  flex-flow: row nowrap;
-  justify-content: flex-start;
-}
-.navbar-expand > .container,
-.navbar-expand > .container-fluid,
-.navbar-expand > .container-sm,
-.navbar-expand > .container-md,
-.navbar-expand > .container-lg,
-.navbar-expand > .container-xl {
-  padding-right: 0;
-  padding-left: 0;
-}
-.navbar-expand .navbar-nav {
-  flex-direction: row;
-}
-.navbar-expand .navbar-nav .dropdown-menu {
-  position: absolute;
-}
-.navbar-expand .navbar-nav .nav-link {
-  padding-right: 0.5rem;
-  padding-left: 0.5rem;
-}
-.navbar-expand > .container,
-.navbar-expand > .container-fluid,
-.navbar-expand > .container-sm,
-.navbar-expand > .container-md,
-.navbar-expand > .container-lg,
-.navbar-expand > .container-xl {
-  flex-wrap: nowrap;
-}
-.navbar-expand .navbar-collapse {
-  display: flex !important;
-  flex-basis: auto;
-}
-.navbar-expand .navbar-toggler {
-  display: none;
-}
-
-.navbar-light .navbar-brand {
-  color: rgba(0, 0, 0, 0.9);
-}
-.navbar-light .navbar-brand:hover, .navbar-light .navbar-brand:focus {
-  color: rgba(0, 0, 0, 0.9);
-}
-.navbar-light .navbar-nav .nav-link {
-  color: rgba(0, 0, 0, 0.5);
-}
-.navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus {
-  color: rgba(0, 0, 0, 0.7);
-}
-.navbar-light .navbar-nav .nav-link.disabled {
-  color: rgba(0, 0, 0, 0.3);
-}
-.navbar-light .navbar-nav .show > .nav-link,
-.navbar-light .navbar-nav .active > .nav-link,
-.navbar-light .navbar-nav .nav-link.show,
-.navbar-light .navbar-nav .nav-link.active {
-  color: rgba(0, 0, 0, 0.9);
-}
-.navbar-light .navbar-toggler {
-  color: rgba(0, 0, 0, 0.5);
-  border-color: rgba(0, 0, 0, 0.1);
-}
-.navbar-light .navbar-toggler-icon {
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
-}
-.navbar-light .navbar-text {
-  color: rgba(0, 0, 0, 0.5);
-}
-.navbar-light .navbar-text a {
-  color: rgba(0, 0, 0, 0.9);
-}
-.navbar-light .navbar-text a:hover, .navbar-light .navbar-text a:focus {
-  color: rgba(0, 0, 0, 0.9);
-}
-
-.navbar-dark .navbar-brand {
-  color: #fff;
-}
-.navbar-dark .navbar-brand:hover, .navbar-dark .navbar-brand:focus {
-  color: #fff;
-}
-.navbar-dark .navbar-nav .nav-link {
-  color: rgba(255, 255, 255, 0.5);
-}
-.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus {
-  color: rgba(255, 255, 255, 0.75);
-}
-.navbar-dark .navbar-nav .nav-link.disabled {
-  color: rgba(255, 255, 255, 0.25);
-}
-.navbar-dark .navbar-nav .show > .nav-link,
-.navbar-dark .navbar-nav .active > .nav-link,
-.navbar-dark .navbar-nav .nav-link.show,
-.navbar-dark .navbar-nav .nav-link.active {
-  color: #fff;
-}
-.navbar-dark .navbar-toggler {
-  color: rgba(255, 255, 255, 0.5);
-  border-color: rgba(255, 255, 255, 0.1);
-}
-.navbar-dark .navbar-toggler-icon {
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
-}
-.navbar-dark .navbar-text {
-  color: rgba(255, 255, 255, 0.5);
-}
-.navbar-dark .navbar-text a {
-  color: #fff;
-}
-.navbar-dark .navbar-text a:hover, .navbar-dark .navbar-text a:focus {
-  color: #fff;
-}
-
-.card {
-  position: relative;
-  display: flex;
-  flex-direction: column;
-  min-width: 0;
-  word-wrap: break-word;
-  background-color: #fff;
-  background-clip: border-box;
-  border: 1px solid rgba(0, 0, 0, 0.125);
-  border-radius: 0.25rem;
-}
-.card > hr {
-  margin-right: 0;
-  margin-left: 0;
-}
-.card > .list-group:first-child .list-group-item:first-child {
-  border-top-left-radius: 0.25rem;
-  border-top-right-radius: 0.25rem;
-}
-.card > .list-group:last-child .list-group-item:last-child {
-  border-bottom-right-radius: 0.25rem;
-  border-bottom-left-radius: 0.25rem;
-}
-
-.card-body {
-  flex: 1 1 auto;
-  min-height: 1px;
-  padding: 1.25rem;
-}
-
-.card-title {
-  margin-bottom: 0.75rem;
-}
-
-.card-subtitle {
-  margin-top: -0.375rem;
-  margin-bottom: 0;
-}
-
-.card-text:last-child {
-  margin-bottom: 0;
-}
-
-.card-link:hover {
-  text-decoration: none;
-}
-.card-link + .card-link {
-  margin-left: 1.25rem;
-}
-
-.card-header {
-  padding: 0.75rem 1.25rem;
-  margin-bottom: 0;
-  background-color: rgba(0, 0, 0, 0.03);
-  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
-}
-.card-header:first-child {
-  border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
-}
-.card-header + .list-group .list-group-item:first-child {
-  border-top: 0;
-}
-
-.card-footer {
-  padding: 0.75rem 1.25rem;
-  background-color: rgba(0, 0, 0, 0.03);
-  border-top: 1px solid rgba(0, 0, 0, 0.125);
-}
-.card-footer:last-child {
-  border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px);
-}
-
-.card-header-tabs {
-  margin-right: -0.625rem;
-  margin-bottom: -0.75rem;
-  margin-left: -0.625rem;
-  border-bottom: 0;
-}
-
-.card-header-pills {
-  margin-right: -0.625rem;
-  margin-left: -0.625rem;
-}
-
-.card-img-overlay {
-  position: absolute;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  left: 0;
-  padding: 1.25rem;
-}
-
-.card-img,
-.card-img-top,
-.card-img-bottom {
-  flex-shrink: 0;
-  width: 100%;
-}
-
-.card-img,
-.card-img-top {
-  border-top-left-radius: calc(0.25rem - 1px);
-  border-top-right-radius: calc(0.25rem - 1px);
-}
-
-.card-img,
-.card-img-bottom {
-  border-bottom-right-radius: calc(0.25rem - 1px);
-  border-bottom-left-radius: calc(0.25rem - 1px);
-}
-
-.card-deck .card {
-  margin-bottom: 15px;
-}
-@media (min-width: 576px) {
-  .card-deck {
-    display: flex;
-    flex-flow: row wrap;
-    margin-right: -15px;
-    margin-left: -15px;
-  }
-  .card-deck .card {
-    flex: 1 0 0%;
-    margin-right: 15px;
-    margin-bottom: 0;
-    margin-left: 15px;
-  }
-}
-
-.card-group > .card {
-  margin-bottom: 15px;
-}
-@media (min-width: 576px) {
-  .card-group {
-    display: flex;
-    flex-flow: row wrap;
-  }
-  .card-group > .card {
-    flex: 1 0 0%;
-    margin-bottom: 0;
-  }
-  .card-group > .card + .card {
-    margin-left: 0;
-    border-left: 0;
-  }
-  .card-group > .card:not(:last-child) {
-    border-top-right-radius: 0;
-    border-bottom-right-radius: 0;
-  }
-  .card-group > .card:not(:last-child) .card-img-top,
-.card-group > .card:not(:last-child) .card-header {
-    border-top-right-radius: 0;
-  }
-  .card-group > .card:not(:last-child) .card-img-bottom,
-.card-group > .card:not(:last-child) .card-footer {
-    border-bottom-right-radius: 0;
-  }
-  .card-group > .card:not(:first-child) {
-    border-top-left-radius: 0;
-    border-bottom-left-radius: 0;
-  }
-  .card-group > .card:not(:first-child) .card-img-top,
-.card-group > .card:not(:first-child) .card-header {
-    border-top-left-radius: 0;
-  }
-  .card-group > .card:not(:first-child) .card-img-bottom,
-.card-group > .card:not(:first-child) .card-footer {
-    border-bottom-left-radius: 0;
-  }
-}
-
-.card-columns .card {
-  margin-bottom: 0.75rem;
-}
-@media (min-width: 576px) {
-  .card-columns {
-    -moz-column-count: 3;
-         column-count: 3;
-    -moz-column-gap: 1.25rem;
-         column-gap: 1.25rem;
-    orphans: 1;
-    widows: 1;
-  }
-  .card-columns .card {
-    display: inline-block;
-    width: 100%;
-  }
-}
-
-.accordion > .card {
-  overflow: hidden;
-}
-.accordion > .card:not(:last-of-type) {
-  border-bottom: 0;
-  border-bottom-right-radius: 0;
-  border-bottom-left-radius: 0;
-}
-.accordion > .card:not(:first-of-type) {
-  border-top-left-radius: 0;
-  border-top-right-radius: 0;
-}
-.accordion > .card > .card-header {
-  border-radius: 0;
-  margin-bottom: -1px;
-}
-
-.breadcrumb {
-  display: flex;
-  flex-wrap: wrap;
-  padding: 0.75rem 1rem;
-  margin-bottom: 1rem;
-  list-style: none;
-  background-color: #e9ecef;
-  border-radius: 0.25rem;
-}
-
-.breadcrumb-item + .breadcrumb-item {
-  padding-left: 0.5rem;
-}
-.breadcrumb-item + .breadcrumb-item::before {
-  display: inline-block;
-  padding-right: 0.5rem;
-  color: #6c757d;
-  content: "/";
-}
-.breadcrumb-item + .breadcrumb-item:hover::before {
-  text-decoration: underline;
-}
-.breadcrumb-item + .breadcrumb-item:hover::before {
-  text-decoration: none;
-}
-.breadcrumb-item.active {
-  color: #6c757d;
-}
-
-.pagination {
-  display: flex;
-  padding-left: 0;
-  list-style: none;
-  border-radius: 0.25rem;
-}
-
-.page-link {
-  position: relative;
-  display: block;
-  padding: 0.5rem 0.75rem;
-  margin-left: -1px;
-  line-height: 1.25;
-  color: #007bff;
-  background-color: #fff;
-  border: 1px solid #dee2e6;
-}
-.page-link:hover {
-  z-index: 2;
-  color: #0056b3;
-  text-decoration: none;
-  background-color: #e9ecef;
-  border-color: #dee2e6;
-}
-.page-link:focus {
-  z-index: 3;
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
-}
-
-.page-item:first-child .page-link {
-  margin-left: 0;
-  border-top-left-radius: 0.25rem;
-  border-bottom-left-radius: 0.25rem;
-}
-.page-item:last-child .page-link {
-  border-top-right-radius: 0.25rem;
-  border-bottom-right-radius: 0.25rem;
-}
-.page-item.active .page-link {
-  z-index: 3;
-  color: #fff;
-  background-color: #007bff;
-  border-color: #007bff;
-}
-.page-item.disabled .page-link {
-  color: #6c757d;
-  pointer-events: none;
-  cursor: auto;
-  background-color: #fff;
-  border-color: #dee2e6;
-}
-
-.pagination-lg .page-link {
-  padding: 0.75rem 1.5rem;
-  font-size: 1.25rem;
-  line-height: 1.5;
-}
-.pagination-lg .page-item:first-child .page-link {
-  border-top-left-radius: 0.3rem;
-  border-bottom-left-radius: 0.3rem;
-}
-.pagination-lg .page-item:last-child .page-link {
-  border-top-right-radius: 0.3rem;
-  border-bottom-right-radius: 0.3rem;
-}
-
-.pagination-sm .page-link {
-  padding: 0.25rem 0.5rem;
-  font-size: 0.875rem;
-  line-height: 1.5;
-}
-.pagination-sm .page-item:first-child .page-link {
-  border-top-left-radius: 0.2rem;
-  border-bottom-left-radius: 0.2rem;
-}
-.pagination-sm .page-item:last-child .page-link {
-  border-top-right-radius: 0.2rem;
-  border-bottom-right-radius: 0.2rem;
-}
-
-.badge {
-  display: inline-block;
-  padding: 0.25em 0.4em;
-  font-size: 75%;
-  font-weight: 700;
-  line-height: 1;
-  text-align: center;
-  white-space: nowrap;
-  vertical-align: baseline;
-  border-radius: 0.25rem;
-  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
-}
-@media (prefers-reduced-motion: reduce) {
-  .badge {
-    transition: none;
-  }
-}
-a.badge:hover, a.badge:focus {
-  text-decoration: none;
-}
-
-.badge:empty {
-  display: none;
-}
-
-.btn .badge {
-  position: relative;
-  top: -1px;
-}
-
-.badge-pill {
-  padding-right: 0.6em;
-  padding-left: 0.6em;
-  border-radius: 10rem;
-}
-
-.badge-primary {
-  color: #fff;
-  background-color: #007bff;
-}
-a.badge-primary:hover, a.badge-primary:focus {
-  color: #fff;
-  background-color: #0062cc;
-}
-a.badge-primary:focus, a.badge-primary.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
-}
-
-.badge-secondary {
-  color: #fff;
-  background-color: #6c757d;
-}
-a.badge-secondary:hover, a.badge-secondary:focus {
-  color: #fff;
-  background-color: #545b62;
-}
-a.badge-secondary:focus, a.badge-secondary.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
-}
-
-.badge-success {
-  color: #fff;
-  background-color: #28a745;
-}
-a.badge-success:hover, a.badge-success:focus {
-  color: #fff;
-  background-color: #1e7e34;
-}
-a.badge-success:focus, a.badge-success.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
-}
-
-.badge-info {
-  color: #fff;
-  background-color: #17a2b8;
-}
-a.badge-info:hover, a.badge-info:focus {
-  color: #fff;
-  background-color: #117a8b;
-}
-a.badge-info:focus, a.badge-info.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
-}
-
-.badge-warning {
-  color: #212529;
-  background-color: #ffc107;
-}
-a.badge-warning:hover, a.badge-warning:focus {
-  color: #212529;
-  background-color: #d39e00;
-}
-a.badge-warning:focus, a.badge-warning.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
-}
-
-.badge-danger {
-  color: #fff;
-  background-color: #dc3545;
-}
-a.badge-danger:hover, a.badge-danger:focus {
-  color: #fff;
-  background-color: #bd2130;
-}
-a.badge-danger:focus, a.badge-danger.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);
-}
-
-.badge-light {
-  color: #212529;
-  background-color: #f8f9fa;
-}
-a.badge-light:hover, a.badge-light:focus {
-  color: #212529;
-  background-color: #dae0e5;
-}
-a.badge-light:focus, a.badge-light.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
-}
-
-.badge-dark {
-  color: #fff;
-  background-color: #343a40;
-}
-a.badge-dark:hover, a.badge-dark:focus {
-  color: #fff;
-  background-color: #1d2124;
-}
-a.badge-dark:focus, a.badge-dark.focus {
-  outline: 0;
-  box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
-}
-
-.jumbotron {
-  padding: 2rem 1rem;
-  margin-bottom: 2rem;
-  background-color: #e9ecef;
-  border-radius: 0.3rem;
-}
-@media (min-width: 576px) {
-  .jumbotron {
-    padding: 4rem 2rem;
-  }
-}
-
-.jumbotron-fluid {
-  padding-right: 0;
-  padding-left: 0;
-  border-radius: 0;
-}
-
-.alert {
-  position: relative;
-  padding: 0.75rem 1.25rem;
-  margin-bottom: 1rem;
-  border: 1px solid transparent;
-  border-radius: 0.25rem;
-}
-
-.alert-heading {
-  color: inherit;
-}
-
-.alert-link {
-  font-weight: 700;
-}
-
-.alert-dismissible {
-  padding-right: 4rem;
-}
-.alert-dismissible .close {
-  position: absolute;
-  top: 0;
-  right: 0;
-  padding: 0.75rem 1.25rem;
-  color: inherit;
-}
-
-.alert-primary {
-  color: #004085;
-  background-color: #cce5ff;
-  border-color: #b8daff;
-}
-.alert-primary hr {
-  border-top-color: #9fcdff;
-}
-.alert-primary .alert-link {
-  color: #002752;
-}
-
-.alert-secondary {
-  color: #383d41;
-  background-color: #e2e3e5;
-  border-color: #d6d8db;
-}
-.alert-secondary hr {
-  border-top-color: #c8cbcf;
-}
-.alert-secondary .alert-link {
-  color: #202326;
-}
-
-.alert-success {
-  color: #155724;
-  background-color: #d4edda;
-  border-color: #c3e6cb;
-}
-.alert-success hr {
-  border-top-color: #b1dfbb;
-}
-.alert-success .alert-link {
-  color: #0b2e13;
-}
-
-.alert-info {
-  color: #0c5460;
-  background-color: #d1ecf1;
-  border-color: #bee5eb;
-}
-.alert-info hr {
-  border-top-color: #abdde5;
-}
-.alert-info .alert-link {
-  color: #062c33;
-}
-
-.alert-warning {
-  color: #856404;
-  background-color: #fff3cd;
-  border-color: #ffeeba;
-}
-.alert-warning hr {
-  border-top-color: #ffe8a1;
-}
-.alert-warning .alert-link {
-  color: #533f03;
-}
-
-.alert-danger {
-  color: #721c24;
-  background-color: #f8d7da;
-  border-color: #f5c6cb;
-}
-.alert-danger hr {
-  border-top-color: #f1b0b7;
-}
-.alert-danger .alert-link {
-  color: #491217;
-}
-
-.alert-light {
-  color: #818182;
-  background-color: #fefefe;
-  border-color: #fdfdfe;
-}
-.alert-light hr {
-  border-top-color: #ececf6;
-}
-.alert-light .alert-link {
-  color: #686868;
-}
-
-.alert-dark {
-  color: #1b1e21;
-  background-color: #d6d8d9;
-  border-color: #c6c8ca;
-}
-.alert-dark hr {
-  border-top-color: #b9bbbe;
-}
-.alert-dark .alert-link {
-  color: #040505;
-}
-
-@-webkit-keyframes progress-bar-stripes {
-  from {
-    background-position: 1rem 0;
-  }
-  to {
-    background-position: 0 0;
-  }
-}
-
-@keyframes progress-bar-stripes {
-  from {
-    background-position: 1rem 0;
-  }
-  to {
-    background-position: 0 0;
-  }
-}
-.progress {
-  display: flex;
-  height: 1rem;
-  overflow: hidden;
-  font-size: 0.75rem;
-  background-color: #e9ecef;
-  border-radius: 0.25rem;
-}
-
-.progress-bar {
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  overflow: hidden;
-  color: #fff;
-  text-align: center;
-  white-space: nowrap;
-  background-color: #007bff;
-  transition: width 0.6s ease;
-}
-@media (prefers-reduced-motion: reduce) {
-  .progress-bar {
-    transition: none;
-  }
-}
-
-.progress-bar-striped {
-  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-  background-size: 1rem 1rem;
-}
-
-.progress-bar-animated {
-  -webkit-animation: progress-bar-stripes 1s linear infinite;
-          animation: progress-bar-stripes 1s linear infinite;
-}
-@media (prefers-reduced-motion: reduce) {
-  .progress-bar-animated {
-    -webkit-animation: none;
-            animation: none;
-  }
-}
-
-.media {
-  display: flex;
-  align-items: flex-start;
-}
-
-.media-body {
-  flex: 1;
-}
-
-.list-group {
-  display: flex;
-  flex-direction: column;
-  padding-left: 0;
-  margin-bottom: 0;
-}
-
-.list-group-item-action {
-  width: 100%;
-  color: #495057;
-  text-align: inherit;
-}
-.list-group-item-action:hover, .list-group-item-action:focus {
-  z-index: 1;
-  color: #495057;
-  text-decoration: none;
-  background-color: #f8f9fa;
-}
-.list-group-item-action:active {
-  color: #212529;
-  background-color: #e9ecef;
-}
-
-.list-group-item {
-  position: relative;
-  display: block;
-  padding: 0.75rem 1.25rem;
-  background-color: #fff;
-  border: 1px solid rgba(0, 0, 0, 0.125);
-}
-.list-group-item:first-child {
-  border-top-left-radius: 0.25rem;
-  border-top-right-radius: 0.25rem;
-}
-.list-group-item:last-child {
-  border-bottom-right-radius: 0.25rem;
-  border-bottom-left-radius: 0.25rem;
-}
-.list-group-item.disabled, .list-group-item:disabled {
-  color: #6c757d;
-  pointer-events: none;
-  background-color: #fff;
-}
-.list-group-item.active {
-  z-index: 2;
-  color: #fff;
-  background-color: #007bff;
-  border-color: #007bff;
-}
-.list-group-item + .list-group-item {
-  border-top-width: 0;
-}
-.list-group-item + .list-group-item.active {
-  margin-top: -1px;
-  border-top-width: 1px;
-}
-
-.list-group-horizontal {
-  flex-direction: row;
-}
-.list-group-horizontal .list-group-item:first-child {
-  border-bottom-left-radius: 0.25rem;
-  border-top-right-radius: 0;
-}
-.list-group-horizontal .list-group-item:last-child {
-  border-top-right-radius: 0.25rem;
-  border-bottom-left-radius: 0;
-}
-.list-group-horizontal .list-group-item.active {
-  margin-top: 0;
-}
-.list-group-horizontal .list-group-item + .list-group-item {
-  border-top-width: 1px;
-  border-left-width: 0;
-}
-.list-group-horizontal .list-group-item + .list-group-item.active {
-  margin-left: -1px;
-  border-left-width: 1px;
-}
-
-@media (min-width: 576px) {
-  .list-group-horizontal-sm {
-    flex-direction: row;
-  }
-  .list-group-horizontal-sm .list-group-item:first-child {
-    border-bottom-left-radius: 0.25rem;
-    border-top-right-radius: 0;
-  }
-  .list-group-horizontal-sm .list-group-item:last-child {
-    border-top-right-radius: 0.25rem;
-    border-bottom-left-radius: 0;
-  }
-  .list-group-horizontal-sm .list-group-item.active {
-    margin-top: 0;
-  }
-  .list-group-horizontal-sm .list-group-item + .list-group-item {
-    border-top-width: 1px;
-    border-left-width: 0;
-  }
-  .list-group-horizontal-sm .list-group-item + .list-group-item.active {
-    margin-left: -1px;
-    border-left-width: 1px;
-  }
-}
-@media (min-width: 768px) {
-  .list-group-horizontal-md {
-    flex-direction: row;
-  }
-  .list-group-horizontal-md .list-group-item:first-child {
-    border-bottom-left-radius: 0.25rem;
-    border-top-right-radius: 0;
-  }
-  .list-group-horizontal-md .list-group-item:last-child {
-    border-top-right-radius: 0.25rem;
-    border-bottom-left-radius: 0;
-  }
-  .list-group-horizontal-md .list-group-item.active {
-    margin-top: 0;
-  }
-  .list-group-horizontal-md .list-group-item + .list-group-item {
-    border-top-width: 1px;
-    border-left-width: 0;
-  }
-  .list-group-horizontal-md .list-group-item + .list-group-item.active {
-    margin-left: -1px;
-    border-left-width: 1px;
-  }
-}
-@media (min-width: 992px) {
-  .list-group-horizontal-lg {
-    flex-direction: row;
-  }
-  .list-group-horizontal-lg .list-group-item:first-child {
-    border-bottom-left-radius: 0.25rem;
-    border-top-right-radius: 0;
-  }
-  .list-group-horizontal-lg .list-group-item:last-child {
-    border-top-right-radius: 0.25rem;
-    border-bottom-left-radius: 0;
-  }
-  .list-group-horizontal-lg .list-group-item.active {
-    margin-top: 0;
-  }
-  .list-group-horizontal-lg .list-group-item + .list-group-item {
-    border-top-width: 1px;
-    border-left-width: 0;
-  }
-  .list-group-horizontal-lg .list-group-item + .list-group-item.active {
-    margin-left: -1px;
-    border-left-width: 1px;
-  }
-}
-@media (min-width: 1200px) {
-  .list-group-horizontal-xl {
-    flex-direction: row;
-  }
-  .list-group-horizontal-xl .list-group-item:first-child {
-    border-bottom-left-radius: 0.25rem;
-    border-top-right-radius: 0;
-  }
-  .list-group-horizontal-xl .list-group-item:last-child {
-    border-top-right-radius: 0.25rem;
-    border-bottom-left-radius: 0;
-  }
-  .list-group-horizontal-xl .list-group-item.active {
-    margin-top: 0;
-  }
-  .list-group-horizontal-xl .list-group-item + .list-group-item {
-    border-top-width: 1px;
-    border-left-width: 0;
-  }
-  .list-group-horizontal-xl .list-group-item + .list-group-item.active {
-    margin-left: -1px;
-    border-left-width: 1px;
-  }
-}
-.list-group-flush .list-group-item {
-  border-right-width: 0;
-  border-left-width: 0;
-  border-radius: 0;
-}
-.list-group-flush .list-group-item:first-child {
-  border-top-width: 0;
-}
-.list-group-flush:last-child .list-group-item:last-child {
-  border-bottom-width: 0;
-}
-
-.list-group-item-primary {
-  color: #004085;
-  background-color: #b8daff;
-}
-.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus {
-  color: #004085;
-  background-color: #9fcdff;
-}
-.list-group-item-primary.list-group-item-action.active {
-  color: #fff;
-  background-color: #004085;
-  border-color: #004085;
-}
-
-.list-group-item-secondary {
-  color: #383d41;
-  background-color: #d6d8db;
-}
-.list-group-item-secondary.list-group-item-action:hover, .list-group-item-secondary.list-group-item-action:focus {
-  color: #383d41;
-  background-color: #c8cbcf;
-}
-.list-group-item-secondary.list-group-item-action.active {
-  color: #fff;
-  background-color: #383d41;
-  border-color: #383d41;
-}
-
-.list-group-item-success {
-  color: #155724;
-  background-color: #c3e6cb;
-}
-.list-group-item-success.list-group-item-action:hover, .list-group-item-success.list-group-item-action:focus {
-  color: #155724;
-  background-color: #b1dfbb;
-}
-.list-group-item-success.list-group-item-action.active {
-  color: #fff;
-  background-color: #155724;
-  border-color: #155724;
-}
-
-.list-group-item-info {
-  color: #0c5460;
-  background-color: #bee5eb;
-}
-.list-group-item-info.list-group-item-action:hover, .list-group-item-info.list-group-item-action:focus {
-  color: #0c5460;
-  background-color: #abdde5;
-}
-.list-group-item-info.list-group-item-action.active {
-  color: #fff;
-  background-color: #0c5460;
-  border-color: #0c5460;
-}
-
-.list-group-item-warning {
-  color: #856404;
-  background-color: #ffeeba;
-}
-.list-group-item-warning.list-group-item-action:hover, .list-group-item-warning.list-group-item-action:focus {
-  color: #856404;
-  background-color: #ffe8a1;
-}
-.list-group-item-warning.list-group-item-action.active {
-  color: #fff;
-  background-color: #856404;
-  border-color: #856404;
-}
-
-.list-group-item-danger {
-  color: #721c24;
-  background-color: #f5c6cb;
-}
-.list-group-item-danger.list-group-item-action:hover, .list-group-item-danger.list-group-item-action:focus {
-  color: #721c24;
-  background-color: #f1b0b7;
-}
-.list-group-item-danger.list-group-item-action.active {
-  color: #fff;
-  background-color: #721c24;
-  border-color: #721c24;
-}
-
-.list-group-item-light {
-  color: #818182;
-  background-color: #fdfdfe;
-}
-.list-group-item-light.list-group-item-action:hover, .list-group-item-light.list-group-item-action:focus {
-  color: #818182;
-  background-color: #ececf6;
-}
-.list-group-item-light.list-group-item-action.active {
-  color: #fff;
-  background-color: #818182;
-  border-color: #818182;
-}
-
-.list-group-item-dark {
-  color: #1b1e21;
-  background-color: #c6c8ca;
-}
-.list-group-item-dark.list-group-item-action:hover, .list-group-item-dark.list-group-item-action:focus {
-  color: #1b1e21;
-  background-color: #b9bbbe;
-}
-.list-group-item-dark.list-group-item-action.active {
-  color: #fff;
-  background-color: #1b1e21;
-  border-color: #1b1e21;
-}
-
-.close {
-  float: right;
-  font-size: 1.5rem;
-  font-weight: 700;
-  line-height: 1;
-  color: #000;
-  text-shadow: 0 1px 0 #fff;
-  opacity: 0.5;
-}
-.close:hover {
-  color: #000;
-  text-decoration: none;
-}
-.close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus {
-  opacity: 0.75;
-}
-
-button.close {
-  padding: 0;
-  background-color: transparent;
-  border: 0;
-  -webkit-appearance: none;
-     -moz-appearance: none;
-          appearance: none;
-}
-
-a.close.disabled {
-  pointer-events: none;
-}
-
-.toast {
-  max-width: 350px;
-  overflow: hidden;
-  font-size: 0.875rem;
-  background-color: rgba(255, 255, 255, 0.85);
-  background-clip: padding-box;
-  border: 1px solid rgba(0, 0, 0, 0.1);
-  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
-  -webkit-backdrop-filter: blur(10px);
-          backdrop-filter: blur(10px);
-  opacity: 0;
-  border-radius: 0.25rem;
-}
-.toast:not(:last-child) {
-  margin-bottom: 0.75rem;
-}
-.toast.showing {
-  opacity: 1;
-}
-.toast.show {
-  display: block;
-  opacity: 1;
-}
-.toast.hide {
-  display: none;
-}
-
-.toast-header {
-  display: flex;
-  align-items: center;
-  padding: 0.25rem 0.75rem;
-  color: #6c757d;
-  background-color: rgba(255, 255, 255, 0.85);
-  background-clip: padding-box;
-  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
-}
-
-.toast-body {
-  padding: 0.75rem;
-}
-
-.modal-open {
-  overflow: hidden;
-}
-.modal-open .modal {
-  overflow-x: hidden;
-  overflow-y: auto;
-}
-
-.modal {
-  position: fixed;
-  top: 0;
-  left: 0;
-  z-index: 1050;
-  display: none;
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  outline: 0;
-}
-
-.modal-dialog {
-  position: relative;
-  width: auto;
-  margin: 0.5rem;
-  pointer-events: none;
-}
-.modal.fade .modal-dialog {
-  transition: transform 0.3s ease-out;
-  transform: translate(0, -50px);
-}
-@media (prefers-reduced-motion: reduce) {
-  .modal.fade .modal-dialog {
-    transition: none;
-  }
-}
-.modal.show .modal-dialog {
-  transform: none;
-}
-.modal.modal-static .modal-dialog {
-  transform: scale(1.02);
-}
-
-.modal-dialog-scrollable {
-  display: flex;
-  max-height: calc(100% - 1rem);
-}
-.modal-dialog-scrollable .modal-content {
-  max-height: calc(100vh - 1rem);
-  overflow: hidden;
-}
-.modal-dialog-scrollable .modal-header,
-.modal-dialog-scrollable .modal-footer {
-  flex-shrink: 0;
-}
-.modal-dialog-scrollable .modal-body {
-  overflow-y: auto;
-}
-
-.modal-dialog-centered {
-  display: flex;
-  align-items: center;
-  min-height: calc(100% - 1rem);
-}
-.modal-dialog-centered::before {
-  display: block;
-  height: calc(100vh - 1rem);
-  content: "";
-}
-.modal-dialog-centered.modal-dialog-scrollable {
-  flex-direction: column;
-  justify-content: center;
-  height: 100%;
-}
-.modal-dialog-centered.modal-dialog-scrollable .modal-content {
-  max-height: none;
-}
-.modal-dialog-centered.modal-dialog-scrollable::before {
-  content: none;
-}
-
-.modal-content {
-  position: relative;
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-  pointer-events: auto;
-  background-color: #fff;
-  background-clip: padding-box;
-  border: 1px solid rgba(0, 0, 0, 0.2);
-  border-radius: 0.3rem;
-  outline: 0;
-}
-
-.modal-backdrop {
-  position: fixed;
-  top: 0;
-  left: 0;
-  z-index: 1040;
-  width: 100vw;
-  height: 100vh;
-  background-color: #000;
-}
-.modal-backdrop.fade {
-  opacity: 0;
-}
-.modal-backdrop.show {
-  opacity: 0.5;
-}
-
-.modal-header {
-  display: flex;
-  align-items: flex-start;
-  justify-content: space-between;
-  padding: 1rem 1rem;
-  border-bottom: 1px solid #dee2e6;
-  border-top-left-radius: calc(0.3rem - 1px);
-  border-top-right-radius: calc(0.3rem - 1px);
-}
-.modal-header .close {
-  padding: 1rem 1rem;
-  margin: -1rem -1rem -1rem auto;
-}
-
-.modal-title {
-  margin-bottom: 0;
-  line-height: 1.5;
-}
-
-.modal-body {
-  position: relative;
-  flex: 1 1 auto;
-  padding: 1rem;
-}
-
-.modal-footer {
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-  justify-content: flex-end;
-  padding: 0.75rem;
-  border-top: 1px solid #dee2e6;
-  border-bottom-right-radius: calc(0.3rem - 1px);
-  border-bottom-left-radius: calc(0.3rem - 1px);
-}
-.modal-footer > * {
-  margin: 0.25rem;
-}
-
-.modal-scrollbar-measure {
-  position: absolute;
-  top: -9999px;
-  width: 50px;
-  height: 50px;
-  overflow: scroll;
-}
-
-@media (min-width: 576px) {
-  .modal-dialog {
-    max-width: 500px;
-    margin: 1.75rem auto;
-  }
-
-  .modal-dialog-scrollable {
-    max-height: calc(100% - 3.5rem);
-  }
-  .modal-dialog-scrollable .modal-content {
-    max-height: calc(100vh - 3.5rem);
-  }
-
-  .modal-dialog-centered {
-    min-height: calc(100% - 3.5rem);
-  }
-  .modal-dialog-centered::before {
-    height: calc(100vh - 3.5rem);
-  }
-
-  .modal-sm {
-    max-width: 300px;
-  }
-}
-@media (min-width: 992px) {
-  .modal-lg,
-.modal-xl {
-    max-width: 800px;
-  }
-}
-@media (min-width: 1200px) {
-  .modal-xl {
-    max-width: 1140px;
-  }
-}
-.tooltip {
-  position: absolute;
-  z-index: 1070;
-  display: block;
-  margin: 0;
-  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-  font-style: normal;
-  font-weight: 400;
-  line-height: 1.5;
-  text-align: left;
-  text-align: start;
-  text-decoration: none;
-  text-shadow: none;
-  text-transform: none;
-  letter-spacing: normal;
-  word-break: normal;
-  word-spacing: normal;
-  white-space: normal;
-  line-break: auto;
-  font-size: 0.875rem;
-  word-wrap: break-word;
-  opacity: 0;
-}
-.tooltip.show {
-  opacity: 0.9;
-}
-.tooltip .arrow {
-  position: absolute;
-  display: block;
-  width: 0.8rem;
-  height: 0.4rem;
-}
-.tooltip .arrow::before {
-  position: absolute;
-  content: "";
-  border-color: transparent;
-  border-style: solid;
-}
-
-.bs-tooltip-top, .bs-tooltip-auto[x-placement^=top] {
-  padding: 0.4rem 0;
-}
-.bs-tooltip-top .arrow, .bs-tooltip-auto[x-placement^=top] .arrow {
-  bottom: 0;
-}
-.bs-tooltip-top .arrow::before, .bs-tooltip-auto[x-placement^=top] .arrow::before {
-  top: 0;
-  border-width: 0.4rem 0.4rem 0;
-  border-top-color: #000;
-}
-
-.bs-tooltip-right, .bs-tooltip-auto[x-placement^=right] {
-  padding: 0 0.4rem;
-}
-.bs-tooltip-right .arrow, .bs-tooltip-auto[x-placement^=right] .arrow {
-  left: 0;
-  width: 0.4rem;
-  height: 0.8rem;
-}
-.bs-tooltip-right .arrow::before, .bs-tooltip-auto[x-placement^=right] .arrow::before {
-  right: 0;
-  border-width: 0.4rem 0.4rem 0.4rem 0;
-  border-right-color: #000;
-}
-
-.bs-tooltip-bottom, .bs-tooltip-auto[x-placement^=bottom] {
-  padding: 0.4rem 0;
-}
-.bs-tooltip-bottom .arrow, .bs-tooltip-auto[x-placement^=bottom] .arrow {
-  top: 0;
-}
-.bs-tooltip-bottom .arrow::before, .bs-tooltip-auto[x-placement^=bottom] .arrow::before {
-  bottom: 0;
-  border-width: 0 0.4rem 0.4rem;
-  border-bottom-color: #000;
-}
-
-.bs-tooltip-left, .bs-tooltip-auto[x-placement^=left] {
-  padding: 0 0.4rem;
-}
-.bs-tooltip-left .arrow, .bs-tooltip-auto[x-placement^=left] .arrow {
-  right: 0;
-  width: 0.4rem;
-  height: 0.8rem;
-}
-.bs-tooltip-left .arrow::before, .bs-tooltip-auto[x-placement^=left] .arrow::before {
-  left: 0;
-  border-width: 0.4rem 0 0.4rem 0.4rem;
-  border-left-color: #000;
-}
-
-.tooltip-inner {
-  max-width: 200px;
-  padding: 0.25rem 0.5rem;
-  color: #fff;
-  text-align: center;
-  background-color: #000;
-  border-radius: 0.25rem;
-}
-
-.popover {
-  position: absolute;
-  top: 0;
-  left: 0;
-  z-index: 1060;
-  display: block;
-  max-width: 276px;
-  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
-  font-style: normal;
-  font-weight: 400;
-  line-height: 1.5;
-  text-align: left;
-  text-align: start;
-  text-decoration: none;
-  text-shadow: none;
-  text-transform: none;
-  letter-spacing: normal;
-  word-break: normal;
-  word-spacing: normal;
-  white-space: normal;
-  line-break: auto;
-  font-size: 0.875rem;
-  word-wrap: break-word;
-  background-color: #fff;
-  background-clip: padding-box;
-  border: 1px solid rgba(0, 0, 0, 0.2);
-  border-radius: 0.3rem;
-}
-.popover .arrow {
-  position: absolute;
-  display: block;
-  width: 1rem;
-  height: 0.5rem;
-  margin: 0 0.3rem;
-}
-.popover .arrow::before, .popover .arrow::after {
-  position: absolute;
-  display: block;
-  content: "";
-  border-color: transparent;
-  border-style: solid;
-}
-
-.bs-popover-top, .bs-popover-auto[x-placement^=top] {
-  margin-bottom: 0.5rem;
-}
-.bs-popover-top > .arrow, .bs-popover-auto[x-placement^=top] > .arrow {
-  bottom: calc(-0.5rem - 1px);
-}
-.bs-popover-top > .arrow::before, .bs-popover-auto[x-placement^=top] > .arrow::before {
-  bottom: 0;
-  border-width: 0.5rem 0.5rem 0;
-  border-top-color: rgba(0, 0, 0, 0.25);
-}
-.bs-popover-top > .arrow::after, .bs-popover-auto[x-placement^=top] > .arrow::after {
-  bottom: 1px;
-  border-width: 0.5rem 0.5rem 0;
-  border-top-color: #fff;
-}
-
-.bs-popover-right, .bs-popover-auto[x-placement^=right] {
-  margin-left: 0.5rem;
-}
-.bs-popover-right > .arrow, .bs-popover-auto[x-placement^=right] > .arrow {
-  left: calc(-0.5rem - 1px);
-  width: 0.5rem;
-  height: 1rem;
-  margin: 0.3rem 0;
-}
-.bs-popover-right > .arrow::before, .bs-popover-auto[x-placement^=right] > .arrow::before {
-  left: 0;
-  border-width: 0.5rem 0.5rem 0.5rem 0;
-  border-right-color: rgba(0, 0, 0, 0.25);
-}
-.bs-popover-right > .arrow::after, .bs-popover-auto[x-placement^=right] > .arrow::after {
-  left: 1px;
-  border-width: 0.5rem 0.5rem 0.5rem 0;
-  border-right-color: #fff;
-}
-
-.bs-popover-bottom, .bs-popover-auto[x-placement^=bottom] {
-  margin-top: 0.5rem;
-}
-.bs-popover-bottom > .arrow, .bs-popover-auto[x-placement^=bottom] > .arrow {
-  top: calc(-0.5rem - 1px);
-}
-.bs-popover-bottom > .arrow::before, .bs-popover-auto[x-placement^=bottom] > .arrow::before {
-  top: 0;
-  border-width: 0 0.5rem 0.5rem 0.5rem;
-  border-bottom-color: rgba(0, 0, 0, 0.25);
-}
-.bs-popover-bottom > .arrow::after, .bs-popover-auto[x-placement^=bottom] > .arrow::after {
-  top: 1px;
-  border-width: 0 0.5rem 0.5rem 0.5rem;
-  border-bottom-color: #fff;
-}
-.bs-popover-bottom .popover-header::before, .bs-popover-auto[x-placement^=bottom] .popover-header::before {
-  position: absolute;
-  top: 0;
-  left: 50%;
-  display: block;
-  width: 1rem;
-  margin-left: -0.5rem;
-  content: "";
-  border-bottom: 1px solid #f7f7f7;
-}
-
-.bs-popover-left, .bs-popover-auto[x-placement^=left] {
-  margin-right: 0.5rem;
-}
-.bs-popover-left > .arrow, .bs-popover-auto[x-placement^=left] > .arrow {
-  right: calc(-0.5rem - 1px);
-  width: 0.5rem;
-  height: 1rem;
-  margin: 0.3rem 0;
-}
-.bs-popover-left > .arrow::before, .bs-popover-auto[x-placement^=left] > .arrow::before {
-  right: 0;
-  border-width: 0.5rem 0 0.5rem 0.5rem;
-  border-left-color: rgba(0, 0, 0, 0.25);
-}
-.bs-popover-left > .arrow::after, .bs-popover-auto[x-placement^=left] > .arrow::after {
-  right: 1px;
-  border-width: 0.5rem 0 0.5rem 0.5rem;
-  border-left-color: #fff;
-}
-
-.popover-header {
-  padding: 0.5rem 0.75rem;
-  margin-bottom: 0;
-  font-size: 1rem;
-  background-color: #f7f7f7;
-  border-bottom: 1px solid #ebebeb;
-  border-top-left-radius: calc(0.3rem - 1px);
-  border-top-right-radius: calc(0.3rem - 1px);
-}
-.popover-header:empty {
-  display: none;
-}
-
-.popover-body {
-  padding: 0.5rem 0.75rem;
-  color: #212529;
-}
-
-.carousel {
-  position: relative;
-}
-
-.carousel.pointer-event {
-  touch-action: pan-y;
-}
-
-.carousel-inner {
-  position: relative;
-  width: 100%;
-  overflow: hidden;
-}
-.carousel-inner::after {
-  display: block;
-  clear: both;
-  content: "";
-}
-
-.carousel-item {
-  position: relative;
-  display: none;
-  float: left;
-  width: 100%;
-  margin-right: -100%;
-  -webkit-backface-visibility: hidden;
-          backface-visibility: hidden;
-  transition: transform 0.6s ease-in-out;
-}
-@media (prefers-reduced-motion: reduce) {
-  .carousel-item {
-    transition: none;
-  }
-}
-
-.carousel-item.active,
-.carousel-item-next,
-.carousel-item-prev {
-  display: block;
-}
-
-.carousel-item-next:not(.carousel-item-left),
-.active.carousel-item-right {
-  transform: translateX(100%);
-}
-
-.carousel-item-prev:not(.carousel-item-right),
-.active.carousel-item-left {
-  transform: translateX(-100%);
-}
-
-.carousel-fade .carousel-item {
-  opacity: 0;
-  transition-property: opacity;
-  transform: none;
-}
-.carousel-fade .carousel-item.active,
-.carousel-fade .carousel-item-next.carousel-item-left,
-.carousel-fade .carousel-item-prev.carousel-item-right {
-  z-index: 1;
-  opacity: 1;
-}
-.carousel-fade .active.carousel-item-left,
-.carousel-fade .active.carousel-item-right {
-  z-index: 0;
-  opacity: 0;
-  transition: opacity 0s 0.6s;
-}
-@media (prefers-reduced-motion: reduce) {
-  .carousel-fade .active.carousel-item-left,
-.carousel-fade .active.carousel-item-right {
-    transition: none;
-  }
-}
-
-.carousel-control-prev,
-.carousel-control-next {
-  position: absolute;
-  top: 0;
-  bottom: 0;
-  z-index: 1;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  width: 15%;
-  color: #fff;
-  text-align: center;
-  opacity: 0.5;
-  transition: opacity 0.15s ease;
-}
-@media (prefers-reduced-motion: reduce) {
-  .carousel-control-prev,
-.carousel-control-next {
-    transition: none;
-  }
-}
-.carousel-control-prev:hover, .carousel-control-prev:focus,
-.carousel-control-next:hover,
-.carousel-control-next:focus {
-  color: #fff;
-  text-decoration: none;
-  outline: 0;
-  opacity: 0.9;
-}
-
-.carousel-control-prev {
-  left: 0;
-}
-
-.carousel-control-next {
-  right: 0;
-}
-
-.carousel-control-prev-icon,
-.carousel-control-next-icon {
-  display: inline-block;
-  width: 20px;
-  height: 20px;
-  background: no-repeat 50%/100% 100%;
-}
-
-.carousel-control-prev-icon {
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e");
-}
-
-.carousel-control-next-icon {
-  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e");
-}
-
-.carousel-indicators {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  left: 0;
-  z-index: 15;
-  display: flex;
-  justify-content: center;
-  padding-left: 0;
-  margin-right: 15%;
-  margin-left: 15%;
-  list-style: none;
-}
-.carousel-indicators li {
-  box-sizing: content-box;
-  flex: 0 1 auto;
-  width: 30px;
-  height: 3px;
-  margin-right: 3px;
-  margin-left: 3px;
-  text-indent: -999px;
-  cursor: pointer;
-  background-color: #fff;
-  background-clip: padding-box;
-  border-top: 10px solid transparent;
-  border-bottom: 10px solid transparent;
-  opacity: 0.5;
-  transition: opacity 0.6s ease;
-}
-@media (prefers-reduced-motion: reduce) {
-  .carousel-indicators li {
-    transition: none;
-  }
-}
-.carousel-indicators .active {
-  opacity: 1;
-}
-
-.carousel-caption {
-  position: absolute;
-  right: 15%;
-  bottom: 20px;
-  left: 15%;
-  z-index: 10;
-  padding-top: 20px;
-  padding-bottom: 20px;
-  color: #fff;
-  text-align: center;
-}
-
-@-webkit-keyframes spinner-border {
-  to {
-    transform: rotate(360deg);
-  }
-}
-
-@keyframes spinner-border {
-  to {
-    transform: rotate(360deg);
-  }
-}
-.spinner-border {
-  display: inline-block;
-  width: 2rem;
-  height: 2rem;
-  vertical-align: text-bottom;
-  border: 0.25em solid currentColor;
-  border-right-color: transparent;
-  border-radius: 50%;
-  -webkit-animation: spinner-border 0.75s linear infinite;
-          animation: spinner-border 0.75s linear infinite;
-}
-
-.spinner-border-sm {
-  width: 1rem;
-  height: 1rem;
-  border-width: 0.2em;
-}
-
-@-webkit-keyframes spinner-grow {
-  0% {
-    transform: scale(0);
-  }
-  50% {
-    opacity: 1;
-  }
-}
-
-@keyframes spinner-grow {
-  0% {
-    transform: scale(0);
-  }
-  50% {
-    opacity: 1;
-  }
-}
-.spinner-grow {
-  display: inline-block;
-  width: 2rem;
-  height: 2rem;
-  vertical-align: text-bottom;
-  background-color: currentColor;
-  border-radius: 50%;
-  opacity: 0;
-  -webkit-animation: spinner-grow 0.75s linear infinite;
-          animation: spinner-grow 0.75s linear infinite;
-}
-
-.spinner-grow-sm {
-  width: 1rem;
-  height: 1rem;
-}
-
-.align-baseline {
-  vertical-align: baseline !important;
-}
-
-.align-top {
-  vertical-align: top !important;
-}
-
-.align-middle {
-  vertical-align: middle !important;
-}
-
-.align-bottom {
-  vertical-align: bottom !important;
-}
-
-.align-text-bottom {
-  vertical-align: text-bottom !important;
-}
-
-.align-text-top {
-  vertical-align: text-top !important;
-}
-
-.bg-primary {
-  background-color: #007bff !important;
-}
-
-a.bg-primary:hover, a.bg-primary:focus,
-button.bg-primary:hover,
-button.bg-primary:focus {
-  background-color: #0062cc !important;
-}
-
-.bg-secondary {
-  background-color: #6c757d !important;
-}
-
-a.bg-secondary:hover, a.bg-secondary:focus,
-button.bg-secondary:hover,
-button.bg-secondary:focus {
-  background-color: #545b62 !important;
-}
-
-.bg-success {
-  background-color: #28a745 !important;
-}
-
-a.bg-success:hover, a.bg-success:focus,
-button.bg-success:hover,
-button.bg-success:focus {
-  background-color: #1e7e34 !important;
-}
-
-.bg-info {
-  background-color: #17a2b8 !important;
-}
-
-a.bg-info:hover, a.bg-info:focus,
-button.bg-info:hover,
-button.bg-info:focus {
-  background-color: #117a8b !important;
-}
-
-.bg-warning {
-  background-color: #ffc107 !important;
-}
-
-a.bg-warning:hover, a.bg-warning:focus,
-button.bg-warning:hover,
-button.bg-warning:focus {
-  background-color: #d39e00 !important;
-}
-
-.bg-danger {
-  background-color: #dc3545 !important;
-}
-
-a.bg-danger:hover, a.bg-danger:focus,
-button.bg-danger:hover,
-button.bg-danger:focus {
-  background-color: #bd2130 !important;
-}
-
-.bg-light {
-  background-color: #f8f9fa !important;
-}
-
-a.bg-light:hover, a.bg-light:focus,
-button.bg-light:hover,
-button.bg-light:focus {
-  background-color: #dae0e5 !important;
-}
-
-.bg-dark {
-  background-color: #343a40 !important;
-}
-
-a.bg-dark:hover, a.bg-dark:focus,
-button.bg-dark:hover,
-button.bg-dark:focus {
-  background-color: #1d2124 !important;
-}
-
-.bg-white {
-  background-color: #fff !important;
-}
-
-.bg-transparent {
-  background-color: transparent !important;
-}
-
-.border {
-  border: 1px solid #dee2e6 !important;
-}
-
-.border-top {
-  border-top: 1px solid #dee2e6 !important;
-}
-
-.border-right {
-  border-right: 1px solid #dee2e6 !important;
-}
-
-.border-bottom {
-  border-bottom: 1px solid #dee2e6 !important;
-}
-
-.border-left {
-  border-left: 1px solid #dee2e6 !important;
-}
-
-.border-0 {
-  border: 0 !important;
-}
-
-.border-top-0 {
-  border-top: 0 !important;
-}
-
-.border-right-0 {
-  border-right: 0 !important;
-}
-
-.border-bottom-0 {
-  border-bottom: 0 !important;
-}
-
-.border-left-0 {
-  border-left: 0 !important;
-}
-
-.border-primary {
-  border-color: #007bff !important;
-}
-
-.border-secondary {
-  border-color: #6c757d !important;
-}
-
-.border-success {
-  border-color: #28a745 !important;
-}
-
-.border-info {
-  border-color: #17a2b8 !important;
-}
-
-.border-warning {
-  border-color: #ffc107 !important;
-}
-
-.border-danger {
-  border-color: #dc3545 !important;
-}
-
-.border-light {
-  border-color: #f8f9fa !important;
-}
-
-.border-dark {
-  border-color: #343a40 !important;
-}
-
-.border-white {
-  border-color: #fff !important;
-}
-
-.rounded-sm {
-  border-radius: 0.2rem !important;
-}
-
-.rounded {
-  border-radius: 0.25rem !important;
-}
-
-.rounded-top {
-  border-top-left-radius: 0.25rem !important;
-  border-top-right-radius: 0.25rem !important;
-}
-
-.rounded-right {
-  border-top-right-radius: 0.25rem !important;
-  border-bottom-right-radius: 0.25rem !important;
-}
-
-.rounded-bottom {
-  border-bottom-right-radius: 0.25rem !important;
-  border-bottom-left-radius: 0.25rem !important;
-}
-
-.rounded-left {
-  border-top-left-radius: 0.25rem !important;
-  border-bottom-left-radius: 0.25rem !important;
-}
-
-.rounded-lg {
-  border-radius: 0.3rem !important;
-}
-
-.rounded-circle {
-  border-radius: 50% !important;
-}
-
-.rounded-pill {
-  border-radius: 50rem !important;
-}
-
-.rounded-0 {
-  border-radius: 0 !important;
-}
-
-.clearfix::after {
-  display: block;
-  clear: both;
-  content: "";
-}
-
-.d-none {
-  display: none !important;
-}
-
-.d-inline {
-  display: inline !important;
-}
-
-.d-inline-block {
-  display: inline-block !important;
-}
-
-.d-block {
-  display: block !important;
-}
-
-.d-table {
-  display: table !important;
-}
-
-.d-table-row {
-  display: table-row !important;
-}
-
-.d-table-cell {
-  display: table-cell !important;
-}
-
-.d-flex {
-  display: flex !important;
-}
-
-.d-inline-flex {
-  display: inline-flex !important;
-}
-
-@media (min-width: 576px) {
-  .d-sm-none {
-    display: none !important;
-  }
-
-  .d-sm-inline {
-    display: inline !important;
-  }
-
-  .d-sm-inline-block {
-    display: inline-block !important;
-  }
-
-  .d-sm-block {
-    display: block !important;
-  }
-
-  .d-sm-table {
-    display: table !important;
-  }
-
-  .d-sm-table-row {
-    display: table-row !important;
-  }
-
-  .d-sm-table-cell {
-    display: table-cell !important;
-  }
-
-  .d-sm-flex {
-    display: flex !important;
-  }
-
-  .d-sm-inline-flex {
-    display: inline-flex !important;
-  }
-}
-@media (min-width: 768px) {
-  .d-md-none {
-    display: none !important;
-  }
-
-  .d-md-inline {
-    display: inline !important;
-  }
-
-  .d-md-inline-block {
-    display: inline-block !important;
-  }
-
-  .d-md-block {
-    display: block !important;
-  }
-
-  .d-md-table {
-    display: table !important;
-  }
-
-  .d-md-table-row {
-    display: table-row !important;
-  }
-
-  .d-md-table-cell {
-    display: table-cell !important;
-  }
-
-  .d-md-flex {
-    display: flex !important;
-  }
-
-  .d-md-inline-flex {
-    display: inline-flex !important;
-  }
-}
-@media (min-width: 992px) {
-  .d-lg-none {
-    display: none !important;
-  }
-
-  .d-lg-inline {
-    display: inline !important;
-  }
-
-  .d-lg-inline-block {
-    display: inline-block !important;
-  }
-
-  .d-lg-block {
-    display: block !important;
-  }
-
-  .d-lg-table {
-    display: table !important;
-  }
-
-  .d-lg-table-row {
-    display: table-row !important;
-  }
-
-  .d-lg-table-cell {
-    display: table-cell !important;
-  }
-
-  .d-lg-flex {
-    display: flex !important;
-  }
-
-  .d-lg-inline-flex {
-    display: inline-flex !important;
-  }
-}
-@media (min-width: 1200px) {
-  .d-xl-none {
-    display: none !important;
-  }
-
-  .d-xl-inline {
-    display: inline !important;
-  }
-
-  .d-xl-inline-block {
-    display: inline-block !important;
-  }
-
-  .d-xl-block {
-    display: block !important;
-  }
-
-  .d-xl-table {
-    display: table !important;
-  }
-
-  .d-xl-table-row {
-    display: table-row !important;
-  }
-
-  .d-xl-table-cell {
-    display: table-cell !important;
-  }
-
-  .d-xl-flex {
-    display: flex !important;
-  }
-
-  .d-xl-inline-flex {
-    display: inline-flex !important;
-  }
-}
-@media print {
-  .d-print-none {
-    display: none !important;
-  }
-
-  .d-print-inline {
-    display: inline !important;
-  }
-
-  .d-print-inline-block {
-    display: inline-block !important;
-  }
-
-  .d-print-block {
-    display: block !important;
-  }
-
-  .d-print-table {
-    display: table !important;
-  }
-
-  .d-print-table-row {
-    display: table-row !important;
-  }
-
-  .d-print-table-cell {
-    display: table-cell !important;
-  }
-
-  .d-print-flex {
-    display: flex !important;
-  }
-
-  .d-print-inline-flex {
-    display: inline-flex !important;
-  }
-}
-.embed-responsive {
-  position: relative;
-  display: block;
-  width: 100%;
-  padding: 0;
-  overflow: hidden;
-}
-.embed-responsive::before {
-  display: block;
-  content: "";
-}
-.embed-responsive .embed-responsive-item,
-.embed-responsive iframe,
-.embed-responsive embed,
-.embed-responsive object,
-.embed-responsive video {
-  position: absolute;
-  top: 0;
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  border: 0;
-}
-
-.embed-responsive-21by9::before {
-  padding-top: 42.8571428571%;
-}
-
-.embed-responsive-16by9::before {
-  padding-top: 56.25%;
-}
-
-.embed-responsive-4by3::before {
-  padding-top: 75%;
-}
-
-.embed-responsive-1by1::before {
-  padding-top: 100%;
-}
-
-.flex-row {
-  flex-direction: row !important;
-}
-
-.flex-column {
-  flex-direction: column !important;
-}
-
-.flex-row-reverse {
-  flex-direction: row-reverse !important;
-}
-
-.flex-column-reverse {
-  flex-direction: column-reverse !important;
-}
-
-.flex-wrap {
-  flex-wrap: wrap !important;
-}
-
-.flex-nowrap {
-  flex-wrap: nowrap !important;
-}
-
-.flex-wrap-reverse {
-  flex-wrap: wrap-reverse !important;
-}
-
-.flex-fill {
-  flex: 1 1 auto !important;
-}
-
-.flex-grow-0 {
-  flex-grow: 0 !important;
-}
-
-.flex-grow-1 {
-  flex-grow: 1 !important;
-}
-
-.flex-shrink-0 {
-  flex-shrink: 0 !important;
-}
-
-.flex-shrink-1 {
-  flex-shrink: 1 !important;
-}
-
-.justify-content-start {
-  justify-content: flex-start !important;
-}
-
-.justify-content-end {
-  justify-content: flex-end !important;
-}
-
-.justify-content-center {
-  justify-content: center !important;
-}
-
-.justify-content-between {
-  justify-content: space-between !important;
-}
-
-.justify-content-around {
-  justify-content: space-around !important;
-}
-
-.align-items-start {
-  align-items: flex-start !important;
-}
-
-.align-items-end {
-  align-items: flex-end !important;
-}
-
-.align-items-center {
-  align-items: center !important;
-}
-
-.align-items-baseline {
-  align-items: baseline !important;
-}
-
-.align-items-stretch {
-  align-items: stretch !important;
-}
-
-.align-content-start {
-  align-content: flex-start !important;
-}
-
-.align-content-end {
-  align-content: flex-end !important;
-}
-
-.align-content-center {
-  align-content: center !important;
-}
-
-.align-content-between {
-  align-content: space-between !important;
-}
-
-.align-content-around {
-  align-content: space-around !important;
-}
-
-.align-content-stretch {
-  align-content: stretch !important;
-}
-
-.align-self-auto {
-  align-self: auto !important;
-}
-
-.align-self-start {
-  align-self: flex-start !important;
-}
-
-.align-self-end {
-  align-self: flex-end !important;
-}
-
-.align-self-center {
-  align-self: center !important;
-}
-
-.align-self-baseline {
-  align-self: baseline !important;
-}
-
-.align-self-stretch {
-  align-self: stretch !important;
-}
-
-@media (min-width: 576px) {
-  .flex-sm-row {
-    flex-direction: row !important;
-  }
-
-  .flex-sm-column {
-    flex-direction: column !important;
-  }
-
-  .flex-sm-row-reverse {
-    flex-direction: row-reverse !important;
-  }
-
-  .flex-sm-column-reverse {
-    flex-direction: column-reverse !important;
-  }
-
-  .flex-sm-wrap {
-    flex-wrap: wrap !important;
-  }
-
-  .flex-sm-nowrap {
-    flex-wrap: nowrap !important;
-  }
-
-  .flex-sm-wrap-reverse {
-    flex-wrap: wrap-reverse !important;
-  }
-
-  .flex-sm-fill {
-    flex: 1 1 auto !important;
-  }
-
-  .flex-sm-grow-0 {
-    flex-grow: 0 !important;
-  }
-
-  .flex-sm-grow-1 {
-    flex-grow: 1 !important;
-  }
-
-  .flex-sm-shrink-0 {
-    flex-shrink: 0 !important;
-  }
-
-  .flex-sm-shrink-1 {
-    flex-shrink: 1 !important;
-  }
-
-  .justify-content-sm-start {
-    justify-content: flex-start !important;
-  }
-
-  .justify-content-sm-end {
-    justify-content: flex-end !important;
-  }
-
-  .justify-content-sm-center {
-    justify-content: center !important;
-  }
-
-  .justify-content-sm-between {
-    justify-content: space-between !important;
-  }
-
-  .justify-content-sm-around {
-    justify-content: space-around !important;
-  }
-
-  .align-items-sm-start {
-    align-items: flex-start !important;
-  }
-
-  .align-items-sm-end {
-    align-items: flex-end !important;
-  }
-
-  .align-items-sm-center {
-    align-items: center !important;
-  }
-
-  .align-items-sm-baseline {
-    align-items: baseline !important;
-  }
-
-  .align-items-sm-stretch {
-    align-items: stretch !important;
-  }
-
-  .align-content-sm-start {
-    align-content: flex-start !important;
-  }
-
-  .align-content-sm-end {
-    align-content: flex-end !important;
-  }
-
-  .align-content-sm-center {
-    align-content: center !important;
-  }
-
-  .align-content-sm-between {
-    align-content: space-between !important;
-  }
-
-  .align-content-sm-around {
-    align-content: space-around !important;
-  }
-
-  .align-content-sm-stretch {
-    align-content: stretch !important;
-  }
-
-  .align-self-sm-auto {
-    align-self: auto !important;
-  }
-
-  .align-self-sm-start {
-    align-self: flex-start !important;
-  }
-
-  .align-self-sm-end {
-    align-self: flex-end !important;
-  }
-
-  .align-self-sm-center {
-    align-self: center !important;
-  }
-
-  .align-self-sm-baseline {
-    align-self: baseline !important;
-  }
-
-  .align-self-sm-stretch {
-    align-self: stretch !important;
-  }
-}
-@media (min-width: 768px) {
-  .flex-md-row {
-    flex-direction: row !important;
-  }
-
-  .flex-md-column {
-    flex-direction: column !important;
-  }
-
-  .flex-md-row-reverse {
-    flex-direction: row-reverse !important;
-  }
-
-  .flex-md-column-reverse {
-    flex-direction: column-reverse !important;
-  }
-
-  .flex-md-wrap {
-    flex-wrap: wrap !important;
-  }
-
-  .flex-md-nowrap {
-    flex-wrap: nowrap !important;
-  }
-
-  .flex-md-wrap-reverse {
-    flex-wrap: wrap-reverse !important;
-  }
-
-  .flex-md-fill {
-    flex: 1 1 auto !important;
-  }
-
-  .flex-md-grow-0 {
-    flex-grow: 0 !important;
-  }
-
-  .flex-md-grow-1 {
-    flex-grow: 1 !important;
-  }
-
-  .flex-md-shrink-0 {
-    flex-shrink: 0 !important;
-  }
-
-  .flex-md-shrink-1 {
-    flex-shrink: 1 !important;
-  }
-
-  .justify-content-md-start {
-    justify-content: flex-start !important;
-  }
-
-  .justify-content-md-end {
-    justify-content: flex-end !important;
-  }
-
-  .justify-content-md-center {
-    justify-content: center !important;
-  }
-
-  .justify-content-md-between {
-    justify-content: space-between !important;
-  }
-
-  .justify-content-md-around {
-    justify-content: space-around !important;
-  }
-
-  .align-items-md-start {
-    align-items: flex-start !important;
-  }
-
-  .align-items-md-end {
-    align-items: flex-end !important;
-  }
-
-  .align-items-md-center {
-    align-items: center !important;
-  }
-
-  .align-items-md-baseline {
-    align-items: baseline !important;
-  }
-
-  .align-items-md-stretch {
-    align-items: stretch !important;
-  }
-
-  .align-content-md-start {
-    align-content: flex-start !important;
-  }
-
-  .align-content-md-end {
-    align-content: flex-end !important;
-  }
-
-  .align-content-md-center {
-    align-content: center !important;
-  }
-
-  .align-content-md-between {
-    align-content: space-between !important;
-  }
-
-  .align-content-md-around {
-    align-content: space-around !important;
-  }
-
-  .align-content-md-stretch {
-    align-content: stretch !important;
-  }
-
-  .align-self-md-auto {
-    align-self: auto !important;
-  }
-
-  .align-self-md-start {
-    align-self: flex-start !important;
-  }
-
-  .align-self-md-end {
-    align-self: flex-end !important;
-  }
-
-  .align-self-md-center {
-    align-self: center !important;
-  }
-
-  .align-self-md-baseline {
-    align-self: baseline !important;
-  }
-
-  .align-self-md-stretch {
-    align-self: stretch !important;
-  }
-}
-@media (min-width: 992px) {
-  .flex-lg-row {
-    flex-direction: row !important;
-  }
-
-  .flex-lg-column {
-    flex-direction: column !important;
-  }
-
-  .flex-lg-row-reverse {
-    flex-direction: row-reverse !important;
-  }
-
-  .flex-lg-column-reverse {
-    flex-direction: column-reverse !important;
-  }
-
-  .flex-lg-wrap {
-    flex-wrap: wrap !important;
-  }
-
-  .flex-lg-nowrap {
-    flex-wrap: nowrap !important;
-  }
-
-  .flex-lg-wrap-reverse {
-    flex-wrap: wrap-reverse !important;
-  }
-
-  .flex-lg-fill {
-    flex: 1 1 auto !important;
-  }
-
-  .flex-lg-grow-0 {
-    flex-grow: 0 !important;
-  }
-
-  .flex-lg-grow-1 {
-    flex-grow: 1 !important;
-  }
-
-  .flex-lg-shrink-0 {
-    flex-shrink: 0 !important;
-  }
-
-  .flex-lg-shrink-1 {
-    flex-shrink: 1 !important;
-  }
-
-  .justify-content-lg-start {
-    justify-content: flex-start !important;
-  }
-
-  .justify-content-lg-end {
-    justify-content: flex-end !important;
-  }
-
-  .justify-content-lg-center {
-    justify-content: center !important;
-  }
-
-  .justify-content-lg-between {
-    justify-content: space-between !important;
-  }
-
-  .justify-content-lg-around {
-    justify-content: space-around !important;
-  }
-
-  .align-items-lg-start {
-    align-items: flex-start !important;
-  }
-
-  .align-items-lg-end {
-    align-items: flex-end !important;
-  }
-
-  .align-items-lg-center {
-    align-items: center !important;
-  }
-
-  .align-items-lg-baseline {
-    align-items: baseline !important;
-  }
-
-  .align-items-lg-stretch {
-    align-items: stretch !important;
-  }
-
-  .align-content-lg-start {
-    align-content: flex-start !important;
-  }
-
-  .align-content-lg-end {
-    align-content: flex-end !important;
-  }
-
-  .align-content-lg-center {
-    align-content: center !important;
-  }
-
-  .align-content-lg-between {
-    align-content: space-between !important;
-  }
-
-  .align-content-lg-around {
-    align-content: space-around !important;
-  }
-
-  .align-content-lg-stretch {
-    align-content: stretch !important;
-  }
-
-  .align-self-lg-auto {
-    align-self: auto !important;
-  }
-
-  .align-self-lg-start {
-    align-self: flex-start !important;
-  }
-
-  .align-self-lg-end {
-    align-self: flex-end !important;
-  }
-
-  .align-self-lg-center {
-    align-self: center !important;
-  }
-
-  .align-self-lg-baseline {
-    align-self: baseline !important;
-  }
-
-  .align-self-lg-stretch {
-    align-self: stretch !important;
-  }
-}
-@media (min-width: 1200px) {
-  .flex-xl-row {
-    flex-direction: row !important;
-  }
-
-  .flex-xl-column {
-    flex-direction: column !important;
-  }
-
-  .flex-xl-row-reverse {
-    flex-direction: row-reverse !important;
-  }
-
-  .flex-xl-column-reverse {
-    flex-direction: column-reverse !important;
-  }
-
-  .flex-xl-wrap {
-    flex-wrap: wrap !important;
-  }
-
-  .flex-xl-nowrap {
-    flex-wrap: nowrap !important;
-  }
-
-  .flex-xl-wrap-reverse {
-    flex-wrap: wrap-reverse !important;
-  }
-
-  .flex-xl-fill {
-    flex: 1 1 auto !important;
-  }
-
-  .flex-xl-grow-0 {
-    flex-grow: 0 !important;
-  }
-
-  .flex-xl-grow-1 {
-    flex-grow: 1 !important;
-  }
-
-  .flex-xl-shrink-0 {
-    flex-shrink: 0 !important;
-  }
-
-  .flex-xl-shrink-1 {
-    flex-shrink: 1 !important;
-  }
-
-  .justify-content-xl-start {
-    justify-content: flex-start !important;
-  }
-
-  .justify-content-xl-end {
-    justify-content: flex-end !important;
-  }
-
-  .justify-content-xl-center {
-    justify-content: center !important;
-  }
-
-  .justify-content-xl-between {
-    justify-content: space-between !important;
-  }
-
-  .justify-content-xl-around {
-    justify-content: space-around !important;
-  }
-
-  .align-items-xl-start {
-    align-items: flex-start !important;
-  }
-
-  .align-items-xl-end {
-    align-items: flex-end !important;
-  }
-
-  .align-items-xl-center {
-    align-items: center !important;
-  }
-
-  .align-items-xl-baseline {
-    align-items: baseline !important;
-  }
-
-  .align-items-xl-stretch {
-    align-items: stretch !important;
-  }
-
-  .align-content-xl-start {
-    align-content: flex-start !important;
-  }
-
-  .align-content-xl-end {
-    align-content: flex-end !important;
-  }
-
-  .align-content-xl-center {
-    align-content: center !important;
-  }
-
-  .align-content-xl-between {
-    align-content: space-between !important;
-  }
-
-  .align-content-xl-around {
-    align-content: space-around !important;
-  }
-
-  .align-content-xl-stretch {
-    align-content: stretch !important;
-  }
-
-  .align-self-xl-auto {
-    align-self: auto !important;
-  }
-
-  .align-self-xl-start {
-    align-self: flex-start !important;
-  }
-
-  .align-self-xl-end {
-    align-self: flex-end !important;
-  }
-
-  .align-self-xl-center {
-    align-self: center !important;
-  }
-
-  .align-self-xl-baseline {
-    align-self: baseline !important;
-  }
-
-  .align-self-xl-stretch {
-    align-self: stretch !important;
-  }
-}
-.float-left {
-  float: left !important;
-}
-
-.float-right {
-  float: right !important;
-}
-
-.float-none {
-  float: none !important;
-}
-
-@media (min-width: 576px) {
-  .float-sm-left {
-    float: left !important;
-  }
-
-  .float-sm-right {
-    float: right !important;
-  }
-
-  .float-sm-none {
-    float: none !important;
-  }
-}
-@media (min-width: 768px) {
-  .float-md-left {
-    float: left !important;
-  }
-
-  .float-md-right {
-    float: right !important;
-  }
-
-  .float-md-none {
-    float: none !important;
-  }
-}
-@media (min-width: 992px) {
-  .float-lg-left {
-    float: left !important;
-  }
-
-  .float-lg-right {
-    float: right !important;
-  }
-
-  .float-lg-none {
-    float: none !important;
-  }
-}
-@media (min-width: 1200px) {
-  .float-xl-left {
-    float: left !important;
-  }
-
-  .float-xl-right {
-    float: right !important;
-  }
-
-  .float-xl-none {
-    float: none !important;
-  }
-}
-.overflow-auto {
-  overflow: auto !important;
-}
-
-.overflow-hidden {
-  overflow: hidden !important;
-}
-
-.position-static {
-  position: static !important;
-}
-
-.position-relative {
-  position: relative !important;
-}
-
-.position-absolute {
-  position: absolute !important;
-}
-
-.position-fixed {
-  position: fixed !important;
-}
-
-.position-sticky {
-  position: -webkit-sticky !important;
-  position: sticky !important;
-}
-
-.fixed-top {
-  position: fixed;
-  top: 0;
-  right: 0;
-  left: 0;
-  z-index: 1030;
-}
-
-.fixed-bottom {
-  position: fixed;
-  right: 0;
-  bottom: 0;
-  left: 0;
-  z-index: 1030;
-}
-
-@supports ((position: -webkit-sticky) or (position: sticky)) {
-  .sticky-top {
-    position: -webkit-sticky;
-    position: sticky;
-    top: 0;
-    z-index: 1020;
-  }
-}
-
-.sr-only {
-  position: absolute;
-  width: 1px;
-  height: 1px;
-  padding: 0;
-  margin: -1px;
-  overflow: hidden;
-  clip: rect(0, 0, 0, 0);
-  white-space: nowrap;
-  border: 0;
-}
-
-.sr-only-focusable:active, .sr-only-focusable:focus {
-  position: static;
-  width: auto;
-  height: auto;
-  overflow: visible;
-  clip: auto;
-  white-space: normal;
-}
-
-.shadow-sm {
-  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
-}
-
-.shadow {
-  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
-}
-
-.shadow-lg {
-  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
-}
-
-.shadow-none {
-  box-shadow: none !important;
-}
-
-.w-25 {
-  width: 25% !important;
-}
-
-.w-50 {
-  width: 50% !important;
-}
-
-.w-75 {
-  width: 75% !important;
-}
-
-.w-100 {
-  width: 100% !important;
-}
-
-.w-auto {
-  width: auto !important;
-}
-
-.h-25 {
-  height: 25% !important;
-}
-
-.h-50 {
-  height: 50% !important;
-}
-
-.h-75 {
-  height: 75% !important;
-}
-
-.h-100 {
-  height: 100% !important;
-}
-
-.h-auto {
-  height: auto !important;
-}
-
-.mw-100 {
-  max-width: 100% !important;
-}
-
-.mh-100 {
-  max-height: 100% !important;
-}
-
-.min-vw-100 {
-  min-width: 100vw !important;
-}
-
-.min-vh-100 {
-  min-height: 100vh !important;
-}
-
-.vw-100 {
-  width: 100vw !important;
-}
-
-.vh-100 {
-  height: 100vh !important;
-}
-
-.stretched-link::after {
-  position: absolute;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  left: 0;
-  z-index: 1;
-  pointer-events: auto;
-  content: "";
-  background-color: rgba(0, 0, 0, 0);
-}
-
-.m-0 {
-  margin: 0 !important;
-}
-
-.mt-0,
-.my-0 {
-  margin-top: 0 !important;
-}
-
-.mr-0,
-.mx-0 {
-  margin-right: 0 !important;
-}
-
-.mb-0,
-.my-0 {
-  margin-bottom: 0 !important;
-}
-
-.ml-0,
-.mx-0 {
-  margin-left: 0 !important;
-}
-
-.m-1 {
-  margin: 0.25rem !important;
-}
-
-.mt-1,
-.my-1 {
-  margin-top: 0.25rem !important;
-}
-
-.mr-1,
-.mx-1 {
-  margin-right: 0.25rem !important;
-}
-
-.mb-1,
-.my-1 {
-  margin-bottom: 0.25rem !important;
-}
-
-.ml-1,
-.mx-1 {
-  margin-left: 0.25rem !important;
-}
-
-.m-2 {
-  margin: 0.5rem !important;
-}
-
-.mt-2,
-.my-2 {
-  margin-top: 0.5rem !important;
-}
-
-.mr-2,
-.mx-2 {
-  margin-right: 0.5rem !important;
-}
-
-.mb-2,
-.my-2 {
-  margin-bottom: 0.5rem !important;
-}
-
-.ml-2,
-.mx-2 {
-  margin-left: 0.5rem !important;
-}
-
-.m-3 {
-  margin: 1rem !important;
-}
-
-.mt-3,
-.my-3 {
-  margin-top: 1rem !important;
-}
-
-.mr-3,
-.mx-3 {
-  margin-right: 1rem !important;
-}
-
-.mb-3,
-.my-3 {
-  margin-bottom: 1rem !important;
-}
-
-.ml-3,
-.mx-3 {
-  margin-left: 1rem !important;
-}
-
-.m-4 {
-  margin: 1.5rem !important;
-}
-
-.mt-4,
-.my-4 {
-  margin-top: 1.5rem !important;
-}
-
-.mr-4,
-.mx-4 {
-  margin-right: 1.5rem !important;
-}
-
-.mb-4,
-.my-4 {
-  margin-bottom: 1.5rem !important;
-}
-
-.ml-4,
-.mx-4 {
-  margin-left: 1.5rem !important;
-}
-
-.m-5 {
-  margin: 3rem !important;
-}
-
-.mt-5,
-.my-5 {
-  margin-top: 3rem !important;
-}
-
-.mr-5,
-.mx-5 {
-  margin-right: 3rem !important;
-}
-
-.mb-5,
-.my-5 {
-  margin-bottom: 3rem !important;
-}
-
-.ml-5,
-.mx-5 {
-  margin-left: 3rem !important;
-}
-
-.p-0 {
-  padding: 0 !important;
-}
-
-.pt-0,
-.py-0 {
-  padding-top: 0 !important;
-}
-
-.pr-0,
-.px-0 {
-  padding-right: 0 !important;
-}
-
-.pb-0,
-.py-0 {
-  padding-bottom: 0 !important;
-}
-
-.pl-0,
-.px-0 {
-  padding-left: 0 !important;
-}
-
-.p-1 {
-  padding: 0.25rem !important;
-}
-
-.pt-1,
-.py-1 {
-  padding-top: 0.25rem !important;
-}
-
-.pr-1,
-.px-1 {
-  padding-right: 0.25rem !important;
-}
-
-.pb-1,
-.py-1 {
-  padding-bottom: 0.25rem !important;
-}
-
-.pl-1,
-.px-1 {
-  padding-left: 0.25rem !important;
-}
-
-.p-2 {
-  padding: 0.5rem !important;
-}
-
-.pt-2,
-.py-2 {
-  padding-top: 0.5rem !important;
-}
-
-.pr-2,
-.px-2 {
-  padding-right: 0.5rem !important;
-}
-
-.pb-2,
-.py-2 {
-  padding-bottom: 0.5rem !important;
-}
-
-.pl-2,
-.px-2 {
-  padding-left: 0.5rem !important;
-}
-
-.p-3 {
-  padding: 1rem !important;
-}
-
-.pt-3,
-.py-3 {
-  padding-top: 1rem !important;
-}
-
-.pr-3,
-.px-3 {
-  padding-right: 1rem !important;
-}
-
-.pb-3,
-.py-3 {
-  padding-bottom: 1rem !important;
-}
-
-.pl-3,
-.px-3 {
-  padding-left: 1rem !important;
-}
-
-.p-4 {
-  padding: 1.5rem !important;
-}
-
-.pt-4,
-.py-4 {
-  padding-top: 1.5rem !important;
-}
-
-.pr-4,
-.px-4 {
-  padding-right: 1.5rem !important;
-}
-
-.pb-4,
-.py-4 {
-  padding-bottom: 1.5rem !important;
-}
-
-.pl-4,
-.px-4 {
-  padding-left: 1.5rem !important;
-}
-
-.p-5 {
-  padding: 3rem !important;
-}
-
-.pt-5,
-.py-5 {
-  padding-top: 3rem !important;
-}
-
-.pr-5,
-.px-5 {
-  padding-right: 3rem !important;
-}
-
-.pb-5,
-.py-5 {
-  padding-bottom: 3rem !important;
-}
-
-.pl-5,
-.px-5 {
-  padding-left: 3rem !important;
-}
-
-.m-n1 {
-  margin: -0.25rem !important;
-}
-
-.mt-n1,
-.my-n1 {
-  margin-top: -0.25rem !important;
-}
-
-.mr-n1,
-.mx-n1 {
-  margin-right: -0.25rem !important;
-}
-
-.mb-n1,
-.my-n1 {
-  margin-bottom: -0.25rem !important;
-}
-
-.ml-n1,
-.mx-n1 {
-  margin-left: -0.25rem !important;
-}
-
-.m-n2 {
-  margin: -0.5rem !important;
-}
-
-.mt-n2,
-.my-n2 {
-  margin-top: -0.5rem !important;
-}
-
-.mr-n2,
-.mx-n2 {
-  margin-right: -0.5rem !important;
-}
-
-.mb-n2,
-.my-n2 {
-  margin-bottom: -0.5rem !important;
-}
-
-.ml-n2,
-.mx-n2 {
-  margin-left: -0.5rem !important;
-}
-
-.m-n3 {
-  margin: -1rem !important;
-}
-
-.mt-n3,
-.my-n3 {
-  margin-top: -1rem !important;
-}
-
-.mr-n3,
-.mx-n3 {
-  margin-right: -1rem !important;
-}
-
-.mb-n3,
-.my-n3 {
-  margin-bottom: -1rem !important;
-}
-
-.ml-n3,
-.mx-n3 {
-  margin-left: -1rem !important;
-}
-
-.m-n4 {
-  margin: -1.5rem !important;
-}
-
-.mt-n4,
-.my-n4 {
-  margin-top: -1.5rem !important;
-}
-
-.mr-n4,
-.mx-n4 {
-  margin-right: -1.5rem !important;
-}
-
-.mb-n4,
-.my-n4 {
-  margin-bottom: -1.5rem !important;
-}
-
-.ml-n4,
-.mx-n4 {
-  margin-left: -1.5rem !important;
-}
-
-.m-n5 {
-  margin: -3rem !important;
-}
-
-.mt-n5,
-.my-n5 {
-  margin-top: -3rem !important;
-}
-
-.mr-n5,
-.mx-n5 {
-  margin-right: -3rem !important;
-}
-
-.mb-n5,
-.my-n5 {
-  margin-bottom: -3rem !important;
-}
-
-.ml-n5,
-.mx-n5 {
-  margin-left: -3rem !important;
-}
-
-.m-auto {
-  margin: auto !important;
-}
-
-.mt-auto,
-.my-auto {
-  margin-top: auto !important;
-}
-
-.mr-auto,
-.mx-auto {
-  margin-right: auto !important;
-}
-
-.mb-auto,
-.my-auto {
-  margin-bottom: auto !important;
-}
-
-.ml-auto,
-.mx-auto {
-  margin-left: auto !important;
-}
-
-@media (min-width: 576px) {
-  .m-sm-0 {
-    margin: 0 !important;
-  }
-
-  .mt-sm-0,
-.my-sm-0 {
-    margin-top: 0 !important;
-  }
-
-  .mr-sm-0,
-.mx-sm-0 {
-    margin-right: 0 !important;
-  }
-
-  .mb-sm-0,
-.my-sm-0 {
-    margin-bottom: 0 !important;
-  }
-
-  .ml-sm-0,
-.mx-sm-0 {
-    margin-left: 0 !important;
-  }
-
-  .m-sm-1 {
-    margin: 0.25rem !important;
-  }
-
-  .mt-sm-1,
-.my-sm-1 {
-    margin-top: 0.25rem !important;
-  }
-
-  .mr-sm-1,
-.mx-sm-1 {
-    margin-right: 0.25rem !important;
-  }
-
-  .mb-sm-1,
-.my-sm-1 {
-    margin-bottom: 0.25rem !important;
-  }
-
-  .ml-sm-1,
-.mx-sm-1 {
-    margin-left: 0.25rem !important;
-  }
-
-  .m-sm-2 {
-    margin: 0.5rem !important;
-  }
-
-  .mt-sm-2,
-.my-sm-2 {
-    margin-top: 0.5rem !important;
-  }
-
-  .mr-sm-2,
-.mx-sm-2 {
-    margin-right: 0.5rem !important;
-  }
-
-  .mb-sm-2,
-.my-sm-2 {
-    margin-bottom: 0.5rem !important;
-  }
-
-  .ml-sm-2,
-.mx-sm-2 {
-    margin-left: 0.5rem !important;
-  }
-
-  .m-sm-3 {
-    margin: 1rem !important;
-  }
-
-  .mt-sm-3,
-.my-sm-3 {
-    margin-top: 1rem !important;
-  }
-
-  .mr-sm-3,
-.mx-sm-3 {
-    margin-right: 1rem !important;
-  }
-
-  .mb-sm-3,
-.my-sm-3 {
-    margin-bottom: 1rem !important;
-  }
-
-  .ml-sm-3,
-.mx-sm-3 {
-    margin-left: 1rem !important;
-  }
-
-  .m-sm-4 {
-    margin: 1.5rem !important;
-  }
-
-  .mt-sm-4,
-.my-sm-4 {
-    margin-top: 1.5rem !important;
-  }
-
-  .mr-sm-4,
-.mx-sm-4 {
-    margin-right: 1.5rem !important;
-  }
-
-  .mb-sm-4,
-.my-sm-4 {
-    margin-bottom: 1.5rem !important;
-  }
-
-  .ml-sm-4,
-.mx-sm-4 {
-    margin-left: 1.5rem !important;
-  }
-
-  .m-sm-5 {
-    margin: 3rem !important;
-  }
-
-  .mt-sm-5,
-.my-sm-5 {
-    margin-top: 3rem !important;
-  }
-
-  .mr-sm-5,
-.mx-sm-5 {
-    margin-right: 3rem !important;
-  }
-
-  .mb-sm-5,
-.my-sm-5 {
-    margin-bottom: 3rem !important;
-  }
-
-  .ml-sm-5,
-.mx-sm-5 {
-    margin-left: 3rem !important;
-  }
-
-  .p-sm-0 {
-    padding: 0 !important;
-  }
-
-  .pt-sm-0,
-.py-sm-0 {
-    padding-top: 0 !important;
-  }
-
-  .pr-sm-0,
-.px-sm-0 {
-    padding-right: 0 !important;
-  }
-
-  .pb-sm-0,
-.py-sm-0 {
-    padding-bottom: 0 !important;
-  }
-
-  .pl-sm-0,
-.px-sm-0 {
-    padding-left: 0 !important;
-  }
-
-  .p-sm-1 {
-    padding: 0.25rem !important;
-  }
-
-  .pt-sm-1,
-.py-sm-1 {
-    padding-top: 0.25rem !important;
-  }
-
-  .pr-sm-1,
-.px-sm-1 {
-    padding-right: 0.25rem !important;
-  }
-
-  .pb-sm-1,
-.py-sm-1 {
-    padding-bottom: 0.25rem !important;
-  }
-
-  .pl-sm-1,
-.px-sm-1 {
-    padding-left: 0.25rem !important;
-  }
-
-  .p-sm-2 {
-    padding: 0.5rem !important;
-  }
-
-  .pt-sm-2,
-.py-sm-2 {
-    padding-top: 0.5rem !important;
-  }
-
-  .pr-sm-2,
-.px-sm-2 {
-    padding-right: 0.5rem !important;
-  }
-
-  .pb-sm-2,
-.py-sm-2 {
-    padding-bottom: 0.5rem !important;
-  }
-
-  .pl-sm-2,
-.px-sm-2 {
-    padding-left: 0.5rem !important;
-  }
-
-  .p-sm-3 {
-    padding: 1rem !important;
-  }
-
-  .pt-sm-3,
-.py-sm-3 {
-    padding-top: 1rem !important;
-  }
-
-  .pr-sm-3,
-.px-sm-3 {
-    padding-right: 1rem !important;
-  }
-
-  .pb-sm-3,
-.py-sm-3 {
-    padding-bottom: 1rem !important;
-  }
-
-  .pl-sm-3,
-.px-sm-3 {
-    padding-left: 1rem !important;
-  }
-
-  .p-sm-4 {
-    padding: 1.5rem !important;
-  }
-
-  .pt-sm-4,
-.py-sm-4 {
-    padding-top: 1.5rem !important;
-  }
-
-  .pr-sm-4,
-.px-sm-4 {
-    padding-right: 1.5rem !important;
-  }
-
-  .pb-sm-4,
-.py-sm-4 {
-    padding-bottom: 1.5rem !important;
-  }
-
-  .pl-sm-4,
-.px-sm-4 {
-    padding-left: 1.5rem !important;
-  }
-
-  .p-sm-5 {
-    padding: 3rem !important;
-  }
-
-  .pt-sm-5,
-.py-sm-5 {
-    padding-top: 3rem !important;
-  }
-
-  .pr-sm-5,
-.px-sm-5 {
-    padding-right: 3rem !important;
-  }
-
-  .pb-sm-5,
-.py-sm-5 {
-    padding-bottom: 3rem !important;
-  }
-
-  .pl-sm-5,
-.px-sm-5 {
-    padding-left: 3rem !important;
-  }
-
-  .m-sm-n1 {
-    margin: -0.25rem !important;
-  }
-
-  .mt-sm-n1,
-.my-sm-n1 {
-    margin-top: -0.25rem !important;
-  }
-
-  .mr-sm-n1,
-.mx-sm-n1 {
-    margin-right: -0.25rem !important;
-  }
-
-  .mb-sm-n1,
-.my-sm-n1 {
-    margin-bottom: -0.25rem !important;
-  }
-
-  .ml-sm-n1,
-.mx-sm-n1 {
-    margin-left: -0.25rem !important;
-  }
-
-  .m-sm-n2 {
-    margin: -0.5rem !important;
-  }
-
-  .mt-sm-n2,
-.my-sm-n2 {
-    margin-top: -0.5rem !important;
-  }
-
-  .mr-sm-n2,
-.mx-sm-n2 {
-    margin-right: -0.5rem !important;
-  }
-
-  .mb-sm-n2,
-.my-sm-n2 {
-    margin-bottom: -0.5rem !important;
-  }
-
-  .ml-sm-n2,
-.mx-sm-n2 {
-    margin-left: -0.5rem !important;
-  }
-
-  .m-sm-n3 {
-    margin: -1rem !important;
-  }
-
-  .mt-sm-n3,
-.my-sm-n3 {
-    margin-top: -1rem !important;
-  }
-
-  .mr-sm-n3,
-.mx-sm-n3 {
-    margin-right: -1rem !important;
-  }
-
-  .mb-sm-n3,
-.my-sm-n3 {
-    margin-bottom: -1rem !important;
-  }
-
-  .ml-sm-n3,
-.mx-sm-n3 {
-    margin-left: -1rem !important;
-  }
-
-  .m-sm-n4 {
-    margin: -1.5rem !important;
-  }
-
-  .mt-sm-n4,
-.my-sm-n4 {
-    margin-top: -1.5rem !important;
-  }
-
-  .mr-sm-n4,
-.mx-sm-n4 {
-    margin-right: -1.5rem !important;
-  }
-
-  .mb-sm-n4,
-.my-sm-n4 {
-    margin-bottom: -1.5rem !important;
-  }
-
-  .ml-sm-n4,
-.mx-sm-n4 {
-    margin-left: -1.5rem !important;
-  }
-
-  .m-sm-n5 {
-    margin: -3rem !important;
-  }
-
-  .mt-sm-n5,
-.my-sm-n5 {
-    margin-top: -3rem !important;
-  }
-
-  .mr-sm-n5,
-.mx-sm-n5 {
-    margin-right: -3rem !important;
-  }
-
-  .mb-sm-n5,
-.my-sm-n5 {
-    margin-bottom: -3rem !important;
-  }
-
-  .ml-sm-n5,
-.mx-sm-n5 {
-    margin-left: -3rem !important;
-  }
-
-  .m-sm-auto {
-    margin: auto !important;
-  }
-
-  .mt-sm-auto,
-.my-sm-auto {
-    margin-top: auto !important;
-  }
-
-  .mr-sm-auto,
-.mx-sm-auto {
-    margin-right: auto !important;
-  }
-
-  .mb-sm-auto,
-.my-sm-auto {
-    margin-bottom: auto !important;
-  }
-
-  .ml-sm-auto,
-.mx-sm-auto {
-    margin-left: auto !important;
-  }
-}
-@media (min-width: 768px) {
-  .m-md-0 {
-    margin: 0 !important;
-  }
-
-  .mt-md-0,
-.my-md-0 {
-    margin-top: 0 !important;
-  }
-
-  .mr-md-0,
-.mx-md-0 {
-    margin-right: 0 !important;
-  }
-
-  .mb-md-0,
-.my-md-0 {
-    margin-bottom: 0 !important;
-  }
-
-  .ml-md-0,
-.mx-md-0 {
-    margin-left: 0 !important;
-  }
-
-  .m-md-1 {
-    margin: 0.25rem !important;
-  }
-
-  .mt-md-1,
-.my-md-1 {
-    margin-top: 0.25rem !important;
-  }
-
-  .mr-md-1,
-.mx-md-1 {
-    margin-right: 0.25rem !important;
-  }
-
-  .mb-md-1,
-.my-md-1 {
-    margin-bottom: 0.25rem !important;
-  }
-
-  .ml-md-1,
-.mx-md-1 {
-    margin-left: 0.25rem !important;
-  }
-
-  .m-md-2 {
-    margin: 0.5rem !important;
-  }
-
-  .mt-md-2,
-.my-md-2 {
-    margin-top: 0.5rem !important;
-  }
-
-  .mr-md-2,
-.mx-md-2 {
-    margin-right: 0.5rem !important;
-  }
-
-  .mb-md-2,
-.my-md-2 {
-    margin-bottom: 0.5rem !important;
-  }
-
-  .ml-md-2,
-.mx-md-2 {
-    margin-left: 0.5rem !important;
-  }
-
-  .m-md-3 {
-    margin: 1rem !important;
-  }
-
-  .mt-md-3,
-.my-md-3 {
-    margin-top: 1rem !important;
-  }
-
-  .mr-md-3,
-.mx-md-3 {
-    margin-right: 1rem !important;
-  }
-
-  .mb-md-3,
-.my-md-3 {
-    margin-bottom: 1rem !important;
-  }
-
-  .ml-md-3,
-.mx-md-3 {
-    margin-left: 1rem !important;
-  }
-
-  .m-md-4 {
-    margin: 1.5rem !important;
-  }
-
-  .mt-md-4,
-.my-md-4 {
-    margin-top: 1.5rem !important;
-  }
-
-  .mr-md-4,
-.mx-md-4 {
-    margin-right: 1.5rem !important;
-  }
-
-  .mb-md-4,
-.my-md-4 {
-    margin-bottom: 1.5rem !important;
-  }
-
-  .ml-md-4,
-.mx-md-4 {
-    margin-left: 1.5rem !important;
-  }
-
-  .m-md-5 {
-    margin: 3rem !important;
-  }
-
-  .mt-md-5,
-.my-md-5 {
-    margin-top: 3rem !important;
-  }
-
-  .mr-md-5,
-.mx-md-5 {
-    margin-right: 3rem !important;
-  }
-
-  .mb-md-5,
-.my-md-5 {
-    margin-bottom: 3rem !important;
-  }
-
-  .ml-md-5,
-.mx-md-5 {
-    margin-left: 3rem !important;
-  }
-
-  .p-md-0 {
-    padding: 0 !important;
-  }
-
-  .pt-md-0,
-.py-md-0 {
-    padding-top: 0 !important;
-  }
-
-  .pr-md-0,
-.px-md-0 {
-    padding-right: 0 !important;
-  }
-
-  .pb-md-0,
-.py-md-0 {
-    padding-bottom: 0 !important;
-  }
-
-  .pl-md-0,
-.px-md-0 {
-    padding-left: 0 !important;
-  }
-
-  .p-md-1 {
-    padding: 0.25rem !important;
-  }
-
-  .pt-md-1,
-.py-md-1 {
-    padding-top: 0.25rem !important;
-  }
-
-  .pr-md-1,
-.px-md-1 {
-    padding-right: 0.25rem !important;
-  }
-
-  .pb-md-1,
-.py-md-1 {
-    padding-bottom: 0.25rem !important;
-  }
-
-  .pl-md-1,
-.px-md-1 {
-    padding-left: 0.25rem !important;
-  }
-
-  .p-md-2 {
-    padding: 0.5rem !important;
-  }
-
-  .pt-md-2,
-.py-md-2 {
-    padding-top: 0.5rem !important;
-  }
-
-  .pr-md-2,
-.px-md-2 {
-    padding-right: 0.5rem !important;
-  }
-
-  .pb-md-2,
-.py-md-2 {
-    padding-bottom: 0.5rem !important;
-  }
-
-  .pl-md-2,
-.px-md-2 {
-    padding-left: 0.5rem !important;
-  }
-
-  .p-md-3 {
-    padding: 1rem !important;
-  }
-
-  .pt-md-3,
-.py-md-3 {
-    padding-top: 1rem !important;
-  }
-
-  .pr-md-3,
-.px-md-3 {
-    padding-right: 1rem !important;
-  }
-
-  .pb-md-3,
-.py-md-3 {
-    padding-bottom: 1rem !important;
-  }
-
-  .pl-md-3,
-.px-md-3 {
-    padding-left: 1rem !important;
-  }
-
-  .p-md-4 {
-    padding: 1.5rem !important;
-  }
-
-  .pt-md-4,
-.py-md-4 {
-    padding-top: 1.5rem !important;
-  }
-
-  .pr-md-4,
-.px-md-4 {
-    padding-right: 1.5rem !important;
-  }
-
-  .pb-md-4,
-.py-md-4 {
-    padding-bottom: 1.5rem !important;
-  }
-
-  .pl-md-4,
-.px-md-4 {
-    padding-left: 1.5rem !important;
-  }
-
-  .p-md-5 {
-    padding: 3rem !important;
-  }
-
-  .pt-md-5,
-.py-md-5 {
-    padding-top: 3rem !important;
-  }
-
-  .pr-md-5,
-.px-md-5 {
-    padding-right: 3rem !important;
-  }
-
-  .pb-md-5,
-.py-md-5 {
-    padding-bottom: 3rem !important;
-  }
-
-  .pl-md-5,
-.px-md-5 {
-    padding-left: 3rem !important;
-  }
-
-  .m-md-n1 {
-    margin: -0.25rem !important;
-  }
-
-  .mt-md-n1,
-.my-md-n1 {
-    margin-top: -0.25rem !important;
-  }
-
-  .mr-md-n1,
-.mx-md-n1 {
-    margin-right: -0.25rem !important;
-  }
-
-  .mb-md-n1,
-.my-md-n1 {
-    margin-bottom: -0.25rem !important;
-  }
-
-  .ml-md-n1,
-.mx-md-n1 {
-    margin-left: -0.25rem !important;
-  }
-
-  .m-md-n2 {
-    margin: -0.5rem !important;
-  }
-
-  .mt-md-n2,
-.my-md-n2 {
-    margin-top: -0.5rem !important;
-  }
-
-  .mr-md-n2,
-.mx-md-n2 {
-    margin-right: -0.5rem !important;
-  }
-
-  .mb-md-n2,
-.my-md-n2 {
-    margin-bottom: -0.5rem !important;
-  }
-
-  .ml-md-n2,
-.mx-md-n2 {
-    margin-left: -0.5rem !important;
-  }
-
-  .m-md-n3 {
-    margin: -1rem !important;
-  }
-
-  .mt-md-n3,
-.my-md-n3 {
-    margin-top: -1rem !important;
-  }
-
-  .mr-md-n3,
-.mx-md-n3 {
-    margin-right: -1rem !important;
-  }
-
-  .mb-md-n3,
-.my-md-n3 {
-    margin-bottom: -1rem !important;
-  }
-
-  .ml-md-n3,
-.mx-md-n3 {
-    margin-left: -1rem !important;
-  }
-
-  .m-md-n4 {
-    margin: -1.5rem !important;
-  }
-
-  .mt-md-n4,
-.my-md-n4 {
-    margin-top: -1.5rem !important;
-  }
-
-  .mr-md-n4,
-.mx-md-n4 {
-    margin-right: -1.5rem !important;
-  }
-
-  .mb-md-n4,
-.my-md-n4 {
-    margin-bottom: -1.5rem !important;
-  }
-
-  .ml-md-n4,
-.mx-md-n4 {
-    margin-left: -1.5rem !important;
-  }
-
-  .m-md-n5 {
-    margin: -3rem !important;
-  }
-
-  .mt-md-n5,
-.my-md-n5 {
-    margin-top: -3rem !important;
-  }
-
-  .mr-md-n5,
-.mx-md-n5 {
-    margin-right: -3rem !important;
-  }
-
-  .mb-md-n5,
-.my-md-n5 {
-    margin-bottom: -3rem !important;
-  }
-
-  .ml-md-n5,
-.mx-md-n5 {
-    margin-left: -3rem !important;
-  }
-
-  .m-md-auto {
-    margin: auto !important;
-  }
-
-  .mt-md-auto,
-.my-md-auto {
-    margin-top: auto !important;
-  }
-
-  .mr-md-auto,
-.mx-md-auto {
-    margin-right: auto !important;
-  }
-
-  .mb-md-auto,
-.my-md-auto {
-    margin-bottom: auto !important;
-  }
-
-  .ml-md-auto,
-.mx-md-auto {
-    margin-left: auto !important;
-  }
-}
-@media (min-width: 992px) {
-  .m-lg-0 {
-    margin: 0 !important;
-  }
-
-  .mt-lg-0,
-.my-lg-0 {
-    margin-top: 0 !important;
-  }
-
-  .mr-lg-0,
-.mx-lg-0 {
-    margin-right: 0 !important;
-  }
-
-  .mb-lg-0,
-.my-lg-0 {
-    margin-bottom: 0 !important;
-  }
-
-  .ml-lg-0,
-.mx-lg-0 {
-    margin-left: 0 !important;
-  }
-
-  .m-lg-1 {
-    margin: 0.25rem !important;
-  }
-
-  .mt-lg-1,
-.my-lg-1 {
-    margin-top: 0.25rem !important;
-  }
-
-  .mr-lg-1,
-.mx-lg-1 {
-    margin-right: 0.25rem !important;
-  }
-
-  .mb-lg-1,
-.my-lg-1 {
-    margin-bottom: 0.25rem !important;
-  }
-
-  .ml-lg-1,
-.mx-lg-1 {
-    margin-left: 0.25rem !important;
-  }
-
-  .m-lg-2 {
-    margin: 0.5rem !important;
-  }
-
-  .mt-lg-2,
-.my-lg-2 {
-    margin-top: 0.5rem !important;
-  }
-
-  .mr-lg-2,
-.mx-lg-2 {
-    margin-right: 0.5rem !important;
-  }
-
-  .mb-lg-2,
-.my-lg-2 {
-    margin-bottom: 0.5rem !important;
-  }
-
-  .ml-lg-2,
-.mx-lg-2 {
-    margin-left: 0.5rem !important;
-  }
-
-  .m-lg-3 {
-    margin: 1rem !important;
-  }
-
-  .mt-lg-3,
-.my-lg-3 {
-    margin-top: 1rem !important;
-  }
-
-  .mr-lg-3,
-.mx-lg-3 {
-    margin-right: 1rem !important;
-  }
-
-  .mb-lg-3,
-.my-lg-3 {
-    margin-bottom: 1rem !important;
-  }
-
-  .ml-lg-3,
-.mx-lg-3 {
-    margin-left: 1rem !important;
-  }
-
-  .m-lg-4 {
-    margin: 1.5rem !important;
-  }
-
-  .mt-lg-4,
-.my-lg-4 {
-    margin-top: 1.5rem !important;
-  }
-
-  .mr-lg-4,
-.mx-lg-4 {
-    margin-right: 1.5rem !important;
-  }
-
-  .mb-lg-4,
-.my-lg-4 {
-    margin-bottom: 1.5rem !important;
-  }
-
-  .ml-lg-4,
-.mx-lg-4 {
-    margin-left: 1.5rem !important;
-  }
-
-  .m-lg-5 {
-    margin: 3rem !important;
-  }
-
-  .mt-lg-5,
-.my-lg-5 {
-    margin-top: 3rem !important;
-  }
-
-  .mr-lg-5,
-.mx-lg-5 {
-    margin-right: 3rem !important;
-  }
-
-  .mb-lg-5,
-.my-lg-5 {
-    margin-bottom: 3rem !important;
-  }
-
-  .ml-lg-5,
-.mx-lg-5 {
-    margin-left: 3rem !important;
-  }
-
-  .p-lg-0 {
-    padding: 0 !important;
-  }
-
-  .pt-lg-0,
-.py-lg-0 {
-    padding-top: 0 !important;
-  }
-
-  .pr-lg-0,
-.px-lg-0 {
-    padding-right: 0 !important;
-  }
-
-  .pb-lg-0,
-.py-lg-0 {
-    padding-bottom: 0 !important;
-  }
-
-  .pl-lg-0,
-.px-lg-0 {
-    padding-left: 0 !important;
-  }
-
-  .p-lg-1 {
-    padding: 0.25rem !important;
-  }
-
-  .pt-lg-1,
-.py-lg-1 {
-    padding-top: 0.25rem !important;
-  }
-
-  .pr-lg-1,
-.px-lg-1 {
-    padding-right: 0.25rem !important;
-  }
-
-  .pb-lg-1,
-.py-lg-1 {
-    padding-bottom: 0.25rem !important;
-  }
-
-  .pl-lg-1,
-.px-lg-1 {
-    padding-left: 0.25rem !important;
-  }
-
-  .p-lg-2 {
-    padding: 0.5rem !important;
-  }
-
-  .pt-lg-2,
-.py-lg-2 {
-    padding-top: 0.5rem !important;
-  }
-
-  .pr-lg-2,
-.px-lg-2 {
-    padding-right: 0.5rem !important;
-  }
-
-  .pb-lg-2,
-.py-lg-2 {
-    padding-bottom: 0.5rem !important;
-  }
-
-  .pl-lg-2,
-.px-lg-2 {
-    padding-left: 0.5rem !important;
-  }
-
-  .p-lg-3 {
-    padding: 1rem !important;
-  }
-
-  .pt-lg-3,
-.py-lg-3 {
-    padding-top: 1rem !important;
-  }
-
-  .pr-lg-3,
-.px-lg-3 {
-    padding-right: 1rem !important;
-  }
-
-  .pb-lg-3,
-.py-lg-3 {
-    padding-bottom: 1rem !important;
-  }
-
-  .pl-lg-3,
-.px-lg-3 {
-    padding-left: 1rem !important;
-  }
-
-  .p-lg-4 {
-    padding: 1.5rem !important;
-  }
-
-  .pt-lg-4,
-.py-lg-4 {
-    padding-top: 1.5rem !important;
-  }
-
-  .pr-lg-4,
-.px-lg-4 {
-    padding-right: 1.5rem !important;
-  }
-
-  .pb-lg-4,
-.py-lg-4 {
-    padding-bottom: 1.5rem !important;
-  }
-
-  .pl-lg-4,
-.px-lg-4 {
-    padding-left: 1.5rem !important;
-  }
-
-  .p-lg-5 {
-    padding: 3rem !important;
-  }
-
-  .pt-lg-5,
-.py-lg-5 {
-    padding-top: 3rem !important;
-  }
-
-  .pr-lg-5,
-.px-lg-5 {
-    padding-right: 3rem !important;
-  }
-
-  .pb-lg-5,
-.py-lg-5 {
-    padding-bottom: 3rem !important;
-  }
-
-  .pl-lg-5,
-.px-lg-5 {
-    padding-left: 3rem !important;
-  }
-
-  .m-lg-n1 {
-    margin: -0.25rem !important;
-  }
-
-  .mt-lg-n1,
-.my-lg-n1 {
-    margin-top: -0.25rem !important;
-  }
-
-  .mr-lg-n1,
-.mx-lg-n1 {
-    margin-right: -0.25rem !important;
-  }
-
-  .mb-lg-n1,
-.my-lg-n1 {
-    margin-bottom: -0.25rem !important;
-  }
-
-  .ml-lg-n1,
-.mx-lg-n1 {
-    margin-left: -0.25rem !important;
-  }
-
-  .m-lg-n2 {
-    margin: -0.5rem !important;
-  }
-
-  .mt-lg-n2,
-.my-lg-n2 {
-    margin-top: -0.5rem !important;
-  }
-
-  .mr-lg-n2,
-.mx-lg-n2 {
-    margin-right: -0.5rem !important;
-  }
-
-  .mb-lg-n2,
-.my-lg-n2 {
-    margin-bottom: -0.5rem !important;
-  }
-
-  .ml-lg-n2,
-.mx-lg-n2 {
-    margin-left: -0.5rem !important;
-  }
-
-  .m-lg-n3 {
-    margin: -1rem !important;
-  }
-
-  .mt-lg-n3,
-.my-lg-n3 {
-    margin-top: -1rem !important;
-  }
-
-  .mr-lg-n3,
-.mx-lg-n3 {
-    margin-right: -1rem !important;
-  }
-
-  .mb-lg-n3,
-.my-lg-n3 {
-    margin-bottom: -1rem !important;
-  }
-
-  .ml-lg-n3,
-.mx-lg-n3 {
-    margin-left: -1rem !important;
-  }
-
-  .m-lg-n4 {
-    margin: -1.5rem !important;
-  }
-
-  .mt-lg-n4,
-.my-lg-n4 {
-    margin-top: -1.5rem !important;
-  }
-
-  .mr-lg-n4,
-.mx-lg-n4 {
-    margin-right: -1.5rem !important;
-  }
-
-  .mb-lg-n4,
-.my-lg-n4 {
-    margin-bottom: -1.5rem !important;
-  }
-
-  .ml-lg-n4,
-.mx-lg-n4 {
-    margin-left: -1.5rem !important;
-  }
-
-  .m-lg-n5 {
-    margin: -3rem !important;
-  }
-
-  .mt-lg-n5,
-.my-lg-n5 {
-    margin-top: -3rem !important;
-  }
-
-  .mr-lg-n5,
-.mx-lg-n5 {
-    margin-right: -3rem !important;
-  }
-
-  .mb-lg-n5,
-.my-lg-n5 {
-    margin-bottom: -3rem !important;
-  }
-
-  .ml-lg-n5,
-.mx-lg-n5 {
-    margin-left: -3rem !important;
-  }
-
-  .m-lg-auto {
-    margin: auto !important;
-  }
-
-  .mt-lg-auto,
-.my-lg-auto {
-    margin-top: auto !important;
-  }
-
-  .mr-lg-auto,
-.mx-lg-auto {
-    margin-right: auto !important;
-  }
-
-  .mb-lg-auto,
-.my-lg-auto {
-    margin-bottom: auto !important;
-  }
-
-  .ml-lg-auto,
-.mx-lg-auto {
-    margin-left: auto !important;
-  }
-}
-@media (min-width: 1200px) {
-  .m-xl-0 {
-    margin: 0 !important;
-  }
-
-  .mt-xl-0,
-.my-xl-0 {
-    margin-top: 0 !important;
-  }
-
-  .mr-xl-0,
-.mx-xl-0 {
-    margin-right: 0 !important;
-  }
-
-  .mb-xl-0,
-.my-xl-0 {
-    margin-bottom: 0 !important;
-  }
-
-  .ml-xl-0,
-.mx-xl-0 {
-    margin-left: 0 !important;
-  }
-
-  .m-xl-1 {
-    margin: 0.25rem !important;
-  }
-
-  .mt-xl-1,
-.my-xl-1 {
-    margin-top: 0.25rem !important;
-  }
-
-  .mr-xl-1,
-.mx-xl-1 {
-    margin-right: 0.25rem !important;
-  }
-
-  .mb-xl-1,
-.my-xl-1 {
-    margin-bottom: 0.25rem !important;
-  }
-
-  .ml-xl-1,
-.mx-xl-1 {
-    margin-left: 0.25rem !important;
-  }
-
-  .m-xl-2 {
-    margin: 0.5rem !important;
-  }
-
-  .mt-xl-2,
-.my-xl-2 {
-    margin-top: 0.5rem !important;
-  }
-
-  .mr-xl-2,
-.mx-xl-2 {
-    margin-right: 0.5rem !important;
-  }
-
-  .mb-xl-2,
-.my-xl-2 {
-    margin-bottom: 0.5rem !important;
-  }
-
-  .ml-xl-2,
-.mx-xl-2 {
-    margin-left: 0.5rem !important;
-  }
-
-  .m-xl-3 {
-    margin: 1rem !important;
-  }
-
-  .mt-xl-3,
-.my-xl-3 {
-    margin-top: 1rem !important;
-  }
-
-  .mr-xl-3,
-.mx-xl-3 {
-    margin-right: 1rem !important;
-  }
-
-  .mb-xl-3,
-.my-xl-3 {
-    margin-bottom: 1rem !important;
-  }
-
-  .ml-xl-3,
-.mx-xl-3 {
-    margin-left: 1rem !important;
-  }
-
-  .m-xl-4 {
-    margin: 1.5rem !important;
-  }
-
-  .mt-xl-4,
-.my-xl-4 {
-    margin-top: 1.5rem !important;
-  }
-
-  .mr-xl-4,
-.mx-xl-4 {
-    margin-right: 1.5rem !important;
-  }
-
-  .mb-xl-4,
-.my-xl-4 {
-    margin-bottom: 1.5rem !important;
-  }
-
-  .ml-xl-4,
-.mx-xl-4 {
-    margin-left: 1.5rem !important;
-  }
-
-  .m-xl-5 {
-    margin: 3rem !important;
-  }
-
-  .mt-xl-5,
-.my-xl-5 {
-    margin-top: 3rem !important;
-  }
-
-  .mr-xl-5,
-.mx-xl-5 {
-    margin-right: 3rem !important;
-  }
-
-  .mb-xl-5,
-.my-xl-5 {
-    margin-bottom: 3rem !important;
-  }
-
-  .ml-xl-5,
-.mx-xl-5 {
-    margin-left: 3rem !important;
-  }
-
-  .p-xl-0 {
-    padding: 0 !important;
-  }
-
-  .pt-xl-0,
-.py-xl-0 {
-    padding-top: 0 !important;
-  }
-
-  .pr-xl-0,
-.px-xl-0 {
-    padding-right: 0 !important;
-  }
-
-  .pb-xl-0,
-.py-xl-0 {
-    padding-bottom: 0 !important;
-  }
-
-  .pl-xl-0,
-.px-xl-0 {
-    padding-left: 0 !important;
-  }
-
-  .p-xl-1 {
-    padding: 0.25rem !important;
-  }
-
-  .pt-xl-1,
-.py-xl-1 {
-    padding-top: 0.25rem !important;
-  }
-
-  .pr-xl-1,
-.px-xl-1 {
-    padding-right: 0.25rem !important;
-  }
-
-  .pb-xl-1,
-.py-xl-1 {
-    padding-bottom: 0.25rem !important;
-  }
-
-  .pl-xl-1,
-.px-xl-1 {
-    padding-left: 0.25rem !important;
-  }
-
-  .p-xl-2 {
-    padding: 0.5rem !important;
-  }
-
-  .pt-xl-2,
-.py-xl-2 {
-    padding-top: 0.5rem !important;
-  }
-
-  .pr-xl-2,
-.px-xl-2 {
-    padding-right: 0.5rem !important;
-  }
-
-  .pb-xl-2,
-.py-xl-2 {
-    padding-bottom: 0.5rem !important;
-  }
-
-  .pl-xl-2,
-.px-xl-2 {
-    padding-left: 0.5rem !important;
-  }
-
-  .p-xl-3 {
-    padding: 1rem !important;
-  }
-
-  .pt-xl-3,
-.py-xl-3 {
-    padding-top: 1rem !important;
-  }
-
-  .pr-xl-3,
-.px-xl-3 {
-    padding-right: 1rem !important;
-  }
-
-  .pb-xl-3,
-.py-xl-3 {
-    padding-bottom: 1rem !important;
-  }
-
-  .pl-xl-3,
-.px-xl-3 {
-    padding-left: 1rem !important;
-  }
-
-  .p-xl-4 {
-    padding: 1.5rem !important;
-  }
-
-  .pt-xl-4,
-.py-xl-4 {
-    padding-top: 1.5rem !important;
-  }
-
-  .pr-xl-4,
-.px-xl-4 {
-    padding-right: 1.5rem !important;
-  }
-
-  .pb-xl-4,
-.py-xl-4 {
-    padding-bottom: 1.5rem !important;
-  }
-
-  .pl-xl-4,
-.px-xl-4 {
-    padding-left: 1.5rem !important;
-  }
-
-  .p-xl-5 {
-    padding: 3rem !important;
-  }
-
-  .pt-xl-5,
-.py-xl-5 {
-    padding-top: 3rem !important;
-  }
-
-  .pr-xl-5,
-.px-xl-5 {
-    padding-right: 3rem !important;
-  }
-
-  .pb-xl-5,
-.py-xl-5 {
-    padding-bottom: 3rem !important;
-  }
-
-  .pl-xl-5,
-.px-xl-5 {
-    padding-left: 3rem !important;
-  }
-
-  .m-xl-n1 {
-    margin: -0.25rem !important;
-  }
-
-  .mt-xl-n1,
-.my-xl-n1 {
-    margin-top: -0.25rem !important;
-  }
-
-  .mr-xl-n1,
-.mx-xl-n1 {
-    margin-right: -0.25rem !important;
-  }
-
-  .mb-xl-n1,
-.my-xl-n1 {
-    margin-bottom: -0.25rem !important;
-  }
-
-  .ml-xl-n1,
-.mx-xl-n1 {
-    margin-left: -0.25rem !important;
-  }
-
-  .m-xl-n2 {
-    margin: -0.5rem !important;
-  }
-
-  .mt-xl-n2,
-.my-xl-n2 {
-    margin-top: -0.5rem !important;
-  }
-
-  .mr-xl-n2,
-.mx-xl-n2 {
-    margin-right: -0.5rem !important;
-  }
-
-  .mb-xl-n2,
-.my-xl-n2 {
-    margin-bottom: -0.5rem !important;
-  }
-
-  .ml-xl-n2,
-.mx-xl-n2 {
-    margin-left: -0.5rem !important;
-  }
-
-  .m-xl-n3 {
-    margin: -1rem !important;
-  }
-
-  .mt-xl-n3,
-.my-xl-n3 {
-    margin-top: -1rem !important;
-  }
-
-  .mr-xl-n3,
-.mx-xl-n3 {
-    margin-right: -1rem !important;
-  }
-
-  .mb-xl-n3,
-.my-xl-n3 {
-    margin-bottom: -1rem !important;
-  }
-
-  .ml-xl-n3,
-.mx-xl-n3 {
-    margin-left: -1rem !important;
-  }
-
-  .m-xl-n4 {
-    margin: -1.5rem !important;
-  }
-
-  .mt-xl-n4,
-.my-xl-n4 {
-    margin-top: -1.5rem !important;
-  }
-
-  .mr-xl-n4,
-.mx-xl-n4 {
-    margin-right: -1.5rem !important;
-  }
-
-  .mb-xl-n4,
-.my-xl-n4 {
-    margin-bottom: -1.5rem !important;
-  }
-
-  .ml-xl-n4,
-.mx-xl-n4 {
-    margin-left: -1.5rem !important;
-  }
-
-  .m-xl-n5 {
-    margin: -3rem !important;
-  }
-
-  .mt-xl-n5,
-.my-xl-n5 {
-    margin-top: -3rem !important;
-  }
-
-  .mr-xl-n5,
-.mx-xl-n5 {
-    margin-right: -3rem !important;
-  }
-
-  .mb-xl-n5,
-.my-xl-n5 {
-    margin-bottom: -3rem !important;
-  }
-
-  .ml-xl-n5,
-.mx-xl-n5 {
-    margin-left: -3rem !important;
-  }
-
-  .m-xl-auto {
-    margin: auto !important;
-  }
-
-  .mt-xl-auto,
-.my-xl-auto {
-    margin-top: auto !important;
-  }
-
-  .mr-xl-auto,
-.mx-xl-auto {
-    margin-right: auto !important;
-  }
-
-  .mb-xl-auto,
-.my-xl-auto {
-    margin-bottom: auto !important;
-  }
-
-  .ml-xl-auto,
-.mx-xl-auto {
-    margin-left: auto !important;
-  }
-}
-.text-monospace {
-  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
-}
-
-.text-justify {
-  text-align: justify !important;
-}
-
-.text-wrap {
-  white-space: normal !important;
-}
-
-.text-nowrap {
-  white-space: nowrap !important;
-}
-
-.text-truncate {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-
-.text-left {
-  text-align: left !important;
-}
-
-.text-right {
-  text-align: right !important;
-}
-
-.text-center {
-  text-align: center !important;
-}
-
-@media (min-width: 576px) {
-  .text-sm-left {
-    text-align: left !important;
-  }
-
-  .text-sm-right {
-    text-align: right !important;
-  }
-
-  .text-sm-center {
-    text-align: center !important;
-  }
-}
-@media (min-width: 768px) {
-  .text-md-left {
-    text-align: left !important;
-  }
-
-  .text-md-right {
-    text-align: right !important;
-  }
-
-  .text-md-center {
-    text-align: center !important;
-  }
-}
-@media (min-width: 992px) {
-  .text-lg-left {
-    text-align: left !important;
-  }
-
-  .text-lg-right {
-    text-align: right !important;
-  }
-
-  .text-lg-center {
-    text-align: center !important;
-  }
-}
-@media (min-width: 1200px) {
-  .text-xl-left {
-    text-align: left !important;
-  }
-
-  .text-xl-right {
-    text-align: right !important;
-  }
-
-  .text-xl-center {
-    text-align: center !important;
-  }
-}
-.text-lowercase {
-  text-transform: lowercase !important;
-}
-
-.text-uppercase {
-  text-transform: uppercase !important;
-}
-
-.text-capitalize {
-  text-transform: capitalize !important;
-}
-
-.font-weight-light {
-  font-weight: 300 !important;
-}
-
-.font-weight-lighter {
-  font-weight: lighter !important;
-}
-
-.font-weight-normal {
-  font-weight: 400 !important;
-}
-
-.font-weight-bold {
-  font-weight: 700 !important;
-}
-
-.font-weight-bolder {
-  font-weight: bolder !important;
-}
-
-.font-italic {
-  font-style: italic !important;
-}
-
-.text-white {
-  color: #fff !important;
-}
-
-.text-primary {
-  color: #007bff !important;
-}
-
-a.text-primary:hover, a.text-primary:focus {
-  color: #0056b3 !important;
-}
-
-.text-secondary {
-  color: #6c757d !important;
-}
-
-a.text-secondary:hover, a.text-secondary:focus {
-  color: #494f54 !important;
-}
-
-.text-success {
-  color: #28a745 !important;
-}
-
-a.text-success:hover, a.text-success:focus {
-  color: #19692c !important;
-}
-
-.text-info {
-  color: #17a2b8 !important;
-}
-
-a.text-info:hover, a.text-info:focus {
-  color: #0f6674 !important;
-}
-
-.text-warning {
-  color: #ffc107 !important;
-}
-
-a.text-warning:hover, a.text-warning:focus {
-  color: #ba8b00 !important;
-}
-
-.text-danger {
-  color: #dc3545 !important;
-}
-
-a.text-danger:hover, a.text-danger:focus {
-  color: #a71d2a !important;
-}
-
-.text-light {
-  color: #f8f9fa !important;
-}
-
-a.text-light:hover, a.text-light:focus {
-  color: #cbd3da !important;
-}
-
-.text-dark {
-  color: #343a40 !important;
-}
-
-a.text-dark:hover, a.text-dark:focus {
-  color: #121416 !important;
-}
-
-.text-body {
-  color: #212529 !important;
-}
-
-.text-muted {
-  color: #6c757d !important;
-}
-
-.text-black-50 {
-  color: rgba(0, 0, 0, 0.5) !important;
-}
-
-.text-white-50 {
-  color: rgba(255, 255, 255, 0.5) !important;
-}
-
-.text-hide {
-  font: 0/0 a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-
-.text-decoration-none {
-  text-decoration: none !important;
-}
-
-.text-break {
-  word-break: break-word !important;
-  overflow-wrap: break-word !important;
-}
-
-.text-reset {
-  color: inherit !important;
-}
-
-.visible {
-  visibility: visible !important;
-}
-
-.invisible {
-  visibility: hidden !important;
-}
-
-@media print {
-  *,
-*::before,
-*::after {
-    text-shadow: none !important;
-    box-shadow: none !important;
-  }
-
-  a:not(.btn) {
-    text-decoration: underline;
-  }
-
-  abbr[title]::after {
-    content: " (" attr(title) ")";
-  }
-
-  pre {
-    white-space: pre-wrap !important;
-  }
-
-  pre,
-blockquote {
-    border: 1px solid #adb5bd;
-    page-break-inside: avoid;
-  }
-
-  thead {
-    display: table-header-group;
-  }
-
-  tr,
-img {
-    page-break-inside: avoid;
-  }
-
-  p,
-h2,
-h3 {
-    orphans: 3;
-    widows: 3;
-  }
-
-  h2,
-h3 {
-    page-break-after: avoid;
-  }
-
-  @page {
-    size: a3;
-  }
-  body {
-    min-width: 992px !important;
-  }
-
-  .container {
-    min-width: 992px !important;
-  }
-
-  .navbar {
-    display: none;
-  }
-
-  .badge {
-    border: 1px solid #000;
-  }
-
-  .table {
-    border-collapse: collapse !important;
-  }
-  .table td,
-.table th {
-    background-color: #fff !important;
-  }
-
-  .table-bordered th,
-.table-bordered td {
-    border: 1px solid #dee2e6 !important;
-  }
-
-  .table-dark {
-    color: inherit;
-  }
-  .table-dark th,
-.table-dark td,
-.table-dark thead th,
-.table-dark tbody + tbody {
-    border-color: #dee2e6;
-  }
-
-  .table .thead-dark th {
-    color: inherit;
-    border-color: #dee2e6;
-  }
-}
-/*!
+ */:root{--blue: #007bff;--indigo: #6610f2;--purple: #6f42c1;--pink: #e83e8c;--red: #dc3545;--orange: #fd7e14;--yellow: #ffc107;--green: #28a745;--teal: #20c997;--cyan: #17a2b8;--white: #fff;--gray: #6c757d;--gray-dark: #343a40;--primary: #007bff;--secondary: #6c757d;--success: #28a745;--info: #17a2b8;--warning: #ffc107;--danger: #dc3545;--light: #f8f9fa;--dark: #343a40;--breakpoint-xs: 0;--breakpoint-sm: 576px;--breakpoint-md: 768px;--breakpoint-lg: 992px;--breakpoint-xl: 1200px;--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*::before,*::after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[title],abbr[data-original-title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul,dl{margin-top:0;margin-bottom:1rem}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]){color:inherit;text-decoration:none}a:not([href]):hover{color:inherit;text-decoration:none}pre,code,kbd,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}input,button,select,optgroup,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button:not(:disabled),[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled){cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none !important}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}h1,.h1{font-size:2.5rem}h2,.h2{font-size:2rem}h3,.h3{font-size:1.75rem}h4,.h4{font-size:1.5rem}h5,.h5{font-size:1.25rem}h6,.h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}small,.small{font-size:80%;font-weight:400}mark,.mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media(min-width: 576px){.container{max-width:540px}}@media(min-width: 768px){.container{max-width:720px}}@media(min-width: 992px){.container{max-width:960px}}@media(min-width: 1200px){.container{max-width:1140px}}.container-fluid,.container-xl,.container-lg,.container-md,.container-sm{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media(min-width: 576px){.container-sm,.container{max-width:540px}}@media(min-width: 768px){.container-md,.container-sm,.container{max-width:720px}}@media(min-width: 992px){.container-lg,.container-md,.container-sm,.container{max-width:960px}}@media(min-width: 1200px){.container-xl,.container-lg,.container-md,.container-sm,.container{max-width:1140px}}.row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col-xl,.col-xl-auto,.col-xl-12,.col-xl-11,.col-xl-10,.col-xl-9,.col-xl-8,.col-xl-7,.col-xl-6,.col-xl-5,.col-xl-4,.col-xl-3,.col-xl-2,.col-xl-1,.col-lg,.col-lg-auto,.col-lg-12,.col-lg-11,.col-lg-10,.col-lg-9,.col-lg-8,.col-lg-7,.col-lg-6,.col-lg-5,.col-lg-4,.col-lg-3,.col-lg-2,.col-lg-1,.col-md,.col-md-auto,.col-md-12,.col-md-11,.col-md-10,.col-md-9,.col-md-8,.col-md-7,.col-md-6,.col-md-5,.col-md-4,.col-md-3,.col-md-2,.col-md-1,.col-sm,.col-sm-auto,.col-sm-12,.col-sm-11,.col-sm-10,.col-sm-9,.col-sm-8,.col-sm-7,.col-sm-6,.col-sm-5,.col-sm-4,.col-sm-3,.col-sm-2,.col-sm-1,.col,.col-auto,.col-12,.col-11,.col-10,.col-9,.col-8,.col-7,.col-6,.col-5,.col-4,.col-3,.col-2,.col-1{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-1>*{flex:0 0 100%;max-width:100%}.row-cols-2>*{flex:0 0 50%;max-width:50%}.row-cols-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-4>*{flex:0 0 25%;max-width:25%}.row-cols-5>*{flex:0 0 20%;max-width:20%}.row-cols-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-12{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}@media(min-width: 576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-sm-1>*{flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-sm-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-sm-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-sm-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-sm-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-sm-12{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}}@media(min-width: 768px){.col-md{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-md-1>*{flex:0 0 100%;max-width:100%}.row-cols-md-2>*{flex:0 0 50%;max-width:50%}.row-cols-md-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-md-4>*{flex:0 0 25%;max-width:25%}.row-cols-md-5>*{flex:0 0 20%;max-width:20%}.row-cols-md-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto;max-width:100%}.col-md-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-md-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-3{flex:0 0 25%;max-width:25%}.col-md-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-md-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-md-6{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-md-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-md-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-md-12{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}}@media(min-width: 992px){.col-lg{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-lg-1>*{flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-lg-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-lg-3{flex:0 0 25%;max-width:25%}.col-lg-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-lg-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-lg-6{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-lg-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-lg-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}}@media(min-width: 1200px){.col-xl{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-3{flex:0 0 25%;max-width:25%}.col-xl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-xl-12{flex:0 0 100%;max-width:100%}.order-xl-first{order:-1}.order-xl-last{order:13}.order-xl-0{order:0}.order-xl-1{order:1}.order-xl-2{order:2}.order-xl-3{order:3}.order-xl-4{order:4}.order-xl-5{order:5}.order-xl-6{order:6}.order-xl-7{order:7}.order-xl-8{order:8}.order-xl-9{order:9}.order-xl-10{order:10}.order-xl-11{order:11}.order-xl-12{order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table th,.table td{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm th,.table-sm td{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered th,.table-bordered td{border:1px solid #dee2e6}.table-bordered thead th,.table-bordered thead td{border-bottom-width:2px}.table-borderless th,.table-borderless td,.table-borderless thead th,.table-borderless tbody+tbody{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>th,.table-primary>td{background-color:#b8daff}.table-primary th,.table-primary td,.table-primary thead th,.table-primary tbody+tbody{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>th,.table-secondary>td{background-color:#d6d8db}.table-secondary th,.table-secondary td,.table-secondary thead th,.table-secondary tbody+tbody{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>th,.table-success>td{background-color:#c3e6cb}.table-success th,.table-success td,.table-success thead th,.table-success tbody+tbody{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>th,.table-info>td{background-color:#bee5eb}.table-info th,.table-info td,.table-info thead th,.table-info tbody+tbody{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>th,.table-warning>td{background-color:#ffeeba}.table-warning th,.table-warning td,.table-warning thead th,.table-warning tbody+tbody{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>th,.table-danger>td{background-color:#f5c6cb}.table-danger th,.table-danger td,.table-danger thead th,.table-danger tbody+tbody{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>th,.table-light>td{background-color:#fdfdfe}.table-light th,.table-light td,.table-light thead th,.table-light tbody+tbody{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>th,.table-dark>td{background-color:#c6c8ca}.table-dark th,.table-dark td,.table-dark thead th,.table-dark tbody+tbody{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>th,.table-active>td{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark th,.table-dark td,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media(max-width: 575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media(max-width: 767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media(max-width: 991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media(max-width: 1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + 0.75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(0.375rem + 1px);padding-bottom:calc(0.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(0.5rem + 1px);padding-bottom:calc(0.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(0.25rem + 1px);padding-bottom:calc(0.25rem + 1px);font-size:0.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-sm,.form-control-plaintext.form-control-lg{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + 0.5rem + 2px);padding:.25rem .5rem;font-size:0.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[size],select.form-control[multiple]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input[disabled]~.form-check-label,.form-check-input:disabled~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:0.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip,.is-valid~.valid-feedback,.is-valid~.valid-tooltip{display:block}.was-validated .form-control:valid,.form-control.is-valid{border-color:#28a745;padding-right:calc(1.5em + 0.75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .form-control:valid:focus,.form-control.is-valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + 0.75rem);background-position:top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem)}.was-validated .custom-select:valid,.custom-select.is-valid{border-color:#28a745;padding-right:calc(0.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .custom-select:valid:focus,.custom-select.is-valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated .form-check-input:valid~.form-check-label,.form-check-input.is-valid~.form-check-label{color:#28a745}.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip,.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip{display:block}.was-validated .custom-control-input:valid~.custom-control-label,.custom-control-input.is-valid~.custom-control-label{color:#28a745}.was-validated .custom-control-input:valid~.custom-control-label::before,.custom-control-input.is-valid~.custom-control-label::before{border-color:#28a745}.was-validated .custom-control-input:valid:checked~.custom-control-label::before,.custom-control-input.is-valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.was-validated .custom-control-input:valid:focus~.custom-control-label::before,.custom-control-input.is-valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before,.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.was-validated .custom-file-input:valid~.custom-file-label,.custom-file-input.is-valid~.custom-file-label{border-color:#28a745}.was-validated .custom-file-input:valid:focus~.custom-file-label,.custom-file-input.is-valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:0.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip,.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip{display:block}.was-validated .form-control:invalid,.form-control.is-invalid{border-color:#dc3545;padding-right:calc(1.5em + 0.75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(0.375em + 0.1875rem) center;background-size:calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .form-control:invalid:focus,.form-control.is-invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + 0.75rem);background-position:top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem)}.was-validated .custom-select:invalid,.custom-select.is-invalid{border-color:#dc3545;padding-right:calc(0.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(0.75em + 0.375rem) calc(0.75em + 0.375rem)}.was-validated .custom-select:invalid:focus,.custom-select.is-invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated .form-check-input:invalid~.form-check-label,.form-check-input.is-invalid~.form-check-label{color:#dc3545}.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip,.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip{display:block}.was-validated .custom-control-input:invalid~.custom-control-label,.custom-control-input.is-invalid~.custom-control-label{color:#dc3545}.was-validated .custom-control-input:invalid~.custom-control-label::before,.custom-control-input.is-invalid~.custom-control-label::before{border-color:#dc3545}.was-validated .custom-control-input:invalid:checked~.custom-control-label::before,.custom-control-input.is-invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.was-validated .custom-control-input:invalid:focus~.custom-control-label::before,.custom-control-input.is-invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before,.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.was-validated .custom-file-input:invalid~.custom-file-label,.custom-file-input.is-invalid~.custom-file-label{border-color:#dc3545}.was-validated .custom-file-input:invalid:focus~.custom-file-label,.custom-file-input.is-invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:flex;flex-flow:row wrap;align-items:center}.form-inline .form-check{width:100%}@media(min-width: 576px){.form-inline label{display:flex;align-items:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:flex;flex:0 0 auto;flex-flow:row wrap;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .input-group,.form-inline .custom-select{width:auto}.form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{align-items:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn:focus,.btn.focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary:focus,.btn-primary.focus{color:#fff;background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled):active,.btn-primary:not(:disabled):not(.disabled).active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled):active:focus,.btn-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary:focus,.btn-secondary.focus{color:#fff;background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled):active,.btn-secondary:not(:disabled):not(.disabled).active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled):active:focus,.btn-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success:focus,.btn-success.focus{color:#fff;background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled):active,.btn-success:not(:disabled):not(.disabled).active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled):active:focus,.btn-success:not(:disabled):not(.disabled).active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info:focus,.btn-info.focus{color:#fff;background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled):active,.btn-info:not(:disabled):not(.disabled).active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled):active:focus,.btn-info:not(:disabled):not(.disabled).active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning:focus,.btn-warning.focus{color:#212529;background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled):active,.btn-warning:not(:disabled):not(.disabled).active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled):active:focus,.btn-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger:focus,.btn-danger.focus{color:#fff;background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled):active,.btn-danger:not(:disabled):not(.disabled).active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled):active:focus,.btn-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light:focus,.btn-light.focus{color:#212529;background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled):active,.btn-light:not(:disabled):not(.disabled).active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled):active:focus,.btn-light:not(:disabled):not(.disabled).active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark:focus,.btn-dark.focus{color:#fff;background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled):active,.btn-dark:not(:disabled):not(.disabled).active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled):active:focus,.btn-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:focus,.btn-outline-primary.focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled):active,.btn-outline-primary:not(:disabled):not(.disabled).active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:focus,.btn-outline-secondary.focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled):active,.btn-outline-secondary:not(:disabled):not(.disabled).active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:focus,.btn-outline-success.focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled):active,.btn-outline-success:not(:disabled):not(.disabled).active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled):active:focus,.btn-outline-success:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:focus,.btn-outline-info.focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled):active,.btn-outline-info:not(:disabled):not(.disabled).active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled):active:focus,.btn-outline-info:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:focus,.btn-outline-warning.focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled):active,.btn-outline-warning:not(:disabled):not(.disabled).active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:focus,.btn-outline-danger.focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled):active,.btn-outline-danger:not(:disabled):not(.disabled).active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:focus,.btn-outline-light.focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled):active,.btn-outline-light:not(:disabled):not(.disabled).active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled):active:focus,.btn-outline-light:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:focus,.btn-outline-dark.focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled):active,.btn-outline-dark:not(:disabled):not(.disabled).active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link:focus,.btn-link.focus{text-decoration:underline;box-shadow:none}.btn-link:disabled,.btn-link.disabled{color:#6c757d;pointer-events:none}.btn-lg,.btn-group-lg>.btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-sm,.btn-group-sm>.btn{padding:.25rem .5rem;font-size:0.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{transition:opacity .15s linear}@media(prefers-reduced-motion: reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media(prefers-reduced-motion: reduce){.collapsing{transition:none}}.dropup,.dropright,.dropdown,.dropleft{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media(min-width: 576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media(min-width: 768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media(min-width: 992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media(min-width: 1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=top],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:0.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;flex:1 1 auto}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover{z-index:1}.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn.active{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn:not(:first-child),.btn-group>.btn-group:not(:first-child){margin-left:-1px}.btn-group>.btn:not(:last-child):not(.dropdown-toggle),.btn-group>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:not(:first-child),.btn-group>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-sm+.dropdown-toggle-split,.btn-group-sm>.btn+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-lg+.dropdown-toggle-split,.btn-group-lg>.btn+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn:not(:first-child),.btn-group-vertical>.btn-group:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle),.btn-group-vertical>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child),.btn-group-vertical>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-control-plaintext,.input-group>.custom-select,.input-group>.custom-file{position:relative;flex:1 1 0%;min-width:0;margin-bottom:0}.input-group>.form-control+.form-control,.input-group>.form-control+.custom-select,.input-group>.form-control+.custom-file,.input-group>.form-control-plaintext+.form-control,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.custom-file,.input-group>.custom-select+.form-control,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.custom-file,.input-group>.custom-file+.form-control,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.custom-file{margin-left:-1px}.input-group>.form-control:focus,.input-group>.custom-select:focus,.input-group>.custom-file .custom-file-input:focus~.custom-file-label{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.form-control:not(:last-child),.input-group>.custom-select:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.form-control:not(:first-child),.input-group>.custom-select:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:flex;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-prepend,.input-group-append{display:flex}.input-group-prepend .btn,.input-group-append .btn{position:relative;z-index:2}.input-group-prepend .btn:focus,.input-group-append .btn:focus{z-index:3}.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.input-group-text,.input-group-append .input-group-text+.btn{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=radio],.input-group-text input[type=checkbox]{margin-top:0}.input-group-lg>.form-control:not(textarea),.input-group-lg>.custom-select{height:calc(1.5em + 1rem + 2px)}.input-group-lg>.form-control,.input-group-lg>.custom-select,.input-group-lg>.input-group-prepend>.input-group-text,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-append>.btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.form-control:not(textarea),.input-group-sm>.custom-select{height:calc(1.5em + 0.5rem + 2px)}.input-group-sm>.form-control,.input-group-sm>.custom-select,.input-group-sm>.input-group-prepend>.input-group-text,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-append>.btn{padding:.25rem .5rem;font-size:0.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text,.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input[disabled]~.custom-control-label,.custom-control-input:disabled~.custom-control-label{color:#6c757d}.custom-control-input[disabled]~.custom-control-label::before,.custom-control-input:disabled~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:#adb5bd solid 1px}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(0.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;transform:translateX(0.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + 0.75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + 0.5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:0.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + 0.75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + 0.75rem + 2px);margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input[disabled]~.custom-file-label,.custom-file-input:disabled~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + 0.75rem + 2px);padding:.375rem .75rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + 0.75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:none}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-0.25rem;background-color:#007bff;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media(prefers-reduced-motion: reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media(prefers-reduced-motion: reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media(prefers-reduced-motion: reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:hover,.nav-link:focus{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:hover,.nav-tabs .nav-link:focus{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-link.active,.nav-tabs .nav-item.show .nav-link{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{flex:1 1 auto;text-align:center}.nav-justified .nav-item{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-sm,.navbar .container-md,.navbar .container-lg,.navbar .container-xl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:hover,.navbar-toggler:focus{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media(max-width: 575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 576px){.navbar-expand-sm{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-xl{flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media(max-width: 767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-md,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 768px){.navbar-expand-md{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-md,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-xl{flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media(max-width: 991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 992px){.navbar-expand-lg{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-xl{flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media(max-width: 1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 1200px){.navbar-expand-xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-xl{flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-sm,.navbar-expand>.container-md,.navbar-expand>.container-lg,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-sm,.navbar-expand>.container-md,.navbar-expand>.container-lg,.navbar-expand>.container-xl{flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:flex !important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:hover,.navbar-light .navbar-brand:focus{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:hover,.navbar-light .navbar-nav .nav-link:focus{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .show>.nav-link,.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .nav-link.active{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:hover,.navbar-light .navbar-text a:focus{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:hover,.navbar-dark .navbar-brand:focus{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:hover,.navbar-dark .navbar-nav .nav-link:focus{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .show>.nav-link,.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .nav-link.active{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:hover,.navbar-dark .navbar-text a:focus{color:#fff}.card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-body{flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-0.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(0.25rem - 1px) calc(0.25rem - 1px)}.card-header-tabs{margin-right:-0.625rem;margin-bottom:-0.75rem;margin-left:-0.625rem;border-bottom:0}.card-header-pills{margin-right:-0.625rem;margin-left:-0.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img,.card-img-top,.card-img-bottom{flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(0.25rem - 1px);border-top-right-radius:calc(0.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(0.25rem - 1px);border-bottom-left-radius:calc(0.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media(min-width: 576px){.card-deck{display:flex;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media(min-width: 576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-img-top,.card-group>.card:not(:last-child) .card-header{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-img-bottom,.card-group>.card:not(:last-child) .card-footer{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-img-top,.card-group>.card:not(:first-child) .card-header{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-img-bottom,.card-group>.card:not(:first-child) .card-footer{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media(min-width: 576px){.card-columns{-moz-column-count:3;column-count:3;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:flex;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:0.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.badge{transition:none}}a.badge:hover,a.badge:focus{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:hover,a.badge-primary:focus{color:#fff;background-color:#0062cc}a.badge-primary:focus,a.badge-primary.focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:hover,a.badge-secondary:focus{color:#fff;background-color:#545b62}a.badge-secondary:focus,a.badge-secondary.focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:hover,a.badge-success:focus{color:#fff;background-color:#1e7e34}a.badge-success:focus,a.badge-success.focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:hover,a.badge-info:focus{color:#fff;background-color:#117a8b}a.badge-info:focus,a.badge-info.focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:hover,a.badge-warning:focus{color:#212529;background-color:#d39e00}a.badge-warning:focus,a.badge-warning.focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:hover,a.badge-danger:focus{color:#fff;background-color:#bd2130}a.badge-danger:focus,a.badge-danger.focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:hover,a.badge-light:focus{color:#212529;background-color:#dae0e5}a.badge-light:focus,a.badge-light.focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:hover,a.badge-dark:focus{color:#fff;background-color:#1d2124}a.badge-dark:focus,a.badge-dark.focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media(min-width: 576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:flex;height:1rem;overflow:hidden;font-size:0.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:flex;flex-direction:column;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media(prefers-reduced-motion: reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}@media(prefers-reduced-motion: reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:flex;align-items:flex-start}.media-body{flex:1}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:hover,.list-group-item-action:focus{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal .list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal .list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal .list-group-item.active{margin-top:0}.list-group-horizontal .list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal .list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media(min-width: 576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm .list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm .list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm .list-group-item.active{margin-top:0}.list-group-horizontal-sm .list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm .list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media(min-width: 768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md .list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md .list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md .list-group-item.active{margin-top:0}.list-group-horizontal-md .list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md .list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media(min-width: 992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg .list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg .list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg .list-group-item.active{margin-top:0}.list-group-horizontal-lg .list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg .list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media(min-width: 1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl .list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl .list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl .list-group-item.active{margin-top:0}.list-group-horizontal-xl .list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl .list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush .list-group-item{border-right-width:0;border-left-width:0;border-radius:0}.list-group-flush .list-group-item:first-child{border-top-width:0}.list-group-flush:last-child .list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:hover,.list-group-item-primary.list-group-item-action:focus{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:hover,.list-group-item-secondary.list-group-item-action:focus{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:hover,.list-group-item-success.list-group-item-action:focus{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:hover,.list-group-item-info.list-group-item-action:focus{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:hover,.list-group-item-warning.list-group-item-action:focus{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:hover,.list-group-item-danger.list-group-item-action:focus{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:hover,.list-group-item-light.list-group-item-action:focus{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:hover,.list-group-item-dark.list-group-item-action:focus{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):hover,.close:not(:disabled):not(.disabled):focus{opacity:.75}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}a.close.disabled{pointer-events:none}.toast{max-width:350px;overflow:hidden;font-size:0.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:flex;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0, -50px)}@media(prefers-reduced-motion: reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-header,.modal-dialog-scrollable .modal-footer{flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);content:""}.modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(0.3rem - 1px);border-top-right-radius:calc(0.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(0.3rem - 1px);border-bottom-left-radius:calc(0.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media(min-width: 576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem)}.modal-sm{max-width:300px}}@media(min-width: 992px){.modal-lg,.modal-xl{max-width:800px}}@media(min-width: 1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:0.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-top,.bs-tooltip-auto[x-placement^=top]{padding:.4rem 0}.bs-tooltip-top .arrow,.bs-tooltip-auto[x-placement^=top] .arrow{bottom:0}.bs-tooltip-top .arrow::before,.bs-tooltip-auto[x-placement^=top] .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-right,.bs-tooltip-auto[x-placement^=right]{padding:0 .4rem}.bs-tooltip-right .arrow,.bs-tooltip-auto[x-placement^=right] .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-right .arrow::before,.bs-tooltip-auto[x-placement^=right] .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-bottom,.bs-tooltip-auto[x-placement^=bottom]{padding:.4rem 0}.bs-tooltip-bottom .arrow,.bs-tooltip-auto[x-placement^=bottom] .arrow{top:0}.bs-tooltip-bottom .arrow::before,.bs-tooltip-auto[x-placement^=bottom] .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-left,.bs-tooltip-auto[x-placement^=left]{padding:0 .4rem}.bs-tooltip-left .arrow,.bs-tooltip-auto[x-placement^=left] .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-left .arrow::before,.bs-tooltip-auto[x-placement^=left] .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:0.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::before,.popover .arrow::after{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-top,.bs-popover-auto[x-placement^=top]{margin-bottom:.5rem}.bs-popover-top>.arrow,.bs-popover-auto[x-placement^=top]>.arrow{bottom:calc(-0.5rem - 1px)}.bs-popover-top>.arrow::before,.bs-popover-auto[x-placement^=top]>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-top>.arrow::after,.bs-popover-auto[x-placement^=top]>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-right,.bs-popover-auto[x-placement^=right]{margin-left:.5rem}.bs-popover-right>.arrow,.bs-popover-auto[x-placement^=right]>.arrow{left:calc(-0.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-right>.arrow::before,.bs-popover-auto[x-placement^=right]>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-right>.arrow::after,.bs-popover-auto[x-placement^=right]>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-bottom,.bs-popover-auto[x-placement^=bottom]{margin-top:.5rem}.bs-popover-bottom>.arrow,.bs-popover-auto[x-placement^=bottom]>.arrow{top:calc(-0.5rem - 1px)}.bs-popover-bottom>.arrow::before,.bs-popover-auto[x-placement^=bottom]>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-bottom>.arrow::after,.bs-popover-auto[x-placement^=bottom]>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-bottom .popover-header::before,.bs-popover-auto[x-placement^=bottom] .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-0.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-left,.bs-popover-auto[x-placement^=left]{margin-right:.5rem}.bs-popover-left>.arrow,.bs-popover-auto[x-placement^=left]>.arrow{right:calc(-0.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-left>.arrow::before,.bs-popover-auto[x-placement^=left]>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-left>.arrow::after,.bs-popover-auto[x-placement^=left]>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(0.3rem - 1px);border-top-right-radius:calc(0.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .6s ease-in-out}@media(prefers-reduced-motion: reduce){.carousel-item{transition:none}}.carousel-item.active,.carousel-item-next,.carousel-item-prev{display:block}.carousel-item-next:not(.carousel-item-left),.active.carousel-item-right{transform:translateX(100%)}.carousel-item-prev:not(.carousel-item-right),.active.carousel-item-left{transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item.active,.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media(prefers-reduced-motion: reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-prev,.carousel-control-next{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media(prefers-reduced-motion: reduce){.carousel-control-prev,.carousel-control-next{transition:none}}.carousel-control-prev:hover,.carousel-control-prev:focus,.carousel-control-next:hover,.carousel-control-next:focus{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-prev-icon,.carousel-control-next-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media(prefers-reduced-motion: reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{transform:rotate(360deg)}}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid currentColor;border-right-color:transparent;border-radius:50%;-webkit-animation:spinner-border .75s linear infinite;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1}}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;-webkit-animation:spinner-grow .75s linear infinite;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:baseline !important}.align-top{vertical-align:top !important}.align-middle{vertical-align:middle !important}.align-bottom{vertical-align:bottom !important}.align-text-bottom{vertical-align:text-bottom !important}.align-text-top{vertical-align:text-top !important}.bg-primary{background-color:#007bff !important}a.bg-primary:hover,a.bg-primary:focus,button.bg-primary:hover,button.bg-primary:focus{background-color:#0062cc !important}.bg-secondary{background-color:#6c757d !important}a.bg-secondary:hover,a.bg-secondary:focus,button.bg-secondary:hover,button.bg-secondary:focus{background-color:#545b62 !important}.bg-success{background-color:#28a745 !important}a.bg-success:hover,a.bg-success:focus,button.bg-success:hover,button.bg-success:focus{background-color:#1e7e34 !important}.bg-info{background-color:#17a2b8 !important}a.bg-info:hover,a.bg-info:focus,button.bg-info:hover,button.bg-info:focus{background-color:#117a8b !important}.bg-warning{background-color:#ffc107 !important}a.bg-warning:hover,a.bg-warning:focus,button.bg-warning:hover,button.bg-warning:focus{background-color:#d39e00 !important}.bg-danger{background-color:#dc3545 !important}a.bg-danger:hover,a.bg-danger:focus,button.bg-danger:hover,button.bg-danger:focus{background-color:#bd2130 !important}.bg-light{background-color:#f8f9fa !important}a.bg-light:hover,a.bg-light:focus,button.bg-light:hover,button.bg-light:focus{background-color:#dae0e5 !important}.bg-dark{background-color:#343a40 !important}a.bg-dark:hover,a.bg-dark:focus,button.bg-dark:hover,button.bg-dark:focus{background-color:#1d2124 !important}.bg-white{background-color:#fff !important}.bg-transparent{background-color:transparent !important}.border{border:1px solid #dee2e6 !important}.border-top{border-top:1px solid #dee2e6 !important}.border-right{border-right:1px solid #dee2e6 !important}.border-bottom{border-bottom:1px solid #dee2e6 !important}.border-left{border-left:1px solid #dee2e6 !important}.border-0{border:0 !important}.border-top-0{border-top:0 !important}.border-right-0{border-right:0 !important}.border-bottom-0{border-bottom:0 !important}.border-left-0{border-left:0 !important}.border-primary{border-color:#007bff !important}.border-secondary{border-color:#6c757d !important}.border-success{border-color:#28a745 !important}.border-info{border-color:#17a2b8 !important}.border-warning{border-color:#ffc107 !important}.border-danger{border-color:#dc3545 !important}.border-light{border-color:#f8f9fa !important}.border-dark{border-color:#343a40 !important}.border-white{border-color:#fff !important}.rounded-sm{border-radius:.2rem !important}.rounded{border-radius:.25rem !important}.rounded-top{border-top-left-radius:.25rem !important;border-top-right-radius:.25rem !important}.rounded-right{border-top-right-radius:.25rem !important;border-bottom-right-radius:.25rem !important}.rounded-bottom{border-bottom-right-radius:.25rem !important;border-bottom-left-radius:.25rem !important}.rounded-left{border-top-left-radius:.25rem !important;border-bottom-left-radius:.25rem !important}.rounded-lg{border-radius:.3rem !important}.rounded-circle{border-radius:50% !important}.rounded-pill{border-radius:50rem !important}.rounded-0{border-radius:0 !important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none !important}.d-inline{display:inline !important}.d-inline-block{display:inline-block !important}.d-block{display:block !important}.d-table{display:table !important}.d-table-row{display:table-row !important}.d-table-cell{display:table-cell !important}.d-flex{display:flex !important}.d-inline-flex{display:inline-flex !important}@media(min-width: 576px){.d-sm-none{display:none !important}.d-sm-inline{display:inline !important}.d-sm-inline-block{display:inline-block !important}.d-sm-block{display:block !important}.d-sm-table{display:table !important}.d-sm-table-row{display:table-row !important}.d-sm-table-cell{display:table-cell !important}.d-sm-flex{display:flex !important}.d-sm-inline-flex{display:inline-flex !important}}@media(min-width: 768px){.d-md-none{display:none !important}.d-md-inline{display:inline !important}.d-md-inline-block{display:inline-block !important}.d-md-block{display:block !important}.d-md-table{display:table !important}.d-md-table-row{display:table-row !important}.d-md-table-cell{display:table-cell !important}.d-md-flex{display:flex !important}.d-md-inline-flex{display:inline-flex !important}}@media(min-width: 992px){.d-lg-none{display:none !important}.d-lg-inline{display:inline !important}.d-lg-inline-block{display:inline-block !important}.d-lg-block{display:block !important}.d-lg-table{display:table !important}.d-lg-table-row{display:table-row !important}.d-lg-table-cell{display:table-cell !important}.d-lg-flex{display:flex !important}.d-lg-inline-flex{display:inline-flex !important}}@media(min-width: 1200px){.d-xl-none{display:none !important}.d-xl-inline{display:inline !important}.d-xl-inline-block{display:inline-block !important}.d-xl-block{display:block !important}.d-xl-table{display:table !important}.d-xl-table-row{display:table-row !important}.d-xl-table-cell{display:table-cell !important}.d-xl-flex{display:flex !important}.d-xl-inline-flex{display:inline-flex !important}}@media print{.d-print-none{display:none !important}.d-print-inline{display:inline !important}.d-print-inline-block{display:inline-block !important}.d-print-block{display:block !important}.d-print-table{display:table !important}.d-print-table-row{display:table-row !important}.d-print-table-cell{display:table-cell !important}.d-print-flex{display:flex !important}.d-print-inline-flex{display:inline-flex !important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.8571428571%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{flex-direction:row !important}.flex-column{flex-direction:column !important}.flex-row-reverse{flex-direction:row-reverse !important}.flex-column-reverse{flex-direction:column-reverse !important}.flex-wrap{flex-wrap:wrap !important}.flex-nowrap{flex-wrap:nowrap !important}.flex-wrap-reverse{flex-wrap:wrap-reverse !important}.flex-fill{flex:1 1 auto !important}.flex-grow-0{flex-grow:0 !important}.flex-grow-1{flex-grow:1 !important}.flex-shrink-0{flex-shrink:0 !important}.flex-shrink-1{flex-shrink:1 !important}.justify-content-start{justify-content:flex-start !important}.justify-content-end{justify-content:flex-end !important}.justify-content-center{justify-content:center !important}.justify-content-between{justify-content:space-between !important}.justify-content-around{justify-content:space-around !important}.align-items-start{align-items:flex-start !important}.align-items-end{align-items:flex-end !important}.align-items-center{align-items:center !important}.align-items-baseline{align-items:baseline !important}.align-items-stretch{align-items:stretch !important}.align-content-start{align-content:flex-start !important}.align-content-end{align-content:flex-end !important}.align-content-center{align-content:center !important}.align-content-between{align-content:space-between !important}.align-content-around{align-content:space-around !important}.align-content-stretch{align-content:stretch !important}.align-self-auto{align-self:auto !important}.align-self-start{align-self:flex-start !important}.align-self-end{align-self:flex-end !important}.align-self-center{align-self:center !important}.align-self-baseline{align-self:baseline !important}.align-self-stretch{align-self:stretch !important}@media(min-width: 576px){.flex-sm-row{flex-direction:row !important}.flex-sm-column{flex-direction:column !important}.flex-sm-row-reverse{flex-direction:row-reverse !important}.flex-sm-column-reverse{flex-direction:column-reverse !important}.flex-sm-wrap{flex-wrap:wrap !important}.flex-sm-nowrap{flex-wrap:nowrap !important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse !important}.flex-sm-fill{flex:1 1 auto !important}.flex-sm-grow-0{flex-grow:0 !important}.flex-sm-grow-1{flex-grow:1 !important}.flex-sm-shrink-0{flex-shrink:0 !important}.flex-sm-shrink-1{flex-shrink:1 !important}.justify-content-sm-start{justify-content:flex-start !important}.justify-content-sm-end{justify-content:flex-end !important}.justify-content-sm-center{justify-content:center !important}.justify-content-sm-between{justify-content:space-between !important}.justify-content-sm-around{justify-content:space-around !important}.align-items-sm-start{align-items:flex-start !important}.align-items-sm-end{align-items:flex-end !important}.align-items-sm-center{align-items:center !important}.align-items-sm-baseline{align-items:baseline !important}.align-items-sm-stretch{align-items:stretch !important}.align-content-sm-start{align-content:flex-start !important}.align-content-sm-end{align-content:flex-end !important}.align-content-sm-center{align-content:center !important}.align-content-sm-between{align-content:space-between !important}.align-content-sm-around{align-content:space-around !important}.align-content-sm-stretch{align-content:stretch !important}.align-self-sm-auto{align-self:auto !important}.align-self-sm-start{align-self:flex-start !important}.align-self-sm-end{align-self:flex-end !important}.align-self-sm-center{align-self:center !important}.align-self-sm-baseline{align-self:baseline !important}.align-self-sm-stretch{align-self:stretch !important}}@media(min-width: 768px){.flex-md-row{flex-direction:row !important}.flex-md-column{flex-direction:column !important}.flex-md-row-reverse{flex-direction:row-reverse !important}.flex-md-column-reverse{flex-direction:column-reverse !important}.flex-md-wrap{flex-wrap:wrap !important}.flex-md-nowrap{flex-wrap:nowrap !important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse !important}.flex-md-fill{flex:1 1 auto !important}.flex-md-grow-0{flex-grow:0 !important}.flex-md-grow-1{flex-grow:1 !important}.flex-md-shrink-0{flex-shrink:0 !important}.flex-md-shrink-1{flex-shrink:1 !important}.justify-content-md-start{justify-content:flex-start !important}.justify-content-md-end{justify-content:flex-end !important}.justify-content-md-center{justify-content:center !important}.justify-content-md-between{justify-content:space-between !important}.justify-content-md-around{justify-content:space-around !important}.align-items-md-start{align-items:flex-start !important}.align-items-md-end{align-items:flex-end !important}.align-items-md-center{align-items:center !important}.align-items-md-baseline{align-items:baseline !important}.align-items-md-stretch{align-items:stretch !important}.align-content-md-start{align-content:flex-start !important}.align-content-md-end{align-content:flex-end !important}.align-content-md-center{align-content:center !important}.align-content-md-between{align-content:space-between !important}.align-content-md-around{align-content:space-around !important}.align-content-md-stretch{align-content:stretch !important}.align-self-md-auto{align-self:auto !important}.align-self-md-start{align-self:flex-start !important}.align-self-md-end{align-self:flex-end !important}.align-self-md-center{align-self:center !important}.align-self-md-baseline{align-self:baseline !important}.align-self-md-stretch{align-self:stretch !important}}@media(min-width: 992px){.flex-lg-row{flex-direction:row !important}.flex-lg-column{flex-direction:column !important}.flex-lg-row-reverse{flex-direction:row-reverse !important}.flex-lg-column-reverse{flex-direction:column-reverse !important}.flex-lg-wrap{flex-wrap:wrap !important}.flex-lg-nowrap{flex-wrap:nowrap !important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse !important}.flex-lg-fill{flex:1 1 auto !important}.flex-lg-grow-0{flex-grow:0 !important}.flex-lg-grow-1{flex-grow:1 !important}.flex-lg-shrink-0{flex-shrink:0 !important}.flex-lg-shrink-1{flex-shrink:1 !important}.justify-content-lg-start{justify-content:flex-start !important}.justify-content-lg-end{justify-content:flex-end !important}.justify-content-lg-center{justify-content:center !important}.justify-content-lg-between{justify-content:space-between !important}.justify-content-lg-around{justify-content:space-around !important}.align-items-lg-start{align-items:flex-start !important}.align-items-lg-end{align-items:flex-end !important}.align-items-lg-center{align-items:center !important}.align-items-lg-baseline{align-items:baseline !important}.align-items-lg-stretch{align-items:stretch !important}.align-content-lg-start{align-content:flex-start !important}.align-content-lg-end{align-content:flex-end !important}.align-content-lg-center{align-content:center !important}.align-content-lg-between{align-content:space-between !important}.align-content-lg-around{align-content:space-around !important}.align-content-lg-stretch{align-content:stretch !important}.align-self-lg-auto{align-self:auto !important}.align-self-lg-start{align-self:flex-start !important}.align-self-lg-end{align-self:flex-end !important}.align-self-lg-center{align-self:center !important}.align-self-lg-baseline{align-self:baseline !important}.align-self-lg-stretch{align-self:stretch !important}}@media(min-width: 1200px){.flex-xl-row{flex-direction:row !important}.flex-xl-column{flex-direction:column !important}.flex-xl-row-reverse{flex-direction:row-reverse !important}.flex-xl-column-reverse{flex-direction:column-reverse !important}.flex-xl-wrap{flex-wrap:wrap !important}.flex-xl-nowrap{flex-wrap:nowrap !important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse !important}.flex-xl-fill{flex:1 1 auto !important}.flex-xl-grow-0{flex-grow:0 !important}.flex-xl-grow-1{flex-grow:1 !important}.flex-xl-shrink-0{flex-shrink:0 !important}.flex-xl-shrink-1{flex-shrink:1 !important}.justify-content-xl-start{justify-content:flex-start !important}.justify-content-xl-end{justify-content:flex-end !important}.justify-content-xl-center{justify-content:center !important}.justify-content-xl-between{justify-content:space-between !important}.justify-content-xl-around{justify-content:space-around !important}.align-items-xl-start{align-items:flex-start !important}.align-items-xl-end{align-items:flex-end !important}.align-items-xl-center{align-items:center !important}.align-items-xl-baseline{align-items:baseline !important}.align-items-xl-stretch{align-items:stretch !important}.align-content-xl-start{align-content:flex-start !important}.align-content-xl-end{align-content:flex-end !important}.align-content-xl-center{align-content:center !important}.align-content-xl-between{align-content:space-between !important}.align-content-xl-around{align-content:space-around !important}.align-content-xl-stretch{align-content:stretch !important}.align-self-xl-auto{align-self:auto !important}.align-self-xl-start{align-self:flex-start !important}.align-self-xl-end{align-self:flex-end !important}.align-self-xl-center{align-self:center !important}.align-self-xl-baseline{align-self:baseline !important}.align-self-xl-stretch{align-self:stretch !important}}.float-left{float:left !important}.float-right{float:right !important}.float-none{float:none !important}@media(min-width: 576px){.float-sm-left{float:left !important}.float-sm-right{float:right !important}.float-sm-none{float:none !important}}@media(min-width: 768px){.float-md-left{float:left !important}.float-md-right{float:right !important}.float-md-none{float:none !important}}@media(min-width: 992px){.float-lg-left{float:left !important}.float-lg-right{float:right !important}.float-lg-none{float:none !important}}@media(min-width: 1200px){.float-xl-left{float:left !important}.float-xl-right{float:right !important}.float-xl-none{float:none !important}}.overflow-auto{overflow:auto !important}.overflow-hidden{overflow:hidden !important}.position-static{position:static !important}.position-relative{position:relative !important}.position-absolute{position:absolute !important}.position-fixed{position:fixed !important}.position-sticky{position:-webkit-sticky !important;position:sticky !important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports((position: -webkit-sticky) or (position: sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075) !important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15) !important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175) !important}.shadow-none{box-shadow:none !important}.w-25{width:25% !important}.w-50{width:50% !important}.w-75{width:75% !important}.w-100{width:100% !important}.w-auto{width:auto !important}.h-25{height:25% !important}.h-50{height:50% !important}.h-75{height:75% !important}.h-100{height:100% !important}.h-auto{height:auto !important}.mw-100{max-width:100% !important}.mh-100{max-height:100% !important}.min-vw-100{min-width:100vw !important}.min-vh-100{min-height:100vh !important}.vw-100{width:100vw !important}.vh-100{height:100vh !important}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.m-0{margin:0 !important}.mt-0,.my-0{margin-top:0 !important}.mr-0,.mx-0{margin-right:0 !important}.mb-0,.my-0{margin-bottom:0 !important}.ml-0,.mx-0{margin-left:0 !important}.m-1{margin:.25rem !important}.mt-1,.my-1{margin-top:.25rem !important}.mr-1,.mx-1{margin-right:.25rem !important}.mb-1,.my-1{margin-bottom:.25rem !important}.ml-1,.mx-1{margin-left:.25rem !important}.m-2{margin:.5rem !important}.mt-2,.my-2{margin-top:.5rem !important}.mr-2,.mx-2{margin-right:.5rem !important}.mb-2,.my-2{margin-bottom:.5rem !important}.ml-2,.mx-2{margin-left:.5rem !important}.m-3{margin:1rem !important}.mt-3,.my-3{margin-top:1rem !important}.mr-3,.mx-3{margin-right:1rem !important}.mb-3,.my-3{margin-bottom:1rem !important}.ml-3,.mx-3{margin-left:1rem !important}.m-4{margin:1.5rem !important}.mt-4,.my-4{margin-top:1.5rem !important}.mr-4,.mx-4{margin-right:1.5rem !important}.mb-4,.my-4{margin-bottom:1.5rem !important}.ml-4,.mx-4{margin-left:1.5rem !important}.m-5{margin:3rem !important}.mt-5,.my-5{margin-top:3rem !important}.mr-5,.mx-5{margin-right:3rem !important}.mb-5,.my-5{margin-bottom:3rem !important}.ml-5,.mx-5{margin-left:3rem !important}.p-0{padding:0 !important}.pt-0,.py-0{padding-top:0 !important}.pr-0,.px-0{padding-right:0 !important}.pb-0,.py-0{padding-bottom:0 !important}.pl-0,.px-0{padding-left:0 !important}.p-1{padding:.25rem !important}.pt-1,.py-1{padding-top:.25rem !important}.pr-1,.px-1{padding-right:.25rem !important}.pb-1,.py-1{padding-bottom:.25rem !important}.pl-1,.px-1{padding-left:.25rem !important}.p-2{padding:.5rem !important}.pt-2,.py-2{padding-top:.5rem !important}.pr-2,.px-2{padding-right:.5rem !important}.pb-2,.py-2{padding-bottom:.5rem !important}.pl-2,.px-2{padding-left:.5rem !important}.p-3{padding:1rem !important}.pt-3,.py-3{padding-top:1rem !important}.pr-3,.px-3{padding-right:1rem !important}.pb-3,.py-3{padding-bottom:1rem !important}.pl-3,.px-3{padding-left:1rem !important}.p-4{padding:1.5rem !important}.pt-4,.py-4{padding-top:1.5rem !important}.pr-4,.px-4{padding-right:1.5rem !important}.pb-4,.py-4{padding-bottom:1.5rem !important}.pl-4,.px-4{padding-left:1.5rem !important}.p-5{padding:3rem !important}.pt-5,.py-5{padding-top:3rem !important}.pr-5,.px-5{padding-right:3rem !important}.pb-5,.py-5{padding-bottom:3rem !important}.pl-5,.px-5{padding-left:3rem !important}.m-n1{margin:-0.25rem !important}.mt-n1,.my-n1{margin-top:-0.25rem !important}.mr-n1,.mx-n1{margin-right:-0.25rem !important}.mb-n1,.my-n1{margin-bottom:-0.25rem !important}.ml-n1,.mx-n1{margin-left:-0.25rem !important}.m-n2{margin:-0.5rem !important}.mt-n2,.my-n2{margin-top:-0.5rem !important}.mr-n2,.mx-n2{margin-right:-0.5rem !important}.mb-n2,.my-n2{margin-bottom:-0.5rem !important}.ml-n2,.mx-n2{margin-left:-0.5rem !important}.m-n3{margin:-1rem !important}.mt-n3,.my-n3{margin-top:-1rem !important}.mr-n3,.mx-n3{margin-right:-1rem !important}.mb-n3,.my-n3{margin-bottom:-1rem !important}.ml-n3,.mx-n3{margin-left:-1rem !important}.m-n4{margin:-1.5rem !important}.mt-n4,.my-n4{margin-top:-1.5rem !important}.mr-n4,.mx-n4{margin-right:-1.5rem !important}.mb-n4,.my-n4{margin-bottom:-1.5rem !important}.ml-n4,.mx-n4{margin-left:-1.5rem !important}.m-n5{margin:-3rem !important}.mt-n5,.my-n5{margin-top:-3rem !important}.mr-n5,.mx-n5{margin-right:-3rem !important}.mb-n5,.my-n5{margin-bottom:-3rem !important}.ml-n5,.mx-n5{margin-left:-3rem !important}.m-auto{margin:auto !important}.mt-auto,.my-auto{margin-top:auto !important}.mr-auto,.mx-auto{margin-right:auto !important}.mb-auto,.my-auto{margin-bottom:auto !important}.ml-auto,.mx-auto{margin-left:auto !important}@media(min-width: 576px){.m-sm-0{margin:0 !important}.mt-sm-0,.my-sm-0{margin-top:0 !important}.mr-sm-0,.mx-sm-0{margin-right:0 !important}.mb-sm-0,.my-sm-0{margin-bottom:0 !important}.ml-sm-0,.mx-sm-0{margin-left:0 !important}.m-sm-1{margin:.25rem !important}.mt-sm-1,.my-sm-1{margin-top:.25rem !important}.mr-sm-1,.mx-sm-1{margin-right:.25rem !important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem !important}.ml-sm-1,.mx-sm-1{margin-left:.25rem !important}.m-sm-2{margin:.5rem !important}.mt-sm-2,.my-sm-2{margin-top:.5rem !important}.mr-sm-2,.mx-sm-2{margin-right:.5rem !important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem !important}.ml-sm-2,.mx-sm-2{margin-left:.5rem !important}.m-sm-3{margin:1rem !important}.mt-sm-3,.my-sm-3{margin-top:1rem !important}.mr-sm-3,.mx-sm-3{margin-right:1rem !important}.mb-sm-3,.my-sm-3{margin-bottom:1rem !important}.ml-sm-3,.mx-sm-3{margin-left:1rem !important}.m-sm-4{margin:1.5rem !important}.mt-sm-4,.my-sm-4{margin-top:1.5rem !important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem !important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem !important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem !important}.m-sm-5{margin:3rem !important}.mt-sm-5,.my-sm-5{margin-top:3rem !important}.mr-sm-5,.mx-sm-5{margin-right:3rem !important}.mb-sm-5,.my-sm-5{margin-bottom:3rem !important}.ml-sm-5,.mx-sm-5{margin-left:3rem !important}.p-sm-0{padding:0 !important}.pt-sm-0,.py-sm-0{padding-top:0 !important}.pr-sm-0,.px-sm-0{padding-right:0 !important}.pb-sm-0,.py-sm-0{padding-bottom:0 !important}.pl-sm-0,.px-sm-0{padding-left:0 !important}.p-sm-1{padding:.25rem !important}.pt-sm-1,.py-sm-1{padding-top:.25rem !important}.pr-sm-1,.px-sm-1{padding-right:.25rem !important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem !important}.pl-sm-1,.px-sm-1{padding-left:.25rem !important}.p-sm-2{padding:.5rem !important}.pt-sm-2,.py-sm-2{padding-top:.5rem !important}.pr-sm-2,.px-sm-2{padding-right:.5rem !important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem !important}.pl-sm-2,.px-sm-2{padding-left:.5rem !important}.p-sm-3{padding:1rem !important}.pt-sm-3,.py-sm-3{padding-top:1rem !important}.pr-sm-3,.px-sm-3{padding-right:1rem !important}.pb-sm-3,.py-sm-3{padding-bottom:1rem !important}.pl-sm-3,.px-sm-3{padding-left:1rem !important}.p-sm-4{padding:1.5rem !important}.pt-sm-4,.py-sm-4{padding-top:1.5rem !important}.pr-sm-4,.px-sm-4{padding-right:1.5rem !important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem !important}.pl-sm-4,.px-sm-4{padding-left:1.5rem !important}.p-sm-5{padding:3rem !important}.pt-sm-5,.py-sm-5{padding-top:3rem !important}.pr-sm-5,.px-sm-5{padding-right:3rem !important}.pb-sm-5,.py-sm-5{padding-bottom:3rem !important}.pl-sm-5,.px-sm-5{padding-left:3rem !important}.m-sm-n1{margin:-0.25rem !important}.mt-sm-n1,.my-sm-n1{margin-top:-0.25rem !important}.mr-sm-n1,.mx-sm-n1{margin-right:-0.25rem !important}.mb-sm-n1,.my-sm-n1{margin-bottom:-0.25rem !important}.ml-sm-n1,.mx-sm-n1{margin-left:-0.25rem !important}.m-sm-n2{margin:-0.5rem !important}.mt-sm-n2,.my-sm-n2{margin-top:-0.5rem !important}.mr-sm-n2,.mx-sm-n2{margin-right:-0.5rem !important}.mb-sm-n2,.my-sm-n2{margin-bottom:-0.5rem !important}.ml-sm-n2,.mx-sm-n2{margin-left:-0.5rem !important}.m-sm-n3{margin:-1rem !important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem !important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem !important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem !important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem !important}.m-sm-n4{margin:-1.5rem !important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem !important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem !important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem !important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem !important}.m-sm-n5{margin:-3rem !important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem !important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem !important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem !important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem !important}.m-sm-auto{margin:auto !important}.mt-sm-auto,.my-sm-auto{margin-top:auto !important}.mr-sm-auto,.mx-sm-auto{margin-right:auto !important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto !important}.ml-sm-auto,.mx-sm-auto{margin-left:auto !important}}@media(min-width: 768px){.m-md-0{margin:0 !important}.mt-md-0,.my-md-0{margin-top:0 !important}.mr-md-0,.mx-md-0{margin-right:0 !important}.mb-md-0,.my-md-0{margin-bottom:0 !important}.ml-md-0,.mx-md-0{margin-left:0 !important}.m-md-1{margin:.25rem !important}.mt-md-1,.my-md-1{margin-top:.25rem !important}.mr-md-1,.mx-md-1{margin-right:.25rem !important}.mb-md-1,.my-md-1{margin-bottom:.25rem !important}.ml-md-1,.mx-md-1{margin-left:.25rem !important}.m-md-2{margin:.5rem !important}.mt-md-2,.my-md-2{margin-top:.5rem !important}.mr-md-2,.mx-md-2{margin-right:.5rem !important}.mb-md-2,.my-md-2{margin-bottom:.5rem !important}.ml-md-2,.mx-md-2{margin-left:.5rem !important}.m-md-3{margin:1rem !important}.mt-md-3,.my-md-3{margin-top:1rem !important}.mr-md-3,.mx-md-3{margin-right:1rem !important}.mb-md-3,.my-md-3{margin-bottom:1rem !important}.ml-md-3,.mx-md-3{margin-left:1rem !important}.m-md-4{margin:1.5rem !important}.mt-md-4,.my-md-4{margin-top:1.5rem !important}.mr-md-4,.mx-md-4{margin-right:1.5rem !important}.mb-md-4,.my-md-4{margin-bottom:1.5rem !important}.ml-md-4,.mx-md-4{margin-left:1.5rem !important}.m-md-5{margin:3rem !important}.mt-md-5,.my-md-5{margin-top:3rem !important}.mr-md-5,.mx-md-5{margin-right:3rem !important}.mb-md-5,.my-md-5{margin-bottom:3rem !important}.ml-md-5,.mx-md-5{margin-left:3rem !important}.p-md-0{padding:0 !important}.pt-md-0,.py-md-0{padding-top:0 !important}.pr-md-0,.px-md-0{padding-right:0 !important}.pb-md-0,.py-md-0{padding-bottom:0 !important}.pl-md-0,.px-md-0{padding-left:0 !important}.p-md-1{padding:.25rem !important}.pt-md-1,.py-md-1{padding-top:.25rem !important}.pr-md-1,.px-md-1{padding-right:.25rem !important}.pb-md-1,.py-md-1{padding-bottom:.25rem !important}.pl-md-1,.px-md-1{padding-left:.25rem !important}.p-md-2{padding:.5rem !important}.pt-md-2,.py-md-2{padding-top:.5rem !important}.pr-md-2,.px-md-2{padding-right:.5rem !important}.pb-md-2,.py-md-2{padding-bottom:.5rem !important}.pl-md-2,.px-md-2{padding-left:.5rem !important}.p-md-3{padding:1rem !important}.pt-md-3,.py-md-3{padding-top:1rem !important}.pr-md-3,.px-md-3{padding-right:1rem !important}.pb-md-3,.py-md-3{padding-bottom:1rem !important}.pl-md-3,.px-md-3{padding-left:1rem !important}.p-md-4{padding:1.5rem !important}.pt-md-4,.py-md-4{padding-top:1.5rem !important}.pr-md-4,.px-md-4{padding-right:1.5rem !important}.pb-md-4,.py-md-4{padding-bottom:1.5rem !important}.pl-md-4,.px-md-4{padding-left:1.5rem !important}.p-md-5{padding:3rem !important}.pt-md-5,.py-md-5{padding-top:3rem !important}.pr-md-5,.px-md-5{padding-right:3rem !important}.pb-md-5,.py-md-5{padding-bottom:3rem !important}.pl-md-5,.px-md-5{padding-left:3rem !important}.m-md-n1{margin:-0.25rem !important}.mt-md-n1,.my-md-n1{margin-top:-0.25rem !important}.mr-md-n1,.mx-md-n1{margin-right:-0.25rem !important}.mb-md-n1,.my-md-n1{margin-bottom:-0.25rem !important}.ml-md-n1,.mx-md-n1{margin-left:-0.25rem !important}.m-md-n2{margin:-0.5rem !important}.mt-md-n2,.my-md-n2{margin-top:-0.5rem !important}.mr-md-n2,.mx-md-n2{margin-right:-0.5rem !important}.mb-md-n2,.my-md-n2{margin-bottom:-0.5rem !important}.ml-md-n2,.mx-md-n2{margin-left:-0.5rem !important}.m-md-n3{margin:-1rem !important}.mt-md-n3,.my-md-n3{margin-top:-1rem !important}.mr-md-n3,.mx-md-n3{margin-right:-1rem !important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem !important}.ml-md-n3,.mx-md-n3{margin-left:-1rem !important}.m-md-n4{margin:-1.5rem !important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem !important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem !important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem !important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem !important}.m-md-n5{margin:-3rem !important}.mt-md-n5,.my-md-n5{margin-top:-3rem !important}.mr-md-n5,.mx-md-n5{margin-right:-3rem !important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem !important}.ml-md-n5,.mx-md-n5{margin-left:-3rem !important}.m-md-auto{margin:auto !important}.mt-md-auto,.my-md-auto{margin-top:auto !important}.mr-md-auto,.mx-md-auto{margin-right:auto !important}.mb-md-auto,.my-md-auto{margin-bottom:auto !important}.ml-md-auto,.mx-md-auto{margin-left:auto !important}}@media(min-width: 992px){.m-lg-0{margin:0 !important}.mt-lg-0,.my-lg-0{margin-top:0 !important}.mr-lg-0,.mx-lg-0{margin-right:0 !important}.mb-lg-0,.my-lg-0{margin-bottom:0 !important}.ml-lg-0,.mx-lg-0{margin-left:0 !important}.m-lg-1{margin:.25rem !important}.mt-lg-1,.my-lg-1{margin-top:.25rem !important}.mr-lg-1,.mx-lg-1{margin-right:.25rem !important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem !important}.ml-lg-1,.mx-lg-1{margin-left:.25rem !important}.m-lg-2{margin:.5rem !important}.mt-lg-2,.my-lg-2{margin-top:.5rem !important}.mr-lg-2,.mx-lg-2{margin-right:.5rem !important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem !important}.ml-lg-2,.mx-lg-2{margin-left:.5rem !important}.m-lg-3{margin:1rem !important}.mt-lg-3,.my-lg-3{margin-top:1rem !important}.mr-lg-3,.mx-lg-3{margin-right:1rem !important}.mb-lg-3,.my-lg-3{margin-bottom:1rem !important}.ml-lg-3,.mx-lg-3{margin-left:1rem !important}.m-lg-4{margin:1.5rem !important}.mt-lg-4,.my-lg-4{margin-top:1.5rem !important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem !important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem !important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem !important}.m-lg-5{margin:3rem !important}.mt-lg-5,.my-lg-5{margin-top:3rem !important}.mr-lg-5,.mx-lg-5{margin-right:3rem !important}.mb-lg-5,.my-lg-5{margin-bottom:3rem !important}.ml-lg-5,.mx-lg-5{margin-left:3rem !important}.p-lg-0{padding:0 !important}.pt-lg-0,.py-lg-0{padding-top:0 !important}.pr-lg-0,.px-lg-0{padding-right:0 !important}.pb-lg-0,.py-lg-0{padding-bottom:0 !important}.pl-lg-0,.px-lg-0{padding-left:0 !important}.p-lg-1{padding:.25rem !important}.pt-lg-1,.py-lg-1{padding-top:.25rem !important}.pr-lg-1,.px-lg-1{padding-right:.25rem !important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem !important}.pl-lg-1,.px-lg-1{padding-left:.25rem !important}.p-lg-2{padding:.5rem !important}.pt-lg-2,.py-lg-2{padding-top:.5rem !important}.pr-lg-2,.px-lg-2{padding-right:.5rem !important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem !important}.pl-lg-2,.px-lg-2{padding-left:.5rem !important}.p-lg-3{padding:1rem !important}.pt-lg-3,.py-lg-3{padding-top:1rem !important}.pr-lg-3,.px-lg-3{padding-right:1rem !important}.pb-lg-3,.py-lg-3{padding-bottom:1rem !important}.pl-lg-3,.px-lg-3{padding-left:1rem !important}.p-lg-4{padding:1.5rem !important}.pt-lg-4,.py-lg-4{padding-top:1.5rem !important}.pr-lg-4,.px-lg-4{padding-right:1.5rem !important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem !important}.pl-lg-4,.px-lg-4{padding-left:1.5rem !important}.p-lg-5{padding:3rem !important}.pt-lg-5,.py-lg-5{padding-top:3rem !important}.pr-lg-5,.px-lg-5{padding-right:3rem !important}.pb-lg-5,.py-lg-5{padding-bottom:3rem !important}.pl-lg-5,.px-lg-5{padding-left:3rem !important}.m-lg-n1{margin:-0.25rem !important}.mt-lg-n1,.my-lg-n1{margin-top:-0.25rem !important}.mr-lg-n1,.mx-lg-n1{margin-right:-0.25rem !important}.mb-lg-n1,.my-lg-n1{margin-bottom:-0.25rem !important}.ml-lg-n1,.mx-lg-n1{margin-left:-0.25rem !important}.m-lg-n2{margin:-0.5rem !important}.mt-lg-n2,.my-lg-n2{margin-top:-0.5rem !important}.mr-lg-n2,.mx-lg-n2{margin-right:-0.5rem !important}.mb-lg-n2,.my-lg-n2{margin-bottom:-0.5rem !important}.ml-lg-n2,.mx-lg-n2{margin-left:-0.5rem !important}.m-lg-n3{margin:-1rem !important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem !important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem !important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem !important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem !important}.m-lg-n4{margin:-1.5rem !important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem !important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem !important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem !important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem !important}.m-lg-n5{margin:-3rem !important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem !important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem !important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem !important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem !important}.m-lg-auto{margin:auto !important}.mt-lg-auto,.my-lg-auto{margin-top:auto !important}.mr-lg-auto,.mx-lg-auto{margin-right:auto !important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto !important}.ml-lg-auto,.mx-lg-auto{margin-left:auto !important}}@media(min-width: 1200px){.m-xl-0{margin:0 !important}.mt-xl-0,.my-xl-0{margin-top:0 !important}.mr-xl-0,.mx-xl-0{margin-right:0 !important}.mb-xl-0,.my-xl-0{margin-bottom:0 !important}.ml-xl-0,.mx-xl-0{margin-left:0 !important}.m-xl-1{margin:.25rem !important}.mt-xl-1,.my-xl-1{margin-top:.25rem !important}.mr-xl-1,.mx-xl-1{margin-right:.25rem !important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem !important}.ml-xl-1,.mx-xl-1{margin-left:.25rem !important}.m-xl-2{margin:.5rem !important}.mt-xl-2,.my-xl-2{margin-top:.5rem !important}.mr-xl-2,.mx-xl-2{margin-right:.5rem !important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem !important}.ml-xl-2,.mx-xl-2{margin-left:.5rem !important}.m-xl-3{margin:1rem !important}.mt-xl-3,.my-xl-3{margin-top:1rem !important}.mr-xl-3,.mx-xl-3{margin-right:1rem !important}.mb-xl-3,.my-xl-3{margin-bottom:1rem !important}.ml-xl-3,.mx-xl-3{margin-left:1rem !important}.m-xl-4{margin:1.5rem !important}.mt-xl-4,.my-xl-4{margin-top:1.5rem !important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem !important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem !important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem !important}.m-xl-5{margin:3rem !important}.mt-xl-5,.my-xl-5{margin-top:3rem !important}.mr-xl-5,.mx-xl-5{margin-right:3rem !important}.mb-xl-5,.my-xl-5{margin-bottom:3rem !important}.ml-xl-5,.mx-xl-5{margin-left:3rem !important}.p-xl-0{padding:0 !important}.pt-xl-0,.py-xl-0{padding-top:0 !important}.pr-xl-0,.px-xl-0{padding-right:0 !important}.pb-xl-0,.py-xl-0{padding-bottom:0 !important}.pl-xl-0,.px-xl-0{padding-left:0 !important}.p-xl-1{padding:.25rem !important}.pt-xl-1,.py-xl-1{padding-top:.25rem !important}.pr-xl-1,.px-xl-1{padding-right:.25rem !important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem !important}.pl-xl-1,.px-xl-1{padding-left:.25rem !important}.p-xl-2{padding:.5rem !important}.pt-xl-2,.py-xl-2{padding-top:.5rem !important}.pr-xl-2,.px-xl-2{padding-right:.5rem !important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem !important}.pl-xl-2,.px-xl-2{padding-left:.5rem !important}.p-xl-3{padding:1rem !important}.pt-xl-3,.py-xl-3{padding-top:1rem !important}.pr-xl-3,.px-xl-3{padding-right:1rem !important}.pb-xl-3,.py-xl-3{padding-bottom:1rem !important}.pl-xl-3,.px-xl-3{padding-left:1rem !important}.p-xl-4{padding:1.5rem !important}.pt-xl-4,.py-xl-4{padding-top:1.5rem !important}.pr-xl-4,.px-xl-4{padding-right:1.5rem !important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem !important}.pl-xl-4,.px-xl-4{padding-left:1.5rem !important}.p-xl-5{padding:3rem !important}.pt-xl-5,.py-xl-5{padding-top:3rem !important}.pr-xl-5,.px-xl-5{padding-right:3rem !important}.pb-xl-5,.py-xl-5{padding-bottom:3rem !important}.pl-xl-5,.px-xl-5{padding-left:3rem !important}.m-xl-n1{margin:-0.25rem !important}.mt-xl-n1,.my-xl-n1{margin-top:-0.25rem !important}.mr-xl-n1,.mx-xl-n1{margin-right:-0.25rem !important}.mb-xl-n1,.my-xl-n1{margin-bottom:-0.25rem !important}.ml-xl-n1,.mx-xl-n1{margin-left:-0.25rem !important}.m-xl-n2{margin:-0.5rem !important}.mt-xl-n2,.my-xl-n2{margin-top:-0.5rem !important}.mr-xl-n2,.mx-xl-n2{margin-right:-0.5rem !important}.mb-xl-n2,.my-xl-n2{margin-bottom:-0.5rem !important}.ml-xl-n2,.mx-xl-n2{margin-left:-0.5rem !important}.m-xl-n3{margin:-1rem !important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem !important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem !important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem !important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem !important}.m-xl-n4{margin:-1.5rem !important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem !important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem !important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem !important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem !important}.m-xl-n5{margin:-3rem !important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem !important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem !important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem !important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem !important}.m-xl-auto{margin:auto !important}.mt-xl-auto,.my-xl-auto{margin-top:auto !important}.mr-xl-auto,.mx-xl-auto{margin-right:auto !important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto !important}.ml-xl-auto,.mx-xl-auto{margin-left:auto !important}}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace !important}.text-justify{text-align:justify !important}.text-wrap{white-space:normal !important}.text-nowrap{white-space:nowrap !important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}@media(min-width: 576px){.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}.text-sm-center{text-align:center !important}}@media(min-width: 768px){.text-md-left{text-align:left !important}.text-md-right{text-align:right !important}.text-md-center{text-align:center !important}}@media(min-width: 992px){.text-lg-left{text-align:left !important}.text-lg-right{text-align:right !important}.text-lg-center{text-align:center !important}}@media(min-width: 1200px){.text-xl-left{text-align:left !important}.text-xl-right{text-align:right !important}.text-xl-center{text-align:center !important}}.text-lowercase{text-transform:lowercase !important}.text-uppercase{text-transform:uppercase !important}.text-capitalize{text-transform:capitalize !important}.font-weight-light{font-weight:300 !important}.font-weight-lighter{font-weight:lighter !important}.font-weight-normal{font-weight:400 !important}.font-weight-bold{font-weight:700 !important}.font-weight-bolder{font-weight:bolder !important}.font-italic{font-style:italic !important}.text-white{color:#fff !important}.text-primary{color:#007bff !important}a.text-primary:hover,a.text-primary:focus{color:#0056b3 !important}.text-secondary{color:#6c757d !important}a.text-secondary:hover,a.text-secondary:focus{color:#494f54 !important}.text-success{color:#28a745 !important}a.text-success:hover,a.text-success:focus{color:#19692c !important}.text-info{color:#17a2b8 !important}a.text-info:hover,a.text-info:focus{color:#0f6674 !important}.text-warning{color:#ffc107 !important}a.text-warning:hover,a.text-warning:focus{color:#ba8b00 !important}.text-danger{color:#dc3545 !important}a.text-danger:hover,a.text-danger:focus{color:#a71d2a !important}.text-light{color:#f8f9fa !important}a.text-light:hover,a.text-light:focus{color:#cbd3da !important}.text-dark{color:#343a40 !important}a.text-dark:hover,a.text-dark:focus{color:#121416 !important}.text-body{color:#212529 !important}.text-muted{color:#6c757d !important}.text-black-50{color:rgba(0,0,0,.5) !important}.text-white-50{color:rgba(255,255,255,.5) !important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.text-decoration-none{text-decoration:none !important}.text-break{word-break:break-word !important;overflow-wrap:break-word !important}.text-reset{color:inherit !important}.visible{visibility:visible !important}.invisible{visibility:hidden !important}@media print{*,*::before,*::after{text-shadow:none !important;box-shadow:none !important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap !important}pre,blockquote{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px !important}.container{min-width:992px !important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #dee2e6 !important}.table-dark{color:inherit}.table-dark th,.table-dark td,.table-dark thead th,.table-dark tbody+tbody{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}/*!
  * bootstrap-fileinput v5.0.8
  * http://plugins.krajee.com/file-input
  *
@@ -9947,715 +14,7 @@ h3 {
  *
  * Licensed under the BSD-3-Clause
  * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
- */
-input[type=file].file-loading, .file-loading input[type=file] {
-  width: 0;
-  height: 0;
-}
-
-.file-input-ajax-new .no-browse .input-group-btn, .file-input-ajax-new .fileinput-upload-button, .file-input-ajax-new .fileinput-remove-button, .file-input-new .no-browse .input-group-btn, .file-input-new .fileinput-upload-button, .file-input-new .fileinput-remove-button, .file-input-new .glyphicon-file, .file-input-new .close, .file-input-new .file-preview, .file-zoom-dialog .modal-header:after, .file-zoom-dialog .modal-header:before, .file-caption-icon, .hide-content .kv-file-content, .kv-hidden {
-  display: none;
-}
-
-.file-zoom-dialog .floating-buttons, .file-zoom-dialog .btn-navigate, .krajee-default .file-thumb-progress, .file-preview .fileinput-remove, .file-caption-icon, .btn-file input[type=file], .file-no-browse {
-  position: absolute;
-}
-
-.file-zoom-dialog .modal-dialog, .krajee-default .file-thumbnail-footer, .krajee-default.file-preview-frame, .file-preview, .file-caption, .btn-file, .file-loading:before, .file-input {
-  position: relative;
-}
-
-.krajee-default .file-other-error, .krajee-default .file-actions, .file-error-message ul, .file-error-message pre {
-  text-align: left;
-}
-
-.file-error-message ul, .file-error-message pre {
-  margin: 0;
-}
-
-.krajee-default .file-upload-indicator, .krajee-default .file-drag-handle {
-  float: left;
-  margin-top: 10px;
-  width: 16px;
-  height: 16px;
-}
-
-.krajee-default .file-thumb-progress .progress-bar, .krajee-default .file-thumb-progress .progress {
-  height: 11px;
-  font-size: 9px;
-}
-
-.krajee-default .file-size-info, .krajee-default .file-caption-info {
-  display: block;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  width: 160px;
-  height: 15px;
-  margin: auto;
-}
-
-.file-zoom-content > .file-object.type-image, .file-zoom-content > .file-object.type-flash, .file-zoom-content > .file-object.type-video {
-  max-width: 100%;
-  max-height: 100%;
-  width: auto;
-}
-
-.file-zoom-content > .file-object.type-flash, .file-zoom-content > .file-object.type-video {
-  height: 100%;
-}
-
-.file-zoom-content > .file-object.type-default, .file-zoom-content > .file-object.type-text, .file-zoom-content > .file-object.type-html, .file-zoom-content > .file-object.type-pdf {
-  width: 100%;
-}
-
-.file-no-browse {
-  left: 50%;
-  bottom: 20%;
-  width: 1px;
-  height: 1px;
-  font-size: 0;
-  opacity: 0;
-  border: none;
-  background: none;
-  outline: none;
-  box-shadow: none;
-}
-
-.file-loading:before {
-  content: " Loading...";
-  display: inline-block;
-  padding-left: 20px;
-  line-height: 16px;
-  font-size: 13px;
-  font-variant: small-caps;
-  color: #999;
-  background: transparent url(/images/loading.gif) top left no-repeat;
-}
-
-.file-object {
-  margin: 0 0 -5px 0;
-  padding: 0;
-}
-
-.btn-file {
-  overflow: hidden;
-}
-.btn-file input[type=file] {
-  top: 0;
-  left: 0;
-  min-width: 100%;
-  min-height: 100%;
-  text-align: right;
-  opacity: 0;
-  background: none repeat scroll 0 0 transparent;
-  cursor: inherit;
-  display: block;
-}
-.btn-file ::-ms-browse {
-  font-size: 10000px;
-  width: 100%;
-  height: 100%;
-}
-
-.file-caption .file-caption-name {
-  width: 100%;
-  margin: 0;
-  padding: 0;
-  box-shadow: none;
-  border: none;
-  background: none;
-  outline: none;
-}
-.file-caption.icon-visible .file-caption-icon {
-  display: inline-block;
-}
-.file-caption.icon-visible .file-caption-name {
-  padding-left: 15px;
-}
-
-.file-caption-icon {
-  left: 8px;
-}
-
-.file-error-message {
-  color: #a94442;
-  background-color: #f2dede;
-  margin: 5px;
-  border: 1px solid #ebccd1;
-  border-radius: 4px;
-  padding: 15px;
-}
-.file-error-message pre {
-  margin: 5px 0;
-}
-.file-caption-disabled {
-  background-color: #eee;
-  cursor: not-allowed;
-  opacity: 1;
-}
-
-.file-preview {
-  border-radius: 5px;
-  border: 1px solid #ddd;
-  padding: 8px;
-  width: 100%;
-  margin-bottom: 5px;
-}
-.file-preview .btn-xs {
-  padding: 1px 5px;
-  font-size: 12px;
-  line-height: 1.5;
-  border-radius: 3px;
-}
-.file-preview .fileinput-remove {
-  top: 1px;
-  right: 1px;
-  line-height: 10px;
-}
-.file-preview .clickable {
-  cursor: pointer;
-}
-
-.file-preview-image {
-  font: 40px Impact, Charcoal, sans-serif;
-  color: #28a745;
-}
-
-.krajee-default.file-preview-frame {
-  margin: 8px;
-  border: 1px solid rgba(0, 0, 0, 0.2);
-  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
-  padding: 6px;
-  float: left;
-  text-align: center;
-}
-.krajee-default.file-preview-frame .kv-file-content {
-  width: 213px;
-  height: 160px;
-}
-.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
-  width: 400px;
-}
-.krajee-default.file-preview-frame .file-thumbnail-footer {
-  height: 70px;
-}
-.krajee-default.file-preview-frame:not(.file-preview-error):hover {
-  border: 1px solid rgba(0, 0, 0, 0.3);
-  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
-}
-.krajee-default.file-preview-frame[data-template=audio] .kv-file-content {
-  width: 240px;
-  height: 55px;
-}
-.krajee-default .file-preview-other-frame {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-.krajee-default .file-preview-text {
-  display: block;
-  color: #428bca;
-  border: 1px solid #ddd;
-  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
-  outline: none;
-  padding: 8px;
-  resize: none;
-}
-.krajee-default .file-preview-html {
-  border: 1px solid #ddd;
-  padding: 8px;
-  overflow: auto;
-}
-.krajee-default .file-other-icon {
-  font-size: 6em;
-  line-height: 1;
-}
-.krajee-default .file-footer-buttons {
-  float: right;
-}
-.krajee-default .file-footer-caption {
-  display: block;
-  text-align: center;
-  padding-top: 4px;
-  font-size: 11px;
-  color: #777;
-  margin-bottom: 15px;
-}
-.krajee-default .file-preview-error {
-  opacity: 0.65;
-  box-shadow: none;
-}
-.krajee-default .file-thumb-progress {
-  height: 11px;
-  top: 37px;
-  left: 0;
-  right: 0;
-}
-.krajee-default .file-thumb-progress .progress {
-  color: #ccc;
-}
-.krajee-default .file-thumb-progress .progress-bar {
-  font-family: Verdana, Helvetica, sans-serif;
-}
-.krajee-default.kvsortable-ghost {
-  background: #e1edf7;
-  border: 2px solid #a1abff;
-}
-.krajee-default .file-preview-other:hover {
-  opacity: 0.8;
-}
-.krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
-  color: #000;
-}
-
-.file-upload-stats {
-  font-size: 9px;
-  text-align: center;
-  width: 100%;
-}
-
-.kv-upload-progress .progress {
-  height: 20px;
-  line-height: 20px;
-  margin: 10px 0;
-  overflow: hidden;
-  color: #ccc;
-}
-.kv-upload-progress .progress-bar {
-  height: 20px;
-  font-family: Verdana, Helvetica, sans-serif;
-}
-.kv-upload-progress .file-upload-stats {
-  font-size: 11px;
-  margin: -10px 0 5px;
-}
-
-.file-zoom-dialog .file-other-icon {
-  font-size: 22em;
-  font-size: 50vmin;
-}
-.file-zoom-dialog .modal-dialog {
-  width: auto;
-}
-.file-zoom-dialog .modal-header {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-}
-.file-zoom-dialog .btn-navigate {
-  padding: 0;
-  margin: 0;
-  background: transparent;
-  text-decoration: none;
-  outline: none;
-  opacity: 0.7;
-  top: 45%;
-  font-size: 4em;
-  color: #1c94c4;
-}
-.file-zoom-dialog .btn-navigate:not([disabled]):hover {
-  outline: none;
-  box-shadow: none;
-  opacity: 0.6;
-}
-.file-zoom-dialog .floating-buttons {
-  top: 5px;
-  right: 10px;
-}
-.file-zoom-dialog .btn-navigate[disabled] {
-  opacity: 0.3;
-}
-.file-zoom-dialog .btn-prev {
-  left: 1px;
-}
-.file-zoom-dialog .btn-next {
-  right: 1px;
-}
-.file-zoom-dialog .kv-zoom-title {
-  font-weight: 300;
-  color: #999;
-  max-width: 50%;
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-}
-
-.file-input-new .no-browse .form-control {
-  border-top-right-radius: 4px;
-  border-bottom-right-radius: 4px;
-}
-
-.file-input-ajax-new .no-browse .form-control {
-  border-top-right-radius: 4px;
-  border-bottom-right-radius: 4px;
-}
-
-.file-caption-main {
-  width: 100%;
-}
-
-.file-thumb-loading {
-  background: transparent url(/images/loading.gif) no-repeat scroll center center content-box !important;
-}
-
-.file-drop-zone {
-  border: 1px dashed #aaa;
-  border-radius: 4px;
-  height: 100%;
-  text-align: center;
-  vertical-align: middle;
-  margin: 12px 15px 12px 12px;
-  padding: 5px;
-}
-.file-drop-zone.clickable:hover {
-  border: 2px dashed #999;
-}
-.file-drop-zone.clickable:focus {
-  border: 2px solid #5acde2;
-}
-.file-drop-zone .file-preview-thumbnails {
-  cursor: default;
-}
-
-.file-drop-zone-title {
-  color: #aaa;
-  font-size: 1.6em;
-  padding: 85px 10px;
-  cursor: default;
-}
-
-.file-highlighted {
-  border: 2px dashed #999 !important;
-  background-color: #eee;
-}
-
-.file-uploading {
-  background: url(/images/loading-sm.gif) no-repeat center bottom 10px;
-  opacity: 0.65;
-}
-
-.file-zoom-fullscreen .modal-dialog {
-  min-width: 100%;
-  margin: 0;
-}
-.file-zoom-fullscreen .modal-content {
-  border-radius: 0;
-  box-shadow: none;
-  min-height: 100vh;
-}
-.file-zoom-fullscreen .modal-body {
-  overflow-y: auto;
-}
-
-.floating-buttons {
-  z-index: 3000;
-}
-.floating-buttons .btn-kv {
-  margin-left: 3px;
-  z-index: 3000;
-}
-
-.kv-zoom-actions .btn-kv {
-  margin-left: 3px;
-}
-
-.file-zoom-content {
-  height: 480px;
-  text-align: center;
-}
-.file-zoom-content .file-preview-image {
-  max-height: 100%;
-}
-.file-zoom-content .file-preview-video {
-  max-height: 100%;
-}
-.file-zoom-content > .file-object.type-image {
-  height: auto;
-  min-height: inherit;
-}
-.file-zoom-content > .file-object.type-audio {
-  width: auto;
-  height: 30px;
-}
-@media (min-width: 576px) {
-  .file-zoom-dialog .modal-dialog {
-    max-width: 500px;
-  }
-}
-@media (min-width: 992px) {
-  .file-zoom-dialog .modal-lg {
-    max-width: 800px;
-  }
-}
-@media (max-width: 767px) {
-  .file-preview-thumbnails {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    flex-direction: column;
-  }
-
-  .file-zoom-dialog .modal-header {
-    flex-direction: column;
-  }
-}
-@media (max-width: 350px) {
-  .krajee-default.file-preview-frame:not([data-template=audio]) .kv-file-content {
-    width: 160px;
-  }
-}
-@media (max-width: 420px) {
-  .krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
-    width: 100%;
-  }
-}
-.file-loading[dir=rtl]:before {
-  background: transparent url(/images/loading.gif) top right no-repeat;
-  padding-left: 0;
-  padding-right: 20px;
-}
-
-.file-sortable .file-drag-handle {
-  cursor: move;
-  opacity: 1;
-}
-.file-sortable .file-drag-handle:hover {
-  opacity: 0.7;
-}
-
-.clickable .file-drop-zone-title {
-  cursor: pointer;
-}
-
-.file-preview-initial.sortable-chosen {
-  background-color: #d9edf7;
-}
-
-.toast-title {
-  font-weight: bold;
-}
-
-.toast-message {
-  -ms-word-wrap: break-word;
-  word-wrap: break-word;
-}
-
-.toast-message a,
-.toast-message label {
-  color: #ffffff;
-}
-
-.toast-message a:hover {
-  color: #cccccc;
-  text-decoration: none;
-}
-
-.toast-close-button {
-  position: relative;
-  right: -0.3em;
-  top: -0.3em;
-  float: right;
-  font-size: 20px;
-  font-weight: bold;
-  color: #ffffff;
-  -webkit-text-shadow: 0 1px 0 #ffffff;
-  text-shadow: 0 1px 0 #ffffff;
-  opacity: 0.8;
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
-  filter: alpha(opacity=80);
-}
-
-.toast-close-button:hover,
-.toast-close-button:focus {
-  color: #000000;
-  text-decoration: none;
-  cursor: pointer;
-  opacity: 0.4;
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
-  filter: alpha(opacity=40);
-}
-
-/*Additional properties for button version
- iOS requires the button element instead of an anchor tag.
- If you want the anchor version, it requires `href="#"`.*/
-button.toast-close-button {
-  padding: 0;
-  cursor: pointer;
-  background: transparent;
-  border: 0;
-  -webkit-appearance: none;
-}
-
-.toast-top-center {
-  top: 0;
-  right: 0;
-  width: 100%;
-}
-
-.toast-bottom-center {
-  bottom: 0;
-  right: 0;
-  width: 100%;
-}
-
-.toast-top-full-width {
-  top: 0;
-  right: 0;
-  width: 100%;
-}
-
-.toast-bottom-full-width {
-  bottom: 0;
-  right: 0;
-  width: 100%;
-}
-
-.toast-top-left {
-  top: 12px;
-  left: 12px;
-}
-
-.toast-top-right {
-  top: 12px;
-  right: 12px;
-}
-
-.toast-bottom-right {
-  right: 12px;
-  bottom: 12px;
-}
-
-.toast-bottom-left {
-  bottom: 12px;
-  left: 12px;
-}
-
-#toast-container {
-  position: fixed;
-  z-index: 999999;
-  /*overrides*/
-}
-
-#toast-container * {
-  box-sizing: border-box;
-}
-
-#toast-container > div {
-  position: relative;
-  overflow: hidden;
-  margin: 0 0 6px;
-  padding: 15px 15px 15px 50px;
-  width: 300px;
-  border-radius: 3px 3px 3px 3px;
-  background-position: 15px center;
-  background-repeat: no-repeat;
-  box-shadow: 0 0 12px #999999;
-  color: #ffffff;
-  opacity: 0.8;
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
-  filter: alpha(opacity=80);
-}
-
-#toast-container > div:hover {
-  box-shadow: 0 0 12px #000000;
-  opacity: 1;
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
-  filter: alpha(opacity=100);
-  cursor: pointer;
-}
-
-#toast-container > .toast-info {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
-}
-
-#toast-container > .toast-error {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
-}
-
-#toast-container > .toast-success {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
-}
-
-#toast-container > .toast-warning {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
-}
-
-#toast-container.toast-top-center > div,
-#toast-container.toast-bottom-center > div {
-  width: 300px;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-#toast-container.toast-top-full-width > div,
-#toast-container.toast-bottom-full-width > div {
-  width: 96%;
-  margin-left: auto;
-  margin-right: auto;
-}
-
-.toast {
-  background-color: #030303;
-}
-
-.toast-success {
-  background-color: #51a351;
-}
-
-.toast-error {
-  background-color: #bd362f;
-}
-
-.toast-info {
-  background-color: #2f96b4;
-}
-
-.toast-warning {
-  background-color: #f89406;
-}
-
-.toast-progress {
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  height: 4px;
-  background-color: #000000;
-  opacity: 0.4;
-  -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40);
-  filter: alpha(opacity=40);
-}
-
-/*Responsive Design*/
-@media all and (max-width: 240px) {
-  #toast-container > div {
-    padding: 8px 8px 8px 50px;
-    width: 11em;
-  }
-
-  #toast-container .toast-close-button {
-    right: -0.2em;
-    top: -0.2em;
-  }
-}
-@media all and (min-width: 241px) and (max-width: 480px) {
-  #toast-container > div {
-    padding: 8px 8px 8px 50px;
-    width: 18em;
-  }
-
-  #toast-container .toast-close-button {
-    right: -0.2em;
-    top: -0.2em;
-  }
-}
-@media all and (min-width: 481px) and (max-width: 768px) {
-  #toast-container > div {
-    padding: 15px 15px 15px 50px;
-    width: 25em;
-  }
-}
-/*! =========================================================
+ */input[type=file].file-loading,.file-loading input[type=file]{width:0;height:0}.file-input-ajax-new .no-browse .input-group-btn,.file-input-ajax-new .fileinput-upload-button,.file-input-ajax-new .fileinput-remove-button,.file-input-new .no-browse .input-group-btn,.file-input-new .fileinput-upload-button,.file-input-new .fileinput-remove-button,.file-input-new .glyphicon-file,.file-input-new .close,.file-input-new .file-preview,.file-zoom-dialog .modal-header:after,.file-zoom-dialog .modal-header:before,.file-caption-icon,.hide-content .kv-file-content,.kv-hidden{display:none}.file-zoom-dialog .floating-buttons,.file-zoom-dialog .btn-navigate,.krajee-default .file-thumb-progress,.file-preview .fileinput-remove,.file-caption-icon,.btn-file input[type=file],.file-no-browse{position:absolute}.file-zoom-dialog .modal-dialog,.krajee-default .file-thumbnail-footer,.krajee-default.file-preview-frame,.file-preview,.file-caption,.btn-file,.file-loading:before,.file-input{position:relative}.krajee-default .file-other-error,.krajee-default .file-actions,.file-error-message ul,.file-error-message pre{text-align:left}.file-error-message ul,.file-error-message pre{margin:0}.krajee-default .file-upload-indicator,.krajee-default .file-drag-handle{float:left;margin-top:10px;width:16px;height:16px}.krajee-default .file-thumb-progress .progress-bar,.krajee-default .file-thumb-progress .progress{height:11px;font-size:9px}.krajee-default .file-size-info,.krajee-default .file-caption-info{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:160px;height:15px;margin:auto}.file-zoom-content>.file-object.type-image,.file-zoom-content>.file-object.type-flash,.file-zoom-content>.file-object.type-video{max-width:100%;max-height:100%;width:auto}.file-zoom-content>.file-object.type-flash,.file-zoom-content>.file-object.type-video{height:100%}.file-zoom-content>.file-object.type-default,.file-zoom-content>.file-object.type-text,.file-zoom-content>.file-object.type-html,.file-zoom-content>.file-object.type-pdf{width:100%}.file-no-browse{left:50%;bottom:20%;width:1px;height:1px;font-size:0;opacity:0;border:none;background:none;outline:none;box-shadow:none}.file-loading:before{content:" Loading...";display:inline-block;padding-left:20px;line-height:16px;font-size:13px;font-variant:small-caps;color:#999;background:transparent url(/images/loading.gif) top left no-repeat}.file-object{margin:0 0 -5px 0;padding:0}.btn-file{overflow:hidden}.btn-file input[type=file]{top:0;left:0;min-width:100%;min-height:100%;text-align:right;opacity:0;background:none repeat scroll 0 0 transparent;cursor:inherit;display:block}.btn-file ::-ms-browse{font-size:10000px;width:100%;height:100%}.file-caption .file-caption-name{width:100%;margin:0;padding:0;box-shadow:none;border:none;background:none;outline:none}.file-caption.icon-visible .file-caption-icon{display:inline-block}.file-caption.icon-visible .file-caption-name{padding-left:15px}.file-caption-icon{left:8px}.file-error-message{color:#a94442;background-color:#f2dede;margin:5px;border:1px solid #ebccd1;border-radius:4px;padding:15px}.file-error-message pre{margin:5px 0}.file-caption-disabled{background-color:#eee;cursor:not-allowed;opacity:1}.file-preview{border-radius:5px;border:1px solid #ddd;padding:8px;width:100%;margin-bottom:5px}.file-preview .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.file-preview .fileinput-remove{top:1px;right:1px;line-height:10px}.file-preview .clickable{cursor:pointer}.file-preview-image{font:40px Impact,Charcoal,sans-serif;color:#28a745}.krajee-default.file-preview-frame{margin:8px;border:1px solid rgba(0,0,0,.2);box-shadow:0 0 10px 0 rgba(0,0,0,.2);padding:6px;float:left;text-align:center}.krajee-default.file-preview-frame .kv-file-content{width:213px;height:160px}.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered{width:400px}.krajee-default.file-preview-frame .file-thumbnail-footer{height:70px}.krajee-default.file-preview-frame:not(.file-preview-error):hover{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 10px 0 rgba(0,0,0,.4)}.krajee-default.file-preview-frame[data-template=audio] .kv-file-content{width:240px;height:55px}.krajee-default .file-preview-other-frame{display:flex;align-items:center;justify-content:center}.krajee-default .file-preview-text{display:block;color:#428bca;border:1px solid #ddd;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;outline:none;padding:8px;resize:none}.krajee-default .file-preview-html{border:1px solid #ddd;padding:8px;overflow:auto}.krajee-default .file-other-icon{font-size:6em;line-height:1}.krajee-default .file-footer-buttons{float:right}.krajee-default .file-footer-caption{display:block;text-align:center;padding-top:4px;font-size:11px;color:#777;margin-bottom:15px}.krajee-default .file-preview-error{opacity:.65;box-shadow:none}.krajee-default .file-thumb-progress{height:11px;top:37px;left:0;right:0}.krajee-default .file-thumb-progress .progress{color:#ccc}.krajee-default .file-thumb-progress .progress-bar{font-family:Verdana,Helvetica,sans-serif}.krajee-default.kvsortable-ghost{background:#e1edf7;border:2px solid #a1abff}.krajee-default .file-preview-other:hover{opacity:.8}.krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover{color:#000}.file-upload-stats{font-size:9px;text-align:center;width:100%}.kv-upload-progress .progress{height:20px;line-height:20px;margin:10px 0;overflow:hidden;color:#ccc}.kv-upload-progress .progress-bar{height:20px;font-family:Verdana,Helvetica,sans-serif}.kv-upload-progress .file-upload-stats{font-size:11px;margin:-10px 0 5px}.file-zoom-dialog .file-other-icon{font-size:22em;font-size:50vmin}.file-zoom-dialog .modal-dialog{width:auto}.file-zoom-dialog .modal-header{display:flex;align-items:center;justify-content:space-between}.file-zoom-dialog .btn-navigate{padding:0;margin:0;background:transparent;text-decoration:none;outline:none;opacity:.7;top:45%;font-size:4em;color:#1c94c4}.file-zoom-dialog .btn-navigate:not([disabled]):hover{outline:none;box-shadow:none;opacity:.6}.file-zoom-dialog .floating-buttons{top:5px;right:10px}.file-zoom-dialog .btn-navigate[disabled]{opacity:.3}.file-zoom-dialog .btn-prev{left:1px}.file-zoom-dialog .btn-next{right:1px}.file-zoom-dialog .kv-zoom-title{font-weight:300;color:#999;max-width:50%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-input-new .no-browse .form-control{border-top-right-radius:4px;border-bottom-right-radius:4px}.file-input-ajax-new .no-browse .form-control{border-top-right-radius:4px;border-bottom-right-radius:4px}.file-caption-main{width:100%}.file-thumb-loading{background:transparent url(/images/loading.gif) no-repeat scroll center center content-box !important}.file-drop-zone{border:1px dashed #aaa;border-radius:4px;height:100%;text-align:center;vertical-align:middle;margin:12px 15px 12px 12px;padding:5px}.file-drop-zone.clickable:hover{border:2px dashed #999}.file-drop-zone.clickable:focus{border:2px solid #5acde2}.file-drop-zone .file-preview-thumbnails{cursor:default}.file-drop-zone-title{color:#aaa;font-size:1.6em;padding:85px 10px;cursor:default}.file-highlighted{border:2px dashed #999 !important;background-color:#eee}.file-uploading{background:url(/images/loading-sm.gif) no-repeat center bottom 10px;opacity:.65}.file-zoom-fullscreen .modal-dialog{min-width:100%;margin:0}.file-zoom-fullscreen .modal-content{border-radius:0;box-shadow:none;min-height:100vh}.file-zoom-fullscreen .modal-body{overflow-y:auto}.floating-buttons{z-index:3000}.floating-buttons .btn-kv{margin-left:3px;z-index:3000}.kv-zoom-actions .btn-kv{margin-left:3px}.file-zoom-content{height:480px;text-align:center}.file-zoom-content .file-preview-image{max-height:100%}.file-zoom-content .file-preview-video{max-height:100%}.file-zoom-content>.file-object.type-image{height:auto;min-height:inherit}.file-zoom-content>.file-object.type-audio{width:auto;height:30px}@media(min-width: 576px){.file-zoom-dialog .modal-dialog{max-width:500px}}@media(min-width: 992px){.file-zoom-dialog .modal-lg{max-width:800px}}@media(max-width: 767px){.file-preview-thumbnails{display:flex;justify-content:center;align-items:center;flex-direction:column}.file-zoom-dialog .modal-header{flex-direction:column}}@media(max-width: 350px){.krajee-default.file-preview-frame:not([data-template=audio]) .kv-file-content{width:160px}}@media(max-width: 420px){.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered{width:100%}}.file-loading[dir=rtl]:before{background:transparent url(/images/loading.gif) top right no-repeat;padding-left:0;padding-right:20px}.file-sortable .file-drag-handle{cursor:move;opacity:1}.file-sortable .file-drag-handle:hover{opacity:.7}.clickable .file-drop-zone-title{cursor:pointer}.file-preview-initial.sortable-chosen{background-color:#d9edf7}.toast-title{font-weight:bold}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#fff}.toast-message a:hover{color:#ccc;text-decoration:none}.toast-close-button{position:relative;right:-0.3em;top:-0.3em;float:right;font-size:20px;font-weight:bold;color:#fff;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}.toast-close-button:hover,.toast-close-button:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999}#toast-container *{box-sizing:border-box}#toast-container>div{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;border-radius:3px 3px 3px 3px;background-position:15px center;background-repeat:no-repeat;box-shadow:0 0 12px #999;color:#fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}#toast-container>div:hover{box-shadow:0 0 12px #000;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sU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CbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important}#toast-container>.toast-success{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important}#toast-container>.toast-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important}#toast-container.toast-top-center>div,#toast-container.toast-bottom-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-top-full-width>div,#toast-container.toast-bottom-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width: 240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width: 241px)and (max-width: 480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container .toast-close-button{right:-0.2em;top:-0.2em}}@media all and (min-width: 481px)and (max-width: 768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}}/*! =========================================================
  * bootstrap-slider.js
  *
  * Maintainers:
@@ -10692,984 +51,4 @@ button.toast-close-button {
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  * OTHER DEALINGS IN THE SOFTWARE.
  *
- * ========================================================= */
-.slider {
-  display: inline-block;
-  vertical-align: middle;
-  position: relative;
-}
-.slider.slider-horizontal {
-  width: 210px;
-  height: 20px;
-}
-.slider.slider-horizontal .slider-track {
-  height: 10px;
-  width: 100%;
-  margin-top: -5px;
-  top: 50%;
-  left: 0;
-}
-.slider.slider-horizontal .slider-selection, .slider.slider-horizontal .slider-track-low, .slider.slider-horizontal .slider-track-high {
-  height: 100%;
-  top: 0;
-  bottom: 0;
-}
-.slider.slider-horizontal .slider-tick,
-.slider.slider-horizontal .slider-handle {
-  margin-left: -10px;
-}
-.slider.slider-horizontal .slider-tick.triangle,
-.slider.slider-horizontal .slider-handle.triangle {
-  position: relative;
-  top: 50%;
-  transform: translateY(-50%);
-  border-width: 0 10px 10px 10px;
-  width: 0;
-  height: 0;
-  border-bottom-color: #036fa5;
-  margin-top: 0;
-}
-.slider.slider-horizontal .slider-tick-container {
-  white-space: nowrap;
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 100%;
-}
-.slider.slider-horizontal .slider-tick-label-container {
-  white-space: nowrap;
-  margin-top: 20px;
-}
-.slider.slider-horizontal .slider-tick-label-container .slider-tick-label {
-  display: inline-block;
-  padding-top: 24px;
-  text-align: center;
-}
-.slider.slider-horizontal.slider-rtl .slider-track {
-  left: initial;
-  right: 0;
-}
-.slider.slider-horizontal.slider-rtl .slider-tick,
-.slider.slider-horizontal.slider-rtl .slider-handle {
-  margin-left: initial;
-  margin-right: -10px;
-}
-.slider.slider-horizontal.slider-rtl .slider-tick-container {
-  left: initial;
-  right: 0;
-}
-.slider.slider-vertical {
-  height: 210px;
-  width: 20px;
-}
-.slider.slider-vertical .slider-track {
-  width: 10px;
-  height: 100%;
-  left: 25%;
-  top: 0;
-}
-.slider.slider-vertical .slider-selection {
-  width: 100%;
-  left: 0;
-  top: 0;
-  bottom: 0;
-}
-.slider.slider-vertical .slider-track-low, .slider.slider-vertical .slider-track-high {
-  width: 100%;
-  left: 0;
-  right: 0;
-}
-.slider.slider-vertical .slider-tick,
-.slider.slider-vertical .slider-handle {
-  margin-top: -10px;
-}
-.slider.slider-vertical .slider-tick.triangle,
-.slider.slider-vertical .slider-handle.triangle {
-  border-width: 10px 0 10px 10px;
-  width: 1px;
-  height: 1px;
-  border-left-color: #036fa5;
-  margin-left: 0;
-}
-.slider.slider-vertical .slider-tick-label-container {
-  white-space: nowrap;
-}
-.slider.slider-vertical .slider-tick-label-container .slider-tick-label {
-  padding-left: 4px;
-}
-.slider.slider-vertical.slider-rtl .slider-track {
-  left: initial;
-  right: 25%;
-}
-.slider.slider-vertical.slider-rtl .slider-selection {
-  left: initial;
-  right: 0;
-}
-.slider.slider-vertical.slider-rtl .slider-tick.triangle,
-.slider.slider-vertical.slider-rtl .slider-handle.triangle {
-  border-width: 10px 10px 10px 0;
-}
-.slider.slider-vertical.slider-rtl .slider-tick-label-container .slider-tick-label {
-  padding-left: initial;
-  padding-right: 4px;
-}
-.slider.slider-disabled .slider-handle {
-  background-color: #cfcfcf;
-  background-image: linear-gradient(to bottom, #DFDFDF, #BEBEBE);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#DFDFDF", endColorstr="#BEBEBE",GradientType=0);
-}
-.slider.slider-disabled .slider-track {
-  background-color: #e7e7e7;
-  background-image: linear-gradient(to bottom, #E5E5E5, #E9E9E9);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#E5E5E5", endColorstr="#E9E9E9",GradientType=0);
-  cursor: not-allowed;
-}
-.slider input {
-  display: none;
-}
-.slider .tooltip-inner {
-  white-space: nowrap;
-  max-width: none;
-}
-.slider .tooltip {
-  pointer-events: none;
-}
-.slider .tooltip.top {
-  margin-top: -36px;
-}
-.slider .tooltip-inner {
-  white-space: nowrap;
-  max-width: none;
-}
-.slider .hide {
-  display: none;
-}
-
-.slider-track {
-  background-color: #f7f7f7;
-  background-image: linear-gradient(to bottom, #F5F5F5, #F9F9F9);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#F5F5F5", endColorstr="#F9F9F9",GradientType=0);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-  border-radius: 4px;
-  position: absolute;
-  cursor: pointer;
-}
-
-.slider-selection {
-  background-color: #f7f7f7;
-  background-image: linear-gradient(to bottom, #F9F9F9, #F5F5F5);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#F9F9F9", endColorstr="#F5F5F5",GradientType=0);
-  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-  box-sizing: border-box;
-  border-radius: 4px;
-  position: absolute;
-}
-
-.slider-selection.tick-slider-selection {
-  background-color: #46c1fe;
-  background-image: linear-gradient(to bottom, #52c5ff, #3abcfd);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#52c5ff", endColorstr="#3abcfd",GradientType=0);
-}
-
-.slider-track-low, .slider-track-high {
-  box-sizing: border-box;
-  border-radius: 4px;
-  position: absolute;
-  background: transparent;
-}
-
-.slider-handle {
-  background-color: #0478b2;
-  background-image: linear-gradient(to bottom, #0480BE, #036fa5);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#0480BE", endColorstr="#036fa5",GradientType=0);
-  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-  position: absolute;
-  top: 0;
-  width: 20px;
-  height: 20px;
-  background-color: #0480BE;
-  border: 0px solid transparent;
-}
-.slider-handle:hover {
-  cursor: pointer;
-}
-.slider-handle.round {
-  border-radius: 20px;
-}
-.slider-handle.triangle {
-  background: transparent none;
-}
-.slider-handle.custom {
-  background: transparent none;
-}
-.slider-handle.custom::before {
-  line-height: 20px;
-  font-size: 20px;
-  content: "★";
-  color: #726204;
-}
-
-.slider-tick {
-  background-color: #f7f7f7;
-  background-image: linear-gradient(to bottom, #F5F5F5, #F9F9F9);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#F5F5F5", endColorstr="#F9F9F9",GradientType=0);
-  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-  box-sizing: border-box;
-  position: absolute;
-  cursor: pointer;
-  width: 20px;
-  height: 20px;
-  filter: none;
-  opacity: 0.8;
-  border: 0px solid transparent;
-}
-.slider-tick.round {
-  border-radius: 50%;
-}
-.slider-tick.triangle {
-  background: transparent none;
-}
-.slider-tick.custom {
-  background: transparent none;
-}
-.slider-tick.custom::before {
-  line-height: 20px;
-  font-size: 20px;
-  content: "★";
-  color: #726204;
-}
-.slider-tick.in-selection {
-  background-color: #46c1fe;
-  background-image: linear-gradient(to bottom, #52c5ff, #3abcfd);
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#52c5ff", endColorstr="#3abcfd",GradientType=0);
-  opacity: 1;
-}
-
-html,
-body {
-  height: 100%;
-}
-
-body {
-  font-family: "Source Sans Pro", sans-serif;
-  font-size: 16px;
-  line-height: 1.3em;
-  font-weight: 300;
-}
-
-h1,
-.h1 {
-  font-size: 40px;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-  color: #2C2C2C;
-}
-
-h2,
-.h2 {
-  font-size: 32px;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-  color: #2C2C2C;
-}
-
-h3,
-.h3 {
-  font-size: 24px;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-  color: #2C2C2C;
-}
-
-h4,
-.h4 {
-  font-size: 20px;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-  color: #2C2C2C;
-}
-
-h5,
-.h5 {
-  font-size: 18px;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-  color: #2C2C2C;
-}
-
-h6,
-.h6 {
-  font-size: 16px;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-  color: #2C2C2C;
-}
-
-a {
-  color: #555ec4;
-  font-family: "Source Sans Pro", sans-serif;
-  font-weight: 300;
-}
-
-a:hover {
-  color: #C60B31;
-}
-
-p {
-  color: #B1B1B1;
-  font-family: "Source Sans Pro", sans-serif;
-  font-weight: 300;
-}
-
-label {
-  color: #B1B1B1;
-}
-
-#wrapper {
-  min-height: 100%;
-  height: auto !important;
-  height: 100%;
-  margin: 0 auto -115px;
-  background: #F5F5F5;
-}
-
-.navbar {
-  margin-bottom: 0;
-  border-radius: 0;
-  background-color: #FFFFFF;
-  border: 0;
-  border-bottom: 1px solid #F6F6F6;
-}
-.navbar .navbar-brand img {
-  display: block;
-  width: 170px;
-  height: 29px;
-}
-
-@media (max-width: 767px) {
-  .navbar .navbar-collapse {
-    margin-top: 10px;
-  }
-  .navbar .navbar-collapse .dropdown-menu {
-    border: none;
-    background-color: transparent;
-  }
-}
-.user-form .content {
-  padding-top: 80px;
-  padding-bottom: 50px;
-}
-
-#push,
-.app-footer {
-  height: 115px;
-}
-
-.app-footer {
-  padding: 30px 50px;
-  background: #F9F9F9;
-}
-.app-footer p {
-  margin-bottom: 0;
-  font-size: 14px;
-}
-.app-footer .enjoy {
-  margin-bottom: 5px;
-  font-size: 20px;
-  color: #3B3B3B;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-}
-
-.alert ul {
-  display: block;
-  margin: 0;
-  padding-left: 15px;
-}
-
-input {
-  padding: 15px 15px;
-  background: #FFFFFF;
-  border-radius: 2px;
-  border: 1px solid #E7E7E7;
-  font-size: 16px;
-  line-height: 50px;
-  height: 50px;
-  width: 100%;
-}
-
-input[type=submit] {
-  padding-top: 0;
-  padding-bottom: 0;
-  height: 50px;
-  border-radius: 2px;
-  background: #C60B31;
-  border-color: #C60B31;
-  color: #FFFFFF;
-}
-
-.contact-block {
-  width: 380px;
-  margin: auto;
-  padding: 40px;
-  background-color: #fff;
-  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.07);
-  border-radius: 10px;
-}
-.contact-block h3 {
-  margin-bottom: 20px;
-}
-.contact-block input,
-.contact-block textarea {
-  margin-bottom: 10px;
-}
-.contact-block p {
-  margin: 0;
-}
-
-@media (max-width: 575px) {
-  .contact-block {
-    width: auto;
-  }
-}
-.header-user {
-  margin-left: 5px !important;
-}
-.header-user i {
-  font-size: 24px;
-}
-
-.sign-in-block {
-  width: 380px;
-  margin: auto;
-  padding: 40px;
-  background-color: #fff;
-  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.07);
-  border-radius: 10px;
-}
-.sign-in-block h3 {
-  margin-bottom: 20px;
-}
-.sign-in-block input {
-  margin-bottom: 10px;
-}
-.sign-in-block p {
-  margin: 0;
-}
-.sign-in-block p.forgot-password {
-  padding-bottom: 15px;
-}
-
-@media (max-width: 575px) {
-  .sign-in-block {
-    width: auto;
-  }
-}
-.register-block {
-  width: 380px;
-  margin: auto;
-  padding: 40px;
-  background-color: #fff;
-  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.07);
-  border-radius: 10px;
-}
-.register-block h3 {
-  margin-bottom: 20px;
-}
-.register-block input {
-  margin-bottom: 10px;
-}
-.register-block p {
-  margin: 0;
-}
-.register-block p.terms {
-  padding-bottom: 15px;
-}
-
-@media (max-width: 575px) {
-  .register-block {
-    width: auto;
-  }
-}
-.request-reset-block {
-  width: 380px;
-  margin: auto;
-  padding: 40px;
-  background-color: #fff;
-  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.07);
-  border-radius: 10px;
-}
-.request-reset-block h3 {
-  margin-bottom: 20px;
-}
-.request-reset-block input {
-  margin-bottom: 10px;
-}
-.request-reset-block input[type=submit] {
-  margin-bottom: 0;
-}
-
-@media (max-width: 575px) {
-  .request-reset-block {
-    width: auto;
-  }
-}
-.reset-password-block {
-  width: 380px;
-  margin: auto;
-  padding: 40px;
-  background-color: #fff;
-  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.07);
-  border-radius: 10px;
-}
-.reset-password-block h3 {
-  margin-bottom: 20px;
-}
-.reset-password-block input {
-  margin-bottom: 10px;
-}
-
-@media (max-width: 575px) {
-  .reset-password-block {
-    width: auto;
-  }
-}
-.language-container {
-  position: absolute;
-  top: 75px;
-  right: 20px;
-  display: block;
-}
-.language-container .languages {
-  position: relative;
-  width: 45px;
-}
-.language-container .languages .language-active {
-  display: block;
-  padding-bottom: 5px;
-  width: 50px;
-  cursor: pointer;
-}
-.language-container .languages .language-active img {
-  display: block;
-  float: left;
-  width: 18px;
-  height: 12px;
-}
-.language-container .languages .language-active .language-selector {
-  display: block;
-  float: left;
-  margin-left: 10px;
-  margin-top: 3px;
-  width: 14px;
-  height: 8px;
-  background: url("/images/app/icon/dropdown.png");
-  cursor: pointer;
-}
-.language-container .languages .language-list {
-  display: none;
-  padding: 0;
-  margin: 0;
-}
-.language-container .languages .language-list li {
-  display: block;
-  padding: 5px 5px 5px 0;
-  cursor: pointer;
-}
-.language-container .languages .language-list li img {
-  display: block;
-  float: left;
-  margin-right: 5px;
-  width: 18px;
-  height: 12px;
-}
-.language-container .languages .language-list li span {
-  display: block;
-  float: left;
-  font-size: 12px;
-  line-height: 12px;
-}
-.language-container .languages .language-list li.active,
-.language-container .languages .language-list li:hover {
-  background: #C60B31;
-}
-
-.full-page .language-container {
-  position: absolute;
-  top: 20px;
-  right: 20px;
-}
-
-/** General elements for pages **/
-.page-intro {
-  position: relative;
-  padding: 120px 0;
-  background: #F6F6F6;
-  text-align: center;
-}
-
-.page-intro p {
-  margin: 0 auto;
-  padding-bottom: 20px;
-  font-size: 18px;
-  color: #ABABAB;
-  max-width: 880px;
-}
-
-.page-intro p a {
-  color: #ABABAB;
-}
-
-.page-intro p.welcome {
-  letter-spacing: 5px;
-  text-transform: uppercase;
-  color: #464646;
-  font-size: 20px;
-  font-weight: 400;
-  line-height: 1.3em;
-}
-
-.page-intro h1 {
-  margin-top: 30px;
-  margin-bottom: 40px;
-  font-size: 100px;
-  letter-spacing: 5px;
-}
-
-@media (max-width: 1199px) {
-  .page-intro h1 {
-    font-size: 86px;
-  }
-}
-@media (max-width: 991px) {
-  .page-intro {
-    padding: 100px 0;
-  }
-
-  .page-intro h1 {
-    font-size: 70px;
-  }
-}
-@media (max-width: 768px) {
-  .page-intro {
-    padding: 80px 0 50px 0;
-  }
-
-  .page-intro h1 {
-    font-size: 50px;
-  }
-}
-@media (max-width: 500px) {
-  .page-intro {
-    padding: 80px 0 0 0;
-  }
-
-  .page-intro h1 {
-    font-size: 200%;
-  }
-}
-/** Home page **/
-.home-intro p.welcome {
-  font-size: 26px;
-}
-
-.home-intro h1 {
-  font-size: 80px;
-}
-
-.home-intro .arrow_down {
-  position: absolute;
-  bottom: -102px;
-  left: 0;
-  width: 100%;
-  overflow: hidden;
-  text-align: center;
-}
-
-.home-intro .arrow_down .arrow_down_content {
-  margin: 0 auto;
-  background: url("/images/app/icon/arrow_center.png") no-repeat center center;
-  width: 654px;
-  height: 103px;
-}
-
-@media (max-width: 991px) {
-  .home-intro h1 {
-    font-size: 60px;
-  }
-}
-@media (max-width: 768px) {
-  .home-intro h1 {
-    font-size: 34px;
-  }
-
-  .home-intro .arrow_down .arrow_down_content {
-    width: 100%;
-  }
-}
-.home-list {
-  padding-top: 150px;
-  padding-bottom: 70px;
-  background: #FFFFFF;
-  text-align: center;
-}
-
-.home-list .col-md-4 {
-  padding-bottom: 30px;
-  padding-left: 30px;
-  padding-right: 30px;
-}
-
-.home-list h2 {
-  margin-top: 50px;
-  margin-bottom: 30px;
-}
-
-.home-list h2,
-.home-list h2 a {
-  font-size: 42px;
-  color: #2C2C2C;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-}
-
-.home-list h3 a {
-  font-size: 30px;
-  color: #2C2C2C;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-}
-
-.home-list .card {
-  border: none;
-}
-
-.home-list .accordion > .card:not(:last-of-type) {
-  border-bottom: 1px solid #B8B8B8;
-}
-
-.home-list .card .card-header {
-  background-color: #FFFFFF;
-  text-align: left;
-  border: none;
-  padding: 15px;
-}
-
-.home-list .card .card-header h4 {
-  margin-bottom: 0;
-}
-
-.home-list .card .card-header h4 .btn-link {
-  padding: 0 0 0 30px;
-  font-size: 26px;
-  color: #555ec4;
-  text-decoration: none;
-  font-weight: 300;
-  text-align: left;
-}
-
-.home-list .card .card-header h4 .btn-link[aria-expanded=true] {
-  background: url("/images/app/icon/close.png") no-repeat left center;
-  font-family: "Source Sans Pro", sans-serif;
-}
-
-.home-list .card .card-header h4 .btn-link[aria-expanded=false] {
-  background: url("/images/app/icon/open.png") no-repeat left center;
-  font-family: "Source Sans Pro", sans-serif;
-}
-
-.home-list .card .card-body {
-  text-align: left;
-  padding: 15px;
-}
-
-.home-list .card .card-body ul {
-  padding-left: 20px;
-  margin: 0;
-}
-
-@media (max-width: 1199px) {
-  .home-list h2,
-.home-list h2 a {
-    font-size: 36px;
-  }
-}
-@media (max-width: 767px) {
-  .home-list h3 a {
-    font-size: 26px;
-  }
-
-  .home-list .card .card-header h4 .btn-link {
-    font-size: 20px;
-    line-height: 1.3em;
-  }
-}
-/** About page **/
-.about-list {
-  padding-top: 70px;
-  padding-bottom: 70px;
-  background: #FFFFFF;
-  text-align: center;
-}
-
-.about-list .col-md-12 {
-  padding-bottom: 30px;
-  padding-left: 30px;
-  padding-right: 30px;
-}
-
-.about-list h2 a {
-  font-size: 42px;
-  color: #2C2C2C;
-  font-family: "Montserrat", sans-serif;
-  font-weight: 200;
-}
-
-@media (max-width: 1199px) {
-  .about-list h2 a {
-    font-size: 36px;
-  }
-}
-.error-messages h1 {
-  font-weight: bold;
-  font-size: 150px;
-  margin-bottom: 0;
-}
-.error-messages h2.message {
-  font-weight: bold;
-}
-.error-messages h3.message {
-  font-weight: bold;
-  margin: 30px 0;
-}
-.error-messages p {
-  margin: 20px auto;
-}
-
-@media (max-width: 576px) {
-  .error-messages h1 {
-    font-size: 42px;
-  }
-  .error-messages h2 {
-    font-size: 26px;
-  }
-}
-.my-profile .profile-details-header {
-  padding: 25px 0 15px;
-  border-bottom: 2px solid #f5f6fa;
-}
-.my-profile .profile-details-header h1 {
-  margin: 0;
-  padding: 0;
-  font-size: 24px;
-}
-.my-profile .profile-actions {
-  padding-top: 40px;
-  padding-bottom: 50px;
-}
-.my-profile .profile-actions .actions {
-  margin-bottom: 30px;
-}
-.my-profile .profile-actions .actions .collapse-menu {
-  display: none;
-  padding-bottom: 10px;
-  text-align: right;
-  cursor: pointer;
-  border-bottom: 1px solid #f5f6fa;
-}
-.my-profile .profile-actions .actions .collapse-menu span {
-  display: block;
-  float: left;
-  font-weight: bold;
-}
-.my-profile .profile-actions .actions .collapse-menu i {
-  display: block;
-  padding-top: 5px;
-  margin: 0 auto;
-}
-.my-profile .profile-actions .actions ul {
-  display: block;
-  margin: 0;
-  padding: 0;
-}
-.my-profile .profile-actions .actions ul li {
-  display: block;
-  margin: 0;
-  padding: 10px;
-  border-bottom: 1px solid #f5f6fa;
-}
-.my-profile .profile-actions .actions ul li a {
-  display: block;
-  color: #2C2C2C;
-}
-.my-profile .profile-actions .actions ul li a:hover {
-  text-decoration: none;
-}
-.my-profile .profile-actions .actions ul li:hover,
-.my-profile .profile-actions .actions ul li.active {
-  background-color: #C60B31;
-}
-.my-profile .profile-actions .actions ul li:hover a,
-.my-profile .profile-actions .actions ul li.active a {
-  color: #FFFFFF;
-}
-.my-profile .profile-actions .sub-title {
-  display: block;
-  margin-bottom: 25px;
-  width: 50px;
-  border-bottom: 1px solid #e6e7eb;
-}
-.my-profile .profile-actions .delete-checkbox input {
-  display: block;
-  float: left;
-  margin: 4px 6px 0 0;
-  width: auto;
-  height: auto;
-}
-.my-profile .profile-actions input {
-  margin-bottom: 15px;
-}
-.my-profile .profile-actions input[type=submit] {
-  display: block;
-  margin: 0 0 0 auto;
-  max-width: 140px;
-  background-color: #C60B31;
-}
-.my-profile .profile-actions input.file-caption-name {
-  height: auto;
-  line-height: normal;
-  padding: 15px;
-}
-.my-profile .profile-actions .file-caption-main {
-  margin-bottom: 15px;
-}
-.my-profile .profile-actions .file-caption-main .file-caption {
-  padding: 0;
-  height: 50px;
-  border-radius: 2px;
-}
-.my-profile .profile-actions .file-caption-main .btn-file {
-  background-color: #C60B31;
-  width: 140px;
-  color: #fff;
-  line-height: 20.8px;
-  padding: 15px;
-  height: 50px;
-}
-
-@media (max-width: 767px) {
-  .my-profile .profile-actions .actions .collapse-menu {
-    display: block;
-  }
-  .my-profile .profile-actions .actions ul {
-    display: none;
-  }
-}
\ No newline at end of file
+ * ========================================================= */.slider{display:inline-block;vertical-align:middle;position:relative}.slider.slider-horizontal{width:210px;height:20px}.slider.slider-horizontal .slider-track{height:10px;width:100%;margin-top:-5px;top:50%;left:0}.slider.slider-horizontal .slider-selection,.slider.slider-horizontal .slider-track-low,.slider.slider-horizontal .slider-track-high{height:100%;top:0;bottom:0}.slider.slider-horizontal .slider-tick,.slider.slider-horizontal .slider-handle{margin-left:-10px}.slider.slider-horizontal .slider-tick.triangle,.slider.slider-horizontal .slider-handle.triangle{position:relative;top:50%;transform:translateY(-50%);border-width:0 10px 10px 10px;width:0;height:0;border-bottom-color:#036fa5;margin-top:0}.slider.slider-horizontal .slider-tick-container{white-space:nowrap;position:absolute;top:0;left:0;width:100%}.slider.slider-horizontal .slider-tick-label-container{white-space:nowrap;margin-top:20px}.slider.slider-horizontal .slider-tick-label-container .slider-tick-label{display:inline-block;padding-top:24px;text-align:center}.slider.slider-horizontal.slider-rtl .slider-track{left:initial;right:0}.slider.slider-horizontal.slider-rtl .slider-tick,.slider.slider-horizontal.slider-rtl .slider-handle{margin-left:initial;margin-right:-10px}.slider.slider-horizontal.slider-rtl .slider-tick-container{left:initial;right:0}.slider.slider-vertical{height:210px;width:20px}.slider.slider-vertical .slider-track{width:10px;height:100%;left:25%;top:0}.slider.slider-vertical .slider-selection{width:100%;left:0;top:0;bottom:0}.slider.slider-vertical .slider-track-low,.slider.slider-vertical .slider-track-high{width:100%;left:0;right:0}.slider.slider-vertical .slider-tick,.slider.slider-vertical .slider-handle{margin-top:-10px}.slider.slider-vertical .slider-tick.triangle,.slider.slider-vertical .slider-handle.triangle{border-width:10px 0 10px 10px;width:1px;height:1px;border-left-color:#036fa5;margin-left:0}.slider.slider-vertical .slider-tick-label-container{white-space:nowrap}.slider.slider-vertical .slider-tick-label-container .slider-tick-label{padding-left:4px}.slider.slider-vertical.slider-rtl .slider-track{left:initial;right:25%}.slider.slider-vertical.slider-rtl .slider-selection{left:initial;right:0}.slider.slider-vertical.slider-rtl .slider-tick.triangle,.slider.slider-vertical.slider-rtl .slider-handle.triangle{border-width:10px 10px 10px 0}.slider.slider-vertical.slider-rtl .slider-tick-label-container .slider-tick-label{padding-left:initial;padding-right:4px}.slider.slider-disabled .slider-handle{background-color:#cfcfcf;background-image:linear-gradient(to bottom, #DFDFDF, #BEBEBE);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#DFDFDF", endColorstr="#BEBEBE",GradientType=0)}.slider.slider-disabled .slider-track{background-color:#e7e7e7;background-image:linear-gradient(to bottom, #E5E5E5, #E9E9E9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#E5E5E5", endColorstr="#E9E9E9",GradientType=0);cursor:not-allowed}.slider input{display:none}.slider .tooltip-inner{white-space:nowrap;max-width:none}.slider .tooltip{pointer-events:none}.slider .tooltip.top{margin-top:-36px}.slider .tooltip-inner{white-space:nowrap;max-width:none}.slider .hide{display:none}.slider-track{background-color:#f7f7f7;background-image:linear-gradient(to bottom, #F5F5F5, #F9F9F9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#F5F5F5", endColorstr="#F9F9F9",GradientType=0);box-shadow:inset 0 1px 2px rgba(0,0,0,.1);border-radius:4px;position:absolute;cursor:pointer}.slider-selection{background-color:#f7f7f7;background-image:linear-gradient(to bottom, #F9F9F9, #F5F5F5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#F9F9F9", endColorstr="#F5F5F5",GradientType=0);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-sizing:border-box;border-radius:4px;position:absolute}.slider-selection.tick-slider-selection{background-color:#46c1fe;background-image:linear-gradient(to bottom, #52c5ff, #3abcfd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#52c5ff", endColorstr="#3abcfd",GradientType=0)}.slider-track-low,.slider-track-high{box-sizing:border-box;border-radius:4px;position:absolute;background:transparent}.slider-handle{background-color:#0478b2;background-image:linear-gradient(to bottom, #0480BE, #036fa5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0480BE", endColorstr="#036fa5",GradientType=0);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);position:absolute;top:0;width:20px;height:20px;background-color:#0480be;border:0px solid transparent}.slider-handle:hover{cursor:pointer}.slider-handle.round{border-radius:20px}.slider-handle.triangle{background:transparent none}.slider-handle.custom{background:transparent none}.slider-handle.custom::before{line-height:20px;font-size:20px;content:"★";color:#726204}.slider-tick{background-color:#f7f7f7;background-image:linear-gradient(to bottom, #F5F5F5, #F9F9F9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#F5F5F5", endColorstr="#F9F9F9",GradientType=0);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-sizing:border-box;position:absolute;cursor:pointer;width:20px;height:20px;filter:none;opacity:.8;border:0px solid transparent}.slider-tick.round{border-radius:50%}.slider-tick.triangle{background:transparent none}.slider-tick.custom{background:transparent none}.slider-tick.custom::before{line-height:20px;font-size:20px;content:"★";color:#726204}.slider-tick.in-selection{background-color:#46c1fe;background-image:linear-gradient(to bottom, #52c5ff, #3abcfd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#52c5ff", endColorstr="#3abcfd",GradientType=0);opacity:1}html,body{height:100%}body{font-family:"Source Sans Pro",sans-serif;font-size:16px;line-height:1.3em;font-weight:300}h1,.h1{font-size:40px;font-family:"Montserrat",sans-serif;font-weight:200;color:#2c2c2c}h2,.h2{font-size:32px;font-family:"Montserrat",sans-serif;font-weight:200;color:#2c2c2c}h3,.h3{font-size:24px;font-family:"Montserrat",sans-serif;font-weight:200;color:#2c2c2c}h4,.h4{font-size:20px;font-family:"Montserrat",sans-serif;font-weight:200;color:#2c2c2c}h5,.h5{font-size:18px;font-family:"Montserrat",sans-serif;font-weight:200;color:#2c2c2c}h6,.h6{font-size:16px;font-family:"Montserrat",sans-serif;font-weight:200;color:#2c2c2c}a{color:#555ec4;font-family:"Source Sans Pro",sans-serif;font-weight:300}a:hover{color:#c60b31}p{color:#b1b1b1;font-family:"Source Sans Pro",sans-serif;font-weight:300}label{color:#b1b1b1}#wrapper{min-height:100%;height:auto !important;height:100%;margin:0 auto -115px;background:#f5f5f5}.navbar{margin-bottom:0;border-radius:0;background-color:#fff;border:0;border-bottom:1px solid #f6f6f6}.navbar .navbar-brand img{display:block;width:170px;height:29px}@media(max-width: 767px){.navbar .navbar-collapse{margin-top:10px}.navbar .navbar-collapse .dropdown-menu{border:none;background-color:transparent}}.user-form .content{padding-top:80px;padding-bottom:50px}#push,.app-footer{height:115px}.app-footer{padding:30px 50px;background:#f9f9f9}.app-footer p{margin-bottom:0;font-size:14px}.app-footer .enjoy{margin-bottom:5px;font-size:20px;color:#3b3b3b;font-family:"Montserrat",sans-serif;font-weight:200}.alert ul{display:block;margin:0;padding-left:15px}input{padding:15px 15px;background:#fff;border-radius:2px;border:1px solid #e7e7e7;font-size:16px;line-height:50px;height:50px;width:100%}input[type=submit]{padding-top:0;padding-bottom:0;height:50px;border-radius:2px;background:#c60b31;border-color:#c60b31;color:#fff}.contact-block{width:380px;margin:auto;padding:40px;background-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.07);border-radius:10px}.contact-block h3{margin-bottom:20px}.contact-block input,.contact-block textarea{margin-bottom:10px}.contact-block p{margin:0}@media(max-width: 575px){.contact-block{width:auto}}.header-user{margin-left:5px !important}.header-user i{font-size:24px}.sign-in-block{width:380px;margin:auto;padding:40px;background-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.07);border-radius:10px}.sign-in-block h3{margin-bottom:20px}.sign-in-block input{margin-bottom:10px}.sign-in-block p{margin:0}.sign-in-block p.forgot-password{padding-bottom:15px}@media(max-width: 575px){.sign-in-block{width:auto}}.register-block{width:380px;margin:auto;padding:40px;background-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.07);border-radius:10px}.register-block h3{margin-bottom:20px}.register-block input{margin-bottom:10px}.register-block p{margin:0}.register-block p.terms{padding-bottom:15px}@media(max-width: 575px){.register-block{width:auto}}.request-reset-block{width:380px;margin:auto;padding:40px;background-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.07);border-radius:10px}.request-reset-block h3{margin-bottom:20px}.request-reset-block input{margin-bottom:10px}.request-reset-block input[type=submit]{margin-bottom:0}@media(max-width: 575px){.request-reset-block{width:auto}}.reset-password-block{width:380px;margin:auto;padding:40px;background-color:#fff;box-shadow:0 4px 8px 0 rgba(0,0,0,.07);border-radius:10px}.reset-password-block h3{margin-bottom:20px}.reset-password-block input{margin-bottom:10px}@media(max-width: 575px){.reset-password-block{width:auto}}.language-container{position:absolute;top:75px;right:20px;display:block}.language-container .languages{position:relative;width:45px}.language-container .languages .language-active{display:block;padding-bottom:5px;width:50px;cursor:pointer}.language-container .languages .language-active img{display:block;float:left;width:18px;height:12px}.language-container .languages .language-active .language-selector{display:block;float:left;margin-left:10px;margin-top:3px;width:14px;height:8px;background:url("/images/app/icon/dropdown.png");cursor:pointer}.language-container .languages .language-list{display:none;padding:0;margin:0}.language-container .languages .language-list li{display:block;padding:5px 5px 5px 0;cursor:pointer}.language-container .languages .language-list li img{display:block;float:left;margin-right:5px;width:18px;height:12px}.language-container .languages .language-list li span{display:block;float:left;font-size:12px;line-height:12px}.language-container .languages .language-list li.active,.language-container .languages .language-list li:hover{background:#c60b31}.full-page .language-container{position:absolute;top:20px;right:20px}.page-intro{position:relative;padding:120px 0;background:#f6f6f6;text-align:center}.page-intro p{margin:0 auto;padding-bottom:20px;font-size:18px;color:#ababab;max-width:880px}.page-intro p a{color:#ababab}.page-intro p.welcome{letter-spacing:5px;text-transform:uppercase;color:#464646;font-size:20px;font-weight:400;line-height:1.3em}.page-intro h1{margin-top:30px;margin-bottom:40px;font-size:100px;letter-spacing:5px}@media(max-width: 1199px){.page-intro h1{font-size:86px}}@media(max-width: 991px){.page-intro{padding:100px 0}.page-intro h1{font-size:70px}}@media(max-width: 768px){.page-intro{padding:80px 0 50px 0}.page-intro h1{font-size:50px}}@media(max-width: 500px){.page-intro{padding:80px 0 0 0}.page-intro h1{font-size:200%}}.home-intro p.welcome{font-size:26px}.home-intro h1{font-size:80px}.home-intro .arrow_down{position:absolute;bottom:-102px;left:0;width:100%;overflow:hidden;text-align:center}.home-intro .arrow_down .arrow_down_content{margin:0 auto;background:url("/images/app/icon/arrow_center.png") no-repeat center center;width:654px;height:103px}@media(max-width: 991px){.home-intro h1{font-size:60px}}@media(max-width: 768px){.home-intro h1{font-size:34px}.home-intro .arrow_down .arrow_down_content{width:100%}}.home-list{padding-top:150px;padding-bottom:70px;background:#fff;text-align:center}.home-list .col-md-4{padding-bottom:30px;padding-left:30px;padding-right:30px}.home-list h2{margin-top:50px;margin-bottom:30px}.home-list h2,.home-list h2 a{font-size:42px;color:#2c2c2c;font-family:"Montserrat",sans-serif;font-weight:200}.home-list h3 a{font-size:30px;color:#2c2c2c;font-family:"Montserrat",sans-serif;font-weight:200}.home-list .card{border:none}.home-list .accordion>.card:not(:last-of-type){border-bottom:1px solid #b8b8b8}.home-list .card .card-header{background-color:#fff;text-align:left;border:none;padding:15px}.home-list .card .card-header h4{margin-bottom:0}.home-list .card .card-header h4 .btn-link{padding:0 0 0 30px;font-size:26px;color:#555ec4;text-decoration:none;font-weight:300;text-align:left}.home-list .card .card-header h4 .btn-link[aria-expanded=true]{background:url("/images/app/icon/close.png") no-repeat left center;font-family:"Source Sans Pro",sans-serif}.home-list .card .card-header h4 .btn-link[aria-expanded=false]{background:url("/images/app/icon/open.png") no-repeat left center;font-family:"Source Sans Pro",sans-serif}.home-list .card .card-body{text-align:left;padding:15px}.home-list .card .card-body ul{padding-left:20px;margin:0}@media(max-width: 1199px){.home-list h2,.home-list h2 a{font-size:36px}}@media(max-width: 767px){.home-list h3 a{font-size:26px}.home-list .card .card-header h4 .btn-link{font-size:20px;line-height:1.3em}}.about-list{padding-top:70px;padding-bottom:70px;background:#fff;text-align:center}.about-list .col-md-12{padding-bottom:30px;padding-left:30px;padding-right:30px}.about-list h2 a{font-size:42px;color:#2c2c2c;font-family:"Montserrat",sans-serif;font-weight:200}@media(max-width: 1199px){.about-list h2 a{font-size:36px}}.error-messages h1{font-weight:bold;font-size:150px;margin-bottom:0}.error-messages h2.message{font-weight:bold}.error-messages h3.message{font-weight:bold;margin:30px 0}.error-messages p{margin:20px auto}@media(max-width: 576px){.error-messages h1{font-size:42px}.error-messages h2{font-size:26px}}.my-profile .profile-details-header{padding:25px 0 15px;border-bottom:2px solid #f5f6fa}.my-profile .profile-details-header h1{margin:0;padding:0;font-size:24px}.my-profile .profile-actions{padding-top:40px;padding-bottom:50px}.my-profile .profile-actions .actions{margin-bottom:30px}.my-profile .profile-actions .actions .collapse-menu{display:none;padding-bottom:10px;text-align:right;cursor:pointer;border-bottom:1px solid #f5f6fa}.my-profile .profile-actions .actions .collapse-menu span{display:block;float:left;font-weight:bold}.my-profile .profile-actions .actions .collapse-menu i{display:block;padding-top:5px;margin:0 auto}.my-profile .profile-actions .actions ul{display:block;margin:0;padding:0}.my-profile .profile-actions .actions ul li{display:block;margin:0;padding:10px;border-bottom:1px solid #f5f6fa}.my-profile .profile-actions .actions ul li a{display:block;color:#2c2c2c}.my-profile .profile-actions .actions ul li a:hover{text-decoration:none}.my-profile .profile-actions .actions ul li:hover,.my-profile .profile-actions .actions ul li.active{background-color:#c60b31}.my-profile .profile-actions .actions ul li:hover a,.my-profile .profile-actions .actions ul li.active a{color:#fff}.my-profile .profile-actions .sub-title{display:block;margin-bottom:25px;width:50px;border-bottom:1px solid #e6e7eb}.my-profile .profile-actions .delete-checkbox input{display:block;float:left;margin:4px 6px 0 0;width:auto;height:auto}.my-profile .profile-actions input{margin-bottom:15px}.my-profile .profile-actions input[type=submit]{display:block;margin:0 0 0 auto;max-width:140px;background-color:#c60b31}.my-profile .profile-actions input.file-caption-name{height:auto;line-height:normal;padding:15px}.my-profile .profile-actions .file-caption-main{margin-bottom:15px}.my-profile .profile-actions .file-caption-main .file-caption{padding:0;height:50px;border-radius:2px}.my-profile .profile-actions .file-caption-main .btn-file{background-color:#c60b31;width:140px;color:#fff;line-height:20.8px;padding:15px;height:50px}.remember-me-checkbox input{display:block;float:left;margin:4px 6px 10px 0;width:auto;height:auto}@media(max-width: 767px){.my-profile .profile-actions .actions .collapse-menu{display:block}.my-profile .profile-actions .actions ul{display:none}}
\ No newline at end of file
diff --git a/public/js/app.js b/public/js/app.js
index d0f05dcb..8d601813 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -1,250 +1,76 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ 	// The module cache
-/******/ 	var installedModules = {};
-/******/
-/******/ 	// The require function
-/******/ 	function __webpack_require__(moduleId) {
-/******/
-/******/ 		// Check if module is in cache
-/******/ 		if(installedModules[moduleId]) {
-/******/ 			return installedModules[moduleId].exports;
-/******/ 		}
-/******/ 		// Create a new module (and put it into the cache)
-/******/ 		var module = installedModules[moduleId] = {
-/******/ 			i: moduleId,
-/******/ 			l: false,
-/******/ 			exports: {}
-/******/ 		};
-/******/
-/******/ 		// Execute the module function
-/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ 		// Flag the module as loaded
-/******/ 		module.l = true;
-/******/
-/******/ 		// Return the exports of the module
-/******/ 		return module.exports;
-/******/ 	}
-/******/
-/******/
-/******/ 	// expose the modules object (__webpack_modules__)
-/******/ 	__webpack_require__.m = modules;
-/******/
-/******/ 	// expose the module cache
-/******/ 	__webpack_require__.c = installedModules;
-/******/
-/******/ 	// define getter function for harmony exports
-/******/ 	__webpack_require__.d = function(exports, name, getter) {
-/******/ 		if(!__webpack_require__.o(exports, name)) {
-/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ 		}
-/******/ 	};
-/******/
-/******/ 	// define __esModule on exports
-/******/ 	__webpack_require__.r = function(exports) {
-/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ 		}
-/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
-/******/ 	};
-/******/
-/******/ 	// create a fake namespace object
-/******/ 	// mode & 1: value is a module id, require it
-/******/ 	// mode & 2: merge all properties of value into the ns
-/******/ 	// mode & 4: return value when already ns object
-/******/ 	// mode & 8|1: behave like require
-/******/ 	__webpack_require__.t = function(value, mode) {
-/******/ 		if(mode & 1) value = __webpack_require__(value);
-/******/ 		if(mode & 8) return value;
-/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ 		var ns = Object.create(null);
-/******/ 		__webpack_require__.r(ns);
-/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ 		return ns;
-/******/ 	};
-/******/
-/******/ 	// getDefaultExport function for compatibility with non-harmony modules
-/******/ 	__webpack_require__.n = function(module) {
-/******/ 		var getter = module && module.__esModule ?
-/******/ 			function getDefault() { return module['default']; } :
-/******/ 			function getModuleExports() { return module; };
-/******/ 		__webpack_require__.d(getter, 'a', getter);
-/******/ 		return getter;
-/******/ 	};
-/******/
-/******/ 	// Object.prototype.hasOwnProperty.call
-/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ 	// __webpack_public_path__
-/******/ 	__webpack_require__.p = "/";
-/******/
-/******/
-/******/ 	// Load entry module and return exports
-/******/ 	return __webpack_require__(__webpack_require__.s = "./App/assets/js/index.js");
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ "../node_modules/bootstrap-fileinput/js/fileinput.js":
-/*!***********************************************************!*\
-  !*** ../node_modules/bootstrap-fileinput/js/fileinput.js ***!
-  \***********************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\r\n * bootstrap-fileinput v5.0.8\r\n * http://plugins.krajee.com/file-input\r\n *\r\n * Author: Kartik Visweswaran\r\n * Copyright: 2014 - 2019, Kartik Visweswaran, Krajee.com\r\n *\r\n * Licensed under the BSD-3-Clause\r\n * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md\r\n */\r\n(function (factory) {\r\n    'use strict';\r\n    //noinspection JSUnresolvedVariable\r\n    if (true) { // jshint ignore:line\r\n        // AMD. Register as an anonymous module.\r\n        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"../node_modules/jquery/dist/jquery.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // jshint ignore:line\r\n    } else {}\r\n}(function ($) {\r\n    'use strict';\r\n\r\n    $.fn.fileinputLocales = {};\r\n    $.fn.fileinputThemes = {};\r\n\r\n    String.prototype.setTokens = function (replacePairs) {\r\n        var str = this.toString(), key, re;\r\n        for (key in replacePairs) {\r\n            if (replacePairs.hasOwnProperty(key)) {\r\n                re = new RegExp('\\{' + key + '\\}', 'g');\r\n                str = str.replace(re, replacePairs[key]);\r\n            }\r\n        }\r\n        return str;\r\n    };\r\n\r\n    var $h, FileInput;\r\n\r\n    // fileinput helper object for all global variables and internal helper methods\r\n    //noinspection JSUnresolvedVariable\r\n    $h = {\r\n        FRAMES: '.kv-preview-thumb',\r\n        SORT_CSS: 'file-sortable',\r\n        INIT_FLAG: 'init-',\r\n        OBJECT_PARAMS: '<param name=\"controller\" value=\"true\" />\\n' +\r\n            '<param name=\"allowFullScreen\" value=\"true\" />\\n' +\r\n            '<param name=\"allowScriptAccess\" value=\"always\" />\\n' +\r\n            '<param name=\"autoPlay\" value=\"false\" />\\n' +\r\n            '<param name=\"autoStart\" value=\"false\" />\\n' +\r\n            '<param name=\"quality\" value=\"high\" />\\n',\r\n        DEFAULT_PREVIEW: '<div class=\"file-preview-other\">\\n' +\r\n            '<span class=\"{previewFileIconClass}\">{previewFileIcon}</span>\\n' +\r\n            '</div>',\r\n        MODAL_ID: 'kvFileinputModal',\r\n        MODAL_EVENTS: ['show', 'shown', 'hide', 'hidden', 'loaded'],\r\n        logMessages: {\r\n            ajaxError: '{status}: {error}. Error Details: {text}.',\r\n            badDroppedFiles: 'Error scanning dropped files!',\r\n            badExifParser: 'Error loading the piexif.js library. {details}',\r\n            badInputType: 'The input \"type\" must be set to \"file\" for initializing the \"bootstrap-fileinput\" plugin.',\r\n            exifWarning: 'To avoid this warning, either set \"autoOrientImage\" to \"false\" OR ensure you have loaded ' +\r\n                'the \"piexif.js\" library correctly on your page before the \"fileinput.js\" script.',\r\n            invalidChunkSize: 'Invalid upload chunk size: \"{chunkSize}\". Resumable uploads are disabled.',\r\n            invalidThumb: 'Invalid thumb frame with id: \"{id}\".',\r\n            noResumableSupport: 'The browser does not support resumable or chunk uploads.',\r\n            noUploadUrl: 'The \"uploadUrl\" is not set. Ajax uploads and resumable uploads have been disabled.',\r\n            retryStatus: 'Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.'\r\n        },\r\n        objUrl: window.URL || window.webkitURL,\r\n        now: function () {\r\n            return new Date();\r\n        },\r\n        round: function (num) {\r\n            num = parseFloat(num);\r\n            return isNaN(num) ? 0 : Math.floor(Math.round(num));\r\n        },\r\n        getFileRelativePath: function (file) {\r\n            /** @namespace file.relativePath */\r\n            /** @namespace file.webkitRelativePath */\r\n            return String(file.relativePath || file.webkitRelativePath || $h.getFileName(file) || null);\r\n\r\n        },\r\n        getFileId: function (file, generateFileId) {\r\n            var relativePath = $h.getFileRelativePath(file);\r\n            if (typeof generateFileId === 'function') {\r\n                return generateFileId(file);\r\n            }\r\n            if (!file) {\r\n                return null;\r\n            }\r\n            if (!relativePath) {\r\n                return null;\r\n            }\r\n            return (file.size + '_' + relativePath.replace(/\\s/img, '_'));\r\n        },\r\n        getFrameSelector: function (id, selector) {\r\n            selector = selector || '';\r\n            return '[id=\"' + id + '\"]' + selector;\r\n        },\r\n        getZoomSelector: function (id, selector) {\r\n            selector = selector || '';\r\n            return '[id=\"zoom-' + id + '\"]' + selector;\r\n        },\r\n        getFrameElement: function ($element, id, selector) {\r\n            return $element.find($h.getFrameSelector(id, selector));\r\n        },\r\n        getZoomElement: function ($element, id, selector) {\r\n            return $element.find($h.getZoomSelector(id, selector));\r\n        },\r\n        getElapsed: function (seconds) {\r\n            var delta = seconds, out = '', result = {}, structure = {\r\n                year: 31536000,\r\n                month: 2592000,\r\n                week: 604800, // uncomment row to ignore\r\n                day: 86400,   // feel free to add your own row\r\n                hour: 3600,\r\n                minute: 60,\r\n                second: 1\r\n            };\r\n            Object.keys(structure).forEach(function (key) {\r\n                result[key] = Math.floor(delta / structure[key]);\r\n                delta -= result[key] * structure[key];\r\n            });\r\n            $.each(result, function (key, value) {\r\n                if (value > 0) {\r\n                    out += (out ? ' ' : '') + value + key.substring(0, 1);\r\n                }\r\n            });\r\n            return out;\r\n        },\r\n        debounce: function (func, delay) {\r\n            var inDebounce;\r\n            return function () {\r\n                var args = arguments, context = this;\r\n                clearTimeout(inDebounce);\r\n                inDebounce = setTimeout(function () {\r\n                    func.apply(context, args);\r\n                }, delay);\r\n            };\r\n        },\r\n        stopEvent: function (e) {\r\n            e.stopPropagation();\r\n            e.preventDefault();\r\n        },\r\n        getFileName: function (file) {\r\n            /** @namespace file.fileName */\r\n            return file ? (file.fileName || file.name || '') : ''; // some confusion in different versions of Firefox\r\n        },\r\n        createObjectURL: function (data) {\r\n            if ($h.objUrl && $h.objUrl.createObjectURL && data) {\r\n                return $h.objUrl.createObjectURL(data);\r\n            }\r\n            return '';\r\n        },\r\n        revokeObjectURL: function (data) {\r\n            if ($h.objUrl && $h.objUrl.revokeObjectURL && data) {\r\n                $h.objUrl.revokeObjectURL(data);\r\n            }\r\n        },\r\n        compare: function (input, str, exact) {\r\n            return input !== undefined && (exact ? input === str : input.match(str));\r\n        },\r\n        isIE: function (ver) {\r\n            var div, status;\r\n            // check for IE versions < 11\r\n            if (navigator.appName !== 'Microsoft Internet Explorer') {\r\n                return false;\r\n            }\r\n            if (ver === 10) {\r\n                return new RegExp('msie\\\\s' + ver, 'i').test(navigator.userAgent);\r\n            }\r\n            div = document.createElement('div');\r\n            div.innerHTML = '<!--[if IE ' + ver + ']> <i></i> <![endif]-->';\r\n            status = div.getElementsByTagName('i').length;\r\n            document.body.appendChild(div);\r\n            div.parentNode.removeChild(div);\r\n            return status;\r\n        },\r\n        canAssignFilesToInput: function () {\r\n            var input = document.createElement('input');\r\n            try {\r\n                input.type = 'file';\r\n                input.files = null;\r\n                return true;\r\n            } catch (err) {\r\n                return false;\r\n            }\r\n        },\r\n        getDragDropFolders: function (items) {\r\n            var i, item, len = items ? items.length : 0, folders = 0;\r\n            if (len > 0 && items[0].webkitGetAsEntry()) {\r\n                for (i = 0; i < len; i++) {\r\n                    item = items[i].webkitGetAsEntry();\r\n                    if (item && item.isDirectory) {\r\n                        folders++;\r\n                    }\r\n                }\r\n            }\r\n            return folders;\r\n        },\r\n        initModal: function ($modal) {\r\n            var $body = $('body');\r\n            if ($body.length) {\r\n                $modal.appendTo($body);\r\n            }\r\n        },\r\n        isFunction: function (v) {\r\n            return typeof v === 'function';\r\n        },\r\n        isEmpty: function (value, trim) {\r\n            return value === undefined || value === null || (!$h.isFunction(\r\n                value) && (value.length === 0 || (trim && $.trim(value) === '')));\r\n        },\r\n        isArray: function (a) {\r\n            return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';\r\n        },\r\n        ifSet: function (needle, haystack, def) {\r\n            def = def || '';\r\n            return (haystack && typeof haystack === 'object' && needle in haystack) ? haystack[needle] : def;\r\n        },\r\n        cleanArray: function (arr) {\r\n            if (!(arr instanceof Array)) {\r\n                arr = [];\r\n            }\r\n            return arr.filter(function (e) {\r\n                return (e !== undefined && e !== null);\r\n            });\r\n        },\r\n        spliceArray: function (arr, index, reverseOrder) {\r\n            var i, j = 0, out = [], newArr;\r\n            if (!(arr instanceof Array)) {\r\n                return [];\r\n            }\r\n            newArr = $.extend(true, [], arr);\r\n            if (reverseOrder) {\r\n                newArr.reverse();\r\n            }\r\n            for (i = 0; i < newArr.length; i++) {\r\n                if (i !== index) {\r\n                    out[j] = newArr[i];\r\n                    j++;\r\n                }\r\n            }\r\n            if (reverseOrder) {\r\n                out.reverse();\r\n            }\r\n            return out;\r\n        },\r\n        getNum: function (num, def) {\r\n            def = def || 0;\r\n            if (typeof num === 'number') {\r\n                return num;\r\n            }\r\n            if (typeof num === 'string') {\r\n                num = parseFloat(num);\r\n            }\r\n            return isNaN(num) ? def : num;\r\n        },\r\n        hasFileAPISupport: function () {\r\n            return !!(window.File && window.FileReader);\r\n        },\r\n        hasDragDropSupport: function () {\r\n            var div = document.createElement('div');\r\n            /** @namespace div.draggable */\r\n            /** @namespace div.ondragstart */\r\n            /** @namespace div.ondrop */\r\n            return !$h.isIE(9) &&\r\n                (div.draggable !== undefined || (div.ondragstart !== undefined && div.ondrop !== undefined));\r\n        },\r\n        hasFileUploadSupport: function () {\r\n            return $h.hasFileAPISupport() && window.FormData;\r\n        },\r\n        hasBlobSupport: function () {\r\n            try {\r\n                return !!window.Blob && Boolean(new Blob());\r\n            } catch (e) {\r\n                return false;\r\n            }\r\n        },\r\n        hasArrayBufferViewSupport: function () {\r\n            try {\r\n                return new Blob([new Uint8Array(100)]).size === 100;\r\n            } catch (e) {\r\n                return false;\r\n            }\r\n        },\r\n        hasResumableUploadSupport: function () {\r\n            /** @namespace Blob.prototype.webkitSlice */\r\n            /** @namespace Blob.prototype.mozSlice */\r\n            return $h.hasFileUploadSupport() && $h.hasBlobSupport() && $h.hasArrayBufferViewSupport() &&\r\n                (!!Blob.prototype.webkitSlice || !!Blob.prototype.mozSlice || !!Blob.prototype.slice || false);\r\n        },\r\n        dataURI2Blob: function (dataURI) {\r\n            //noinspection JSUnresolvedVariable\r\n            var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder ||\r\n                window.MSBlobBuilder, canBlob = $h.hasBlobSupport(), byteStr, arrayBuffer, intArray, i, mimeStr, bb,\r\n                canProceed = (canBlob || BlobBuilder) && window.atob && window.ArrayBuffer && window.Uint8Array;\r\n            if (!canProceed) {\r\n                return null;\r\n            }\r\n            if (dataURI.split(',')[0].indexOf('base64') >= 0) {\r\n                byteStr = atob(dataURI.split(',')[1]);\r\n            } else {\r\n                byteStr = decodeURIComponent(dataURI.split(',')[1]);\r\n            }\r\n            arrayBuffer = new ArrayBuffer(byteStr.length);\r\n            intArray = new Uint8Array(arrayBuffer);\r\n            for (i = 0; i < byteStr.length; i += 1) {\r\n                intArray[i] = byteStr.charCodeAt(i);\r\n            }\r\n            mimeStr = dataURI.split(',')[0].split(':')[1].split(';')[0];\r\n            if (canBlob) {\r\n                return new Blob([$h.hasArrayBufferViewSupport() ? intArray : arrayBuffer], {type: mimeStr});\r\n            }\r\n            bb = new BlobBuilder();\r\n            bb.append(arrayBuffer);\r\n            return bb.getBlob(mimeStr);\r\n        },\r\n        arrayBuffer2String: function (buffer) {\r\n            //noinspection JSUnresolvedVariable\r\n            if (window.TextDecoder) {\r\n                // noinspection JSUnresolvedFunction\r\n                return new TextDecoder('utf-8').decode(buffer);\r\n            }\r\n            var array = Array.prototype.slice.apply(new Uint8Array(buffer)), out = '', i = 0, len, c, char2, char3;\r\n            len = array.length;\r\n            while (i < len) {\r\n                c = array[i++];\r\n                switch (c >> 4) { // jshint ignore:line\r\n                    case 0:\r\n                    case 1:\r\n                    case 2:\r\n                    case 3:\r\n                    case 4:\r\n                    case 5:\r\n                    case 6:\r\n                    case 7:\r\n                        // 0xxxxxxx\r\n                        out += String.fromCharCode(c);\r\n                        break;\r\n                    case 12:\r\n                    case 13:\r\n                        // 110x xxxx   10xx xxxx\r\n                        char2 = array[i++];\r\n                        out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F)); // jshint ignore:line\r\n                        break;\r\n                    case 14:\r\n                        // 1110 xxxx  10xx xxxx  10xx xxxx\r\n                        char2 = array[i++];\r\n                        char3 = array[i++];\r\n                        out += String.fromCharCode(((c & 0x0F) << 12) | // jshint ignore:line\r\n                            ((char2 & 0x3F) << 6) |  // jshint ignore:line\r\n                            ((char3 & 0x3F) << 0)); // jshint ignore:line\r\n                        break;\r\n                }\r\n            }\r\n            return out;\r\n        },\r\n        isHtml: function (str) {\r\n            var a = document.createElement('div');\r\n            a.innerHTML = str;\r\n            for (var c = a.childNodes, i = c.length; i--;) {\r\n                if (c[i].nodeType === 1) {\r\n                    return true;\r\n                }\r\n            }\r\n            return false;\r\n        },\r\n        isSvg: function (str) {\r\n            return str.match(/^\\s*<\\?xml/i) && (str.match(/<!DOCTYPE svg/i) || str.match(/<svg/i));\r\n        },\r\n        getMimeType: function (signature, contents, type) {\r\n            switch (signature) {\r\n                case 'ffd8ffe0':\r\n                case 'ffd8ffe1':\r\n                case 'ffd8ffe2':\r\n                    return 'image/jpeg';\r\n                case '89504E47':\r\n                    return 'image/png';\r\n                case '47494638':\r\n                    return 'image/gif';\r\n                case '49492a00':\r\n                    return 'image/tiff';\r\n                case '52494646':\r\n                    return 'image/webp';\r\n                case '66747970':\r\n                    return 'video/3gp';\r\n                case '4f676753':\r\n                    return 'video/ogg';\r\n                case '1a45dfa3':\r\n                    return 'video/mkv';\r\n                case '000001ba':\r\n                case '000001b3':\r\n                    return 'video/mpeg';\r\n                case '3026b275':\r\n                    return 'video/wmv';\r\n                case '25504446':\r\n                    return 'application/pdf';\r\n                case '25215053':\r\n                    return 'application/ps';\r\n                case '504b0304':\r\n                case '504b0506':\r\n                case '504b0508':\r\n                    return 'application/zip';\r\n                case '377abcaf':\r\n                    return 'application/7z';\r\n                case '75737461':\r\n                    return 'application/tar';\r\n                case '7801730d':\r\n                    return 'application/dmg';\r\n                default:\r\n                    switch (signature.substring(0, 6)) {\r\n                        case '435753':\r\n                            return 'application/x-shockwave-flash';\r\n                        case '494433':\r\n                            return 'audio/mp3';\r\n                        case '425a68':\r\n                            return 'application/bzip';\r\n                        default:\r\n                            switch (signature.substring(0, 4)) {\r\n                                case '424d':\r\n                                    return 'image/bmp';\r\n                                case 'fffb':\r\n                                    return 'audio/mp3';\r\n                                case '4d5a':\r\n                                    return 'application/exe';\r\n                                case '1f9d':\r\n                                case '1fa0':\r\n                                    return 'application/zip';\r\n                                case '1f8b':\r\n                                    return 'application/gzip';\r\n                                default:\r\n                                    return contents && !contents.match(\r\n                                        /[^\\u0000-\\u007f]/) ? 'application/text-plain' : type;\r\n                            }\r\n                    }\r\n            }\r\n        },\r\n        addCss: function ($el, css) {\r\n            $el.removeClass(css).addClass(css);\r\n        },\r\n        getElement: function (options, param, value) {\r\n            return ($h.isEmpty(options) || $h.isEmpty(options[param])) ? value : $(options[param]);\r\n        },\r\n        uniqId: function () {\r\n            return Math.round(new Date().getTime()) + '_' + Math.round(Math.random() * 100);\r\n        },\r\n        htmlEncode: function (str, undefVal) {\r\n            if (str === undefined) {\r\n                return undefVal || null;\r\n            }\r\n            return str.replace(/&/g, '&amp;')\r\n                .replace(/</g, '&lt;')\r\n                .replace(/>/g, '&gt;')\r\n                .replace(/\"/g, '&quot;')\r\n                .replace(/'/g, '&apos;');\r\n        },\r\n        replaceTags: function (str, tags) {\r\n            var out = str;\r\n            if (!tags) {\r\n                return out;\r\n            }\r\n            $.each(tags, function (key, value) {\r\n                if (typeof value === 'function') {\r\n                    value = value();\r\n                }\r\n                out = out.split(key).join(value);\r\n            });\r\n            return out;\r\n        },\r\n        cleanMemory: function ($thumb) {\r\n            var data = $thumb.is('img') ? $thumb.attr('src') : $thumb.find('source').attr('src');\r\n            $h.revokeObjectURL(data);\r\n        },\r\n        findFileName: function (filePath) {\r\n            var sepIndex = filePath.lastIndexOf('/');\r\n            if (sepIndex === -1) {\r\n                sepIndex = filePath.lastIndexOf('\\\\');\r\n            }\r\n            return filePath.split(filePath.substring(sepIndex, sepIndex + 1)).pop();\r\n        },\r\n        checkFullScreen: function () {\r\n            //noinspection JSUnresolvedVariable\r\n            return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ||\r\n                document.msFullscreenElement;\r\n        },\r\n        toggleFullScreen: function (maximize) {\r\n            var doc = document, de = doc.documentElement;\r\n            if (de && maximize && !$h.checkFullScreen()) {\r\n                /** @namespace document.requestFullscreen */\r\n                /** @namespace document.msRequestFullscreen */\r\n                /** @namespace document.mozRequestFullScreen */\r\n                /** @namespace document.webkitRequestFullscreen */\r\n                /** @namespace Element.ALLOW_KEYBOARD_INPUT */\r\n                if (de.requestFullscreen) {\r\n                    de.requestFullscreen();\r\n                } else {\r\n                    if (de.msRequestFullscreen) {\r\n                        de.msRequestFullscreen();\r\n                    } else {\r\n                        if (de.mozRequestFullScreen) {\r\n                            de.mozRequestFullScreen();\r\n                        } else {\r\n                            if (de.webkitRequestFullscreen) {\r\n                                de.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            } else {\r\n                /** @namespace document.exitFullscreen */\r\n                /** @namespace document.msExitFullscreen */\r\n                /** @namespace document.mozCancelFullScreen */\r\n                /** @namespace document.webkitExitFullscreen */\r\n                if (doc.exitFullscreen) {\r\n                    doc.exitFullscreen();\r\n                } else {\r\n                    if (doc.msExitFullscreen) {\r\n                        doc.msExitFullscreen();\r\n                    } else {\r\n                        if (doc.mozCancelFullScreen) {\r\n                            doc.mozCancelFullScreen();\r\n                        } else {\r\n                            if (doc.webkitExitFullscreen) {\r\n                                doc.webkitExitFullscreen();\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        moveArray: function (arr, oldIndex, newIndex, reverseOrder) {\r\n            var newArr = $.extend(true, [], arr);\r\n            if (reverseOrder) {\r\n                newArr.reverse();\r\n            }\r\n            if (newIndex >= newArr.length) {\r\n                var k = newIndex - newArr.length;\r\n                while ((k--) + 1) {\r\n                    newArr.push(undefined);\r\n                }\r\n            }\r\n            newArr.splice(newIndex, 0, newArr.splice(oldIndex, 1)[0]);\r\n            if (reverseOrder) {\r\n                newArr.reverse();\r\n            }\r\n            return newArr;\r\n        },\r\n        cleanZoomCache: function ($el) {\r\n            var $cache = $el.closest('.kv-zoom-cache-theme');\r\n            if (!$cache.length) {\r\n                $cache = $el.closest('.kv-zoom-cache');\r\n            }\r\n            $cache.remove();\r\n        },\r\n        closeButton: function (css) {\r\n            css = css ? 'close ' + css : 'close';\r\n            return '<button type=\"button\" class=\"' + css + '\" aria-label=\"Close\">\\n' +\r\n                '  <span aria-hidden=\"true\">&times;</span>\\n' +\r\n                '</button>';\r\n        },\r\n        getRotation: function (value) {\r\n            switch (value) {\r\n                case 2:\r\n                    return 'rotateY(180deg)';\r\n                case 3:\r\n                    return 'rotate(180deg)';\r\n                case 4:\r\n                    return 'rotate(180deg) rotateY(180deg)';\r\n                case 5:\r\n                    return 'rotate(270deg) rotateY(180deg)';\r\n                case 6:\r\n                    return 'rotate(90deg)';\r\n                case 7:\r\n                    return 'rotate(90deg) rotateY(180deg)';\r\n                case 8:\r\n                    return 'rotate(270deg)';\r\n                default:\r\n                    return '';\r\n            }\r\n        },\r\n        setTransform: function (el, val) {\r\n            if (!el) {\r\n                return;\r\n            }\r\n            el.style.transform = val;\r\n            el.style.webkitTransform = val;\r\n            el.style['-moz-transform'] = val;\r\n            el.style['-ms-transform'] = val;\r\n            el.style['-o-transform'] = val;\r\n        }\r\n    };\r\n    FileInput = function (element, options) {\r\n        var self = this;\r\n        self.$element = $(element);\r\n        self.$parent = self.$element.parent();\r\n        if (!self._validate()) {\r\n            return;\r\n        }\r\n        self.isPreviewable = $h.hasFileAPISupport();\r\n        self.isIE9 = $h.isIE(9);\r\n        self.isIE10 = $h.isIE(10);\r\n        if (self.isPreviewable || self.isIE9) {\r\n            self._init(options);\r\n            self._listen();\r\n        }\r\n        self.$element.removeClass('file-loading');\r\n    };\r\n    //noinspection JSUnusedGlobalSymbols\r\n    FileInput.prototype = {\r\n        constructor: FileInput,\r\n        _cleanup: function () {\r\n            var self = this;\r\n            self.reader = null;\r\n            self.clearFileStack();\r\n            self.fileBatchCompleted = true;\r\n            self.isError = false;\r\n            self.cancelling = false;\r\n            self.paused = false;\r\n            self.lastProgress = 0;\r\n            self._initAjax();\r\n        },\r\n        _initAjax: function () {\r\n            var self = this;\r\n            self.ajaxQueue = [];\r\n            self.ajaxRequests = [];\r\n            self.ajaxQueueIntervalId = null;\r\n            self.ajaxCurrentThreads = 0;\r\n            self.ajaxAborted = false;\r\n        },\r\n        _init: function (options, refreshMode) {\r\n            var self = this, f, $el = self.$element, $cont, t, tmp;\r\n            self.options = options;\r\n            $.each(options, function (key, value) {\r\n                switch (key) {\r\n                    case 'minFileCount':\r\n                    case 'maxFileCount':\r\n                    case 'maxTotalFileCount':\r\n                    case 'minFileSize':\r\n                    case 'maxFileSize':\r\n                    case 'maxFilePreviewSize':\r\n                    case 'resizeImageQuality':\r\n                    case 'resizeIfSizeMoreThan':\r\n                    case 'progressUploadThreshold':\r\n                    case 'initialPreviewCount':\r\n                    case 'zoomModalHeight':\r\n                    case 'minImageHeight':\r\n                    case 'maxImageHeight':\r\n                    case 'minImageWidth':\r\n                    case 'maxImageWidth':\r\n                        self[key] = $h.getNum(value);\r\n                        break;\r\n                    default:\r\n                        self[key] = value;\r\n                        break;\r\n                }\r\n            });\r\n            if (self.maxTotalFileCount > 0 && self.maxTotalFileCount < self.maxFileCount) {\r\n                self.maxTotalFileCount = self.maxFileCount;\r\n            }\r\n            if (self.rtl) { // swap buttons for rtl\r\n                tmp = self.previewZoomButtonIcons.prev;\r\n                self.previewZoomButtonIcons.prev = self.previewZoomButtonIcons.next;\r\n                self.previewZoomButtonIcons.next = tmp;\r\n            }\r\n            // validate chunk threads to not exceed maxAjaxThreads\r\n            if (!isNaN(self.maxAjaxThreads) && self.maxAjaxThreads < self.resumableUploadOptions.maxThreads) {\r\n                self.resumableUploadOptions.maxThreads = self.maxAjaxThreads;\r\n            }\r\n            self._initFileManager();\r\n            if (typeof self.autoOrientImage === 'function') {\r\n                self.autoOrientImage = self.autoOrientImage();\r\n            }\r\n            if (typeof self.autoOrientImageInitial === 'function') {\r\n                self.autoOrientImageInitial = self.autoOrientImageInitial();\r\n            }\r\n            if (!refreshMode) {\r\n                self._cleanup();\r\n            }\r\n            self.duplicateErrors = [];\r\n            self.$form = $el.closest('form');\r\n            self._initTemplateDefaults();\r\n            self.uploadFileAttr = !$h.isEmpty($el.attr('name')) ? $el.attr('name') : 'file_data';\r\n            t = self._getLayoutTemplate('progress');\r\n            self.progressTemplate = t.replace('{class}', self.progressClass);\r\n            self.progressInfoTemplate = t.replace('{class}', self.progressInfoClass);\r\n            self.progressPauseTemplate = t.replace('{class}', self.progressPauseClass);\r\n            self.progressCompleteTemplate = t.replace('{class}', self.progressCompleteClass);\r\n            self.progressErrorTemplate = t.replace('{class}', self.progressErrorClass);\r\n            self.isDisabled = $el.attr('disabled') || $el.attr('readonly');\r\n            if (self.isDisabled) {\r\n                $el.attr('disabled', true);\r\n            }\r\n            self.isClickable = self.browseOnZoneClick && self.showPreview &&\r\n                (self.dropZoneEnabled || !$h.isEmpty(self.defaultPreviewContent));\r\n            self.isAjaxUpload = $h.hasFileUploadSupport() && !$h.isEmpty(self.uploadUrl);\r\n            self.dropZoneEnabled = $h.hasDragDropSupport() && self.dropZoneEnabled;\r\n            if (!self.isAjaxUpload) {\r\n                self.dropZoneEnabled = self.dropZoneEnabled && $h.canAssignFilesToInput();\r\n            }\r\n            self.slug = typeof options.slugCallback === 'function' ? options.slugCallback : self._slugDefault;\r\n            self.mainTemplate = self.showCaption ? self._getLayoutTemplate('main1') : self._getLayoutTemplate('main2');\r\n            self.captionTemplate = self._getLayoutTemplate('caption');\r\n            self.previewGenericTemplate = self._getPreviewTemplate('generic');\r\n            if (!self.imageCanvas && self.resizeImage && (self.maxImageWidth || self.maxImageHeight)) {\r\n                self.imageCanvas = document.createElement('canvas');\r\n                self.imageCanvasContext = self.imageCanvas.getContext('2d');\r\n            }\r\n            if ($h.isEmpty($el.attr('id'))) {\r\n                $el.attr('id', $h.uniqId());\r\n            }\r\n            self.namespace = '.fileinput_' + $el.attr('id').replace(/-/g, '_');\r\n            if (self.$container === undefined) {\r\n                self.$container = self._createContainer();\r\n            } else {\r\n                self._refreshContainer();\r\n            }\r\n            $cont = self.$container;\r\n            self.$dropZone = $cont.find('.file-drop-zone');\r\n            self.$progress = $cont.find('.kv-upload-progress');\r\n            self.$btnUpload = $cont.find('.fileinput-upload');\r\n            self.$captionContainer = $h.getElement(options, 'elCaptionContainer', $cont.find('.file-caption'));\r\n            self.$caption = $h.getElement(options, 'elCaptionText', $cont.find('.file-caption-name'));\r\n            if (!$h.isEmpty(self.msgPlaceholder)) {\r\n                f = $el.attr('multiple') ? self.filePlural : self.fileSingle;\r\n                self.$caption.attr('placeholder', self.msgPlaceholder.replace('{files}', f));\r\n            }\r\n            self.$captionIcon = self.$captionContainer.find('.file-caption-icon');\r\n            self.$previewContainer = $h.getElement(options, 'elPreviewContainer', $cont.find('.file-preview'));\r\n            self.$preview = $h.getElement(options, 'elPreviewImage', $cont.find('.file-preview-thumbnails'));\r\n            self.$previewStatus = $h.getElement(options, 'elPreviewStatus', $cont.find('.file-preview-status'));\r\n            self.$errorContainer = $h.getElement(options, 'elErrorContainer',\r\n                self.$previewContainer.find('.kv-fileinput-error'));\r\n            self._validateDisabled();\r\n            if (!$h.isEmpty(self.msgErrorClass)) {\r\n                $h.addCss(self.$errorContainer, self.msgErrorClass);\r\n            }\r\n            if (!refreshMode) {\r\n                self.$errorContainer.hide();\r\n                self.previewInitId = 'thumb-' + $el.attr('id');\r\n                self._initPreviewCache();\r\n                self._initPreview(true);\r\n                self._initPreviewActions();\r\n                if (self.$parent.hasClass('file-loading')) {\r\n                    self.$container.insertBefore(self.$parent);\r\n                    self.$parent.remove();\r\n                }\r\n            } else {\r\n                if (!self._errorsExist()) {\r\n                    self.$errorContainer.hide();\r\n                }\r\n            }\r\n            self._setFileDropZoneTitle();\r\n            if ($el.attr('disabled')) {\r\n                self.disable();\r\n            }\r\n            self._initZoom();\r\n            if (self.hideThumbnailContent) {\r\n                $h.addCss(self.$preview, 'hide-content');\r\n            }\r\n        },\r\n        _initFileManager: function () {\r\n            var self = this;\r\n            self.fileManager = {\r\n                stack: {},\r\n                processed: [],\r\n                errors: [],\r\n                loadedImages: {},\r\n                totalImages: 0,\r\n                totalFiles: null,\r\n                totalSize: null,\r\n                uploadedSize: 0,\r\n                stats: {},\r\n                initStats: function (id) {\r\n                    var data = {started: $h.now().getTime()};\r\n                    if (id) {\r\n                        self.fileManager.stats[id] = data;\r\n                    } else {\r\n                        self.fileManager.stats = data;\r\n                    }\r\n                },\r\n                getUploadStats: function (id, loaded, total) {\r\n                    var fm = self.fileManager, started = id ? fm.stats[id] && fm.stats[id].started || null : null;\r\n                    if (!started) {\r\n                        started = $h.now().getTime();\r\n                    }\r\n                    var elapsed = ($h.now().getTime() - started) / 1000,\r\n                        speeds = ['B/s', 'KB/s', 'MB/s', 'GB/s', 'TB/s', 'PB/s', 'EB/s', 'ZB/s', 'YB/s'],\r\n                        bps = elapsed ? loaded / elapsed : 0, bitrate = self._getSize(bps, speeds),\r\n                        pendingBytes = total - loaded,\r\n                        out = {\r\n                            fileId: id,\r\n                            started: started,\r\n                            elapsed: elapsed,\r\n                            loaded: loaded,\r\n                            total: total,\r\n                            bps: bps,\r\n                            bitrate: bitrate,\r\n                            pendingBytes: pendingBytes\r\n                        };\r\n                    if (id) {\r\n                        fm.stats[id] = out;\r\n                    } else {\r\n                        fm.stats = out;\r\n                    }\r\n                    return out;\r\n                },\r\n                exists: function (id) {\r\n                    return $.inArray(id, self.fileManager.getIdList()) !== -1;\r\n                },\r\n                count: function () {\r\n                    return self.fileManager.getIdList().length;\r\n                },\r\n                total: function () {\r\n                    var fm = self.fileManager;\r\n                    if (!fm.totalFiles) {\r\n                        fm.totalFiles = fm.count();\r\n                    }\r\n                    return fm.totalFiles;\r\n                },\r\n                getTotalSize: function () {\r\n                    var fm = self.fileManager;\r\n                    if (fm.totalSize) {\r\n                        return fm.totalSize;\r\n                    }\r\n                    fm.totalSize = 0;\r\n                    $.each(self.fileManager.stack, function (id, f) {\r\n                        var size = parseFloat(f.size);\r\n                        fm.totalSize += isNaN(size) ? 0 : size;\r\n                    });\r\n                    return fm.totalSize;\r\n                },\r\n                add: function (file, id) {\r\n                    if (!id) {\r\n                        id = self.fileManager.getId(file);\r\n                    }\r\n                    if (!id) {\r\n                        return;\r\n                    }\r\n                    self.fileManager.stack[id] = {\r\n                        file: file,\r\n                        name: $h.getFileName(file),\r\n                        relativePath: $h.getFileRelativePath(file),\r\n                        size: file.size,\r\n                        nameFmt: self._getFileName(file, ''),\r\n                        sizeFmt: self._getSize(file.size)\r\n                    };\r\n                },\r\n                remove: function ($thumb) {\r\n                    var id = $thumb.attr('data-fileid');\r\n                    if (id) {\r\n                        self.fileManager.removeFile(id);\r\n                    }\r\n                },\r\n                removeFile: function (id) {\r\n                    delete self.fileManager.stack[id];\r\n                    delete self.fileManager.loadedImages[id];\r\n                },\r\n                move: function (idFrom, idTo) {\r\n                    var result = {}, stack = self.fileManager.stack;\r\n                    if (!idFrom && !idTo || idFrom === idTo) {\r\n                        return;\r\n                    }\r\n                    $.each(stack, function (k, v) {\r\n                        if (k !== idFrom) {\r\n                            result[k] = v;\r\n                        }\r\n                        if (k === idTo) {\r\n                            result[idFrom] = stack[idFrom];\r\n                        }\r\n                    });\r\n                    self.fileManager.stack = result;\r\n                },\r\n                list: function () {\r\n                    var files = [];\r\n                    $.each(self.fileManager.stack, function (k, v) {\r\n                        if (v && v.file) {\r\n                            files.push(v.file);\r\n                        }\r\n                    });\r\n                    return files;\r\n                },\r\n                isPending: function (id) {\r\n                    return $.inArray(id, self.fileManager.processed) === -1 && self.fileManager.exists(id);\r\n                },\r\n                isProcessed: function () {\r\n                    var processed = true, fm = self.fileManager;\r\n                    $.each(fm.stack, function (id) {\r\n                        if (fm.isPending(id)) {\r\n                            processed = false;\r\n                        }\r\n                    });\r\n                    return processed;\r\n                },\r\n                clear: function () {\r\n                    var fm = self.fileManager;\r\n                    fm.totalFiles = null;\r\n                    fm.totalSize = null;\r\n                    fm.uploadedSize = 0;\r\n                    fm.stack = {};\r\n                    fm.errors = [];\r\n                    fm.processed = [];\r\n                    fm.stats = {};\r\n                    fm.clearImages();\r\n                },\r\n                clearImages: function () {\r\n                    self.fileManager.loadedImages = {};\r\n                    self.fileManager.totalImages = 0;\r\n                },\r\n                addImage: function (id, config) {\r\n                    self.fileManager.loadedImages[id] = config;\r\n                },\r\n                removeImage: function (id) {\r\n                    delete self.fileManager.loadedImages[id];\r\n                },\r\n                getImageIdList: function () {\r\n                    return Object.keys(self.fileManager.loadedImages);\r\n                },\r\n                getImageCount: function () {\r\n                    return self.fileManager.getImageIdList().length;\r\n                },\r\n                getId: function (file) {\r\n                    return self._getFileId(file);\r\n                },\r\n                getIndex: function (id) {\r\n                    return self.fileManager.getIdList().indexOf(id);\r\n                },\r\n                getThumb: function (id) {\r\n                    var $thumb = null;\r\n                    self._getThumbs().each(function () {\r\n                        var $t = $(this);\r\n                        if ($t.attr('data-fileid') === id) {\r\n                            $thumb = $t;\r\n                        }\r\n                    });\r\n                    return $thumb;\r\n                },\r\n                getThumbIndex: function ($thumb) {\r\n                    var id = $thumb.attr('data-fileid');\r\n                    return self.fileManager.getIndex(id);\r\n                },\r\n                getIdList: function () {\r\n                    return Object.keys(self.fileManager.stack);\r\n                },\r\n                getFile: function (id) {\r\n                    return self.fileManager.stack[id] || null;\r\n                },\r\n                getFileName: function (id, fmt) {\r\n                    var file = self.fileManager.getFile(id);\r\n                    if (!file) {\r\n                        return '';\r\n                    }\r\n                    return fmt ? (file.nameFmt || '') : file.name || '';\r\n                },\r\n                getFirstFile: function () {\r\n                    var ids = self.fileManager.getIdList(), id = ids && ids.length ? ids[0] : null;\r\n                    return self.fileManager.getFile(id);\r\n                },\r\n                setFile: function (id, file) {\r\n                    if (self.fileManager.getFile(id)) {\r\n                        self.fileManager.stack[id].file = file;\r\n                    } else {\r\n                        self.fileManager.add(file, id);\r\n                    }\r\n                },\r\n                setProcessed: function (id) {\r\n                    self.fileManager.processed.push(id);\r\n                },\r\n                getProgress: function () {\r\n                    var total = self.fileManager.total(), processed = self.fileManager.processed.length;\r\n                    if (!total) {\r\n                        return 0;\r\n                    }\r\n                    return Math.ceil(processed / total * 100);\r\n\r\n                },\r\n                setProgress: function (id, pct) {\r\n                    var f = self.fileManager.getFile(id);\r\n                    if (!isNaN(pct) && f) {\r\n                        f.progress = pct;\r\n                    }\r\n                }\r\n            };\r\n        },\r\n        _setUploadData: function (fd, config) {\r\n            var self = this;\r\n            $.each(config, function (key, value) {\r\n                var param = self.uploadParamNames[key] || key;\r\n                if ($h.isArray(value)) {\r\n                    fd.append(param, value[0], value[1]);\r\n                } else {\r\n                    fd.append(param, value);\r\n                }\r\n            });\r\n        },\r\n        _initResumableUpload: function () {\r\n            var self = this, opts = self.resumableUploadOptions, logs = $h.logMessages;\r\n            if (!self.enableResumableUpload) {\r\n                return;\r\n            }\r\n            if (opts.fallback !== false && typeof opts.fallback !== 'function') {\r\n                opts.fallback = function (s) {\r\n                    s._log(logs.noResumableSupport);\r\n                    s.enableResumableUpload = false;\r\n                };\r\n            }\r\n            if (!$h.hasResumableUploadSupport() && opts.fallback !== false) {\r\n                opts.fallback(self);\r\n                return;\r\n            }\r\n            if (!self.uploadUrl && self.enableResumableUpload) {\r\n                self._log(logs.noUploadUrl);\r\n                self.enableResumableUpload = false;\r\n                return;\r\n\r\n            }\r\n            opts.chunkSize = parseFloat(opts.chunkSize);\r\n            if (opts.chunkSize <= 0 || isNaN(opts.chunkSize)) {\r\n                self._log(logs.invalidChunkSize, {chunkSize: opts.chunkSize});\r\n                self.enableResumableUpload = false;\r\n                return;\r\n            }\r\n            self.resumableManager = {\r\n                init: function (id, f, index) {\r\n                    var rm = self.resumableManager, fm = self.fileManager;\r\n                    rm.currThreads = 0;\r\n                    rm.logs = [];\r\n                    rm.stack = [];\r\n                    rm.error = '';\r\n                    rm.chunkIntervalId = null;\r\n                    rm.id = id;\r\n                    rm.file = f.file;\r\n                    rm.fileName = f.name;\r\n                    rm.fileIndex = index;\r\n                    rm.completed = false;\r\n                    rm.testing = false;\r\n                    rm.lastProgress = 0;\r\n                    if (self.showPreview) {\r\n                        rm.$thumb = fm.getThumb(id) || null;\r\n                        rm.$progress = rm.$btnDelete = null;\r\n                        if (rm.$thumb && rm.$thumb.length) {\r\n                            rm.$progress = rm.$thumb.find('.file-thumb-progress');\r\n                            rm.$btnDelete = rm.$thumb.find('.kv-file-remove');\r\n                        }\r\n                    }\r\n                    rm.chunkSize = self.resumableUploadOptions.chunkSize * 1024;\r\n                    rm.chunkCount = rm.getTotalChunks();\r\n                },\r\n                logAjaxError: function (jqXHR, textStatus, errorThrown) {\r\n                    if (self.resumableUploadOptions.showErrorLog) {\r\n                        self._log(logs.ajaxError, {\r\n                            status: jqXHR.status,\r\n                            error: errorThrown,\r\n                            text: jqXHR.responseText || ''\r\n                        });\r\n                    }\r\n                },\r\n                reset: function () {\r\n                    var rm = self.resumableManager;\r\n                    rm.processed = {};\r\n                },\r\n                setProcessed: function (status) {\r\n                    var rm = self.resumableManager, fm = self.fileManager, id = rm.id, msg,\r\n                        $thumb = rm.$thumb, $prog = rm.$progress, hasThumb = $thumb && $thumb.length,\r\n                        params = {id: hasThumb ? $thumb.attr('id') : '', index: fm.getIndex(id), fileId: id};\r\n                    rm.completed = true;\r\n                    rm.lastProgress = 0;\r\n                    fm.uploadedSize += rm.file.size;\r\n                    if (hasThumb) {\r\n                        $thumb.removeClass('file-uploading');\r\n                    }\r\n                    if (status === 'success') {\r\n                        if (self.showPreview) {\r\n                            self._setProgress(101, $prog);\r\n                            self._setThumbStatus($thumb, 'Success');\r\n                            self._initUploadSuccess(rm.processed[id].data, $thumb);\r\n                        }\r\n                        self.fileManager.removeFile(id);\r\n                        delete rm.processed[id];\r\n                        self._raise('fileuploaded', [params.id, params.index, params.fileId]);\r\n                        if (fm.isProcessed()) {\r\n                            self._setProgress(101);\r\n                        }\r\n                    } else {\r\n                        if (self.showPreview) {\r\n                            self._setThumbStatus($thumb, 'Error');\r\n                            self._setPreviewError($thumb, true);\r\n                            self._setProgress(101, $prog, self.msgProgressError);\r\n                            self._setProgress(101, self.$progress, self.msgProgressError);\r\n                            self.cancelling = true;\r\n                        }\r\n                        if (!self.$errorContainer.find('li[data-file-id=\"' + params.fileId + '\"]').length) {\r\n                            msg = self.msgResumableUploadRetriesExceeded.setTokens({\r\n                                file: rm.fileName,\r\n                                max: self.resumableUploadOptions.maxRetries,\r\n                                error: rm.error\r\n                            });\r\n                            self._showFileError(msg, params);\r\n                        }\r\n                    }\r\n                    if (fm.isProcessed()) {\r\n                        rm.reset();\r\n                    }\r\n                },\r\n                check: function () {\r\n                    var rm = self.resumableManager, status = true;\r\n                    $.each(rm.logs, function (index, value) {\r\n                        if (!value) {\r\n                            status = false;\r\n                            return false;\r\n                        }\r\n                    });\r\n                    if (status) {\r\n                        clearInterval(rm.chunkIntervalId);\r\n                        rm.setProcessed('success');\r\n                    }\r\n                },\r\n                processedResumables: function () {\r\n                    var logs = self.resumableManager.logs, i, count = 0;\r\n                    if (!logs || !logs.length) {\r\n                        return 0;\r\n                    }\r\n                    for (i = 0; i < logs.length; i++) {\r\n                        if (logs[i] === true) {\r\n                            count++;\r\n                        }\r\n                    }\r\n                    return count;\r\n                },\r\n                getUploadedSize: function () {\r\n                    var rm = self.resumableManager, size = rm.processedResumables() * rm.chunkSize;\r\n                    return size > rm.file.size ? rm.file.size : size;\r\n                },\r\n                getTotalChunks: function () {\r\n                    var rm = self.resumableManager, chunkSize = parseFloat(rm.chunkSize);\r\n                    if (!isNaN(chunkSize) && chunkSize > 0) {\r\n                        return Math.ceil(rm.file.size / chunkSize);\r\n                    }\r\n                    return 0;\r\n                },\r\n                getProgress: function () {\r\n                    var rm = self.resumableManager, processed = rm.processedResumables(), total = rm.chunkCount;\r\n                    if (total === 0) {\r\n                        return 0;\r\n                    }\r\n                    return Math.ceil(processed / total * 100);\r\n                },\r\n                checkAborted: function (intervalId) {\r\n                    if (self.paused || self.cancelling) {\r\n                        clearInterval(intervalId);\r\n                        self.unlock();\r\n                    }\r\n                },\r\n                upload: function () {\r\n                    var rm = self.resumableManager, fm = self.fileManager, ids = fm.getIdList(), flag = 'new',\r\n                        intervalId;\r\n                    intervalId = setInterval(function () {\r\n                        var id;\r\n                        rm.checkAborted(intervalId);\r\n                        if (flag === 'new') {\r\n                            self.lock();\r\n                            flag = 'processing';\r\n                            id = ids.shift();\r\n                            fm.initStats(id);\r\n                            if (fm.stack[id]) {\r\n                                rm.init(id, fm.stack[id], fm.getIndex(id));\r\n                                rm.testUpload();\r\n                                rm.uploadResumable();\r\n                            }\r\n                        }\r\n                        if (!fm.isPending(id) && rm.completed) {\r\n                            flag = 'new';\r\n                        }\r\n                        if (fm.isProcessed()) {\r\n                            var $initThumbs = self.$preview.find('.file-preview-initial');\r\n                            if ($initThumbs.length) {\r\n                                $h.addCss($initThumbs, $h.SORT_CSS);\r\n                                self._initSortable();\r\n                            }\r\n                            clearInterval(intervalId);\r\n                            self._clearFileInput();\r\n                            self.unlock();\r\n                            setTimeout(function () {\r\n                                var data = self.previewCache.data;\r\n                                if (data) {\r\n                                    self.initialPreview = data.content;\r\n                                    self.initialPreviewConfig = data.config;\r\n                                    self.initialPreviewThumbTags = data.tags;\r\n                                }\r\n                                self._raise('filebatchuploadcomplete', [\r\n                                    self.initialPreview,\r\n                                    self.initialPreviewConfig,\r\n                                    self.initialPreviewThumbTags,\r\n                                    self._getExtraData()\r\n                                ]);\r\n                            }, self.processDelay);\r\n                        }\r\n                    }, self.processDelay);\r\n                },\r\n                uploadResumable: function () {\r\n                    var i, rm = self.resumableManager, total = rm.chunkCount;\r\n                    for (i = 0; i < total; i++) {\r\n                        rm.logs[i] = !!(rm.processed[rm.id] && rm.processed[rm.id][i]);\r\n                    }\r\n                    for (i = 0; i < total; i++) {\r\n                        rm.pushAjax(i, 0);\r\n                    }\r\n                    rm.chunkIntervalId = setInterval(rm.loopAjax, self.queueDelay);\r\n                },\r\n                testUpload: function () {\r\n                    var rm = self.resumableManager, opts = self.resumableUploadOptions, fd, f,\r\n                        fm = self.fileManager, id = rm.id, fnBefore, fnSuccess, fnError, fnComplete, outData;\r\n                    if (!opts.testUrl) {\r\n                        rm.testing = false;\r\n                        return;\r\n                    }\r\n                    rm.testing = true;\r\n                    fd = new FormData();\r\n                    f = fm.stack[id];\r\n                    self._setUploadData(fd, {\r\n                        fileId: id,\r\n                        fileName: f.fileName,\r\n                        fileSize: f.size,\r\n                        fileRelativePath: f.relativePath,\r\n                        chunkSize: rm.chunkSize,\r\n                        chunkCount: rm.chunkCount\r\n                    });\r\n                    fnBefore = function (jqXHR) {\r\n                        outData = self._getOutData(fd, jqXHR);\r\n                        self._raise('filetestbeforesend', [id, fm, rm, outData]);\r\n                    };\r\n                    fnSuccess = function (data, textStatus, jqXHR) {\r\n                        outData = self._getOutData(fd, jqXHR, data);\r\n                        var pNames = self.uploadParamNames, chunksUploaded = pNames.chunksUploaded || 'chunksUploaded',\r\n                            params = [id, fm, rm, outData];\r\n                        if (!data[chunksUploaded] || !$h.isArray(data[chunksUploaded])) {\r\n                            self._raise('filetesterror', params);\r\n                        } else {\r\n                            if (!rm.processed[id]) {\r\n                                rm.processed[id] = {};\r\n                            }\r\n                            $.each(data[chunksUploaded], function (key, index) {\r\n                                rm.logs[index] = true;\r\n                                rm.processed[id][index] = true;\r\n                            });\r\n                            rm.processed[id].data = data;\r\n                            self._raise('filetestsuccess', params);\r\n                        }\r\n                        rm.testing = false;\r\n                    };\r\n                    fnError = function (jqXHR, textStatus, errorThrown) {\r\n                        outData = self._getOutData(fd, jqXHR);\r\n                        self._raise('filetestajaxerror', [id, fm, rm, outData]);\r\n                        rm.logAjaxError(jqXHR, textStatus, errorThrown);\r\n                        rm.testing = false;\r\n                    };\r\n                    fnComplete = function () {\r\n                        self._raise('filetestcomplete', [id, fm, rm, self._getOutData(fd)]);\r\n                        rm.testing = false;\r\n                    };\r\n                    self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, fd, id, rm.fileIndex, opts.testUrl);\r\n                },\r\n                pushAjax: function (index, retry) {\r\n                    self.resumableManager.stack.push([index, retry]);\r\n                },\r\n                sendAjax: function (index, retry) {\r\n                    var fm = self.fileManager, rm = self.resumableManager, opts = self.resumableUploadOptions, f,\r\n                        chunkSize = rm.chunkSize, id = rm.id, file = rm.file, $thumb = rm.$thumb,\r\n                        $btnDelete = rm.$btnDelete;\r\n                    if (rm.processed[id] && rm.processed[id][index]) {\r\n                        return;\r\n                    }\r\n                    rm.currThreads++;\r\n                    if (retry > opts.maxRetries) {\r\n                        rm.setProcessed('error');\r\n                        return;\r\n                    }\r\n                    var fd, outData, fnBefore, fnSuccess, fnError, fnComplete, slice = file.slice ? 'slice' :\r\n                        (file.mozSlice ? 'mozSlice' : (file.webkitSlice ? 'webkitSlice' : 'slice')),\r\n                        blob = file[slice](chunkSize * index, chunkSize * (index + 1));\r\n                    fd = new FormData();\r\n                    f = fm.stack[id];\r\n                    self._setUploadData(fd, {\r\n                        chunkCount: rm.chunkCount,\r\n                        chunkIndex: index,\r\n                        chunkSize: chunkSize,\r\n                        chunkSizeStart: chunkSize * index,\r\n                        fileBlob: [blob, rm.fileName],\r\n                        fileId: id,\r\n                        fileName: rm.fileName,\r\n                        fileRelativePath: f.relativePath,\r\n                        fileSize: file.size,\r\n                        retryCount: retry\r\n                    });\r\n                    if (rm.$progress && rm.$progress.length) {\r\n                        rm.$progress.show();\r\n                    }\r\n                    fnBefore = function (jqXHR) {\r\n                        outData = self._getOutData(fd, jqXHR);\r\n                        if (self.showPreview) {\r\n                            if (!$thumb.hasClass('file-preview-success')) {\r\n                                self._setThumbStatus($thumb, 'Loading');\r\n                                $h.addCss($thumb, 'file-uploading');\r\n                            }\r\n                            $btnDelete.attr('disabled', true);\r\n                        }\r\n                        self._raise('filechunkbeforesend', [id, index, retry, fm, rm, outData]);\r\n                    };\r\n                    fnSuccess = function (data, textStatus, jqXHR) {\r\n                        outData = self._getOutData(fd, jqXHR, data);\r\n                        var paramNames = self.uploadParamNames, chunkIndex = paramNames.chunkIndex || 'chunkIndex',\r\n                            opts = self.resumableUploadOptions, params = [id, index, retry, fm, rm, outData];\r\n                        rm.currThreads--;\r\n                        if (data.error) {\r\n                            if (opts.showErrorLog) {\r\n                                self._log(logs.retryStatus, {\r\n                                    retry: retry + 1,\r\n                                    filename: rm.fileName,\r\n                                    chunk: index\r\n                                });\r\n                            }\r\n                            rm.pushAjax(index, retry + 1);\r\n                            rm.error = data.error;\r\n                            self._raise('filechunkerror', params);\r\n                        } else {\r\n                            rm.logs[data[chunkIndex]] = true;\r\n                            if (!rm.processed[id]) {\r\n                                rm.processed[id] = {};\r\n                            }\r\n                            rm.processed[id][data[chunkIndex]] = true;\r\n                            rm.processed[id].data = data;\r\n                            self._raise('filechunksuccess', params);\r\n                            rm.check();\r\n                        }\r\n                    };\r\n                    fnError = function (jqXHR, textStatus, errorThrown) {\r\n                        outData = self._getOutData(fd, jqXHR);\r\n                        rm.currThreads--;\r\n                        rm.error = errorThrown;\r\n                        rm.logAjaxError(jqXHR, textStatus, errorThrown);\r\n                        self._raise('filechunkajaxerror', [id, index, retry, fm, rm, outData]);\r\n                        rm.pushAjax(index, retry + 1);\r\n                    };\r\n                    fnComplete = function () {\r\n                        self._raise('filechunkcomplete', [id, index, retry, fm, rm, self._getOutData(fd)]);\r\n                    };\r\n                    self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, fd, id, rm.fileIndex);\r\n                },\r\n                loopAjax: function () {\r\n                    var rm = self.resumableManager;\r\n                    if (rm.currThreads < self.resumableUploadOptions.maxThreads && !rm.testing) {\r\n                        var arr = rm.stack.shift(), index;\r\n                        if (typeof arr !== 'undefined') {\r\n                            index = arr[0];\r\n                            if (!rm.processed[rm.id] || !rm.processed[rm.id][index]) {\r\n                                rm.sendAjax(index, arr[1]);\r\n                            } else {\r\n                                if (rm.processedResumables() >= rm.getTotalChunks()) {\r\n                                    rm.setProcessed('success');\r\n                                    clearInterval(rm.chunkIntervalId);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n            self.resumableManager.reset();\r\n        },\r\n        _initTemplateDefaults: function () {\r\n            var self = this, tMain1, tMain2, tPreview, tFileIcon, tClose, tCaption, tBtnDefault, tBtnLink, tBtnBrowse,\r\n                tModalMain, tModal, tProgress, tSize, tFooter, tActions, tActionDelete, tActionUpload, tActionDownload,\r\n                tActionZoom, tActionDrag, tIndicator, tTagBef, tTagBef1, tTagBef2, tTagAft, tGeneric, tHtml, tImage,\r\n                tText, tOffice, tGdocs, tVideo, tAudio, tFlash, tObject, tPdf, tOther, tStyle, tZoomCache, vDefaultDim,\r\n                tStats;\r\n            tMain1 = '{preview}\\n' +\r\n                '<div class=\"kv-upload-progress kv-hidden\"></div><div class=\"clearfix\"></div>\\n' +\r\n                '<div class=\"input-group {class}\">\\n' +\r\n                '  {caption}\\n' +\r\n                '<div class=\"input-group-btn input-group-append\">\\n' +\r\n                '      {remove}\\n' +\r\n                '      {cancel}\\n' +\r\n                '      {pause}\\n' +\r\n                '      {upload}\\n' +\r\n                '      {browse}\\n' +\r\n                '    </div>\\n' +\r\n                '</div>';\r\n            tMain2 = '{preview}\\n<div class=\"kv-upload-progress kv-hidden\"></div>\\n<div class=\"clearfix\"></div>\\n' +\r\n                '{remove}\\n{cancel}\\n{upload}\\n{browse}\\n';\r\n            tPreview = '<div class=\"file-preview {class}\">\\n' +\r\n                '  {close}' +\r\n                '  <div class=\"{dropClass} clearfix\">\\n' +\r\n                '    <div class=\"file-preview-thumbnails clearfix\">\\n' +\r\n                '    </div>\\n' +\r\n                '    <div class=\"file-preview-status text-center text-success\"></div>\\n' +\r\n                '    <div class=\"kv-fileinput-error\"></div>\\n' +\r\n                '  </div>\\n' +\r\n                '</div>';\r\n            tClose = $h.closeButton('fileinput-remove');\r\n            tFileIcon = '<i class=\"glyphicon glyphicon-file\"></i>';\r\n            // noinspection HtmlUnknownAttribute\r\n            tCaption = '<div class=\"file-caption form-control {class}\" tabindex=\"500\">\\n' +\r\n                '  <span class=\"file-caption-icon\"></span>\\n' +\r\n                '  <input class=\"file-caption-name\" onkeydown=\"return false;\" onpaste=\"return false;\">\\n' +\r\n                '</div>';\r\n            //noinspection HtmlUnknownAttribute\r\n            tBtnDefault = '<button type=\"{type}\" tabindex=\"500\" title=\"{title}\" class=\"{css}\" ' +\r\n                '{status}>{icon} {label}</button>';\r\n            //noinspection HtmlUnknownTarget,HtmlUnknownAttribute\r\n            tBtnLink = '<a href=\"{href}\" tabindex=\"500\" title=\"{title}\" class=\"{css}\" {status}>{icon} {label}</a>';\r\n            //noinspection HtmlUnknownAttribute\r\n            tBtnBrowse = '<div tabindex=\"500\" class=\"{css}\" {status}>{icon} {label}</div>';\r\n            tModalMain = '<div id=\"' + $h.MODAL_ID + '\" class=\"file-zoom-dialog modal fade\" ' +\r\n                'tabindex=\"-1\" aria-labelledby=\"' + $h.MODAL_ID + 'Label\"></div>';\r\n            tModal = '<div class=\"modal-dialog modal-lg{rtl}\" role=\"document\">\\n' +\r\n                '  <div class=\"modal-content\">\\n' +\r\n                '    <div class=\"modal-header\">\\n' +\r\n                '      <h5 class=\"modal-title\">{heading}</h5>\\n' +\r\n                '      <span class=\"kv-zoom-title\"></span>\\n' +\r\n                '      <div class=\"kv-zoom-actions\">{toggleheader}{fullscreen}{borderless}{close}</div>\\n' +\r\n                '    </div>\\n' +\r\n                '    <div class=\"modal-body\">\\n' +\r\n                '      <div class=\"floating-buttons\"></div>\\n' +\r\n                '      <div class=\"kv-zoom-body file-zoom-content {zoomFrameClass}\"></div>\\n' + '{prev} {next}\\n' +\r\n                '    </div>\\n' +\r\n                '  </div>\\n' +\r\n                '</div>\\n';\r\n            tProgress = '<div class=\"progress\">\\n' +\r\n                '    <div class=\"{class}\" role=\"progressbar\"' +\r\n                ' aria-valuenow=\"{percent}\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:{percent}%;\">\\n' +\r\n                '        {status}\\n' +\r\n                '     </div>\\n' +\r\n                '</div>{stats}';\r\n            tStats = '<div class=\"text-info file-upload-stats\">' +\r\n                '<span class=\"pending-time\">{pendingTime}</span> ' +\r\n                '<span class=\"upload-speed\">{uploadSpeed}</span>' +\r\n                '</div>';\r\n            tSize = ' <samp>({sizeText})</samp>';\r\n            tFooter = '<div class=\"file-thumbnail-footer\">\\n' +\r\n                '    <div class=\"file-footer-caption\" title=\"{caption}\">\\n' +\r\n                '        <div class=\"file-caption-info\">{caption}</div>\\n' +\r\n                '        <div class=\"file-size-info\">{size}</div>\\n' +\r\n                '    </div>\\n' +\r\n                '    {progress}\\n{indicator}\\n{actions}\\n' +\r\n                '</div>';\r\n            tActions = '<div class=\"file-actions\">\\n' +\r\n                '    <div class=\"file-footer-buttons\">\\n' +\r\n                '        {download} {upload} {delete} {zoom} {other}' +\r\n                '    </div>\\n' +\r\n                '</div>\\n' +\r\n                '{drag}\\n' +\r\n                '<div class=\"clearfix\"></div>';\r\n            //noinspection HtmlUnknownAttribute\r\n            tActionDelete = '<button type=\"button\" class=\"kv-file-remove {removeClass}\" ' +\r\n                'title=\"{removeTitle}\" {dataUrl}{dataKey}>{removeIcon}</button>\\n';\r\n            tActionUpload = '<button type=\"button\" class=\"kv-file-upload {uploadClass}\" title=\"{uploadTitle}\">' +\r\n                '{uploadIcon}</button>';\r\n            tActionDownload = '<a class=\"kv-file-download {downloadClass}\" title=\"{downloadTitle}\" ' +\r\n                'href=\"{downloadUrl}\" download=\"{caption}\" target=\"_blank\">{downloadIcon}</a>';\r\n            tActionZoom = '<button type=\"button\" class=\"kv-file-zoom {zoomClass}\" ' +\r\n                'title=\"{zoomTitle}\">{zoomIcon}</button>';\r\n            tActionDrag = '<span class=\"file-drag-handle {dragClass}\" title=\"{dragTitle}\">{dragIcon}</span>';\r\n            tIndicator = '<div class=\"file-upload-indicator\" title=\"{indicatorTitle}\">{indicator}</div>';\r\n            tTagBef = '<div class=\"file-preview-frame {frameClass}\" id=\"{previewId}\" data-fileindex=\"{fileindex}\"' +\r\n                ' data-fileid=\"{fileid}\" data-template=\"{template}\"';\r\n            tTagBef1 = tTagBef + '><div class=\"kv-file-content\">\\n';\r\n            tTagBef2 = tTagBef + ' title=\"{caption}\"><div class=\"kv-file-content\">\\n';\r\n            tTagAft = '</div>{footer}\\n</div>\\n';\r\n            tGeneric = '{content}\\n';\r\n            tStyle = ' {style}';\r\n            tHtml = '<div class=\"kv-preview-data file-preview-html\" title=\"{caption}\"' + tStyle + '>{data}</div>\\n';\r\n            tImage = '<img src=\"{data}\" class=\"file-preview-image kv-preview-data\" title=\"{title}\" ' +\r\n                'alt=\"{alt}\"' + tStyle + '>\\n';\r\n            tText = '<textarea class=\"kv-preview-data file-preview-text\" title=\"{caption}\" readonly' + tStyle + '>' +\r\n                '{data}</textarea>\\n';\r\n            tOffice = '<iframe class=\"kv-preview-data file-preview-office\" ' +\r\n                'src=\"https://view.officeapps.live.com/op/embed.aspx?src={data}\"' + tStyle + '></iframe>';\r\n            tGdocs = '<iframe class=\"kv-preview-data file-preview-gdocs\" ' +\r\n                'src=\"https://docs.google.com/gview?url={data}&embedded=true\"' + tStyle + '></iframe>';\r\n            tVideo = '<video class=\"kv-preview-data file-preview-video\" controls' + tStyle + '>\\n' +\r\n                '<source src=\"{data}\" type=\"{type}\">\\n' + $h.DEFAULT_PREVIEW + '\\n</video>\\n';\r\n            tAudio = '<!--suppress ALL --><audio class=\"kv-preview-data file-preview-audio\" controls' + tStyle + '>\\n<source src=\"{data}\" ' +\r\n                'type=\"{type}\">\\n' + $h.DEFAULT_PREVIEW + '\\n</audio>\\n';\r\n            tFlash = '<embed class=\"kv-preview-data file-preview-flash\" src=\"{data}\" type=\"application/x-shockwave-flash\"' + tStyle + '>\\n';\r\n            tPdf = '<embed class=\"kv-preview-data file-preview-pdf\" src=\"{data}\" type=\"application/pdf\"' + tStyle + '>\\n';\r\n            tObject = '<object class=\"kv-preview-data file-preview-object file-object {typeCss}\" ' +\r\n                'data=\"{data}\" type=\"{type}\"' + tStyle + '>\\n' + '<param name=\"movie\" value=\"{caption}\" />\\n' +\r\n                $h.OBJECT_PARAMS + ' ' + $h.DEFAULT_PREVIEW + '\\n</object>\\n';\r\n            tOther = '<div class=\"kv-preview-data file-preview-other-frame\"' + tStyle + '>\\n' + $h.DEFAULT_PREVIEW + '\\n</div>\\n';\r\n            tZoomCache = '<div class=\"kv-zoom-cache\" style=\"display:none\">{zoomContent}</div>';\r\n            vDefaultDim = {width: '100%', height: '100%', 'min-height': '480px'};\r\n            if (self._isPdfRendered()) {\r\n                tPdf = self.pdfRendererTemplate.replace('{renderer}', self._encodeURI(self.pdfRendererUrl));\r\n            }\r\n            self.defaults = {\r\n                layoutTemplates: {\r\n                    main1: tMain1,\r\n                    main2: tMain2,\r\n                    preview: tPreview,\r\n                    close: tClose,\r\n                    fileIcon: tFileIcon,\r\n                    caption: tCaption,\r\n                    modalMain: tModalMain,\r\n                    modal: tModal,\r\n                    progress: tProgress,\r\n                    stats: tStats,\r\n                    size: tSize,\r\n                    footer: tFooter,\r\n                    indicator: tIndicator,\r\n                    actions: tActions,\r\n                    actionDelete: tActionDelete,\r\n                    actionUpload: tActionUpload,\r\n                    actionDownload: tActionDownload,\r\n                    actionZoom: tActionZoom,\r\n                    actionDrag: tActionDrag,\r\n                    btnDefault: tBtnDefault,\r\n                    btnLink: tBtnLink,\r\n                    btnBrowse: tBtnBrowse,\r\n                    zoomCache: tZoomCache\r\n                },\r\n                previewMarkupTags: {\r\n                    tagBefore1: tTagBef1,\r\n                    tagBefore2: tTagBef2,\r\n                    tagAfter: tTagAft\r\n                },\r\n                previewContentTemplates: {\r\n                    generic: tGeneric,\r\n                    html: tHtml,\r\n                    image: tImage,\r\n                    text: tText,\r\n                    office: tOffice,\r\n                    gdocs: tGdocs,\r\n                    video: tVideo,\r\n                    audio: tAudio,\r\n                    flash: tFlash,\r\n                    object: tObject,\r\n                    pdf: tPdf,\r\n                    other: tOther\r\n                },\r\n                allowedPreviewTypes: ['image', 'html', 'text', 'video', 'audio', 'flash', 'pdf', 'object'],\r\n                previewTemplates: {},\r\n                previewSettings: {\r\n                    image: {width: 'auto', height: 'auto', 'max-width': '100%', 'max-height': '100%'},\r\n                    html: {width: '213px', height: '160px'},\r\n                    text: {width: '213px', height: '160px'},\r\n                    office: {width: '213px', height: '160px'},\r\n                    gdocs: {width: '213px', height: '160px'},\r\n                    video: {width: '213px', height: '160px'},\r\n                    audio: {width: '100%', height: '30px'},\r\n                    flash: {width: '213px', height: '160px'},\r\n                    object: {width: '213px', height: '160px'},\r\n                    pdf: {width: '100%', height: '160px', 'position': 'relative'},\r\n                    other: {width: '213px', height: '160px'}\r\n                },\r\n                previewSettingsSmall: {\r\n                    image: {width: 'auto', height: 'auto', 'max-width': '100%', 'max-height': '100%'},\r\n                    html: {width: '100%', height: '160px'},\r\n                    text: {width: '100%', height: '160px'},\r\n                    office: {width: '100%', height: '160px'},\r\n                    gdocs: {width: '100%', height: '160px'},\r\n                    video: {width: '100%', height: 'auto'},\r\n                    audio: {width: '100%', height: '30px'},\r\n                    flash: {width: '100%', height: 'auto'},\r\n                    object: {width: '100%', height: 'auto'},\r\n                    pdf: {width: '100%', height: '160px'},\r\n                    other: {width: '100%', height: '160px'}\r\n                },\r\n                previewZoomSettings: {\r\n                    image: {width: 'auto', height: 'auto', 'max-width': '100%', 'max-height': '100%'},\r\n                    html: vDefaultDim,\r\n                    text: vDefaultDim,\r\n                    office: {width: '100%', height: '100%', 'max-width': '100%', 'min-height': '480px'},\r\n                    gdocs: {width: '100%', height: '100%', 'max-width': '100%', 'min-height': '480px'},\r\n                    video: {width: 'auto', height: '100%', 'max-width': '100%'},\r\n                    audio: {width: '100%', height: '30px'},\r\n                    flash: {width: 'auto', height: '480px'},\r\n                    object: {width: 'auto', height: '100%', 'max-width': '100%', 'min-height': '480px'},\r\n                    pdf: vDefaultDim,\r\n                    other: {width: 'auto', height: '100%', 'min-height': '480px'}\r\n                },\r\n                mimeTypeAliases: {\r\n                    'video/quicktime': 'video/mp4'\r\n                },\r\n                fileTypeSettings: {\r\n                    image: function (vType, vName) {\r\n                        return ($h.compare(vType, 'image.*') && !$h.compare(vType, /(tiff?|wmf)$/i) ||\r\n                            $h.compare(vName, /\\.(gif|png|jpe?g)$/i));\r\n                    },\r\n                    html: function (vType, vName) {\r\n                        return $h.compare(vType, 'text/html') || $h.compare(vName, /\\.(htm|html)$/i);\r\n                    },\r\n                    office: function (vType, vName) {\r\n                        return $h.compare(vType, /(word|excel|powerpoint|office)$/i) ||\r\n                            $h.compare(vName, /\\.(docx?|xlsx?|pptx?|pps|potx?)$/i);\r\n                    },\r\n                    gdocs: function (vType, vName) {\r\n                        return $h.compare(vType, /(word|excel|powerpoint|office|iwork-pages|tiff?)$/i) ||\r\n                            $h.compare(vName,\r\n                                /\\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i);\r\n                    },\r\n                    text: function (vType, vName) {\r\n                        return $h.compare(vType, 'text.*') || $h.compare(vName, /\\.(xml|javascript)$/i) ||\r\n                            $h.compare(vName, /\\.(txt|md|csv|nfo|ini|json|php|js|css)$/i);\r\n                    },\r\n                    video: function (vType, vName) {\r\n                        return $h.compare(vType, 'video.*') && ($h.compare(vType, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) ||\r\n                            $h.compare(vName, /\\.(og?|mp4|webm|mp?g|mov|3gp)$/i));\r\n                    },\r\n                    audio: function (vType, vName) {\r\n                        return $h.compare(vType, 'audio.*') && ($h.compare(vName, /(ogg|mp3|mp?g|wav)$/i) ||\r\n                            $h.compare(vName, /\\.(og?|mp3|mp?g|wav)$/i));\r\n                    },\r\n                    flash: function (vType, vName) {\r\n                        return $h.compare(vType, 'application/x-shockwave-flash', true) || $h.compare(vName,\r\n                            /\\.(swf)$/i);\r\n                    },\r\n                    pdf: function (vType, vName) {\r\n                        return $h.compare(vType, 'application/pdf', true) || $h.compare(vName, /\\.(pdf)$/i);\r\n                    },\r\n                    object: function () {\r\n                        return true;\r\n                    },\r\n                    other: function () {\r\n                        return true;\r\n                    }\r\n                },\r\n                fileActionSettings: {\r\n                    showRemove: true,\r\n                    showUpload: true,\r\n                    showDownload: true,\r\n                    showZoom: true,\r\n                    showDrag: true,\r\n                    removeIcon: '<i class=\"glyphicon glyphicon-trash\"></i>',\r\n                    removeClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',\r\n                    removeErrorClass: 'btn btn-sm btn-kv btn-danger',\r\n                    removeTitle: 'Remove file',\r\n                    uploadIcon: '<i class=\"glyphicon glyphicon-upload\"></i>',\r\n                    uploadClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',\r\n                    uploadTitle: 'Upload file',\r\n                    uploadRetryIcon: '<i class=\"glyphicon glyphicon-repeat\"></i>',\r\n                    uploadRetryTitle: 'Retry upload',\r\n                    downloadIcon: '<i class=\"glyphicon glyphicon-download\"></i>',\r\n                    downloadClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',\r\n                    downloadTitle: 'Download file',\r\n                    zoomIcon: '<i class=\"glyphicon glyphicon-zoom-in\"></i>',\r\n                    zoomClass: 'btn btn-sm btn-kv btn-default btn-outline-secondary',\r\n                    zoomTitle: 'View Details',\r\n                    dragIcon: '<i class=\"glyphicon glyphicon-move\"></i>',\r\n                    dragClass: 'text-info',\r\n                    dragTitle: 'Move / Rearrange',\r\n                    dragSettings: {},\r\n                    indicatorNew: '<i class=\"glyphicon glyphicon-plus-sign text-warning\"></i>',\r\n                    indicatorSuccess: '<i class=\"glyphicon glyphicon-ok-sign text-success\"></i>',\r\n                    indicatorError: '<i class=\"glyphicon glyphicon-exclamation-sign text-danger\"></i>',\r\n                    indicatorLoading: '<i class=\"glyphicon glyphicon-hourglass text-muted\"></i>',\r\n                    indicatorPaused: '<i class=\"glyphicon glyphicon-pause text-primary\"></i>',\r\n                    indicatorNewTitle: 'Not uploaded yet',\r\n                    indicatorSuccessTitle: 'Uploaded',\r\n                    indicatorErrorTitle: 'Upload Error',\r\n                    indicatorLoadingTitle: 'Uploading ...',\r\n                    indicatorPausedTitle: 'Upload Paused'\r\n                }\r\n            };\r\n            $.each(self.defaults, function (key, setting) {\r\n                if (key === 'allowedPreviewTypes') {\r\n                    if (self.allowedPreviewTypes === undefined) {\r\n                        self.allowedPreviewTypes = setting;\r\n                    }\r\n                    return;\r\n                }\r\n                self[key] = $.extend(true, {}, setting, self[key]);\r\n            });\r\n            self._initPreviewTemplates();\r\n        },\r\n        _initPreviewTemplates: function () {\r\n            var self = this, tags = self.previewMarkupTags, tagBef, tagAft = tags.tagAfter;\r\n            $.each(self.previewContentTemplates, function (key, value) {\r\n                if ($h.isEmpty(self.previewTemplates[key])) {\r\n                    tagBef = tags.tagBefore2;\r\n                    if (key === 'generic' || key === 'image' || key === 'html' || key === 'text') {\r\n                        tagBef = tags.tagBefore1;\r\n                    }\r\n                    if (self._isPdfRendered() && key === 'pdf') {\r\n                        tagBef = tagBef.replace('kv-file-content', 'kv-file-content kv-pdf-rendered');\r\n                    }\r\n                    self.previewTemplates[key] = tagBef + value + tagAft;\r\n                }\r\n            });\r\n        },\r\n        _initPreviewCache: function () {\r\n            var self = this;\r\n            self.previewCache = {\r\n                data: {},\r\n                init: function () {\r\n                    var content = self.initialPreview;\r\n                    if (content.length > 0 && !$h.isArray(content)) {\r\n                        content = content.split(self.initialPreviewDelimiter);\r\n                    }\r\n                    self.previewCache.data = {\r\n                        content: content,\r\n                        config: self.initialPreviewConfig,\r\n                        tags: self.initialPreviewThumbTags\r\n                    };\r\n                },\r\n                count: function (skipNull) {\r\n                    if (!self.previewCache.data || !self.previewCache.data.content) {\r\n                        return 0;\r\n                    }\r\n                    if (skipNull) {\r\n                        var chk = self.previewCache.data.content.filter(function (n) {\r\n                            return n !== null;\r\n                        });\r\n                        return chk.length;\r\n                    }\r\n                    return self.previewCache.data.content.length;\r\n                },\r\n                get: function (i, isDisabled) {\r\n                    var ind = $h.INIT_FLAG + i, data = self.previewCache.data, config = data.config[i],\r\n                        content = data.content[i], out, $tmp, cat, ftr,\r\n                        fname, ftype, frameClass, asData = $h.ifSet('previewAsData', config, self.initialPreviewAsData),\r\n                        a = config ? {title: config.title || null, alt: config.alt || null} : {title: null, alt: null},\r\n                        parseTemplate = function (cat, dat, fname, ftype, ftr, ind, fclass, t) {\r\n                            var fc = ' file-preview-initial ' + $h.SORT_CSS + (fclass ? ' ' + fclass : ''),\r\n                                id = self.previewInitId + '-' + ind,\r\n                                fileId = config && config.fileId || id;\r\n                            /** @namespace config.zoomData */\r\n                            return self._generatePreviewTemplate(cat, dat, fname, ftype, id, fileId, false, null, fc,\r\n                                ftr, ind, t, a, config && config.zoomData || dat);\r\n                        };\r\n                    if (!content || !content.length) {\r\n                        return '';\r\n                    }\r\n                    isDisabled = isDisabled === undefined ? true : isDisabled;\r\n                    cat = $h.ifSet('type', config, self.initialPreviewFileType || 'generic');\r\n                    fname = $h.ifSet('filename', config, $h.ifSet('caption', config));\r\n                    ftype = $h.ifSet('filetype', config, cat);\r\n                    ftr = self.previewCache.footer(i, isDisabled, (config && config.size || null));\r\n                    frameClass = $h.ifSet('frameClass', config);\r\n                    if (asData) {\r\n                        out = parseTemplate(cat, content, fname, ftype, ftr, ind, frameClass);\r\n                    } else {\r\n                        out = parseTemplate('generic', content, fname, ftype, ftr, ind, frameClass, cat)\r\n                            .setTokens({'content': data.content[i]});\r\n                    }\r\n                    if (data.tags.length && data.tags[i]) {\r\n                        out = $h.replaceTags(out, data.tags[i]);\r\n                    }\r\n                    /** @namespace config.frameAttr */\r\n                    if (!$h.isEmpty(config) && !$h.isEmpty(config.frameAttr)) {\r\n                        $tmp = $(document.createElement('div')).html(out);\r\n                        $tmp.find('.file-preview-initial').attr(config.frameAttr);\r\n                        out = $tmp.html();\r\n                        $tmp.remove();\r\n                    }\r\n                    return out;\r\n                },\r\n                clean: function (data) {\r\n                    data.content = $h.cleanArray(data.content);\r\n                    data.config = $h.cleanArray(data.config);\r\n                    data.tags = $h.cleanArray(data.tags);\r\n                    self.previewCache.data = data;\r\n                },\r\n                add: function (content, config, tags, append) {\r\n                    var data = self.previewCache.data, index;\r\n                    if (!content || !content.length) {\r\n                        return 0;\r\n                    }\r\n                    index = content.length - 1;\r\n                    if (!$h.isArray(content)) {\r\n                        content = content.split(self.initialPreviewDelimiter);\r\n                    }\r\n                    if (append && data.content && data.content.length) {\r\n                        index = data.content.push(content[0]) - 1;\r\n                        data.config[index] = config;\r\n                        data.tags[index] = tags;\r\n                    } else {\r\n                        data.content = content;\r\n                        data.config = config;\r\n                        data.tags = tags;\r\n                    }\r\n                    self.previewCache.clean(data);\r\n                    return index;\r\n                },\r\n                set: function (content, config, tags, append) {\r\n                    var data = self.previewCache.data, i, chk;\r\n                    if (!content || !content.length) {\r\n                        return;\r\n                    }\r\n                    if (!$h.isArray(content)) {\r\n                        content = content.split(self.initialPreviewDelimiter);\r\n                    }\r\n                    chk = content.filter(function (n) {\r\n                        return n !== null;\r\n                    });\r\n                    if (!chk.length) {\r\n                        return;\r\n                    }\r\n                    if (data.content === undefined) {\r\n                        data.content = [];\r\n                    }\r\n                    if (data.config === undefined) {\r\n                        data.config = [];\r\n                    }\r\n                    if (data.tags === undefined) {\r\n                        data.tags = [];\r\n                    }\r\n                    if (append) {\r\n                        for (i = 0; i < content.length; i++) {\r\n                            if (content[i]) {\r\n                                data.content.push(content[i]);\r\n                            }\r\n                        }\r\n                        for (i = 0; i < config.length; i++) {\r\n                            if (config[i]) {\r\n                                data.config.push(config[i]);\r\n                            }\r\n                        }\r\n                        for (i = 0; i < tags.length; i++) {\r\n                            if (tags[i]) {\r\n                                data.tags.push(tags[i]);\r\n                            }\r\n                        }\r\n                    } else {\r\n                        data.content = content;\r\n                        data.config = config;\r\n                        data.tags = tags;\r\n                    }\r\n                    self.previewCache.clean(data);\r\n                },\r\n                unset: function (index) {\r\n                    var chk = self.previewCache.count(), rev = self.reversePreviewOrder;\r\n                    if (!chk) {\r\n                        return;\r\n                    }\r\n                    if (chk === 1) {\r\n                        self.previewCache.data.content = [];\r\n                        self.previewCache.data.config = [];\r\n                        self.previewCache.data.tags = [];\r\n                        self.initialPreview = [];\r\n                        self.initialPreviewConfig = [];\r\n                        self.initialPreviewThumbTags = [];\r\n                        return;\r\n                    }\r\n                    self.previewCache.data.content = $h.spliceArray(self.previewCache.data.content, index, rev);\r\n                    self.previewCache.data.config = $h.spliceArray(self.previewCache.data.config, index, rev);\r\n                    self.previewCache.data.tags = $h.spliceArray(self.previewCache.data.tags, index, rev);\r\n                    var data = $.extend(true, {}, self.previewCache.data);\r\n                    self.previewCache.clean(data);\r\n                },\r\n                out: function () {\r\n                    var html = '', caption, len = self.previewCache.count(), i, content;\r\n                    if (len === 0) {\r\n                        return {content: '', caption: ''};\r\n                    }\r\n                    for (i = 0; i < len; i++) {\r\n                        content = self.previewCache.get(i);\r\n                        html = self.reversePreviewOrder ? (content + html) : (html + content);\r\n                    }\r\n                    caption = self._getMsgSelected(len);\r\n                    return {content: html, caption: caption};\r\n                },\r\n                footer: function (i, isDisabled, size) {\r\n                    var data = self.previewCache.data || {};\r\n                    if ($h.isEmpty(data.content)) {\r\n                        return '';\r\n                    }\r\n                    if ($h.isEmpty(data.config) || $h.isEmpty(data.config[i])) {\r\n                        data.config[i] = {};\r\n                    }\r\n                    isDisabled = isDisabled === undefined ? true : isDisabled;\r\n                    var config = data.config[i], caption = $h.ifSet('caption', config), a,\r\n                        width = $h.ifSet('width', config, 'auto'), url = $h.ifSet('url', config, false),\r\n                        key = $h.ifSet('key', config, null), fileId = $h.ifSet('fileId', config, null),\r\n                        fs = self.fileActionSettings, initPreviewShowDel = self.initialPreviewShowDelete || false,\r\n                        downloadInitialUrl = !self.initialPreviewDownloadUrl ? '' :\r\n                            self.initialPreviewDownloadUrl + '?key=' + key + (fileId ? '&fileId=' + fileId : ''),\r\n                        dUrl = config.downloadUrl || downloadInitialUrl,\r\n                        dFil = config.filename || config.caption || '',\r\n                        initPreviewShowDwl = !!(dUrl),\r\n                        sDel = $h.ifSet('showRemove', config, initPreviewShowDel),\r\n                        sDwl = $h.ifSet('showDownload', config, $h.ifSet('showDownload', fs, initPreviewShowDwl)),\r\n                        sZm = $h.ifSet('showZoom', config, $h.ifSet('showZoom', fs, true)),\r\n                        sDrg = $h.ifSet('showDrag', config, $h.ifSet('showDrag', fs, true)),\r\n                        dis = (url === false) && isDisabled;\r\n                    sDwl = sDwl && config.downloadUrl !== false && !!dUrl;\r\n                    a = self._renderFileActions(config, false, sDwl, sDel, sZm, sDrg, dis, url, key, true, dUrl, dFil);\r\n                    return self._getLayoutTemplate('footer').setTokens({\r\n                        'progress': self._renderThumbProgress(),\r\n                        'actions': a,\r\n                        'caption': caption,\r\n                        'size': self._getSize(size),\r\n                        'width': width,\r\n                        'indicator': ''\r\n                    });\r\n                }\r\n            };\r\n            self.previewCache.init();\r\n        },\r\n        _isPdfRendered: function () {\r\n            var self = this, useLib = self.usePdfRenderer,\r\n                flag = typeof useLib === 'function' ? useLib() : !!useLib;\r\n            return flag && self.pdfRendererUrl;\r\n        },\r\n        _handler: function ($el, event, callback) {\r\n            var self = this, ns = self.namespace, ev = event.split(' ').join(ns + ' ') + ns;\r\n            if (!$el || !$el.length) {\r\n                return;\r\n            }\r\n            $el.off(ev).on(ev, callback);\r\n        },\r\n        _encodeURI: function (vUrl) {\r\n            var self = this;\r\n            return self.encodeUrl ? encodeURI(vUrl) : vUrl;\r\n        },\r\n        _log: function (msg, tokens) {\r\n            var self = this, id = self.$element.attr('id');\r\n            if (!self.showConsoleLogs) {\r\n                return;\r\n            }\r\n            if (id) {\r\n                msg = '\"' + id + '\": ' + msg;\r\n            }\r\n            msg = 'bootstrap-fileinput: ' + msg;\r\n            if (typeof tokens === 'object') {\r\n                msg = msg.setTokens(tokens);\r\n            }\r\n            if (window.console && typeof window.console.log !== 'undefined') {\r\n                window.console.log(msg);\r\n            } else {\r\n                window.alert(msg);\r\n            }\r\n        },\r\n        _validate: function () {\r\n            var self = this, status = self.$element.attr('type') === 'file';\r\n            if (!status) {\r\n                self._log($h.logMessages.badInputType);\r\n            }\r\n            return status;\r\n        },\r\n        _errorsExist: function () {\r\n            var self = this, $err, $errList = self.$errorContainer.find('li');\r\n            if ($errList.length) {\r\n                return true;\r\n            }\r\n            $err = $(document.createElement('div')).html(self.$errorContainer.html());\r\n            $err.find('.kv-error-close').remove();\r\n            $err.find('ul').remove();\r\n            return !!$.trim($err.text()).length;\r\n        },\r\n        _errorHandler: function (evt, caption) {\r\n            var self = this, err = evt.target.error, showError = function (msg) {\r\n                self._showError(msg.replace('{name}', caption));\r\n            };\r\n            /** @namespace err.NOT_FOUND_ERR */\r\n            /** @namespace err.SECURITY_ERR */\r\n            /** @namespace err.NOT_READABLE_ERR */\r\n            if (err.code === err.NOT_FOUND_ERR) {\r\n                showError(self.msgFileNotFound);\r\n            } else {\r\n                if (err.code === err.SECURITY_ERR) {\r\n                    showError(self.msgFileSecured);\r\n                } else {\r\n                    if (err.code === err.NOT_READABLE_ERR) {\r\n                        showError(self.msgFileNotReadable);\r\n                    } else {\r\n                        if (err.code === err.ABORT_ERR) {\r\n                            showError(self.msgFilePreviewAborted);\r\n                        } else {\r\n                            showError(self.msgFilePreviewError);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        _addError: function (msg) {\r\n            var self = this, $error = self.$errorContainer;\r\n            if (msg && $error.length) {\r\n                $error.html(self.errorCloseButton + msg);\r\n                self._handler($error.find('.kv-error-close'), 'click', function () {\r\n                    setTimeout(function () {\r\n                        if (self.showPreview && !self.getFrames().length) {\r\n                            self.clear();\r\n                        }\r\n                        $error.fadeOut('slow');\r\n                    }, self.processDelay);\r\n                });\r\n            }\r\n        },\r\n        _setValidationError: function (css) {\r\n            var self = this;\r\n            css = (css ? css + ' ' : '') + 'has-error';\r\n            self.$container.removeClass(css).addClass('has-error');\r\n            $h.addCss(self.$captionContainer, 'is-invalid');\r\n        },\r\n        _resetErrors: function (fade) {\r\n            var self = this, $error = self.$errorContainer;\r\n            self.isError = false;\r\n            self.$container.removeClass('has-error');\r\n            self.$captionContainer.removeClass('is-invalid');\r\n            $error.html('');\r\n            if (fade) {\r\n                $error.fadeOut('slow');\r\n            } else {\r\n                $error.hide();\r\n            }\r\n        },\r\n        _showFolderError: function (folders) {\r\n            var self = this, $error = self.$errorContainer, msg;\r\n            if (!folders) {\r\n                return;\r\n            }\r\n            if (!self.isAjaxUpload) {\r\n                self._clearFileInput();\r\n            }\r\n            msg = self.msgFoldersNotAllowed.replace('{n}', folders);\r\n            self._addError(msg);\r\n            self._setValidationError();\r\n            $error.fadeIn(self.fadeDelay);\r\n            self._raise('filefoldererror', [folders, msg]);\r\n        },\r\n        _showFileError: function (msg, params, event) {\r\n            var self = this, $error = self.$errorContainer, ev = event || 'fileuploaderror',\r\n                fId = params && params.fileId || '', e = params && params.id ?\r\n                '<li data-thumb-id=\"' + params.id + '\" data-file-id=\"' + fId + '\">' + msg + '</li>' : '<li>' + msg + '</li>';\r\n\r\n            if ($error.find('ul').length === 0) {\r\n                self._addError('<ul>' + e + '</ul>');\r\n            } else {\r\n                $error.find('ul').append(e);\r\n            }\r\n            $error.fadeIn(self.fadeDelay);\r\n            self._raise(ev, [params, msg]);\r\n            self._setValidationError('file-input-new');\r\n            return true;\r\n        },\r\n        _showError: function (msg, params, event) {\r\n            var self = this, $error = self.$errorContainer, ev = event || 'fileerror';\r\n            params = params || {};\r\n            params.reader = self.reader;\r\n            self._addError(msg);\r\n            $error.fadeIn(self.fadeDelay);\r\n            self._raise(ev, [params, msg]);\r\n            if (!self.isAjaxUpload) {\r\n                self._clearFileInput();\r\n            }\r\n            self._setValidationError('file-input-new');\r\n            self.$btnUpload.attr('disabled', true);\r\n            return true;\r\n        },\r\n        _noFilesError: function (params) {\r\n            var self = this, label = self.minFileCount > 1 ? self.filePlural : self.fileSingle,\r\n                msg = self.msgFilesTooLess.replace('{n}', self.minFileCount).replace('{files}', label),\r\n                $error = self.$errorContainer;\r\n            msg = '<li>' + msg + '</li>';\r\n            if ($error.find('ul').length === 0) {\r\n                self._addError('<ul>' + msg + '</ul>');\r\n            } else {\r\n                $error.find('ul').append(msg);\r\n            }\r\n            self.isError = true;\r\n            self._updateFileDetails(0);\r\n            $error.fadeIn(self.fadeDelay);\r\n            self._raise('fileerror', [params, msg]);\r\n            self._clearFileInput();\r\n            self._setValidationError();\r\n        },\r\n        _parseError: function (operation, jqXHR, errorThrown, fileName) {\r\n            /** @namespace jqXHR.responseJSON */\r\n            var self = this, errMsg = $.trim(errorThrown + ''), textPre,\r\n                text = jqXHR.responseJSON !== undefined && jqXHR.responseJSON.error !== undefined ?\r\n                    jqXHR.responseJSON.error : jqXHR.responseText;\r\n            if (self.cancelling && self.msgUploadAborted) {\r\n                errMsg = self.msgUploadAborted;\r\n            }\r\n            if (self.showAjaxErrorDetails && text) {\r\n                text = $.trim(text.replace(/\\n\\s*\\n/g, '\\n'));\r\n                textPre = text.length ? '<pre>' + text + '</pre>' : '';\r\n                errMsg += errMsg ? textPre : text;\r\n            }\r\n            if (!errMsg) {\r\n                errMsg = self.msgAjaxError.replace('{operation}', operation);\r\n            }\r\n            self.cancelling = false;\r\n            return fileName ? '<b>' + fileName + ': </b>' + errMsg : errMsg;\r\n        },\r\n        _parseFileType: function (type, name) {\r\n            var self = this, isValid, vType, cat, i, types = self.allowedPreviewTypes || [];\r\n            if (type === 'application/text-plain') {\r\n                return 'text';\r\n            }\r\n            for (i = 0; i < types.length; i++) {\r\n                cat = types[i];\r\n                isValid = self.fileTypeSettings[cat];\r\n                vType = isValid(type, name) ? cat : '';\r\n                if (!$h.isEmpty(vType)) {\r\n                    return vType;\r\n                }\r\n            }\r\n            return 'other';\r\n        },\r\n        _getPreviewIcon: function (fname) {\r\n            var self = this, ext, out = null;\r\n            if (fname && fname.indexOf('.') > -1) {\r\n                ext = fname.split('.').pop();\r\n                if (self.previewFileIconSettings) {\r\n                    out = self.previewFileIconSettings[ext] || self.previewFileIconSettings[ext.toLowerCase()] || null;\r\n                }\r\n                if (self.previewFileExtSettings) {\r\n                    $.each(self.previewFileExtSettings, function (key, func) {\r\n                        if (self.previewFileIconSettings[key] && func(ext)) {\r\n                            out = self.previewFileIconSettings[key];\r\n                            //noinspection UnnecessaryReturnStatementJS\r\n                            return;\r\n                        }\r\n                    });\r\n                }\r\n            }\r\n            return out || self.previewFileIcon;\r\n        },\r\n        _parseFilePreviewIcon: function (content, fname) {\r\n            var self = this, icn = self._getPreviewIcon(fname), out = content;\r\n            if (out.indexOf('{previewFileIcon}') > -1) {\r\n                out = out.setTokens({'previewFileIconClass': self.previewFileIconClass, 'previewFileIcon': icn});\r\n            }\r\n            return out;\r\n        },\r\n        _raise: function (event, params) {\r\n            var self = this, e = $.Event(event);\r\n            if (params !== undefined) {\r\n                self.$element.trigger(e, params);\r\n            } else {\r\n                self.$element.trigger(e);\r\n            }\r\n            if (e.isDefaultPrevented() || e.result === false) {\r\n                return false;\r\n            }\r\n            switch (event) {\r\n                // ignore these events\r\n                case 'filebatchuploadcomplete':\r\n                case 'filebatchuploadsuccess':\r\n                case 'fileuploaded':\r\n                case 'fileclear':\r\n                case 'filecleared':\r\n                case 'filereset':\r\n                case 'fileerror':\r\n                case 'filefoldererror':\r\n                case 'fileuploaderror':\r\n                case 'filebatchuploaderror':\r\n                case 'filedeleteerror':\r\n                case 'filecustomerror':\r\n                case 'filesuccessremove':\r\n                    break;\r\n                // receive data response via `filecustomerror` event`\r\n                default:\r\n                    if (!self.ajaxAborted) {\r\n                        self.ajaxAborted = e.result;\r\n                    }\r\n                    break;\r\n            }\r\n            return true;\r\n        },\r\n        _listenFullScreen: function (isFullScreen) {\r\n            var self = this, $modal = self.$modal, $btnFull, $btnBord;\r\n            if (!$modal || !$modal.length) {\r\n                return;\r\n            }\r\n            $btnFull = $modal && $modal.find('.btn-fullscreen');\r\n            $btnBord = $modal && $modal.find('.btn-borderless');\r\n            if (!$btnFull.length || !$btnBord.length) {\r\n                return;\r\n            }\r\n            $btnFull.removeClass('active').attr('aria-pressed', 'false');\r\n            $btnBord.removeClass('active').attr('aria-pressed', 'false');\r\n            if (isFullScreen) {\r\n                $btnFull.addClass('active').attr('aria-pressed', 'true');\r\n            } else {\r\n                $btnBord.addClass('active').attr('aria-pressed', 'true');\r\n            }\r\n            if ($modal.hasClass('file-zoom-fullscreen')) {\r\n                self._maximizeZoomDialog();\r\n            } else {\r\n                if (isFullScreen) {\r\n                    self._maximizeZoomDialog();\r\n                } else {\r\n                    $btnBord.removeClass('active').attr('aria-pressed', 'false');\r\n                }\r\n            }\r\n        },\r\n        _listen: function () {\r\n            var self = this, $el = self.$element, $form = self.$form, $cont = self.$container, fullScreenEvents;\r\n            self._handler($el, 'click', function (e) {\r\n                if ($el.hasClass('file-no-browse')) {\r\n                    if ($el.data('zoneClicked')) {\r\n                        $el.data('zoneClicked', false);\r\n                    } else {\r\n                        e.preventDefault();\r\n                    }\r\n                }\r\n            });\r\n            self._handler($el, 'change', $.proxy(self._change, self));\r\n            if (self.showBrowse) {\r\n                self._handler(self.$btnFile, 'click', $.proxy(self._browse, self));\r\n            }\r\n            self._handler($cont.find('.fileinput-remove:not([disabled])'), 'click', $.proxy(self.clear, self));\r\n            self._handler($cont.find('.fileinput-cancel'), 'click', $.proxy(self.cancel, self));\r\n            self._handler($cont.find('.fileinput-pause'), 'click', $.proxy(self.pause, self));\r\n            self._initDragDrop();\r\n            self._handler($form, 'reset', $.proxy(self.clear, self));\r\n            if (!self.isAjaxUpload) {\r\n                self._handler($form, 'submit', $.proxy(self._submitForm, self));\r\n            }\r\n            self._handler(self.$container.find('.fileinput-upload'), 'click', $.proxy(self._uploadClick, self));\r\n            self._handler($(window), 'resize', function () {\r\n                self._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight);\r\n            });\r\n            fullScreenEvents = 'webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange';\r\n            self._handler($(document), fullScreenEvents, function () {\r\n                self._listenFullScreen($h.checkFullScreen());\r\n            });\r\n            self._autoFitContent();\r\n            self._initClickable();\r\n            self._refreshPreview();\r\n        },\r\n        _autoFitContent: function () {\r\n            var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,\r\n                self = this, config = width < 400 ? (self.previewSettingsSmall || self.defaults.previewSettingsSmall) :\r\n                (self.previewSettings || self.defaults.previewSettings), sel;\r\n            $.each(config, function (cat, settings) {\r\n                sel = '.file-preview-frame .file-preview-' + cat;\r\n                self.$preview.find(sel + '.kv-preview-data,' + sel + ' .kv-preview-data').css(settings);\r\n            });\r\n        },\r\n        _scanDroppedItems: function (item, files, path) {\r\n            path = path || '';\r\n            var self = this, i, dirReader, readDir, errorHandler = function (e) {\r\n                self._log($h.logMessages.badDroppedFiles);\r\n                self._log(e);\r\n            };\r\n            if (item.isFile) {\r\n                item.file(function (file) {\r\n                    files.push(file);\r\n                }, errorHandler);\r\n            } else {\r\n                if (item.isDirectory) {\r\n                    dirReader = item.createReader();\r\n                    readDir = function () {\r\n                        dirReader.readEntries(function (entries) {\r\n                            if (entries && entries.length > 0) {\r\n                                for (i = 0; i < entries.length; i++) {\r\n                                    self._scanDroppedItems(entries[i], files, path + item.name + '/');\r\n                                }\r\n                                // recursively call readDir() again, since browser can only handle first 100 entries.\r\n                                readDir();\r\n                            }\r\n                            return null;\r\n                        }, errorHandler);\r\n                    };\r\n                    readDir();\r\n                }\r\n            }\r\n\r\n        },\r\n        _initDragDrop: function () {\r\n            var self = this, $zone = self.$dropZone;\r\n            if (self.dropZoneEnabled && self.showPreview) {\r\n                self._handler($zone, 'dragenter dragover', $.proxy(self._zoneDragEnter, self));\r\n                self._handler($zone, 'dragleave', $.proxy(self._zoneDragLeave, self));\r\n                self._handler($zone, 'drop', $.proxy(self._zoneDrop, self));\r\n                self._handler($(document), 'dragenter dragover drop', self._zoneDragDropInit);\r\n            }\r\n        },\r\n        _zoneDragDropInit: function (e) {\r\n            e.stopPropagation();\r\n            e.preventDefault();\r\n        },\r\n        _zoneDragEnter: function (e) {\r\n            var self = this, dataTransfer = e.originalEvent.dataTransfer,\r\n                hasFiles = $.inArray('Files', dataTransfer.types) > -1;\r\n            self._zoneDragDropInit(e);\r\n            if (self.isDisabled || !hasFiles) {\r\n                e.originalEvent.dataTransfer.effectAllowed = 'none';\r\n                e.originalEvent.dataTransfer.dropEffect = 'none';\r\n                return;\r\n            }\r\n            if (self._raise('fileDragEnter', {'sourceEvent': e, 'files': dataTransfer.types.Files})) {\r\n                $h.addCss(self.$dropZone, 'file-highlighted');\r\n            }\r\n        },\r\n        _zoneDragLeave: function (e) {\r\n            var self = this;\r\n            self._zoneDragDropInit(e);\r\n            if (self.isDisabled) {\r\n                return;\r\n            }\r\n            if (self._raise('fileDragLeave', {'sourceEvent': e})) {\r\n                self.$dropZone.removeClass('file-highlighted');\r\n            }\r\n\r\n        },\r\n        _zoneDrop: function (e) {\r\n            /** @namespace e.originalEvent.dataTransfer */\r\n            var self = this, i, $el = self.$element, dataTransfer = e.originalEvent.dataTransfer,\r\n                files = dataTransfer.files, items = dataTransfer.items, folders = $h.getDragDropFolders(items),\r\n                processFiles = function () {\r\n                    if (!self.isAjaxUpload) {\r\n                        self.changeTriggered = true;\r\n                        $el.get(0).files = files;\r\n                        setTimeout(function () {\r\n                            self.changeTriggered = false;\r\n                            $el.trigger('change' + self.namespace);\r\n                        }, self.processDelay);\r\n                    } else {\r\n                        self._change(e, files);\r\n                    }\r\n                    self.$dropZone.removeClass('file-highlighted');\r\n                };\r\n            e.preventDefault();\r\n            if (self.isDisabled || $h.isEmpty(files)) {\r\n                return;\r\n            }\r\n            if (!self._raise('fileDragDrop', {'sourceEvent': e, 'files': files})) {\r\n                return;\r\n            }\r\n            if (folders > 0) {\r\n                if (!self.isAjaxUpload) {\r\n                    self._showFolderError(folders);\r\n                    return;\r\n                }\r\n                files = [];\r\n                for (i = 0; i < items.length; i++) {\r\n                    var item = items[i].webkitGetAsEntry();\r\n                    if (item) {\r\n                        self._scanDroppedItems(item, files);\r\n                    }\r\n                }\r\n                setTimeout(function () {\r\n                    processFiles();\r\n                }, 500);\r\n            } else {\r\n                processFiles();\r\n            }\r\n        },\r\n        _uploadClick: function (e) {\r\n            var self = this, $btn = self.$container.find('.fileinput-upload'), $form,\r\n                isEnabled = !$btn.hasClass('disabled') && $h.isEmpty($btn.attr('disabled'));\r\n            if (e && e.isDefaultPrevented()) {\r\n                return;\r\n            }\r\n            if (!self.isAjaxUpload) {\r\n                if (isEnabled && $btn.attr('type') !== 'submit') {\r\n                    $form = $btn.closest('form');\r\n                    // downgrade to normal form submit if possible\r\n                    if ($form.length) {\r\n                        $form.trigger('submit');\r\n                    }\r\n                    e.preventDefault();\r\n                }\r\n                return;\r\n            }\r\n            e.preventDefault();\r\n            if (isEnabled) {\r\n                self.upload();\r\n            }\r\n        },\r\n        _submitForm: function () {\r\n            var self = this;\r\n            return self._isFileSelectionValid() && !self._abort({});\r\n        },\r\n        _clearPreview: function () {\r\n            var self = this,\r\n                $thumbs = self.showUploadedThumbs ? self.getFrames(':not(.file-preview-success)') : self.getFrames();\r\n            $thumbs.each(function () {\r\n                var $thumb = $(this), id = $thumb.attr('id'), $zoom = self._getZoom(id);\r\n                $thumb.remove();\r\n                $h.cleanZoomCache($zoom);\r\n            });\r\n            if (!self.getFrames().length || !self.showPreview) {\r\n                self._resetUpload();\r\n            }\r\n            self._validateDefaultPreview();\r\n        },\r\n        _initSortable: function () {\r\n            var self = this, $el = self.$preview, settings, selector = '.' + $h.SORT_CSS,\r\n                rev = self.reversePreviewOrder;\r\n            if (!window.KvSortable || $el.find(selector).length === 0) {\r\n                return;\r\n            }\r\n            //noinspection JSUnusedGlobalSymbols\r\n            settings = {\r\n                handle: '.drag-handle-init',\r\n                dataIdAttr: 'data-preview-id',\r\n                scroll: false,\r\n                draggable: selector,\r\n                onSort: function (e) {\r\n                    var oldIndex = e.oldIndex, newIndex = e.newIndex, i = 0;\r\n                    self.initialPreview = $h.moveArray(self.initialPreview, oldIndex, newIndex, rev);\r\n                    self.initialPreviewConfig = $h.moveArray(self.initialPreviewConfig, oldIndex, newIndex, rev);\r\n                    self.previewCache.init();\r\n                    self.getFrames('.file-preview-initial').each(function () {\r\n                        $(this).attr('data-fileindex', $h.INIT_FLAG + i);\r\n                        i++;\r\n                    });\r\n                    self._raise('filesorted', {\r\n                        previewId: $(e.item).attr('id'),\r\n                        'oldIndex': oldIndex,\r\n                        'newIndex': newIndex,\r\n                        stack: self.initialPreviewConfig\r\n                    });\r\n                }\r\n            };\r\n            if ($el.data('kvsortable')) {\r\n                $el.kvsortable('destroy');\r\n            }\r\n            $.extend(true, settings, self.fileActionSettings.dragSettings);\r\n            $el.kvsortable(settings);\r\n        },\r\n        _setPreviewContent: function (content) {\r\n            var self = this;\r\n            self.$preview.html(content);\r\n            self._autoFitContent();\r\n        },\r\n        _initPreviewImageOrientations: function () {\r\n            var self = this, i = 0;\r\n            if (!self.autoOrientImageInitial) {\r\n                return;\r\n            }\r\n            self.getFrames('.file-preview-initial').each(function () {\r\n                var $thumb = $(this), $img, $zoomImg, id, config = self.initialPreviewConfig[i];\r\n                /** @namespace config.exif */\r\n                if (config && config.exif && config.exif.Orientation) {\r\n                    id = $thumb.attr('id');\r\n                    $img = $thumb.find('>.kv-file-content img');\r\n                    $zoomImg = self._getZoom(id, ' >.kv-file-content img');\r\n                    self.setImageOrientation($img, $zoomImg, config.exif.Orientation, $thumb);\r\n                }\r\n                i++;\r\n            });\r\n        },\r\n        _initPreview: function (isInit) {\r\n            var self = this, cap = self.initialCaption || '', out;\r\n            if (!self.previewCache.count(true)) {\r\n                self._clearPreview();\r\n                if (isInit) {\r\n                    self._setCaption(cap);\r\n                } else {\r\n                    self._initCaption();\r\n                }\r\n                return;\r\n            }\r\n            out = self.previewCache.out();\r\n            cap = isInit && self.initialCaption ? self.initialCaption : out.caption;\r\n            self._setPreviewContent(out.content);\r\n            self._setInitThumbAttr();\r\n            self._setCaption(cap);\r\n            self._initSortable();\r\n            if (!$h.isEmpty(out.content)) {\r\n                self.$container.removeClass('file-input-new');\r\n            }\r\n            self._initPreviewImageOrientations();\r\n        },\r\n        _getZoomButton: function (type) {\r\n            var self = this, label = self.previewZoomButtonIcons[type], css = self.previewZoomButtonClasses[type],\r\n                title = ' title=\"' + (self.previewZoomButtonTitles[type] || '') + '\" ',\r\n                params = title + (type === 'close' ? ' data-dismiss=\"modal\" aria-hidden=\"true\"' : '');\r\n            if (type === 'fullscreen' || type === 'borderless' || type === 'toggleheader') {\r\n                params += ' data-toggle=\"button\" aria-pressed=\"false\" autocomplete=\"off\"';\r\n            }\r\n            return '<button type=\"button\" class=\"' + css + ' btn-' + type + '\"' + params + '>' + label + '</button>';\r\n        },\r\n        _getModalContent: function () {\r\n            var self = this;\r\n            return self._getLayoutTemplate('modal').setTokens({\r\n                'rtl': self.rtl ? ' kv-rtl' : '',\r\n                'zoomFrameClass': self.frameClass,\r\n                'heading': self.msgZoomModalHeading,\r\n                'prev': self._getZoomButton('prev'),\r\n                'next': self._getZoomButton('next'),\r\n                'toggleheader': self._getZoomButton('toggleheader'),\r\n                'fullscreen': self._getZoomButton('fullscreen'),\r\n                'borderless': self._getZoomButton('borderless'),\r\n                'close': self._getZoomButton('close')\r\n            });\r\n        },\r\n        _listenModalEvent: function (event) {\r\n            var self = this, $modal = self.$modal, getParams = function (e) {\r\n                return {\r\n                    sourceEvent: e,\r\n                    previewId: $modal.data('previewId'),\r\n                    modal: $modal\r\n                };\r\n            };\r\n            $modal.on(event + '.bs.modal', function (e) {\r\n                var $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless');\r\n                self._raise('filezoom' + event, getParams(e));\r\n                if (event === 'shown') {\r\n                    $btnBord.removeClass('active').attr('aria-pressed', 'false');\r\n                    $btnFull.removeClass('active').attr('aria-pressed', 'false');\r\n                    if ($modal.hasClass('file-zoom-fullscreen')) {\r\n                        self._maximizeZoomDialog();\r\n                        if ($h.checkFullScreen()) {\r\n                            $btnFull.addClass('active').attr('aria-pressed', 'true');\r\n                        } else {\r\n                            $btnBord.addClass('active').attr('aria-pressed', 'true');\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        },\r\n        _initZoom: function () {\r\n            var self = this, $dialog, modalMain = self._getLayoutTemplate('modalMain'), modalId = '#' + $h.MODAL_ID;\r\n            if (!self.showPreview) {\r\n                return;\r\n            }\r\n            self.$modal = $(modalId);\r\n            if (!self.$modal || !self.$modal.length) {\r\n                $dialog = $(document.createElement('div')).html(modalMain).insertAfter(self.$container);\r\n                self.$modal = $(modalId).insertBefore($dialog);\r\n                $dialog.remove();\r\n            }\r\n            $h.initModal(self.$modal);\r\n            self.$modal.html(self._getModalContent());\r\n            $.each($h.MODAL_EVENTS, function (key, event) {\r\n                self._listenModalEvent(event);\r\n            });\r\n        },\r\n        _initZoomButtons: function () {\r\n            var self = this, previewId = self.$modal.data('previewId') || '', $first, $last,\r\n                thumbs = self.getFrames().toArray(), len = thumbs.length, $prev = self.$modal.find('.btn-prev'),\r\n                $next = self.$modal.find('.btn-next');\r\n            if (thumbs.length < 2) {\r\n                $prev.hide();\r\n                $next.hide();\r\n                return;\r\n            } else {\r\n                $prev.show();\r\n                $next.show();\r\n            }\r\n            if (!len) {\r\n                return;\r\n            }\r\n            $first = $(thumbs[0]);\r\n            $last = $(thumbs[len - 1]);\r\n            $prev.removeAttr('disabled');\r\n            $next.removeAttr('disabled');\r\n            if ($first.length && $first.attr('id') === previewId) {\r\n                $prev.attr('disabled', true);\r\n            }\r\n            if ($last.length && $last.attr('id') === previewId) {\r\n                $next.attr('disabled', true);\r\n            }\r\n        },\r\n        _maximizeZoomDialog: function () {\r\n            var self = this, $modal = self.$modal, $head = $modal.find('.modal-header:visible'),\r\n                $foot = $modal.find('.modal-footer:visible'), $body = $modal.find('.modal-body'),\r\n                h = $(window).height(), diff = 0;\r\n            $modal.addClass('file-zoom-fullscreen');\r\n            if ($head && $head.length) {\r\n                h -= $head.outerHeight(true);\r\n            }\r\n            if ($foot && $foot.length) {\r\n                h -= $foot.outerHeight(true);\r\n            }\r\n            if ($body && $body.length) {\r\n                diff = $body.outerHeight(true) - $body.height();\r\n                h -= diff;\r\n            }\r\n            $modal.find('.kv-zoom-body').height(h);\r\n        },\r\n        _resizeZoomDialog: function (fullScreen) {\r\n            var self = this, $modal = self.$modal, $btnFull = $modal.find('.btn-fullscreen'),\r\n                $btnBord = $modal.find('.btn-borderless');\r\n            if ($modal.hasClass('file-zoom-fullscreen')) {\r\n                $h.toggleFullScreen(false);\r\n                if (!fullScreen) {\r\n                    if (!$btnFull.hasClass('active')) {\r\n                        $modal.removeClass('file-zoom-fullscreen');\r\n                        self.$modal.find('.kv-zoom-body').css('height', self.zoomModalHeight);\r\n                    } else {\r\n                        $btnFull.removeClass('active').attr('aria-pressed', 'false');\r\n                    }\r\n                } else {\r\n                    if (!$btnFull.hasClass('active')) {\r\n                        $modal.removeClass('file-zoom-fullscreen');\r\n                        self._resizeZoomDialog(true);\r\n                        if ($btnBord.hasClass('active')) {\r\n                            $btnBord.removeClass('active').attr('aria-pressed', 'false');\r\n                        }\r\n                    }\r\n                }\r\n            } else {\r\n                if (!fullScreen) {\r\n                    self._maximizeZoomDialog();\r\n                    return;\r\n                }\r\n                $h.toggleFullScreen(true);\r\n            }\r\n            $modal.focus();\r\n        },\r\n        _setZoomContent: function ($frame, animate) {\r\n            var self = this, $content, tmplt, body, title, $body, $dataEl, config, previewId = $frame.attr('id'),\r\n                $zoomPreview = self._getZoom(previewId), $modal = self.$modal, $tmp,\r\n                $btnFull = $modal.find('.btn-fullscreen'), $btnBord = $modal.find('.btn-borderless'), cap, size,\r\n                $btnTogh = $modal.find('.btn-toggleheader');\r\n            tmplt = $zoomPreview.attr('data-template') || 'generic';\r\n            $content = $zoomPreview.find('.kv-file-content');\r\n            body = $content.length ? $content.html() : '';\r\n            cap = $frame.data('caption') || '';\r\n            size = $frame.data('size') || '';\r\n            title = cap + ' ' + size;\r\n            $modal.find('.kv-zoom-title').attr('title', $('<div/>').html(title).text()).html(title);\r\n            $body = $modal.find('.kv-zoom-body');\r\n            $modal.removeClass('kv-single-content');\r\n            if (animate) {\r\n                $tmp = $body.addClass('file-thumb-loading').clone().insertAfter($body);\r\n                $body.html(body).hide();\r\n                $tmp.fadeOut('fast', function () {\r\n                    $body.fadeIn('fast', function () {\r\n                        $body.removeClass('file-thumb-loading');\r\n                    });\r\n                    $tmp.remove();\r\n                });\r\n            } else {\r\n                $body.html(body);\r\n            }\r\n            config = self.previewZoomSettings[tmplt];\r\n            if (config) {\r\n                $dataEl = $body.find('.kv-preview-data');\r\n                $h.addCss($dataEl, 'file-zoom-detail');\r\n                $.each(config, function (key, value) {\r\n                    $dataEl.css(key, value);\r\n                    if (($dataEl.attr('width') && key === 'width') || ($dataEl.attr('height') && key === 'height')) {\r\n                        $dataEl.removeAttr(key);\r\n                    }\r\n                });\r\n            }\r\n            $modal.data('previewId', previewId);\r\n            self._handler($modal.find('.btn-prev'), 'click', function () {\r\n                self._zoomSlideShow('prev', previewId);\r\n            });\r\n            self._handler($modal.find('.btn-next'), 'click', function () {\r\n                self._zoomSlideShow('next', previewId);\r\n            });\r\n            self._handler($btnFull, 'click', function () {\r\n                self._resizeZoomDialog(true);\r\n            });\r\n            self._handler($btnBord, 'click', function () {\r\n                self._resizeZoomDialog(false);\r\n            });\r\n            self._handler($btnTogh, 'click', function () {\r\n                var $header = $modal.find('.modal-header'), $floatBar = $modal.find('.modal-body .floating-buttons'),\r\n                    ht, $actions = $header.find('.kv-zoom-actions'), resize = function (height) {\r\n                        var $body = self.$modal.find('.kv-zoom-body'), h = self.zoomModalHeight;\r\n                        if ($modal.hasClass('file-zoom-fullscreen')) {\r\n                            h = $body.outerHeight(true);\r\n                            if (!height) {\r\n                                h = h - $header.outerHeight(true);\r\n                            }\r\n                        }\r\n                        $body.css('height', height ? h + height : h);\r\n                    };\r\n                if ($header.is(':visible')) {\r\n                    ht = $header.outerHeight(true);\r\n                    $header.slideUp('slow', function () {\r\n                        $actions.find('.btn').appendTo($floatBar);\r\n                        resize(ht);\r\n                    });\r\n                } else {\r\n                    $floatBar.find('.btn').appendTo($actions);\r\n                    $header.slideDown('slow', function () {\r\n                        resize();\r\n                    });\r\n                }\r\n                $modal.focus();\r\n            });\r\n            self._handler($modal, 'keydown', function (e) {\r\n                var key = e.which || e.keyCode, $prev = $(this).find('.btn-prev'), $next = $(this).find('.btn-next'),\r\n                    vId = $(this).data('previewId'), vPrevKey = self.rtl ? 39 : 37, vNextKey = self.rtl ? 37 : 39;\r\n                if (key === vPrevKey && $prev.length && !$prev.attr('disabled')) {\r\n                    self._zoomSlideShow('prev', vId);\r\n                }\r\n                if (key === vNextKey && $next.length && !$next.attr('disabled')) {\r\n                    self._zoomSlideShow('next', vId);\r\n                }\r\n            });\r\n        },\r\n        _zoomPreview: function ($btn) {\r\n            var self = this, $frame, $modal = self.$modal;\r\n            if (!$btn.length) {\r\n                throw 'Cannot zoom to detailed preview!';\r\n            }\r\n            $h.initModal($modal);\r\n            $modal.html(self._getModalContent());\r\n            $frame = $btn.closest($h.FRAMES);\r\n            self._setZoomContent($frame);\r\n            $modal.modal('show');\r\n            self._initZoomButtons();\r\n        },\r\n        _zoomSlideShow: function (dir, previewId) {\r\n            var self = this, $btn = self.$modal.find('.kv-zoom-actions .btn-' + dir), $targFrame, i, $thumb,\r\n                thumbsData = self.getFrames().toArray(), thumbs = [], len = thumbsData.length, out;\r\n            if ($btn.attr('disabled')) {\r\n                return;\r\n            }\r\n            for (i = 0; i < len; i++) {\r\n                $thumb = $(thumbsData[i]);\r\n                if ($thumb && $thumb.length && $thumb.find('.kv-file-zoom:visible').length) {\r\n                    thumbs.push(thumbsData[i]);\r\n                }\r\n            }\r\n            len = thumbs.length;\r\n            for (i = 0; i < len; i++) {\r\n                if ($(thumbs[i]).attr('id') === previewId) {\r\n                    out = dir === 'prev' ? i - 1 : i + 1;\r\n                    break;\r\n                }\r\n            }\r\n            if (out < 0 || out >= len || !thumbs[out]) {\r\n                return;\r\n            }\r\n            $targFrame = $(thumbs[out]);\r\n            if ($targFrame.length) {\r\n                self._setZoomContent($targFrame, true);\r\n            }\r\n            self._initZoomButtons();\r\n            self._raise('filezoom' + dir, {'previewId': previewId, modal: self.$modal});\r\n        },\r\n        _initZoomButton: function () {\r\n            var self = this;\r\n            self.$preview.find('.kv-file-zoom').each(function () {\r\n                var $el = $(this);\r\n                self._handler($el, 'click', function () {\r\n                    self._zoomPreview($el);\r\n                });\r\n            });\r\n        },\r\n        _inputFileCount: function () {\r\n            return this.$element.get(0).files.length;\r\n        },\r\n        _refreshPreview: function () {\r\n            var self = this, files;\r\n            if ((!self._inputFileCount() && !self.isAjaxUpload) || !self.showPreview || !self.isPreviewable) {\r\n                return;\r\n            }\r\n            if (self.isAjaxUpload) {\r\n                if (self.fileManager.count() > 0) {\r\n                    files = $.extend(true, {}, self.fileManager.stack);\r\n                    self.fileManager.clear();\r\n                    self._clearFileInput();\r\n                } else {\r\n                    files = self.$element.get(0).files;\r\n                }\r\n            } else {\r\n                files = self.$element.get(0).files;\r\n            }\r\n            if (files && files.length) {\r\n                self.readFiles(files);\r\n                self._setFileDropZoneTitle();\r\n            }\r\n        },\r\n        _clearObjects: function ($el) {\r\n            $el.find('video audio').each(function () {\r\n                this.pause();\r\n                $(this).remove();\r\n            });\r\n            $el.find('img object div').each(function () {\r\n                $(this).remove();\r\n            });\r\n        },\r\n        _clearFileInput: function () {\r\n            var self = this, $el = self.$element, $srcFrm, $tmpFrm, $tmpEl;\r\n            if (!self._inputFileCount()) {\r\n                return;\r\n            }\r\n            $srcFrm = $el.closest('form');\r\n            $tmpFrm = $(document.createElement('form'));\r\n            $tmpEl = $(document.createElement('div'));\r\n            $el.before($tmpEl);\r\n            if ($srcFrm.length) {\r\n                $srcFrm.after($tmpFrm);\r\n            } else {\r\n                $tmpEl.after($tmpFrm);\r\n            }\r\n            $tmpFrm.append($el).trigger('reset');\r\n            $tmpEl.before($el).remove();\r\n            $tmpFrm.remove();\r\n        },\r\n        _resetUpload: function () {\r\n            var self = this;\r\n            self.uploadCache = [];\r\n            self.$btnUpload.removeAttr('disabled');\r\n            self._setProgress(0);\r\n            self._hideProgress();\r\n            self._resetErrors(false);\r\n            self._initAjax();\r\n            self.fileManager.clearImages();\r\n            self._resetCanvas();\r\n            if (self.overwriteInitial) {\r\n                self.initialPreview = [];\r\n                self.initialPreviewConfig = [];\r\n                self.initialPreviewThumbTags = [];\r\n                self.previewCache.data = {\r\n                    content: [],\r\n                    config: [],\r\n                    tags: []\r\n                };\r\n            }\r\n        },\r\n        _resetCanvas: function () {\r\n            var self = this;\r\n            if (self.canvas && self.imageCanvasContext) {\r\n                self.imageCanvasContext.clearRect(0, 0, self.canvas.width, self.canvas.height);\r\n            }\r\n        },\r\n        _hasInitialPreview: function () {\r\n            var self = this;\r\n            return !self.overwriteInitial && self.previewCache.count(true);\r\n        },\r\n        _resetPreview: function () {\r\n            var self = this, out, cap;\r\n            if (self.previewCache.count(true)) {\r\n                out = self.previewCache.out();\r\n                self._setPreviewContent(out.content);\r\n                self._setInitThumbAttr();\r\n                cap = self.initialCaption ? self.initialCaption : out.caption;\r\n                self._setCaption(cap);\r\n            } else {\r\n                self._clearPreview();\r\n                self._initCaption();\r\n            }\r\n            if (self.showPreview) {\r\n                self._initZoom();\r\n                self._initSortable();\r\n            }\r\n        },\r\n        _clearDefaultPreview: function () {\r\n            var self = this;\r\n            self.$preview.find('.file-default-preview').remove();\r\n        },\r\n        _validateDefaultPreview: function () {\r\n            var self = this;\r\n            if (!self.showPreview || $h.isEmpty(self.defaultPreviewContent)) {\r\n                return;\r\n            }\r\n            self._setPreviewContent('<div class=\"file-default-preview\">' + self.defaultPreviewContent + '</div>');\r\n            self.$container.removeClass('file-input-new');\r\n            self._initClickable();\r\n        },\r\n        _resetPreviewThumbs: function (isAjax) {\r\n            var self = this, out;\r\n            if (isAjax) {\r\n                self._clearPreview();\r\n                self.clearFileStack();\r\n                return;\r\n            }\r\n            if (self._hasInitialPreview()) {\r\n                out = self.previewCache.out();\r\n                self._setPreviewContent(out.content);\r\n                self._setInitThumbAttr();\r\n                self._setCaption(out.caption);\r\n                self._initPreviewActions();\r\n            } else {\r\n                self._clearPreview();\r\n            }\r\n        },\r\n        _getLayoutTemplate: function (t) {\r\n            var self = this, template = self.layoutTemplates[t];\r\n            if ($h.isEmpty(self.customLayoutTags)) {\r\n                return template;\r\n            }\r\n            return $h.replaceTags(template, self.customLayoutTags);\r\n        },\r\n        _getPreviewTemplate: function (t) {\r\n            var self = this, templates = self.previewTemplates, template = templates[t] || templates.other;\r\n            if ($h.isEmpty(self.customPreviewTags)) {\r\n                return template;\r\n            }\r\n            return $h.replaceTags(template, self.customPreviewTags);\r\n        },\r\n        _getOutData: function (formdata, jqXHR, responseData, filesData) {\r\n            var self = this;\r\n            jqXHR = jqXHR || {};\r\n            responseData = responseData || {};\r\n            filesData = filesData || self.fileManager.list();\r\n            return {\r\n                formdata: formdata,\r\n                files: filesData,\r\n                filenames: self.filenames,\r\n                filescount: self.getFilesCount(),\r\n                extra: self._getExtraData(),\r\n                response: responseData,\r\n                reader: self.reader,\r\n                jqXHR: jqXHR\r\n            };\r\n        },\r\n        _getMsgSelected: function (n) {\r\n            var self = this, strFiles = n === 1 ? self.fileSingle : self.filePlural;\r\n            return n > 0 ? self.msgSelected.replace('{n}', n).replace('{files}', strFiles) : self.msgNoFilesSelected;\r\n        },\r\n        _getFrame: function (id, skipWarning) {\r\n            var self = this, $frame = $h.getFrameElement(self.$preview, id);\r\n            if (self.showPreview && !skipWarning && !$frame.length) {\r\n                self._log($h.logMessages.invalidThumb, {id: id});\r\n            }\r\n            return $frame;\r\n        },\r\n        _getZoom: function (id, selector) {\r\n            var self = this, $frame = $h.getZoomElement(self.$preview, id, selector);\r\n            if (self.showPreview && !$frame.length) {\r\n                self._log($h.logMessages.invalidThumb, {id: id});\r\n            }\r\n            return $frame;\r\n        },\r\n        _getThumbs: function (css) {\r\n            css = css || '';\r\n            return this.getFrames(':not(.file-preview-initial)' + css);\r\n        },\r\n        _getThumbId: function (fileId) {\r\n            var self = this;\r\n            return self.previewInitId + '-' + fileId;\r\n        },\r\n        _getExtraData: function (fileId, index) {\r\n            var self = this, data = self.uploadExtraData;\r\n            if (typeof self.uploadExtraData === 'function') {\r\n                data = self.uploadExtraData(fileId, index);\r\n            }\r\n            return data;\r\n        },\r\n        _initXhr: function (xhrobj, fileId, fileCount) {\r\n            var self = this, fm = self.fileManager, func = function (event) {\r\n                var pct = 0, total = event.total, loaded = event.loaded || event.position,\r\n                    stats = fm.getUploadStats(fileId, loaded, total);\r\n                /** @namespace event.lengthComputable */\r\n                if (event.lengthComputable && !self.enableResumableUpload) {\r\n                    pct = $h.round(loaded / total * 100);\r\n                }\r\n                if (fileId) {\r\n                    self._setFileUploadStats(fileId, pct, fileCount, stats);\r\n                } else {\r\n                    self._setProgress(pct, null, null, self._getStats(stats));\r\n                }\r\n                self._raise('fileajaxprogress', [stats]);\r\n            };\r\n            if (xhrobj.upload) {\r\n                if (self.progressDelay) {\r\n                    func = $h.debounce(func, self.progressDelay);\r\n                }\r\n                xhrobj.upload.addEventListener('progress', func, false);\r\n            }\r\n            return xhrobj;\r\n        },\r\n        _initAjaxSettings: function () {\r\n            var self = this;\r\n            self._ajaxSettings = $.extend(true, {}, self.ajaxSettings);\r\n            self._ajaxDeleteSettings = $.extend(true, {}, self.ajaxDeleteSettings);\r\n        },\r\n        _mergeAjaxCallback: function (funcName, srcFunc, type) {\r\n            var self = this, settings = self._ajaxSettings, flag = self.mergeAjaxCallbacks, targFunc;\r\n            if (type === 'delete') {\r\n                settings = self._ajaxDeleteSettings;\r\n                flag = self.mergeAjaxDeleteCallbacks;\r\n            }\r\n            targFunc = settings[funcName];\r\n            if (flag && typeof targFunc === 'function') {\r\n                if (flag === 'before') {\r\n                    settings[funcName] = function () {\r\n                        targFunc.apply(this, arguments);\r\n                        srcFunc.apply(this, arguments);\r\n                    };\r\n                } else {\r\n                    settings[funcName] = function () {\r\n                        srcFunc.apply(this, arguments);\r\n                        targFunc.apply(this, arguments);\r\n                    };\r\n                }\r\n            } else {\r\n                settings[funcName] = srcFunc;\r\n            }\r\n        },\r\n        _ajaxSubmit: function (fnBefore, fnSuccess, fnComplete, fnError, formdata, fileId, index, vUrl) {\r\n            var self = this, settings, defaults, data, processQueue;\r\n            if (!self._raise('filepreajax', [formdata, fileId, index])) {\r\n                return;\r\n            }\r\n            formdata.append('initialPreview', JSON.stringify(self.initialPreview));\r\n            formdata.append('initialPreviewConfig', JSON.stringify(self.initialPreviewConfig));\r\n            formdata.append('initialPreviewThumbTags', JSON.stringify(self.initialPreviewThumbTags));\r\n            self._initAjaxSettings();\r\n            self._mergeAjaxCallback('beforeSend', fnBefore);\r\n            self._mergeAjaxCallback('success', fnSuccess);\r\n            self._mergeAjaxCallback('complete', fnComplete);\r\n            self._mergeAjaxCallback('error', fnError);\r\n            vUrl = vUrl || self.uploadUrlThumb || self.uploadUrl;\r\n            if (typeof vUrl === 'function') {\r\n                vUrl = vUrl();\r\n            }\r\n            data = self._getExtraData(fileId, index) || {};\r\n            if (typeof data === 'object') {\r\n                $.each(data, function (key, value) {\r\n                    formdata.append(key, value);\r\n                });\r\n            }\r\n            defaults = {\r\n                xhr: function () {\r\n                    var xhrobj = $.ajaxSettings.xhr();\r\n                    return self._initXhr(xhrobj, fileId, self.fileManager.count());\r\n                },\r\n                url: self._encodeURI(vUrl),\r\n                type: 'POST',\r\n                dataType: 'json',\r\n                data: formdata,\r\n                cache: false,\r\n                processData: false,\r\n                contentType: false\r\n            };\r\n            settings = $.extend(true, {}, defaults, self._ajaxSettings);\r\n            self.ajaxQueue.push(settings);\r\n            processQueue = function () {\r\n                var config, xhr;\r\n                if (self.ajaxCurrentThreads < self.maxAjaxThreads) {\r\n                    config = self.ajaxQueue.shift();\r\n                    if (typeof config !== 'undefined') {\r\n                        self.ajaxCurrentThreads++;\r\n                        xhr = $.ajax(config).done(function () {\r\n                            clearInterval(self.ajaxQueueIntervalId);\r\n                            self.ajaxCurrentThreads--;\r\n                        });\r\n                        self.ajaxRequests.push(xhr);\r\n                    }\r\n                }\r\n            };\r\n            self.ajaxQueueIntervalId = setInterval(processQueue, self.queueDelay);\r\n\r\n        },\r\n        _mergeArray: function (prop, content) {\r\n            var self = this, arr1 = $h.cleanArray(self[prop]), arr2 = $h.cleanArray(content);\r\n            self[prop] = arr1.concat(arr2);\r\n        },\r\n        _initUploadSuccess: function (out, $thumb, allFiles) {\r\n            var self = this, append, data, index, $div, $newCache, content, config, tags, id, i;\r\n            if (!self.showPreview || typeof out !== 'object' || $.isEmptyObject(out)) {\r\n                self._resetCaption();\r\n                return;\r\n            }\r\n            if (out.initialPreview !== undefined && out.initialPreview.length > 0) {\r\n                self.hasInitData = true;\r\n                content = out.initialPreview || [];\r\n                config = out.initialPreviewConfig || [];\r\n                tags = out.initialPreviewThumbTags || [];\r\n                append = out.append === undefined || out.append;\r\n                if (content.length > 0 && !$h.isArray(content)) {\r\n                    content = content.split(self.initialPreviewDelimiter);\r\n                }\r\n                if (content.length) {\r\n                    self._mergeArray('initialPreview', content);\r\n                    self._mergeArray('initialPreviewConfig', config);\r\n                    self._mergeArray('initialPreviewThumbTags', tags);\r\n                }\r\n                if ($thumb !== undefined) {\r\n                    if (!allFiles) {\r\n                        index = self.previewCache.add(content[0], config[0], tags[0], append);\r\n                        data = self.previewCache.get(index, false);\r\n                        $div = $(document.createElement('div')).html(data).hide().insertAfter($thumb);\r\n                        $newCache = $div.find('.kv-zoom-cache');\r\n                        if ($newCache && $newCache.length) {\r\n                            $newCache.insertAfter($thumb);\r\n                        }\r\n                        $thumb.fadeOut('slow', function () {\r\n                            var $newThumb = $div.find('.file-preview-frame');\r\n                            if ($newThumb && $newThumb.length) {\r\n                                $newThumb.insertBefore($thumb).fadeIn('slow').css('display:inline-block');\r\n                            }\r\n                            self._initPreviewActions();\r\n                            self._clearFileInput();\r\n                            $h.cleanZoomCache(self._getZoom($thumb.attr('id')));\r\n                            $thumb.remove();\r\n                            $div.remove();\r\n                            self._initSortable();\r\n                        });\r\n                    } else {\r\n                        id = $thumb.attr('id');\r\n                        i = self._getUploadCacheIndex(id);\r\n                        if (i !== null) {\r\n                            self.uploadCache[i] = {\r\n                                id: id,\r\n                                content: content[0],\r\n                                config: config[0] || [],\r\n                                tags: tags[0] || [],\r\n                                append: append\r\n                            };\r\n                        }\r\n                    }\r\n                } else {\r\n                    self.previewCache.set(content, config, tags, append);\r\n                    self._initPreview();\r\n                    self._initPreviewActions();\r\n                }\r\n            }\r\n            self._resetCaption();\r\n        },\r\n        _getUploadCacheIndex: function (id) {\r\n            var self = this, i, len = self.uploadCache.length, config;\r\n            for (i = 0; i < len; i++) {\r\n                config = self.uploadCache[i];\r\n                if (config.id === id) {\r\n                    return i;\r\n                }\r\n            }\r\n            return null;\r\n        },\r\n        _initSuccessThumbs: function () {\r\n            var self = this;\r\n            if (!self.showPreview) {\r\n                return;\r\n            }\r\n            self._getThumbs($h.FRAMES + '.file-preview-success').each(function () {\r\n                var $thumb = $(this), $remove = $thumb.find('.kv-file-remove');\r\n                $remove.removeAttr('disabled');\r\n                self._handler($remove, 'click', function () {\r\n                    var id = $thumb.attr('id'),\r\n                        out = self._raise('filesuccessremove', [id, $thumb.attr('data-fileindex')]);\r\n                    $h.cleanMemory($thumb);\r\n                    if (out === false) {\r\n                        return;\r\n                    }\r\n                    $thumb.fadeOut('slow', function () {\r\n                        $h.cleanZoomCache(self._getZoom(id));\r\n                        $thumb.remove();\r\n                        if (!self.getFrames().length) {\r\n                            self.reset();\r\n                        }\r\n                    });\r\n                });\r\n            });\r\n        },\r\n        _updateInitialPreview: function () {\r\n            var self = this, u = self.uploadCache;\r\n            if (self.showPreview) {\r\n                $.each(u, function (key, setting) {\r\n                    self.previewCache.add(setting.content, setting.config, setting.tags, setting.append);\r\n                });\r\n                if (self.hasInitData) {\r\n                    self._initPreview();\r\n                    self._initPreviewActions();\r\n                }\r\n            }\r\n        },\r\n        _uploadSingle: function (i, id, isBatch) {\r\n            var self = this, fm = self.fileManager, count = fm.count(), formdata = new FormData(), outData,\r\n                previewId = self._getThumbId(id), $thumb, chkComplete, $btnUpload, $btnDelete,\r\n                hasPostData = count > 0 || !$.isEmptyObject(self.uploadExtraData), uploadFailed, $prog, fnBefore,\r\n                errMsg, fnSuccess, fnComplete, fnError, updateUploadLog, op = self.ajaxOperations.uploadThumb,\r\n                fileObj = fm.getFile(id), params = {id: previewId, index: i, fileId: id},\r\n                fileName = self.fileManager.getFileName(id, true);\r\n            if (self.enableResumableUpload) { // not enabled for resumable uploads\r\n                return;\r\n            }\r\n            if (self.showPreview) {\r\n                $thumb = self.fileManager.getThumb(id);\r\n                $prog = $thumb.find('.file-thumb-progress');\r\n                $btnUpload = $thumb.find('.kv-file-upload');\r\n                $btnDelete = $thumb.find('.kv-file-remove');\r\n                $prog.show();\r\n            }\r\n            if (count === 0 || !hasPostData || (self.showPreview && $btnUpload && $btnUpload.hasClass('disabled')) ||\r\n                self._abort(params)) {\r\n                return;\r\n            }\r\n            updateUploadLog = function () {\r\n                if (!uploadFailed) {\r\n                    fm.removeFile(id);\r\n                } else {\r\n                    fm.errors.push(id);\r\n                }\r\n                fm.setProcessed(id);\r\n                if (fm.isProcessed()) {\r\n                    self.fileBatchCompleted = true;\r\n                }\r\n            };\r\n            chkComplete = function () {\r\n                var $initThumbs;\r\n                if (!self.fileBatchCompleted) {\r\n                    return;\r\n                }\r\n                setTimeout(function () {\r\n                    var triggerReset = fm.count() === 0, errCount = fm.errors.length;\r\n                    self._updateInitialPreview();\r\n                    self.unlock(triggerReset);\r\n                    if (triggerReset) {\r\n                        self._clearFileInput();\r\n                    }\r\n                    $initThumbs = self.$preview.find('.file-preview-initial');\r\n                    if (self.uploadAsync && $initThumbs.length) {\r\n                        $h.addCss($initThumbs, $h.SORT_CSS);\r\n                        self._initSortable();\r\n                    }\r\n                    self._raise('filebatchuploadcomplete', [fm.stack, self._getExtraData()]);\r\n                    if (!self.retryErrorUploads || errCount === 0) {\r\n                        fm.clear();\r\n                    }\r\n                    self._setProgress(101);\r\n                    self.ajaxAborted = false;\r\n                }, self.processDelay);\r\n            };\r\n            fnBefore = function (jqXHR) {\r\n                outData = self._getOutData(formdata, jqXHR);\r\n                fm.initStats(id);\r\n                self.fileBatchCompleted = false;\r\n                if (!isBatch) {\r\n                    self.ajaxAborted = false;\r\n                }\r\n                if (self.showPreview) {\r\n                    if (!$thumb.hasClass('file-preview-success')) {\r\n                        self._setThumbStatus($thumb, 'Loading');\r\n                        $h.addCss($thumb, 'file-uploading');\r\n                    }\r\n                    $btnUpload.attr('disabled', true);\r\n                    $btnDelete.attr('disabled', true);\r\n                }\r\n                if (!isBatch) {\r\n                    self.lock();\r\n                }\r\n                if (fm.errors.indexOf(id) !== -1) {\r\n                    delete fm.errors[id];\r\n                }\r\n                self._raise('filepreupload', [outData, previewId, i]);\r\n                $.extend(true, params, outData);\r\n                if (self._abort(params)) {\r\n                    jqXHR.abort();\r\n                    if (!isBatch) {\r\n                        self._setThumbStatus($thumb, 'New');\r\n                        $thumb.removeClass('file-uploading');\r\n                        $btnUpload.removeAttr('disabled');\r\n                        $btnDelete.removeAttr('disabled');\r\n                        self.unlock();\r\n                    }\r\n                    self._setProgressCancelled();\r\n                }\r\n            };\r\n            fnSuccess = function (data, textStatus, jqXHR) {\r\n                var pid = self.showPreview && $thumb.attr('id') ? $thumb.attr('id') : previewId;\r\n                outData = self._getOutData(formdata, jqXHR, data);\r\n                $.extend(true, params, outData);\r\n                setTimeout(function () {\r\n                    if ($h.isEmpty(data) || $h.isEmpty(data.error)) {\r\n                        if (self.showPreview) {\r\n                            self._setThumbStatus($thumb, 'Success');\r\n                            $btnUpload.hide();\r\n                            self._initUploadSuccess(data, $thumb, isBatch);\r\n                            self._setProgress(101, $prog);\r\n                        }\r\n                        self._raise('fileuploaded', [outData, pid, i]);\r\n                        if (!isBatch) {\r\n                            self.fileManager.remove($thumb);\r\n                        } else {\r\n                            updateUploadLog();\r\n                        }\r\n                    } else {\r\n                        uploadFailed = true;\r\n                        errMsg = self._parseError(op, jqXHR, self.msgUploadError, self.fileManager.getFileName(id));\r\n                        self._showFileError(errMsg, params);\r\n                        self._setPreviewError($thumb, true);\r\n                        if (!self.retryErrorUploads) {\r\n                            $btnUpload.hide();\r\n                        }\r\n                        if (isBatch) {\r\n                            updateUploadLog();\r\n                        }\r\n                        self._setProgress(101, self._getFrame(pid).find('.file-thumb-progress'),\r\n                            self.msgUploadError);\r\n                    }\r\n                }, self.processDelay);\r\n            };\r\n            fnComplete = function () {\r\n                setTimeout(function () {\r\n                    if (self.showPreview) {\r\n                        $btnUpload.removeAttr('disabled');\r\n                        $btnDelete.removeAttr('disabled');\r\n                        $thumb.removeClass('file-uploading');\r\n                    }\r\n                    if (!isBatch) {\r\n                        self.unlock(false);\r\n                        self._clearFileInput();\r\n                    } else {\r\n                        chkComplete();\r\n                    }\r\n                    self._initSuccessThumbs();\r\n                }, self.processDelay);\r\n            };\r\n            fnError = function (jqXHR, textStatus, errorThrown) {\r\n                errMsg = self._parseError(op, jqXHR, errorThrown, self.fileManager.getFileName(id));\r\n                uploadFailed = true;\r\n                setTimeout(function () {\r\n                    var $prog;\r\n                    if (isBatch) {\r\n                        updateUploadLog();\r\n                    }\r\n                    self.fileManager.setProgress(id, 100);\r\n                    self._setPreviewError($thumb, true);\r\n                    if (!self.retryErrorUploads) {\r\n                        $btnUpload.hide();\r\n                    }\r\n                    $.extend(true, params, self._getOutData(formdata, jqXHR));\r\n                    self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));\r\n                    $prog = self.showPreview && $thumb ? $thumb.find('.file-thumb-progress') : '';\r\n                    self._setProgress(101, $prog, self.msgUploadError);\r\n                    self._showFileError(errMsg, params);\r\n                }, self.processDelay);\r\n            };\r\n            formdata.append(self.uploadFileAttr, fileObj.file, fileName);\r\n            self._setUploadData(formdata, {fileId: id});\r\n            self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, formdata, id, i);\r\n        },\r\n        _uploadBatch: function () {\r\n            var self = this, fm = self.fileManager, total = fm.total(), params = {}, fnBefore, fnSuccess, fnError,\r\n                fnComplete, hasPostData = total > 0 || !$.isEmptyObject(self.uploadExtraData), errMsg,\r\n                setAllUploaded, formdata = new FormData(), op = self.ajaxOperations.uploadBatch;\r\n            if (total === 0 || !hasPostData || self._abort(params)) {\r\n                return;\r\n            }\r\n            setAllUploaded = function () {\r\n                self.fileManager.clear();\r\n                self._clearFileInput();\r\n            };\r\n            fnBefore = function (jqXHR) {\r\n                self.lock();\r\n                fm.initStats();\r\n                var outData = self._getOutData(formdata, jqXHR);\r\n                self.ajaxAborted = false;\r\n                if (self.showPreview) {\r\n                    self._getThumbs().each(function () {\r\n                        var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'),\r\n                            $btnDelete = $thumb.find('.kv-file-remove');\r\n                        if (!$thumb.hasClass('file-preview-success')) {\r\n                            self._setThumbStatus($thumb, 'Loading');\r\n                            $h.addCss($thumb, 'file-uploading');\r\n                        }\r\n                        $btnUpload.attr('disabled', true);\r\n                        $btnDelete.attr('disabled', true);\r\n                    });\r\n                }\r\n                self._raise('filebatchpreupload', [outData]);\r\n                if (self._abort(outData)) {\r\n                    jqXHR.abort();\r\n                    self._getThumbs().each(function () {\r\n                        var $thumb = $(this), $btnUpload = $thumb.find('.kv-file-upload'),\r\n                            $btnDelete = $thumb.find('.kv-file-remove');\r\n                        if ($thumb.hasClass('file-preview-loading')) {\r\n                            self._setThumbStatus($thumb, 'New');\r\n                            $thumb.removeClass('file-uploading');\r\n                        }\r\n                        $btnUpload.removeAttr('disabled');\r\n                        $btnDelete.removeAttr('disabled');\r\n                    });\r\n                    self._setProgressCancelled();\r\n                }\r\n            };\r\n            fnSuccess = function (data, textStatus, jqXHR) {\r\n                /** @namespace data.errorkeys */\r\n                var outData = self._getOutData(formdata, jqXHR, data), key = 0,\r\n                    $thumbs = self._getThumbs(':not(.file-preview-success)'),\r\n                    keys = $h.isEmpty(data) || $h.isEmpty(data.errorkeys) ? [] : data.errorkeys;\r\n\r\n                if ($h.isEmpty(data) || $h.isEmpty(data.error)) {\r\n                    self._raise('filebatchuploadsuccess', [outData]);\r\n                    setAllUploaded();\r\n                    if (self.showPreview) {\r\n                        $thumbs.each(function () {\r\n                            var $thumb = $(this);\r\n                            self._setThumbStatus($thumb, 'Success');\r\n                            $thumb.removeClass('file-uploading');\r\n                            $thumb.find('.kv-file-upload').hide().removeAttr('disabled');\r\n                        });\r\n                        self._initUploadSuccess(data);\r\n                    } else {\r\n                        self.reset();\r\n                    }\r\n                    self._setProgress(101);\r\n                } else {\r\n                    if (self.showPreview) {\r\n                        $thumbs.each(function () {\r\n                            var $thumb = $(this);\r\n                            $thumb.removeClass('file-uploading');\r\n                            $thumb.find('.kv-file-upload').removeAttr('disabled');\r\n                            $thumb.find('.kv-file-remove').removeAttr('disabled');\r\n                            if (keys.length === 0 || $.inArray(key, keys) !== -1) {\r\n                                self._setPreviewError($thumb, true);\r\n                                if (!self.retryErrorUploads) {\r\n                                    $thumb.find('.kv-file-upload').hide();\r\n                                    self.fileManager.remove($thumb);\r\n                                }\r\n                            } else {\r\n                                $thumb.find('.kv-file-upload').hide();\r\n                                self._setThumbStatus($thumb, 'Success');\r\n                                self.fileManager.remove($thumb);\r\n                            }\r\n                            if (!$thumb.hasClass('file-preview-error') || self.retryErrorUploads) {\r\n                                key++;\r\n                            }\r\n                        });\r\n                        self._initUploadSuccess(data);\r\n                    }\r\n                    errMsg = self._parseError(op, jqXHR, self.msgUploadError);\r\n                    self._showFileError(errMsg, outData, 'filebatchuploaderror');\r\n                    self._setProgress(101, self.$progress, self.msgUploadError);\r\n                }\r\n            };\r\n            fnComplete = function () {\r\n                self.unlock();\r\n                self._initSuccessThumbs();\r\n                self._clearFileInput();\r\n                self._raise('filebatchuploadcomplete', [self.fileManager.stack, self._getExtraData()]);\r\n            };\r\n            fnError = function (jqXHR, textStatus, errorThrown) {\r\n                var outData = self._getOutData(formdata, jqXHR);\r\n                errMsg = self._parseError(op, jqXHR, errorThrown);\r\n                self._showFileError(errMsg, outData, 'filebatchuploaderror');\r\n                self.uploadFileCount = total - 1;\r\n                if (!self.showPreview) {\r\n                    return;\r\n                }\r\n                self._getThumbs().each(function () {\r\n                    var $thumb = $(this);\r\n                    $thumb.removeClass('file-uploading');\r\n                    if (self.fileManager.getFile($thumb.attr('data-fileid'))) {\r\n                        self._setPreviewError($thumb);\r\n                    }\r\n                });\r\n                self._getThumbs().removeClass('file-uploading');\r\n                self._getThumbs(' .kv-file-upload').removeAttr('disabled');\r\n                self._getThumbs(' .kv-file-delete').removeAttr('disabled');\r\n                self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));\r\n            };\r\n            var ctr = 0;\r\n            $.each(self.fileManager.stack, function (key, data) {\r\n                if (!$h.isEmpty(data.file)) {\r\n                    formdata.append(self.uploadFileAttr, data.file, (data.nameFmt || ('untitled_' + ctr)));\r\n                }\r\n                ctr++;\r\n            });\r\n            self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, formdata);\r\n        },\r\n        _uploadExtraOnly: function () {\r\n            var self = this, params = {}, fnBefore, fnSuccess, fnComplete, fnError, formdata = new FormData(), errMsg,\r\n                op = self.ajaxOperations.uploadExtra;\r\n            if (self._abort(params)) {\r\n                return;\r\n            }\r\n            fnBefore = function (jqXHR) {\r\n                self.lock();\r\n                var outData = self._getOutData(formdata, jqXHR);\r\n                self._raise('filebatchpreupload', [outData]);\r\n                self._setProgress(50);\r\n                params.data = outData;\r\n                params.xhr = jqXHR;\r\n                if (self._abort(params)) {\r\n                    jqXHR.abort();\r\n                    self._setProgressCancelled();\r\n                }\r\n            };\r\n            fnSuccess = function (data, textStatus, jqXHR) {\r\n                var outData = self._getOutData(formdata, jqXHR, data);\r\n                if ($h.isEmpty(data) || $h.isEmpty(data.error)) {\r\n                    self._raise('filebatchuploadsuccess', [outData]);\r\n                    self._clearFileInput();\r\n                    self._initUploadSuccess(data);\r\n                    self._setProgress(101);\r\n                } else {\r\n                    errMsg = self._parseError(op, jqXHR, self.msgUploadError);\r\n                    self._showFileError(errMsg, outData, 'filebatchuploaderror');\r\n                }\r\n            };\r\n            fnComplete = function () {\r\n                self.unlock();\r\n                self._clearFileInput();\r\n                self._raise('filebatchuploadcomplete', [self.fileManager.stack, self._getExtraData()]);\r\n            };\r\n            fnError = function (jqXHR, textStatus, errorThrown) {\r\n                var outData = self._getOutData(formdata, jqXHR);\r\n                errMsg = self._parseError(op, jqXHR, errorThrown);\r\n                params.data = outData;\r\n                self._showFileError(errMsg, outData, 'filebatchuploaderror');\r\n                self._setProgress(101, self.$progress, self.msgAjaxProgressError.replace('{operation}', op));\r\n            };\r\n            self._ajaxSubmit(fnBefore, fnSuccess, fnComplete, fnError, formdata);\r\n        },\r\n        _deleteFileIndex: function ($frame) {\r\n            var self = this, ind = $frame.attr('data-fileindex'), rev = self.reversePreviewOrder;\r\n            if (ind.substring(0, 5) === $h.INIT_FLAG) {\r\n                ind = parseInt(ind.replace($h.INIT_FLAG, ''));\r\n                self.initialPreview = $h.spliceArray(self.initialPreview, ind, rev);\r\n                self.initialPreviewConfig = $h.spliceArray(self.initialPreviewConfig, ind, rev);\r\n                self.initialPreviewThumbTags = $h.spliceArray(self.initialPreviewThumbTags, ind, rev);\r\n                self.getFrames().each(function () {\r\n                    var $nFrame = $(this), nInd = $nFrame.attr('data-fileindex');\r\n                    if (nInd.substring(0, 5) === $h.INIT_FLAG) {\r\n                        nInd = parseInt(nInd.replace($h.INIT_FLAG, ''));\r\n                        if (nInd > ind) {\r\n                            nInd--;\r\n                            $nFrame.attr('data-fileindex', $h.INIT_FLAG + nInd);\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        },\r\n        _resetCaption: function () {\r\n            var self = this;\r\n            setTimeout(function () {\r\n                var cap, n, chk = self.previewCache.count(true), len = self.fileManager.count(), file,\r\n                    incomplete = ':not(.file-preview-success):not(.file-preview-error)',\r\n                    hasThumb = self.showPreview && self.getFrames(incomplete).length;\r\n                if (len === 0 && chk === 0 && !hasThumb) {\r\n                    self.reset();\r\n                } else {\r\n                    n = chk + len;\r\n                    if (n > 1) {\r\n                        cap = self._getMsgSelected(n);\r\n                    } else {\r\n                        file = self.fileManager.getFirstFile();\r\n                        cap = file ? file.nameFmt : '_';\r\n                    }\r\n                    self._setCaption(cap);\r\n                }\r\n            }, self.processDelay);\r\n        },\r\n        _initFileActions: function () {\r\n            var self = this;\r\n            if (!self.showPreview) {\r\n                return;\r\n            }\r\n            self._initZoomButton();\r\n            self.getFrames(' .kv-file-remove').each(function () {\r\n                var $el = $(this), $frame = $el.closest($h.FRAMES), hasError, id = $frame.attr('id'),\r\n                    ind = $frame.attr('data-fileindex'), status;\r\n                self._handler($el, 'click', function () {\r\n                    status = self._raise('filepreremove', [id, ind]);\r\n                    if (status === false || !self._validateMinCount()) {\r\n                        return false;\r\n                    }\r\n                    hasError = $frame.hasClass('file-preview-error');\r\n                    $h.cleanMemory($frame);\r\n                    $frame.fadeOut('slow', function () {\r\n                        $h.cleanZoomCache(self._getZoom(id));\r\n                        self.fileManager.remove($frame);\r\n                        self._clearObjects($frame);\r\n                        $frame.remove();\r\n                        if (id && hasError) {\r\n                            self.$errorContainer.find('li[data-thumb-id=\"' + id + '\"]').fadeOut('fast', function () {\r\n                                $(this).remove();\r\n                                if (!self._errorsExist()) {\r\n                                    self._resetErrors();\r\n                                }\r\n                            });\r\n                        }\r\n                        self._clearFileInput();\r\n                        self._resetCaption();\r\n                        self._raise('fileremoved', [id, ind]);\r\n                    });\r\n                });\r\n            });\r\n            self.getFrames(' .kv-file-upload').each(function () {\r\n                var $el = $(this);\r\n                self._handler($el, 'click', function () {\r\n                    var $frame = $el.closest($h.FRAMES), fileId = $frame.attr('data-fileid');\r\n                    self._hideProgress();\r\n                    if ($frame.hasClass('file-preview-error') && !self.retryErrorUploads) {\r\n                        return;\r\n                    }\r\n                    self._uploadSingle(self.fileManager.getIndex(fileId), fileId, false);\r\n                });\r\n            });\r\n        },\r\n        _initPreviewActions: function () {\r\n            var self = this, $preview = self.$preview, deleteExtraData = self.deleteExtraData || {},\r\n                btnRemove = $h.FRAMES + ' .kv-file-remove', settings = self.fileActionSettings,\r\n                origClass = settings.removeClass, errClass = settings.removeErrorClass,\r\n                resetProgress = function () {\r\n                    var hasFiles = self.isAjaxUpload ? self.previewCache.count(true) : self._inputFileCount();\r\n                    if (!self.getFrames().length && !hasFiles) {\r\n                        self._setCaption('');\r\n                        self.reset();\r\n                        self.initialCaption = '';\r\n                    }\r\n                };\r\n            self._initZoomButton();\r\n            $preview.find(btnRemove).each(function () {\r\n                var $el = $(this), vUrl = $el.data('url') || self.deleteUrl, vKey = $el.data('key'), errMsg, fnBefore,\r\n                    fnSuccess, fnError, op = self.ajaxOperations.deleteThumb;\r\n                if ($h.isEmpty(vUrl) || vKey === undefined) {\r\n                    return;\r\n                }\r\n                if (typeof vUrl === 'function') {\r\n                    vUrl = vUrl();\r\n                }\r\n                var $frame = $el.closest($h.FRAMES), cache = self.previewCache.data, settings, params, config,\r\n                    fileName, extraData, index = $frame.attr('data-fileindex');\r\n                index = parseInt(index.replace($h.INIT_FLAG, ''));\r\n                config = $h.isEmpty(cache.config) && $h.isEmpty(cache.config[index]) ? null : cache.config[index];\r\n                extraData = $h.isEmpty(config) || $h.isEmpty(config.extra) ? deleteExtraData : config.extra;\r\n                fileName = config.filename || config.caption || '';\r\n                if (typeof extraData === 'function') {\r\n                    extraData = extraData();\r\n                }\r\n                params = {id: $el.attr('id'), key: vKey, extra: extraData};\r\n                fnBefore = function (jqXHR) {\r\n                    self.ajaxAborted = false;\r\n                    self._raise('filepredelete', [vKey, jqXHR, extraData]);\r\n                    if (self._abort()) {\r\n                        jqXHR.abort();\r\n                    } else {\r\n                        $el.removeClass(errClass);\r\n                        $h.addCss($frame, 'file-uploading');\r\n                        $h.addCss($el, 'disabled ' + origClass);\r\n                    }\r\n                };\r\n                fnSuccess = function (data, textStatus, jqXHR) {\r\n                    var n, cap;\r\n                    if (!$h.isEmpty(data) && !$h.isEmpty(data.error)) {\r\n                        params.jqXHR = jqXHR;\r\n                        params.response = data;\r\n                        errMsg = self._parseError(op, jqXHR, self.msgDeleteError, fileName);\r\n                        self._showFileError(errMsg, params, 'filedeleteerror');\r\n                        $frame.removeClass('file-uploading');\r\n                        $el.removeClass('disabled ' + origClass).addClass(errClass);\r\n                        resetProgress();\r\n                        return;\r\n                    }\r\n                    $frame.removeClass('file-uploading').addClass('file-deleted');\r\n                    $frame.fadeOut('slow', function () {\r\n                        index = parseInt(($frame.attr('data-fileindex')).replace($h.INIT_FLAG, ''));\r\n                        self.previewCache.unset(index);\r\n                        self._deleteFileIndex($frame);\r\n                        n = self.previewCache.count(true);\r\n                        cap = n > 0 ? self._getMsgSelected(n) : '';\r\n                        self._setCaption(cap);\r\n                        self._raise('filedeleted', [vKey, jqXHR, extraData]);\r\n                        $h.cleanZoomCache(self._getZoom($frame.attr('id')));\r\n                        self._clearObjects($frame);\r\n                        $frame.remove();\r\n                        resetProgress();\r\n                    });\r\n                };\r\n                fnError = function (jqXHR, textStatus, errorThrown) {\r\n                    var errMsg = self._parseError(op, jqXHR, errorThrown, fileName);\r\n                    params.jqXHR = jqXHR;\r\n                    params.response = {};\r\n                    self._showFileError(errMsg, params, 'filedeleteerror');\r\n                    $frame.removeClass('file-uploading');\r\n                    $el.removeClass('disabled ' + origClass).addClass(errClass);\r\n                    resetProgress();\r\n                };\r\n                self._initAjaxSettings();\r\n                self._mergeAjaxCallback('beforeSend', fnBefore, 'delete');\r\n                self._mergeAjaxCallback('success', fnSuccess, 'delete');\r\n                self._mergeAjaxCallback('error', fnError, 'delete');\r\n                settings = $.extend(true, {}, {\r\n                    url: self._encodeURI(vUrl),\r\n                    type: 'POST',\r\n                    dataType: 'json',\r\n                    data: $.extend(true, {}, {key: vKey}, extraData)\r\n                }, self._ajaxDeleteSettings);\r\n                self._handler($el, 'click', function () {\r\n                    if (!self._validateMinCount()) {\r\n                        return false;\r\n                    }\r\n                    self.ajaxAborted = false;\r\n                    self._raise('filebeforedelete', [vKey, extraData]);\r\n                    //noinspection JSUnresolvedVariable,JSHint\r\n                    if (self.ajaxAborted instanceof Promise) {\r\n                        self.ajaxAborted.then(function (result) {\r\n                            if (!result) {\r\n                                $.ajax(settings);\r\n                            }\r\n                        });\r\n                    } else {\r\n                        if (!self.ajaxAborted) {\r\n                            $.ajax(settings);\r\n                        }\r\n                    }\r\n                });\r\n            });\r\n        },\r\n        _hideFileIcon: function () {\r\n            var self = this;\r\n            if (self.overwriteInitial) {\r\n                self.$captionContainer.removeClass('icon-visible');\r\n            }\r\n        },\r\n        _showFileIcon: function () {\r\n            var self = this;\r\n            $h.addCss(self.$captionContainer, 'icon-visible');\r\n        },\r\n        _getSize: function (bytes, sizes) {\r\n            var self = this, size = parseFloat(bytes), i, func = self.fileSizeGetter, out;\r\n            if (!$.isNumeric(bytes) || !$.isNumeric(size)) {\r\n                return '';\r\n            }\r\n            if (typeof func === 'function') {\r\n                out = func(size);\r\n            } else {\r\n                if (size === 0) {\r\n                    out = '0.00 B';\r\n                } else {\r\n                    i = Math.floor(Math.log(size) / Math.log(1024));\r\n                    if (!sizes) {\r\n                        sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\r\n                    }\r\n                    out = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];\r\n                }\r\n            }\r\n            return self._getLayoutTemplate('size').replace('{sizeText}', out);\r\n        },\r\n        _getFileType: function (ftype) {\r\n            var self = this;\r\n            return self.mimeTypeAliases[ftype] || ftype;\r\n        },\r\n        _generatePreviewTemplate: function (\r\n            cat,\r\n            data,\r\n            fname,\r\n            ftype,\r\n            previewId,\r\n            fileId,\r\n            isError,\r\n            size,\r\n            frameClass,\r\n            foot,\r\n            ind,\r\n            templ,\r\n            attrs,\r\n            zoomData\r\n        ) {\r\n            var self = this, caption = self.slug(fname), prevContent, zoomContent = '', styleAttribs = '',\r\n                screenW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,\r\n                config, title = caption, alt = caption, typeCss = 'type-default', getContent,\r\n                footer = foot || self._renderFileFooter(cat, caption, size, 'auto', isError),\r\n                forcePrevIcon = self.preferIconicPreview, forceZoomIcon = self.preferIconicZoomPreview,\r\n                newCat = forcePrevIcon ? 'other' : cat;\r\n            config = screenW < 400 ? (self.previewSettingsSmall[newCat] || self.defaults.previewSettingsSmall[newCat]) :\r\n                (self.previewSettings[newCat] || self.defaults.previewSettings[newCat]);\r\n            if (config) {\r\n                $.each(config, function (key, val) {\r\n                    styleAttribs += key + ':' + val + ';';\r\n                });\r\n            }\r\n            getContent = function (c, d, zoom, frameCss) {\r\n                var id = zoom ? 'zoom-' + previewId : previewId, tmplt = self._getPreviewTemplate(c),\r\n                    css = (frameClass || '') + ' ' + frameCss;\r\n                if (self.frameClass) {\r\n                    css = self.frameClass + ' ' + css;\r\n                }\r\n                if (zoom) {\r\n                    css = css.replace(' ' + $h.SORT_CSS, '');\r\n                }\r\n                tmplt = self._parseFilePreviewIcon(tmplt, fname);\r\n                if (c === 'text') {\r\n                    d = $h.htmlEncode(d);\r\n                }\r\n                if (cat === 'object' && !ftype) {\r\n                    $.each(self.defaults.fileTypeSettings, function (key, func) {\r\n                        if (key === 'object' || key === 'other') {\r\n                            return;\r\n                        }\r\n                        if (func(fname, ftype)) {\r\n                            typeCss = 'type-' + key;\r\n                        }\r\n                    });\r\n                }\r\n                if (!$h.isEmpty(attrs)) {\r\n                    if (attrs.title !== undefined && attrs.title !== null) {\r\n                        title = attrs.title;\r\n                    }\r\n                    if (attrs.alt !== undefined && attrs.alt !== null) {\r\n                        title = attrs.alt;\r\n                    }\r\n                }\r\n                return tmplt.setTokens({\r\n                    'previewId': id,\r\n                    'caption': caption,\r\n                    'title': title,\r\n                    'alt': alt,\r\n                    'frameClass': css,\r\n                    'type': self._getFileType(ftype),\r\n                    'fileindex': ind,\r\n                    'fileid': fileId || '',\r\n                    'typeCss': typeCss,\r\n                    'footer': footer,\r\n                    'data': d,\r\n                    'template': templ || cat,\r\n                    'style': styleAttribs ? 'style=\"' + styleAttribs + '\"' : ''\r\n                });\r\n            };\r\n            ind = ind || previewId.slice(previewId.lastIndexOf('-') + 1);\r\n            if (self.fileActionSettings.showZoom) {\r\n                zoomContent = getContent((forceZoomIcon ? 'other' : cat), zoomData ? zoomData : data, true,\r\n                    'kv-zoom-thumb');\r\n            }\r\n            zoomContent = '\\n' + self._getLayoutTemplate('zoomCache').replace('{zoomContent}', zoomContent);\r\n            if (typeof self.sanitizeZoomCache === 'function') {\r\n                zoomContent = self.sanitizeZoomCache(zoomContent);\r\n            }\r\n            prevContent = getContent((forcePrevIcon ? 'other' : cat), data, false, 'kv-preview-thumb');\r\n            return prevContent + zoomContent;\r\n        },\r\n        _addToPreview: function ($preview, content) {\r\n            var self = this;\r\n            return self.reversePreviewOrder ? $preview.prepend(content) : $preview.append(content);\r\n        },\r\n        _previewDefault: function (file, isDisabled) {\r\n            var self = this, $preview = self.$preview;\r\n            if (!self.showPreview) {\r\n                return;\r\n            }\r\n            var fname = $h.getFileName(file), ftype = file ? file.type : '', content, size = file.size || 0,\r\n                caption = self._getFileName(file, ''), isError = isDisabled === true && !self.isAjaxUpload,\r\n                data = $h.createObjectURL(file), fileId = self.fileManager.getId(file),\r\n                previewId = self._getThumbId(fileId);\r\n            self._clearDefaultPreview();\r\n            content = self._generatePreviewTemplate('other', data, fname, ftype, previewId, fileId, isError, size);\r\n            self._addToPreview($preview, content);\r\n            self._setThumbAttr(previewId, caption, size);\r\n            if (isDisabled === true && self.isAjaxUpload) {\r\n                self._setThumbStatus(self._getFrame(previewId), 'Error');\r\n            }\r\n        },\r\n        _previewFile: function (i, file, theFile, data, fileInfo) {\r\n            if (!this.showPreview) {\r\n                return;\r\n            }\r\n            var self = this, fname = $h.getFileName(file), ftype = fileInfo.type, caption = fileInfo.name,\r\n                cat = self._parseFileType(ftype, fname), content, $preview = self.$preview, fsize = file.size || 0,\r\n                iData = (cat === 'text' || cat === 'html' || cat === 'image') ? theFile.target.result : data,\r\n                fileId = self.fileManager.getId(file), previewId = self._getThumbId(fileId);\r\n            /** @namespace window.DOMPurify */\r\n            if (cat === 'html' && self.purifyHtml && window.DOMPurify) {\r\n                iData = window.DOMPurify.sanitize(iData);\r\n            }\r\n            content = self._generatePreviewTemplate(cat, iData, fname, ftype, previewId, fileId, false, fsize);\r\n            self._clearDefaultPreview();\r\n            self._addToPreview($preview, content);\r\n            var $thumb = self._getFrame(previewId);\r\n            self._validateImageOrientation($thumb.find('img'), file, previewId, fileId, caption, ftype, fsize, iData);\r\n            self._setThumbAttr(previewId, caption, fsize);\r\n            self._initSortable();\r\n        },\r\n        _setThumbAttr: function (id, caption, size) {\r\n            var self = this, $frame = self._getFrame(id);\r\n            if ($frame.length) {\r\n                size = size && size > 0 ? self._getSize(size) : '';\r\n                $frame.data({'caption': caption, 'size': size});\r\n            }\r\n        },\r\n        _setInitThumbAttr: function () {\r\n            var self = this, data = self.previewCache.data, len = self.previewCache.count(true), config,\r\n                caption, size, previewId;\r\n            if (len === 0) {\r\n                return;\r\n            }\r\n            for (var i = 0; i < len; i++) {\r\n                config = data.config[i];\r\n                previewId = self.previewInitId + '-' + $h.INIT_FLAG + i;\r\n                caption = $h.ifSet('caption', config, $h.ifSet('filename', config));\r\n                size = $h.ifSet('size', config);\r\n                self._setThumbAttr(previewId, caption, size);\r\n            }\r\n        },\r\n        _slugDefault: function (text) {\r\n            // noinspection RegExpRedundantEscape\r\n            return $h.isEmpty(text, true) ? '' : String(text).replace(/[\\[\\]\\/\\{}:;#%=\\(\\)\\*\\+\\?\\\\\\^\\$\\|<>&\"']/g, '_');\r\n        },\r\n        _updateFileDetails: function (numFiles, skipRaiseEvent) {\r\n            var self = this, $el = self.$element, label, n, log, nFiles, file,\r\n                name = ($h.isIE(9) && $h.findFileName($el.val())) || ($el[0].files[0] && $el[0].files[0].name);\r\n            if (!name && self.fileManager.count() > 0) {\r\n                file = self.fileManager.getFirstFile();\r\n                label = file.nameFmt;\r\n            } else {\r\n                label = name ? self.slug(name) : '_';\r\n            }\r\n            n = self.isAjaxUpload ? self.fileManager.count() : numFiles;\r\n            nFiles = self.previewCache.count(true) + n;\r\n            log = n === 1 ? label : self._getMsgSelected(nFiles);\r\n            if (self.isError) {\r\n                self.$previewContainer.removeClass('file-thumb-loading');\r\n                self.$previewStatus.html('');\r\n                self.$captionContainer.removeClass('icon-visible');\r\n            } else {\r\n                self._showFileIcon();\r\n            }\r\n            self._setCaption(log, self.isError);\r\n            self.$container.removeClass('file-input-new file-input-ajax-new');\r\n            if (!skipRaiseEvent) {\r\n                self._raise('fileselect', [numFiles, label]);\r\n            }\r\n            if (self.previewCache.count(true)) {\r\n                self._initPreviewActions();\r\n            }\r\n        },\r\n        _setThumbStatus: function ($thumb, status) {\r\n            var self = this;\r\n            if (!self.showPreview) {\r\n                return;\r\n            }\r\n            var icon = 'indicator' + status, msg = icon + 'Title',\r\n                css = 'file-preview-' + status.toLowerCase(),\r\n                $indicator = $thumb.find('.file-upload-indicator'),\r\n                config = self.fileActionSettings;\r\n            $thumb.removeClass('file-preview-success file-preview-error file-preview-paused file-preview-loading');\r\n            if (status === 'Success') {\r\n                $thumb.find('.file-drag-handle').remove();\r\n            }\r\n            $indicator.html(config[icon]);\r\n            $indicator.attr('title', config[msg]);\r\n            $thumb.addClass(css);\r\n            if (status === 'Error' && !self.retryErrorUploads) {\r\n                $thumb.find('.kv-file-upload').attr('disabled', true);\r\n            }\r\n        },\r\n        _setProgressCancelled: function () {\r\n            var self = this;\r\n            self._setProgress(101, self.$progress, self.msgCancelled);\r\n        },\r\n        _setProgress: function (p, $el, error, stats) {\r\n            var self = this;\r\n            $el = $el || self.$progress;\r\n            if (!$el.length) {\r\n                return;\r\n            }\r\n            var pct = Math.min(p, 100), out, pctLimit = self.progressUploadThreshold,\r\n                t = p <= 100 ? self.progressTemplate : self.progressCompleteTemplate,\r\n                template = pct < 100 ? self.progressTemplate :\r\n                    (error ? (self.paused ? self.progressPauseTemplate : self.progressErrorTemplate) : t);\r\n            if (p >= 100) {\r\n                stats = '';\r\n            }\r\n            if (!$h.isEmpty(template)) {\r\n                if (pctLimit && pct > pctLimit && p <= 100) {\r\n                    out = template.setTokens({'percent': pctLimit, 'status': self.msgUploadThreshold});\r\n                } else {\r\n                    out = template.setTokens({'percent': pct, 'status': (p > 100 ? self.msgUploadEnd : pct + '%')});\r\n                }\r\n                stats = stats || '';\r\n                out = out.setTokens({stats: stats});\r\n                $el.html(out);\r\n                if (error) {\r\n                    $el.find('[role=\"progressbar\"]').html(error);\r\n                }\r\n            }\r\n        },\r\n        _setFileDropZoneTitle: function () {\r\n            var self = this, $zone = self.$container.find('.file-drop-zone'), title = self.dropZoneTitle, strFiles;\r\n            if (self.isClickable) {\r\n                strFiles = $h.isEmpty(self.$element.attr('multiple')) ? self.fileSingle : self.filePlural;\r\n                title += self.dropZoneClickTitle.replace('{files}', strFiles);\r\n            }\r\n            $zone.find('.' + self.dropZoneTitleClass).remove();\r\n            if (!self.showPreview || $zone.length === 0 || self.fileManager.count() > 0 || !self.dropZoneEnabled ||\r\n                (!self.isAjaxUpload && self.$element.files)) {\r\n                return;\r\n            }\r\n            if ($zone.find($h.FRAMES).length === 0 && $h.isEmpty(self.defaultPreviewContent)) {\r\n                $zone.prepend('<div class=\"' + self.dropZoneTitleClass + '\">' + title + '</div>');\r\n            }\r\n            self.$container.removeClass('file-input-new');\r\n            $h.addCss(self.$container, 'file-input-ajax-new');\r\n        },\r\n        _getStats: function (stats) {\r\n            var self = this, pendingTime, t;\r\n            if (!self.showUploadStats || !stats || !stats.bitrate) {\r\n                return '';\r\n            }\r\n            t = self._getLayoutTemplate('stats');\r\n            pendingTime = (!stats.elapsed || !stats.bps) ? self.msgCalculatingTime :\r\n                self.msgPendingTime.setTokens({time: $h.getElapsed(Math.ceil(stats.pendingBytes / stats.bps))});\r\n\r\n            return t.setTokens({\r\n                uploadSpeed: stats.bitrate,\r\n                pendingTime: pendingTime\r\n            });\r\n        },\r\n        _setResumableProgress: function (pct, stats, $thumb) {\r\n            var self = this, rm = self.resumableManager, obj = $thumb ? rm : self,\r\n                $prog = $thumb ? $thumb.find('.file-thumb-progress') : null;\r\n            if (obj.lastProgress === 0) {\r\n                obj.lastProgress = pct;\r\n            }\r\n            if (pct < obj.lastProgress) {\r\n                pct = obj.lastProgress;\r\n            }\r\n            self._setProgress(pct, $prog, null, self._getStats(stats));\r\n            obj.lastProgress = pct;\r\n        },\r\n        _toggleResumableProgress: function (template, message) {\r\n            var self = this, $progress = self.$progress;\r\n            if ($progress && $progress.length) {\r\n                $progress.html(template.setTokens({\r\n                    percent: 101,\r\n                    status: message,\r\n                    stats: ''\r\n                }));\r\n            }\r\n        },\r\n        _setFileUploadStats: function (id, pct, total, stats) {\r\n            var self = this, $prog = self.$progress;\r\n            if (!self.showPreview && (!$prog || !$prog.length)) {\r\n                return;\r\n            }\r\n            var fm = self.fileManager, $thumb = fm.getThumb(id), pctTot, rm = self.resumableManager,\r\n                totUpSize = 0, totSize = fm.getTotalSize(), totStats = $.extend(true, {}, stats);\r\n            if (self.enableResumableUpload) {\r\n                var loaded = stats.loaded, currUplSize = rm.getUploadedSize(), currTotSize = rm.file.size, totLoaded;\r\n                loaded += currUplSize;\r\n                totLoaded = fm.uploadedSize + loaded;\r\n                pct = $h.round(100 * loaded / currTotSize);\r\n                stats.pendingBytes = currTotSize - currUplSize;\r\n                self._setResumableProgress(pct, stats, $thumb);\r\n                pctTot = Math.floor(100 * totLoaded / totSize);\r\n                totStats.pendingBytes = totSize - totLoaded;\r\n                self._setResumableProgress(pctTot, totStats);\r\n            } else {\r\n                fm.setProgress(id, pct);\r\n                $prog = $thumb && $thumb.length ? $thumb.find('.file-thumb-progress') : null;\r\n                self._setProgress(pct, $prog, null, self._getStats(stats));\r\n                $.each(fm.stats, function (id, cfg) {\r\n                    totUpSize += cfg.loaded;\r\n                });\r\n                totStats.pendingBytes = totSize - totUpSize;\r\n                pctTot = $h.round(totUpSize / totSize * 100);\r\n                self._setProgress(pctTot, null, null, self._getStats(totStats));\r\n            }\r\n        },\r\n        _validateMinCount: function () {\r\n            var self = this, len = self.isAjaxUpload ? self.fileManager.count() : self._inputFileCount();\r\n            if (self.validateInitialCount && self.minFileCount > 0 && self._getFileCount(len - 1) < self.minFileCount) {\r\n                self._noFilesError({});\r\n                return false;\r\n            }\r\n            return true;\r\n        },\r\n        _getFileCount: function (fileCount, includeInitial) {\r\n            var self = this, addCount = 0;\r\n            if (includeInitial === undefined) {\r\n                includeInitial = self.validateInitialCount && !self.overwriteInitial;\r\n            }\r\n            if (includeInitial) {\r\n                addCount = self.previewCache.count(true);\r\n                fileCount += addCount;\r\n            }\r\n            return fileCount;\r\n        },\r\n        _getFileId: function (file) {\r\n            return $h.getFileId(file, this.generateFileId);\r\n        },\r\n        _getFileName: function (file, defaultValue) {\r\n            var self = this, fileName = $h.getFileName(file);\r\n            return fileName ? self.slug(fileName) : defaultValue;\r\n        },\r\n        _getFileNames: function (skipNull) {\r\n            var self = this;\r\n            return self.filenames.filter(function (n) {\r\n                return (skipNull ? n !== undefined : n !== undefined && n !== null);\r\n            });\r\n        },\r\n        _setPreviewError: function ($thumb, keepFile) {\r\n            var self = this, removeFrame = self.removeFromPreviewOnError && !self.retryErrorUploads;\r\n            if (!keepFile || removeFrame) {\r\n                self.fileManager.remove($thumb);\r\n            }\r\n            if (!self.showPreview) {\r\n                return;\r\n            }\r\n            if (removeFrame) {\r\n                $thumb.remove();\r\n                return;\r\n            } else {\r\n                self._setThumbStatus($thumb, 'Error');\r\n            }\r\n            self._refreshUploadButton($thumb);\r\n        },\r\n        _refreshUploadButton: function ($thumb) {\r\n            var self = this, $btn = $thumb.find('.kv-file-upload'), cfg = self.fileActionSettings,\r\n                icon = cfg.uploadIcon, title = cfg.uploadTitle;\r\n            if (!$btn.length) {\r\n                return;\r\n            }\r\n            if (self.retryErrorUploads) {\r\n                icon = cfg.uploadRetryIcon;\r\n                title = cfg.uploadRetryTitle;\r\n            }\r\n            $btn.attr('title', title).html(icon);\r\n        },\r\n        _checkDimensions: function (i, chk, $img, $thumb, fname, type, params) {\r\n            var self = this, msg, dim, tag = chk === 'Small' ? 'min' : 'max', limit = self[tag + 'Image' + type],\r\n                $imgEl, isValid;\r\n            if ($h.isEmpty(limit) || !$img.length) {\r\n                return;\r\n            }\r\n            $imgEl = $img[0];\r\n            dim = (type === 'Width') ? $imgEl.naturalWidth || $imgEl.width : $imgEl.naturalHeight || $imgEl.height;\r\n            isValid = chk === 'Small' ? dim >= limit : dim <= limit;\r\n            if (isValid) {\r\n                return;\r\n            }\r\n            msg = self['msgImage' + type + chk].setTokens({'name': fname, 'size': limit});\r\n            self._showFileError(msg, params);\r\n            self._setPreviewError($thumb);\r\n        },\r\n        _getExifObj: function (data) {\r\n            var self = this, exifObj = null, error = $h.logMessages.exifWarning;\r\n            if (data.slice(0, 23) !== 'data:image/jpeg;base64,' && data.slice(0, 22) !== 'data:image/jpg;base64,') {\r\n                exifObj = null;\r\n                return;\r\n            }\r\n            try {\r\n                exifObj = window.piexif ? window.piexif.load(data) : null;\r\n            } catch (err) {\r\n                exifObj = null;\r\n                error = err && err.message || '';\r\n            }\r\n            if (!exifObj) {\r\n                self._log($h.logMessages.badExifParser, {details: error});\r\n            }\r\n            return exifObj;\r\n        },\r\n        setImageOrientation: function ($img, $zoomImg, value, $thumb) {\r\n            var self = this, invalidImg = !$img || !$img.length, invalidZoomImg = !$zoomImg || !$zoomImg.length, $mark,\r\n                isHidden = false, $div, zoomOnly = invalidImg && $thumb && $thumb.attr('data-template') === 'image', ev;\r\n            if (invalidImg && invalidZoomImg) {\r\n                return;\r\n            }\r\n            ev = 'load.fileinputimageorient';\r\n            if (zoomOnly) {\r\n                $img = $zoomImg;\r\n                $zoomImg = null;\r\n                $img.css(self.previewSettings.image);\r\n                $div = $(document.createElement('div')).appendTo($thumb.find('.kv-file-content'));\r\n                $mark = $(document.createElement('span')).insertBefore($img);\r\n                $img.css('visibility', 'hidden').removeClass('file-zoom-detail').appendTo($div);\r\n            } else {\r\n                isHidden = !$img.is(':visible');\r\n            }\r\n            $img.off(ev).on(ev, function () {\r\n                if (isHidden) {\r\n                    self.$preview.removeClass('hide-content');\r\n                    $thumb.find('.kv-file-content').css('visibility', 'hidden');\r\n                }\r\n                var img = $img.get(0), zoomImg = $zoomImg && $zoomImg.length ? $zoomImg.get(0) : null,\r\n                    h = img.offsetHeight, w = img.offsetWidth, r = $h.getRotation(value);\r\n                if (isHidden) {\r\n                    $thumb.find('.kv-file-content').css('visibility', 'visible');\r\n                    self.$preview.addClass('hide-content');\r\n                }\r\n                $img.data('orientation', value);\r\n                if (zoomImg) {\r\n                    $zoomImg.data('orientation', value);\r\n                }\r\n                if (value < 5) {\r\n                    $h.setTransform(img, r);\r\n                    $h.setTransform(zoomImg, r);\r\n                    return;\r\n                }\r\n                var offsetAngle = Math.atan(w / h), origFactor = Math.sqrt(Math.pow(h, 2) + Math.pow(w, 2)),\r\n                    scale = !origFactor ? 1 : (h / Math.cos(Math.PI / 2 + offsetAngle)) / origFactor,\r\n                    s = ' scale(' + Math.abs(scale) + ')';\r\n                $h.setTransform(img, r + s);\r\n                $h.setTransform(zoomImg, r + s);\r\n                if (zoomOnly) {\r\n                    $img.css('visibility', 'visible').insertAfter($mark).addClass('file-zoom-detail');\r\n                    $mark.remove();\r\n                    $div.remove();\r\n                }\r\n            });\r\n        },\r\n        _validateImageOrientation: function ($img, file, previewId, fileId, caption, ftype, fsize, iData) {\r\n            var self = this, exifObj, value, autoOrientImage = self.autoOrientImage,\r\n                selector = $h.getZoomSelector(previewId, ' img');\r\n            exifObj = autoOrientImage ? self._getExifObj(iData) : null;\r\n            value = exifObj ? exifObj['0th'][piexif.ImageIFD.Orientation] : null; // jshint ignore:line\r\n            if (!value) {\r\n                self._validateImage(previewId, fileId, caption, ftype, fsize, iData, exifObj);\r\n                return;\r\n            }\r\n            self.setImageOrientation($img, $(selector), value, self._getFrame(previewId));\r\n            self._raise('fileimageoriented', {'$img': $img, 'file': file});\r\n            self._validateImage(previewId, fileId, caption, ftype, fsize, iData, exifObj);\r\n        },\r\n        _validateImage: function (previewId, fileId, fname, ftype, fsize, iData, exifObj) {\r\n            var self = this, $preview = self.$preview, params, w1, w2, $thumb = self._getFrame(previewId),\r\n                i = $thumb.attr('data-fileindex'), $img = $thumb.find('img');\r\n            fname = fname || 'Untitled';\r\n            $img.one('load', function () {\r\n                w1 = $thumb.width();\r\n                w2 = $preview.width();\r\n                if (w1 > w2) {\r\n                    $img.css('width', '100%');\r\n                }\r\n                params = {ind: i, id: previewId, fileId: fileId};\r\n                self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Width', params);\r\n                self._checkDimensions(i, 'Small', $img, $thumb, fname, 'Height', params);\r\n                if (!self.resizeImage) {\r\n                    self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Width', params);\r\n                    self._checkDimensions(i, 'Large', $img, $thumb, fname, 'Height', params);\r\n                }\r\n                self._raise('fileimageloaded', [previewId]);\r\n                self.fileManager.addImage(fileId, {\r\n                    ind: i,\r\n                    img: $img,\r\n                    thumb: $thumb,\r\n                    pid: previewId,\r\n                    typ: ftype,\r\n                    siz: fsize,\r\n                    validated: false,\r\n                    imgData: iData,\r\n                    exifObj: exifObj\r\n                });\r\n                $thumb.data('exif', exifObj);\r\n                self._validateAllImages();\r\n            }).one('error', function () {\r\n                self._raise('fileimageloaderror', [previewId]);\r\n            }).each(function () {\r\n                if (this.complete) {\r\n                    $(this).trigger('load');\r\n                } else {\r\n                    if (this.error) {\r\n                        $(this).trigger('error');\r\n                    }\r\n                }\r\n            });\r\n        },\r\n        _validateAllImages: function () {\r\n            var self = this, counter = {val: 0}, numImgs = self.fileManager.getImageCount(), fsize,\r\n                minSize = self.resizeIfSizeMoreThan;\r\n            if (numImgs !== self.fileManager.totalImages) {\r\n                return;\r\n            }\r\n            self._raise('fileimagesloaded');\r\n            if (!self.resizeImage) {\r\n                return;\r\n            }\r\n            $.each(self.fileManager.loadedImages, function (id, config) {\r\n                if (!config.validated) {\r\n                    fsize = config.siz;\r\n                    if (fsize && fsize > minSize * 1000) {\r\n                        self._getResizedImage(id, config, counter, numImgs);\r\n                    }\r\n                    config.validated = true;\r\n                }\r\n            });\r\n        },\r\n        _getResizedImage: function (id, config, counter, numImgs) {\r\n            var self = this, img = $(config.img)[0], width = img.naturalWidth, height = img.naturalHeight, blob,\r\n                ratio = 1, maxWidth = self.maxImageWidth || width, maxHeight = self.maxImageHeight || height,\r\n                isValidImage = !!(width && height), chkWidth, chkHeight, canvas = self.imageCanvas, dataURI,\r\n                context = self.imageCanvasContext, type = config.typ, pid = config.pid, ind = config.ind,\r\n                $thumb = config.thumb, throwError, msg, exifObj = config.exifObj, exifStr, file, params, evParams;\r\n            throwError = function (msg, params, ev) {\r\n                if (self.isAjaxUpload) {\r\n                    self._showFileError(msg, params, ev);\r\n                } else {\r\n                    self._showError(msg, params, ev);\r\n                }\r\n                self._setPreviewError($thumb);\r\n            };\r\n            file = self.fileManager.getFile(id);\r\n            params = {id: pid, 'index': ind, fileId: id};\r\n            evParams = [id, pid, ind];\r\n            if (!file || !isValidImage || (width <= maxWidth && height <= maxHeight)) {\r\n                if (isValidImage && file) {\r\n                    self._raise('fileimageresized', evParams);\r\n                }\r\n                counter.val++;\r\n                if (counter.val === numImgs) {\r\n                    self._raise('fileimagesresized');\r\n                }\r\n                if (!isValidImage) {\r\n                    throwError(self.msgImageResizeError, params, 'fileimageresizeerror');\r\n                    return;\r\n                }\r\n            }\r\n            type = type || self.resizeDefaultImageType;\r\n            chkWidth = width > maxWidth;\r\n            chkHeight = height > maxHeight;\r\n            if (self.resizePreference === 'width') {\r\n                ratio = chkWidth ? maxWidth / width : (chkHeight ? maxHeight / height : 1);\r\n            } else {\r\n                ratio = chkHeight ? maxHeight / height : (chkWidth ? maxWidth / width : 1);\r\n            }\r\n            self._resetCanvas();\r\n            width *= ratio;\r\n            height *= ratio;\r\n            canvas.width = width;\r\n            canvas.height = height;\r\n            try {\r\n                context.drawImage(img, 0, 0, width, height);\r\n                dataURI = canvas.toDataURL(type, self.resizeQuality);\r\n                if (exifObj) {\r\n                    exifStr = window.piexif.dump(exifObj);\r\n                    dataURI = window.piexif.insert(exifStr, dataURI);\r\n                }\r\n                blob = $h.dataURI2Blob(dataURI);\r\n                self.fileManager.setFile(id, blob);\r\n                self._raise('fileimageresized', evParams);\r\n                counter.val++;\r\n                if (counter.val === numImgs) {\r\n                    self._raise('fileimagesresized', [undefined, undefined]);\r\n                }\r\n                if (!(blob instanceof Blob)) {\r\n                    throwError(self.msgImageResizeError, params, 'fileimageresizeerror');\r\n                }\r\n            } catch (err) {\r\n                counter.val++;\r\n                if (counter.val === numImgs) {\r\n                    self._raise('fileimagesresized', [undefined, undefined]);\r\n                }\r\n                msg = self.msgImageResizeException.replace('{errors}', err.message);\r\n                throwError(msg, params, 'fileimageresizeexception');\r\n            }\r\n        },\r\n        _showProgress: function () {\r\n            var self = this;\r\n            if (self.$progress && self.$progress.length) {\r\n                self.$progress.show();\r\n            }\r\n        },\r\n        _hideProgress: function () {\r\n            var self = this;\r\n            if (self.$progress && self.$progress.length) {\r\n                self.$progress.hide();\r\n            }\r\n        },\r\n        _initBrowse: function ($container) {\r\n            var self = this, $el = self.$element;\r\n            if (self.showBrowse) {\r\n                self.$btnFile = $container.find('.btn-file').append($el);\r\n            } else {\r\n                $el.appendTo($container).attr('tabindex', -1);\r\n                $h.addCss($el, 'file-no-browse');\r\n            }\r\n        },\r\n        _initClickable: function () {\r\n            var self = this, $zone, $tmpZone;\r\n            if (!self.isClickable) {\r\n                return;\r\n            }\r\n            $zone = self.$dropZone;\r\n            if (!self.isAjaxUpload) {\r\n                $tmpZone = self.$preview.find('.file-default-preview');\r\n                if ($tmpZone.length) {\r\n                    $zone = $tmpZone;\r\n                }\r\n            }\r\n\r\n            $h.addCss($zone, 'clickable');\r\n            $zone.attr('tabindex', -1);\r\n            self._handler($zone, 'click', function (e) {\r\n                var $tar = $(e.target);\r\n                if (!$(self.elErrorContainer + ':visible').length &&\r\n                    (!$tar.parents('.file-preview-thumbnails').length || $tar.parents(\r\n                        '.file-default-preview').length)) {\r\n                    self.$element.data('zoneClicked', true).trigger('click');\r\n                    $zone.blur();\r\n                }\r\n            });\r\n        },\r\n        _initCaption: function () {\r\n            var self = this, cap = self.initialCaption || '';\r\n            if (self.overwriteInitial || $h.isEmpty(cap)) {\r\n                self.$caption.val('');\r\n                return false;\r\n            }\r\n            self._setCaption(cap);\r\n            return true;\r\n        },\r\n        _setCaption: function (content, isError) {\r\n            var self = this, title, out, icon, n, cap, file;\r\n            if (!self.$caption.length) {\r\n                return;\r\n            }\r\n            self.$captionContainer.removeClass('icon-visible');\r\n            if (isError) {\r\n                title = $('<div>' + self.msgValidationError + '</div>').text();\r\n                n = self.fileManager.count();\r\n                if (n) {\r\n                    file = self.fileManager.getFirstFile();\r\n                    cap = n === 1 && file ? file.nameFmt : self._getMsgSelected(n);\r\n                } else {\r\n                    cap = self._getMsgSelected(self.msgNo);\r\n                }\r\n                out = $h.isEmpty(content) ? cap : content;\r\n                icon = '<span class=\"' + self.msgValidationErrorClass + '\">' + self.msgValidationErrorIcon + '</span>';\r\n            } else {\r\n                if ($h.isEmpty(content)) {\r\n                    return;\r\n                }\r\n                title = $('<div>' + content + '</div>').text();\r\n                out = title;\r\n                icon = self._getLayoutTemplate('fileIcon');\r\n            }\r\n            self.$captionContainer.addClass('icon-visible');\r\n            self.$caption.attr('title', title).val(out);\r\n            self.$captionIcon.html(icon);\r\n        },\r\n        _createContainer: function () {\r\n            var self = this, attribs = {'class': 'file-input file-input-new' + (self.rtl ? ' kv-rtl' : '')},\r\n                $container = $(document.createElement('div')).attr(attribs).html(self._renderMain());\r\n            $container.insertBefore(self.$element);\r\n            self._initBrowse($container);\r\n            if (self.theme) {\r\n                $container.addClass('theme-' + self.theme);\r\n            }\r\n            return $container;\r\n        },\r\n        _refreshContainer: function () {\r\n            var self = this, $container = self.$container, $el = self.$element;\r\n            $el.insertAfter($container);\r\n            $container.html(self._renderMain());\r\n            self._initBrowse($container);\r\n            self._validateDisabled();\r\n        },\r\n        _validateDisabled: function () {\r\n            var self = this;\r\n            self.$caption.attr({readonly: self.isDisabled});\r\n        },\r\n        _renderMain: function () {\r\n            var self = this,\r\n                dropCss = self.dropZoneEnabled ? ' file-drop-zone' : 'file-drop-disabled',\r\n                close = !self.showClose ? '' : self._getLayoutTemplate('close'),\r\n                preview = !self.showPreview ? '' : self._getLayoutTemplate('preview')\r\n                    .setTokens({'class': self.previewClass, 'dropClass': dropCss}),\r\n                css = self.isDisabled ? self.captionClass + ' file-caption-disabled' : self.captionClass,\r\n                caption = self.captionTemplate.setTokens({'class': css + ' kv-fileinput-caption'});\r\n            return self.mainTemplate.setTokens({\r\n                'class': self.mainClass + (!self.showBrowse && self.showCaption ? ' no-browse' : ''),\r\n                'preview': preview,\r\n                'close': close,\r\n                'caption': caption,\r\n                'upload': self._renderButton('upload'),\r\n                'remove': self._renderButton('remove'),\r\n                'cancel': self._renderButton('cancel'),\r\n                'pause': self._renderButton('pause'),\r\n                'browse': self._renderButton('browse')\r\n            });\r\n\r\n        },\r\n        _renderButton: function (type) {\r\n            var self = this, tmplt = self._getLayoutTemplate('btnDefault'), css = self[type + 'Class'],\r\n                title = self[type + 'Title'], icon = self[type + 'Icon'], label = self[type + 'Label'],\r\n                status = self.isDisabled ? ' disabled' : '', btnType = 'button';\r\n            switch (type) {\r\n                case 'remove':\r\n                    if (!self.showRemove) {\r\n                        return '';\r\n                    }\r\n                    break;\r\n                case 'cancel':\r\n                    if (!self.showCancel) {\r\n                        return '';\r\n                    }\r\n                    css += ' kv-hidden';\r\n                    break;\r\n                case 'pause':\r\n                    if (!self.showPause) {\r\n                        return '';\r\n                    }\r\n                    css += ' kv-hidden';\r\n                    break;\r\n                case 'upload':\r\n                    if (!self.showUpload) {\r\n                        return '';\r\n                    }\r\n                    if (self.isAjaxUpload && !self.isDisabled) {\r\n                        tmplt = self._getLayoutTemplate('btnLink').replace('{href}', self.uploadUrl);\r\n                    } else {\r\n                        btnType = 'submit';\r\n                    }\r\n                    break;\r\n                case 'browse':\r\n                    if (!self.showBrowse) {\r\n                        return '';\r\n                    }\r\n                    tmplt = self._getLayoutTemplate('btnBrowse');\r\n                    break;\r\n                default:\r\n                    return '';\r\n            }\r\n\r\n            css += type === 'browse' ? ' btn-file' : ' fileinput-' + type + ' fileinput-' + type + '-button';\r\n            if (!$h.isEmpty(label)) {\r\n                label = ' <span class=\"' + self.buttonLabelClass + '\">' + label + '</span>';\r\n            }\r\n            return tmplt.setTokens({\r\n                'type': btnType, 'css': css, 'title': title, 'status': status, 'icon': icon, 'label': label\r\n            });\r\n        },\r\n        _renderThumbProgress: function () {\r\n            var self = this;\r\n            return '<div class=\"file-thumb-progress kv-hidden\">' +\r\n                self.progressInfoTemplate.setTokens({percent: 101, status: self.msgUploadBegin, stats: ''}) +\r\n                '</div>';\r\n        },\r\n        _renderFileFooter: function (cat, caption, size, width, isError) {\r\n            var self = this, config = self.fileActionSettings, rem = config.showRemove, drg = config.showDrag,\r\n                upl = config.showUpload, zoom = config.showZoom, out, params,\r\n                template = self._getLayoutTemplate('footer'), tInd = self._getLayoutTemplate('indicator'),\r\n                ind = isError ? config.indicatorError : config.indicatorNew,\r\n                title = isError ? config.indicatorErrorTitle : config.indicatorNewTitle,\r\n                indicator = tInd.setTokens({'indicator': ind, 'indicatorTitle': title});\r\n            size = self._getSize(size);\r\n            params = {type: cat, caption: caption, size: size, width: width, progress: '', indicator: indicator};\r\n            if (self.isAjaxUpload) {\r\n                params.progress = self._renderThumbProgress();\r\n                params.actions = self._renderFileActions(params, upl, false, rem, zoom, drg, false, false, false);\r\n            } else {\r\n                params.actions = self._renderFileActions(params, false, false, false, zoom, drg, false, false, false);\r\n            }\r\n            out = template.setTokens(params);\r\n            out = $h.replaceTags(out, self.previewThumbTags);\r\n            return out;\r\n        },\r\n        _renderFileActions: function (\r\n            cfg,\r\n            showUpl,\r\n            showDwn,\r\n            showDel,\r\n            showZoom,\r\n            showDrag,\r\n            disabled,\r\n            url,\r\n            key,\r\n            isInit,\r\n            dUrl,\r\n            dFile\r\n        ) {\r\n            var self = this;\r\n            if (!cfg.type && isInit) {\r\n                cfg.type = 'image';\r\n            }\r\n            if (self.enableResumableUpload) {\r\n                showUpl = false;\r\n            } else {\r\n                if (typeof showUpl === 'function') {\r\n                    showUpl = showUpl(cfg);\r\n                }\r\n            }\r\n            if (typeof showDwn === 'function') {\r\n                showDwn = showDwn(cfg);\r\n            }\r\n            if (typeof showDel === 'function') {\r\n                showDel = showDel(cfg);\r\n            }\r\n            if (typeof showZoom === 'function') {\r\n                showZoom = showZoom(cfg);\r\n            }\r\n            if (typeof showDrag === 'function') {\r\n                showDrag = showDrag(cfg);\r\n            }\r\n            if (!showUpl && !showDwn && !showDel && !showZoom && !showDrag) {\r\n                return '';\r\n            }\r\n            var vUrl = url === false ? '' : ' data-url=\"' + url + '\"', btnZoom = '', btnDrag = '', css,\r\n                vKey = key === false ? '' : ' data-key=\"' + key + '\"', btnDelete = '', btnUpload = '', btnDownload = '',\r\n                template = self._getLayoutTemplate('actions'), config = self.fileActionSettings,\r\n                otherButtons = self.otherActionButtons.setTokens({'dataKey': vKey, 'key': key}),\r\n                removeClass = disabled ? config.removeClass + ' disabled' : config.removeClass;\r\n            if (showDel) {\r\n                btnDelete = self._getLayoutTemplate('actionDelete').setTokens({\r\n                    'removeClass': removeClass,\r\n                    'removeIcon': config.removeIcon,\r\n                    'removeTitle': config.removeTitle,\r\n                    'dataUrl': vUrl,\r\n                    'dataKey': vKey,\r\n                    'key': key\r\n                });\r\n            }\r\n            if (showUpl) {\r\n                btnUpload = self._getLayoutTemplate('actionUpload').setTokens({\r\n                    'uploadClass': config.uploadClass,\r\n                    'uploadIcon': config.uploadIcon,\r\n                    'uploadTitle': config.uploadTitle\r\n                });\r\n            }\r\n            if (showDwn) {\r\n                btnDownload = self._getLayoutTemplate('actionDownload').setTokens({\r\n                    'downloadClass': config.downloadClass,\r\n                    'downloadIcon': config.downloadIcon,\r\n                    'downloadTitle': config.downloadTitle,\r\n                    'downloadUrl': dUrl || self.initialPreviewDownloadUrl\r\n                });\r\n                btnDownload = btnDownload.setTokens({'filename': dFile, 'key': key});\r\n            }\r\n            if (showZoom) {\r\n                btnZoom = self._getLayoutTemplate('actionZoom').setTokens({\r\n                    'zoomClass': config.zoomClass,\r\n                    'zoomIcon': config.zoomIcon,\r\n                    'zoomTitle': config.zoomTitle\r\n                });\r\n            }\r\n            if (showDrag && isInit) {\r\n                css = 'drag-handle-init ' + config.dragClass;\r\n                btnDrag = self._getLayoutTemplate('actionDrag').setTokens({\r\n                    'dragClass': css,\r\n                    'dragTitle': config.dragTitle,\r\n                    'dragIcon': config.dragIcon\r\n                });\r\n            }\r\n            return template.setTokens({\r\n                'delete': btnDelete,\r\n                'upload': btnUpload,\r\n                'download': btnDownload,\r\n                'zoom': btnZoom,\r\n                'drag': btnDrag,\r\n                'other': otherButtons\r\n            });\r\n        },\r\n        _browse: function (e) {\r\n            var self = this;\r\n            if (e && e.isDefaultPrevented() || !self._raise('filebrowse')) {\r\n                return;\r\n            }\r\n            if (self.isError && !self.isAjaxUpload) {\r\n                self.clear();\r\n            }\r\n            if (self.focusCaptionOnBrowse) {\r\n                self.$captionContainer.focus();\r\n            }\r\n        },\r\n        _change: function (e) {\r\n            var self = this;\r\n            if (self.changeTriggered) {\r\n                return;\r\n            }\r\n            var $el = self.$element, isDragDrop = arguments.length > 1, isAjaxUpload = self.isAjaxUpload,\r\n                tfiles, files = isDragDrop ? arguments[1] : $el.get(0).files, ctr = self.fileManager.count(),\r\n                total, initCount, len, isSingleUpl = $h.isEmpty($el.attr('multiple')),\r\n                maxCount = !isAjaxUpload && isSingleUpl ? 1 : self.maxFileCount, maxTotCount = self.maxTotalFileCount,\r\n                inclAll = maxTotCount > 0 && maxTotCount > maxCount, flagSingle = (isSingleUpl && ctr > 0),\r\n                throwError = function (mesg, file, previewId, index) {\r\n                    var p1 = $.extend(true, {}, self._getOutData(null, {}, {}, files), {id: previewId, index: index}),\r\n                        p2 = {id: previewId, index: index, file: file, files: files};\r\n                    return isAjaxUpload ? self._showFileError(mesg, p1) : self._showError(mesg, p2);\r\n                },\r\n                maxCountCheck = function (n, m, all) {\r\n                    var msg = all ? self.msgTotalFilesTooMany : self.msgFilesTooMany;\r\n                    msg = msg.replace('{m}', m).replace('{n}', n);\r\n                    self.isError = throwError(msg, null, null, null);\r\n                    self.$captionContainer.removeClass('icon-visible');\r\n                    self._setCaption('', true);\r\n                    self.$container.removeClass('file-input-new file-input-ajax-new');\r\n                };\r\n            self.reader = null;\r\n            self._resetUpload();\r\n            self._hideFileIcon();\r\n            if (self.dropZoneEnabled) {\r\n                self.$container.find('.file-drop-zone .' + self.dropZoneTitleClass).remove();\r\n            }\r\n            if (!isAjaxUpload) {\r\n                if (e.target && e.target.files === undefined) {\r\n                    files = e.target.value ? [{name: e.target.value.replace(/^.+\\\\/, '')}] : [];\r\n                } else {\r\n                    files = e.target.files || {};\r\n                }\r\n            }\r\n            tfiles = files;\r\n            if ($h.isEmpty(tfiles) || tfiles.length === 0) {\r\n                if (!isAjaxUpload) {\r\n                    self.clear();\r\n                }\r\n                self._raise('fileselectnone');\r\n                return;\r\n            }\r\n            self._resetErrors();\r\n            len = tfiles.length;\r\n            initCount = isAjaxUpload ? (self.fileManager.count() + len) : len;\r\n            total = self._getFileCount(initCount, inclAll ? false : undefined);\r\n            if (maxCount > 0 && total > maxCount) {\r\n                if (!self.autoReplace || len > maxCount) {\r\n                    maxCountCheck((self.autoReplace && len > maxCount ? len : total), maxCount);\r\n                    return;\r\n                }\r\n                if (total > maxCount) {\r\n                    self._resetPreviewThumbs(isAjaxUpload);\r\n                }\r\n            } else {\r\n                if (inclAll) {\r\n                    total = self._getFileCount(initCount, true);\r\n                    if (maxTotCount > 0 && total > maxTotCount) {\r\n                        if (!self.autoReplace || len > maxCount) {\r\n                            maxCountCheck((self.autoReplace && len > maxTotCount ? len : total), maxTotCount, true);\r\n                            return;\r\n                        }\r\n                        if (total > maxCount) {\r\n                            self._resetPreviewThumbs(isAjaxUpload);\r\n                        }\r\n                    }\r\n                }\r\n                if (!isAjaxUpload || flagSingle) {\r\n                    self._resetPreviewThumbs(false);\r\n                    if (flagSingle) {\r\n                        self.clearFileStack();\r\n                    }\r\n                } else {\r\n                    if (isAjaxUpload && ctr === 0 && (!self.previewCache.count(true) || self.overwriteInitial)) {\r\n                        self._resetPreviewThumbs(true);\r\n                    }\r\n                }\r\n            }\r\n            self.readFiles(tfiles);\r\n        },\r\n        _abort: function (params) {\r\n            var self = this, data;\r\n            if (self.ajaxAborted && typeof self.ajaxAborted === 'object' && self.ajaxAborted.message !== undefined) {\r\n                data = $.extend(true, {}, self._getOutData(null), params);\r\n                data.abortData = self.ajaxAborted.data || {};\r\n                data.abortMessage = self.ajaxAborted.message;\r\n                self._setProgress(101, self.$progress, self.msgCancelled);\r\n                self._showFileError(self.ajaxAborted.message, data, 'filecustomerror');\r\n                self.cancel();\r\n                return true;\r\n            }\r\n            return !!self.ajaxAborted;\r\n        },\r\n        _resetFileStack: function () {\r\n            var self = this, i = 0;\r\n            self._getThumbs().each(function () {\r\n                var $thumb = $(this), ind = $thumb.attr('data-fileindex'), pid = $thumb.attr('id');\r\n                if (ind === '-1' || ind === -1) {\r\n                    return;\r\n                }\r\n                if (!self.fileManager.getFile($thumb.attr('data-fileid'))) {\r\n                    $thumb.attr({'data-fileindex': i});\r\n                    i++;\r\n                } else {\r\n                    $thumb.attr({'data-fileindex': '-1'});\r\n                }\r\n                self._getZoom(pid).attr({\r\n                    'data-fileindex': $thumb.attr('data-fileindex')\r\n                });\r\n            });\r\n        },\r\n        _isFileSelectionValid: function (cnt) {\r\n            var self = this;\r\n            cnt = cnt || 0;\r\n            if (self.required && !self.getFilesCount()) {\r\n                self.$errorContainer.html('');\r\n                self._showFileError(self.msgFileRequired);\r\n                return false;\r\n            }\r\n            if (self.minFileCount > 0 && self._getFileCount(cnt) < self.minFileCount) {\r\n                self._noFilesError({});\r\n                return false;\r\n            }\r\n            return true;\r\n        },\r\n        _canPreview: function (file) {\r\n            var self = this;\r\n            if (!file || !self.showPreview || !self.$preview || !self.$preview.length) {\r\n                return false;\r\n            }\r\n            var name = file.name || '', type = file.type || '', size = (file.size || 0) / 1000,\r\n                cat = self._parseFileType(type, name), allowedTypes, allowedMimes, allowedExts, skipPreview,\r\n                types = self.allowedPreviewTypes, mimes = self.allowedPreviewMimeTypes,\r\n                exts = self.allowedPreviewExtensions || [], dTypes = self.disabledPreviewTypes,\r\n                dMimes = self.disabledPreviewMimeTypes, dExts = self.disabledPreviewExtensions || [],\r\n                maxSize = self.maxFilePreviewSize && parseFloat(self.maxFilePreviewSize) || 0,\r\n                expAllExt = new RegExp('\\\\.(' + exts.join('|') + ')$', 'i'),\r\n                expDisExt = new RegExp('\\\\.(' + dExts.join('|') + ')$', 'i');\r\n            allowedTypes = !types || types.indexOf(cat) !== -1;\r\n            allowedMimes = !mimes || mimes.indexOf(type) !== -1;\r\n            allowedExts = !exts.length || $h.compare(name, expAllExt);\r\n            skipPreview = (dTypes && dTypes.indexOf(cat) !== -1) || (dMimes && dMimes.indexOf(type) !== -1) ||\r\n                (dExts.length && $h.compare(name, expDisExt)) || (maxSize && !isNaN(maxSize) && size > maxSize);\r\n            return !skipPreview && (allowedTypes || allowedMimes || allowedExts);\r\n        },\r\n        addToStack: function (file, id) {\r\n            this.fileManager.add(file, id);\r\n        },\r\n        clearFileStack: function () {\r\n            var self = this;\r\n            self.fileManager.clear();\r\n            self._initResumableUpload();\r\n            if (self.enableResumableUpload) {\r\n                if (self.showPause === null) {\r\n                    self.showPause = true;\r\n                }\r\n                if (self.showCancel === null) {\r\n                    self.showCancel = false;\r\n                }\r\n            } else {\r\n                self.showPause = false;\r\n                if (self.showCancel === null) {\r\n                    self.showCancel = true;\r\n                }\r\n            }\r\n            return self.$element;\r\n        },\r\n        getFileStack: function () {\r\n            return this.fileManager.stack;\r\n        },\r\n        getFileList: function () {\r\n            return this.fileManager.list();\r\n        },\r\n        getFilesCount: function (includeInitial) {\r\n            var self = this, len = self.isAjaxUpload ? self.fileManager.count() : self._inputFileCount();\r\n            if (includeInitial) {\r\n                len += self.previewCache.count(true);\r\n            }\r\n            return self._getFileCount(len);\r\n        },\r\n        readFiles: function (files) {\r\n            this.reader = new FileReader();\r\n            var self = this, $el = self.$element, reader = self.reader, $container = self.$previewContainer,\r\n                $status = self.$previewStatus, msgLoading = self.msgLoading, msgProgress = self.msgProgress,\r\n                previewInitId = self.previewInitId, numFiles = files.length, settings = self.fileTypeSettings,\r\n                readFile, fileTypes = self.allowedFileTypes, typLen = fileTypes ? fileTypes.length : 0,\r\n                fileExt = self.allowedFileExtensions, strExt = $h.isEmpty(fileExt) ? '' : fileExt.join(', '),\r\n                throwError = function (msg, file, previewId, index, fileId, removeThumb) {\r\n                    var p1 = $.extend(true, {}, self._getOutData(null, {}, {}, files),\r\n                        {id: previewId, index: index, fileId: fileId}), $thumb,\r\n                        p2 = {id: previewId, index: index, fileId: fileId, file: file, files: files};\r\n                    removeThumb = removeThumb || self.removeFromPreviewOnError;\r\n                    if (!removeThumb) {\r\n                        self._previewDefault(file, true);\r\n                    }\r\n                    $thumb = self._getFrame(previewId, true);\r\n                    if (self.isAjaxUpload) {\r\n                        setTimeout(function () {\r\n                            readFile(index + 1);\r\n                        }, self.processDelay);\r\n                    } else {\r\n                        self.unlock();\r\n                        numFiles = 0;\r\n                    }\r\n                    if (removeThumb && $thumb.length) {\r\n                        $thumb.remove();\r\n                    } else {\r\n                        self._initFileActions();\r\n                        $thumb.find('.kv-file-upload').remove();\r\n                    }\r\n                    self.isError = self.isAjaxUpload ? self._showFileError(msg, p1) : self._showError(msg, p2);\r\n                    self._updateFileDetails(numFiles);\r\n                };\r\n            self.fileManager.clearImages();\r\n            $.each(files, function (key, file) {\r\n                var func = self.fileTypeSettings.image;\r\n                if (func && func(file.type)) {\r\n                    self.fileManager.totalImages++;\r\n                }\r\n            });\r\n            readFile = function (i) {\r\n                var $error = self.$errorContainer, errors, fm = self.fileManager;\r\n                if ($h.isEmpty($el.attr('multiple'))) {\r\n                    numFiles = 1;\r\n                }\r\n                if (i >= numFiles) {\r\n                    self.unlock();\r\n                    if (self.duplicateErrors.length) {\r\n                        errors = '<li>' + self.duplicateErrors.join('</li><li>') + '</li>';\r\n                        if ($error.find('ul').length === 0) {\r\n                            $error.html(self.errorCloseButton + '<ul>' + errors + '</ul>');\r\n                        } else {\r\n                            $error.find('ul').append(errors);\r\n                        }\r\n                        $error.fadeIn(self.fadeDelay);\r\n                        self._handler($error.find('.kv-error-close'), 'click', function () {\r\n                            $error.fadeOut(self.fadeDelay);\r\n                        });\r\n                        self.duplicateErrors = [];\r\n                    }\r\n                    if (self.isAjaxUpload) {\r\n                        self._raise('filebatchselected', [fm.stack]);\r\n                        if (fm.count() === 0 && !self.isError) {\r\n                            self.reset();\r\n                        }\r\n                    } else {\r\n                        self._raise('filebatchselected', [files]);\r\n                    }\r\n                    $container.removeClass('file-thumb-loading');\r\n                    $status.html('');\r\n                    return;\r\n                }\r\n                self.lock(true);\r\n                var file = files[i], previewId = previewInitId + '-' + self._getFileId(file), fSizeKB, j, msg,\r\n                    fnText = settings.text, fnImage = settings.image, fnHtml = settings.html, typ, chk, typ1, typ2,\r\n                    caption = self._getFileName(file, ''), fileSize = (file && file.size || 0) / 1000,\r\n                    fileExtExpr = '', previewData = $h.createObjectURL(file), fileCount = 0,\r\n                    strTypes = '', fileId, canLoad,\r\n                    func, knownTypes = 0, isText, isHtml, isImage, txtFlag, processFileLoaded = function () {\r\n                        var msg = msgProgress.setTokens({\r\n                            'index': i + 1,\r\n                            'files': numFiles,\r\n                            'percent': 50,\r\n                            'name': caption\r\n                        });\r\n                        setTimeout(function () {\r\n                            $status.html(msg);\r\n                            self._updateFileDetails(numFiles);\r\n                            readFile(i + 1);\r\n                        }, self.processDelay);\r\n                        if (self._raise('fileloaded', [file, previewId, i, reader]) && self.isAjaxUpload) {\r\n                            fm.add(file);\r\n                        }\r\n                    };\r\n                if (!file) {\r\n                    return;\r\n                }\r\n                fileId = fm.getId(file);\r\n                if (typLen > 0) {\r\n                    for (j = 0; j < typLen; j++) {\r\n                        typ1 = fileTypes[j];\r\n                        typ2 = self.msgFileTypes[typ1] || typ1;\r\n                        strTypes += j === 0 ? typ2 : ', ' + typ2;\r\n                    }\r\n                }\r\n                if (caption === false) {\r\n                    readFile(i + 1);\r\n                    return;\r\n                }\r\n                if (caption.length === 0) {\r\n                    msg = self.msgInvalidFileName.replace('{name}', $h.htmlEncode($h.getFileName(file), '[unknown]'));\r\n                    throwError(msg, file, previewId, i, fileId);\r\n                    return;\r\n                }\r\n                if (!$h.isEmpty(fileExt)) {\r\n                    fileExtExpr = new RegExp('\\\\.(' + fileExt.join('|') + ')$', 'i');\r\n                }\r\n                fSizeKB = fileSize.toFixed(2);\r\n                if (self.isAjaxUpload && fm.exists(fileId) || self._getFrame(previewId, true).length) {\r\n                    var p2 = {id: previewId, index: i, fileId: fileId, file: file, files: files};\r\n                    msg = self.msgDuplicateFile.setTokens({name: caption, size: fSizeKB});\r\n                    if (self.isAjaxUpload) {\r\n                        setTimeout(function () {\r\n                            self.duplicateErrors.push(msg);\r\n                            self._raise('fileduplicateerror', [file, fileId, caption, fSizeKB, previewId, i]);\r\n                            readFile(i + 1);\r\n                            self._updateFileDetails(numFiles);\r\n                        }, self.processDelay);\r\n                    } else {\r\n                        self._showError(msg, p2);\r\n                        self.unlock();\r\n                        numFiles = 0;\r\n                        self._clearFileInput();\r\n                        self.reset();\r\n                        self._updateFileDetails(numFiles);\r\n                    }\r\n                    return;\r\n                }\r\n                if (self.maxFileSize > 0 && fileSize > self.maxFileSize) {\r\n                    msg = self.msgSizeTooLarge.setTokens({\r\n                        'name': caption,\r\n                        'size': fSizeKB,\r\n                        'maxSize': self.maxFileSize\r\n                    });\r\n                    throwError(msg, file, previewId, i, fileId);\r\n                    return;\r\n                }\r\n                if (self.minFileSize !== null && fileSize <= $h.getNum(self.minFileSize)) {\r\n                    msg = self.msgSizeTooSmall.setTokens({\r\n                        'name': caption,\r\n                        'size': fSizeKB,\r\n                        'minSize': self.minFileSize\r\n                    });\r\n                    throwError(msg, file, previewId, i, fileId);\r\n                    return;\r\n                }\r\n                if (!$h.isEmpty(fileTypes) && $h.isArray(fileTypes)) {\r\n                    for (j = 0; j < fileTypes.length; j += 1) {\r\n                        typ = fileTypes[j];\r\n                        func = settings[typ];\r\n                        fileCount += !func || (typeof func !== 'function') ? 0 : (func(file.type,\r\n                            $h.getFileName(file)) ? 1 : 0);\r\n                    }\r\n                    if (fileCount === 0) {\r\n                        msg = self.msgInvalidFileType.setTokens({name: caption, types: strTypes});\r\n                        throwError(msg, file, previewId, i, fileId);\r\n                        return;\r\n                    }\r\n                }\r\n                if (fileCount === 0 && !$h.isEmpty(fileExt) && $h.isArray(fileExt) && !$h.isEmpty(fileExtExpr)) {\r\n                    chk = $h.compare(caption, fileExtExpr);\r\n                    fileCount += $h.isEmpty(chk) ? 0 : chk.length;\r\n                    if (fileCount === 0) {\r\n                        msg = self.msgInvalidFileExtension.setTokens({name: caption, extensions: strExt});\r\n                        throwError(msg, file, previewId, i, fileId);\r\n                        return;\r\n                    }\r\n                }\r\n                if (!self._canPreview(file)) {\r\n                    canLoad = self.isAjaxUpload && self._raise('filebeforeload', [file, i, reader]);\r\n                    if (self.isAjaxUpload && canLoad) {\r\n                        fm.add(file);\r\n                    }\r\n                    if (self.showPreview && canLoad) {\r\n                        $container.addClass('file-thumb-loading');\r\n                        self._previewDefault(file);\r\n                        self._initFileActions();\r\n                    }\r\n                    setTimeout(function () {\r\n                        if (canLoad) {\r\n                            self._updateFileDetails(numFiles);\r\n                        }\r\n                        readFile(i + 1);\r\n                        self._raise('fileloaded', [file, previewId, i]);\r\n                    }, 10);\r\n                    return;\r\n                }\r\n                isText = fnText(file.type, caption);\r\n                isHtml = fnHtml(file.type, caption);\r\n                isImage = fnImage(file.type, caption);\r\n                $status.html(msgLoading.replace('{index}', i + 1).replace('{files}', numFiles));\r\n                $container.addClass('file-thumb-loading');\r\n                reader.onerror = function (evt) {\r\n                    self._errorHandler(evt, caption);\r\n                };\r\n                reader.onload = function (theFile) {\r\n                    var hex, fileInfo, uint, byte, bytes = [], contents, mime, readTextImage = function (textFlag) {\r\n                        var newReader = new FileReader();\r\n                        newReader.onerror = function (theFileNew) {\r\n                            self._errorHandler(theFileNew, caption);\r\n                        };\r\n                        newReader.onload = function (theFileNew) {\r\n                            if (self.isAjaxUpload && !self._raise('filebeforeload', [file, i, reader])) {\r\n                                return;\r\n                            }\r\n                            self._previewFile(i, file, theFileNew, previewData, fileInfo);\r\n                            self._initFileActions();\r\n                            processFileLoaded();\r\n                        };\r\n                        if (textFlag) {\r\n                            newReader.readAsText(file, self.textEncoding);\r\n                        } else {\r\n                            newReader.readAsDataURL(file);\r\n                        }\r\n                    };\r\n                    fileInfo = {'name': caption, 'type': file.type};\r\n                    $.each(settings, function (k, f) {\r\n                        if (k !== 'object' && k !== 'other' && typeof f === 'function' && f(file.type, caption)) {\r\n                            knownTypes++;\r\n                        }\r\n                    });\r\n                    if (knownTypes === 0) { // auto detect mime types from content if no known file types detected\r\n                        uint = new Uint8Array(theFile.target.result);\r\n                        for (j = 0; j < uint.length; j++) {\r\n                            byte = uint[j].toString(16);\r\n                            bytes.push(byte);\r\n                        }\r\n                        hex = bytes.join('').toLowerCase().substring(0, 8);\r\n                        mime = $h.getMimeType(hex, '', '');\r\n                        if ($h.isEmpty(mime)) { // look for ascii text content\r\n                            contents = $h.arrayBuffer2String(reader.result);\r\n                            mime = $h.isSvg(contents) ? 'image/svg+xml' : $h.getMimeType(hex, contents, file.type);\r\n                        }\r\n                        fileInfo = {'name': caption, 'type': mime};\r\n                        isText = fnText(mime, '');\r\n                        isHtml = fnHtml(mime, '');\r\n                        isImage = fnImage(mime, '');\r\n                        txtFlag = isText || isHtml;\r\n                        if (txtFlag || isImage) {\r\n                            readTextImage(txtFlag);\r\n                            return;\r\n                        }\r\n                    }\r\n                    if (self.isAjaxUpload && !self._raise('filebeforeload', [file, i, reader])) {\r\n                        return;\r\n                    }\r\n                    self._previewFile(i, file, theFile, previewData, fileInfo);\r\n                    self._initFileActions();\r\n                    processFileLoaded();\r\n                };\r\n                reader.onprogress = function (data) {\r\n                    if (data.lengthComputable) {\r\n                        var fact = (data.loaded / data.total) * 100, progress = Math.ceil(fact);\r\n                        msg = msgProgress.setTokens({\r\n                            'index': i + 1,\r\n                            'files': numFiles,\r\n                            'percent': progress,\r\n                            'name': caption\r\n                        });\r\n                        setTimeout(function () {\r\n                            $status.html(msg);\r\n                        }, self.processDelay);\r\n                    }\r\n                };\r\n                if (isText || isHtml) {\r\n                    reader.readAsText(file, self.textEncoding);\r\n                } else {\r\n                    if (isImage) {\r\n                        reader.readAsDataURL(file);\r\n                    } else {\r\n                        reader.readAsArrayBuffer(file);\r\n                    }\r\n                }\r\n            };\r\n\r\n            readFile(0);\r\n            self._updateFileDetails(numFiles, true);\r\n        },\r\n        lock: function (selectMode) {\r\n            var self = this, $container = self.$container;\r\n            self._resetErrors();\r\n            self.disable();\r\n            if (!selectMode && self.showCancel) {\r\n                $container.find('.fileinput-cancel').show();\r\n            }\r\n            if (!selectMode && self.showPause) {\r\n                $container.find('.fileinput-pause').show();\r\n            }\r\n            self._raise('filelock', [self.fileManager.stack, self._getExtraData()]);\r\n            return self.$element;\r\n        },\r\n        unlock: function (reset) {\r\n            var self = this, $container = self.$container;\r\n            if (reset === undefined) {\r\n                reset = true;\r\n            }\r\n            self.enable();\r\n            $container.removeClass('is-locked');\r\n            if (self.showCancel) {\r\n                $container.find('.fileinput-cancel').hide();\r\n            }\r\n            if (self.showPause) {\r\n                $container.find('.fileinput-pause').hide();\r\n            }\r\n            if (reset) {\r\n                self._resetFileStack();\r\n            }\r\n            self._raise('fileunlock', [self.fileManager.stack, self._getExtraData()]);\r\n            return self.$element;\r\n        },\r\n        resume: function () {\r\n            var self = this, flag = false, rm = self.resumableManager;\r\n            if (!self.enableResumableUpload) {\r\n                return self.$element;\r\n            }\r\n            if (self.paused) {\r\n                self._toggleResumableProgress(self.progressPauseTemplate, self.msgUploadResume);\r\n            } else {\r\n                flag = true;\r\n            }\r\n            self.paused = false;\r\n            if (flag) {\r\n                self._toggleResumableProgress(self.progressInfoTemplate, self.msgUploadBegin);\r\n            }\r\n            setTimeout(function () {\r\n                rm.upload();\r\n            }, self.processDelay);\r\n            return self.$element;\r\n        },\r\n        pause: function () {\r\n            var self = this, rm = self.resumableManager, xhr = self.ajaxRequests, len = xhr.length, i,\r\n                pct = rm.getProgress(), actions = self.fileActionSettings;\r\n            if (!self.enableResumableUpload) {\r\n                return self.$element;\r\n            }\r\n            if (rm.chunkIntervalId) {\r\n                clearInterval(rm.chunkIntervalId);\r\n            }\r\n            if (self.ajaxQueueIntervalId) {\r\n                clearInterval(self.ajaxQueueIntervalId);\r\n            }\r\n            self._raise('fileuploadpaused', [self.fileManager, rm]);\r\n            if (len > 0) {\r\n                for (i = 0; i < len; i += 1) {\r\n                    self.paused = true;\r\n                    xhr[i].abort();\r\n                }\r\n            }\r\n            if (self.showPreview) {\r\n                self._getThumbs().each(function () {\r\n                    var $thumb = $(this), fileId = $thumb.attr('data-fileid'), t = self._getLayoutTemplate('stats'),\r\n                        stats, $indicator = $thumb.find('.file-upload-indicator');\r\n                    $thumb.removeClass('file-uploading');\r\n                    if ($indicator.attr('title') === actions.indicatorLoadingTitle) {\r\n                        self._setThumbStatus($thumb, 'Paused');\r\n                        stats = t.setTokens({pendingTime: self.msgPaused, uploadSpeed: ''});\r\n                        self.paused = true;\r\n                        self._setProgress(pct, $thumb.find('.file-thumb-progress'), pct + '%', stats);\r\n                    }\r\n                    if (!self.fileManager.getFile(fileId)) {\r\n                        $thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled');\r\n                    }\r\n                });\r\n            }\r\n            self._setProgress(101, self.$progress, self.msgPaused);\r\n            return self.$element;\r\n        },\r\n        cancel: function () {\r\n            var self = this, xhr = self.ajaxRequests, rm = self.resumableManager, len = xhr.length, i;\r\n            if (self.enableResumableUpload && rm.chunkIntervalId) {\r\n                clearInterval(rm.chunkIntervalId);\r\n                rm.reset();\r\n                self._raise('fileuploadcancelled', [self.fileManager, rm]);\r\n            } else {\r\n                self._raise('fileuploadcancelled', [self.fileManager]);\r\n            }\r\n            if (self.ajaxQueueIntervalId) {\r\n                clearInterval(self.ajaxQueueIntervalId);\r\n            }\r\n            self._initAjax();\r\n            if (len > 0) {\r\n                for (i = 0; i < len; i += 1) {\r\n                    self.cancelling = true;\r\n                    xhr[i].abort();\r\n                }\r\n            }\r\n            self._getThumbs().each(function () {\r\n                var $thumb = $(this), fileId = $thumb.attr('data-fileid'), $prog = $thumb.find('.file-thumb-progress');\r\n                $thumb.removeClass('file-uploading');\r\n                self._setProgress(0, $prog);\r\n                $prog.hide();\r\n                if (!self.fileManager.getFile(fileId)) {\r\n                    $thumb.find('.kv-file-upload').removeClass('disabled').removeAttr('disabled');\r\n                    $thumb.find('.kv-file-remove').removeClass('disabled').removeAttr('disabled');\r\n                }\r\n                self.unlock();\r\n            });\r\n            setTimeout(function () {\r\n                self._setProgressCancelled();\r\n            }, self.processDelay);\r\n            return self.$element;\r\n        },\r\n        clear: function () {\r\n            var self = this, cap;\r\n            if (!self._raise('fileclear')) {\r\n                return;\r\n            }\r\n            self.$btnUpload.removeAttr('disabled');\r\n            self._getThumbs().find('video,audio,img').each(function () {\r\n                $h.cleanMemory($(this));\r\n            });\r\n            self._clearFileInput();\r\n            self._resetUpload();\r\n            self.clearFileStack();\r\n            self._resetErrors(true);\r\n            if (self._hasInitialPreview()) {\r\n                self._showFileIcon();\r\n                self._resetPreview();\r\n                self._initPreviewActions();\r\n                self.$container.removeClass('file-input-new');\r\n            } else {\r\n                self._getThumbs().each(function () {\r\n                    self._clearObjects($(this));\r\n                });\r\n                if (self.isAjaxUpload) {\r\n                    self.previewCache.data = {};\r\n                }\r\n                self.$preview.html('');\r\n                cap = (!self.overwriteInitial && self.initialCaption.length > 0) ? self.initialCaption : '';\r\n                self.$caption.attr('title', '').val(cap);\r\n                $h.addCss(self.$container, 'file-input-new');\r\n                self._validateDefaultPreview();\r\n            }\r\n            if (self.$container.find($h.FRAMES).length === 0) {\r\n                if (!self._initCaption()) {\r\n                    self.$captionContainer.removeClass('icon-visible');\r\n                }\r\n            }\r\n            self._hideFileIcon();\r\n            if (self.focusCaptionOnClear) {\r\n                self.$captionContainer.focus();\r\n            }\r\n            self._setFileDropZoneTitle();\r\n            self._raise('filecleared');\r\n            return self.$element;\r\n        },\r\n        reset: function () {\r\n            var self = this;\r\n            if (!self._raise('filereset')) {\r\n                return;\r\n            }\r\n            self.lastProgress = 0;\r\n            self._resetPreview();\r\n            self.$container.find('.fileinput-filename').text('');\r\n            $h.addCss(self.$container, 'file-input-new');\r\n            if (self.getFrames().length) {\r\n                self.$container.removeClass('file-input-new');\r\n            }\r\n            self.clearFileStack();\r\n            self._setFileDropZoneTitle();\r\n            return self.$element;\r\n        },\r\n        disable: function () {\r\n            var self = this, $container = self.$container;\r\n            self.isDisabled = true;\r\n            self._raise('filedisabled');\r\n            self.$element.attr('disabled', 'disabled');\r\n            $container.addClass('is-locked');\r\n            $h.addCss($container.find('.btn-file'), 'disabled');\r\n            $container.find('.kv-fileinput-caption').addClass('file-caption-disabled');\r\n            $container.find('.fileinput-remove, .fileinput-upload, .file-preview-frame button')\r\n                .attr('disabled', true);\r\n            self._initDragDrop();\r\n            return self.$element;\r\n        },\r\n        enable: function () {\r\n            var self = this, $container = self.$container;\r\n            self.isDisabled = false;\r\n            self._raise('fileenabled');\r\n            self.$element.removeAttr('disabled');\r\n            $container.removeClass('is-locked');\r\n            $container.find('.kv-fileinput-caption').removeClass('file-caption-disabled');\r\n            $container.find('.fileinput-remove, .fileinput-upload, .file-preview-frame button')\r\n                .removeAttr('disabled');\r\n            $container.find('.btn-file').removeClass('disabled');\r\n            self._initDragDrop();\r\n            return self.$element;\r\n        },\r\n        upload: function () {\r\n            var self = this, fm = self.fileManager, totLen = fm.count(), i, outData,\r\n                hasExtraData = !$.isEmptyObject(self._getExtraData());\r\n            if (!self.isAjaxUpload || self.isDisabled || !self._isFileSelectionValid(totLen)) {\r\n                return;\r\n            }\r\n            self.lastProgress = 0;\r\n            self._resetUpload();\r\n            if (totLen === 0 && !hasExtraData) {\r\n                self._showFileError(self.msgUploadEmpty);\r\n                return;\r\n            }\r\n            self.cancelling = false;\r\n            self._showProgress();\r\n            self.lock();\r\n            if (totLen === 0 && hasExtraData) {\r\n                self._setProgress(2);\r\n                self._uploadExtraOnly();\r\n                return;\r\n            }\r\n            if (self.enableResumableUpload) {\r\n                return self.resume();\r\n            }\r\n            if (self.uploadAsync || self.enableResumableUpload) {\r\n                outData = self._getOutData(null);\r\n                self._raise('filebatchpreupload', [outData]);\r\n                self.fileBatchCompleted = false;\r\n                self.uploadCache = [];\r\n                $.each(self.getFileStack(), function (id) {\r\n                    var previewId = self._getThumbId(id);\r\n                    self.uploadCache.push({id: previewId, content: null, config: null, tags: null, append: true});\r\n                });\r\n                self.$preview.find('.file-preview-initial').removeClass($h.SORT_CSS);\r\n                self._initSortable();\r\n            }\r\n            self._setProgress(2);\r\n            self.hasInitData = false;\r\n            if (self.uploadAsync) {\r\n                i = 0;\r\n                $.each(fm.stack, function (id) {\r\n                    self._uploadSingle(i, id, true);\r\n                    i++;\r\n                });\r\n                return;\r\n            }\r\n            self._uploadBatch();\r\n            return self.$element;\r\n        },\r\n        destroy: function () {\r\n            var self = this, $form = self.$form, $cont = self.$container, $el = self.$element, ns = self.namespace;\r\n            $(document).off(ns);\r\n            $(window).off(ns);\r\n            if ($form && $form.length) {\r\n                $form.off(ns);\r\n            }\r\n            if (self.isAjaxUpload) {\r\n                self._clearFileInput();\r\n            }\r\n            self._cleanup();\r\n            self._initPreviewCache();\r\n            $el.insertBefore($cont).off(ns).removeData();\r\n            $cont.off().remove();\r\n            return $el;\r\n        },\r\n        refresh: function (options) {\r\n            var self = this, $el = self.$element;\r\n            if (typeof options !== 'object' || $h.isEmpty(options)) {\r\n                options = self.options;\r\n            } else {\r\n                options = $.extend(true, {}, self.options, options);\r\n            }\r\n            self._init(options, true);\r\n            self._listen();\r\n            return $el;\r\n        },\r\n        zoom: function (frameId) {\r\n            var self = this, $frame = self._getFrame(frameId), $modal = self.$modal;\r\n            if (!$frame) {\r\n                return;\r\n            }\r\n            $h.initModal($modal);\r\n            $modal.html(self._getModalContent());\r\n            self._setZoomContent($frame);\r\n            $modal.modal('show');\r\n            self._initZoomButtons();\r\n        },\r\n        getExif: function (frameId) {\r\n            var self = this, $frame = self._getFrame(frameId);\r\n            return $frame && $frame.data('exif') || null;\r\n        },\r\n        getFrames: function (cssFilter) {\r\n            var self = this, $frames;\r\n            cssFilter = cssFilter || '';\r\n            $frames = self.$preview.find($h.FRAMES + cssFilter);\r\n            if (self.reversePreviewOrder) {\r\n                $frames = $($frames.get().reverse());\r\n            }\r\n            return $frames;\r\n        },\r\n        getPreview: function () {\r\n            var self = this;\r\n            return {\r\n                content: self.initialPreview,\r\n                config: self.initialPreviewConfig,\r\n                tags: self.initialPreviewThumbTags\r\n            };\r\n        }\r\n    };\r\n\r\n    $.fn.fileinput = function (option) {\r\n        if (!$h.hasFileAPISupport() && !$h.isIE(9)) {\r\n            return;\r\n        }\r\n        var args = Array.apply(null, arguments), retvals = [];\r\n        args.shift();\r\n        this.each(function () {\r\n            var self = $(this), data = self.data('fileinput'), options = typeof option === 'object' && option,\r\n                theme = options.theme || self.data('theme'), l = {}, t = {},\r\n                lang = options.language || self.data('language') || $.fn.fileinput.defaults.language || 'en', opt;\r\n            if (!data) {\r\n                if (theme) {\r\n                    t = $.fn.fileinputThemes[theme] || {};\r\n                }\r\n                if (lang !== 'en' && !$h.isEmpty($.fn.fileinputLocales[lang])) {\r\n                    l = $.fn.fileinputLocales[lang] || {};\r\n                }\r\n                opt = $.extend(true, {}, $.fn.fileinput.defaults, t, $.fn.fileinputLocales.en, l, options, self.data());\r\n                data = new FileInput(this, opt);\r\n                self.data('fileinput', data);\r\n            }\r\n\r\n            if (typeof option === 'string') {\r\n                retvals.push(data[option].apply(data, args));\r\n            }\r\n        });\r\n        switch (retvals.length) {\r\n            case 0:\r\n                return this;\r\n            case 1:\r\n                return retvals[0];\r\n            default:\r\n                return retvals;\r\n        }\r\n    };\r\n\r\n    //noinspection HtmlUnknownAttribute\r\n    $.fn.fileinput.defaults = {\r\n        language: 'en',\r\n        showCaption: true,\r\n        showBrowse: true,\r\n        showPreview: true,\r\n        showRemove: true,\r\n        showUpload: true,\r\n        showUploadStats: true,\r\n        showCancel: null,\r\n        showPause: null,\r\n        showClose: true,\r\n        showUploadedThumbs: true,\r\n        showConsoleLogs: true,\r\n        browseOnZoneClick: false,\r\n        autoReplace: false,\r\n        autoOrientImage: function () { // applicable for JPEG images only and non ios safari\r\n            var ua = window.navigator.userAgent, webkit = !!ua.match(/WebKit/i),\r\n                iOS = !!ua.match(/iP(od|ad|hone)/i), iOSSafari = iOS && webkit && !ua.match(/CriOS/i);\r\n            return !iOSSafari;\r\n        },\r\n        autoOrientImageInitial: true,\r\n        required: false,\r\n        rtl: false,\r\n        hideThumbnailContent: false,\r\n        encodeUrl: true,\r\n        focusCaptionOnBrowse: true,\r\n        focusCaptionOnClear: true,\r\n        generateFileId: null,\r\n        previewClass: '',\r\n        captionClass: '',\r\n        frameClass: 'krajee-default',\r\n        mainClass: 'file-caption-main',\r\n        mainTemplate: null,\r\n        purifyHtml: true,\r\n        fileSizeGetter: null,\r\n        initialCaption: '',\r\n        initialPreview: [],\r\n        initialPreviewDelimiter: '*$$*',\r\n        initialPreviewAsData: false,\r\n        initialPreviewFileType: 'image',\r\n        initialPreviewConfig: [],\r\n        initialPreviewThumbTags: [],\r\n        previewThumbTags: {},\r\n        initialPreviewShowDelete: true,\r\n        initialPreviewDownloadUrl: '',\r\n        removeFromPreviewOnError: false,\r\n        deleteUrl: '',\r\n        deleteExtraData: {},\r\n        overwriteInitial: true,\r\n        sanitizeZoomCache: function (content) {\r\n            var $container = $(document.createElement('div')).append(content);\r\n            $container.find('input,select,.file-thumbnail-footer').remove();\r\n            return $container.html();\r\n        },\r\n        previewZoomButtonIcons: {\r\n            prev: '<i class=\"glyphicon glyphicon-triangle-left\"></i>',\r\n            next: '<i class=\"glyphicon glyphicon-triangle-right\"></i>',\r\n            toggleheader: '<i class=\"glyphicon glyphicon-resize-vertical\"></i>',\r\n            fullscreen: '<i class=\"glyphicon glyphicon-fullscreen\"></i>',\r\n            borderless: '<i class=\"glyphicon glyphicon-resize-full\"></i>',\r\n            close: '<i class=\"glyphicon glyphicon-remove\"></i>'\r\n        },\r\n        previewZoomButtonClasses: {\r\n            prev: 'btn btn-navigate',\r\n            next: 'btn btn-navigate',\r\n            toggleheader: 'btn btn-sm btn-kv btn-default btn-outline-secondary',\r\n            fullscreen: 'btn btn-sm btn-kv btn-default btn-outline-secondary',\r\n            borderless: 'btn btn-sm btn-kv btn-default btn-outline-secondary',\r\n            close: 'btn btn-sm btn-kv btn-default btn-outline-secondary'\r\n        },\r\n        previewTemplates: {},\r\n        previewContentTemplates: {},\r\n        preferIconicPreview: false,\r\n        preferIconicZoomPreview: false,\r\n        allowedFileTypes: null,\r\n        allowedFileExtensions: null,\r\n        allowedPreviewTypes: undefined,\r\n        allowedPreviewMimeTypes: null,\r\n        allowedPreviewExtensions: null,\r\n        disabledPreviewTypes: undefined,\r\n        disabledPreviewExtensions: ['msi', 'exe', 'com', 'zip', 'rar', 'app', 'vb', 'scr'],\r\n        disabledPreviewMimeTypes: null,\r\n        defaultPreviewContent: null,\r\n        customLayoutTags: {},\r\n        customPreviewTags: {},\r\n        previewFileIcon: '<i class=\"glyphicon glyphicon-file\"></i>',\r\n        previewFileIconClass: 'file-other-icon',\r\n        previewFileIconSettings: {},\r\n        previewFileExtSettings: {},\r\n        buttonLabelClass: 'hidden-xs',\r\n        browseIcon: '<i class=\"glyphicon glyphicon-folder-open\"></i>&nbsp;',\r\n        browseClass: 'btn btn-primary',\r\n        removeIcon: '<i class=\"glyphicon glyphicon-trash\"></i>',\r\n        removeClass: 'btn btn-default btn-secondary',\r\n        cancelIcon: '<i class=\"glyphicon glyphicon-ban-circle\"></i>',\r\n        cancelClass: 'btn btn-default btn-secondary',\r\n        pauseIcon: '<i class=\"glyphicon glyphicon-pause\"></i>',\r\n        pauseClass: 'btn btn-default btn-secondary',\r\n        uploadIcon: '<i class=\"glyphicon glyphicon-upload\"></i>',\r\n        uploadClass: 'btn btn-default btn-secondary',\r\n        uploadUrl: null,\r\n        uploadUrlThumb: null,\r\n        uploadAsync: true,\r\n        uploadParamNames: {\r\n            chunkCount: 'chunkCount',\r\n            chunkIndex: 'chunkIndex',\r\n            chunkSize: 'chunkSize',\r\n            chunkSizeStart: 'chunkSizeStart',\r\n            chunksUploaded: 'chunksUploaded',\r\n            fileBlob: 'fileBlob',\r\n            fileId: 'fileId',\r\n            fileName: 'fileName',\r\n            fileRelativePath: 'fileRelativePath',\r\n            fileSize: 'fileSize',\r\n            retryCount: 'retryCount'\r\n        },\r\n        maxAjaxThreads: 5,\r\n        fadeDelay: 800,\r\n        processDelay: 100,\r\n        queueDelay: 10, // must be lesser than process delay\r\n        progressDelay: 0, // must be lesser than process delay\r\n        enableResumableUpload: false,\r\n        resumableUploadOptions: {\r\n            fallback: null,\r\n            testUrl: null, // used for checking status of chunks/ files previously / partially uploaded\r\n            chunkSize: 2 * 1024, // in KB\r\n            maxThreads: 4,\r\n            maxRetries: 3,\r\n            showErrorLog: true\r\n        },\r\n        uploadExtraData: {},\r\n        zoomModalHeight: 480,\r\n        minImageWidth: null,\r\n        minImageHeight: null,\r\n        maxImageWidth: null,\r\n        maxImageHeight: null,\r\n        resizeImage: false,\r\n        resizePreference: 'width',\r\n        resizeQuality: 0.92,\r\n        resizeDefaultImageType: 'image/jpeg',\r\n        resizeIfSizeMoreThan: 0, // in KB\r\n        minFileSize: 0,\r\n        maxFileSize: 0,\r\n        maxFilePreviewSize: 25600, // 25 MB\r\n        minFileCount: 0,\r\n        maxFileCount: 0,\r\n        maxTotalFileCount: 0,\r\n        validateInitialCount: false,\r\n        msgValidationErrorClass: 'text-danger',\r\n        msgValidationErrorIcon: '<i class=\"glyphicon glyphicon-exclamation-sign\"></i> ',\r\n        msgErrorClass: 'file-error-message',\r\n        progressThumbClass: 'progress-bar progress-bar-striped active',\r\n        progressClass: 'progress-bar bg-success progress-bar-success progress-bar-striped active',\r\n        progressInfoClass: 'progress-bar bg-info progress-bar-info progress-bar-striped active',\r\n        progressCompleteClass: 'progress-bar bg-success progress-bar-success',\r\n        progressPauseClass: 'progress-bar bg-primary progress-bar-primary progress-bar-striped active',\r\n        progressErrorClass: 'progress-bar bg-danger progress-bar-danger',\r\n        progressUploadThreshold: 99,\r\n        previewFileType: 'image',\r\n        elCaptionContainer: null,\r\n        elCaptionText: null,\r\n        elPreviewContainer: null,\r\n        elPreviewImage: null,\r\n        elPreviewStatus: null,\r\n        elErrorContainer: null,\r\n        errorCloseButton: $h.closeButton('kv-error-close'),\r\n        slugCallback: null,\r\n        dropZoneEnabled: true,\r\n        dropZoneTitleClass: 'file-drop-zone-title',\r\n        fileActionSettings: {},\r\n        otherActionButtons: '',\r\n        textEncoding: 'UTF-8',\r\n        ajaxSettings: {},\r\n        ajaxDeleteSettings: {},\r\n        showAjaxErrorDetails: true,\r\n        mergeAjaxCallbacks: false,\r\n        mergeAjaxDeleteCallbacks: false,\r\n        retryErrorUploads: true,\r\n        reversePreviewOrder: false,\r\n        usePdfRenderer: function () {\r\n            //noinspection JSUnresolvedVariable\r\n            var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;\r\n            return !!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i) || isIE11;\r\n        },\r\n        pdfRendererUrl: '',\r\n        pdfRendererTemplate: '<iframe class=\"kv-preview-data file-preview-pdf\" src=\"{renderer}?file={data}\" {style}></iframe>'\r\n    };\r\n\r\n    // noinspection HtmlUnknownAttribute\r\n    $.fn.fileinputLocales.en = {\r\n        fileSingle: 'file',\r\n        filePlural: 'files',\r\n        browseLabel: 'Browse &hellip;',\r\n        removeLabel: 'Remove',\r\n        removeTitle: 'Clear all unprocessed files',\r\n        cancelLabel: 'Cancel',\r\n        cancelTitle: 'Abort ongoing upload',\r\n        pauseLabel: 'Pause',\r\n        pauseTitle: 'Pause ongoing upload',\r\n        uploadLabel: 'Upload',\r\n        uploadTitle: 'Upload selected files',\r\n        msgNo: 'No',\r\n        msgNoFilesSelected: 'No files selected',\r\n        msgCancelled: 'Cancelled',\r\n        msgPaused: 'Paused',\r\n        msgPlaceholder: 'Select {files}...',\r\n        msgZoomModalHeading: 'Detailed Preview',\r\n        msgFileRequired: 'You must select a file to upload.',\r\n        msgSizeTooSmall: 'File \"{name}\" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',\r\n        msgSizeTooLarge: 'File \"{name}\" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',\r\n        msgFilesTooLess: 'You must select at least <b>{n}</b> {files} to upload.',\r\n        msgFilesTooMany: 'Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.',\r\n        msgTotalFilesTooMany: 'You can upload a maximum of <b>{m}</b> files (<b>{n}</b> files detected).',\r\n        msgFileNotFound: 'File \"{name}\" not found!',\r\n        msgFileSecured: 'Security restrictions prevent reading the file \"{name}\".',\r\n        msgFileNotReadable: 'File \"{name}\" is not readable.',\r\n        msgFilePreviewAborted: 'File preview aborted for \"{name}\".',\r\n        msgFilePreviewError: 'An error occurred while reading the file \"{name}\".',\r\n        msgInvalidFileName: 'Invalid or unsupported characters in file name \"{name}\".',\r\n        msgInvalidFileType: 'Invalid type for file \"{name}\". Only \"{types}\" files are supported.',\r\n        msgInvalidFileExtension: 'Invalid extension for file \"{name}\". Only \"{extensions}\" files are supported.',\r\n        msgFileTypes: {\r\n            'image': 'image',\r\n            'html': 'HTML',\r\n            'text': 'text',\r\n            'video': 'video',\r\n            'audio': 'audio',\r\n            'flash': 'flash',\r\n            'pdf': 'PDF',\r\n            'object': 'object'\r\n        },\r\n        msgUploadAborted: 'The file upload was aborted',\r\n        msgUploadThreshold: 'Processing...',\r\n        msgUploadBegin: 'Initializing...',\r\n        msgUploadEnd: 'Done',\r\n        msgUploadResume: 'Resuming upload...',\r\n        msgUploadEmpty: 'No valid data available for upload.',\r\n        msgUploadError: 'Upload Error',\r\n        msgDeleteError: 'Delete Error',\r\n        msgProgressError: 'Error',\r\n        msgValidationError: 'Validation Error',\r\n        msgLoading: 'Loading file {index} of {files} &hellip;',\r\n        msgProgress: 'Loading file {index} of {files} - {name} - {percent}% completed.',\r\n        msgSelected: '{n} {files} selected',\r\n        msgFoldersNotAllowed: 'Drag & drop files only! {n} folder(s) dropped were skipped.',\r\n        msgImageWidthSmall: 'Width of image file \"{name}\" must be at least {size} px.',\r\n        msgImageHeightSmall: 'Height of image file \"{name}\" must be at least {size} px.',\r\n        msgImageWidthLarge: 'Width of image file \"{name}\" cannot exceed {size} px.',\r\n        msgImageHeightLarge: 'Height of image file \"{name}\" cannot exceed {size} px.',\r\n        msgImageResizeError: 'Could not get the image dimensions to resize.',\r\n        msgImageResizeException: 'Error while resizing the image.<pre>{errors}</pre>',\r\n        msgAjaxError: 'Something went wrong with the {operation} operation. Please try again later!',\r\n        msgAjaxProgressError: '{operation} failed',\r\n        msgDuplicateFile: 'File \"{name}\" of same size \"{size} KB\" has already been selected earlier. Skipping duplicate selection.',\r\n        msgResumableUploadRetriesExceeded: 'Upload aborted beyond <b>{max}</b> retries for file <b>{file}</b>! Error Details: <pre>{error}</pre>',\r\n        msgPendingTime: '{time} remaining',\r\n        msgCalculatingTime: 'calculating time remaining',\r\n        ajaxOperations: {\r\n            deleteThumb: 'file delete',\r\n            uploadThumb: 'file upload',\r\n            uploadBatch: 'batch file upload',\r\n            uploadExtra: 'form data upload'\r\n        },\r\n        dropZoneTitle: 'Drag & drop files here &hellip;',\r\n        dropZoneClickTitle: '<br>(or click to select {files})',\r\n        previewZoomButtonTitles: {\r\n            prev: 'View previous file',\r\n            next: 'View next file',\r\n            toggleheader: 'Toggle header',\r\n            fullscreen: 'Toggle full screen',\r\n            borderless: 'Toggle borderless mode',\r\n            close: 'Close detailed preview'\r\n        }\r\n    };\r\n\r\n    $.fn.fileinput.Constructor = FileInput;\r\n\r\n    /**\r\n     * Convert automatically file inputs with class 'file' into a bootstrap fileinput control.\r\n     */\r\n    $(document).ready(function () {\r\n        var $input = $('input.file[type=file]');\r\n        if ($input.length) {\r\n            $input.fileinput();\r\n        }\r\n    });\r\n}));\r\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL2Jvb3RzdHJhcC1maWxlaW5wdXQvanMvZmlsZWlucHV0LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4uL25vZGV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ICAgICAgcmV0dXJuIFN0cmluZyhmaWxlLnJlbGF0aXZlUGF0aCB8fCBmaWxlLndlYmtpdFJlbGF0aXZlUGF0aCB8fCAkaC5nZXRGaWxlTmFtZShmaWxlKSB8fCBudWxsKTtcclxuXHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRGaWxlSWQ6IGZ1bmN0aW9uIChmaWxlLCBnZW5lcmF0ZUZpbGVJZCkge1xyXG4gICAgICAgICAgICB2YXIgcmVsYXRpdmVQYXRoID0gJGguZ2V0RmlsZVJlbGF0aXZlUGF0aChmaWxlKTtcclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBnZW5lcmF0ZUZpbGVJZCA9PT0gJ2Z1bmN0aW9uJykge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGdlbmVyYXRlRmlsZUlkKGZpbGUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKCFyZWxhdGl2ZVBhdGgpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiAoZmlsZS5zaXplICsgJ18nICsgcmVsYXRpdmVQYXRoLnJlcGxhY2UoL1xccy9pbWcsICdfJykpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZ2V0RnJhbWVTZWxlY3RvcjogZnVuY3Rpb24gKGlkLCBzZWxlY3Rvcikge1xyXG4gICAgICAgICAgICBzZWxlY3RvciA9IHNlbGVjdG9yIHx8ICcnO1xyXG4gICAgICAgICAgICByZXR1cm4gJ1tpZD1cIicgKyBpZCArICdcIl0nICsgc2VsZWN0b3I7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRab29tU2VsZWN0b3I6IGZ1bmN0aW9uIChpZCwgc2VsZWN0b3IpIHtcclxuICAgICAgICAgICAgc2VsZWN0b3IgPSBzZWxlY3RvciB8fCAnJztcclxuICAgICAgICAgICAgcmV0dXJuICdbaWQ9XCJ6b29tLScgKyBpZCArICdcIl0nICsgc2VsZWN0b3I7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRGcmFtZUVsZW1lbnQ6IGZ1bmN0aW9uICgkZWxlbWVudCwgaWQsIHNlbGVjdG9yKSB7XHJcbiAgICAgICAgICAgIHJldHVybiAkZWxlbWVudC5maW5kKCRoLmdldEZyYW1lU2VsZWN0b3IoaWQsIHNlbGVjdG9yKSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRab29tRWxlbWVudDogZnVuY3Rpb24gKCRlbGVtZW50LCBpZCwgc2VsZWN0b3IpIHtcclxuICAgICAgICAgICAgcmV0dXJuICRlbGVtZW50LmZpbmQoJGguZ2V0Wm9vbVNlbGVjdG9yKGlkLCBzZWxlY3RvcikpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZ2V0RWxhcHNlZDogZnVuY3Rpb24gKHNlY29uZHMpIHtcclxuICAgICAgICAgICAgdmFyIGRlbHRhID0gc2Vjb25kcywgb3V0ID0gJycsIHJlc3VsdCA9IHt9LCBzdHJ1Y3R1cmUgPSB7XHJcbiAgICAgICAgICAgICAgICB5ZWFyOiAzMTUzNjAwMCxcclxuICAgICAgICAgICAgICAgIG1vbnRoOiAyNTkyMDAwLFxyXG4gICAgICAgICAgICAgICAgd2VlazogNjA0ODAwLCAvLyB1bmNvbW1lbnQgcm93IHRvIGlnbm9yZVxyXG4gICAgICAgICAgICAgICAgZGF5OiA4NjQwMCwgICAvLyBmZWVsIGZyZWUgdG8gYWRkIHlvdXIgb3duIHJvd1xyXG4gICAgICAgICAgICAgICAgaG91cjogMzYwMCxcclxuICAgICAgICAgICAgICAgIG1pbnV0ZTogNjAsXHJcbiAgICAgICAgICAgICAgICBzZWNvbmQ6IDFcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgT2JqZWN0LmtleXMoc3RydWN0dXJlKS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcclxuICAgICAgICAgICAgICAgIHJlc3VsdFtrZXldID0gTWF0aC5mbG9vcihkZWx0YSAvIHN0cnVjdHVyZVtrZXldKTtcclxuICAgICAgICAgICAgICAgIGRlbHRhIC09IHJlc3VsdFtrZXldICogc3RydWN0dXJlW2tleV07XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAkLmVhY2gocmVzdWx0LCBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlID4gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG91dCArPSAob3V0ID8gJyAnIDogJycpICsgdmFsdWUgKyBrZXkuc3Vic3RyaW5nKDAsIDEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgcmV0dXJuIG91dDtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGRlYm91bmNlOiBmdW5jdGlvbiAoZnVuYywgZGVsYXkpIHtcclxuICAgICAgICAgICAgdmFyIGluRGVib3VuY2U7XHJcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IGFyZ3VtZW50cywgY29udGV4dCA9IHRoaXM7XHJcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQoaW5EZWJvdW5jZSk7XHJcbiAgICAgICAgICAgICAgICBpbkRlYm91bmNlID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZnVuYy5hcHBseShjb250ZXh0LCBhcmdzKTtcclxuICAgICAgICAgICAgICAgIH0sIGRlbGF5KTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHN0b3BFdmVudDogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5z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A6IGlucHV0Lm1hdGNoKHN0cikpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgaXNJRTogZnVuY3Rpb24gKHZlcikge1xyXG4gICAgICAgICAgICB2YXIgZGl2LCBzdGF0dXM7XHJcbiAgICAgICAgICAgIC8vIGNoZWNrIGZvciBJRSB2ZXJzaW9ucyA8IDExXHJcbiAgICAgICAgICAgIGlmIChuYXZpZ2F0b3IuYXBwTmFtZSAhPT0gJ01pY3Jvc29mdCBJbnRlcm5ldCBFeHBsb3JlcicpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAodmVyID09PSAxMCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBSZWdFeHAoJ21zaWVcXFxccycgKyB2ZXIsICdpJykudGVzdChuYXZpZ2F0b3IudXNlckFnZW50KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBkaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcclxuICAgICAgICAgICAgZGl2LmlubmVySFRNTCA9ICc8IS0tW2lmIElFICcgKyB2ZXIgKyAnXT4gPGk+PC9pPiA8IVtlbmRpZl0tLT4nO1xyXG4gICAgICAgICAgICBzdGF0dXMgPSBkaXYuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2knKS5sZW5ndGg7XHJcbiAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoZGl2KTtcclxuICAgICAgICAgICAgZGl2LnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoZGl2KTtcclxuICAgICAgICAgICAgcmV0dXJuIHN0YXR1cztcclxuICAgICAgICB9LFxyXG4gICAgICAgIGNhbkFzc2lnbkZpbGVzVG9JbnB1dDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgaW5wdXQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdpbnB1dCcpO1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgaW5wdXQudHlwZSA9ICdmaWxlJztcclxuICAgICAgICAgICAgICAgIGlucHV0LmZpbGVzID0gbnVsbDtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZ2V0RHJhZ0Ryb3BGb2xkZXJzOiBmdW5jdGlvbiAoaXRlbXMpIHtcclxuICAgICAgICAgICAgdmFyIGksIGl0ZW0sIGxlbiA9IGl0ZW1zID8gaXRlbXMubGVuZ3RoIDogMCwgZm9sZGVycyA9IDA7XHJcbiAgICAgICAgICAgIGlmIChsZW4gPiAwICYmIGl0ZW1zWzBdLndlYmtpdEdldEFzRW50cnkoKSkge1xyXG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaXRlbSA9IGl0ZW1zW2ldLndlYmtpdEdldEFzRW50cnkoKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbSAmJiBpdGVtLmlzRGlyZWN0b3J5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRlcnMrKztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGZvbGRlcnM7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBpbml0TW9kYWw6IGZ1bmN0aW9uICgkbW9kYWwpIHtcclxuICAgICAgICAgICAgdmFyICRib2R5ID0gJCgnYm9keScpO1xyXG4gICAgICAgICAgICBpZiAoJGJvZHkubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAkbW9kYWwuYXBwZW5kVG8oJGJvZHkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBpc0Z1bmN0aW9uOiBmdW5jdGlvbiAodikge1xyXG4gICAgICAgICAgICByZXR1cm4gdHlwZW9mIHYgPT09ICdmdW5jdGlvbic7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBpc0VtcHR5OiBmdW5jdGlvbiAodmFsdWUsIHRyaW0pIHtcclxuICAgICAgICAgICAgcmV0dXJuIHZhbHVlID09PSB1bmRlZmluZWQgfHwgdmFsdWUgPT09IG51bGwgfHwgKCEkaC5pc0Z1bmN0aW9uKFxyXG4gICAgICAgICAgICAgICAgdmFsdWUpICYmICh2YWx1ZS5sZW5ndGggPT09IDAgfHwgKHRyaW0gJiYgJC50cmltKHZhbHVlKSA9PT0gJycpKSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBpc0FycmF5OiBmdW5jdGlvbiAoYSkge1xyXG4gICAgICAgICAgICByZXR1cm4gQXJyYXkuaXNBcnJheShhKSB8fCBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoYSkgPT09ICdbb2JqZWN0IEFycmF5XSc7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBpZlNldDogZnVuY3Rpb24gKG5lZWRsZSwgaGF5c3RhY2ssIGRlZikge1xyXG4gICAgICAgICAgICBkZWYgPSBkZWYgfHwgJyc7XHJcbiAgICAgICAgICAgIHJldHVybiAoaGF5c3RhY2sgJiYgdHlwZW9mIGhheXN0YWNrID09PSAnb2JqZWN0JyAmJiBuZWVkbGUgaW4gaGF5c3RhY2spID8gaGF5c3RhY2tbbmVlZGxlXSA6IGRlZjtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGNsZWFuQXJyYXk6IGZ1bmN0aW9uIChhcnIpIHtcclxuICAgICAgICAgICAgaWYgKCEoYXJyIGluc3RhbmNlb2YgQXJyYXkpKSB7XHJcbiAgICAgICAgICAgICAgICBhcnIgPSBbXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gYXJyLmZpbHRlcihmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIChlICE9PSB1bmRlZmluZWQgJiYgZSAhPT0gbnVsbCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgc3BsaWNlQXJyYXk6IGZ1bmN0aW9uIChhcnIsIGluZGV4LCByZXZlcnNlT3JkZXIpIHtcclxuICAgICAgICAgICAgdmFyIGksIGogPSAwLCBvdXQgPSBbXSwgbmV3QXJyO1xyXG4gICAgICAgICAgICBpZiAoIShhcnIgaW5zdGFuY2VvZiBBcnJheSkpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBbXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBuZXdBcnIgPSAkLmV4dGVuZCh0cnVlLCBbXSwgYXJyKTtcclxuICAgICAgICAgICAgaWYgKHJldmVyc2VPcmRlcikge1xyXG4gICAgICAgICAgICAgICAgbmV3QXJyLnJldmVyc2UoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbmV3QXJyLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaSAhPT0gaW5kZXgpIHtcclxuICAgICAgICAgICAgICAgICAgICBvdXRbal0gPSBuZXdBcnJbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgaisrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChyZXZlcnNlT3JkZXIpIHtcclxuICAgICAgICAgICAgICAgIG91dC5yZXZlcnNlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG91dDtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGdldE51bTogZnVuY3Rpb24gKG51bSwgZGVmKSB7XHJcbiAgICAgICAgICAgIGRlZiA9IGRlZiB8fCAwO1xyXG4gICAgICAgICAgICBpZiAodHlwZW9mIG51bSA9PT0gJ251bWJlcicpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBudW07XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBudW0gPT09ICdzdHJpbmcnKSB7XHJcbiAgICAgICAgICAgICAgICBudW0gPSBwYXJzZUZsb2F0KG51bSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIGlzTmFOKG51bSkgPyBkZWYgOiBudW07XHJcbiAgICAgICAgfSxcclxuICAgICAgICBoYXNGaWxlQVBJU3VwcG9ydDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICByZXR1cm4gISEod2luZG93LkZpbGUgJiYgd2luZG93LkZpbGVSZWFkZXIpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgaGFzRHJhZ0Ryb3BTdXBwb3J0OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBkaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcclxuICAgICAgICAgICAgLyoqIEBuYW1lc3BhY2UgZGl2LmRyYWdnYWJsZSAqL1xyXG4gICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBkaXYub25kcmFnc3RhcnQgKi9cclxuICAgICAgICAgICAgLyoqIEBuYW1lc3BhY2UgZGl2Lm9uZHJvcCAqL1xyXG4gICAgICAgICAgICByZXR1cm4gISRoLmlzSUUoOSkgJiZcclxuICAgICAgICAgICAgICAgIChkaXYuZHJhZ2dhYmxlICE9PSB1bmRlZmluZWQgfHwgKGRpdi5vbmRyYWdzdGFydCAhPT0gdW5kZWZpbmVkICYmIGRpdi5vbmRyb3AgIT09IHVuZGVmaW5lZCkpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgaGFzRmlsZVVwbG9hZFN1cHBvcnQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgcmV0dXJuICRoLmhhc0ZpbGVBUElTdXBwb3J0KCkgJiYgd2luZG93LkZvcm1EYXRhO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgaGFzQmxvYlN1cHBvcnQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgIHJldHVybiAhIXdpbmRvdy5CbG9iICYmIEJvb2xlYW4obmV3IEJsb2IoKSk7XHJcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgaGFzQXJyYXlCdWZmZXJWaWV3U3VwcG9ydDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBCbG9iKFtuZXcgVWludDhBcnJheSgxMDApXSkuc2l6ZSA9PT0gMTAwO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGhhc1Jlc3VtYWJsZVVwbG9hZFN1cHBvcnQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgLyoqIEBuYW1lc3BhY2UgQmxvYi5wcm90b3R5cGUud2Via2l0U2xpY2UgKi9cclxuICAgICAgICAgICAgLyoqIEBuYW1lc3BhY2UgQmxvYi5wcm90b3R5cGUubW96U2xpY2UgKi9cclxuICAgICAgICAgICAgcmV0dXJuICRoLmhhc0ZpbGVVcGxvYWRTdXBwb3J0KCkgJiYgJGguaGFzQmxvYlN1cHBvcnQoKSAmJiAkaC5oYXNBcnJheUJ1ZmZlclZpZXdTdXBwb3J0KCkgJiZcclxuICAgICAgICAgICAgICAgICghIUJsb2IucHJvdG90eXBlLndlYmtpdFNsaWNlIHx8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gICAgICAgICAgIH1cclxuICAgICAgICAgICAgYXJyYXlCdWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIoYnl0ZVN0ci5sZW5ndGgpO1xyXG4gICAgICAgICAgICBpbnRBcnJheSA9IG5ldyBVaW50OEFycmF5KGFycmF5QnVmZmVyKTtcclxuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGJ5dGVTdHIubGVuZ3RoOyBpICs9IDEpIHtcclxuICAgICAgICAgICAgICAgIGludEFycmF5W2ldID0gYnl0ZVN0ci5jaGFyQ29kZUF0KGkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG1pbWVTdHIgPSBkYXRhVVJJLnNwbGl0KCcsJylbMF0uc3BsaXQoJzonKVsxXS5zcGxpdCgnOycpWzBdO1xyXG4gICAgICAgICAgICBpZiAoY2FuQmxvYikge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBCbG9iKFskaC5oYXNBcnJheUJ1ZmZlclZpZXdTdXBwb3J0KCkgPyBpbnRBcnJheSA6IGFycmF5QnVmZmVyXSwge3R5cGU6IG1pbWVTdHJ9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBiYiA9IG5ldyBCbG9iQnVpbGRlcigpO1xyXG4gICAgICAgICAgICBiYi5hcHBlbmQoYXJyYXlCdWZmZXIpO1xyXG4gICAgICAgICAgICByZXR1cm4gYmIuZ2V0QmxvYihtaW1lU3RyKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGFycmF5QnVmZmVyMlN0cmluZzogZnVuY3Rpb24gKGJ1ZmZlcikge1xyXG4gICAgICAgICAgICAvL25vaW5zcGVjdGlvbiBKU1VucmVzb2x2ZWRWYXJpYWJsZVxyXG4gICAgICAgICAgICBpZiAod2luZG93LlRleHREZWNvZGVyKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBub2luc3BlY3Rpb24gSlNVbnJlc29sdmVkRnVuY3Rpb25cclxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgVGV4dERlY29kZXIoJ3V0Zi04JykuZGVjb2RlKGJ1ZmZlcik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdmFyIGFycmF5ID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmFwcGx5KG5ldyBVaW50OEFycmF5KGJ1ZmZlcikpLCBvdXQgPSAnJywgaSA9IDAsIGxlbiwgYywgY2hhcjIsIGNoYXIzO1xyXG4gICAgICAgICAgICBsZW4gPSBhcnJheS5sZW5ndGg7XHJcbiAgICAgICAgICAgIHdoaWxlIChpIDwgbGVuKSB7XHJcbiAgICAgICAgICAgICAgICBjID0gYXJyYXlbaSsrXTtcclxuICAgICAgICAgICAgICAgIHN3aXRjaCAoYyA+PiA0KSB7IC8vIGpzaGludCBpZ25vcmU6bGluZVxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAyOlxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA1OlxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNjpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIDc6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIDB4eHh4eHh4XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICBjYXNlIDEyOlxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTM6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIDExMHggeHh4eCAgIDEweHggeHh4eFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFyMiA9IGFycmF5W2krK107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKCgoYyAmIDB4MUYpIDw8IDYpIHwgKGNoYXIyICYgMHgzRikpOyAvLyBqc2hpbnQgaWdub3JlOmxpbmVcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxNDpcclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gMTExMCB4eHh4ICAxMHh4IHh4eHggIDEweHggeHh4eFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFyMiA9IGFycmF5W2krK107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIzID0gYXJyYXlbaSsrXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0ICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoKChjICYgMHgwRikgPDwgMTIpIHwgLy8ganNoaW50IGlnbm9yZTpsaW5lXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNoYXIyICYgMHgzRikgPDwgNikgfCAgLy8ganNoaW50IGlnbm9yZTpsaW5lXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNoYXIzICYgMHgzRikgPDwgMCkpOyAvLyBqc2hpbnQgaWdub3JlOmxpbmVcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG91dDtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGlzSHRtbDogZnVuY3Rpb24gKHN0cikge1xyXG4gICAgICAgICAgICB2YXIgYSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpO1xyXG4gICAgICAgICAgICBhLmlubmVySFRNTCA9IHN0cjtcclxuICAgICAgICAgICAgZm9yICh2YXIgYyA9IGEuY2hpbGROb2RlcywgaSA9IGMubGVuZ3RoOyBpLS07KSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoY1tpXS5ub2RlVHlwZSA9PT0gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGlzU3ZnOiBmdW5jdGlvbiAoc3RyKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBzdHIubWF0Y2goL15cXHMqPFxcP3htbC9pKSAmJiAoc3RyLm1hdGNoKC88IURPQ1RZUEUgc3ZnL2kpIHx8IHN0ci5tYXRjaCgvPHN2Zy9pKSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRNaW1lVHlwZTogZnVuY3Rpb24gKHNpZ25hdHVyZSwgY29udGVudHMsIHR5cGUpIHtcclxuICAgICAgICAgICAgc3dpdGNoIChzaWduYXR1cmUpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2ZmZDhmZmUwJzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2ZmZDhmZmUxJzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2ZmZDhmZmUyJzpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2ltYWdlL2pwZWcnO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnODk1MDRFNDcnOlxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaW1hZ2UvcG5nJztcclxuICAgICAgICAgICAgICAgIGNhc2UgJzQ3NDk0NjM4JzpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2ltYWdlL2dpZic7XHJcbiAgICAgICAgICAgICAgICBjYXNlICc0OTQ5MmEwMCc6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdpbWFnZS90aWZmJztcclxuICAgICAgICAgICAgICAgIGNhc2UgJzUyNDk0NjQ2JzpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2ltYWdlL3dlYnAnO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnNjY3NDc5NzAnOlxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndmlkZW8vM2dwJztcclxuICAgICAgICAgICAgICAgIGNhc2UgJzRmNjc2NzUzJzpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3ZpZGVvL29nZyc7XHJcbiAgICAgICAgICAgICAgICBjYXNlICcxYTQ1ZGZhMyc6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd2aWRlby9ta3YnO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnMDAwMDAxYmEnOlxyXG4gICAgICAgICAgICAgICAgY2FzZSAnMDAwMDAxYjMnOlxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndmlkZW8vbXBlZyc7XHJcbiAgICAgICAgICAgICAgICBjYXNlICczMDI2YjI3NSc6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd2aWRlby93bXYnO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnMjU1MDQ0NDYnOlxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnYXBwbGljYXRpb24vcGRmJztcclxuICAgICAgICAgICAgICAgIGNhc2UgJzI1MjE1MDUzJzpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2FwcGxpY2F0aW9uL3BzJztcclxuICAgICAgICAgICAgICAgIGNhc2UgJzUwNGIwMzA0JzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJzUwNGIwNTA2JzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJzUwNGIwNTA4JzpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2FwcGxpY2F0aW9uL3ppcCc7XHJcbiAgICAgICAgICAgICAgICBjYXNlICczNzdhYmNhZic6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdhcHBsaWNhdGlvbi83eic7XHJcbiAgICAgICAgICAgICAgICBjYXNlICc3NTczNzQ2MSc6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdhcHBsaWNhdGlvbi90YXInO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnNzgwMTczMGQnOlxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnYXBwbGljYXRpb24vZG1nJztcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChzaWduYXR1cmUuc3Vic3RyaW5nKDAsIDYpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzQzNTc1Myc6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2FwcGxpY2F0aW9uL3gtc2hvY2t3YXZlLWZsYXNoJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNDk0NDMzJzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnYXVkaW8vbXAzJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNDI1YTY4JzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnYXBwbGljYXRpb24vYnppcCc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHNpZ25hdHVyZS5zdWJzdHJpbmcoMCwgNCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc0MjRkJzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdpbWFnZS9ibXAnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2ZmZmInOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2F1ZGlvL21wMyc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNGQ1YSc6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnYXBwbGljYXRpb24vZXhlJztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxZjlkJzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxZmEwJzpcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdhcHBsaWNhdGlvbi96aXAnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzFmOGInOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2FwcGxpY2F0aW9uL2d6aXAnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb250ZW50cyAmJiAhY29udGVudHMubWF0Y2goXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvW15cXHUwMDAwLVxcdTAwN2ZdLykgPyAnYXBwbGljYXRpb24vdGV4dC1wbGFpbicgOiB0eXBlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgYWRkQ3NzOiBmdW5jdGlvbiAoJGVsLCBjc3MpIHtcclxuICAgICAgICAgICAgJGVsLnJlbW92ZUNsYXNzKGNzcykuYWRkQ2xhc3MoY3NzKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGdldEVsZW1lbnQ6IGZ1bmN0aW9uIChvcHRpb25zLCBwYXJhbSwgdmFsdWUpIHtcclxuICAgICAgICAgICAgcmV0dXJuICgkaC5pc0VtcHR5KG9wdGlvbnMpIHx8ICRoLmlzRW1wdHkob3B0aW9uc1twYXJhbV0pKSA/IHZhbHVlIDogJChvcHRpb25zW3BhcmFtXSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICB1bmlxSWQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgcmV0dXJuIE1hdGgucm91bmQobmV3IERhdGUoKS5nZXRUaW1lKCkpICsgJ18nICsgTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogMTAwKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGh0bWxFbmNvZGU6IGZ1bmN0aW9uIChzdHIsIHVuZGVmVmFsKSB7XHJcbiAgICAgICAgICAgIGlmIChzdHIgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmVmFsIHx8IG51bGw7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHN0ci5yZXBsYWNlKC8mL2csICcmYW1wOycpXHJcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvPC9nLCAnJmx0OycpXHJcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvPi9nLCAnJmd0OycpXHJcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvXCIvZywgJyZxdW90OycpXHJcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvJy9nLCAnJmFwb3M7Jyk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICByZXBsYWNlVGFnczogZnVuY3Rpb24gKHN0ciwgdGFncykge1xyXG4gICAgICAgICAgICB2YXIgb3V0ID0gc3RyO1xyXG4gICAgICAgICAgICBpZiAoIXRhZ3MpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBvdXQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgJC5lYWNoKHRhZ3MsIGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdm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AgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlLm1velJlcXVlc3RGdWxsU2NyZWVuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZS5tb3pSZXF1ZXN0RnVsbFNjcmVlbigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlLndlYmtpdFJlcXVlc3RGdWxsc2NyZWVuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGUud2Via2l0UmVxdWVzdEZ1bGxzY3JlZW4oRWxlbWVudC5BTExPV19LRVlCT0FSRF9JTlBVVCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBkb2N1bWVudC5leGl0RnVsbHNjcmVlbiAqL1xyXG4gICAgICAgICAgICAgICAgLyoqIEBuYW1lc3BhY2UgZG9jdW1lbnQubXNFeGl0RnVsbHNjcmVlbiAqL1xyXG4gICAgICAgICAgICAgICAgLyoqIEBuYW1lc3BhY2UgZG9jdW1lbnQubW96Q2FuY2VsRnVsbFNjcmVlbiAqL1xyXG4gICAgICAgICAgICAgICAgLyoqIEBuYW1lc3BhY2UgZG9jdW1lbnQud2Via2l0RXhpdEZ1bGxzY3JlZW4gKi9cclxuICAgICAgICAgICAgICAgIGlmIChkb2MuZXhpdEZ1bGxzY3JlZW4pIHtcclxuICAgICAgICAgICAgICAgICAgICBkb2MuZXhpdEZ1bGxzY3JlZW4oKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRvYy5tc0V4aXRGdWxsc2NyZWVuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvYy5tc0V4aXRGdWxsc2NyZWVuKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRvYy5tb3pDYW5jZWxGdWxsU2NyZWVuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2MubW96Q2FuY2VsRnVsbFNjcmVlbigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRvYy53ZWJraXRFeGl0RnVsbHNjcmVlbikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvYy53ZWJraXRFeGl0RnVsbHNjcmVlbigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBtb3ZlQXJyYXk6IGZ1bmN0aW9uIChhcnIsIG9sZEluZGV4LCBuZXdJbmRleCwgcmV2ZXJzZU9yZGVyKSB7XHJcbiAgICAgICAgICAgIHZhciBuZXdBcnIgPSAkLmV4dGVuZCh0cnVlLCBbXSwgYXJyKTtcclxuICAgICAgICAgICAgaWYgKHJldmVyc2VPcmRlcikge1xyXG4gICAgICAgICAgICAgICAgbmV3QXJyLnJldmVyc2UoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAobmV3SW5kZXggPj0gbmV3QXJyLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGsgPSBuZXdJbmRleCAtIG5ld0Fyci5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICB3aGlsZSAoKGstLSkgKyAxKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbmV3QXJyLnB1c2godW5kZWZpbmVkKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBuZXdBcnIuc3BsaWNlKG5ld0luZGV4LCAwLCBuZXdBcnIuc3BsaWNlKG9sZEluZGV4LCAxKVswXSk7XHJcbiAgICAgICAgICAgIGlmIChyZXZlcnNlT3JkZXIpIHtcclxuICAgICAgICAgICAgICAgIG5ld0Fyci5yZXZlcnNlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG5ld0FycjtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGNsZWFuWm9vbUNhY2hlOiBmdW5jdGlvbiAoJGVsKSB7XHJcbiAgICAgICAgICAgIHZhciAkY2FjaGUgPSAkZWwuY2xvc2VzdCgnLmt2LXpvb20tY2FjaGUtdGhlbWUnKTtcclxuICAgICAgICAgICAgaWYgKCEkY2FjaGUubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAkY2FjaGUgPSAkZWwuY2xvc2VzdCgnLmt2LXpvb20tY2FjaGUnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkY2FjaGUucmVtb3ZlKCk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjbG9zZUJ1dHRvbjogZnVuY3Rpb24gKGNzcykge1xyXG4gICAgICAgICAgICBjc3MgPSBjc3MgPyAnY2xvc2UgJyArIGNzcyA6ICdjbG9zZSc7XHJcbiAgICAgICAgICAgIHJldHVybiAnPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgY2xhc3M9XCInICsgY3NzICsgJ1wiIGFyaWEtbGFiZWw9XCJDbG9zZVwiPlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgPHNwYW4gYXJpYS1oaWRkZW49XCJ0cnVlXCI+JnRpbWVzOzwvc3Bhbj5cXG4nICtcclxuICAgICAgICAgICAgICAgICc8L2J1dHRvbj4nO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZ2V0Um90YXRpb246IGZ1bmN0aW9uICh2YWx1ZSkge1xyXG4gICAgICAgICAgICBzd2l0Y2ggKHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdyb3RhdGVZKDE4MGRlZyknO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAzOlxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAncm90YXRlKDE4MGRlZyknO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OlxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAncm90YXRlKDE4MGRlZykgcm90YXRlWSgxODBkZWcpJztcclxuICAgICAgICAgICAgICAgIGNhc2UgNTpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3JvdGF0ZSgyNzBkZWcpIHJvdGF0ZVkoMTgwZGVnKSc7XHJcbiAgICAgICAgICAgICAgICBjYXNlIDY6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdyb3RhdGUoOTBkZWcpJztcclxuICAgICAgICAgICAgICAgIGNhc2UgNzpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3JvdGF0ZSg5MGRlZykgcm90YXRlWSgxODBkZWcpJztcclxuICAgICAgICAgICAgICAgIGNhc2UgODpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3JvdGF0ZSgyNzBkZWcpJztcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBzZXRUcmFuc2Zvcm06IGZ1bmN0aW9uIChlbCwgdmFsKSB7XHJcbiAgICAgICAgICAgIGlmICghZWwpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAg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VudXNlZEdsb2JhbFN5bWJvbHNcclxuICAgIEZpbGVJbnB1dC5wcm90b3R5cGUgPSB7XHJcbiAgICAgICAgY29uc3RydWN0b3I6IEZpbGVJbnB1dCxcclxuICAgICAgICBfY2xlYW51cDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIHNlbGYucmVhZGVyID0gbnVsbDtcclxuICAgICAgICAgICAgc2VsZi5jbGVhckZpbGVTdGFjaygpO1xyXG4gICAgICAgICAgICBzZWxmLmZpbGVCYXRjaENvbXBsZXRlZCA9IHRydWU7XHJcbiAgICAgICAgICAgIHNlbGYuaXNFcnJvciA9IGZhbHNlO1xyXG4gICAgICAgICAgICBzZWxmLmNhbmNlbGxpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgc2VsZi5wYXVzZWQgPSBmYWxzZTtcclxuICAgICAgICAgICAgc2VsZi5sYXN0UHJvZ3Jlc3MgPSAwO1xyXG4gICAgICAgICAgICBzZWxmLl9pbml0QWpheCgpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2luaXRBamF4OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgc2VsZi5hamF4UXVldWUgPSBbXTtcclxuICAgICAgICAgICAgc2VsZi5hamF4UmVxdWVzdHMgPSBbXTtcclxuICAgICAgICAgICAgc2VsZi5hamF4UXVldWVJbnRlcnZhbElkID0gbnVsbDtcclxuICAgICAgICAgICAgc2VsZi5hamF4Q3VycmVudFRocmVhZHMgPSAwO1xyXG4gICAgICAgICAgICBzZWxmLmFqYXhBYm9ydGVkID0gZmFsc2U7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdDogZnVuY3Rpb24gKG9wdGlvbnMsIHJlZnJlc2hNb2RlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgZiwgJGVsID0gc2VsZi4kZWxlbWVudCwgJGNvbnQsIHQsIHRtcDtcclxuICAgICAgICAgICAgc2VsZi5vcHRpb25zID0gb3B0aW9ucztcclxuICAgICAgICAgICAgJC5lYWNoKG9wdGlvbnMsIGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ21pbkZpbGVDb3VudCc6XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnbWF4RmlsZUNvdW50JzpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlICdtYXhUb3RhbEZpbGVDb3VudCc6XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnbWluRmlsZVNpemUnOlxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ21heEZpbGVTaXplJzpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlICdtYXhGaWxlUHJldmlld1NpemUnOlxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3Jlc2l6ZUltYWdlUXVhbGl0eSc6XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAncmVzaXplSWZTaXplTW9yZVRoYW4nOlxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3Byb2dyZXNzVXBsb2FkVGhyZXNob2xkJzpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlICdpbml0aWFsUHJldmlld0NvdW50JzpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlICd6b29tTW9kYWxIZWlnaHQnOlxyXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ21pbkltYWdlSGVpZ2h0JzpcclxuICAgICAgICAgICAgICAgICAgICBjYXNlICdtYXhJbWFnZUhlaWdodCc6XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnbWluSW1hZ2VXaWR0aCc6XHJcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnbWF4SW1hZ2VXaWR0aCc6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGZba2V5XSA9ICRoLmdldE51bSh2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGZba2V5XSA9IHZhbHVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLm1heFRvdGFsRmlsZUNvdW50ID4gMCAmJiBzZWxmLm1heFRvdGFsRmlsZUNvdW50IDwgc2VsZi5tYXhGaWxlQ291bnQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYubWF4VG90YWxGaWxlQ291bnQgPSBzZWxmLm1heEZpbGVDb3VudDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2VsZi5ydGwpIHsgLy8gc3dhcCBidXR0b25zIGZvciBydGxcclxuICAgICAgICAgICAgICAgIHRtcCA9IHNlbGYucHJldmlld1pvb21CdXR0b25JY29ucy5wcmV2O1xyXG4gICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Wm9vbUJ1dHRvbkljb25zLnByZXYgPSBzZWxmLnByZXZpZXdab29tQnV0dG9uSWNvbnMubmV4dDtcclxuICAgICAgICAgICAgICAgIHNlbGYucHJldmlld1pvb21CdXR0b25JY29ucy5uZXh0ID0gdG1wO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIC8vIHZhbGlkYXRlIGNodW5rIHRocmVhZHMgdG8gbm90IGV4Y2VlZCBtYXhBamF4VGhyZWFkc1xyXG4gICAgICAgICAgICBpZiAoIWlzTmFOKHNlbGYubWF4QWpheFRocmVhZHMpICYmIHNlbGYubWF4QWpheFRocmVhZHMgPCBzZWxmLnJlc3VtYWJsZVVwbG9hZE9wdGlvbnMubWF4VGhyZWFkcykge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5yZXN1bWFibGVVcGxvYWRPcHRpb25zLm1heFRocmVhZHMgPSBzZWxmLm1heEFqYXhUaHJlYWRzO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX2luaXRGaWxlTWFuYWdlcigpO1xyXG4gICAgICAgICAgICBpZiAodHlwZW9mIHNlbGYuYXV0b09yaWVudEltYWdlID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLmF1dG9PcmllbnRJbWFnZSA9IHNlbGYuYXV0b09yaWVudEltYWdlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBzZWxmLmF1dG9PcmllbnRJbWFnZUluaXRpYWwgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuYXV0b09yaWVudEltYWdlSW5pdGlhbCA9IHNlbGYuYXV0b09yaWVudEltYWdlSW5pdGlhbCgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghcmVmcmVzaE1vZGUpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFudXAoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLmR1cGxpY2F0ZUVycm9ycyA9IFtdO1xyXG4gICAgICAgICAgICBzZWxmLiRmb3JtID0gJGVsLmNsb3Nlc3QoJ2Zvcm0nKTtcclxuICAgICAgICAgICAgc2VsZi5faW5pdFRlbXBsYXRlRGVmYXVsdHMoKTtcclxuICAgICAgICAgICAgc2VsZi51cGxvYWRGaWxlQXR0ciA9ICEkaC5pc0VtcHR5KCRlbC5hdHRyKCduYW1lJykpID8gJGVsLmF0dHIoJ25hbWUnKSA6ICdmaWxlX2RhdGEnO1xyXG4gICAgICAgICAgICB0ID0gc2VsZi5fZ2V0TGF5b3V0VGVtcGxhdGUoJ3Byb2dyZXNzJyk7XHJcbiAgICAgICAgICAgIHNlbG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YuaW1hZ2VDYW52YXMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdjYW52YXMnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuaW1hZ2VDYW52YXNDb250ZXh0ID0gc2VsZi5pbWFnZUNhbnZhcy5nZXRDb250ZXh0KCcyZCcpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICgkaC5pc0VtcHR5KCRlbC5hdHRyKCdpZCcpKSkge1xyXG4gICAgICAgICAgICAgICAgJGVsLmF0dHIoJ2lkJywgJGgudW5pcUlkKCkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYubmFtZXNwYWNlID0gJy5maWxlaW5wdXRfJyArICRlbC5hdHRyKCdpZCcpLnJlcGxhY2UoLy0vZywgJ18nKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYuJGNvbnRhaW5lciA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRjb250YWluZXIgPSBzZWxmLl9jcmVhdGVDb250YWluZXIoKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3JlZnJlc2hDb250YWluZXIoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkY29udCA9IHNlbGYuJGNvbnRhaW5lcjtcclxuICAgICAgICAgICAgc2VsZi4kZHJvcFpvbmUgPSAkY29udC5maW5kKCcuZmlsZS1kcm9wLXpvbmUnKTtcclxuICAgICAgICAgICAgc2VsZi4kcHJvZ3Jlc3MgPSAkY29udC5maW5kKCcua3YtdXBsb2FkLXByb2dyZXNzJyk7XHJcbiAgICAgICAgICAgIHNlbGYuJGJ0blVwbG9hZCA9ICRjb250LmZpbmQoJy5maWxlaW5wdXQtdXBsb2FkJyk7XHJcbiAgICAgICAgICAgIHNlbGYuJGNhcHRpb25Db250YWluZXIgPSAkaC5nZXRFbGVtZW50KG9wdGlvbnMsICdlbENhcHRpb25Db250YWluZXInLCAkY29udC5maW5kKCcuZmlsZS1jYXB0aW9uJykpO1xyXG4gICAgICAgICAgICBzZWxmLiRjYXB0aW9uID0gJGguZ2V0RWxlbWVudChvcHRpb25zLCAnZWxDYXB0aW9uVGV4dCcsICRjb250LmZpbmQoJy5maWxlLWNhcHRpb24tbmFtZScpKTtcclxuICAgICAgICAgICAgaWYgKCEkaC5pc0VtcHR5KHNlbGYubXNnUGxhY2Vob2xkZXIpKSB7XHJcbiAgICAgICAgICAgICAgICBmID0gJGVsLmF0dHIoJ211bHRpcGxlJykgPyBzZWxmLmZpbGVQbHVyYWwgOiBzZWxmLmZpbGVTaW5nbGU7XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRjYXB0aW9uLmF0dHIoJ3BsYWNlaG9sZGVyJywgc2VsZi5tc2dQbGFjZWhvbGRlci5yZXBsYWNlKCd7ZmlsZXN9JywgZikpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuJGNhcHRpb25JY29uID0gc2VsZi4kY2FwdGlvbkNvbnRhaW5lci5maW5kKCcuZmlsZS1jYXB0aW9uLWljb24nKTtcclxuICAgICAgICAgICAgc2VsZi4kcHJldmlld0NvbnRhaW5lciA9ICRoLmdldEVsZW1lbnQob3B0aW9ucywgJ2VsUHJldmlld0NvbnRhaW5lcicsICRjb250LmZpbmQoJy5maWxlLXByZXZpZXcnKSk7XHJcbiAgICAgICAgICAgIHNlbGYuJHByZXZpZXcgPSAkaC5nZXRFbGVtZW50KG9wdGlvbnMsICdlbFByZXZpZXdJbWFnZScsICRjb250LmZpbmQoJy5maWxlLXByZXZpZXctdGh1bWJuYWlscycpKTtcclxuICAgICAgICAgICAgc2VsZi4kcHJldmlld1N0YXR1cyA9ICRoLmdldEVsZW1lbnQob3B0aW9ucywgJ2VsUHJldmlld1N0YXR1cycsICRjb250LmZpbmQoJy5maWxlLXByZXZpZXctc3RhdHVzJykpO1xyXG4gICAgICAgICAgICBzZWxmLiRlcnJvckNvbnRhaW5lciA9ICRoLmdldEVsZW1lbnQob3B0aW9ucywgJ2VsRXJyb3JDb250YWluZXInLFxyXG4gICAgICAgICAgICAgICAgc2VsZi4kcHJldmlld0NvbnRhaW5lci5maW5kKCcua3YtZmlsZWlucHV0LWVycm9yJykpO1xyXG4gICAgICAgICAgICBzZWxmLl92YWxpZGF0ZURpc2FibGVkKCk7XHJcbiAgICAgICAgICAgIGlmICghJGguaXNFbXB0eShzZWxmLm1zZ0Vycm9yQ2xhc3MpKSB7XHJcbiAgICAgICAgICAgICAgICAkaC5hZGRDc3Moc2VsZi4kZXJyb3JDb250YWluZXIsIHNlbGYubXNnRXJyb3JDbGFzcyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKCFyZWZyZXNoTW9kZSkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kZXJyb3JDb250YWluZXIuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3SW5pdElkID0gJ3RodW1iLScgKyAkZWwuYXR0cignaWQnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2luaXRQcmV2aWV3Q2FjaGUoKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2luaXRQcmV2aWV3KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5faW5pdFByZXZpZXdBY3Rpb25zKCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi4kcGFyZW50Lmhhc0NsYXNzKCdmaWxlLWxvYWRpbmcnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuJGNvbnRhaW5lci5pbnNlcnRCZWZvcmUoc2VsZi4kcGFyZW50KTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLiRwYXJlbnQucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIXNlbGYuX2Vycm9yc0V4aXN0KCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLiRlcnJvckNvbnRhaW5lci5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fc2V0RmlsZURyb3Bab25lVGl0bGUoKTtcclxuICAgICAgICAgICAgaWYgKCRlbC5hdHRyKCdkaXNhYmxlZCcpKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLmRpc2FibGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9pbml0Wm9vbSgpO1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5oaWRlVGh1bWJuYWlsQ29udGVudCkge1xyXG4gICAgICAgICAgICAgICAgJGguYWRkQ3NzKHNlbGYuJHByZXZpZXcsICdoaWRlLWNvbnRlbnQnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2luaXRGaWxlTWFuYWdlcjogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIgPSB7XHJcbiAgICAgICAgICAgICAgICBzdGFjazoge30sXHJcbiAgICAgICAgICAgICAgICBwcm9jZXNzZWQ6IFtdLFxyXG4gICAgICAgICAgICAgICAgZXJyb3JzOiBbXSxcclxuICAgICAgICAgICAgICAgIGxvYWRlZEltYWdlczoge30sXHJcbiAgICAgICAgICAgICAgICB0b3RhbEltYWdlczogMCxcclxuICAgICAgICAgICAgICAgIHRvdGFsRmlsZXM6IG51bGwsXHJcbiAgICAgICAgICAgICAgICB0b3RhbFNpemU6IG51bGwsXHJcbiAgICAgICAgICAgICAgICB1cGxvYWRlZFNpemU6IDAsXHJcbiAgICAgICAgICAgICAgICBzdGF0czoge30sXHJcbiAgICAgICAgICAgICAgICBpbml0U3RhdHM6IGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0ge3N0YXJ0ZWQ6ICRoLm5vdygpLmdldFRpbWUoKX07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIuc3RhdHNbaWRdID0gZGF0YTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLnN0YXRzID0gZGF0YTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZ2V0VXBsb2FkU3RhdHM6IGZ1bmN0aW9uIChpZCwgbG9hZGVkLCB0b3RhbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmbSA9IHNlbGYuZmlsZU1hbmFnZXIsIHN0YXJ0ZWQgPSBpZCA/IGZtLnN0YXRzW2lkXSAmJiBmbS5zdGF0c1tpZF0uc3RhcnRlZCB8fCBudWxsIDogbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YXJ0ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRlZCA9ICRoLm5vdygpLmdldFRpbWUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGVsYXBzZWQgPSAoJGgubm93KCkuZ2V0VGltZSgpIC0gc3RhcnRlZCkgLyAxMDAwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzcGVlZHMgPSBbJ0IvcycsICdLQi9zJywgJ01CL3MnLCAnR0IvcycsICdUQi9zJywgJ1BCL3MnLCAnRUIvcycsICdaQi9zJywgJ1lCL3MnXSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYnBzID0gZWxhcHNlZCA/IGxvYWRlZCAvIGVsYXBzZWQgOiAwLCBiaXRyYXRlID0gc2VsZi5fZ2V0U2l6ZShicHMsIHNwZWVkcyksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBlbmRpbmdCeXRlcyA9IHRvdGFsIC0gbG9hZGVkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlSWQ6IGlkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRlZDogc3RhcnRlZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsYXBzZWQ6IGVsYXBzZWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2FkZWQ6IGxvYWRlZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvdGFsOiB0b3RhbCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJwczogYnBzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0cmF0ZTogYml0cmF0ZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlbmRpbmdCeXRlczogcGVuZGluZ0J5dGVzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZtLnN0YXRzW2lkXSA9IG91dDtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmbS5zdGF0cyA9IG91dDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG91dDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBleGlzdHM6IGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLmluQXJyYXkoaWQsIHNlbGYuZmlsZU1hbmFnZXIuZ2V0SWRMaXN0KCkpICE9PSAtMTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBjb3VudDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLmZpbGVNYW5hZ2VyLmdldElkTGlzdCgpLmxlbmd0aDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB0b3RhbDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmbSA9IHNlbGYuZmlsZU1hbmFnZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFmbS50b3RhbEZpbGVzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZtLnRvdGFsRmlsZXMgPSBmbS5jb3VudCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZm0udG90YWxGaWxlcztcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBnZXRUb3RhbFNpemU6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZm0gPSBzZWxmLmZpbGVNYW5hZ2VyO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChmbS50b3RhbFNpemUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZtLnRvdGFsU2l6ZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZm0udG90YWxTaXplID0gMDtcclxuICAgICAgICAgICAgICAgICAgICAkLmVhY2goc2VsZi5maWxlTWFuYWdlci5zdGFjaywgZnVuY3Rpb24gKGlkLCBmKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzaXplID0gcGFyc2VGbG9hdChmLnNpemUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmbS50b3RhbFNpemUgKz0gaXNOYU4oc2l6ZSkgPyAwIDogc2l6ZTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZm0udG90YWxTaXplO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGFkZDogZnVuY3Rpb24gKGZpbGUsIGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZCA9IHNlbGYuZmlsZU1hbmFnZXIuZ2V0SWQoZmlsZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghaWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLnN0YWNrW2lkXSA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZTogZmlsZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogJGguZ2V0RmlsZU5hbWUoZmlsZSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlUGF0aDogJGguZ2V0RmlsZVJlbGF0aXZlUGF0aChmaWxlKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZTogZmlsZS5zaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lRm10OiBzZWxmLl9nZXRGaWxlTmFtZShmaWxlLCAnJyksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNpemVGbXQ6IHNlbGYuX2dldFNpemUoZmlsZS5zaXplKVxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgcmVtb3ZlOiBmdW5jdGlvbiAoJHRodW1iKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGlkID0gJHRodW1iLmF0dHIoJ2RhdGEtZmlsZWlkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIucmVtb3ZlRmlsZShpZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHJlbW92ZUZpbGU6IGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBzZWxmLmZpbGVNYW5hZ2VyLnN0YWNrW2lkXTtcclxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgc2VsZi5maWxlTWFuYWdlci5sb2FkZWRJbWFnZXNbaWRdO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIG1vdmU6IGZ1bmN0aW9uIChpZEZyb20sIGlkVG8pIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0ge30sIHN0YWNrID0gc2VsZi5maWxlTWFuYWdlci5zdGFjaztcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIWlkRnJvbSAmJiAhaWRUbyB8fCBpZEZyb20gPT09IGlkVG8pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAkLmVhY2goc3RhY2ssIGZ1bmN0aW9uIChrLCB2KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChrICE9PSBpZEZyb20pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFtrXSA9IHY7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGsgPT09IGlkVG8pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFtpZEZyb21dID0gc3RhY2tbaWRGcm9tXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIuc3RhY2sgPSByZXN1bHQ7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbGlzdDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmaWxlcyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgICQuZWFjaChzZWxmLmZpbGVNYW5hZ2VyLnN0YWNrLCBmdW5jdGlvbiAoaywgdikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodiAmJiB2LmZpbGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVzLnB1c2godi5maWxlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmaWxlcztcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBpc1BlbmRpbmc6IGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLmluQXJyYXkoaWQsIHNlbGYuZmlsZU1hbmFnZXIucHJvY2Vzc2VkKSA9PT0gLTEgJiYgc2VsZi5maWxlTWFuYWdlci5leGlzdHMoaWQpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGlzUHJvY2Vzc2VkOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb2Nlc3NlZCA9IHRydWUsIGZtID0gc2VsZi5maWxlTWFuYWdlcjtcclxuICAgICAgICAgICAgICAgICAgICAkLmVhY2goZm0uc3RhY2ssIGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm0uaXNQZW5kaW5nKGlkKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc2VkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHJvY2Vzc2VkO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNsZWFyOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZtID0gc2VsZi5maWxlTWFuYWdlcjtcclxuICAgICAgICAgICAgICAgICAgICBmbS50b3RhbEZpbGVzID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICBmbS50b3RhbFNpemUgPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgIGZtLnVwbG9hZGVkU2l6ZSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgZm0uc3RhY2sgPSB7fTtcclxuICAgICAgICAgICAgICAgICAgICBmbS5lcnJvcnMgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICBmbS5wcm9jZXNzZWQgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICBmbS5zdGF0cyA9IHt9O1xyXG4gICAgICAgICAgICAgICAgICAgIGZtLmNsZWFySW1hZ2VzKCk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgY2xlYXJJbWFnZXM6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLmxvYWRlZEltYWdlcyA9IHt9O1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIudG90YWxJbWFnZXMgPSAwO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGFkZEltYWdlOiBmdW5jdGlvbiAoaWQsIGNvbmZpZykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIubG9hZGVkSW1hZ2VzW2lkXSA9IGNvbmZpZztcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICByZW1vdmVJbWFnZTogZnVuY3Rpb24gKGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHNlbGYuZmlsZU1hbmFnZXIubG9hZGVkSW1hZ2VzW2lkXTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBnZXRJbWFnZUlkTGlzdDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3Qua2V5cyhzZWxmLmZpbGVNYW5hZ2VyLmxvYWRlZEltYWdlcyk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZ2V0SW1hZ2VDb3VudDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLmZpbGVNYW5hZ2VyLmdldEltYWdlSWRMaXN0KCkubGVuZ3RoO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGdldElkOiBmdW5jdGlvbiAoZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLl9nZXRGaWxlSWQoZmlsZSk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZ2V0SW5kZXg6IGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLmZpbGVNYW5hZ2VyLmdldElkTGlzdCgpLmluZGV4T2YoaWQpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGdldFRodW1iOiBmdW5jdGlvbiAoaWQpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgJHRodW1iID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9nZXRUaHVtYnMoKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyICR0ID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCR0LmF0dHIoJ2RhdGEtZmlsZWlkJykgPT09IGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIgPSAkdDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkdGh1bWI7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZ2V0VGh1bWJJbmRleDogZnVuY3Rpb24gKCR0aHVtYikge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBpZCA9ICR0aHVtYi5hdHRyKCdkYXRhLWZpbGVpZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLmZpbGVNYW5hZ2VyLmdldEluZGV4KGlkKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBnZXRJZExpc3Q6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXMoc2VsZi5maWxlTWFuYWdlci5zdGFjayk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZ2V0RmlsZTogZnVuY3Rpb24gKGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGYuZmlsZU1hbmFnZXIuc3RhY2tbaWRdIHx8IG51bGw7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZ2V0RmlsZU5hbWU6IGZ1bmN0aW9uIChpZCwgZm10KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZpbGUgPSBzZWxmLmZpbGVNYW5hZ2VyLmdldEZpbGUoaWQpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmbXQgPyAoZmlsZS5uYW1lRm10IHx8ICcnKSA6IGZpbGUubmFtZSB8fCAnJztcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBnZXRGaXJzdEZpbGU6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaWRzID0gc2VsZi5maWxlTWFuYWdlci5nZXRJZExpc3QoKSwgaWQgPSBpZHMgJiYgaWRzLmxlbmd0aCA/IGlkc1swXSA6IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGYuZmlsZU1hbmFnZXIuZ2V0RmlsZShpZCk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2V0RmlsZTogZnVuY3Rpb24gKGlkLCBmaWxlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuZmlsZU1hbmFnZXIuZ2V0RmlsZShpZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5maWxlTWFuYWdlci5zdGFja1tpZF0uZmlsZSA9IGZpbGU7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5maWxlTWFuYWdlci5hZGQoZmlsZSwgaWQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBzZXRQcm9jZXNzZWQ6IGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIucHJvY2Vzc2VkLnB1c2goaWQpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGdldFByb2dyZXNzOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRvdGFsID0gc2VsZi5maWxlTWFuYWdlci50b3RhbCgpLCBwcm9jZXNzZWQgPSBzZWxmLmZpbGVNYW5hZ2VyLnByb2Nlc3NlZC5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0b3RhbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1hdGguY2VpbChwcm9jZXNzZWQgLyB0b3RhbCAqIDEwMCk7XHJcblxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNldFByb2dyZXNzOiBmdW5jdGlvbiAoaWQsIHBjdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmID0gc2VsZi5maWxlTWFuYWdlci5nZXRGaWxlKGlkKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzTmFOKHBjdCkgJiYgZikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBmLnByb2dyZXNzID0gcGN0O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zZXRVcGxvYWREYXRhOiBmdW5jdGlvbiAoZmQsIGNvbmZpZykge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgICQuZWFjaChjb25maWcsIGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgcGFyYW0gPSBzZWxmLnVwbG9hZFBhcmFtTmFtZXNba2V5XSB8fCBrZXk7XHJcbiAgICAgICAgICAgICAgICBpZiAoJGguaXNBcnJheSh2YWx1ZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICBmZC5hcHBlbmQocGFyYW0sIHZhbHVlWzBdLCB2YWx1ZVsxXSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGZkLmFwcGVuZChwYXJhbSwgdmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9pbml0UmVzdW1hYmxlVXBsb2FkOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgb3B0cyA9IHNlbGYucmVzdW1hYmxlVXBsb2FkT3B0aW9ucywgbG9ncyA9ICRoLmxvZ01lc3NhZ2VzO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYuZW5hYmxlUmVzdW1hYmxlVXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKG9wdHMuZmFsbGJhY2sgIT09IGZhbHNlICYmIHR5cGVvZiBvcHRzLmZhbGxiYWNrICE9PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICBvcHRzLmZhbGxiYWNrID0gZnVuY3Rpb24gKHMpIHtcclxuICAgICAgICAgICAgICAgICAgICBzLl9sb2cobG9ncy5ub1Jlc3VtYWJsZVN1cHBvcnQpO1xyXG4gICAgICAgICAgICAgICAgICAgIHMuZW5hYmxlUmVzdW1hYmxlVXBsb2FkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghJGguaGFzUmVzdW1hYmxlVXBsb2FkU3VwcG9ydCgpICYmIG9wdHMuZmFsbGJhY2sgIT09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgICAgICBvcHRzLmZhbGxiYWNrKHNlbGYpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghc2VsZi51cGxvYWRVcmwgJiYgc2VsZi5lbmFibGVSZXN1bWFibGVVcGxvYWQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2xvZyhsb2dzLm5vVXBsb2FkVXJsKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuZW5hYmxlUmVzdW1hYmxlVXBsb2FkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcblxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG9wdHMuY2h1bmtTaXplID0gcGFyc2VGbG9hdChvcHRzLmNodW5rU2l6ZSk7XHJcbiAgICAgICAgICAgIGlmIChvcHRzLmNodW5rU2l6ZSA8PSAwIHx8IGlzTmFOKG9wdHMuY2h1bmtTaXplKSkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fbG9nKGxvZ3MuaW52YWxpZENodW5rU2l6ZSwge2NodW5rU2l6ZTogb3B0cy5jaHVua1NpemV9KTtcclxuICAgICAgICAgICAgICAgIHNlbGYuZW5hYmxlUmVzdW1hYmxlVXBsb2FkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5yZXN1bWFibGVNYW5hZ2VyID0ge1xyXG4gICAgICAgICAgICAgICAgaW5pdDogZnVuY3Rpb24gKGlkLCBmLCBpbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBybSA9IHNlbGYucmVzdW1hYmxlTWFuYWdlciwgZm0gPSBzZWxmLmZpbGVNYW5hZ2VyO1xyXG4gICAgICAgICAgICAgICAgICAgIHJtLmN1cnJUaHJlYWRzID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBybS5sb2dzID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgcm0uc3RhY2sgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICBybS5lcnJvciA9ICcnO1xyXG4gICAgICAgICAgICAgICAgICAgIHJtLmNodW5rSW50ZXJ2YWxJZCA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgcm0uaWQgPSBpZDtcclxuICAgICAgICAgICAgICAgICAgICBybS5maWxlID0gZi5maWxlO1xyXG4gICAgICAgICAgICAgICAgICAgIHJtLmZpbGVOYW1lID0gZi5uYW1lO1xyXG4gICAgICAgICAgICAgICAgICAgIHJtLmZpbGVJbmRleCA9IGluZGV4O1xyXG4gICAgICAgICAgICAgICAgICAgIHJtLmNvbXBsZXRlZCA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIHJtLnRlc3RpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICBybS5sYXN0UHJvZ3Jlc3MgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLnNob3dQcmV2aWV3KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJtLiR0aHVtYiA9IGZtLmdldFRodW1iKGlkKSB8fCBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS4kcHJvZ3Jlc3MgPSBybS4kYnRuRGVsZXRlID0gbnVsbDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJtLiR0aHVtYiAmJiBybS4kdGh1bWIubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBybS4kcHJvZ3Jlc3MgPSBybS4kdGh1bWIuZmluZCgnLmZpbGUtdGh1bWItcHJvZ3Jlc3MnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJtLiRidG5EZWxldGUgPSBybS4kdGh1bWIuZmluZCgnLmt2LWZpbGUtcmVtb3ZlJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcm0uY2h1bmtTaXplID0gc2VsZi5yZXN1bWFibGVVcGxvYWRPcHRpb25zLmNodW5rU2l6ZSAqIDEwMjQ7XHJcbiAgICAgICAgICAgICAgICAgICAgcm0uY2h1bmtDb3VudCA9IHJtLmdldFRvdGFsQ2h1bmtzKCk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbG9nQWpheEVycm9yOiBmdW5jdGlvbiAoanFYSFIsIHRleHRTdGF0dXMsIGVycm9yVGhyb3duKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYucmVzdW1hYmxlVXBsb2FkT3B0aW9ucy5zaG93RXJyb3JMb2cpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fbG9nKGxvZ3MuYWpheEVycm9yLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IGpxWEhSLnN0YXR1cyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yOiBlcnJvclRocm93bixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6IGpxWEhSLnJlc3BvbnNlVGV4dCB8fCAnJ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgcmVzZXQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcm0gPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgcm0ucHJvY2Vzc2VkID0ge307XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgc2V0UHJvY2Vzc2VkOiBmdW5jdGlvbiAoc3RhdHVzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJtID0gc2VsZi5yZXN1bWFibGVNYW5hZ2VyLCBmbSA9IHNlbGYuZmlsZU1hbmFnZXIsIGlkID0gcm0uaWQsIG1zZyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHRodW1iID0gcm0uJHRodW1iLCAkcHJvZyA9IHJtLiRwcm9ncmVzcywgaGFzVGh1bWIgPSAkdGh1bWIgJiYgJHRodW1iLmxlbmd0aCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zID0ge2lkOiBoYXNUaHVtYiA/ICR0aHVtYi5hdHRyKCdpZCcpIDogJycsIGluZGV4OiBmbS5nZXRJbmRleChpZCksIGZpbGVJZDogaWR9O1xyXG4gICAgICAgICAgICAgICAgICAgIHJtLmNvbXBsZXRlZCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgcm0ubGFzdFByb2dyZXNzID0gMDtcclxuICAgICAgICAgICAgICAgICAgICBmbS51cGxvYWRlZFNpemUgKz0gcm0uZmlsZS5zaXplO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChoYXNUaHVtYikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIucmVtb3ZlQ2xhc3MoJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGF0dXMgPT09ICdzdWNjZXNzJykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0UHJvZ3Jlc3MoMTAxLCAkcHJvZyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRUaHVtYlN0YXR1cygkdGh1bWIsICdTdWNjZXNzJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9pbml0VXBsb2FkU3VjY2VzcyhybS5wcm9jZXNzZWRbaWRdLmRhdGEsICR0aHVtYik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5maWxlTWFuYWdlci5yZW1vdmVGaWxlKGlkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJtLnByb2Nlc3NlZFtpZF07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxldXBsb2FkZWQnLCBbcGFyYW1zLmlkLCBwYXJhbXMuaW5kZXgsIHBhcmFtcy5maWxlSWRdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZtLmlzUHJvY2Vzc2VkKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDEwMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0VGh1bWJTdGF0dXMoJHRodW1iLCAnRXJyb3InKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByZXZpZXdFcnJvcigkdGh1bWIsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0UHJvZ3Jlc3MoMTAxLCAkcHJvZywgc2VsZi5tc2dQcm9ncmVzc0Vycm9yKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDEwMSwgc2VsZi4kcHJvZ3Jlc3MsIHNlbGYubXNnUHJvZ3Jlc3NFcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmNhbmNlbGxpbmcgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi4kZXJyb3JDb250YWluZXIuZmluZCgnbGlbZGF0YS1maWxlLWlkPVwiJyArIHBhcmFtcy5maWxlSWQgKyAnXCJdJykubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtc2cgPSBzZWxmLm1zZ1Jlc3VtYWJsZVVwbG9hZFJldHJpZXNFeGNlZWRlZC5zZXRUb2tlbnMoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGU6IHJtLmZpbGVOYW1lLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heDogc2VsZi5yZXN1bWFibGVVcGxvYWRPcHRpb25zLm1heFJldHJpZXMsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3I6IHJtLmVycm9yXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3Nob3dGaWxlRXJyb3IobXNnLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChmbS5pc1Byb2Nlc3NlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJtLnJlc2V0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGNoZWNrOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJtID0gc2VsZi5yZXN1bWFibGVNYW5hZ2VyLCBzdGF0dXMgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgICQuZWFjaChybS5sb2dzLCBmdW5jdGlvbiAoaW5kZXgsIHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdmFsdWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXR1cykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHJtLmNodW5rSW50ZXJ2YWxJZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJtLnNldFByb2Nlc3NlZCgnc3VjY2VzcycpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBwcm9jZXNzZWRSZXN1bWFibGVzOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxvZ3MgPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXIubG9ncywgaSwgY291bnQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghbG9ncyB8fCAhbG9ncy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsb2dzLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsb2dzW2ldID09PSB0cnVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudCsrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb3VudDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBnZXRVcGxvYWRlZFNpemU6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcm0gPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXIsIHNpemUgPSBybS5wcm9jZXNzZWRSZXN1bWFibGVzKCkgKiBybS5jaHVua1NpemU7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNpemUgPiBybS5maWxlLnNpemUgPyBybS5maWxlLnNpemUgOiBzaXplO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGdldFRvdGFsQ2h1bmtzOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJtID0gc2VsZi5yZXN1bWFibGVNYW5hZ2VyLCBjaHVua1NpemUgPSBwYXJzZUZsb2F0KHJtLmNodW5rU2l6ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc05hTihjaHVua1NpemUpICYmIGNodW5rU2l6ZSA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1hdGguY2VpbChybS5maWxlLnNpemUgLyBjaHVua1NpemUpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBnZXRQcm9ncmVzczogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBybSA9IHNlbGYucmVzdW1hYmxlTWFuYWdlciwgcHJvY2Vzc2VkID0gcm0ucHJvY2Vzc2VkUmVzdW1hYmxlcygpLCB0b3RhbCA9IHJtLmNodW5rQ291bnQ7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRvdGFsID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5jZWlsKHByb2Nlc3NlZCAvIHRvdGFsICogMTAwKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBjaGVja0Fib3J0ZWQ6IGZ1bmN0aW9uIChpbnRlcnZhbElkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYucGF1c2VkIHx8IHNlbGYuY2FuY2VsbGluZykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGludGVydmFsSWQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnVubG9jaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB1cGxvYWQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcm0gPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXIsIGZtID0gc2VsZi5maWxlTWFuYWdlciwgaWRzID0gZm0uZ2V0SWRMaXN0KCksIGZsYWcgPSAnbmV3JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJ2YWxJZDtcclxuICAgICAgICAgICAgICAgICAgICBpbnRlcnZhbElkID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaWQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJtLmNoZWNrQWJvcnRlZChpbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZsYWcgPT09ICduZXcnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmxvY2soKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAncHJvY2Vzc2luZyc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGlkcy5zaGlmdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm0uaW5pdFN0YXRzKGlkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmbS5zdGFja1tpZF0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBybS5pbml0KGlkLCBmbS5zdGFja1tpZF0sIGZtLmdldEluZGV4KGlkKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm0udGVzdFVwbG9hZCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJtLnVwbG9hZFJlc3VtYWJsZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZm0uaXNQZW5kaW5nKGlkKSAmJiBybS5jb21wbGV0ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAnbmV3JztcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm0uaXNQcm9jZXNzZWQoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICRpbml0VGh1bWJzID0gc2VsZi4kcHJldmlldy5maW5kKCcuZmlsZS1wcmV2aWV3LWluaXRpYWwnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkaW5pdFRodW1icy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaC5hZGRDc3MoJGluaXRUaHVtYnMsICRoLlNPUlRfQ1NTKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9pbml0U29ydGFibGUoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW50ZXJ2YWxJZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9jbGVhckZpbGVJbnB1dCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi51bmxvY2soKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmluaXRpYWxQcmV2aWV3ID0gZGF0YS5jb250ZW50O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmluaXRpYWxQcmV2aWV3Q29uZmlnID0gZGF0YS5jb25maWc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuaW5pdGlhbFByZXZpZXdUaHVtYlRhZ3MgPSBkYXRhLnRhZ3M7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlYmF0Y2h1cGxvYWRjb21wbGV0ZScsIFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlldyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld0NvbmZpZyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld1RodW1iVGFncyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fZ2V0RXh0cmFEYXRhKClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB1cGxvYWRSZXN1bWFibGU6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaSwgcm0gPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXIsIHRvdGFsID0gcm0uY2h1bmtDb3VudDtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgdG90YWw7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS5sb2dzW2ldID0gISEocm0ucHJvY2Vzc2VkW3JtLmlkXSAmJiBybS5wcm9jZXNzZWRbcm0uaWRdW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHRvdGFsOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm0ucHVzaEFqYXgoaSwgMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJtLmNodW5rSW50ZXJ2YWxJZCA9IHNldEludGVydmFsKHJtLmxvb3BBamF4LCBzZWxmLnF1ZXVlRGVsYXkpO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHRlc3RVcGxvYWQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcm0gPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXIsIG9wdHMgPSBzZWxmLnJlc3VtYWJsZVVwbG9hZE9wdGlvbnMsIGZkLCBmLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmbSA9IHNlbGYuZmlsZU1hbmFnZXIsIGlkID0gcm0uaWQsIGZuQmVmb3JlLCBmblN1Y2Nlc3MsIGZuRXJyb3IsIGZuQ29tcGxldGUsIG91dERhdGE7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFvcHRzLnRlc3RVcmwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm0udGVzdGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJtLnRlc3RpbmcgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgIGZkID0gbmV3IEZvcm1EYXRhKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgZiA9IGZtLnN0YWNrW2lkXTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRVcGxvYWREYXRhKGZkLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVJZDogaWQsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lOiBmLmZpbGVOYW1lLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlU2l6ZTogZi5zaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlUmVsYXRpdmVQYXRoOiBmLnJlbGF0aXZlUGF0aCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2h1bmtTaXplOiBybS5jaHVua1NpemUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNodW5rQ291bnQ6IHJtLmNodW5rQ291bnRcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICBmbkJlZm9yZSA9IGZ1bmN0aW9uIChqcVhIUikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmZCwganFYSFIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZXRlc3RiZWZvcmVzZW5kJywgW2lkLCBmbSwgcm0sIG91dERhdGFdKTtcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgIGZuU3VjY2VzcyA9IGZ1bmN0aW9uIChkYXRhLCB0ZXh0U3RhdHVzLCBqcVhIUikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmZCwganFYSFIsIGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcE5hbWVzID0gc2VsZi51cGxvYWRQYXJhbU5hbWVzLCBjaHVua3NVcGxvYWRlZCA9IHBOYW1lcy5jaHVua3NVcGxvYWRlZCB8fCAnY2h1bmtzVXBsb2FkZWQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zID0gW2lkLCBmbSwgcm0sIG91dERhdGFdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGFbY2h1bmtzVXBsb2FkZWRdIHx8ICEkaC5pc0FycmF5KGRhdGFbY2h1bmtzVXBsb2FkZWRdKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGV0ZXN0ZXJyb3InLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFybS5wcm9jZXNzZWRbaWRdKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm0ucHJvY2Vzc2VkW2lkXSA9IHt9O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJC5lYWNoKGRhdGFbY2h1bmtzVXBsb2FkZWRdLCBmdW5jdGlvbiAoa2V5LCBpbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJtLmxvZ3NbaW5kZXhdID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBybS5wcm9jZXNzZWRbaWRdW2luZGV4XSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJtLnByb2Nlc3NlZFtpZF0uZGF0YSA9IGRhdGE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZXRlc3RzdWNjZXNzJywgcGFyYW1zKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS50ZXN0aW5nID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICBmbkVycm9yID0gZnVuY3Rpb24gKGpxWEhSLCB0ZXh0U3RhdHVzLCBlcnJvclRocm93bikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmZCwganFYSFIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZXRlc3RhamF4ZXJyb3InLCBbaWQsIGZtLCBybSwgb3V0RGF0YV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS5sb2dBamF4RXJyb3IoanFYSFIsIHRleHRTdGF0dXMsIGVycm9yVGhyb3duKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm0udGVzdGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgZm5Db21wbGV0ZSA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGV0ZXN0Y29tcGxldGUnLCBbaWQsIGZtLCBybSwgc2VsZi5fZ2V0T3V0RGF0YShmZCldKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm0udGVzdGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYWpheFN1Ym1pdChmbkJlZm9yZSwgZm5TdWNjZXNzLCBmbkNvbXBsZXRlLCBmbkVycm9yLCBmZCwgaWQsIHJtLmZpbGVJbmRleCwgb3B0cy50ZXN0VXJsKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBwdXNoQWpheDogZnVuY3Rpb24gKGluZGV4LCByZXRyeSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYucmVzdW1hYmxlTWFuYWdlci5zdGFjay5wdXNoKFtpbmRleCwgcmV0cnldKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBzZW5kQWpheDogZnVuY3Rpb24gKGluZGV4LCByZXRyeSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmbSA9IHNlbGYuZmlsZU1hbmFnZXIsIHJtID0gc2VsZi5yZXN1bWFibGVNYW5hZ2VyLCBvcHRzID0gc2VsZi5yZXN1bWFibGVVcGxvYWRPcHRpb25zLCBmLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjaHVua1NpemUgPSBybS5jaHVua1NpemUsIGlkID0gcm0uaWQsIGZpbGUgPSBybS5maWxlLCAkdGh1bWIgPSBybS4kdGh1bWIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRidG5EZWxldGUgPSBybS4kYnRuRGVsZXRlO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChybS5wcm9jZXNzZWRbaWRdICYmIHJtLnByb2Nlc3NlZFtpZF1baW5kZXhdKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcm0uY3VyclRocmVhZHMrKztcclxuICAgICAgICAgICAgICAgICAgICBpZiAocmV0cnkgPiBvcHRzLm1heFJldHJpZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm0uc2V0UHJvY2Vzc2VkKCdlcnJvcicpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHZhciBmZCwgb3V0RGF0YSwgZm5CZWZvcmUsIGZuU3VjY2VzcywgZm5FcnJvciwgZm5Db21wbGV0ZSwgc2xpY2UgPSBmaWxlLnNsaWNlID8gJ3NsaWNlJyA6XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIChmaWxlLm1velNsaWNlID8gJ21velNsaWNlJyA6IChmaWxlLndlYmtpdFNsaWNlID8gJ3dlYmtpdFNsaWNlJyA6ICdzbGljZScpKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmxvYiA9IGZpbGVbc2xpY2VdKGNodW5rU2l6ZSAqIGluZGV4LCBjaHVua1NpemUgKiAoaW5kZXggKyAxKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgZmQgPSBuZXcgRm9ybURhdGEoKTtcclxuICAgICAgICAgICAgICAgICAgICBmID0gZm0uc3RhY2tbaWRdO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFVwbG9hZERhdGEoZmQsIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2h1bmtDb3VudDogcm0uY2h1bmtDb3VudCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2h1bmtJbmRleDogaW5kZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNodW5rU2l6ZTogY2h1bmtTaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjaHVua1NpemVTdGFydDogY2h1bmtTaXplICogaW5kZXgsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVCbG9iOiBbYmxvYiwgcm0uZmlsZU5hbWVdLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlSWQ6IGlkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZTogcm0uZmlsZU5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVSZWxhdGl2ZVBhdGg6IGYucmVsYXRpdmVQYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlU2l6ZTogZmlsZS5zaXplLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXRyeUNvdW50OiByZXRyeVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChybS4kcHJvZ3Jlc3MgJiYgcm0uJHByb2dyZXNzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS4kcHJvZ3Jlc3Muc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBmbkJlZm9yZSA9IGZ1bmN0aW9uIChqcVhIUikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmZCwganFYSFIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEkdGh1bWIuaGFzQ2xhc3MoJ2ZpbGUtcHJldmlldy1zdWNjZXNzJykpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRUaHVtYlN0YXR1cygkdGh1bWIsICdMb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGguYWRkQ3NzKCR0aHVtYiwgJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYnRuRGVsZXRlLmF0dHIoJ2Rpc2FibGVkJywgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVjaHVua2JlZm9yZXNlbmQnLCBbaWQsIGluZGV4LCByZXRyeSwgZm0sIHJtLCBvdXREYXRhXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICBmblN1Y2Nlc3MgPSBmdW5jdGlvbiAoZGF0YSwgdGV4dFN0YXR1cywganFYSFIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0RGF0YSA9IHNlbGYuX2dldE91dERhdGEoZmQsIGpxWEhSLCBkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmFtTmFtZXMgPSBzZWxmLnVwbG9hZFBhcmFtTmFtZXMsIGNodW5rSW5kZXggPSBwYXJhbU5hbWVzLmNodW5rSW5kZXggfHwgJ2NodW5rSW5kZXgnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0cyA9IHNlbGYucmVzdW1hYmxlVXBsb2FkT3B0aW9ucywgcGFyYW1zID0gW2lkLCBpbmRleCwgcmV0cnksIGZtLCBybSwgb3V0RGF0YV07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJtLmN1cnJUaHJlYWRzLS07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0cy5zaG93RXJyb3JMb2cpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9sb2cobG9ncy5yZXRyeVN0YXR1cywge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXRyeTogcmV0cnkgKyAxLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlbmFtZTogcm0uZmlsZU5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNodW5rOiBpbmRleFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcm0ucHVzaEFqYXgoaW5kZXgsIHJldHJ5ICsgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBybS5lcnJvciA9IGRhdGEuZXJyb3I7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWNodW5rZXJyb3InLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcm0ubG9nc1tkYXRhW2NodW5rSW5kZXhdXSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJtLnByb2Nlc3NlZFtpZF0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBybS5wcm9jZXNzZWRbaWRdID0ge307XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBybS5wcm9jZXNzZWRbaWRdW2RhdGFbY2h1bmtJbmRleF1dID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJtLnByb2Nlc3NlZFtpZF0uZGF0YSA9IGRhdGE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWNodW5rc3VjY2VzcycsIHBhcmFtcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBybS5jaGVjaygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICBmbkVycm9yID0gZnVuY3Rpb24gKGpxWEhSLCB0ZXh0U3RhdHVzLCBlcnJvclRocm93bikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmZCwganFYSFIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS5jdXJyVGhyZWFkcy0tO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS5lcnJvciA9IGVycm9yVGhyb3duO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBybS5sb2dBamF4RXJyb3IoanFYSFIsIHRleHRTdGF0dXMsIGVycm9yVGhyb3duKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVjaHVua2FqYXhlcnJvcicsIFtpZCwgaW5kZXgsIHJldHJ5LCBmbSwgcm0sIG91dERhdGFdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcm0ucHVzaEFqYXgoaW5kZXgsIHJldHJ5ICsgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICBmbkNvbXBsZXRlID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWNodW5rY29tcGxldGUnLCBbaWQsIGluZGV4LCByZXRyeSwgZm0sIHJtLCBzZWxmLl9nZXRPdXREYXRhKGZkKV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fYWpheFN1Ym1pdChmbkJlZm9yZSwgZm5TdWNjZXNzLCBmbkNvbXBsZXRlLCBmbkVycm9yLCBmZCwgaWQsIHJtLmZpbGVJbmRleCk7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbG9vcEFqYXg6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcm0gPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJtLmN1cnJUaHJlYWRzIDwgc2VsZi5yZXN1bWFibGVVcGxvYWRPcHRpb25zLm1heFRocmVhZHMgJiYgIXJtLnRlc3RpbmcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFyciA9IHJtLnN0YWNrLnNoaWZ0KCksIGluZGV4O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGFyciAhPT0gJ3VuZGVmaW5lZCcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ID0gYXJyWzBdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFybS5wcm9jZXNzZWRbcm0uaWRdIHx8ICFybS5wcm9jZXNzZWRbcm0uaWRdW2luZGV4XSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJtLnNlbmRBamF4KGluZGV4LCBhcnJbMV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocm0ucHJvY2Vzc2VkUmVzdW1hYmxlcygpID49IHJtLmdldFRvdGFsQ2h1bmtzKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcm0uc2V0UHJvY2Vzc2VkKCdzdWNjZXNzJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwocm0uY2h1bmtJbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNlbGYucmVzdW1hYmxlTWFuYWdlci5yZXNldCgpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2luaXRUZW1wbGF0ZURlZmF1bHRzOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgdE1haW4xLCB0TWFpbjIsIHRQcmV2aWV3LCB0RmlsZUljb24sIHRDbG9zZSwgdENhcHRpb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gK1xyXG4gICAgICAgICAgICAgICAgJyAgICAgIHtwYXVzZX1cXG4nICtcclxuICAgICAgICAgICAgICAgICcgICAgICB7dXBsb2FkfVxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgICAgIHticm93c2V9XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgIDwvZGl2PlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJzwvZGl2Pic7XHJcbiAgICAgICAgICAgIHRNYWluMiA9ICd7cHJldmlld31cXG48ZGl2IGNsYXNzPVwia3YtdXBsb2FkLXByb2dyZXNzIGt2LWhpZGRlblwiPjwvZGl2PlxcbjxkaXYgY2xhc3M9XCJjbGVhcmZpeFwiPjwvZGl2PlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJ3tyZW1vdmV9XFxue2NhbmNlbH1cXG57dXBsb2FkfVxcbnticm93c2V9XFxuJztcclxuICAgICAgICAgICAgdFByZXZpZXcgPSAnPGRpdiBjbGFzcz1cImZpbGUtcHJldmlldyB7Y2xhc3N9XCI+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICB7Y2xvc2V9JyArXHJcbiAgICAgICAgICAgICAgICAnICA8ZGl2IGNsYXNzPVwie2Ryb3BDbGFzc30gY2xlYXJmaXhcIj5cXG4nICtcclxuICAgICAgICAgICAgICAgICcgICAgPGRpdiBjbGFzcz1cImZpbGUtcHJldmlldy10aHVtYm5haWxzIGNsZWFyZml4XCI+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgIDwvZGl2PlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgICA8ZGl2IGNsYXNzPVwiZmlsZS1wcmV2aWV3LXN0YXR1cyB0ZXh0LWNlbnRlciB0ZXh0LXN1Y2Nlc3NcIj48L2Rpdj5cXG4nICtcclxuICAgICAgICAgICAgICAgICcgICAgPGRpdiBjbGFzcz1cImt2LWZpbGVpbnB1dC1lcnJvclwiPjwvZGl2PlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgPC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ICAgICA8ZGl2IGNsYXNzPVwia3Ytem9vbS1hY3Rpb25zXCI+e3RvZ2dsZWhlYWRlcn17ZnVsbHNjcmVlbn17Ym9yZGVybGVzc317Y2xvc2V9PC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgIDwvZGl2PlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgICA8ZGl2IGNsYXNzPVwibW9kYWwtYm9keVwiPlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgICAgIDxkaXYgY2xhc3M9XCJmbG9hdGluZy1idXR0b25zXCI+PC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgICAgPGRpdiBjbGFzcz1cImt2LXpvb20tYm9keSBmaWxlLXpvb20tY29udGVudCB7em9vbUZyYW1lQ2xhc3N9XCI+PC9kaXY+XFxuJyArICd7cHJldn0ge25leHR9XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgIDwvZGl2PlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgPC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnPC9kaXY+XFxuJztcclxuICAgICAgICAgICAgdFByb2dyZXNzID0gJzxkaXYgY2xhc3M9XCJwcm9ncmVzc1wiPlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgICA8ZGl2IGNsYXNzPVwie2NsYXNzfVwiIHJvbGU9XCJwcm9ncmVzc2JhclwiJyArXHJcbiAgICAgICAgICAgICAgICAnIGFyaWEtdmFsdWVub3c9XCJ7cGVyY2VudH1cIiBhcmlhLXZhbHVlbWluPVwiMFwiIGFyaWEtdmFsdWVtYXg9XCIxMDBcIiBzdHlsZT1cIndpZHRoOntwZXJjZW50fSU7XCI+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgICAgICB7c3RhdHVzfVxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgICAgPC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnPC9kaXY+e3N0YXRzfSc7XHJcbiAgICAgICAgICAgIHRTdGF0cyA9ICc8ZGl2IGNsYXNzPVwidGV4dC1pbmZvIGZpbGUtdXBsb2FkLXN0YXRzXCI+JyArXHJcbiAgICAgICAgICAgICAgICAnPHNwYW4gY2xhc3M9XCJwZW5kaW5nLXRpbWVcIj57cGVuZGluZ1RpbWV9PC9zcGFuPiAnICtcclxuICAgICAgICAgICAgICAgICc8c3BhbiBjbGFzcz1cInVwbG9hZC1zcGVlZFwiPnt1cGxvYWRTcGVlZH08L3NwYW4+JyArXHJcbiAgICAgICAgICAgICAgICAnPC9kaXY+JztcclxuICAgICAgICAgICAgdFNpemUgPSAnIDxzYW1wPih7c2l6ZVRleHR9KTwvc2FtcD4nO1xyXG4gICAgICAgICAgICB0Rm9vdGVyID0gJzxkaXYgY2xhc3M9XCJmaWxlLXRodW1ibmFpbC1mb290ZXJcIj5cXG4nICtcclxuICAgICAgICAgICAgICAgICcgICAgPGRpdiBjbGFzcz1cImZpbGUtZm9vdGVyLWNhcHRpb25cIiB0aXRsZT1cIntjYXB0aW9ufVwiPlxcbicgK1xyXG4gICAgICAgICAgICAgICAgJyAgICAgICAgPGRpdiBjbGFzcz1cImZpbGUtY2FwdGlvbi1pbmZvXCI+e2NhcHRpb259PC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgICAgICA8ZGl2IGNsYXNzPVwiZmlsZS1zaXplLWluZm9cIj57c2l6ZX08L2Rpdj5cXG4nICtcclxuICAgICAgICAgICAgICAgICcgICAgPC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgIHtwcm9ncmVzc31cXG57aW5kaWNhdG9yfVxcbnthY3Rpb25zfVxcbicgK1xyXG4gICAgICAgICAgICAgICAgJzwvZGl2Pic7XHJcbiAgICAgICAgICAgIHRBY3Rpb25zID0gJzxkaXYgY2xhc3M9XCJmaWxlLWFjdGlvbnNcIj5cXG4nICtcclxuICAgICAgICAgICAgICAgICcgICAgPGRpdiBjbGFzcz1cImZpbGUtZm9vdGVyLWJ1dHRvbnNcIj5cXG4nICtcclxuICAgICAgICAgICAgICAgICcgICAgICAgIHtkb3dubG9hZH0ge3VwbG9hZH0ge2RlbGV0ZX0ge3pvb219IHtvdGhlcn0nICtcclxuICAgICAgICAgICAgICAgICcgICAgPC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnPC9kaXY+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAne2RyYWd9XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnPGRpdiBjbGFzcz1cImNsZWFyZml4XCI+PC9kaXY+JztcclxuICAgICAgICAgICAgLy9ub2luc3BlY3Rpb24gSHRtbFVua25vd25BdHRyaWJ1dGVcclxuICAgICAgICAgICAgdEFjdGlvbkRlbGV0ZSA9ICc8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImt2LWZpbGUtcmVtb3ZlIHtyZW1vdmVDbGFzc31cIiAnICtcclxuICAgICAgICAgICAgICAgICd0aXRsZT1cIntyZW1vdmVUaXRsZX1cIiB7ZGF0YVVybH17ZGF0YUtleX0+e3JlbW92ZUljb259PC9idXR0b24+XFxuJztcclxuICAgICAgICAgICAgdEFjdGlvblVwbG9hZCA9ICc8YnV0dG9uIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImt2LWZpbGUtdXBsb2FkIHt1cGxvYWRDbGFzc31cIiB0aXRsZT1cInt1cGxvYWRUaXRsZX1cIj4nICtcclxuICAgICAgICAgICAgICAgICd7dXBsb2FkSWNvbn08L2J1dHRvbj4nO1xyXG4gICAgICAgICAgICB0QWN0aW9uRG93bmxvYWQgPSAnPGEgY2xhc3M9XCJrdi1maWxlLWRvd25sb2FkIHtkb3dubG9hZENsYXNzfVwiIHRpdGxlPVwie2Rvd25sb2FkVGl0bGV9XCIgJyArXHJcbiAgICAgICAgICAgICAgICAnaHJlZj1cIntkb3dubG9hZFVybH1cIiBkb3dubG9hZD1cIntjYXB0aW9ufVwiIHRhcmdldD1cIl9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XVsdHMgPSB7XHJcbiAgICAgICAgICAgICAgICBsYXlvdXRUZW1wbGF0ZXM6IHtcclxuICAgICAgICAgICAgICAgICAgICBtYWluMTogdE1haW4xLFxyXG4gICAgICAgICAgICAgICAgICAgIG1haW4yOiB0TWFpbjIsXHJcbiAgICAgICAgICAgICAgICAgICAgcHJldmlldzogdFByZXZpZXcsXHJcbiAgICAgICAgICAgICAgICAgICAgY2xvc2U6IHRDbG9zZSxcclxuICAgICAgICAgICAgICAgICAgICBmaWxlSWNvbjogdEZpbGVJY29uLFxyXG4gICAgICAgICAgICAgICAgICAgIGNhcHRpb246IHRDYXB0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgIG1vZGFsTWFpbjogdE1vZGFsTWFpbixcclxuICAgICAgICAgICAgICAgICAgICBtb2RhbDogdE1vZGFsLFxyXG4gICAgICAgICAgICAgICAgICAgIHByb2dyZXNzOiB0UHJvZ3Jlc3MsXHJcbiAgICAgICAgICAgICAgICAgICAgc3RhdHM6IHRTdGF0cyxcclxuICAgICAgICAgICAgICAgICAgICBzaXplOiB0U2l6ZSxcclxuICAgICAgICAgICAgICAgICAgICBmb290ZXI6IHRGb290ZXIsXHJcbiAgICAgICAgICAgICAgICAgICAgaW5kaWNhdG9yOiB0SW5kaWNhdG9yLFxyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbnM6IHRBY3Rpb25zLFxyXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbkRlbGV0ZTogdEFjdGlvbkRlbGV0ZSxcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb25VcGxvYWQ6IHRBY3Rpb25VcGxvYWQsXHJcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uRG93bmxvYWQ6IHRBY3Rpb25Eb3dubG9hZCxcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb25ab29tOiB0QWN0aW9uWm9vbSxcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb25EcmFnOiB0QWN0aW9uRHJhZyxcclxuICAgICAgICAgICAgICAgICAgICBidG5EZWZhdWx0OiB0QnRuRGVmYXVsdCxcclxuICAgICAgICAgICAgICAgICAgICBidG5MaW5rOiB0QnRuTGluayxcclxuICAgICAgICAgICAgICAgICAgICBidG5Ccm93c2U6IHRCdG5Ccm93c2UsXHJcbiAgICAgICAgICAgICAgICAgICAgem9vbUNhY2hlOiB0Wm9vbUNhY2hlXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgcHJldmlld01hcmt1cFRhZ3M6IHtcclxuICAgICAgICAgICAgICAgICAgICB0YWdCZWZvcmUxOiB0VGFnQmVmMSxcclxuICAgICAgICAgICAgICAgICAgICB0YWdCZWZvcmUyOiB0VGFnQmVmMixcclxuICAgICAgICAgICAgICAgICAgICB0YWdBZnRlcjogdFRhZ0FmdFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHByZXZpZXdDb250ZW50VGVtcGxhdGVzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgZ2VuZXJpYzogdEdlbmVyaWMsXHJcbiAgICAgICAgICAgICAgICAgICAgaHRtbDogdEh0bWwsXHJcbiAgICAgICAgICAgICAgICAgICAgaW1hZ2U6IHRJbWFnZSxcclxuICAgICAgICAgICAgICAgICAgICB0ZXh0OiB0VGV4dCxcclxuICAgICAgICAgICAgICAgICAgICBvZmZpY2U6IHRPZmZpY2UsXHJcbiAgICAgICAgICAgICAgICAgICAgZ2RvY3M6IHRHZG9jcyxcclxuICAgICAgICAgICAgICAgICAgICB2aWRlbzogdFZpZGVvLFxyXG4gICAgICAgICAgICAgICAgICAgIGF1ZGlvOiB0QXVkaW8sXHJcbiAgICAgICAgICAgICAgICAgICAgZmxhc2g6IHRGbGFzaCxcclxuICAgICAgICAgICAgICAgICAgICBvYmplY3Q6IHRPYmplY3QsXHJcbiAgICAgICAgICAgICAgICAgICAgcGRmOiB0UGRmLFxyXG4gICAgICAgICAgICAgICAgICAgIG90aGVyOiB0T3RoZXJcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBhbGxvd2VkUHJldmlld1R5cGVzOiBbJ2ltYWdlJywgJ2h0bWwnLCAndGV4dCcsICd2aWRlbycsICdhdWRpbycsICdmbGFzaCcsICdwZGYnLCAnb2JqZWN0J10sXHJcbiAgICAgICAgICAgICAgICBwcmV2aWV3VGVtcGxhdGVzOiB7fSxcclxuICAgICAgICAgICAgICAgIHByZXZpZXdTZXR0aW5nczoge1xyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlOiB7d2lkdGg6ICdhdXRvJywgaGVpZ2h0OiAnYXV0bycsICdtYXgtd2lkdGgnOiAnMTAwJScsICdtYXgtaGVpZ2h0JzogJzEwMCUnfSxcclxuICAgICAgICAgICAgICAgICAgICBodG1sOiB7d2lkdGg6ICcyMTNweCcsIGhlaWdodDogJzE2MHB4J30sXHJcbiAgICAgICAgICAgICAgICAgICAgdGV4dDoge3dpZHRoOiAnMjEzcHgnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIG9mZmljZToge3dpZHRoOiAnMjEzcHgnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIGdkb2NzOiB7d2lkdGg6ICcyMTNweCcsIGhlaWdodDogJzE2MHB4J30sXHJcbiAgICAgICAgICAgICAgICAgICAgdmlkZW86IHt3aWR0aDogJzIxM3B4JywgaGVpZ2h0OiAnMTYwcHgnfSxcclxuICAgICAgICAgICAgICAgICAgICBhdWRpbzoge3dpZHRoOiAnMTAwJScsIGhlaWdodDogJzMwcHgnfSxcclxuICAgICAgICAgICAgICAgICAgICBmbGFzaDoge3dpZHRoOiAnMjEzcHgnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIG9iamVjdDoge3dpZHRoOiAnMjEzcHgnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIHBkZjoge3dpZHRoOiAnMTAwJScsIGhlaWdodDogJzE2MHB4JywgJ3Bvc2l0aW9uJzogJ3JlbGF0aXZlJ30sXHJcbiAgICAgICAgICAgICAgICAgICAgb3RoZXI6IHt3aWR0aDogJzIxM3B4JywgaGVpZ2h0OiAnMTYwcHgnfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHByZXZpZXdTZXR0aW5nc1NtYWxsOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaW1hZ2U6IHt3aWR0aDogJ2F1dG8nLCBoZWlnaHQ6ICdhdXRvJywgJ21heC13aWR0aCc6ICcxMDAlJywgJ21heC1oZWlnaHQnOiAnMTAwJSd9LFxyXG4gICAgICAgICAgICAgICAgICAgIGh0bWw6IHt3aWR0aDogJzEwMCUnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IHt3aWR0aDogJzEwMCUnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIG9mZmljZToge3dpZHRoOiAnMTAwJScsIGhlaWdodDogJzE2MHB4J30sXHJcbiAgICAgICAgICAgICAgICAgICAgZ2RvY3M6IHt3aWR0aDogJzEwMCUnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIHZpZGVvOiB7d2lkdGg6ICcxMDAlJywgaGVpZ2h0OiAnYXV0byd9LFxyXG4gICAgICAgICAgICAgICAgICAgIGF1ZGlvOiB7d2lkdGg6ICcxMDAlJywgaGVpZ2h0OiAnMzBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIGZsYXNoOiB7d2lkdGg6ICcxMDAlJywgaGVpZ2h0OiAnYXV0byd9LFxyXG4gICAgICAgICAgICAgICAgICAgIG9iamVjdDoge3dpZHRoOiAnMTAwJScsIGhlaWdodDogJ2F1dG8nfSxcclxuICAgICAgICAgICAgICAgICAgICBwZGY6IHt3aWR0aDogJzEwMCUnLCBoZWlnaHQ6ICcxNjBweCd9LFxyXG4gICAgICAgICAgICAgICAgICAgIG90aGVyOiB7d2lkdGg6ICcxMDAlJywgaGVpZ2h0OiAnMTYwcHgnfVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHByZXZpZXdab29tU2V0dGluZ3M6IHtcclxuICAgICAgICAgICAgICAgICAgICBpbWFnZToge3dpZHRoOiAnYXV0bycsIGhlaWdodDogJ2F1dG8nLCAnbWF4LXdpZHRoJzogJzEwMCUnLCAnbWF4LWhlaWdodCc6ICcxMDAlJ30sXHJcbiAgICAgICAgICAgICAgICAgICAgaHRtbDogdkRlZmF1bHREaW0sXHJcbiAgICAgICAgICAgICAgICAgICAgdGV4dDogdkRlZmF1bHREaW0sXHJcbiAgICAgICAgICAgICAgICAgICAgb2ZmaWNlOiB7d2lkdGg6ICcxMDAlJywgaGVpZ2h0OiAnMTAwJScsICdtYXgtd2lkdGgnOiAnMTAwJScsICdtaW4taGVpZ2h0JzogJzQ4MHB4J30sXHJcbiAgICAgICAgICAgICAgICAgICAgZ2RvY3M6IHt3aWR0aDogJzEwMCUnLCBoZWlnaHQ6ICcxMDAlJywgJ21heC13aWR0aCc6ICcxMDAlJywgJ21pbi1oZWlnaHQnOiAnNDgwcHgnfSxcclxuICAgICAgICAgICAgICAgICAgICB2aWRlbzoge3dpZHRoOiAnYXV0bycsIGhlaWdodDogJzEwMCUnLCAnbWF4LXdpZHRoJzogJzEwMCUnfSxcclxuICAgICAgICAgICAgICAgICAgICBhdWRpbzoge3dpZHRoOiAnMTAwJScsIGhlaWdodDogJzMwcHgnfSxcclxuICAgICAgICAgICAgICAgICAgICBmbGFzaDoge3dpZHRoOiAnYXV0bycsIGhlaWdodDogJzQ4MHB4J30sXHJcbiAgICAgICAgICAgICAgICAgICAgb2JqZWN0OiB7d2lkdGg6ICdhdXRvJywgaGVpZ2h0OiAnMTAwJScsICdtYXgtd2lkdGgnOiAnMTAwJScsICdtaW4taGVpZ2h0JzogJzQ4MHB4J30sXHJcbiAgICAgICAgICAgICAgICAgICAgcGRmOiB2RGVmYXVsdERpbSxcclxuICAgICAgICAgICAgICAgICAgICBvdGhlcjoge3dpZHRoOiAnYXV0bycsIGhlaWdodDogJzEwMCUnLCAnbWluLWhlaWdodCc6ICc0ODBweCd9XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgbWltZVR5cGVBbGlhc2VzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgJ3ZpZGVvL3F1aWNrdGltZSc6ICd2aWRlby9tcDQnXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZmlsZVR5cGVTZXR0aW5nczoge1xyXG4gICAgICAgICAgICAgICAgICAgIGltYWdlOiBmdW5jdGlvbiAodlR5cGUsIHZOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoJGguY29tcGFyZSh2VHlwZSwgJ2ltYWdlLionKSAmJiAhJGguY29tcGFyZSh2VHlwZSwgLyh0aWZmP3x3bWYpJC9pKSB8fFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGguY29tcGFyZSh2TmFtZSwgL1xcLihnaWZ8cG5nfGpwZT9nKSQvaSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgaHRtbDogZnVuY3Rpb24gKHZUeXBlLCB2TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJGguY29tcGFyZSh2VHlwZSwgJ3RleHQvaHRtbCcpIHx8ICRoLmNvbXBhcmUodk5hbWUsIC9cXC4oaHRtfGh0bWwpJC9pKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIG9mZmljZTogZnVuY3Rpb24gKHZUeXBlLCB2TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJGguY29tcGFyZSh2VHlwZSwgLyh3b3JkfGV4Y2VsfHBvd2VycG9pbnR8b2ZmaWNlKSQvaSkgfHxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoLmNvbXBhcmUodk5hbWUsIC9cXC4oZG9jeD98eGxzeD98cHB0eD98cHBzfHBvdHg/KSQvaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICBnZG9jczogZnVuY3Rpb24gKHZUeXBlLCB2TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJGguY29tcGFyZSh2VHlwZSwgLyh3b3JkfGV4Y2VsfHBvd2VycG9pbnR8b2ZmaWNlfGl3b3JrLXBhZ2VzfHRpZmY/KSQvaSkgfHxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoLmNvbXBhcmUodk5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL1xcLihkb2N4P3x4bHN4P3xwcHR4P3xwcHN8cG90eD98cnRmfG9kc3xvZHR8cGFnZXN8YWl8ZHhmfHR0Znx0aWZmP3x3bWZ8ZT9wcykkL2kpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgdGV4dDogZnVuY3Rpb24gKHZUeXBlLCB2TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJGguY29tcGFyZSh2VHlwZSwgJ3RleHQuKicpIHx8ICRoLmNvbXBhcmUodk5hbWUsIC9cXC4oeG1sfGphdmFzY3JpcHQpJC9pKSB8fFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGguY29tcGFyZSh2TmFtZSwgL1xcLih0eHR8bWR8Y3N2fG5mb3xpbml8anNvbnxwaHB8anN8Y3NzKSQvaSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgICAgICB2aWRlbzogZnVuY3Rpb24gKHZUeXBlLCB2TmFtZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJGguY29tcGFyZSh2VHlwZSwgJ3ZpZGVvLionKSAmJiAoJGguY29tcGFyZSh2VHlwZSwgLyhvZ2d8bXA0fG1wP2d8bW92fHdlYm18M2dwKSQvaSkgfHxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoLmNvbXBhcmUodk5hbWUsIC9cXC4ob2c/fG1wNHx3ZWJtfG1wP2d8bW92fDNncCkkL2kpKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIGF1ZGlvOiBmdW5jdGlvbiAodlR5cGUsIHZOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkaC5jb21wYXJlKHZUeXBlLCAnYXVkaW8uKicpICYmICgkaC5jb21wYXJlKHZOYW1lLCAvKG9nZ3xtcDN8bXA/Z3x3YXYpJC9pKSB8fFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGguY29tcGFyZSh2TmFtZSwgL1xcLihvZz98bXAzfG1wP2d8d2F2KSQvaSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgZmxhc2g6IGZ1bmN0aW9uICh2VHlwZSwgdk5hbWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRoLmNvbXBhcmUodlR5cGUsICdhcHBsaWNhdGlvbi94LXNob2Nrd2F2ZS1mbGFzaCcsIHRydWUpIHx8ICRoLmNvbXBhcmUodk5hbWUsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvXFwuKHN3ZikkL2kpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgcGRmOiBmdW5jdGlvbiAodlR5cGUsIHZOYW1lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkaC5jb21wYXJlKHZUeXBlLCAnYXBwbGljYXRpb24vcGRmJywgdHJ1ZSkgfHwgJGguY29tcGFyZSh2TmFtZSwgL1xcLihwZGYpJC9pKTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIG9iamVjdDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgICAgIG90aGVyOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBmaWxlQWN0aW9uU2V0dGluZ3M6IHtcclxuICAgICAgICAgICAgICAgICAgICBzaG93UmVtb3ZlOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIHNob3dVcGxvYWQ6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgc2hvd0Rvd25sb2FkOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIHNob3dab29tOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIHNob3dEcmFnOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIHJlbW92ZUljb246ICc8aSBjbGFzcz1cImdseXBoaWNvbiBnbHlwaGljb24tdHJhc2hcIj48L2k+JyxcclxuICAgICAgICAgICAgICAgICAgICByZW1vdmVDbGFzczogJ2J0biBidG4tc20gYnRuLWt2IGJ0bi1kZWZhdWx0IGJ0bi1vdXRsaW5lLXNlY29uZGFyeScsXHJcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlRXJyb3JDbGFzczogJ2J0biBidG4tc20gYnRuLWt2IGJ0bi1kYW5nZXInLFxyXG4gICAgICAgICAgICAgICAgICAgIHJlbW92ZVRpdGxlOiAnUmVtb3ZlIGZpbGUnLFxyXG4gICAgICAgICAgICAgICAgICAgIHVwbG9hZEljb246ICc8aSBjbGFzcz1cImdseXBoaWNvbiBnbHlwaGljb24tdXBsb2FkXCI+PC9pPicsXHJcbiAgICAgICAgICAgICAgICAgICAgdXBsb2FkQ2xhc3M6ICdidG4gYnRuLXNtIGJ0bi1rdiBidG4tZGVmYXVsdCBidG4tb3V0bGluZS1zZWNvbmRhcnknLFxyXG4gICAgICAgICAgICAgICAgICAgIHVwbG9hZFRpdGxlOiAnVXBsb2FkIGZpbGUnLFxyXG4gICAgICAgICAgICAgICAgICAgIHVwbG9hZFJldHJ5SWNvbjogJzxpIGNsYXNzPVwiZ2x5cGhpY29uIGdseXBoaWNvbi1yZXBlYXRcIj48L2k+JyxcclxuICAgICAgICAgICAgICAgICAgICB1cGxvYWRSZXRyeVRpdGxlOiAnUmV0cnkgdXBsb2FkJyxcclxuICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEljb246ICc8aSBjbGFzcz1cImdseXBoaWNvbiBnbHlwaGljb24tZG93bmxvYWRcIj48L2k+JyxcclxuICAgICAgICAgICAgICAgICAgICBkb3dubG9hZENsYXNzOiAnYnRuIGJ0bi1zbSBidG4ta3YgYnRuLWRlZmF1bHQgYnRuLW91dGxpbmUtc2Vjb25kYXJ5JyxcclxuICAgICAgICAgICAgICAgICAgICBkb3dubG9hZFRpdGxlOiAnRG93bmxvYWQgZmlsZScsXHJcbiAgICAgICAgICAgICAgICAgICAgem9vbUljb246ICc8aSBjbGFzcz1cImdseXBoaWNvbiBnbHlwaGljb24tem9vbS1pblwiPjwvaT4nLFxyXG4gICAgICAgICAgICAgICAgICAgIHpvb21DbGFzczogJ2J0biBidG4tc20gYnRuLWt2IGJ0bi1kZWZhdWx0IGJ0bi1vdXRsaW5lLXNlY29uZGFyeScsXHJcbiAgICAgICAgICAgICAgICAgICAgem9vbVRpdGxlOiAnVmlldyBEZXRhaWxzJyxcclxuICAgICAgICAgICAgICAgICAgICBkcmFnSWNvbjogJzxpIGNsYXNzPVwiZ2x5cGhpY29uIGdseXBoaWNvbi1tb3ZlXCI+PC9pPicsXHJcbiAgICAgICAgICAgICAgICAgICAgZHJhZ0NsYXNzOiAndGV4dC1pbmZvJyxcclxuICAgICAgICAgICAgICAgICAgICBkcmFnVGl0bGU6ICdNb3ZlIC8gUmVhcnJhbmdlJyxcclxuICAgICAgICAgICAgICAgICAgICBkcmFnU2V0dGluZ3M6IHt9LFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGljYXRvck5ldzogJzxpIGNsYXNzPVwiZ2x5cGhpY29uIGdseXBoaWNvbi1wbHVzLXNpZ24gdGV4dC13YXJuaW5nXCI+PC9pPicsXHJcbiAgICAgICAgICAgICAgICAgICAgaW5kaWNhdG9yU3VjY2VzczogJzxpIGNsYXNzPVwiZ2x5cGhpY29uIGdseXBoaWNvbi1vay1zaWduIHRleHQtc3VjY2Vzc1wiPjwvaT4nLFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGljYXRvckVycm9yOiAnPGkgY2xhc3M9XCJnbHlwaGljb24gZ2x5cGhpY29uLWV4Y2xhbWF0aW9uLXNpZ24gdGV4dC1kYW5nZXJcIj48L2k+JyxcclxuICAgICAgICAgICAgICAgICAgICBpbmRpY2F0b3JMb2FkaW5nOiAnPGkgY2xhc3M9XCJnbHlwaGljb24gZ2x5cGhpY29uLWhvdXJnbGFzcyB0ZXh0LW11dGVkXCI+PC9pPicsXHJcbiAgICAgICAgICAgICAgICAgICAgaW5kaWNhdG9yUGF1c2VkOiAnPGkgY2xhc3M9XCJnbHlwaGljb24gZ2x5cGhpY29uLXBhdXNlIHRleHQtcHJpbWFyeVwiPjwvaT4nLFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGljYXRvck5ld1RpdGxlOiAnTm90IHVwbG9hZGVkIHlldCcsXHJcbiAgICAgICAgICAgICAgICAgICAgaW5kaWNhdG9yU3VjY2Vzc1RpdGxlOiAnVXBsb2FkZWQnLFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGljYXRvckVycm9yVGl0bGU6ICdVcGxvYWQgRXJyb3InLFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGljYXRvckxvYWRpbmdUaXRsZTogJ1VwbG9hZGluZyAuLi4nLFxyXG4gICAgICAgICAgICAgICAgICAgIGluZGljYXRvclBhdXNlZFRpdGxlOiAnVXBsb2FkIFBhdXNlZCdcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgJC5lYWNoKHNlbGYuZGVmYXVsdHMsIGZ1bmN0aW9uIChrZXksIHNldHRpbmcpIHtcclxuICAgICAgICAgICAgICAgIGlmIChrZXkgPT09ICdhbGxvd2VkUHJldmlld1R5cGVzJykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLmFsbG93ZWRQcmV2aWV3VHlwZXMgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmFsbG93ZWRQcmV2aWV3VHlwZXMgPSBzZXR0aW5nO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzZWxmW2tleV0gPSAkLmV4dGVuZCh0cnVlLCB7fSwgc2V0dGluZywgc2VsZltrZXldKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHNlbGYuX2luaXRQcmV2aWV3VGVtcGxhdGVzKCk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdFByZXZpZXdUZW1wbGF0ZXM6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCB0YWdzID0gc2VsZi5wcmV2aWV3TWFya3VwVGFncywgdGFnQmVmLCB0YWdBZnQgPSB0YWdzLnRhZ0FmdGVyO1xyXG4gICAgICAgICAgICAkLmVhY2goc2VsZi5wcmV2aWV3Q29udGVudFRlbXBsYXRlcywgZnVuY3Rpb24gKGtleSwgdmFsdWUpIHtcclxuICAgICAgICAgICAgICAgIGlmICgkaC5pc0VtcHR5KHNlbGYucHJldmlld1RlbXBsYXRlc1trZXldKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRhZ0JlZiA9IHRhZ3MudGFnQmVmb3JlMjtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSAnZ2VuZXJpYycgfHwga2V5ID09PSAnaW1hZ2UnIHx8IGtleSA9PT0gJ2h0bWwnIHx8IGtleSA9PT0gJ3RleHQnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ0JlZiA9IHRhZ3MudGFnQmVmb3JlMTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuX2lzUGRmUmVuZGVyZWQoKSAmJiBrZXkgPT09ICdwZGYnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZ0JlZiA9IHRhZ0JlZi5yZXBsYWNlKCdrdi1maWxlLWNvbnRlbnQnLCAna3YtZmlsZS1jb250ZW50IGt2LXBkZi1yZW5kZXJlZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnByZXZpZXdUZW1wbGF0ZXNba2V5XSA9IHRhZ0JlZiArIHZhbHVlICsgdGFnQWZ0O1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9pbml0UHJldmlld0NhY2hlOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUgPSB7XHJcbiAgICAgICAgICAgICAgICBkYXRhOiB7fSxcclxuICAgICAgICAgICAgICAgIGluaXQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgY29udGVudCA9IHNlbGYuaW5pdGlhbFByZXZpZXc7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRlbnQubGVuZ3RoID4gMCAmJiAhJGguaXNBcnJheShjb250ZW50KSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gY29udGVudC5zcGxpdChzZWxmLmluaXRpYWxQcmV2aWV3RGVsaW1pdGVyKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YSA9IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudDogY29udGVudCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnOiBzZWxmLmluaXRpYWxQcmV2aWV3Q29uZmlnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0YWdzOiBzZWxmLmluaXRpYWxQcmV2aWV3VGh1bWJUYWdzXHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBjb3VudDogZnVuY3Rpb24gKHNraXBOdWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzZWxmLnByZXZpZXdDYWNoZS5kYXRhIHx8ICFzZWxmLnByZXZpZXdDYWNoZS5kYXRhLmNvbnRlbnQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChza2lwTnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2hrID0gc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YS5jb250ZW50LmZpbHRlcihmdW5jdGlvbiAobikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gIT09IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2hrLmxlbmd0aDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGYucHJldmlld0NhY2hlLmRhdGEuY29udGVudC5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoaSwgaXNEaXNhYmxlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBpbmQgPSAkaC5JTklUX0ZMQUcgKyBpLCBkYXRhID0gc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YSwgY29uZmlnID0gZGF0YS5jb25maWdbaV0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBkYXRhLmNvbnRlbnRbaV0sIG91dCwgJHRtcCwgY2F0LCBmdHIsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZuYW1lLCBmdHlwZSwgZnJhbWVDbGFzcywgYXNEYXRhID0gJGguaWZTZXQoJ3ByZXZpZXdBc0RhdGEnLCBjb25maWcsIHNlbGYuaW5pdGlhbFByZXZpZXdBc0RhdGEpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBhID0gY29uZmlnID8ge3RpdGxlOiBjb25maWcudGl0bGUgfHwgbnVsbCwgYWx0OiBjb25maWcuYWx0IHx8IG51bGx9IDoge3RpdGxlOiBudWxsLCBhbHQ6IG51bGx9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRlbXBsYXRlID0gZnVuY3Rpb24gKGNhdCwgZGF0LCBmbmFtZSwgZnR5cGUsIGZ0ciwgaW5kLCBmY2xhc3MsIHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmYyA9ICcgZmlsZS1wcmV2aWV3LWluaXRpYWwgJyArICRoLlNPUlRfQ1NTICsgKGZjbGFzcyA/ICcgJyArIGZjbGFzcyA6ICcnKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IHNlbGYucHJldmlld0luaXRJZCArICctJyArIGluZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlSWQgPSBjb25maWcgJiYgY29uZmlnLmZpbGVJZCB8fCBpZDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qKiBAbmFtZXNwYWNlIGNvbmZpZy56b29tRGF0YSAqL1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGYuX2dlbmVyYXRlUHJldmlld1RlbXBsYXRlKGNhdCwgZGF0LCBmbmFtZSwgZnR5cGUsIGlkLCBmaWxlSWQsIGZhbHNlLCBudWxsLCBmYyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdHIsIGluZCwgdCwgYSwgY29uZmlnICYmIGNvbmZpZy56b29tRGF0YSB8fCBkYXQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghY29udGVudCB8fCAhY29udGVudC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpc0Rpc2FibGVkID0gaXNEaXNhYmxlZCA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlzRGlzYWJsZWQ7XHJcbiAgICAgICAgICAgICAgICAgICAgY2F0ID0gJGguaWZTZXQoJ3R5cGUnLCBjb25maWcsIHNlbGYuaW5pdGlhbFByZXZpZXdGaWxlVHlwZSB8fCAnZ2VuZXJpYycpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZuYW1lID0gJGguaWZTZXQoJ2ZpbGVuYW1lJywgY29uZmlnLCAkaC5pZlNldCgnY2FwdGlvbicsIGNvbmZpZykpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZ0eXBlID0gJGguaWZTZXQoJ2ZpbGV0eXBlJywgY29uZmlnLCBjYXQpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZ0ciA9IHNlbGYucHJldmlld0NhY2hlLmZvb3RlcihpLCBpc0Rpc2FibGVkLCAoY29uZmlnICYmIGNvbmZpZy5zaXplIHx8IG51bGwpKTtcclxuICAgICAgICAgICAgICAgICAgICBmcmFtZUNsYXNzID0gJGguaWZTZXQoJ2ZyYW1lQ2xhc3MnLCBjb25maWcpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhc0RhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0ID0gcGFyc2VUZW1wbGF0ZShjYXQsIGNvbnRlbnQsIGZuYW1lLCBmdHlwZSwgZnRyLCBpbmQsIGZyYW1lQ2xhc3MpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dCA9IHBhcnNlVGVtcGxhdGUoJ2dlbmVyaWMnLCBjb250ZW50LCBmbmFtZSwgZnR5cGUsIGZ0ciwgaW5kLCBmcmFtZUNsYXNzLCBjYXQpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc2V0VG9rZW5zKHsnY29udGVudCc6IGRhdGEuY29udGVudFtpXX0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS50YWdzLmxlbmd0aCAmJiBkYXRhLnRhZ3NbaV0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0ID0gJGgucmVwbGFjZVRhZ3Mob3V0LCBkYXRhLnRhZ3NbaV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBjb25maWcuZnJhbWVBdHRyICovXHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEkaC5pc0VtcHR5KGNvbmZpZykgJiYgISRoLmlzRW1wdHkoY29uZmlnLmZyYW1lQXR0cikpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHRtcCA9ICQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2JykpLmh0bWwob3V0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHRtcC5maW5kKCcuZmlsZS1wcmV2aWV3LWluaXRpYWwnKS5hdHRyKGNvbmZpZy5mcmFtZUF0dHIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXQgPSAkdG1wLmh0bWwoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHRtcC5yZW1vdmUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG91dDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBjbGVhbjogZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmNvbnRlbnQgPSAkaC5jbGVhbkFycmF5KGRhdGEuY29udGVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5jb25maWcgPSAkaC5jbGVhbkFycmF5KGRhdGEuY29uZmlnKTtcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLnRhZ3MgPSAkaC5jbGVhbkFycmF5KGRhdGEudGFncyk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YSA9IGRhdGE7XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgYWRkOiBmdW5jdGlvbiAoY29udGVudCwgY29uZmlnLCB0YWdzLCBhcHBlbmQpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IHNlbGYucHJldmlld0NhY2hlLmRhdGEsIGluZGV4O1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghY29udGVudCB8fCAhY29udGVudC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGluZGV4ID0gY29udGVudC5sZW5ndGggLSAxO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghJGguaXNBcnJheShjb250ZW50KSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gY29udGVudC5zcGxpdChzZWxmLmluaXRpYWxQcmV2aWV3RGVsaW1pdGVyKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFwcGVuZCAmJiBkYXRhLmNvbnRlbnQgJiYgZGF0YS5jb250ZW50Lmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleCA9IGRhdGEuY29udGVudC5wdXNoKGNvbnRlbnRbMF0pIC0gMTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5jb25maWdbaW5kZXhdID0gY29uZmlnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnRhZ3NbaW5kZXhdID0gdGFncztcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmNvbnRlbnQgPSBjb250ZW50O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmNvbmZpZyA9IGNvbmZpZztcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS50YWdzID0gdGFncztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuY2xlYW4oZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluZGV4O1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHNldDogZnVuY3Rpb24gKGNvbnRlbnQsIGNvbmZpZywgdGFncywgYXBwZW5kKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBzZWxmLnByZXZpZXdDYWNoZS5kYXRhLCBpLCBjaGs7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjb250ZW50IHx8ICFjb250ZW50Lmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghJGguaXNBcnJheShjb250ZW50KSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gY29udGVudC5zcGxpdChzZWxmLmluaXRpYWxQcmV2aWV3RGVsaW1pdGVyKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY2hrID0gY29udGVudC5maWx0ZXIoZnVuY3Rpb24gKG4pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gIT09IG51bGw7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjaGsubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEuY29udGVudCA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuY29udGVudCA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5jb25maWcgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmNvbmZpZyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS50YWdzID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS50YWdzID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcHBlbmQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvbnRlbnQubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb250ZW50W2ldKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5jb250ZW50LnB1c2goY29udGVudFtpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvbmZpZy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZ1tpXSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuY29uZmlnLnB1c2goY29uZmlnW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgdGFncy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRhZ3NbaV0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnRhZ3MucHVzaCh0YWdzW2ldKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuY29udGVudCA9IGNvbnRlbnQ7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuY29uZmlnID0gY29uZmlnO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnRhZ3MgPSB0YWdzO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnByZXZpZXdDYWNoZS5jbGVhbihkYXRhKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB1bnNldDogZnVuY3Rpb24gKGluZGV4KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNoayA9IHNlbGYucHJldmlld0NhY2hlLmNvdW50KCksIHJldiA9IHNlbGYucmV2ZXJzZVByZXZpZXdPcmRlcjtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIWNoaykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChjaGsgPT09IDEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YS5jb250ZW50ID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYucHJldmlld0NhY2hlLmRhdGEuY29uZmlnID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYucHJldmlld0NhY2hlLmRhdGEudGFncyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmluaXRpYWxQcmV2aWV3ID0gW107XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuaW5pdGlhbFByZXZpZXdDb25maWcgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld1RodW1iVGFncyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYucHJldmlld0NhY2hlLmRhdGEuY29udGVudCA9ICRoLnNwbGljZUFycmF5KHNlbGYucHJldmlld0NhY2hlLmRhdGEuY29udGVudCwgaW5kZXgsIHJldik7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YS5jb25maWcgPSAkaC5zcGxpY2VBcnJheShzZWxmLnByZXZpZXdDYWNoZS5kYXRhLmNvbmZpZywgaW5kZXgsIHJldik7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YS50YWdzID0gJGguc3BsaWNlQXJyYXkoc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YS50YWdzLCBpbmRleCwgcmV2KTtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9ICQuZXh0ZW5kKHRydWUsIHt9LCBzZWxmLnByZXZpZXdDYWNoZS5kYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnByZXZpZXdDYWNoZS5jbGVhbihkYXRhKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBvdXQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9ICcnLCBjYXB0aW9uLCBsZW4gPSBzZWxmLnByZXZpZXdDYWNoZS5jb3VudCgpLCBpLCBjb250ZW50O1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChsZW4gPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtjb250ZW50OiAnJywgY2FwdGlvbjogJyd9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCA9IHNlbGYucHJldmlld0NhY2hlLmdldChpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCA9IHNlbGYucmV2ZXJzZVByZXZpZXdPcmRlciA/IChjb250ZW50ICsgaHRtbCkgOiAoaHRtbCArIGNvbnRlbnQpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjYXB0aW9uID0gc2VsZi5fZ2V0TXNnU2VsZWN0ZWQobGVuKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge2NvbnRlbnQ6IGh0bWwsIGNhcHRpb246IGNhcHRpb259O1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIGZvb3RlcjogZnVuY3Rpb24gKGksIGlzRGlzYWJsZWQsIHNpemUpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IHNlbGYucHJldmlld0NhY2hlLmRhdGEgfHwge307XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCRoLmlzRW1wdHkoZGF0YS5jb250ZW50KSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkaC5pc0VtcHR5KGRhdGEuY29uZmlnKSB8fCAkaC5pc0VtcHR5KGRhdGEuY29uZmlnW2ldKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmNvbmZpZ1tpXSA9IHt9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpc0Rpc2FibGVkID0gaXNEaXNhYmxlZCA9PT0gdW5kZWZpbmVkID8gdHJ1ZSA6IGlzRGlzYWJsZWQ7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbmZpZyA9IGRhdGEuY29uZmlnW2ldLCBjYXB0aW9uID0gJGguaWZTZXQoJ2NhcHRpb24nLCBjb25maWcpLCBhLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCA9ICRoLmlmU2V0KCd3aWR0aCcsIGNvbmZpZywgJ2F1dG8nKSwgdXJsID0gJGguaWZTZXQoJ3VybCcsIGNvbmZpZywgZmFsc2UpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXkgPSAkaC5pZlNldCgna2V5JywgY29uZmlnLCBudWxsKSwgZmlsZUlkID0gJGguaWZTZXQoJ2ZpbGVJZCcsIGNvbmZpZywgbnVsbCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZzID0gc2VsZi5maWxlQWN0aW9uU2V0dGluZ3MsIGluaXRQcmV2aWV3U2hvd0RlbCA9IHNlbGYuaW5pdGlhbFByZXZpZXdTaG93RGVsZXRlIHx8IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEluaXRpYWxVcmwgPSAhc2VsZi5pbml0aWFsUHJldmlld0Rvd25sb2FkVXJsID8gJycgOlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld0Rvd25sb2FkVXJsICsgJz9rZXk9JyArIGtleSArIChmaWxlSWQgPyAnJmZpbGVJZD0nICsgZmlsZUlkIDogJycpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkVXJsID0gY29uZmlnLmRvd25sb2FkVXJsIHx8IGRvd25sb2FkSW5pdGlhbFVybCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZEZpbCA9IGNvbmZpZy5maWxlbmFtZSB8fCBjb25maWcuY2FwdGlvbiB8fCAnJyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW5pdFByZXZpZXdTaG93RHdsID0gISEoZFVybCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNEZWwgPSAkaC5pZlNldCgnc2hvd1JlbW92ZScsIGNvbmZpZywgaW5pdFByZXZpZXdTaG93RGVsKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc0R3bCA9ICRoLmlmU2V0KCdzaG93RG93bmxvYWQnLCBjb25maWcsICRoLmlmU2V0KCdzaG93RG93bmxvYWQnLCBmcywgaW5pdFByZXZpZXdTaG93RHdsKSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNabSA9ICRoLmlmU2V0KCdzaG93Wm9vbScsIGNvbmZpZywgJGguaWZTZXQoJ3Nob3dab29tJywgZnMsIHRydWUpKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc0RyZyA9ICRoLmlmU2V0KCdzaG93RHJhZycsIGNvbmZpZywgJGguaWZTZXQoJ3Nob3dEcmFnJywgZnMsIHRydWUpKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlzID0gKHVybCA9PT0gZmFsc2UpICYmIGlzRGlzYWJsZWQ7XHJcbiAgICAgICAgICAgICAgICAgICAgc0R3bCA9IHNEd2wgJiYgY29uZmlnLmRvd25sb2FkVXJsICE9PSBmYWxzZSAmJiAhIWRVcmw7XHJcbiAgICAgICAgICAgICAgICAgICAgYSA9IHNlbGYuX3JlbmRlckZpbGVBY3Rpb25zKGNvbmZpZywgZmFsc2UsIHNEd2wsIHNEZWwsIHNabSwgc0RyZywgZGlzLCB1cmwsIGtleSwgdHJ1ZSwgZFVybCwgZEZpbCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbGYuX2dldExheW91dFRlbXBsYXRlKCdmb290ZXInKS5zZXRUb2tlbnMoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAncHJvZ3Jlc3MnOiBzZWxmLl9yZW5kZXJUaHVtYlByb2dyZXNzKCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICdhY3Rpb25zJzogYSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NhcHRpb24nOiBjYXB0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAnc2l6ZSc6IHNlbGYuX2dldFNpemUoc2l6ZSksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICd3aWR0aCc6IHdpZHRoLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAnaW5kaWNhdG9yJzogJydcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuaW5pdCgpO1xyXG4g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2xlTG9ncykge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChpZCkge1xyXG4gICAgICAgICAgICAgICAgbXNnID0gJ1wiJyArIGlkICsgJ1wiOiAnICsgbXNnO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG1zZyA9ICdib290c3RyYXAtZmlsZWlucHV0OiAnICsgbXNnO1xyXG4gICAgICAgICAgICBpZiAodHlwZW9mIHRva2VucyA9PT0gJ29iamVjdCcpIHtcclxuICAgICAgICAgICAgICAgIG1zZyA9IG1zZy5zZXRUb2tlbnModG9rZW5zKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAod2luZG93LmNvbnNvbGUgJiYgdHlwZW9mIHdpbmRvdy5jb25zb2xlLmxvZyAhPT0gJ3VuZGVmaW5lZCcpIHtcclxuICAgICAgICAgICAgICAgIHdpbmRvdy5jb25zb2xlLmxvZyhtc2cpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgd2luZG93LmFsZXJ0KG1zZyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIF92YWxpZGF0ZTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIHN0YXR1cyA9IHNlbGYuJGVsZW1lbnQuYXR0cigndHlwZScpID09PSAnZmlsZSc7XHJcbiAgICAgICAgICAgIGlmICghc3RhdHVzKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9sb2coJGgubG9nTWVzc2FnZXMuYmFkSW5wdXRUeXBlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gc3RhdHVzO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2Vycm9yc0V4aXN0OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGVyciwgJGVyckxpc3QgPSBzZWxmLiRlcnJvckNvbnRhaW5lci5maW5kKCdsaScpO1xyXG4gICAgICAgICAgICBpZiAoJGVyckxpc3QubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkZXJyID0gJChkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKSkuaHRtbChzZWxmLiRlcnJvckNvbnRhaW5lci5odG1sKCkpO1xyXG4gICAgICAgICAgICAkZXJyLmZpbmQoJy5rdi1lcnJvci1jbG9zZScpLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAkZXJyLmZpbmQoJ3VsJykucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIHJldHVybiAhISQudHJpbSgkZXJyLnRleHQoKSkubGVuZ3RoO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2Vycm9ySGFuZGxlcjogZnVuY3Rpb24gKGV2dCwgY2FwdGlvbikge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGVyciA9IGV2dC50YXJnZXQuZXJyb3IsIHNob3dFcnJvciA9IGZ1bmN0aW9uIChtc2cpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3Nob3dFcnJvcihtc2cucmVwbGFjZSgne25hbWV9JywgY2FwdGlvbikpO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBlcnIuTk9UX0ZPVU5EX0VSUiAqL1xyXG4gICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBlcnIuU0VDVVJJVFlfRVJSICovXHJcbiAgICAgICAgICAgIC8qKiBAbmFtZXNwYWNlIGVyci5OT1RfUkVBREFCTEVfRVJSICovXHJcbiAgICAgICAgICAgIGlmIChlcnIuY29kZSA9PT0gZXJyLk5PVF9GT1VORF9FUlIpIHtcclxuICAgICAgICAgICAgICAgIHNob3dFcnJvcihzZWxmLm1zZ0ZpbGVOb3RGb3VuZCk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyLmNvZGUgPT09IGVyci5TRUNVUklUWV9FUlIpIHtcclxuICAgICAgICAgICAgICAgICAgICBzaG93RXJyb3Ioc2VsZi5tc2dGaWxlU2VjdXJlZCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIuY29kZSA9PT0gZXJyLk5PVF9SRUFEQUJMRV9FUlIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0Vycm9yKHNlbGYubXNnRmlsZU5vdFJlYWRhYmxlKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXJyLmNvZGUgPT09IGVyci5BQk9SVF9FUlIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dFcnJvcihzZWxmLm1zZ0ZpbGVQcmV2aWV3QWJvcnRlZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93RXJyb3Ioc2VsZi5tc2dGaWxlUHJldmlld0Vycm9yKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2FkZEVycm9yOiBmdW5jdGlvbiAobXNnKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGVycm9yID0gc2VsZi4kZXJyb3JDb250YWluZXI7XHJcbiAgICAgICAgICAgIGlmIChtc2cgJiYgJGVycm9yLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgJGVycm9yLmh0bWwoc2VsZi5lcnJvckNsb3NlQnV0dG9uICsgbXNnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJGVycm9yLmZpbmQoJy5rdi1lcnJvci1jbG9zZScpLCAnY2xpY2snLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLnNob3dQcmV2aWV3ICYmICFzZWxmLmdldEZyYW1lcygpLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5jbGVhcigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRlcnJvci5mYWRlT3V0KCdzbG93Jyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSwgc2VsZi5wcm9jZXNzRGVsYXkpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zZXRWYWxpZGF0aW9uRXJyb3I6IGZ1bmN0aW9uIChjc3MpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICBjc3MgPSAoY3NzID8gY3NzICsgJyAnIDogJycpICsgJ2hhcy1lcnJvcic7XHJcbiAgICAgICAgICAgIHNlbGYuJGNvbnRhaW5lci5yZW1vdmVDbGFzcyhjc3MpLmFkZENsYXNzKCdoYXMtZXJyb3InKTtcclxuICAgICAgICAgICAgJGguYWRkQ3NzKHNlbGYuJGNhcHRpb25Db250YWluZXIsICdpcy1pbnZhbGlkJyk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfcmVzZXRFcnJvcnM6IGZ1bmN0aW9uIChmYWRlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGVycm9yID0gc2VsZi4kZXJyb3JDb250YWluZXI7XHJcbiAgICAgICAgICAgIHNlbGYuaXNFcnJvciA9IGZhbHNlO1xyXG4gICAgICAgICAgICBzZWxmLiRjb250YWluZXIucmVtb3ZlQ2xhc3MoJ2hhcy1lcnJvcicpO1xyXG4gICAgICAgICAgICBzZWxmLiRjYXB0aW9uQ29udGFpbmVyLnJlbW92ZUNsYXNzKCdpcy1pbnZhbGlkJyk7XHJcbiAgICAgICAgICAgICRlcnJvci5odG1sKCcnKTtcclxuICAgICAgICAgICAgaWYgKGZhZGUpIHtcclxuICAgICAgICAgICAgICAgICRlcnJvci5mYWRlT3V0KCdzbG93Jyk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkZXJyb3IuaGlkZSgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfc2hvd0ZvbGRlckVycm9yOiBmdW5jdGlvbiAoZm9sZGVycykge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRlcnJvciA9IHNlbGYuJGVycm9yQ29udGFpbmVyLCBtc2c7XHJcbiAgICAgICAgICAgIGlmICghZm9sZGVycykge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5pc0FqYXhVcGxvYWQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFyRmlsZUlucHV0KCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbXNnID0gc2VsZi5tc2dGb2xkZXJzTm90QWxsb3dlZC5yZXBsYWNlKCd7bn0nLCBmb2xkZXJzKTtcclxuICAgICAgICAgICAgc2VsZi5fYWRkRXJyb3IobXNnKTtcclxuICAgICAgICAgICAgc2VsZi5fc2V0VmFsaWRhdGlvbkVycm9yKCk7XHJcbiAgICAgICAgICAgICRlcnJvci5mYWRlSW4oc2VsZi5mYWRlRGVsYXkpO1xyXG4gICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWZ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ICAgICAgICAkZXJyb3IgPSBzZWxmLiRlcnJvckNvbnRhaW5lcjtcclxuICAgICAgICAgICAgbXNnID0gJzxsaT4nICsgbXNnICsgJzwvbGk+JztcclxuICAgICAgICAgICAgaWYgKCRlcnJvci5maW5kKCd1bCcpLmxlbmd0aCA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fYWRkRXJyb3IoJzx1bD4nICsgbXNnICsgJzwvdWw+Jyk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkZXJyb3IuZmluZCgndWwnKS5hcHBlbmQobXNnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLmlzRXJyb3IgPSB0cnVlO1xyXG4gICAgICAgICAgICBzZWxmLl91cGRhdGVGaWxlRGV0YWlscygwKTtcclxuICAgICAgICAgICAgJGVycm9yLmZhZGVJbihzZWxmLmZhZGVEZWxheSk7XHJcbiAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlZXJyb3InLCBbcGFyYW1zLCBtc2ddKTtcclxuICAgICAgICAgICAgc2VsZi5fY2xlYXJGaWxlSW5wdXQoKTtcclxuICAgICAgICAgICAgc2VsZi5fc2V0VmFsaWRhdGlvbkVycm9yKCk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfcGFyc2VFcnJvcjogZnVuY3Rpb24gKG9wZXJhdGlvbiwganFYSFIsIGVycm9yVGhyb3duLCBmaWxlTmFtZSkge1xyXG4gICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBqcVhIUi5yZXNwb25zZUpTT04gKi9cclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBlcnJNc2cgPSAkLnRyaW0oZXJyb3JUaHJvd24gKyAnJyksIHRleHRQcmUsXHJcbiAgICAgICAgICAgICAgICB0ZXh0ID0ganFYSFIucmVzcG9uc2VKU09OICE9PSB1bmRlZmluZWQgJiYganFYSFIucmVzcG9uc2VKU09OLmVycm9yICE9PSB1bmRlZmluZWQgP1xyXG4gICAgICAgICAgICAgICAgICAgIGpxWEhSLnJlc3BvbnNlSlNPTi5lcnJvciA6IGpxWEhSLnJlc3BvbnNlVGV4dDtcclxuICAgICAgICAgICAgaWYgKHNlbGYuY2FuY2VsbGluZyAmJiBzZWxmLm1zZ1VwbG9hZEFib3J0ZWQpIHtcclxuICAgICAgICAgICAgICAgIGVyck1zZyA9IHNlbGYubXNnVXBsb2FkQWJvcnRlZDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2VsZi5zaG93QWpheEVycm9yRGV0YWlscyAmJiB0ZXh0KSB7XHJcbiAgICAgICAgICAgICAgICB0ZXh0ID0gJC50cmltKHRleHQucmVwbGFjZSgvXFxuXFxzKlxcbi9nLCAnXFxuJykpO1xyXG4gICAgICAgICAgICAgICAgdGV4dFByZSA9IHRleHQubGVuZ3RoID8gJzxwcmU+JyArIHRleHQgKyAnPC9wcmU+JyA6ICcnO1xyXG4gICAgICAgICAgICAgICAgZXJyTXNnICs9IGVyck1zZyA/IHRleHRQcmUgOiB0ZXh0O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghZXJyTXNnKSB7XHJcbiAgICAgICAgICAgICAgICBlcnJNc2cgPSBzZWxmLm1zZ0FqYXhFcnJvci5yZXBsYWNlKCd7b3BlcmF0aW9ufScsIG9wZXJhdGlvbik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5jYW5jZWxsaW5nID0gZmFsc2U7XHJcbiAgICAgICAgICAgIHJldHVybiBmaWxlTmFtZSA/ICc8Yj4nICsgZmlsZU5hbWUgKyAnOiA8L2I+JyArIGVyck1zZyA6IGVyck1zZztcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9wYXJzZUZpbGVUeXBlOiBmdW5jdGlvbiAodHlwZSwgbmFtZSkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGlzVmFsaWQsIHZUeXBlLCBjYXQsIGksIHR5cGVzID0gc2VsZi5hbGxvd2VkUHJldmlld1R5cGVzIHx8IFtdO1xyXG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gJ2FwcGxpY2F0aW9uL3RleHQtcGxhaW4nKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RleHQnO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCB0eXBlcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgY2F0ID0gdHlwZXNbaV07XHJcbiAgICAgICAgICAgICAgICBpc1ZhbGlkID0gc2VsZi5maWxlVHlwZVNldHRpbmdzW2NhdF07XHJcbiAgICAgICAgICAgICAgICB2VHlwZSA9IGlzVmFsaWQodHlwZSwgbmFtZSkgPyBjYXQgOiAnJztcclxuICAgICAgICAgICAgICAgIGlmICghJGguaXNFbXB0eSh2VHlwZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlR5cGU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuICdvdGhlcic7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfZ2V0UHJldmlld0ljb246IGZ1bmN0aW9uIChmbmFtZSkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGV4dCwgb3V0ID0gbnVsbDtcclxuICAgICAgICAgICAgaWYgKGZuYW1lICYmIGZuYW1lLmluZGV4T2YoJy4nKSA+IC0xKSB7XHJcbiAgICAgICAgICAgICAgICBleHQgPSBmbmFtZS5zcGxpdCgnLicpLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYucHJldmlld0ZpbGVJY29uU2V0dGluZ3MpIHtcclxuICAgICAgICAgICAgICAgICAgICBvdXQgPSBzZWxmLnByZXZpZXdGaWxlSWNvblNldHRpbmdzW2V4dF0gfHwgc2VsZi5wcmV2aWV3RmlsZUljb25TZXR0aW5nc1tleHQudG9Mb3dlckNhc2UoKV0gfHwgbnVsbDtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLnByZXZpZXdGaWxlRXh0U2V0dGluZ3MpIHtcclxuICAgICAgICAgICAgICAgICAgICAkLmVhY2goc2VsZi5wcmV2aWV3RmlsZUV4dFNldHRpbmdzLCBmdW5jdGlvbiAoa2V5LCBmdW5jKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLnByZXZpZXdGaWxlSWNvblNldHRpbmdzW2tleV0gJiYgZnVuYyhleHQpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXQgPSBzZWxmLnByZXZpZXdGaWxlSWNvblNldHRpbmdzW2tleV07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL25vaW5zcGVjdGlvbiBVbm5lY2Vzc2FyeVJldHVyblN0YXRlbWVudEpTXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gb3V0IHx8IHNlbGYucHJldmlld0ZpbGVJY29uO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3BhcnNlRmlsZVByZXZpZXdJY29uOiBmdW5jdGlvbiAoY29udGVudCwgZm5hbWUpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBpY24gPSBzZWxmLl9nZXRQcmV2aWV3SWNvbihmbmFtZSksIG91dCA9IGNvbnRlbnQ7XHJcbiAgICAgICAgICAgIGlmIChvdXQuaW5kZXhPZigne3ByZXZpZXdGaWxlSWNvbn0nKSA+IC0xKSB7XHJcbiAgICAgICAgICAgICAgICBvdXQgPSBvdXQuc2V0VG9rZW5zKHsncHJldmlld0ZpbGVJY29uQ2xhc3MnOiBzZWxmLnByZXZpZXdGaWxlSWNvbkNsYXNzLCAncHJldmlld0ZpbGVJY29uJzogaWNufSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG91dDtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9yYWlzZTogZnVuY3Rpb24gKGV2ZW50LCBwYXJhbXMpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBlID0gJC5FdmVudChldmVudCk7XHJcbiAgICAgICAgICAgIGlmIChwYXJhbXMgIT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kZWxlbWVudC50cmlnZ2VyKGUsIHBhcmFtcyk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRlbGVtZW50LnRyaWdnZXIoZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGUuaXNEZWZhdWx0UHJldmVudGVkKCkgfHwgZS5yZXN1bHQgPT09IGZhbHNlKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc3dpdGNoIChldmVudCkge1xyXG4gICAgICAgICAgICAgICAgLy8gaWdub3JlIHRoZXNlIGV2ZW50c1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnZmlsZWJhdGNodXBsb2FkY29tcGxldGUnOlxyXG4gICAgICAgICAgICAgICAgY2FzZSAnZmlsZWJhdGNodXBsb2Fkc3VjY2Vzcyc6XHJcbiAgICAgICAgICAgICAgICBjYXNlICdmaWxldXBsb2FkZWQnOlxyXG4gICAgICAgICAgICAgICAgY2FzZSAnZmlsZWNsZWFyJzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2ZpbGVjbGVhcmVkJzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2ZpbGVyZXNldCc6XHJcbiAgICAgICAgICAgICAgICBjYXNlICdmaWxlZXJyb3InOlxyXG4gICAgICAgICAgICAgICAgY2FzZSAnZmlsZWZvbGRlcmVycm9yJzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2ZpbGV1cGxvYWRlcnJvcic6XHJcbiAgICAgICAgICAgICAgICBjYXNlICdmaWxlYmF0Y2h1cGxvYWRlcnJvcic6XHJcbiAgICAgICAgICAgICAgICBjYXNlICdmaWxlZGVsZXRlZXJyb3InOlxyXG4gICAgICAgICAgICAgICAgY2FzZSAnZmlsZWN1c3RvbWVycm9yJzpcclxuICAgICAgICAgICAgICAgIGNhc2UgJ2ZpbGVzdWNjZXNzcmVtb3ZlJzpcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgIC8vIHJlY2VpdmUgZGF0YSByZXNwb25zZSB2aWEgYGZpbGVjdXN0b21lcnJvcmAgZXZlbnRgXHJcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi5hamF4QWJvcnRlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmFqYXhBYm9ydGVkID0gZS5yZXN1bHQ7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2xpc3RlbkZ1bGxTY3JlZW46IGZ1bmN0aW9uIChpc0Z1bGxTY3JlZW4pIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCAkbW9kYWwgPSBzZWxmLiRtb2RhbCwgJGJ0bkZ1bGwsICRidG5Cb3JkO1xyXG4gICAgICAgICAgICBpZiAoISRtb2RhbCB8fCAhJG1vZGFsLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAg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Vab29tRGlhbG9nKCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICRidG5Cb3JkLnJlbW92ZUNsYXNzKCdhY3RpdmUnKS5hdHRyKCdhcmlhLXByZXNzZWQnLCAnZmFsc2UnKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2xpc3RlbjogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRlbCA9IHNlbGYuJGVsZW1lbnQsICRmb3JtID0gc2VsZi4kZm9ybSwgJGNvbnQgPSBzZWxmLiRjb250YWluZXIsIGZ1bGxTY3JlZW5FdmVudHM7XHJcbiAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJGVsLCAnY2xpY2snLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCRlbC5oYXNDbGFzcygnZmlsZS1uby1icm93c2UnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkZWwuZGF0YSgnem9uZUNsaWNrZWQnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkZWwuZGF0YSgnem9uZUNsaWNrZWQnLCBmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJGVsLCAnY2hhbmdlJywgJC5wcm94eShzZWxmLl9jaGFuZ2UsIHNlbGYpKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYuc2hvd0Jyb3dzZSkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5faGFuZGxlcihzZWxmLiRidG5GaWxlLCAnY2xpY2snLCAkLnByb3h5KHNlbGYuX2Jyb3dzZSwgc2VsZikpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJGNvbnQuZmluZCgnLmZpbGVpbnB1dC1yZW1vdmU6bm90KFtkaXNhYmxlZF0pJyksICdjbGljaycsICQucHJveHkoc2VsZi5jbGVhciwgc2VsZikpO1xyXG4gICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCRjb250LmZpbmQoJy5maWxlaW5wdXQtY2FuY2VsJyksICdjbGljaycsICQucHJveHkoc2VsZi5jYW5jZWwsIHNlbGYpKTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkY29udC5maW5kKCcuZmlsZWlucHV0LXBhdXNlJyksICdjbGljaycsICQucHJveHkoc2VsZi5wYXVzZSwgc2VsZikpO1xyXG4gICAgICAgICAgICBzZWxmLl9pbml0RHJhZ0Ryb3AoKTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkZm9ybSwgJ3Jlc2V0JywgJC5wcm94eShzZWxmLmNsZWFyLCBzZWxmKSk7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5pc0FqYXhVcGxvYWQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJGZvcm0sICdzdWJtaXQnLCAkLnByb3h5KHNlbGYuX3N1Ym1pdEZvcm0sIHNlbGYpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9oYW5kbGVyKHNlbGYuJGNvbnRhaW5lci5maW5kKCcuZmlsZWlucHV0LXVwbG9hZCcpLCAnY2xpY2snLCAkLnByb3h5KHNlbGYuX3VwbG9hZENsaWNrLCBzZWxmKSk7XHJcbiAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJCh3aW5kb3cpLCAncmVzaXplJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fbGlzdGVuRnVsbFNjcmVlbihzY3J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sdHMucHJldmlld1NldHRpbmdzKSwgc2VsO1xyXG4gICAgICAgICAgICAkLmVhY2goY29uZmlnLCBmdW5jdGlvbiAoY2F0LCBzZXR0aW5ncykge1xyXG4gICAgICAgICAgICAgICAgc2VsID0gJy5maWxlLXByZXZpZXctZnJhbWUgLmZpbGUtcHJldmlldy0nICsgY2F0O1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kcHJldmlldy5maW5kKHNlbCArICcua3YtcHJldmlldy1kYXRhLCcgKyBzZWwgKyAnIC5rdi1wcmV2aWV3LWRhdGEnKS5jc3Moc2V0dGluZ3MpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zY2FuRHJvcHBlZEl0ZW1zOiBmdW5jdGlvbiAoaXRlbSwgZmlsZXMsIHBhdGgpIHtcclxuICAgICAgICAgICAgcGF0aCA9IHBhdGggfHwgJyc7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgaSwgZGlyUmVhZGVyLCByZWFkRGlyLCBlcnJvckhhbmRsZXIgPSBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fbG9nKCRoLmxvZ01lc3NhZ2VzLmJhZERyb3BwZWRGaWxlcyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9sb2coZSk7XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGlmIChpdGVtLmlzRmlsZSkge1xyXG4gICAgICAgICAgICAgICAgaXRlbS5maWxlKGZ1bmN0aW9uIChmaWxlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZXMucHVzaChmaWxlKTtcclxuICAgICAgICAgICAgICAgIH0sIGVycm9ySGFuZGxlcik7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaXRlbS5pc0RpcmVjdG9yeSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGRpclJlYWRlciA9IGl0ZW0uY3JlYXRlUmVhZGVyKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZERpciA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZGlyUmVhZGVyLnJlYWRFbnRyaWVzKGZ1bmN0aW9uIChlbnRyaWVzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW50cmllcyAmJiBlbnRyaWVzLmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZW50cmllcy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zY2FuRHJvcHBlZEl0ZW1zKGVudHJpZXNbaV0sIGZpbGVzLCBwYXRoICsgaXRlbS5uYW1lICsgJy8nKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVjdXJzaXZlbHkgY2FsbCByZWFkRGlyKCkgYWdhaW4sIHNpbmNlIGJyb3dzZXIgY2FuIG9ubHkgaGFuZGxlIGZpcnN0IDEwMCBlbnRyaWVzLlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWREaXIoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBlcnJvckhhbmRsZXIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVhZERpcigpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2luaXREcmFnRHJvcDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICR6b25lID0gc2VsZi4kZHJvcFpvbmU7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmRyb3Bab25lRW5hYmxlZCAmJiBzZWxmLnNob3dQcmV2aWV3KSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCR6b25lLCAnZHJhZ2VudGVyIGRyYWdvdmVyJywgJC5wcm94eShzZWxmLl96b25lRHJhZ0VudGVyLCBzZWxmKSk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCR6b25lLCAnZHJhZ2xlYXZlJywgJC5wcm94eShzZWxmLl96b25lRHJhZ0xlYXZlLCBzZWxmKSk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCR6b25lLCAnZHJvcCcsICQucHJveHkoc2VsZi5fem9uZURyb3AsIHNlbGYpKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJChkb2N1bWVudCksICdkcmFnZW50ZXIgZHJhZ292ZXIgZHJvcCcsIHNlbGYuX3pvbmVEcmFnRHJvcEluaXQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfem9uZURyYWdEcm9wSW5pdDogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3pvbmVEcmFnRW50ZXI6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgZGF0YVRyYW5zZmVyID0gZS5vcmlnaW5hbEV2ZW50LmRhdGFUcmFuc2ZlcixcclxuICAgICAgICAgICAgICAgIGhhc0ZpbGVzID0gJC5pbkFycmF5KCdGaWxlcycsIGRhdGFUcmFuc2Zlci50eXBlcykgPiAtMTtcclxuICAgICAgICAgICAgc2VsZi5fem9uZURyYWdEcm9wSW5pdChlKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYuaXNEaXNhYmxlZCB8fCAhaGFzRmlsZXMpIHtcclxuICAgICAgICAgICAgICAgIGUub3JpZ2luYWxFdmVudC5kYXRhVHJhbnNmZXIuZWZmZWN0QWxsb3dlZCA9ICdub25lJztcclxuICAgICAgICAgICAgICAgIGUub3JpZ2luYWxFdmVudC5kYXRhVHJhbnNmZXIuZHJvcEVmZmVjdCA9ICdub25lJztcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2VsZi5fcmFpc2UoJ2ZpbGVEcmFnRW50ZXInLCB7J3NvdXJjZUV2ZW50JzogZSwgJ2ZpbGVzJzogZGF0YVRyYW5zZmVyLnR5cGVzLkZpbGVzfSkpIHtcclxuICAgICAgICAgICAgICAgICRoLmFkZENzcyhzZWxmLiRkcm9wWm9uZSwgJ2ZpbGUtaGlnaGxpZ2h0ZWQnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3pvbmVEcmFnTGVhdmU6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgc2VsZi5fem9uZURyYWdEcm9wSW5pdChlKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYuaXNEaXNhYmxlZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLl9yYWlzZSgnZmlsZURyYWdMZWF2ZScsIHsnc291cmNlRXZlbnQnOiBlfSkpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuJGRyb3Bab25lLnJlbW92ZUNsYXNzKCdmaWxlLWhpZ2hsaWdodGVkJyk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgfSxcclxuICAgICAgICBfem9uZURyb3A6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIC8qKiBAbmFtZXNwYWNlIGUub3JpZ2luYWxFdmVudC5kYXRhVHJhbnNmZXIgKi9cclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBpLCAkZWwgPSBzZWxmLiRlbGVtZW50LCBkYXRhVHJhbnNmZXIgPSBlLm9yaWdpbmFsRXZlbnQuZGF0YVRyYW5zZmVyLFxyXG4gICAgICAgICAgICAgICAgZmlsZXMgPSBkYXRhVHJhbnNmZXIuZmlsZXMsIGl0ZW1zID0gZGF0YVRyYW5zZmVyLml0ZW1zLCBmb2xkZXJzID0gJGguZ2V0RHJhZ0Ryb3BGb2xkZXJzKGl0ZW1zKSxcclxuICAgICAgICAgICAgICAgIHByb2Nlc3NGaWxlcyA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYuaXNBamF4VXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuY2hhbmdlVHJpZ2dlcmVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGVsLmdldCgwKS5maWxlcyA9IGZpbGVzO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuY2hhbmdlVHJpZ2dlcmVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZWwudHJpZ2dlcignY2hhbmdlJyArIHNlbGYubmFtZXNwYWNlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2VsZi5wcm9jZXNzRGVsYXkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2NoYW5nZShlLCBmaWxlcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuJGRyb3Bab25lLnJlbW92ZUNsYXNzKCdmaWxlLWhpZ2hsaWdodGVkJyk7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmlzRGlzYWJsZWQgfHwgJGguaXNFbXB0eShmaWxlcykpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoIXNlbGYuX3JhaXNlKCdmaWxlRHJhZ0Ryb3AnLCB7J3NvdXJjZUV2ZW50JzogZSwgJ2ZpbGVzJzogZmlsZXN9KSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChmb2xkZXJzID4gMCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFzZWxmLmlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3Nob3dGb2xkZXJFcnJvcihmb2xkZXJzKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBmaWxlcyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGl0ZW1zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW0gPSBpdGVtc1tpXS53ZWJraXRHZXRBc0VudHJ5KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGl0ZW0pIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2NhbkRyb3BwZWRJdGVtcyhpdGVtLCBmaWxlcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc0ZpbGVzKCk7XHJcbiAgICAgICAgICAgICAgICB9LCA1MDApO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgcHJvY2Vzc0ZpbGVzKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIF91cGxvYWRDbGljazogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCAkYnRuID0gc2VsZi4kY29udGFpbmVyLmZpbmQoJy5maWxlaW5wdXQtdXBsb2FkJyksICRmb3JtLFxyXG4gICAgICAgICAgICAgICAgaXNFbmFibGVkID0gISRidG4uaGFzQ2xhc3MoJ2Rpc2FibGVkJykgJiYgJGguaXNFbXB0eSgkYnRuLmF0dHIoJ2Rpc2FibGVkJykpO1xyXG4gICAgICAgICAgICBpZiAoZSAmJiBlLmlzRGVmYXVsdFByZXZlbnRlZCgpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKCFzZWxmLmlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGlzRW5hYmxlZCAmJiAkYnRuLmF0dHIoJ3R5cGUnKSAhPT0gJ3N1Ym1pdCcpIHtcclxuICAgICAgICAgICAgICAgICAgICAkZm9ybSA9ICRidG4uY2xvc2VzdCgnZm9ybScpO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGRvd25ncmFkZSB0byBub3JtYWwgZm9ybSBzdWJtaXQgaWYgcG9zc2libGVcclxuICAgICAgICAgICAgICAgICAgICBpZiAoJGZvcm0ubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRmb3JtLnRyaWdnZXIoJ3N1Ym1pdCcpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICBpZiAoaXNFbmFibGVkKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLnVwbG9hZCgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfc3VibWl0Rm9ybTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIHJldHVybiBzZWxmLl9pc0ZpbGVTZWxlY3Rpb25WYWxpZCgpICYmICFzZWxmLl9hYm9ydCh7fSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfY2xlYXJQcmV2aWV3OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcyxcclxuICAgICAgICAgICAgICAgICR0aHVtYnMgPSBzZWxmLnNob3dVcGxvYWRlZFRodW1icyA/IHNlbGYuZ2V0RnJhbWVzKCc6bm90KC5maWxlLXByZXZpZXctc3VjY2VzcyknKSA6IHNlbGYuZ2V0RnJhbWVzKCk7XHJcbiAgICAgICAgICAgICR0aHVtYnMuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgJHRodW1iID0gJCh0aGlzKSwgaWQgPSAkdGh1bWIuYXR0cignaWQnKSwgJHpvb20gPSBzZWxmLl9nZXRab29tKGlkKTtcclxuICAgICAgICAgICAgICAgICR0aHVtYi5yZW1vdmUoKTtcclxuICAgICAgICAgICAgICAgICRoLmNsZWFuWm9vbUNhY2hlKCR6b29tKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5nZXRGcmFtZXMoKS5sZW5ndGggfHwgIXNlbGYuc2hvd1ByZXZpZXcpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3Jlc2V0VXBsb2FkKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fdmFsaWRhdGVEZWZhdWx0UHJldmlldygpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2luaXRTb3J0YWJsZTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRlbCA9IHNlbGYuJHByZXZpZXcsIHNldHRpbmdzLCBzZWxlY3RvciA9ICcuJyArICRoLlNPUlRfQ1NTLFxyXG4gICAgICAgICAgICAgICAgcmV2ID0gc2VsZi5yZXZlcnNlUHJldmlld09yZGVyO1xyXG4gICAgICAgICAgICBpZiAoIXdpbmRvdy5LdlNvcnRhYmxlIHx8ICRlbC5maW5kKHNlbGVjdG9yKS5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAvL25vaW5zcGVjdGlvbiBKU1VudXNlZEdsb2JhbFN5bWJvbHNcclxuICAgICAgICAgICAgc2V0dGluZ3MgPSB7XHJcbiAgICAgICAgICAgICAgICBoYW5kbGU6ICcuZHJhZy1oYW5kbGUtaW5pdCcsXHJcbiAgICAgICAgICAgICAgICBkYXRhSWRBdHRyOiAnZGF0YS1wcmV2aWV3LWlkJyxcclxuICAgICAgICAgICAgICAgIHNjcm9sbDogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBkcmFnZ2FibGU6IHNlbGVjdG9yLFxyXG4gICAgICAgICAgICAgICAgb25Tb3J0OiBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBvbGRJbmRleCA9IGUub2xkSW5kZXgsIG5ld0luZGV4ID0gZS5uZXdJbmRleCwgaSA9IDA7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlldyA9ICRoLm1vdmVBcnJheShzZWxmLmluaXRpYWxQcmV2aWV3LCBvbGRJbmRleCwgbmV3SW5kZXgsIHJldik7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld0NvbmZpZyA9ICRoLm1vdmVBcnJheShzZWxmLmluaXRpYWxQcmV2aWV3Q29uZmlnLCBvbGRJbmRleCwgbmV3SW5kZXgsIHJldik7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuaW5pdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuZ2V0RnJhbWVzKCcuZmlsZS1wcmV2aWV3LWluaXRpYWwnKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hdHRyKCdkYXRhLWZpbGVpbmRleCcsICRoLklOSVRfRkxBRyArIGkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpKys7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVzb3J0ZWQnLCB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpZXdJZDogJChlLml0ZW0pLmF0dHIoJ2lkJyksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICdvbGRJbmRleCc6IG9sZEluZGV4LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAnbmV3SW5kZXgnOiBuZXdJbmRleCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2s6IHNlbGYuaW5pdGlhbFByZXZpZXdDb25maWdcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgaWYgKCRlbC5kYXRhKCdrdnNvcnRhYmxlJykpIHtcclxuICAgICAgICAgICAgICAgICRlbC5rdnNvcnRhYmxlKCdkZXN0cm95Jyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgJC5leHRlbmQodHJ1ZSwgc2V0dGluZ3MsIHNlbGYuZmlsZUFjdGlvblNldHRpbmdzLmRyYWdTZXR0aW5ncyk7XHJcbiAgICAgICAgICAgICRlbC5rdnNvcnRhYmxlKHNldHRpbmdzKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zZXRQcmV2aWV3Q29udGVudDogZnVuY3Rpb24gKGNvbnRlbnQpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICBzZWxmLiRwcmV2aWV3Lmh0bWwoY29udGVudCk7XHJcbiAgICAgICAgICAgIHNlbGYuX2F1dG9GaXRDb250ZW50KCk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdFByZXZpZXdJbWFnZU9yaWVudGF0aW9uczogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGkgPSAwO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYuYXV0b09yaWVudEltYWdlSW5pdGlhbCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuZ2V0RnJhbWVzKCcuZmlsZS1wcmV2aWV3LWluaXRpYWwnKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciAkdGh1bWIgPSAkKHRoaXMpLCAkaW1nLCAkem9vbUltZywgaWQsIGNvbmZpZyA9IHNlbGYuaW5pdGlhbFByZXZpZXdDb25maWdbaV07XHJcbiAgICAgICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBjb25maWcuZXhpZiAqL1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZyAmJiBjb25maWcuZXhpZiAmJiBjb25maWcuZXhpZi5PcmllbnRhdGlvbikge1xyXG4gICAgICAgICAgICAgICAgICAgIGlkID0gJHRodW1iLmF0dHIoJ2lkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgJGltZyA9ICR0aHVtYi5maW5kKCc+Lmt2LWZpbGUtY29udGVudCBpbWcnKTtcclxuICAgICAgICAgICAgICAgICAgICAkem9vbUltZyA9IHNlbGYuX2dldFpvb20oaWQsICcgPi5rdi1maWxlLWNvbnRlbnQgaW1nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zZXRJbWFnZU9yaWVudGF0aW9uKCRpbWcsICR6b29tSW1nLCBjb25maWcuZXhpZi5PcmllbnRhdGlvbiwgJHRodW1iKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGkrKztcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdFByZXZpZXc6IGZ1bmN0aW9uIChpc0luaXQpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBjYXAgPSBzZWxmLmluaXRpYWxDYXB0aW9uIHx8ICcnLCBvdXQ7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5wcmV2aWV3Q2FjaGUuY291bnQodHJ1ZSkpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFyUHJldmlldygpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGlzSW5pdCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldENhcHRpb24oY2FwKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5pdENhcHRpb24oKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBvdXQgPSBzZWxmLnByZXZpZXdDYWNoZS5vdXQoKTtcclxuICAgICAgICAgICAgY2FwID0gaXNJbml0ICYmIHNlbGYuaW5pdGlhbENhcHRpb24gPyBzZWxmLmluaXRpYWxDYXB0aW9uIDogb3V0LmNhcHRpb247XHJcbiAgICAgICAgICAgIHNlbGYuX3NldFByZXZpZXdDb250ZW50KG91dC5jb250ZW50KTtcclxuICAgICAgICAgICAgc2VsZi5fc2V0SW5pdFRodW1iQXR0cigpO1xyXG4gICAgICAgICAgICBzZWxmLl9zZXRDYXB0aW9uKGNhcCk7XHJcbiAgICAgICAgICAgIHNlbGYuX2luaXRTb3J0YWJsZSgpO1xyXG4gICAgICAgICAgICBpZiAoISRoLmlzRW1wdHkob3V0LmNvbnRlbnQpKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRjb250YWluZXIucmVtb3ZlQ2xhc3MoJ2ZpbGUtaW5wdXQtbmV3Jyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5faW5pdFByZXZpZXdJbWFnZU9yaWVudGF0aW9ucygpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2dldFpvb21CdXR0b246IGZ1bmN0aW9uICh0eXBlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgbGFiZWwgPSBzZWxmLnByZXZpZXdab29tQnV0dG9uSWNvbnNbdHlwZV0sIGNzcyA9IHNlbGYucHJldmlld1pvb21CdXR0b25DbGFzc2VzW3R5cGVdLFxyXG4gICAgICAgICAgICAgICAgdGl0bGUgPSAnIHRpdGxlPVwiJyArIChzZWxmLnByZXZpZXdab29tQnV0dG9uVGl0bGVzW3R5cGVdIHx8ICcnKSArICdcIiAnLFxyXG4gICAgICAgICAgICAgICAgcGFyYW1zID0gdGl0bGUgKyAodHlwZSA9PT0gJ2Nsb3NlJyA/ICcgZGF0YS1kaXNtaXNzPVwibW9kYWxcIiBhcmlhLWhpZGRlbj1cInRydWVcIicgOiAnJyk7XHJcbiAgICAgICAgICAgIGlmICh0eXBlID09PSAnZnVsbHNjcmVlbicgfHwgdHlwZSA9PT0gJ2JvcmRlcmxlc3MnIHx8IHR5cGUgPT09ICd0b2dnbGVoZWFkZXInKSB7XHJcbiAgICAgICAgICAgICAgIC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Fpvb21CdXR0b24oJ2JvcmRlcmxlc3MnKSxcclxuICAgICAgICAgICAgICAgICdjbG9zZSc6IHNlbGYuX2dldFpvb21CdXR0b24oJ2Nsb3NlJylcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfbGlzdGVuTW9kYWxFdmVudDogZnVuY3Rpb24gKGV2ZW50KSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJG1vZGFsID0gc2VsZi4kbW9kYWwsIGdldFBhcmFtcyA9IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZUV2ZW50OiBlLFxyXG4gICAgICAgICAgICAgICAgICAgIHByZXZpZXdJZDogJG1vZGFsLmRhdGEoJ3ByZXZpZXdJZCcpLFxyXG4gICAgICAgICAgICAgICAgICAgIG1vZGFsOiAkbW9kYWxcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICRtb2RhbC5vbihldmVudCArICcuYnMubW9kYWwnLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgICAgICAgICAgdmFyICRidG5GdWxsID0gJG1vZGFsLmZpbmQoJy5idG4tZnVsbHNjcmVlbicpLCAkYnRuQm9yZCA9ICRtb2RhbC5maW5kKCcuYnRuLWJvcmRlcmxlc3MnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlem9vbScgKyBldmVudCwgZ2V0UGFyYW1zKGUpKTtcclxuICAgICAgICAgICAgICAgIGlmIChldmVudCA9PT0gJ3Nob3duJykge1xyXG4gICAgICAgICAgICAgICAgICAgICRidG5Cb3JkLnJlbW92ZUNsYXNzKCdhY3RpdmUnKS5hdHRyKCdhcmlhLXByZXNzZWQnLCAnZmFsc2UnKTtcclxuICAgICAgICAgICAgICAgICAgICAkYnRuRnVsbC5yZW1vdmVDbGFzcygnYWN0aXZlJykuYXR0cignYXJpYS1wcmVzc2VkJywgJ2ZhbHNlJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCRtb2RhbC5oYXNDbGFzcygnZmlsZS16b29tLWZ1bGxzY3JlZW4nKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9tYXhpbWl6ZVpvb21EaWFsb2coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRoLmNoZWNrRnVsbFNjcmVlbigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYnRuRnVsbC5hZGRDbGFzcygnYWN0aXZlJykuYXR0cignYXJpYS1wcmVzc2VkJywgJ3RydWUnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRidG5Cb3JkLmFkZENsYXNzKCdhY3RpdmUnKS5hdHRyKCdhcmlhLXByZXNzZWQnLCAndHJ1ZScpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9pbml0Wm9vbTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRkaWFsb2csIG1vZGFsTWFpbiA9IHNlbGYuX2dldExheW91dFRlbXBsYXRlKCdtb2RhbE1haW4nKSwgbW9kYWxJZCA9ICcjJyArICRoLk1PREFMX0lEO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYuc2hvd1ByZXZpZXcpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLiRtb2RhbCA9ICQobW9kYWxJZCk7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi4kbW9kYWwgfHwgIXNlbGYuJG1vZGFsLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgJGRpYWxvZyA9ICQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2JykpLmh0bWwobW9kYWxNYWluKS5pbnNlcnRBZnRlcihzZWxmLiRjb250YWluZXIpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kbW9kYWwgPSAkKG1vZGFsSWQpLmluc2VydEJlZm9yZSgkZGlhbG9nKTtcclxuICAgICAgICAgICAgICAgICRkaWFsb2cucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgJGguaW5pdE1vZGFsKHNlbGYuJG1vZGFsKTtcclxuICAgICAgICAgICAgc2VsZi4kbW9kYWwuaHRtbChzZWxmLl9nZXRNb2RhbENvbnRlbnQoKSk7XHJcbiAgICAgICAgICAgICQuZWFjaCgkaC5NT0RBTF9FVkVOVFMsIGZ1bmN0aW9uIChrZXksIGV2ZW50KSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9saXN0ZW5Nb2RhbEV2ZW50KGV2ZW50KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdFpvb21CdXR0b25zOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgcHJldmlld0lkID0gc2VsZi4kbW9kYWwuZGF0YSgncHJldmlld0lkJykgfHwgJycsICRmaXJzdCwgJGxhc3QsXHJcbiAgICAgICAgICAgICAgICB0aHVtYnMgPSBzZWxmLmdldEZyYW1lcygpLnRvQXJyYXkoKSwgbGVuID0gdGh1bWJzLmxlbmd0aCwgJHByZXYgPSBzZWxmLiRtb2RhbC5maW5kKCcuYnRuLXByZXYnKSxcclxuICAgICAgICAgICAgICAgICRuZXh0ID0gc2VsZi4kbW9kYWwuZmluZCgnLmJ0bi1uZXh0Jyk7XHJcbiAgICAgICAgICAgIGlmICh0aHVtYnMubGVuZ3RoIDwgMikge1xyXG4gICAgICAgICAgICAgICAgJHByZXYuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgJG5leHQuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgJHByZXYuc2hvdygpO1xyXG4gICAgICAgICAgICAgICAgJG5leHQuc2hvdygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghbGVuKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgJGZpcnN0ID0gJCh0aHVtYnNbMF0pO1xyXG4gICAgICAgICAgICAkbGFzdCA9ICQodGh1bWJzW2xlbiAtIDFdKTtcclxuICAgICAgICAgICAgJHByZXYucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgJG5leHQucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgaWYgKCRmaXJzdC5sZW5ndGggJiYgJGZpcnN0LmF0dHIoJ2lkJykgPT09IHByZXZpZXdJZCkge1xyXG4gICAgICAgICAgICAgICAgJHByZXYuYXR0cignZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoJGxhc3QubGVuZ3RoICYmICRsYXN0LmF0dHIoJ2lkJykgPT09IHByZXZpZXdJZCkge1xyXG4gICAgICAgICAgICAgICAgJG5leHQuYXR0cignZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX21heGltaXplWm9vbURpYWxvZzogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRtb2RhbCA9IHNlbGYuJG1vZGFsLCAkaGVhZCA9ICRtb2RhbC5maW5kKCcubW9kYWwtaGVhZGVyOnZpc2libGUnKSxcclxuICAgICAgICAgICAgICAgICRmb290ID0gJG1vZGFsLmZpbmQoJy5tb2RhbC1mb290ZXI6dmlzaWJsZScpLCAkYm9keSA9ICRtb2RhbC5maW5kKCcubW9kYWwtYm9keScpLFxyXG4gICAgICAgICAgICAgICAgaCA9ICQod2luZG93KS5oZWlnaHQoKSwgZGlmZiA9IDA7XHJcbiAgICAgICAgICAgICRtb2RhbC5hZGRDbGFzcygnZmlsZS16b29tLWZ1bGxzY3JlZW4nKTtcclxuICAgICAgICAgICAgaWYgKCRoZWFkICYmICRoZWFkLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgaCAtPSAkaGVhZC5vdXRlckhlaWdodCh0cnVlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoJGZvb3QgJiYgJGZvb3QubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICBoIC09ICRmb290Lm91dGVySGVpZ2h0KHRydWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICgkYm9keSAmJiAkYm9keS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgIGRpZmYgPSAkYm9keS5vdXRlckhlaWdodCh0cnVlKSAtICRib2R5LmhlaWdodCgpO1xyXG4gICAgICAgICAgICAgICAgaCAtPSBkaWZmO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICRtb2RhbC5maW5kKCcua3Ytem9vbS1ib2R5JykuaGVpZ2h0KGgpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3Jlc2l6ZVpvb21EaWFsb2c6IGZ1bmN0aW9uIChmdWxsU2NyZWVuKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJG1vZGFsID0gc2VsZi4kbW9kYWwsICRidG5GdWxsID0gJG1vZGFsLmZpbmQoJy5idG4tZnVsbHNjcmVlbicpLFxyXG4gICAgICAgICAgICAgICAgJGJ0bkJvcmQgPSAkbW9kYWwuZmluZCgnLmJ0bi1ib3JkZXJsZXNzJyk7XHJcbiAgICAgICAgICAgIGlmICgkbW9kYWwuaGFzQ2xhc3MoJ2ZpbGUtem9vbS1mdWxsc2NyZWVuJykpIHtcclxuICAgICAgICAgICAgICAgICRoLnRvZ2dsZUZ1bGxTY3JlZW4oZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFmdWxsU2NyZWVuKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEkYnRuRnVsbC5oYXNDbGFzcygnYWN0aXZlJykpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJG1vZGFsLnJlbW92ZUNsYXNzKCdmaWxlLXpvb20tZnVsbHNjcmVlbicpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLiRtb2RhbC5maW5kKCcua3Ytem9vbS1ib2R5JykuY3NzKCdoZWlnaHQnLCBzZWxmLnpvb21Nb2RhbEhlaWdodCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGJ0bkZ1bGwucmVtb3ZlQ2xhc3MoJ2FjdGl2ZScpLmF0dHIoJ2FyaWEtcHJlc3NlZCcsICdmYWxzZScpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEkYnRuRnVsbC5oYXNDbGFzcygnYWN0aXZlJykpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJG1vZGFsLnJlbW92ZUNsYXNzKCdmaWxlLXpvb20tZnVsbHNjcmVlbicpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yZXNpemVab29tRGlhbG9nKHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoJGJ0bkJvcmQuaGFzQ2xhc3MoJ2FjdGl2ZScpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYnRuQm9yZC5yZW1vdmVDbGFzcygnYWN0aXZlJykuYXR0cignYXJpYS1wcmVzc2VkJywgJ2ZhbHNlJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWZ1bGxTY3JlZW4pIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9tYXhpbWl6ZVpvb21EaWFsb2coKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAkaC50b2dnbGVGdWxsU2NyZWVuKHRydWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICRtb2RhbC5mb2N1cygpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3NldFpvb21Db250ZW50OiBmdW5jdGlvbiAoJGZyYW1lLCBhbmltYXRlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGNvbnRlbnQsIHRtcGx0LCBib2R5LCB0aXRsZSwgJGJvZHksICRkYXRhRWwsIGNvbmZpZywgcHJldmlld0lkID0gJGZyYW1lLmF0dHIoJ2lkJyksXHJcbiAgICAgICAgICAgICAgICAkem9vbVByZXZpZXcgPSBzZWxmLl9nZXRab29tKHByZXZpZXdJZCksICRtb2RhbCA9IHNlbGYuJG1vZGFsLCAkdG1wLFxyXG4gICAgICAgICAgICAgICAgJGJ0bkZ1bGwgPSAkbW9kYWwuZmluZCgnLmJ0bi1mdWxsc2NyZWVuJyksICRidG5Cb3JkID0gJG1vZGFsLmZpbmQoJy5idG4tYm9yZGVybGVzcycpLCBjYXAsIHNpemUsXHJcbiAgICAgICAgICAgICAgICAkYnRuVG9naCA9ICRtb2RhbC5maW5kKCcuYnRuLXRvZ2dsZWhlYWRlcicpO1xyXG4gICAgICAgICAgICB0bXBsdCA9ICR6b29tUHJldmlldy5hdHRyKCdkYXRhLXRlbXBsYXRlJykgfHwgJ2dlbmVyaWMnO1xyXG4gICAgICAgICAgICAkY29udGVudCA9ICR6b29tUHJldmlldy5maW5kKCcua3YtZmlsZS1jb250ZW50Jyk7XHJcbiAgICAgICAgICAgIGJvZHkgPSAkY29udGVudC5sZW5ndGggPyAkY29udGVudC5odG1sKCkgOiAnJztcclxuICAgICAgICAgICAgY2FwID0gJGZyYW1lLmRhdGEoJ2NhcHRpb24nKSB8fCAnJztcclxuICAgICAgICAgICAgc2l6ZSA9ICRmcmFtZS5kYXRhKCdzaXplJykgfHwgJyc7XHJcbiAgICAgICAgICAgIHRpdGxlID0gY2FwICsgJyAnICsgc2l6ZTtcclxuICAgICAgICAgICAgJG1vZGFsLmZpbmQoJy5rdi16b29tLXRpdGxlJykuYXR0cigndGl0bGUnLCAkKCc8ZGl2Lz4nKS5odG1sKHRpdGxlKS50ZXh0KCkpLmh0bWwodGl0bGUpO1xyXG4gICAgICAgICAgICAkYm9keSA9ICRtb2RhbC5maW5kKCcua3Ytem9vbS1ib2R5Jyk7XHJcbiAgICAgICAgICAgICRtb2RhbC5yZW1vdmVDbGFzcygna3Ytc2luZ2xlLWNvbnRlbnQnKTtcclxuICAgICAgICAgICAgaWYgKGFuaW1hdGUpIHtcclxuICAgICAgICAgICAgICAgICR0bXAgPSAkYm9keS5hZGRDbGFzcygnZmlsZS10aHVtYi1sb2FkaW5nJykuY2xvbmUoKS5pbnNlcnRBZnRlcigkYm9keSk7XHJcbiAgICAgICAgICAgICAgICAkYm9keS5odG1sKGJvZHkpLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgICR0bXAuZmFkZU91dCgnZmFzdCcsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAkYm9keS5mYWRlSW4oJ2Zhc3QnLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRib2R5LnJlbW92ZUNsYXNzKCdmaWxlLXRodW1iLWxvYWRpbmcnKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAkdG1wLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAkYm9keS5odG1sKGJvZHkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGNvbmZpZyA9IHNlbGYucHJldmlld1pvb21TZXR0aW5nc1t0bXBsdF07XHJcbiAgICAgICAgICAgIGlmIChjb25maWcpIHtcclxuICAgICAgICAgICAgICAgICRkYXRhRWwgPSAkYm9keS5maW5kKCcua3YtcHJldmlldy1kYXRhJyk7XHJcbiAgICAgICAgICAgICAgICAkaC5hZGRDc3MoJGRhdGFFbCwgJ2ZpbGUtem9vbS1kZXRhaWwnKTtcclxuICAgICAgICAgICAgICAgICQuZWFjaChjb25maWcsIGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGRhdGFFbC5jc3Moa2V5LCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCgkZGF0YUVsLmF0dHIoJ3dpZHRoJykgJiYga2V5ID09PSAnd2lkdGgnKSB8fCAoJGRhdGFFbC5hdHRyKCdoZWlnaHQnKSAmJiBrZXkgPT09ICdoZWlnaHQnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkZGF0YUVsLnJlbW92ZUF0dHIoa2V5KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkbW9kYWwuZGF0YSgncHJldmlld0lkJywgcHJldmlld0lkKTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkbW9kYWwuZmluZCgnLmJ0bi1wcmV2JyksICdjbGljaycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3pvb21TbGlkZVNob3coJ3ByZXYnLCBwcmV2aWV3SWQpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkbW9kYWwuZmluZCgnLmJ0bi1uZXh0JyksICdjbGljaycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3pvb21TbGlkZVNob3coJ25leHQnLCBwcmV2aWV3SWQpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkYnRuRnVsbCwgJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fcmVzaXplWm9vbURpYWxvZyh0cnVlKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJGJ0bkJvcmQsICdjbGljaycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3Jlc2l6ZVpvb21EaWFsb2coZmFsc2UpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkYnRuVG9naCwgJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyICRoZWFkZXIgPSAkbW9kYWwuZmluZCgnLm1vZGFsLWhlYWRlcicpLCAkZmxvYXRCYXIgPSAkbW9kYWwuZmluZCgnLm1vZGFsLWJvZHkgLmZsb2F0aW5nLWJ1dHRvbnMnKSxcclxuICAgICAgICAgICAgICAgICAgICBodCwgJGFjdGlvbnMgPSAkaGVhZGVyLmZpbmQoJy5rdi16b29tLWFjdGlvbnMnKSwgcmVzaXplID0gZnVuY3Rpb24gKGhlaWdodCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgJGJvZHkgPSBzZWxmLiRtb2RhbC5maW5kKCcua3Ytem9vbS1ib2R5JyksIGggPSBzZWxmLnpvb21Nb2RhbEhlaWdodDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRtb2RhbC5oYXNDbGFzcygnZmlsZS16b29tLWZ1bGxzY3JlZW4nKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9ICRib2R5Lm91dGVySGVpZ2h0KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFoZWlnaHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoID0gaCAtICRoZWFkZXIub3V0ZXJIZWlnaHQodHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgJGJvZHkuY3NzKCdoZWlnaHQnLCBoZWlnaHQgPyBoICsgaGVpZ2h0IDogaCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgIGlmICgkaGVhZGVyLmlzKCc6dmlzaWJsZScpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaHQgPSAkaGVhZGVyLm91dGVySGVpZ2h0KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICRoZWFkZXIuc2xpZGVVcCgnc2xvdycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGFjdGlvbnMuZmluZCgnLmJ0bicpLmFwcGVuZFRvKCRmbG9hdEJhcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc2l6ZShodCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICRmbG9hdEJhci5maW5kKCcuYnRuJykuYXBwZW5kVG8oJGFjdGlvbnMpO1xyXG4gICAgICAgICAgICAgICAgICAgICRoZWFkZXIuc2xpZGVEb3duKCdzbG93JywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNpemUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICRtb2RhbC5mb2N1cygpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkbW9kYWwsICdrZXlkb3duJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgIHZhciBrZXkgPSBlLndoaWNoIHx8IGUua2V5Q29kZSwgJHByZXYgPSAkKHRoaXMpLmZpbmQoJy5idG4tcHJldicpLCAkbmV4dCA9ICQodGhpcykuZmluZCgnLmJ0bi1uZXh0JyksXHJcbiAgICAgICAgICAgICAgICAgICAgdklkID0gJCh0aGlzKS5kYXRhKCdwcmV2aWV3SWQnKSwgdlByZXZLZXkgPSBzZWxmLnJ0bCA/IDM5IDogMzcsIHZOZXh0S2V5ID0gc2VsZi5ydGwgPyAzNyA6IDM5O1xyXG4gICAgICAgICAgICAgICAgaWYgKGtleSA9PT0gdlByZXZLZXkgJiYgJHByZXYubGVuZ3RoICYmICEkcHJldi5hdHRyKCdkaXNhYmxlZCcpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fem9vbVNsaWRlU2hvdygncHJldicsIHZJZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSB2TmV4dEtleSAmJiAkbmV4dC5sZW5ndGggJiYgISRuZXh0LmF0dHIoJ2Rpc2FibGVkJykpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl96b29tU2xpZGVTaG93KCduZXh0JywgdklkKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfem9vbVByZXZpZXc6IGZ1bmN0aW9uICgkYnRuKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGZyYW1lLCAkbW9kYWwgPSBzZWxmLiRtb2RhbDtcclxuICAgICAgICAgICAgaWYgKCEkYnRuLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgdGhyb3cgJ0Nhbm5vdCB6b29tIHRvIGRldGFpbGVkIHByZXZpZXchJztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkaC5pbml0TW9kYWwoJG1vZGFsKTtcclxuICAgICAgICAgICAgJG1vZGFsLmh0bWwoc2VsZi5fZ2V0TW9kYWxDb250ZW50KCkpO1xyXG4gICAgICAgICAgICAkZnJhbWUgPSAkYnRuLmNsb3Nlc3QoJGguRlJBTUVTKTtcclxuICAgICAgICAgICAgc2VsZi5fc2V0Wm9vbUNvbnRlbnQoJGZyYW1lKTtcclxuICAgICAgICAgICAgJG1vZGFsLm1vZGFsKCdzaG93Jyk7XHJcbiAgICAgICAgICAgIHNlbGYuX2luaXRab29tQnV0dG9ucygpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3pvb21TbGlkZVNob3c6IGZ1bmN0aW9uIChkaXIsIHByZXZpZXdJZCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRidG4gPSBzZWxmLiRtb2RhbC5maW5kKCcua3Ytem9vbS1hY3Rpb25zIC5idG4tJyArIGRpciksICR0YXJnRnJhbWUsIGksICR0aHVtYixcclxuICAgICAgICAgICAgICAgIHRodW1ic0RhdGEgPSBzZWxmLmdldEZyYW1lcygpLnRvQXJyYXkoKSwgdGh1bWJzID0gW10sIGxlbiA9IHRodW1ic0RhdGEubGVuZ3RoLCBvdXQ7XHJcbiAgICAgICAgICAgIGlmICgkYnRuLmF0dHIoJ2Rpc2FibGVkJykpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICR0aHVtYiA9ICQodGh1bWJzRGF0YVtpXSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoJHRodW1iICYmICR0aHVtYi5sZW5ndGggJiYgJHRodW1iLmZpbmQoJy5rdi1maWxlLXpvb206dmlzaWJsZScpLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRodW1icy5wdXNoKHRodW1ic0RhdGFbaV0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGxlbiA9IHRodW1icy5sZW5ndGg7XHJcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkrKykge1xyXG4gICAgICAgICAgICAgICAgaWYgKCQodGh1bWJzW2ldKS5hdHRyKCdpZCcpID09PSBwcmV2aWV3SWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBvdXQgPSBkaXIgPT09ICdwcmV2JyA/IGkgLSAxIDogaSArIDE7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKG91dCA8IDAgfHwgb3V0ID49IGxlbiB8fCAhdGh1bWJzW291dF0pIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkdGFyZ0ZyYW1lID0gJCh0aHVtYnNbb3V0XSk7XHJcbiAgICAgICAgICAgIGlmICgkdGFyZ0ZyYW1lLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fc2V0Wm9vbUNvbnRlbnQoJHRhcmdGcmFtZSwgdHJ1ZSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5faW5pdFpvb21CdXR0b25zKCk7XHJcbiAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlem9vbScgKyBkaXIsIHsncHJldmlld0lkJzogcHJldmlld0lkLCBtb2RhbDogc2VsZi4kbW9kYWx9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9pbml0Wm9vbUJ1dHRvbjogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIHNlbGYuJHByZXZpZXcuZmluZCgnLmt2LWZpbGUtem9vbScpLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyICRlbCA9ICQodGhpcyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCRlbCwgJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3pvb21QcmV2aWV3KCRlbCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5wdXRGaWxlQ291bnQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJGVsZW1lbnQuZ2V0KDApLmZpbGVzLmxlbmd0aDtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9yZWZyZXNoUHJldmlldzogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGZpbGVzO1xyXG4gICAgICAgICAgICBpZiAoKCFzZWxmLl9pbnB1dEZpbGVDb3VudCgpICYmICFzZWxmLmlzQWpheFVwbG9hZCkgfHwgIXNlbGYuc2hvd1ByZXZpZXcgfHwgIXNlbGYuaXNQcmV2aWV3YWJsZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuZmlsZU1hbmFnZXIuY291bnQoKSA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlcyA9ICQuZXh0ZW5kKHRydWUsIHt9LCBzZWxmLmZpbGVNYW5hZ2VyLnN0YWNrKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLmNsZWFyKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fY2xlYXJGaWxlSW5wdXQoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZXMgPSBzZWxmLiRlbGVtZW50LmdldCgwKS5maWxlcztcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGZpbGVzID0gc2VsZi4kZWxlbWVudC5nZXQoMCkuZmlsZXM7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGZpbGVzICYmIGZpbGVzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5yZWFkRmlsZXMoZmlsZXMpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fc2V0RmlsZURyb3Bab25lVGl0bGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2NsZWFyT2JqZWN0czogZnVuY3Rpb24gKCRlbCkge1xyXG4gICAgICAgICAgICAkZWwuZmluZCgndmlkZW8gYXVkaW8nKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMucGF1c2UoKTtcclxuICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAkZWwuZmluZCgnaW1nIG9iamVjdCBkaXYnKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2NsZWFyRmlsZUlucHV0OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGVsID0gc2VsZi4kZWxlbWVudCwgJHNyY0ZybSwgJHRtcEZybSwgJHRtcEVsO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYuX2lucHV0RmlsZUNvdW50KCkpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkc3JjRnJtID0gJGVsLmNsb3Nlc3QoJ2Zvcm0nKTtcclxuICAgICAgICAgICAgJHRtcEZybSA9ICQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZm9ybScpKTtcclxuICAgICAgICAgICAgJHRtcEVsID0gJChkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKSk7XHJcbiAgICAgICAgICAgICRlbC5iZWZvcmUoJHRtcEVsKTtcclxuICAgICAgICAgICAgaWYgKCRzcmNGcm0ubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAkc3JjRnJtLmFmdGVyKCR0bXBGcm0pO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgJHRtcEVsLmFmdGVyKCR0bXBGcm0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICR0bXBGcm0uYXBwZW5kKCRlbCkudHJpZ2dlcigncmVzZXQnKTtcclxuICAgICAgICAgICAgJHRtcEVsLmJlZm9yZSgkZWwpLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAkdG1wRnJtLnJlbW92ZSgpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3Jlc2V0VXBsb2FkOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgc2VsZi51cGxvYWRDYWNoZSA9IFtdO1xyXG4gICAgICAgICAgICBzZWxmLiRidG5VcGxvYWQucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgc2VsZi5fc2V0UHJvZ3Jlc3MoMCk7XHJcbiAgICAgICAgICAgIHNlbGYuX2hpZGVQcm9ncmVzcygpO1xyXG4gICAgICAgICAgICBzZWxmLl9yZXNldEVycm9ycyhmYWxzZSk7XHJcbiAgICAgICAgICAgIHNlbGYuX2luaXRBamF4KCk7XHJcbiAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIuY2xlYXJJbWFnZXMoKTtcclxuICAgICAgICAgICAgc2VsZi5fcmVzZXRDYW52YXMoKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYub3ZlcndyaXRlSW5pdGlhbCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlldyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld0NvbmZpZyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld1RodW1iVGFncyA9IFtdO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YSA9IHtcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBbXSxcclxuICAgICAgICAgICAgICAgICAgICBjb25maWc6IFtdLFxyXG4gICAgICAgICAgICAgICAgICAgIHRhZ3M6IFtdXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfcmVzZXRDYW52YXM6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5jYW52YXMgJiYgc2VsZi5pbWFnZUNhbnZhc0NvbnRleHQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuaW1hZ2VDYW52YXNDb250ZXh0LmNsZWFyUmVjdCgwLCAwLCBzZWxmLmNhbnZhcy53aWR0aCwgc2VsZi5jYW52YXMuaGVpZ2h0KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2hhc0luaXRpYWxQcmV2aWV3OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgcmV0dXJuICFzZWxmLm92ZXJ3cml0ZUluaXRpYWwgJiYgc2VsZi5wcmV2aWV3Q2FjaGUuY291bnQodHJ1ZSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfcmVzZXRQcmV2aWV3OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgb3V0LCBjYXA7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLnByZXZpZXdDYWNoZS5jb3VudCh0cnVlKSkge1xyXG4gICAgICAgICAgICAgICAgb3V0ID0gc2VsZi5wcmV2aWV3Q2FjaGUub3V0KCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcmV2aWV3Q29udGVudChvdXQuY29udGVudCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zZXRJbml0VGh1bWJBdHRyKCk7XHJcbiAgICAgICAgICAgICAgICBjYXAgPSBzZWxmLmluaXRpYWxDYXB0aW9uID8gc2VsZi5pbml0aWFsQ2FwdGlvbiA6IG91dC5jYXB0aW9uO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fc2V0Q2FwdGlvbihjYXApO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fY2xlYXJQcmV2aWV3KCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9pbml0Q2FwdGlvbigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLnNob3dQcmV2aWV3KSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9pbml0Wm9vbSgpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5faW5pdFNvcnRhYmxlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIF9jbGVhckRlZmF1bHRQcmV2aWV3OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgc2VsZi4kcHJldmlldy5maW5kKCcuZmlsZS1kZWZhdWx0LXByZXZpZXcnKS5yZW1vdmUoKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF92YWxpZGF0ZURlZmF1bHRQcmV2aWV3OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgaWYgKCFzZWxmLnNob3dQcmV2aWV3IHx8ICRoLmlzRW1wdHkoc2VsZi5kZWZhdWx0UHJldmlld0NvbnRlbnQpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fc2V0UHJldmlld0NvbnRlbnQoJzxkaXYgY2xhc3M9XCJmaWxlLWRlZmF1bHQtcHJldmlld1wiPicgKyBzZWxmLmRlZmF1bHRQcmV2aWV3Q29udGVudCArICc8L2Rpdj4nKTtcclxuICAgICAgICAgICAgc2VsZi4kY29udGFpbmVyLnJlbW92ZUNsYXNzKCdmaWxlLWlucHV0LW5ldycpO1xyXG4gICAgICAgICAgICBzZWxmLl9pbml0Q2xpY2thYmxlKCk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfcmVzZXRQcmV2aWV3VGh1bWJzOiBmdW5jdGlvbiAoaXNBamF4KSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgb3V0O1xyXG4gICAgICAgICAgICBpZiAoaXNBamF4KSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9jbGVhclByZXZpZXcoKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuY2xlYXJGaWxlU3RhY2soKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAo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tcclxuICAgICAgICAgICAgaWYgKCRoLmlzRW1wdHkoc2VsZi5jdXN0b21QcmV2aWV3VGFncykpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0ZW1wbGF0ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gJGgucmVwbGFjZVRhZ3ModGVtcGxhdGUsIHNlbGYuY3VzdG9tUHJldmlld1RhZ3MpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2dldE91dERhdGE6IGZ1bmN0aW9uIChmb3JtZGF0YSwganFYSFIsIHJlc3BvbnNlRGF0YSwgZmlsZXNEYXRhKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAganFYSFIgPSBqcVhIUiB8fCB7fTtcclxuICAgICAgICAgICAgcmVzcG9uc2VEYXRhID0gcmVzcG9uc2VEYXRhIHx8IHt9O1xyXG4gICAgICAgICAgICBmaWxlc0RhdGEgPSBmaWxlc0RhdGEgfHwgc2VsZi5maWxlTWFuYWdlci5saXN0KCk7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBmb3JtZGF0YTogZm9ybWRhdGEsXHJcbiAgICAgICAgICAgICAgICBmaWxlczogZmlsZXNEYXRhLFxyXG4gICAgICAgICAgICAgICAgZmlsZW5hbWVzOiBzZWxmLmZpbGVuYW1lcyxcclxuICAgICAgICAgICAgICAgIGZpbGVzY291bnQ6IHNlbGYuZ2V0RmlsZXNDb3VudCgpLFxyXG4gICAgICAgICAgICAgICAgZXh0cmE6IHNlbGYuX2dldEV4dHJhRGF0YSgpLFxyXG4gICAgICAgICAgICAgICAgcmVzcG9uc2U6IHJlc3BvbnNlRGF0YSxcclxuICAgICAgICAgICAgICAgIHJlYWRlcjogc2VsZi5yZWFkZXIsXHJcbiAgICAgICAgICAgICAgICBqcVhIUjoganFYSFJcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9LFxyXG4gICAgICAgI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2YXIgcGN0ID0gMCwgdG90YWwgPSBldmVudC50b3RhbCwgbG9hZGVkID0gZXZlbnQubG9hZGVkIHx8IGV2ZW50LnBvc2l0aW9uLFxyXG4gICAgICAgICAgICAgICAgICAgIHN0YXRzID0gZm0uZ2V0VXBsb2FkU3RhdHMoZmlsZUlkLCBsb2FkZWQsIHRvdGFsKTtcclxuICAgICAgICAgICAgICAgIC8qKiBAbmFtZXNwYWNlIGV2ZW50Lmxlbmd0aENvbXB1dGFibGUgKi9cclxuICAgICAgICAgICAgICAgIGlmIChldmVudC5sZW5ndGhDb21wdXRhYmxlICYmICFzZWxmLmVuYWJsZVJlc3VtYWJsZVVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHBjdCA9ICRoLnJvdW5kKGxvYWRlZCAvIHRvdGFsICogMTAwKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChmaWxlSWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRGaWxlVXBsb2FkU3RhdHMoZmlsZUlkLCBwY3QsIGZpbGVDb3VudCwgc3RhdHMpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcyhwY3QsIG51bGwsIG51bGwsIHNlbGYuX2dldFN0YXRzKHN0YXRzKSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWFqYXhwcm9ncmVzcycsIFtzdGF0c10pO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBpZiAoeGhyb2JqLnVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYucHJvZ3Jlc3NEZWxheSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZ1bmMgPSAkaC5kZWJvdW5jZShmdW5jLCBzZWxmLnByb2dyZXNzRGVsYXkpO1xyXG4gICAgICAgIC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3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZmxhZyA9PT0gJ2JlZm9yZScpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZXR0aW5nc1tmdW5jTmFtZV0gPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdGdW5jLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyY0Z1bmMuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBzZXR0aW5nc1tmdW5jTmFtZV0gPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNyY0Z1bmMuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ0Z1bmMuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcclxuICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgc2V0dGluZ3NbZnVuY05hbWVdID0gc3JjRnVuYztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2FqYXhTdWJtaXQ6IGZ1bmN0aW9uIChmbkJlZm9yZSwgZm5TdWNjZXNzLCBmbkNvbXBsZXRlLCBmbkVycm9yLCBmb3JtZGF0YSwgZmlsZUlkLCBpbmRleCwgdlVybCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIHNldHRpbmdzLCBkZWZhdWx0cywgZGF0YSwgcHJvY2Vzc1F1ZXVlO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYuX3JhaXNlKCdmaWxlcHJlYWpheCcsIFtmb3JtZGF0YSwgZmls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h0cmFEYXRhKGZpbGVJZCwgaW5kZXgpIHx8IHt9O1xyXG4gICAgICAgICAgICBpZiAodHlwZW9mIGRhdGEgPT09ICdvYmplY3QnKSB7XHJcbiAgICAgICAgICAgICAgICAkLmVhY2goZGF0YSwgZnVuY3Rpb24gKGtleSwgdmFsdWUpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3JtZGF0YS5hcHBlbmQoa2V5LCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBkZWZhdWx0cyA9IHtcclxuICAgICAgICAgICAgICAgIHhocjogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciB4aHJvYmogPSAkLmFqYXhTZXR0aW5ncy54aHIoKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5faW5pdFhocih4aHJvYmosIGZpbGVJZCwgc2VsZi5maWxlTWFuYWdlci5jb3VudCgpKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB1cmw6IHNlbGYuX2VuY29kZVVSSSh2VXJsKSxcclxuICAgICAgICAgICAgICAgIHR5cGU6ICdQT1NUJyxcclxuICAgICAgICAgICAgICAgIGRhdGFUeXBlOiAnanNvbicsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiBmb3JtZGF0YSxcclxuICAgICAgICAgICAgICAgIGNhY2hlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHByb2Nlc3NEYXRhOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbnRlbnRUeXBlOiBmYWxzZVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZXR0aW5ncyA9ICQuZXh0ZW5kKHRydWUsIHt9LCBkZWZhdWx0cywgc2VsZi5fYWpheFNldHRpbmdzKTtcclxuICAgICAgICAgICAgc2VsZi5hamF4UXVldWUucHVzaChzZXR0aW5ncyk7XHJcbiAgICAgICAgICAgIHByb2Nlc3NRdWV1ZSA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciBjb25maWcsIHhocjtcclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLmFqYXhDdXJyZW50VGhyZWFkcyA8IHNlbGYubWF4QWpheFRocmVhZHMpIHtcclxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBzZWxmLmFqYXhRdWV1ZS5zaGlmdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29uZmlnICE9PSAndW5kZWZpbmVkJykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmFqYXhDdXJyZW50VGhyZWFkcysrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB4aHIgPSAkLmFqYXgoY29uZmlnKS5kb25lKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoc2VsZi5hamF4UXVldWVJbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuYWpheEN1cnJlbnRUaHJlYWRzLS07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmFqYXhSZXF1ZXN0cy5wdXNoKHhocik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZWxmLmFqYXhRdWV1ZUludGVydmFsSWQgPSBzZXRJbnRlcnZhbChwcm9jZXNzUXVldWUsIHNlbGYucXVldWVEZWxheSk7XHJcblxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX21lcmdlQXJyYXk6IGZ1bmN0aW9uIChwcm9wLCBjb250ZW50KSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgYXJyMSA9ICRoLmNsZWFuQXJyYXkoc2VsZltwcm9wXSksIGFycjIgPSAkaC5jbGVhbkFycmF5KGNvbnRlbnQpO1xyXG4gICAgICAgICAgICBzZWxmW3Byb3BdID0gYXJyMS5jb25jYXQoYXJyMik7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdFVwbG9hZFN1Y2Nlc3M6IGZ1bmN0aW9uIChvdXQsICR0aHVtYiwgYWxsRmlsZXMpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBhcHBlbmQsIGRhdGEsIGluZGV4LCAkZGl2LCAkbmV3Q2FjaGUsIGNvbnRlbnQsIGNvbmZpZywgdGFncywgaWQsIGk7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5zaG93UHJldmlldyB8fCB0eXBlb2Ygb3V0ICE9PSAnb2JqZWN0JyB8fCAkLmlzRW1wdHlPYmplY3Qob3V0KSkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fcmVzZXRDYXB0aW9uKCk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKG91dC5pbml0aWFsUHJldmlldyAhPT0gdW5kZWZpbmVkICYmIG91dC5pbml0aWFsUHJldmlldy5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLmhhc0luaXREYXRhID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBvdXQuaW5pdGlhbFByZXZpZXcgfHwgW107XHJcbiAgICAgICAgICAgICAgICBjb25maWcgPSBvdXQuaW5pdGlhbFByZXZpZXdDb25maWcgfHwgW107XHJcbiAgICAgICAgICAgICAgICB0YWdzID0gb3V0LmluaXRpYWxQcmV2aWV3VGh1bWJUYWdzIHx8IFtdO1xyXG4gICAgICAgICAgICAgICAgYXBwZW5kID0gb3V0LmFwcGVuZCA9PT0gdW5kZWZpbmVkIHx8IG91dC5hcHBlbmQ7XHJcbiAgICAgICAgICAgICAgICBpZiAoY29udGVudC5sZW5ndGggPiAwICYmICEkaC5pc0FycmF5KGNvbnRlbnQpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudCA9IGNvbnRlbnQuc3BsaXQoc2VsZi5pbml0aWFsUHJldmlld0RlbGltaXRlcik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoY29udGVudC5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9tZXJnZUFycmF5KCdpbml0aWFsUHJldmlldycsIGNvbnRlbnQpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX21lcmdlQXJyYXkoJ2luaXRpYWxQcmV2aWV3Q29uZmlnJywgY29uZmlnKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9tZXJnZUFycmF5KCdpbml0aWFsUHJldmlld1RodW1iVGFncycsIHRhZ3MpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKCR0aHVtYiAhPT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFhbGxGaWxlcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleCA9IHNlbGYucHJldmlld0NhY2hlLmFkZChjb250ZW50WzBdLCBjb25maWdbMF0sIHRhZ3NbMF0sIGFwcGVuZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBzZWxmLnByZXZpZXdDYWNoZS5nZXQoaW5kZXgsIGZhbHNlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGRpdiA9ICQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2JykpLmh0bWwoZGF0YSkuaGlkZSgpLmluc2VydEFmdGVyKCR0aHVtYik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRuZXdDYWNoZSA9ICRkaXYuZmluZCgnLmt2LXpvb20tY2FjaGUnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCRuZXdDYWNoZSAmJiAkbmV3Q2FjaGUubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkbmV3Q2FjaGUuaW5zZXJ0QWZ0ZXIoJHRodW1iKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIuZmFkZU91dCgnc2xvdycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciAkbmV3VGh1bWIgPSAkZGl2LmZpbmQoJy5maWxlLXByZXZpZXctZnJhbWUnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkbmV3VGh1bWIgJiYgJG5ld1RodW1iLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRuZXdUaHVtYi5pbnNlcnRCZWZvcmUoJHRodW1iKS5mYWRlSW4oJ3Nsb3cnKS5jc3MoJ2Rpc3BsYXk6aW5saW5lLWJsb2NrJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9pbml0UHJldmlld0FjdGlvbnMoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFyRmlsZUlucHV0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaC5jbGVhblpvb21DYWNoZShzZWxmLl9nZXRab29tKCR0aHVtYi5hdHRyKCdpZCcpKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZGl2LnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5pdFNvcnRhYmxlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gJHRodW1iLmF0dHIoJ2lkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBzZWxmLl9nZXRVcGxvYWRDYWNoZUluZGV4KGlkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYudXBsb2FkQ2FjaGVbaV0gPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGlkLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IGNvbnRlbnRbMF0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnOiBjb25maWdbMF0gfHwgW10sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnczogdGFnc1swXSB8fCBbXSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlbmQ6IGFwcGVuZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUuc2V0KGNvbnRlbnQsIGNvbmZpZywgdGFncywgYXBwZW5kKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9pbml0UHJldmlldygpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX2luaXRQcmV2aWV3QWN0aW9ucygpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX3Jlc2V0Q2FwdGlvbigpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2dldFVwbG9hZENhY2hlSW5kZXg6IGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGksIGxlbiA9IHNlbGYudXBsb2FkQ2FjaGUubGVuZ3RoLCBjb25maWc7XHJcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkrKykge1xyXG4gICAgICAgICAgICAgICAgY29uZmlnID0gc2VsZi51cGxvYWRDYWNoZVtpXTtcclxuICAgICAgICAgICAgICAgIGlmIChjb25maWcuaWQgPT09IGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdFN1Y2Nlc3NUaHVtYnM6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYuc2hvd1ByZXZpZXcpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9nZXRUaHVtYnMoJGguRlJBTUVTICsgJy5maWxlLXByZXZpZXctc3VjY2VzcycpLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyICR0aHVtYiA9ICQodGhpcyksICRyZW1vdmUgPSAkdGh1bWIuZmluZCgnLmt2LWZpbGUtcmVtb3ZlJyk7XHJcbiAgICAgICAgICAgICAgICAkcmVtb3ZlLnJlbW92ZUF0dHIoJ2Rpc2FibGVkJyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCRyZW1vdmUsICdjbGljaycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaWQgPSAkdGh1bWIuYXR0cignaWQnKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0ID0gc2VsZi5fcmFpc2UoJ2ZpbGVzdWNjZXNzcmVtb3ZlJywgW2lkLCAkdGh1bWIuYXR0cignZGF0YS1maWxlaW5kZXgnKV0pO1xyXG4gICAgICAgICAgICAgICAgICAgICRoLmNsZWFuTWVtb3J5KCR0aHVtYik7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG91dCA9PT0gZmFsc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAkdGh1bWIuZmFkZU91dCgnc2xvdycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGguY2xlYW5ab29tQ2FjaGUoc2VsZi5fZ2V0Wm9vbShpZCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi5nZXRGcmFtZXMoKS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYucmVzZXQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3VwZGF0ZUluaXRpYWxQcmV2aWV3OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgdSA9IHNlbGYudXBsb2FkQ2FjaGU7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLnNob3dQcmV2aWV3KSB7XHJcbiAgICAgICAgICAgICAgICAkLmVhY2godSwgZnVuY3Rpb24gKGtleSwgc2V0dGluZykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYucHJldmlld0NhY2hlLmFkZChzZXR0aW5nLmNvbnRlbnQsIHNldHRpb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9LFxyXG4gICAgICAgICAgICAgICAgZmlsZU5hbWUgPSBzZWxmLmZpbGVNYW5hZ2VyLmdldEZpbGVOYW1lKGlkLCB0cnVlKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYuZW5hYmxlUmVzdW1hYmxlVXBsb2FkKSB7IC8vIG5vdCBlbmFibGVkIGZvciByZXN1bWFibGUgdXBsb2Fkc1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLnNob3dQcmV2aWV3KSB7XHJcbiAgICAgICAgICAgICAgICAkdGh1bWIgPSBzZWxmLmZpbGVNYW5hZ2VyLmdldFRodW1iKGlkKTtcclxuICAgICAgICAgICAgICAgICRwcm9nID0gJHRodW1iLmZpbmQoJy5maWxlLXRodW1iLXByb2dyZXNzJyk7XHJcbiAgICAgICAgICAgICAgICAkYnRuVXBsb2FkID0gJHRodW1iLmZpbmQoJy5rdi1maWxlLXVwbG9hZCcpO1xyXG4gICAgICAgICAgICAgICAgJGJ0bkRlbGV0ZSA9ICR0aHVtYi5maW5kKCcua3YtZmlsZS1yZW1vdmUnKTtcclxuICAgICAgICAgICAgICAgICRwcm9nLnNob3coKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoY291bnQgPT09IDAgfHwgIWhhc1Bvc3REYXRhIHx8IChzZWxmLnNob3dQcmV2aWV3ICYmICRidG5VcGxvYWQgJiYgJGJ0blVwbG9hZC5oYXNDbGFzcygnZGlzYWJsZWQnKSkgfHxcclxuICAgICAgICAgICAgICAgIHNlbGYuX2Fib3J0KHBhcmFtcykpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB1cGRhdGVVcGxvYWRMb2cgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIXVwbG9hZEZhaWxlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZtLnJlbW92ZUZpbGUoaWQpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBmbS5lcnJvcnMucHVzaChpZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBmbS5zZXRQcm9jZXNzZWQoaWQpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGZtLmlzUHJvY2Vzc2VkKCkpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVCYXRjaENvbXBsZXRlZCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGNoa0NvbXBsZXRlID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyICRpbml0VGh1bWJzO1xyXG4gICAgICAgICAgICAgICAgaWYgKCFzZWxmLmZpbGVCYXRjaENvbXBsZXRlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciB0cmlnZ2VyUmVzZXQgPSBmbS5jb3VudCgpID09PSAwLCBlcnJDb3VudCA9IGZtLmVycm9ycy5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fdXBkYXRlSW5pdGlhbFByZXZpZXcoKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnVubG9jayh0cmlnZ2VyUmVzZXQpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0cmlnZ2VyUmVzZXQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fY2xlYXJGaWxlSW5wdXQoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgJGluaXRUaHVtYnMgPSBzZWxmLiRwcmV2aWV3LmZpbmQoJy5maWxlLXByZXZpZXctaW5pdGlhbCcpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLnVwbG9hZEFzeW5jICYmICRpbml0VGh1bWJzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkaC5hZGRDc3MoJGluaXRUaHVtYnMsICRoLlNPUlRfQ1NTKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5pdFNvcnRhYmxlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlYmF0Y2h1cGxvYWRjb21wbGV0ZScsIFtmbS5zdGFjaywgc2VsZi5fZ2V0RXh0cmFEYXRhKCldKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYucmV0cnlFcnJvclVwbG9hZHMgfHwgZXJyQ291bnQgPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm0uY2xlYXIoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0UHJvZ3Jlc3MoMTAxKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmFqYXhBYm9ydGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9LCBzZWxmLnByb2Nlc3NEZWxheSk7XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGZuQmVmb3JlID0gZnVuY3Rpb24gKGpxWEhSKSB7XHJcbiAgICAgICAgICAgICAgICBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmb3JtZGF0YSwganFYSFIpO1xyXG4gICAgICAgICAgICAgICAgZm0uaW5pdFN0YXRzKGlkKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuZmlsZUJhdGNoQ29tcGxldGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWlzQmF0Y2gpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmFqYXhBYm9ydGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghJHRodW1iLmhhc0NsYXNzKCdmaWxlLXByZXZpZXctc3VjY2VzcycpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFRodW1iU3RhdHVzKCR0aHVtYiwgJ0xvYWRpbmcnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGguYWRkQ3NzKCR0aHVtYiwgJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICRidG5VcGxvYWQuYXR0cignZGlzYWJsZWQnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICAkYnRuRGVsZXRlLmF0dHIoJ2Rpc2FibGVkJywgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoIWlzQmF0Y2gpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmxvY2soKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChmbS5lcnJvcnMuaW5kZXhPZihpZCkgIT09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGZtLmVycm9yc1tpZF07XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZXByZXVwbG9hZCcsIFtvdXREYXRhLCBwcmV2aWV3SWQsIGldKTtcclxuICAgICAgICAgICAgICAgICQuZXh0ZW5kKHRydWUsIHBhcmFtcywgb3V0RGF0YSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5fYWJvcnQocGFyYW1zKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGpxWEhSLmFib3J0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0JhdGNoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFRodW1iU3RhdHVzKCR0aHVtYiwgJ05ldycpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIucmVtb3ZlQ2xhc3MoJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRidG5VcGxvYWQucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGJ0bkRlbGV0ZS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnVubG9jaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzc0NhbmNlbGxlZCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBmblN1Y2Nlc3MgPSBmdW5jdGlvbiAoZGF0YSwgdGV4dFN0YXR1cywganFYSFIpIHtcclxuICAgICAgICAgICAgICAgIHZhciBwaWQgPSBzZWxmLnNob3dQcmV2aWV3ICYmICR0aHVtYi5hdHRyKCdpZCcpID8gJHRodW1iLmF0dHIoJ2lkJykgOiBwcmV2aWV3SWQ7XHJcbiAgICAgICAgICAgICAgICBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmb3JtZGF0YSwganFYSFIsIGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgJC5leHRlbmQodHJ1ZSwgcGFyYW1zLCBvdXREYXRhKTtcclxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkaC5pc0VtcHR5KGRhdGEpIHx8ICRoLmlzRW1wdHkoZGF0YS5lcnJvcikpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuc2hvd1ByZXZpZXcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFRodW1iU3RhdHVzKCR0aHVtYiwgJ1N1Y2Nlc3MnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRidG5VcGxvYWQuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5pdFVwbG9hZFN1Y2Nlc3MoZGF0YSwgJHRodW1iLCBpc0JhdGNoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDEwMSwgJHByb2cpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxldXBsb2FkZWQnLCBbb3V0RGF0YSwgcGlkLCBpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaXNCYXRjaCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5maWxlTWFuYWdlci5yZW1vdmUoJHRodW1iKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVVwbG9hZExvZygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdXBsb2FkRmFpbGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyTXNnID0gc2VsZi5fcGFyc2VFcnJvcihvcCwganFYSFIsIHNlbGYubXNnVXBsb2FkRXJyb3IsIHNlbGYuZmlsZU1hbmFnZXIuZ2V0RmlsZU5hbWUoaWQpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2hvd0ZpbGVFcnJvcihlcnJNc2csIHBhcmFtcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByZXZpZXdFcnJvcigkdGh1bWIsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYucmV0cnlFcnJvclVwbG9hZHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRidG5VcGxvYWQuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc0JhdGNoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVVcGxvYWRMb2coKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcygxMDEsIHNlbGYuX2dldEZyYW1lKHBpZCkuZmluZCgnLmZpbGUtdGh1bWItcHJvZ3Jlc3MnKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYubXNnVXBsb2FkRXJyb3IpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgZm5Db21wbGV0ZSA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLnNob3dQcmV2aWV3KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRidG5VcGxvYWQucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGJ0bkRlbGV0ZS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIucmVtb3ZlQ2xhc3MoJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNCYXRjaCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnVubG9jayhmYWxzZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFyRmlsZUlucHV0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2hrQ29tcGxldGUoKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5pdFN1Y2Nlc3NUaHVtYnMoKTtcclxuICAgICAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgZm5FcnJvciA9IGZ1bmN0aW9uIChqcVhIUiwgdGV4dFN0YXR1cywgZXJyb3JUaHJvd24pIHtcclxuICAgICAgICAgICAgICAgIGVyck1zZyA9IHNlbGYuX3BhcnNlRXJyb3Iob3AsIGpxWEhSLCBlcnJvclRocm93biwgc2VsZi5maWxlTWFuYWdlci5nZXRGaWxlTmFtZShpZCkpO1xyXG4gICAgICAgICAgICAgICAgdXBsb2FkRmFpbGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciAkcHJvZztcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNCYXRjaCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVVcGxvYWRMb2coKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5maWxlTWFuYWdlci5zZXRQcm9ncmVzcyhpZCwgMTAwKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcmV2aWV3RXJyb3IoJHRodW1iLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYucmV0cnlFcnJvclVwbG9hZHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGJ0blVwbG9hZC5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICQuZXh0ZW5kKHRydWUsIHBhcmFtcywgc2VsZi5fZ2V0T3V0RGF0YShmb3JtZGF0YSwganFYSFIpKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcygxMDEsIHNlbGYuJHByb2dyZXNzLCBzZWxmLm1zZ0FqYXhQcm9ncmVzc0Vycm9yLnJlcGxhY2UoJ3tvcGVyYXRpb259Jywgb3ApKTtcclxuICAgICAgICAgICAgICAgICAgICAkcHJvZyA9IHNlbGYuc2hvd1ByZXZpZXcgJiYgJHRodW1iID8gJHRodW1iLmZpbmQoJy5maWxlLXRodW1iLXByb2dyZXNzJykgOiAnJztcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcygxMDEsICRwcm9nLCBzZWxmLm1zZ1VwbG9hZEVycm9yKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zaG93RmlsZUVycm9yKGVyck1zZywgcGFyYW1zKTtcclxuICAgICAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgZm9ybWRhdGEuYXBwZW5kKHNlbGYudXBsb2FkRmlsZUF0dHIsIGZpbGVPYmouZmlsZSwgZmlsZU5hbWUpO1xyXG4gICAgICAgICAgICBzZWxmLl9zZXRVcGxvYWREYXRhKGZvcm1kYXRhLCB7ZmlsZUlkOiBpZH0pO1xyXG4gICAgICAgICAgICBzZWxmLl9hamF4U3VibWl0KGZuQmVmb3JlLCBmblN1Y2Nlc3M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2V0T3V0RGF0YShmb3JtZGF0YSwganFYSFIpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5hamF4QWJvcnRlZCA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuc2hvd1ByZXZpZXcpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9nZXRUaHVtYnMoKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyICR0aHVtYiA9ICQodGhpcyksICRidG5VcGxvYWQgPSAkdGh1bWIuZmluZCgnLmt2LWZpbGUtdXBsb2FkJyksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYnRuRGVsZXRlID0gJHRodW1iLmZpbmQoJy5rdi1maWxlLXJlbW92ZScpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoISR0aHVtYi5oYXNDbGFzcygnZmlsZS1wcmV2aWV3LXN1Y2Nlc3MnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0VGh1bWJTdGF0dXMoJHRodW1iLCAnTG9hZGluZycpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGguYWRkQ3NzKCR0aHVtYiwgJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgJGJ0blVwbG9hZC5hdHRyKCdkaXNhYmxlZCcsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkYnRuRGVsZXRlLmF0dHIoJ2Rpc2FibGVkJywgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWJhdGNocHJldXBsb2FkJywgW291dERhdGFdKTtcclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLl9hYm9ydChvdXREYXRhKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGpxWEhSLmFib3J0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fZ2V0VGh1bWJzKCkuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciAkdGh1bWIgPSAkKHRoaXMpLCAkYnRuVXBsb2FkID0gJHRodW1iLmZpbmQoJy5rdi1maWxlLXVwbG9hZCcpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGJ0bkRlbGV0ZSA9ICR0aHVtYi5maW5kKCcua3YtZmlsZS1yZW1vdmUnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCR0aHVtYi5oYXNDbGFzcygnZmlsZS1wcmV2aWV3LWxvYWRpbmcnKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0VGh1bWJTdGF0dXMoJHRodW1iLCAnTmV3Jyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIucmVtb3ZlQ2xhc3MoJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgJGJ0blVwbG9hZC5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkYnRuRGVsZXRlLnJlbW92ZUF0dHIoJ2Rpc2FibGVkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0UHJvZ3Jlc3NDYW5jZWxsZWQoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgZm5TdWNjZXNzID0gZnVuY3Rpb24gKGRhdGEsIHRleHRTdGF0dXMsIGpxWEhSKSB7XHJcbiAgICAgICAgICAgICAgICAvKiogQG5hbWVzcGFjZSBkYXRhLmVycm9ya2V5cyAqL1xyXG4gICAgICAgICAgICAgICAgdmFyIG91dERhdGEgPSBzZWxmLl9nZXRPdXREYXRhKGZvcm1kYXRhLCBqcVhIUiwgZGF0YSksIGtleSA9IDAsXHJcbiAgICAgICAgICAgICAgICAgICAgJHRodW1icyA9IHNlbGYuX2dldFRodW1icygnOm5vdCguZmlsZS1wcmV2aWV3LXN1Y2Nlc3MpJyksXHJcbiAgICAgICAgICAgICAgICAgICAga2V5cyA9ICRoLmlzRW1wdHkoZGF0YSkgfHwgJGguaXNFbXB0eShkYXRhLmVycm9ya2V5cykgPyBbXSA6IGRhdGEuZXJyb3JrZXlzO1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICgkaC5pc0VtcHR5KGRhdGEpIHx8ICRoLmlzRW1wdHkoZGF0YS5lcnJvcikpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWJhdGNodXBsb2Fkc3VjY2VzcycsIFtvdXREYXRhXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2V0QWxsVXBsb2FkZWQoKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWJzLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICR0aHVtYiA9ICQodGhpcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRUaHVtYlN0YXR1cygkdGh1bWIsICdTdWNjZXNzJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIucmVtb3ZlQ2xhc3MoJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIuZmluZCgnLmt2LWZpbGUtdXBsb2FkJykuaGlkZSgpLnJlbW92ZUF0dHIoJ2Rpc2FibGVkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9pbml0VXBsb2FkU3VjY2VzcyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnJlc2V0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDEwMSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLnNob3dQcmV2aWV3KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICR0aHVtYnMuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgJHRodW1iID0gJCh0aGlzKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aHVtYi5yZW1vdmVDbGFzcygnZmlsZS11cGxvYWRpbmcnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aHVtYi5maW5kKCcua3YtZmlsZS11cGxvYWQnKS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRodW1iLmZpbmQoJy5rdi1maWxlLXJlbW92ZScpLnJlbW92ZUF0dHIoJ2Rpc2FibGVkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoa2V5cy5sZW5ndGggPT09IDAgfHwgJC5pbkFycmF5KGtleSwga2V5cykgIT09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0UHJldmlld0Vycm9yKCR0aHVtYiwgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFzZWxmLnJldHJ5RXJyb3JVcGxvYWRzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aHVtYi5maW5kKCcua3YtZmlsZS11cGxvYWQnKS5oaWRlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuZmlsZU1hbmFnZXIucmVtb3ZlKCR0aHVtYik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIuZmluZCgnLmt2LWZpbGUtdXBsb2FkJykuaGlkZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFRodW1iU3RhdHVzKCR0aHVtYiwgJ1N1Y2Nlc3MnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLnJlbW92ZSgkdGh1bWIpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEkdGh1bWIuaGFzQ2xhc3MoJ2ZpbGUtcHJldmlldy1lcnJvcicpIHx8IHNlbGYucmV0cnlFcnJvclVwbG9hZHMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXkrKztcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2luaXRVcGxvYWRTdWNjZXNzKGRhdGEpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBlcnJNc2cgPSBzZWxmLl9wYXJzZUVycm9yKG9wLCBqcVhIUiwgc2VsZi5tc2dVcGxvYWRFcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2hvd0ZpbGVFcnJvcihlcnJNc2csIG91dERhdGEsICdmaWxlYmF0Y2h1cGxvYWRlcnJvcicpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDEwMSwgc2VsZi4kcHJvZ3Jlc3MsIHNlbGYubXNnVXBsb2FkRXJyb3IpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBmbkNvbXBsZXRlID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi51bmxvY2soKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2luaXRTdWNjZXNzVGh1bWJzKCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9jbGVhckZpbGVJbnB1dCgpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGViYXRjaHVwbG9hZGNvbXBsZXRlJywgW3NlbGYuZmlsZU1hbmFnZXIuc3RhY2ssIHNlbGYuX2dldEV4dHJhRGF0YSgpXSk7XHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIGZuRXJyb3IgPSBmdW5jdGlvbiAoanFYSFIsIHRleHRTdGF0dXMsIGVycm9yVGhyb3duKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgb3V0RGF0YSA9IHNlbGYuX2dldE91dERhdGEoZm9ybWRhdGEsIGpxWEhSKTtcclxuICAgICAgICAgICAgICAgIGVyck1zZyA9IHNlbGYuX3BhcnNlRXJyb3Iob3AsIGpxWEhSLCBlcnJvclRocm93bik7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zaG93RmlsZUVycm9yKGVyck1zZywgb3V0RGF0YSwgJ2ZpbGViYXRjaHVwbG9hZGVycm9yJyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLnVwbG9hZEZpbGVDb3VudCA9IHRvdGFsIC0gMTtcclxuICAgICAgICAgICAgICAgIGlmICghc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNlbGYuX2dldFRodW1icygpLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciAkdGh1bWIgPSAkKHRoaXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICR0aHVtYi5yZW1vdmVDbGFzcygnZmlsZS11cGxvYWRpbmcnKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5maWxlTWFuYWdlci5nZXRGaWxlKCR0aHVtYi5hdHRyKCdkYXRhLWZpbGVpZCcpKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcmV2aWV3RXJyb3IoJHRodW1iKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2dldFRodW1icygpLnJlbW92ZUNsYXNzKCdmaWxlLXVwbG9hZGluZycpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fZ2V0VGh1bWJzKCcgLmt2LWZpbGUtdXBsb2FkJykucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2dldFRodW1icygnIC5rdi1maWxlLWRlbGV0ZScpLnJlbW92ZUF0dHIoJ2Rpc2FibGVkJyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcygxMDEsIHNlbGYuJHByb2dyZXNzLCBzZWxmLm1zZ0FqYXhQcm9ncmVzc0Vycm9yLnJlcGxhY2UoJ3tvcGVyYXRpb259Jywgb3ApKTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgdmFyIGN0ciA9IDA7XHJcbiAgICAgICAgICAgICQuZWFjaChzZWxmLmZpbGVNYW5hZ2VyLnN0YWNrLCBmdW5jdGlvbiAoa2V5LCBkYXRhKSB7XHJcbiAgICAgICAgICA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gICAgICBzZWxmLl9zZXRQcm9ncmVzcyg1MCk7XHJcbiAgICAgICAgICAgICAgICBwYXJhbXMuZGF0YSA9IG91dERhdGE7XHJcbiAgICAgICAgICAgICAgICBwYXJhbXMueGhyID0ganFYSFI7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5fYWJvcnQocGFyYW1zKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGpxWEhSLmFib3J0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2V0UHJvZ3Jlc3NDYW5jZWxsZWQoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgZm5TdWNjZXNzID0gZnVuY3Rpb24gKGRhdGEsIHRleHRTdGF0dXMsIGpxWEhSKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgb3V0RGF0YSA9IHNlbGYuX2dldE91dERhdGEoZm9ybWRhdGEsIGpxWEhSLCBkYXRhKTtcclxuICAgICAgICAgICAgICAgIGlmICgkaC5pc0VtcHR5KGRhdGEpIHx8ICRoLmlzRW1wdHkoZGF0YS5lcnJvcikpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWJhdGNodXBsb2Fkc3VjY2VzcycsIFtvdXREYXRhXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fY2xlYXJGaWxlSW5wdXQoKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9pbml0VXBsb2FkU3VjY2VzcyhkYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcygxMDEpO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBlcnJNc2cgPSBzZWxmLl9wYXJzZUVycm9yKG9wLCBqcVhIUiwgc2VsZi5tc2dVcGxvYWRFcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2hvd0ZpbGVFcnJvcihlcnJNc2csIG91dERhdGEsICdmaWxlYmF0Y2h1cGxvYWRlcnJvcicpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBmbkNvbXBsZXRlID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi51bmxvY2soKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFyRmlsZUlucHV0KCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWJhdGNodXBsb2FkY29tcGxldGUnLCBbc2VsZi5maWxlTWFuYWdlci5zdGFjaywgc2VsZi5fZ2V0RXh0cmFEYXRhKCldKTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgZm5FcnJvciA9IGZ1bmN0aW9uIChqcVhIUiwgdGV4dFN0YXR1cywgZXJyb3JUaHJvd24pIHtcclxuICAgICAgICAgICAgICAgIHZhciBvdXREYXRhID0gc2VsZi5fZ2V0T3V0RGF0YShmb3JtZGF0YSwganFYSFIpO1xyXG4gICAgICAgICAgICAgICAgZXJyTXNnID0gc2VsZi5fcGFyc2VFcnJvcihvcCwganFYSFIsIGVycm9yVGhyb3duKTtcclxuICAgICAgICAgICAgICAgIHBhcmFtcy5kYXRhID0gb3V0RGF0YTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3Nob3dGaWxlRXJyb3IoZXJyTXNnLCBvdXREYXRhLCAnZmlsZWJhdGNodXBsb2FkZXJyb3InKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDEwMSwgc2VsZi4kcHJvZ3Jlc3MsIHNlbGYubXNnQWpheFByb2dyZXNzRXJyb3IucmVwbGFjZSgne29wZXJhdGlvbn0nLCBvcCkpO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZWxmLl9hamF4U3VibWl0KGZuQmVmb3JlLCBmblN1Y2Nlc3MsIGZuQ29tcGxldGUsIGZuRXJyb3IsIGZvcm1kYXRhKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9kZWxldGVGaWxlSW5kZXg6IGZ1bmN0aW9uICgkZnJhbWUpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBpbmQgPSAkZnJhbWUuYXR0cignZGF0YS1maWxlaW5kZXgnKSwgcmV2ID0gc2VsZi5yZXZlcnNlUHJldmlld09yZGVyO1xyXG4gICAgICAgICAgICBpZiAoaW5kLnN1YnN0cmluZygwLCA1KSA9PT0gJGguSU5JVF9GTEFHKSB7XHJcbiAgICAgICAgICAgICAgICBpbmQgPSBwYXJzZUludChpbmQucmVwbGFjZSgkaC5JTklUX0ZMQUcsICcnKSk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLmluaXRpYWxQcmV2aWV3ID0gJGguc3BsaWNlQXJyYXkoc2VsZi5pbml0aWFsUHJldmlldywgaW5kLCByZXYpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5pbml0aWFsUHJldmlld0NvbmZpZyA9ICRoLnNwbGljZUFycmF5KHNlbGYuaW5pdGlhbFByZXZpZXdDb25maWcsIGluZCwgcmV2KTtcclxuICAgICAgICAgICAgICAgIHNlbGYuaW5pdGlhbFByZXZpZXdUaHVtYlRhZ3MgPSAkaC5zcGxpY2VBcnJheShzZWxmLmluaXRpYWxQcmV2aWV3VGh1bWJUYWdzLCBpbmQsIHJldik7XHJcbiAgICAgICAgICAgICAgICBzZWxmLmdldEZyYW1lcygpLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciAkbkZyYW1lID0gJCh0aGlzKSwgbkluZCA9ICRuRnJhbWUuYXR0cignZGF0YS1maWxlaW5kZXgnKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAobkluZC5zdWJzdHJpbmcoMCwgNSkgPT09ICRoLklOSVRfRkxBRykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuSW5kID0gcGFyc2VJbnQobkluZC5yZXBsYWNlKCRoLklOSVRfRkxBRywgJycpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5JbmQgPiBpbmQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5JbmQtLTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRuRnJhbWUuYXR0cignZGF0YS1maWxlaW5kZXgnLCAkaC5JTklUX0ZMQUcgKyBuSW5kKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfcmVzZXRDYXB0aW9uOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgY2FwLCBuLCBjaGsgPSBzZWxmLnByZXZpZXdDYWNoZS5jb3VudCh0cnVlKSwgbGVuID0gc2VsZi5maWxlTWFuYWdlci5jb3VudCgpLCBmaWxlLFxyXG4gICAgICAgICAgICAgICAgICAgIGluY29tcGxldGUgPSAnOm5vdCguZmlsZS1wcmV2aWV3LXN1Y2Nlc3MpOm5vdCguZmlsZS1wcmV2aWV3LWVycm9yKScsXHJcbiAgICAgICAgICAgICAgICAgICAgaGFzVGh1bWIgPSBzZWxmLnNob3dQcmV2aWV3ICYmIHNlbGYuZ2V0RnJhbWVzKGluY29tcGxldGUpLmxlbmd0aDtcclxuICAgICAgICAgICAgICAgIGlmIChsZW4gPT09IDAgJiYgY2hrID09PSAwICYmICFoYXNUaHVtYikge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYucmVzZXQoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbiA9IGNoayArIGxlbjtcclxuICAgICAgICAgICAgICAgICAgICBpZiAobiA+IDEpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2FwID0gc2VsZi5fZ2V0TXNnU2VsZWN0ZWQobik7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZSA9IHNlbGYuZmlsZU1hbmFnZXIuZ2V0Rmlyc3RGaWxlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhcCA9IGZpbGUgPyBmaWxlLm5hbWVGbXQgOiAnXyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldENhcHRpb24oY2FwKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSwgc2VsZi5wcm9jZXNzRGVsYXkpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2luaXRGaWxlQWN0aW9uczogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX2luaXRab29tQnV0dG9uKCk7XHJcbiAgICAgICAgICAgIHNlbGYuZ2V0RnJhbWVzKCcgLmt2LWZpbGUtcmVtb3ZlJykuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgJGVsID0gJCh0aGlzKSwgJGZyYW1lID0gJGVsLmNsb3Nlc3QoJGguRlJBTUVTKSwgaGFzRXJyb3IsIGlkID0gJGZyYW1lLmF0dHIoJ2lkJyksXHJcbiAgICAgICAgICAgICAgICAgICAgaW5kID0gJGZyYW1lLmF0dHIoJ2RhdGEtZmlsZWluZGV4JyksIHN0YXR1cztcclxuICAgICAgICAgICAgICAgIHNlbGYuX2hhbmRsZXIoJGVsLCAnY2xpY2snLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gc2VsZi5fcmFpc2UoJ2ZpbGVwcmVyZW1vdmUnLCBbaWQsIGluZF0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGF0dXMgPT09IGZhbHNlIHx8ICFzZWxmLl92YWxpZGF0ZU1pbkNvdW50KCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBoYXNFcnJvciA9ICRmcmFtZS5oYXNDbGFzcygnZmlsZS1wcmV2aWV3LWVycm9yJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgJGguY2xlYW5NZW1vcnkoJGZyYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICAkZnJhbWUuZmFkZU91dCgnc2xvdycsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGguY2xlYW5ab29tQ2FjaGUoc2VsZi5fZ2V0Wm9vbShpZCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLnJlbW92ZSgkZnJhbWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9jbGVhck9iamVjdHMoJGZyYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGZyYW1lLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaWQgJiYgaGFzRXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuJGVycm9yQ29udGFpbmVyLmZpbmQoJ2xpW2RhdGEtdGh1bWItaWQ9XCInICsgaWQgKyAnXCJdJykuZmFkZU91dCgnZmFzdCcsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi5fZXJyb3JzRXhpc3QoKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yZXNldEVycm9ycygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2NsZWFyRmlsZUlucHV0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3Jlc2V0Q2FwdGlvbigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZXJlbW92ZWQnLCBbaWQsIGluZF0pO1xyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBzZWxmLmdldEZyYW1lcygnIC5rdi1maWxlLXVwbG9hZCcpLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyICRlbCA9ICQodGhpcyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCRlbCwgJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciAkZnJhbWUgPSAkZWwuY2xvc2VzdCgkaC5GUkFNRVMpLCBmaWxlSWQgPSAkZnJhbWUuYXR0cignZGF0YS1maWxlaWQnKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9oaWRlUHJvZ3Jlc3MoKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoJGZyYW1lLmhhc0NsYXNzKCdmaWxlLXByZXZpZXctZXJyb3InKSAmJiAhc2VsZi5yZXRyeUVycm9yVXBsb2Fkcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3VwbG9hZFNpbmdsZShzZWxmLmZpbGVNYW5hZ2VyLmdldEluZGV4KGZpbGVJZCksIGZpbGVJZCwgZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2luaXRQcmV2aWV3QWN0aW9uczogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRwcmV2aWV3ID0gc2VsZi4kcHJldmlldywgZGVsZXRlRXh0cmFEYXRhID0gc2VsZi5kZWxldGVFeHRyYURhdGEgfHwge30sXHJcbiAgICAgICAgICAgICAgICBidG5SZW1vdmUgPSAkaC5GUkFNRVMgKyAnIC5rdi1maWxlLXJlbW92ZScsIHNldHRpbmdzID0gc2VsZi5maWxlQWN0aW9uU2V0dGluZ3MsXHJcbiAgICAgICAgICAgICAgICBvcmlnQ2xhc3MgPSBzZXR0aW5ncy5yZW1vdmVDbGFzcywgZXJyQ2xhc3MgPSBzZXR0aW5ncy5yZW1vdmVFcnJvckNsYXNzLFxyXG4gICAgICAgICAgICAgICAgcmVzZXRQcm9ncmVzcyA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgaGFzRmlsZXMgPSBzZWxmLmlzQWpheFVwbG9hZCA/IHNlbGYucHJldmlld0NhY2hlLmNvdW50KHRydWUpIDogc2VsZi5faW5wdXRGaWxlQ291bnQoKTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYuZ2V0RnJhbWVzKCkubGVuZ3RoICYmICFoYXNGaWxlcykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRDYXB0aW9uKCcnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5yZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmluaXRpYWxDYXB0aW9uID0gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgc2VsZi5faW5pdFpvb21CdXR0b24oKTtcclxuICAgICAgICAgICAgJHByZXZpZXcuZmluZChidG5SZW1vdmUpLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgdmFyICRlbCA9ICQodGhpcyksIHZVcmwgPSAkZWwuZGF0YSgndXJsJykgfHwgc2VsZi5kZWxldGVVcmwsIHZLZXkgPSAkZWwuZGF0YSgna2V5JyksIGVyck1zZywgZm5CZWZvcmUsXHJcbiAgICAgICAgICAgICAgICAgICAgZm5TdWNjZXNzLCBmbkVycm9yLCBvcCA9IHNlbGYuYWpheE9wZXJhdGlvbnMuZGVsZXRlVGh1bWI7XHJcbiAgICAgICAgICAgICAgICBpZiAoJGguaXNFbXB0eSh2VXJsKSB8fCB2S2V5ID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZVcmwgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgICAgICAgICB2VXJsID0gdlVybCgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdmFyICRmcmFtZSA9ICRlbC5jbG9zZXN0KCRoLkZSQU1FUyksIGNhY2hlID0gc2VsZi5wcmV2aWV3Q2FjaGUuZGF0YSwgc2V0dGluZ3MsIHBhcmFtcywgY29uZmlnLFxyXG4gICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lLCBleHRyYURhdGEsIGluZGV4ID0gJGZyYW1lLmF0dHIoJ2RhdGEtZmlsZWluZGV4Jyk7XHJcbiAgICAgICAgICAgICAgICBpbmRleCA9IHBhcnNlSW50KGluZGV4LnJlcGxhY2UoJGguSU5JVF9GTEFHLCAnJykpO1xyXG4gICAgICAgICAgICAgICAgY29uZmlnID0gJGguaXNFbXB0eShjYWNoZS5jb25maWcpICYmICRoLmlzRW1wdHkoY2FjaGUuY29uZmlnW2luZGV4XSkgPyBudWxsIDogY2FjaGUuY29uZmlnW2luZGV4XTtcclxuICAgICAgICAgICAgICAgIGV4dHJhRGF0YSA9ICRoLmlzRW1wdHkoY29uZmlnKSB8fCAkaC5pc0VtcHR5KGNvbmZpZy5leHRyYSkgPyBkZWxldGVFeHRyYURhdGEgOiBjb25maWcuZXh0cmE7XHJcbiAgICAgICAgICAgICAgICBmaWxlTmFtZSA9IGNvbmZpZy5maWxlbmFtZSB8fCBjb25maWcuY2FwdGlvbiB8fCAnJztcclxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmFEYXRhID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZXh0cmFEYXRhID0gZXh0cmFEYXRhKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBwYXJhbXMgPSB7aWQ6ICRlbC5hdHRyKCdpZCcpLCBrZXk6IHZLZXksIGV4dHJhOiBleHRyYURhdGF9O1xyXG4gICAgICAgICAgICAgICAgZm5CZWZvcmUgPSBmdW5jdGlvbiAoanFYSFIpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmFqYXhBYm9ydGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVwcmVkZWxldGUnLCBbdktleSwganFYSFIsIGV4dHJhRGF0YV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLl9hYm9ydCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGpxWEhSLmFib3J0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGVsLnJlbW92ZUNsYXNzKGVyckNsYXNzKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGguYWRkQ3NzKCRmcmFtZSwgJ2ZpbGUtdXBsb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRoLmFkZENzcygkZWwsICdkaXNhYmxlZCAnICsgb3JpZ0NsYXNzKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgZm5TdWNjZXNzID0gZnVuY3Rpb24gKGRhdGEsIHRleHRTdGF0dXMsIGpxWEhSKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIG4sIGNhcDtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoISRoLmlzRW1wdHkoZGF0YSkgJiYgISRoLmlzRW1wdHkoZGF0YS5lcnJvcikpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmpxWEhSID0ganFYSFI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5yZXNwb25zZSA9IGRhdGE7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGVyck1zZyA9IHNlbGYuX3BhcnNlRXJyb3Iob3AsIGpxWEhSLCBzZWxmLm1zZ0RlbGV0ZUVycm9yLCBmaWxlTmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3Nob3dGaWxlRXJyb3IoZXJyTXNnLCBwYXJhbXMsICdmaWxlZGVsZXRlZXJyb3InKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGZyYW1lLnJlbW92ZUNsYXNzKCdmaWxlLXVwbG9hZGluZycpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkZWwucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkICcgKyBvcmlnQ2xhc3MpLmFkZENsYXNzKGVyckNsYXNzKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzZXRQcm9ncmVzcygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICRmcmFtZS5yZW1vdmVDbGFzcygnZmlsZS11cGxvYWRpbmcnKS5hZGRDbGFzcygnZmlsZS1kZWxldGVkJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgJGZyYW1lLmZhZGVPdXQoJ3Nsb3cnLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ID0gcGFyc2VJbnQoKCRmcmFtZS5hdHRyKCdkYXRhLWZpbGVpbmRleCcpKS5yZXBsYWNlKCRoLklOSVRfRkxBRywgJycpKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5wcmV2aWV3Q2FjaGUudW5zZXQoaW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9kZWxldGVGaWxlSW5kZXgoJGZyYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IHNlbGYucHJldmlld0NhY2hlLmNvdW50KHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXAgPSBuID4gMCA/IHNlbGYuX2dldE1zZ1NlbGVjdGVkKG4pIDogJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldENhcHRpb24oY2FwKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVkZWxldGVkJywgW3ZLZXksIGpxWEhSLCBleHRyYURhdGFdKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGguY2xlYW5ab29tQ2FjaGUoc2VsZi5fZ2V0Wm9vbSgkZnJhbWUuYXR0cignaWQnKSkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9jbGVhck9iamVjdHMoJGZyYW1lKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJGZyYW1lLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNldFByb2dyZXNzKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgZm5FcnJvciA9IGZ1bmN0aW9uIChqcVhIUiwgdGV4dFN0YXR1cywgZXJyb3JUaHJvd24pIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgZXJyTXNnID0gc2VsZi5fcGFyc2VFcnJvcihvcCwganFYSFIsIGVycm9yVGhyb3duLCBmaWxlTmFtZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmpxWEhSID0ganFYSFI7XHJcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnJlc3BvbnNlID0ge307XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2hvd0ZpbGVFcnJvcihlcnJNc2csIHBhcmFtcywgJ2ZpbGVkZWxldGVlcnJvcicpO1xyXG4gICAgICAgICAgICAgICAgICAgICRmcmFtZS5yZW1vdmVDbGFzcygnZmlsZS11cGxvYWRpbmcnKTtcclxuICAgICAgICAgICAgICAgICAgICAkZWwucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkICcgKyBvcmlnQ2xhc3MpLmFkZENsYXNzKGVyckNsYXNzKTtcclxuICAgICAgICAgICAgICAgICAgICByZXNldFByb2dyZXNzKCk7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgc2VsZi5faW5pdEFqYXhTZXR0aW5ncygpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fbWVyZ2VBamF4Q2FsbGJhY2soJ2JlZm9yZVNlbmQnLCBmbkJlZm9yZSwgJ2RlbGV0ZScpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fbWVyZ2VBamF4Q2FsbGJhY2soJ3N1Y2Nlc3MnLCBmblN1Y2Nlc3MsICdkZWxldGUnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX21lcmdlQWpheENhbGxiYWNrKCdlcnJvcicsIGZuRXJyb3IsICdkZWxldGUnKTtcclxuICAgICAgICAgICAgICAgIHNldHRpbmdzID0gJC5leHRlbmQodHJ1ZSwge30sIHtcclxuICAgICAgICAgICAgICAgICAgICB1cmw6IHNlbGYuX2VuY29kZVVSSSh2VXJsKSxcclxuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnUE9TVCcsXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcclxuICAgICAgICAgICAgICAgICAgICBkYXRhOiAkLmV4dGVuZCh0cnVlLCB7fSwge2tleTogdktleX0sIGV4dHJhRGF0YSlcclxuICAgICAgICAgICAgICAgIH0sIHNlbGYuX2FqYXhEZWxldGVTZXR0aW5ncyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCRlbCwgJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi5fdmFsaWRhdGVNaW5Db3VudCgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5hamF4QWJvcnRlZCA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlYmVmb3JlZGVsZXRlJywgW3ZLZXksIGV4dHJhRGF0YV0pO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vbm9pbnNwZWN0aW9uIEpTVW5yZXNvbHZlZFZhcmlhYmxlLEpTSGludFxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLmFqYXhBYm9ydGVkIGluc3RhbmNlb2YgUHJvbWlzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmFqYXhBYm9ydGVkLnRoZW4oZnVuY3Rpb24gKHJlc3VsdCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXN1bHQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkLmFqYXgoc2V0dGluZ3MpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYuYWpheEFib3J0ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQuYWpheChzZXR0aW5ncyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaGlkZUZpbGVJY29uOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgaWYgKHNlbGYub3ZlcndyaXRlSW5pdGlhbCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kY2FwdGlvbkNvbnRhaW5lci5yZW1vdmVDbGFzcygnaWNvbi12aXNpYmxlJyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zaG93RmlsZUljb246IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICAkaC5hZGRDc3Moc2VsZi4kY2FwdGlvbkNvbnRhaW5lciwgJ2ljb24tdmlzaWJsZScpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2dldFNpemU6IGZ1bmN0aW9uIChieXRlcywgc2l6ZXMpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBzaXplID0gcGFyc2VGbG9hdChieXRlcyksIGksIGZ1bmMgPSBzZWxmLmZpbGVTaXplR2V0dGVyLCBvdXQ7XHJcbiAgICAgICAgICAgIGlmICghJC5pc051bWVyaWMoYnl0ZXMpIHx8ICEkLmlzTnVtZXJpYyhzaXplKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuICcnO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICh0eXBlb2YgZnVuYyA9PT0gJ2Z1bmN0aW9uJykge1xyXG4gICAgICAgICAgICAgICAgb3V0ID0gZnVuYyhzaXplKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmIChzaXplID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgb3V0ID0gJzAuMDAgQic7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGkgPSBNYXRoLmZsb29yKE1hdGgubG9nKHNpemUpIC8gTWF0aC5sb2coMTAyNCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghc2l6ZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZXMgPSBbJ0InLCAnS0InLCAnTUInLCAnR0InLCAnVEInLCAnUEInLCAnRUInLCAnWkInLCAnWUInXTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgb3V0ID0gKHNpemUgLyBNYXRoLnBvdygxMDI0LCBpKSkudG9GaXhlZCgyKSAqIDEgKyAnICcgKyBzaXplc1tpXTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gc2VsZi5fZ2V0TGF5b3V0VGVtcGxhdGUoJ3NpemUnKS5yZXBsYWNlKCd7c2l6ZVRleHR9Jywgb3V0KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9nZXRGaWxlVHlwZTogZnVuY3Rpb24gKGZ0eXBlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYubWltZVR5cGVBbGlhc2VzW2Z0eXBlXSB8fCBmdHlwZTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9nZW5lcmF0ZVByZXZpZXdUZW1wbGF0ZTogZnVuY3Rpb24gKFxyXG4gICAgICAgICAgICBjYXQsXHJcbiAgICAgICAgICAgIGRhdGEsXHJcbiAgICAgICAgICAgIGZuYW1lLFxyXG4gICAgICAgICAgICBmdHlwZSxcclxuICAgICAgICAgICAgcHJldmlld0lkLFxyXG4gICAgICAgICAgICBmaWxlSWQsXHJcbiAgICAgICAgICAgIGlzRXJyb3IsXHJcbiAgICAgICAgICAgIHNpemUsXHJcbiAgICAgICAgICAgIGZyYW1lQ2xhc3MsXHJcbiAgICAgICAgICAgIGZvb3QsXHJcbiAgICAgICAgICAgIGluZCxcclxuICAgICAgICAgICAgdGVtcGwsXHJcbiAgICAgICAgICAgIGF0dHJzLFxyXG4gICAgICAgICAgICB6b29tRGF0YVxyXG4gICAgICAgICkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGNhcHRpb24gPSBzZWxmLnNsdWcoZm5hbWUpLCBwcmV2Q29udGVudCwgem9vbUNvbnRlbnQgPSAnJywgc3R5bGVBdHRyaWJzID0gJycsXHJcbiAgICAgICAgICAgICAgICBzY3JlZW5XID0gd2luZG93LmlubmVyV2lkdGggfHwgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmNsaWVudFdpZHRoIHx8IGRvY3VtZW50LmJvZHkuY2xpZW50V2lkdGgsXHJcbiAgICAgICAgICAgICAgICBjb25maWcsIHRpdGxlID0gY2FwdGlvbiwgYWx0ID0gY2FwdGlvbiwgdHlwZUNzcyA9ICd0eXBlLWRlZmF1bHQnLCBnZXRDb250ZW50LFxyXG4gICAgICAgICAgICAgICAgZm9vdGVyID0gZm9vdCB8fCBzZWxmLl9yZW5kZXJGaWxlRm9vdGVyKGNhdCwgY2FwdGlvbiwgc2l6ZSwgJ2F1dG8nLCBpc0Vycm9yKSxcclxuICAgICAgICAgICAgICAgIGZvcmNlUHJldkljb24gPSBzZWxmLnByZWZlckljb25pY1ByZXZpZXcsIGZvcmNlWm9vbUljb24gPSBzZWxmLnByZWZlckljb25pY1pvb21QcmV2aWV3LFxyXG4gICAgICAgICAgICAgICAgbmV3Q2F0ID0gZm9yY2VQcmV2SWNvbiA/ICdvdGhlcicgOiBjYXQ7XHJcbiAgICAgICAgICAgIGNvbmZpZyA9IHNjcmVlblcgPCA0MDAgPyAoc2VsZi5wcmV2aWV3U2V0dGluZ3NTbWFsbFtuZXdDYXRdIHx8IHNlbGYuZGVmYXVsdHMucHJldmlld1NldHRpbmdzU21hbGxbbmV3Q2F0XSkgOlxyXG4gICAgICAgICAgICAgICAgKHNlbGYucHJldmlld1NldHRpbmdzW25ld0NhdF0gfHwgc2VsZi5kZWZhdWx0cy5wcmV2aWV3U2V0dGluZ3NbbmV3Q2F0XSk7XHJcbiAgICAgICAgICAgIGlmIChjb25maWcpIHtcclxuICAgICAgICAgICAgICAgICQuZWFjaChjb25maWcsIGZ1bmN0aW9uIChrZXksIHZhbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHN0eWxlQXR0cmlicyArPSBrZXkgKyAnOicgKyB2YWwgKyAnOyc7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBnZXRDb250ZW50ID0gZnVuY3Rpb24gKGMsIGQsIHpvb20sIGZyYW1lQ3NzKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgaWQgPSB6b29tID8gJ3pvb20tJyArIHByZXZpZXdJZCA6IHByZXZpZXdJZCwgdG1wbHQgPSBzZWxmLl9nZXRQcmV2aWV3VGVtcGxhdGUoYyksXHJcbiAgICAgICAgICAgICAgICAgICAgY3NzID0gKGZyYW1lQ2xhc3MgfHwgJycpICsgJyAnICsgZnJhbWVDc3M7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5mcmFtZUNsYXNzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY3NzID0gc2VsZi5mcmFtZUNsYXNzICsgJyAnICsgY3NzO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKHpvb20pIHtcclxuICAgICAgICAgICAgICAgICAgICBjc3MgPSBjc3MucmVwbGFjZSgnICcgKyAkaC5TT1JUX0NTUywgJycpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdG1wbHQgPSBzZWxmLl9wYXJzZUZpbGVQcmV2aWV3SWNvbih0bXBsdCwgZm5hbWUpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGMgPT09ICd0ZXh0Jykge1xyXG4gICAgICAgICAgICAgICAgICAgIGQgPSAkaC5odG1sRW5jb2RlKGQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKGNhdCA9PT0gJ29iamVjdCcgJiYgIWZ0eXBlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJC5lYWNoKHNlbGYuZGVmYXVsdHMuZmlsZVR5cGVTZXR0aW5ncywgZnVuY3Rpb24gKGtleSwgZnVuYykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSAnb2JqZWN0JyB8fCBrZXkgPT09ICdvdGhlcicpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZnVuYyhmbmFtZSwgZnR5cGUpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlQ3NzID0gJ3R5cGUtJyArIGtleTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKCEkaC5pc0VtcHR5KGF0dHJzKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhdHRycy50aXRsZSAhPT0gdW5kZWZpbmVkICYmIGF0dHJzLnRpdGxlICE9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gYXR0cnMudGl0bGU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGlmIChhdHRycy5hbHQgIT09IHVuZGVmaW5lZCAmJiBhdHRycy5hbHQgIT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSBhdHRycy5hbHQ7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRtcGx0LnNldFRva2Vucyh7XHJcbiAgICAgICAgICAgICAgICAgICAgJ3ByZXZpZXdJZCc6IGlkLFxyXG4gICAgICAgICAgICAgICAgICAgICdjYXB0aW9uJzogY2FwdGlvbixcclxuICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiB0aXRsZSxcclxuICAgICAgICAgICAgICAgICAgICAnYWx0JzogYWx0LFxyXG4gICAgICAgICAgICAgICAgICAgICdmcmFtZUNsYXNzJzogY3NzLFxyXG4gICAgICAgICAgICAgICAgICAgICd0eXBlJzogc2VsZi5fZ2V0RmlsZVR5cGUoZnR5cGUpLFxyXG4gICAgICAgICAgICAgICAgICAgICdmaWxlaW5kZXgnOiBpbmQsXHJcbiAgICAgICAgICAgICAgICAgICAgJ2ZpbGVpZCc6IGZpbGVJZCB8fCAnJyxcclxuICAgICAgICAgICAgICAgICAgICAndHlwZUNzcyc6IHR5cGVDc3MsXHJcbiAgICAgICAgICAgICAgICAgICAgJ2Zvb3Rlcic6IGZvb3RlcixcclxuICAgICAgICAgICAgICAgICAgICAnZGF0YSc6IGQsXHJcbiAgICAgICAgICAgICAgICAgICAgJ3RlbXBsYXRlJzogdGVtcGwgfHwgY2F0LFxyXG4gICAgICAgICAgICAgICAgICAgICdzdHlsZSc6IHN0eWxlQXR0cmlicyA/ICdzdHlsZT1cIicgKyBzdHlsZUF0dHJpYnMgKyAnXCInIDogJydcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBpbmQgPSBpbmQgfHwgcHJldmlld0lkLnNsaWNlKHByZXZpZXdJZC5sYXN0SW5kZXhPZignLScpICsgMSk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmZpbGVBY3Rpb25TZXR0aW5ncy5zaG93Wm9vbSkge1xyXG4gICAgICAgICAgICAgICAgem9vbUNvbnRlbnQgPSBnZXRDb250ZW50KChmb3JjZVpvb21JY29uID8gJ290aGVyJyA6IGNhdCksIHpvb21EYXRhID8gem9vbURhdGEgOiBkYXRhLCB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgICdrdi16b29tLXRodW1iJyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgem9vbUNvbnRlbnQgPSAnXFxuJyArIHNlbGYuX2dldExheW91dFRlbXBsYXRlKCd6b29tQ2FjaGUnKS5yZXBsYWNlKCd7em9vbUNvbnRlbnR9Jywgem9vbUNvbnRlbnQpO1xyXG4gICAgICAgICAgICBpZiAodHlwZW9mIHNlbGYuc2FuaXRpemVab29tQ2FjaGUgPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgICAgIHpvb21Db250ZW50ID0gc2VsZi5zYW5pdGl6ZVpvb21DYWNoZSh6b29tQ29udGVudCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcHJldkNvbnRlbnQgPSBnZXRDb250ZW50KChmb3JjZVByZXZJY29uID8gJ290aGVyJyA6IGNhdCksIGRhdGEsIGZhbHNlLCAna3YtcHJldmlldy10aHVtYicpO1xyXG4gICAgICAgICAgICByZXR1cm4gcHJldkNvbnRlbnQgKyB6b29tQ29udGVudDtcclxuICAgICAgICB9LFxyXG4gIC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clxuICAgICAgICB9LFxyXG4gICAgICAgIF9zZXRUaHVtYkF0dHI6IGZ1bmN0aW9uIChpZCwgY2FwdGlvbiwgc2l6ZSkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRmcmFtZSA9IHNlbGYuX2dldEZyYW1lKGlkKTtcclxuICAgICAgICAgICAgaWYgKCRmcmFtZS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgIHNpemUgPSBzaXplICYmIHNpemUgPiAwID8gc2VsZi5fZ2V0U2l6ZShzaXplKSA6ICcnO1xyXG4gICAgICAgICAgICAgICAgJGZyYW1lLmRhdGEoeydjYXB0aW9uJzogY2FwdGlvbiwgJ3NpemUnOiBzaXplfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zZXRJbml0VGh1bWJBdHRyOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgZGF0YSA9IHNlbGYucHJldmlld0NhY2hlLmRhdGEsIGxlbiA9IHNlbGYucHJldmlld0NhY2hlLmNvdW50KHRydWUpLCBjb25maWcsXHJcbiAgICAgICAgICAgICAgICBjYXB0aW9uLCBzaXplLCBwcmV2aWV3SWQ7XHJcbiAgICAgICAgICAgIGlmIChsZW4gPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBjb25maWcgPSBkYXRhLmNvbmZpZ1tpXTtcclxuICAgICAgICAgICAgICAgIHByZXZpZXdJZCA9IHNlbGYucHJldmlld0luaXRJZCArICctJyArICRoLklOSVRfRkxBRyArIGk7XHJcbiAgICAgICAgICAgICAgICBjYXB0aW9uID0gJGguaWZTZXQoJ2NhcHRpb24nLCBjb25maWcsICRoLmlmU2V0KCdmaWxlbmFtZScsIGNvbmZpZykp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ICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgbGFiZWwgPSBuYW1lID8gc2VsZi5zbHVnKG5hbWUpIDogJ18nO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG4gPSBzZWxmLmlzQWpheFVwbG9hZCA/IHNlbGYuZmlsZU1hbmFnZXIuY291bnQoKSA6IG51bUZpbGVzO1xyXG4gICAgICAgICAgICBuRmlsZXMgPSBzZWxmLnByZXZpZXdDYWNoZS5jb3VudCh0cnVlKSArIG47XHJcbiAgICAgICAgICAgIGxvZyA9IG4gPT09IDEgPyBsYWJlbCA6IHNlbGYuX2dldE1zZ1NlbGVjdGVkKG5GaWxlcyk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmlzRXJyb3IpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuJHByZXZpZXdDb250YWluZXIucmVtb3ZlQ2xhc3MoJ2ZpbGUtdGh1bWItbG9hZGluZycpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kcHJldmlld1N0YXR1cy5odG1sKCcnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuJGNhcHRpb25Db250YWluZXIucmVtb3ZlQ2xhc3MoJ2ljb24tdmlzaWJsZScpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fc2hvd0ZpbGVJY29uKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fc2V0Q2FwdGlvbihsb2csIHNlbGYuaXNFcnJvcik7XHJcbiAgICAgICAgICAgIHNlbGYuJGNvbnRhaW5lci5yZW1vdmVDbGFzcygnZmlsZS1pbnB1dC1uZXcgZmlsZS1pbnB1dC1hamF4LW5ldycpO1xyXG4gICAgICAgICAgICBpZiAoIXNraXBSYWlzZUV2ZW50KSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZXNlbGVjdCcsIFtudW1GaWxlcywgbGFiZWxdKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2VsZi5wcmV2aWV3Q2FjaGUuY291bnQodHJ1ZSkpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2luaXRQcmV2aWV3QWN0aW9ucygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfc2V0VGh1bWJTdGF0dXM6IGZ1bmN0aW9uICgkdGh1bWIsIHN0YXR1cykge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5zaG93UHJldmlldykge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHZhciBpY29uID0gJ2luZGljYXRvcicgKyBzdGF0dXMsIG1zZyA9IGljb24gKyAnVGl0bGUnLFxyXG4gICAgICAgICAgICAgICAgY3NzID0gJ2ZpbGUtcHJldmlldy0nICsgc3RhdHVzLnRvTG93ZXJDYXNlKCksXHJcbiAgICAgICAgICAgICAgICAkaW5kaWNhdG9yID0gJHRodW1iLmZpbmQoJy5maWxlLXVwbG9hZC1pbmRpY2F0b3InKSxcclxuICAgICAgICAgICAgICAgIGNvbmZpZyA9IHNlbGYuZmlsZUFjdGlvblNldHRpbmdzO1xyXG4gICAgICAgICAgICAkdGh1bWIucmVtb3ZlQ2xhc3MoJ2ZpbGUtcHJldmlldy1zdWNjZXNzIGZpbGUtcHJldmlldy1lcnJvciBmaWxlLXByZXZpZXctcGF1c2VkIGZpbGUtcHJldmlldy1sb2FkaW5nJyk7XHJcbiAgICAgICAgICAgIGlmIChzdGF0dXMgPT09ICdTdWNjZXNzJykge1xyXG4gICAgICAgICAgICAgICAgJHRodW1iLmZpbmQoJy5maWxlLWRyYWctaGFuZGxlJykucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgJGluZGljYXRvci5odG1sKGNvbmZpZ1tpY29uXSk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AgICAgdGVtcGxhdGUgPSBwY3QgPCAxMDAgPyBzZWxmLnByb2dyZXNzVGVtcGxhdGUgOlxyXG4gICAgICAgICAgICAgICAgICAgIChlcnJvciA/IChzZWxmLnBhdXNlZCA/IHNlbGYucHJvZ3Jlc3NQYXVzZVRlbXBsYXRlIDogc2VsZi5wcm9ncmVzc0Vycm9yVGVtcGxhdGUpIDogdCk7XHJcbiAgICAgICAgICAgIGlmIChwID49IDEwMCkge1xyXG4gICAgICAgICAgICAgICAgc3RhdHMgPSAnJztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoISRoLmlzRW1wdHkodGVtcGxhdGUpKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocGN0TGltaXQgJiYgcGN0ID4gcGN0TGltaXQgJiYgcCA8PSAxMDApIHtcclxuICAgICAgICAgICAgICAgICAgICBvdXQgPSB0ZW1wbGF0ZS5zZXRUb2tlbnMoeydwZXJjZW50JzogcGN0TGltaXQsICdzdGF0dXMnOiBzZWxmLm1zZ1VwbG9hZFRocmVzaG9sZH0pO1xyXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICBvdXQgPSB0ZW1wbGF0ZS5zZXRUb2tlbnMoeydwZXJjZW50JzogcGN0LCAnc3RhdHVzJzogKHAgPiAxMDAgPyBzZWxmLm1zZ1VwbG9hZEVuZCA6IHBjdCArICclJyl9KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHN0YXRzID0gc3RhdHMgfHwgJyc7XHJcbiAgICAgICAgICAgICAgICBvdXQgPSBvdXQuc2V0VG9rZW5zKHtzdGF0czogc3RhdHN9KTtcclxuICAgICAgICAgICAgICAgICRlbC5odG1sKG91dCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAkZWwuZmluZCgnW3JvbGU9XCJwcm9ncmVzc2JhclwiXScpLmh0bWwoZXJyb3Ip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AgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB0b3RTdGF0cy5wZW5kaW5nQnl0ZXMgPSB0b3RTaXplIC0gdG90VXBTaXplO1xyXG4gICAgICAgICAgICAgICAgcGN0VG90ID0gJGgucm91bmQodG90VXBTaXplIC8gdG90U2l6ZSAqIDEwMCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcyhwY3RUb3QsIG51bGwsIG51bGwsIHNlbGYuX2dldFN0YXRzKHRvdFN0YXRzKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIF92YWxpZGF0ZU1pbkNvdW50OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgbGVuID0gc2VsZi5pc0FqYXhVcGxvYWQgPyBzZWxmLmZpbGVNYW5hZ2VyLmNvdW50KCkgOiBzZWxmLl9pbnB1dEZpbGVDb3VudCgpO1xyXG4gICAgICAgICAgICBpZiAoc2VsZi52YWxpZGF0ZUluaXRpYWxDb3VudCAmJiBzZWxmLm1pbkZpbGVDb3VudCA+IDAgJiYgc2VsZi5fZ2V0RmlsZUNvdW50KGxlbiAtIDEpIDwgc2VsZi5taW5GaWxlQ291bnQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX25vRmlsZXNFcnJvcih7fSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfZ2V0RmlsZUNvdW50OiBmdW5jdGlvbiAoZmlsZUNvdW50LCBpbmNsdWRlSW5pdGlhbCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGFkZENvdW50ID0gMDtcclxuICAgICAgICAgICAgaWYgKGluY2x1ZGVJbml0aWFsID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGluY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AgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zZXRQcmV2aWV3RXJyb3I6IGZ1bmN0aW9uICgkdGh1bWIsIGtlZXBGaWxlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgcmVtb3ZlRnJhbWUgPSBzZWxmLnJlbW92ZUZyb21QcmV2aWV3T25FcnJvciAmJiAhc2VsZi5yZXRyeUVycm9yVXBsb2FkcztcclxuICAgICAgICAgICAgaWYgKCFrZWVwRmlsZSB8fCByZW1vdmVGcmFtZSkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5maWxlTWFuYWdlci5yZW1vdmUoJHRodW1iKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoIXNlbGYuc2hvd1ByZXZpZXcpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocmVtb3ZlRnJhbWUpIHtcclxuICAgICAgICAgICAgICAgICR0aHVtYi5yZW1vdmUoKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3NldFRodW1iU3RhdHVzKCR0aHVtYiwgJ0Vycm9yJyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fcmVmcmVzaFVwbG9hZEJ1dHRvbigkdGh1bWIpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3JlZnJlc2hVcGxvYWRCdXR0b246IGZ1bmN0aW9uICgkdGh1bWIpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCAkYnRuID0gJHRodW1iLmZpbmQoJy5rdi1maWxlLXVwbG9hZCcpLCBjZmcgPSBzZWxmLmZpbGVBY3Rpb25TZXR0aW5ncyxcclxuICAgICAgICAgICAgICAgIGljb24gPSBjZmcudXBsb2FkSWNvbiwgdGl0bGUgPSBjZmcudXBsb2FkVGl0bGU7XHJcbiAgICAgICAgICAgIGlmICghJGJ0bi5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2VsZi5yZXRyeUVycm9yVXBsb2Fkcykge1xyXG4gICAgICAgICAgICAgICAgaWNvbiA9IGNmZy51cGxvYWRSZXRyeUljb247XHJcbiAgICAgICAgICAgICAgICB0aXRsZSA9IGNmZy51cGxvYWRSZXRyeVRpdGxlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICRidG4uYXR0cigndGl0bGUnLCB0aXRsZSkuaHRtbChpY29uKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9jaGVja0RpbWVuc2lvbnM6IGZ1bmN0aW9uIChpLCBjaGssICRpbWcsICR0aHVtYiwgZm5hbWUsIHR5cGUsIHBhcmFtcykge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIG1zZywgZGltLCB0YWcgPSBjaGsgPT09ICdTbWFsbCcgPyAnbWluJyA6ICdtYXgnLCBsaW1pdCA9IHNlbGZbdGFnICsgJ0ltYWdlJyArIHR5cGVdLFxyXG4gICAgICAgICAgICAgICAgJGltZ0VsLCBpc1ZhbGlkO1xyXG4gICAgICAgICAgICBpZiAoJGguaXNFbXB0eShsaW1pdCkgfHwgISRpbWcubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgJGltZ0VsID0gJGltZ1swXTtcclxuICAgICAgICAgICAgZGltID0gKHR5cGUgPT09ICdXaWR0aCcpID8gJGltZ0VsLm5hdHVyYWxXaWR0aCB8fCAkaW1nRWwud2lkdGggOiAkaW1nRWwubmF0dXJhbEhlaWdodCB8fCAkaW1nRWwuaGVpZ2h0O1xyXG4gICAgICAgICAgICBpc1ZhbGlkID0gY2hrID09PSAnU21hbGwnID8gZGltID49IGxpbWl0IDogZGltIDw9IGxpbWl0O1xyXG4gICAgICAgICAgICBpZiAoaXNWYWxpZCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIG1zZyA9IHNlbGZbJ21zZ0ltYWdlJyArIHR5cGUgKyBjaGtdLnNldFRva2Vucyh7J25hbWUnOiBmbmFtZSwgJ3NpemUnOiBsaW1pdH0pO1xyXG4gICAgICAgICAgICBzZWxmLl9zaG93RmlsZUVycm9yKG1zZywgcGFyYW1zKTtcclxuICAgICAgICAgICAgc2VsZi5fc2V0UHJldmlld0Vycm9yKCR0aHVtYik7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfZ2V0RXhpZk9iajogZnVuY3Rpb24gKGRhdGEpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBleGlmT2JqID0gbnVsbCwgZXJyb3IgPSAkaC5sb2dNZXNzYWdlcy5leGlmV2FybmluZztcclxuICAgICAgICAgICAgaWYgKGRhdGEuc2xpY2UoMCwgMjMpICE9PSAnZGF0YTppbWFnZS9qcGVnO2Jhc2U2NCwnICYmIGRhdGEuc2xpY2UoMCwgMjIpICE9PSAnZGF0YTppbWFnZS9qcGc7YmFzZTY0LCcpIHtcclxuICAgICAgICAgICAgICAgIGV4aWZPYmogPSBudWxsO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICBleGlmT2JqID0gd2luZG93LnBpZXhpZiA/IHdpbmRvdy5waWV4aWYubG9hZChkYXRhKSA6IG51bGw7XHJcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xyXG4gICAgICAgICAgICAgICAgZXhpZk9iaiA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICBlcnJvciA9IGVyciAmJiBlcnIubWVzc2FnZSB8fCAnJztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoIWV4aWZPYmopIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2xvZygkaC5sb2dNZXNzYWdlcy5iYWRFeGlmUGFyc2VyLCB7ZGV0YWlsczogZXJyb3J9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gZXhpZk9iajtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHNldEltYWdlT3JpZW50YXRpb246IGZ1bmN0aW9uICgkaW1nLCAkem9vbUltZywgdmFsdWUsICR0aHVtYikge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGludmFsaWRJbWcgPSAhJGltZyB8fCAhJGltZy5sZW5ndGgsIGludmFsaWRab29tSW1nID0gISR6b29tSW1nIHx8ICEkem9vbUltZy5sZW5ndGgsICRtYXJrLFxyXG4gICAgICAgICAgICAgICAgaXNIaWRkZW4gPSBmYWxzZSwgJGRpdiwgem9vbU9ubHkgPSBpbnZhbGlkSW1nICYmICR0aHVtYiAmJiAkdGh1bWIuYXR0cignZGF0YS10ZW1wbGF0ZScpID09PSAnaW1hZ2UnLCBldjtcclxuICAgICAgICAgICAgaWYgKGludmFsaWRJbWcgJiYgaW52YWxpZFpvb21JbWcpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBldiA9ICdsb2FkLmZpbGVpbnB1dGltYWdlb3JpZW50JztcclxuICAgICAgICAgICAgaWYgKHpvb21Pbmx5KSB7XHJcbiAgICAgICAgICAgICAgICAkaW1nID0gJHpvb21JbWc7XHJcbiAgICAgICAgICAgICAgICAkem9vbUltZyA9IG51bGw7XHJcbiAgICAgICAgICAgICAgICAkaW1nLmNzcyhzZWxmLnByZXZpZXdTZXR0aW5ncy5pbWFnZSk7XHJcbiAgICAgICAgICAgICAgICAkZGl2ID0gJChkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKSkuYXBwZW5kVG8oJHRodW1iLmZpbmQoJy5rdi1maWxlLWNvbnRlbnQnKSk7XHJcbiAgICAgICAgICAgICAgICAkbWFyayA9ICQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3BhbicpKS5pbnNlcnRCZWZvcmUoJGltZyk7XHJcbiAgICAgICAgICAgICAgICAkaW1nLmNzcygndmlzaWJpbGl0eScsICdoaWRkZW4nKS5yZW1vdmVDbGFzcygnZmlsZS16b29tLWRldGFpbCcpLmFwcGVuZFRvKCRkaXYpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgaXNIaWRkZW4gPSAhJGltZy5pcygnOnZpc2libGUnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkaW1nLm9mZihldikub24oZXYsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIGlmIChpc0hpZGRlbikge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuJHByZXZpZXcucmVtb3ZlQ2xhc3MoJ2hpZGUtY29udGVudCcpO1xyXG4gICAgICAgICAgICAgICAgICAgICR0aHVtYi5maW5kKCcua3YtZmlsZS1jb250ZW50JykuY3NzKCd2aXNpYmlsaXR5JywgJ2hpZGRlbicpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdmFyIGltZyA9ICRpbWcuZ2V0KDApLCB6b29tSW1nID0gJHpvb21JbWcgJiYgJHpvb21JbWcubGVuZ3RoID8gJHpvb21JbWcuZ2V0KDApIDogbnVsbCxcclxuICAgICAgICAgICAgICAgICAgICBoID0gaW1nLm9mZnNldEhlaWdodCwgdyA9IGltZy5vZmZzZXRXaWR0aCwgciA9ICRoLmdldFJvdGF0aW9uKHZhbHVlKTtcclxuICAgICAgICAgICAgICAgIGlmIChpc0hpZGRlbikge1xyXG4gICAgICAgICAgICAgICAgICAgICR0aHVtYi5maW5kKCcua3YtZmlsZS1jb250ZW50JykuY3NzKCd2aXNpYmlsaXR5JywgJ3Zpc2libGUnKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLiRwcmV2aWV3LmFkZENsYXNzKCdoaWRlLWNvbnRlbnQnKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICRpbWcuZGF0YSgnb3JpZW50YXRpb24nLCB2YWx1ZSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoem9vbUltZykge1xyXG4gICAgICAgICAgICAgICAgICAgICR6b29tSW1nLmRhdGEoJ29yaWVudGF0aW9uJywgdmFsdWUpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlIDwgNSkge1xyXG4gICAgICAgICAgICAgICAgICAgICRoLnNldFRyYW5zZm9ybShpbWcsIHIpO1xyXG4gICAgICAgICAgICAgICAgICAgICRoLnNldFRyYW5zZm9ybSh6b29tSW1nLCByKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB2YXIgb2Zmc2V0QW5nbGUgPSBNYXRoLmF0YW4odyAvIGgpLCBvcmlnRmFjdG9yID0gTWF0aC5zcXJ0KE1hdGgucG93KGgsIDIpICsgTWF0aC5wb3codywgMikpLFxyXG4gICAgICAgICAgICAgICAgICAgIHNjYWxlID0gIW9yaWdGYWN0b3IgPyAxIDogKGggLyBNYXRoLmNvcyhNYXRoLlBJIC8gMiArIG9mZnNldEFuZ2xlKSkgLyBvcmlnRmFjdG9yLFxyXG4gICAgICAgICAgICAgICAgICAgIHMgPSAnIHNjYWxlKCcgKyBNYXRoLmFicyhzY2FsZSkgKyAnKSc7XHJcbiAgICAgICAgICAgICAgICAkaC5zZXRUcmFuc2Zvcm0oaW1nLCByICsgcyk7XHJcbiAgICAgICAgICAgICAgICAkaC5zZXRUcmFuc2Zvcm0oem9vbUltZywgciArIHMpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHpvb21Pbmx5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJGltZy5jc3MoJ3Zpc2liaWxpdHknLCAndmlzaWJsZScpLmluc2VydEFmdGVyKCRtYXJrKS5hZGRDbGFzcygnZmlsZS16b29tLWRldGFpbCcpO1xyXG4gICAgICAgICAgICAgICAgICAgICRtYXJrLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgICRkaXYucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3ZhbGlkYXRlSW1hZ2VPcmllbnRhdGlvbjogZnVuY3Rpb24gKCRpbWcsIGZpbGUsIHByZXZpZXdJZCwgZmlsZUlkLCBjYXB0aW9uLCBmdHlwZSwgZnNpemUsIGlEYXRhKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgZXhpZk9iaiwgdmFsdWUsIGF1dG9PcmllbnRJbWFnZSA9IHNlbGYuYXV0b09yaWVudEltYWdlLFxyXG4gICAgICAgICAgICAgICAgc2VsZWN0b3IgPSAkaC5nZXRab29tU2VsZWN0b3IocHJldmlld0lkLCAnIGltZycpO1xyXG4gICAgICAgICAgICBleGlmT2JqID0gYXV0b09yaWVudEltYWdlID8gc2VsZi5fZ2V0RXhpZk9iaihpRGF0YSkgOiBudWxsO1xyXG4gICAgICAgICAgICB2YWx1ZSA9IGV4aWZPYmogPyBleGlmT2JqWycwdGgnXVtwaWV4aWYuSW1hZ2VJRkQuT3JpZW50YXRpb25dIDogbnVsbDsgLy8ganNoaW50IGlnbm9yZTpsaW5lXHJcbiAgICAgICAgICAgIGlmICghdmFsdWUpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3ZhbGlkYXRlSW1hZ2UocHJldmlld0lkLCBmaWxlSWQsIGNhcHRpb24sIGZ0eXBlLCBmc2l6ZSwgaURhdGEsIGV4aWZPYmopO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJc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VxyXG4gICAgICAgICAgICAgICAgcGFyYW1zID0ge2luZDogaSwgaWQ6IHByZXZpZXdJZCwgZmlsZUlkOiBmaWxlSWR9O1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fY2hlY2tEaW1lbnNpb25zKGksICdTbWFsbCcsICRpbWcsICR0aHVtYiwgZm5hbWUsICdXaWR0aCcsIHBhcmFtcyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9jaGVja0RpbWVuc2lvbnMoaSwgJ1NtYWxsJywgJGltZywgJHRodW1iLCBmbmFtZSwgJ0hlaWdodCcsIHBhcmFtcyk7XHJcbiAgICAgICAgICAgICAgICBpZiAoIXNlbGYucmVzaXplSW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9jaGVja0RpbWVuc2lvbnMoaSwgJ0xhcmdlJywgJGltZywgJHRodW1iLCBmbmFtZSwgJ1dpZHRoJywgcGFyYW1zKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9jaGVja0RpbWVuc2lvbnMoaSwgJ0xhcmdlJywgJGltZywgJHRodW1iLCBmbmFtZSwgJ0hlaWdodCcsIHBhcmFtcyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWltYWdlbG9hZGVkJywgW3ByZXZpZXdJZF0pO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5maWxlTWFuYWdlci5hZGRJbWFnZShmaWxlSWQsIHtcclxuICAgICAgICAgICAgICAgICAgICBpbmQ6IGksXHJcbiAgICAgICAgICAgICAgICAgICAgaW1nOiAkaW1nLFxyXG4gICAgICAgICAgICAgICAgICAgIHRodW1iOiAkdGh1bWIsXHJcbiAgICAgICAgICAgICAgICAgICAgcGlkOiBwcmV2aWV3SWQsXHJcbiAgICAgICAgICAgICAgICAgICAgdHlwOiBmdHlwZSxcclxuICAgICAgICAgICAgICAgICAgICBzaXo6IGZzaXplLFxyXG4gICAgICAgICAgICAgICAgICAgIHZhbGlkYXRlZDogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICAgICAgaW1nRGF0YTogaURhdGEsXHJcbiAgICAgICAgICAgICAgICAgICAgZXhpZk9iajogZXhpZk9ialxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAkdGh1bWIuZGF0YSgnZXhpZicsIGV4aWZPYmopO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fdmFsaWRhdGVBbGxJbWFnZXMoKTtcclxuICAgICAgICAgICAgfSkub25lKCdlcnJvcicsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlaW1hZ2Vsb2FkZXJyb3InLCBbcHJldmlld0lkXSk7XHJcbiAgICAgICAgICAgIH0pLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY29tcGxldGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnRyaWdnZXIoJ2xvYWQnKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS50cmlnZ2VyKCdlcnJvcicpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfdmFsaWRhdGVBbGxJbWFnZXM6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBjb3VudGVyID0ge3ZhbDogMH0sIG51bUltZ3MgPSBzZWxmLmZpbGVNYW5hZ2VyLmdldEltYWdlQ291bnQoKSwgZnNpemUsXHJcbiAgICAgICAgICAgICAgICBtaW5TaXplID0gc2VsZi5yZXNpemVJZlNpemVNb3JlVGhhbjtcclxuICAgICAgICAgICAgaWYgKG51bUltZ3MgIT09IHNlbGYuZmlsZU1hbmFnZXIudG90YWxJbWFnZXMpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWltYWdlc2xvYWRlZCcpO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYucmVzaXplSW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAkLmVhY2goc2VsZi5maWxlTWFuYWdlci5sb2FkZWRJbWFnZXMsIGZ1bmN0aW9uIChpZCwgY29uZmlnKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWNvbmZpZy52YWxpZGF0ZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmc2l6ZSA9IGNvbmZpZy5zaXo7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZzaXplICYmIGZzaXplID4gbWluU2l6ZSAqIDEwMDApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fZ2V0UmVzaXplZEltYWdlKGlkLCBjb25maWcsIGNvdW50ZXIsIG51bUltZ3MpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjb25maWcudmFsaWRhdGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfZ2V0UmVzaXplZEltYWdlOiBmdW5jdGlvbiAoaWQsIGNvbmZpZywgY291bnRlciwgbnVtSW1ncykge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGltZyA9ICQoY29uZmlnLmltZylbMF0sIHdpZHRoID0gaW1nLm5hdHVyYWxXaWR0aCwgaGVpZ2h0ID0gaW1nLm5hdHVyYWxIZWlnaHQsIGJsb2IsXHJcbiAgICAgICAgICAgICAgICByYXRpbyA9IDEsIG1heFdpZHRoID0gc2VsZi5tYXhJbWFnZVdpZHRoIHx8IHdpZHRoLCBtYXhIZWlnaHQgPSBzZWxmLm1heEltYWdlSGVpZ2h0IHx8IGhlaWdodCxcclxuICAgICAgICAgICAgICAgIGlzVmFsaWRJbWFnZSA9ICEhKHdpZHRoICYmIGhlaWdodCksIGNoa1dpZHRoLCBjaGtIZWlnaHQsIGNhbnZhcyA9IHNlbGYuaW1hZ2VDYW52YXMsIGRhdGFVUkksXHJcbiAgICAgICAgICAgICAgICBjb250ZXh0ID0gc2VsZi5pbWFnZUNhbnZhc0NvbnRleHQsIHR5cGUgPSBjb25maWcudHlwLCBwaWQgPSBjb25maWcucGlkLCBpbmQgPSBjb25maWcuaW5kLFxyXG4gICAgICAgICAgICAgICAgJHRodW1iID0gY29uZmlnLnRodW1iLCB0aHJvd0Vycm9yLCBtc2csIGV4aWZPYmogPSBjb25maWcuZXhpZk9iaiwgZXhpZlN0ciwgZmlsZSwgcGFyYW1zLCBldlBhcmFtcztcclxuICAgICAgICAgICAgdGhyb3dFcnJvciA9IGZ1bmN0aW9uIChtc2csIHBhcmFtcywgZXYpIHtcclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLmlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3Nob3dGaWxlRXJyb3IobXNnLCBwYXJhbXMsIGV2KTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fc2hvd0Vycm9yKG1zZywgcGFyYW1zLCBldik7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcmV2aWV3RXJyb3IoJHRodW1iKTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgZmlsZSA9IHNlbGYuZmlsZU1hbmFnZXIuZ2V0RmlsZShpZCk7XHJcbiAgICAgICAgICAgIHBhcmFtcyA9IHtpZDogcGlkLCAnaW5kZXgnOiBpbmQsIGZpbGVJZDogaWR9O1xyXG4gICAgICAgICAgICBldlBhcmFtcyA9IFtpZCwgcGlkLCBpbmRdO1xyXG4gICAgICAgICAgICBpZiAoIWZpbGUgfHwgIWlzVmFsaWRJbWFnZSB8fCAod2lkdGggPD0gbWF4V2lkdGggJiYgaGVpZ2h0IDw9IG1heEhlaWdodCkpIHtcclxuICAgICAgICAgICAgICAgIGlmIChpc1ZhbGlkSW1hZ2UgJiYgZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlaW1hZ2VyZXNpemVkJywgZXZQYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgY291bnRlci52YWwrKztcclxuICAgICAgICAgICAgICAgIGlmIChjb3VudGVyLnZhbCA9PT0gbnVtSW1ncykge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlaW1hZ2VzcmVzaXplZCcpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKCFpc1ZhbGlkSW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKHNlbGYubXNnSW1hZ2VSZXNpemVFcnJvciwgcGFyYW1zLCAnZmlsZWltYWdlcmVzaXplZXJyb3InKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdHlwZSA9IHR5cGUgfHwgc2VsZi5yZXNpemVEZWZhdWx0SW1hZ2VUeXBlO1xyXG4gICAgICAgICAgICBjaGtXaWR0aCA9IHdpZHRoID4gbWF4V2lkdGg7XHJcbiAgICAgICAgICAgIGNoa0hlaWdodCA9IGhlaWdodCA+IG1heEhlaWdodDtcclxuICAgICAgICAgICAgaWYgKHNlbGYucmVzaXplUHJlZmVyZW5jZSA9PT0gJ3dpZHRoJykge1xyXG4gICAgICAgICAgICAgICAgcmF0aW8gPSBjaGtXaWR0aCA/IG1heFdpZHRoIC8gd2lkdGggOiAoY2hrSGVpZ2h0ID8gbWF4SGVpZ2h0IC8gaGVpZ2h0IDogMSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICByYXRpbyA9IGNoa0hlaWdodCA/IG1heEhlaWdodCAvIGhlaWdodCA6IChjaGtXaWR0aCA/IG1heFdpZHRoIC8gd2lkdGggOiAxKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9yZXNldENhbnZhcygpO1xyXG4gICAgICAgICAgICB3aWR0aCAqPSByYXRpbztcclxuICAgICAgICAgICAgaGVpZ2h0ICo9IHJhdGlvO1xyXG4gICAgICAgICAgICBjYW52YXMud2lkdGggPSB3aWR0aDtcclxuICAgICAgICAgICAgY2FudmFzLmhlaWdodCA9IGhlaWdodDtcclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgIGNvbnRleHQuZHJhd0ltYWdlKGltZywgMCwgMCwgd2lkdGgsIGhlaWdodCk7XHJcbiAgICAgICAgICAgICAgICBkYXRhVVJJID0gY2FudmFzLnRvRGF0YVVSTCh0eXBlLCBzZWxmLnJlc2l6ZVF1YWxpdHkpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGV4aWZPYmopIHtcclxuICAgICAgICAgICAgICAgICAgICBleGlmU3RyID0gd2luZG93LnBpZXhpZi5kdW1wKGV4aWZPYmopO1xyXG4gICAgICAgICAgICAgICAgICAgIGRhdGFVUkkgPSB3aW5kb3cucGlleGlmLmluc2VydChleGlmU3RyLCBkYXRhVVJJKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGJsb2IgPSAkaC5kYXRhVVJJMkJsb2IoZGF0YVVSSSk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLnNldEZpbGUoaWQsIGJsb2IpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVpbWFnZXJlc2l6ZWQnLCBldlBhcmFtcyk7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyLnZhbCsrO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ZXIudmFsID09PSBudW1JbWdzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVpbWFnZXNyZXNpemVkJywgW3VuZGVmaW5lZCwgdW5kZWZpbmVkXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoIShibG9iIGluc3RhbmNlb2YgQmxvYikpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKHNlbGYubXNnSW1hZ2VSZXNpemVFcnJvciwgcGFyYW1zLCAnZmlsZWltYWdlcmVzaXplZXJyb3InKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICBjb3VudGVyLnZhbCsrO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ZXIudmFsID09PSBudW1JbWdzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVpbWFnZXNyZXNpemVkJywgW3VuZGVmaW5lZCwgdW5kZWZpbmVkXSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBtc2cgPSBzZWxmLm1zZ0ltYWdlUmVzaXplRXhjZXB0aW9uLnJlcGxhY2UoJ3tlcnJvcnN9JywgZXJyLm1lc3NhZ2UpO1xyXG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvcihtc2csIHBhcmFtcywgJ2ZpbGVpbWFnZXJlc2l6ZWV4Y2VwdGlvbicpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfc2hvd1Byb2dyZXNzOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgaWYgKHNlbGYuJHByb2dyZXNzICYmIHNlbGYuJHByb2dyZXNzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kcHJvZ3Jlc3Muc2hvdygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaGlkZVByb2dyZXNzOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgaWYgKHNlbGYuJHByb2dyZXNzICYmIHNlbGYuJHByb2dyZXNzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kcHJvZ3Jlc3MuaGlkZSgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdEJyb3dzZTogZnVuY3Rpb24gKCRjb250YWluZXIpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCAkZWwgPSBzZWxmLiRlbGVtZW50O1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5zaG93QnJvd3NlKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRidG5GaWxlID0gJGNvbnRhaW5lci5maW5kKCcuYnRuLWZpbGUnKS5hcHBlbmQoJGVsKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICRlbC5hcHBlbmRUbygkY29udGFpbmVyKS5hdHRyKCd0YWJpbmRleCcsIC0xKTtcclxuICAgICAgICAgICAgICAgICRoLmFkZENzcygkZWwsICdmaWxlLW5vLWJyb3dzZScpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfaW5pdENsaWNrYWJsZTogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICR6b25lLCAkdG1wWm9uZTtcclxuICAgICAgICAgICAgaWYgKCFzZWxmLmlzQ2xpY2thYmxlKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgJHpvbmUgPSBzZWxmLiRkcm9wWm9uZTtcclxuICAgICAgICAgICAgaWYgKCFzZWxmLmlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgJHRtcFpvbmUgPSBzZWxmLiRwcmV2aWV3LmZpbmQoJy5maWxlLWRlZmF1bHQtcHJldmlldycpO1xyXG4gICAgICAgICAgICAgICAgaWYgKCR0bXBab25lLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgICR6b25lID0gJHRtcFpvbmU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICRoLmFkZENzcygkem9uZSwgJ2NsaWNrYWJsZScpO1xyXG4gICAgICAgICAgICAkem9uZS5hdHRyKCd0YWJpbmRleCcsIC0xKTtcclxuICAgICAgICAgICAgc2VsZi5faGFuZGxlcigkem9uZSwgJ2NsaWNrJywgZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgICAgIHZhciAkdGFyID0gJChlLnRhcmdldCk7XHJcbiAgICAgICAgICAgICAgICBpZiAoISQoc2VsZi5lbEVycm9yQ29udGFpbmVyICsgJzp2aXNpYmxlJykubGVuZ3RoICYmXHJcbiAgICAgICAgICAgICAgICAgICAgKCEkdGFyLnBhcmVudHMoJy5maWxlLXByZXZpZXctdGh1bWJuYWlscycpLmxlbmd0aCB8fCAkdGFyLnBhcmVudHMoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICcuZmlsZS1kZWZhdWx0LXByZXZpZXcnKS5sZW5ndGgpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi4kZWxlbWVudC5kYXRhKCd6b25lQ2xpY2tlZCcsIHRydWUpLnRyaWdnZXIoJ2NsaWNrJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgJHpvbmUuYmx1cigpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9pbml0Q2FwdGlvbjogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGNhcCA9IHNlbGYuaW5pdGlhbENhcHRpb24gfHwgJyc7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLm92ZXJ3cml0ZUluaXRpYWwgfHwgJGguaXNFbXB0eShjYXApKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRjYXB0aW9uLnZhbCgnJyk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fc2V0Q2FwdGlvbihjYXApO1xyXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9zZXRDYXB0aW9uOiBmdW5jdGlvbiAoY29udGVudCwgaXNFcnJvcikge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIHRpdGxlLCBvdXQsIGljb24sIG4sIGNhcCwgZmlsZTtcclxuICAgICAgICAgICAgaWYgKCFzZWxmLiRjYXB0aW9uLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuJGNhcHRpb25Db250YWluZXIucmVtb3ZlQ2xhc3MoJ2ljb24tdmlzaWJsZScpO1xyXG4gICAgICAgICAgICBpZiAoaXNFcnJvcikge1xyXG4gICAgICAgICAgICAgICAgdGl0bGUgPSAkKCc8ZGl2PicgKyBzZWxmLm1zZ1ZhbGlkYXRpb25FcnJvciArICc8L2Rpdj4nKS50ZXh0KCk7XHJcbiAgICAgICAgICAgICAgICBuID0gc2VsZi5maWxlTWFuYWdlci5jb3VudCgpO1xyXG4gICAgICAgICAgICAgICAgaWYgKG4pIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlID0gc2VsZi5maWxlTWFuYWdlci5nZXRGaXJzdEZpbGUoKTtcclxuICAgICAgICAgICAgICAgICAgICBjYXAgPSBuID09PSAxICYmIGZpbGUgPyBmaWxlLm5hbWVGbXQgOiBzZWxmLl9nZXRNc2dTZWxlY3RlZChuKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2FwID0gc2VsZi5fZ2V0TXNnU2VsZWN0ZWQoc2VsZi5tc2dObyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBvdXQgPSAkaC5pc0VtcHR5KGNvbnRlbnQpID8gY2FwIDogY29udGVudDtcclxuICAgICAgICAgICAgICAgIGljb24gPSAnPHNwYW4gY2xhc3M9XCInICsgc2VsZi5tc2dWYWxpZGF0aW9uRXJyb3JDbGFzcyArICdcIj4nICsgc2VsZi5tc2dWYWxpZGF0aW9uRXJyb3JJY29uICsgJzwvc3Bhbj4nO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgaWYgKCRoLmlzRW1wdHkoY29udGVudCkpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB0aXRsZSA9ICQoJzxkaXY+JyArIGNvbnRlbnQgKyAnPC9kaXY+JykudGV4dCgpO1xyXG4gICAgICAgICAgICAgICAgb3V0ID0gdGl0bGU7XHJcbiAgICAgICAgICAgICAgICBpY29uID0gc2VsZi5fZ2V0TGF5b3V0VGVtcGxhdGUoJ2ZpbGVJY29uJyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi4kY2FwdGlvbkNvbnRhaW5lci5hZGRDbGFzcygnaWNvbi12aXNpYmxlJyk7XHJcbiAgICAgICAgICAgIHNlbGYuJGNhcHRpb24uYXR0cigndGl0bGUnLCB0aXRsZSkudmFsKG91dCk7XHJcbiAgICAgICAgICAgIHNlbGYuJGNhcHRpb25JY29uLmh0bWwoaWNvbik7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfY3JlYXRlQ29udGFpbmVyOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgYXR0cmlicyA9IHsnY2xhc3MnOiAnZmlsZS1pbnB1dCBmaWxlLWlucHV0LW5ldycgKyAoc2VsZi5ydGwgPyAnIGt2LXJ0bCcgOiAnJyl9LFxyXG4gICAgICAgICAgICAgICAgJGNvbnRhaW5lciA9ICQoZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2JykpLmF0dHIoYXR0cmlicykuaHRtbChzZWxmLl9yZW5kZXJNYWluKCkpO1xyXG4gICAgICAgICAgICAkY29udGFpbmVyLmluc2VydEJlZm9yZShzZWxmLiRlbGVtZW50KTtcclxuICAgICAgICAgICAgc2VsZi5faW5pdEJyb3dzZSgkY29udGFpbmVyKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYudGhlbWUpIHtcclxuICAgICAgICAgICAgICAgICRjb250YWluZXIuYWRkQ2xhc3MoJ3RoZW1lLScgKyBzZWxmLnRoZW1lKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gJGNvbnRhaW5lcjtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9yZWZyZXNoQ29udGFpbmVyOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGNvbnRhaW5lciA9IHNlbGYuJGNvbnRhaW5lciwgJGVsID0gc2VsZi4kZWxlbWVudDtcclxuICAgICAgICAgICAgJGVsLmluc2VydEFmdGVyKCRjb250YWluZXIpO1xyXG4gICAgICAgICAgICAkY29udGFpbmVyLmh0bWwoc2VsZi5fcmVuZGVyTWFpbigpKTtcclxuICAgIC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gKyAnVGl0bGUnXSwgaWNvbiA9IHNlbGZbdHlwZSArICdJY29uJ10sIGxhYmVsID0gc2VsZlt0eXBlICsgJ0xhYmVsJ10sXHJcbiAgICAgICAgICAgICAgICBzdGF0dXMgPSBzZWxmLmlzRGlzYWJsZWQgPyAnIGRpc2FibGVkJyA6ICcnLCBidG5UeXBlID0gJ2J1dHRvbic7XHJcbiAgICAgICAgICAgIHN3aXRjaCAodHlwZSkge1xyXG4gICAgICAgICAgICAgICAgY2FzZSAncmVtb3ZlJzpcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYuc2hvd1JlbW92ZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnY2FuY2VsJzpcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYuc2hvd0NhbmNlbCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNzcyArPSAnIGt2LWhpZGRlbic7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICBjYXNlICdwYXVzZSc6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzZWxmLnNob3dQYXVzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNzcyArPSAnIGt2LWhpZGRlbic7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICBjYXNlICd1cGxvYWQnOlxyXG4gICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi5zaG93VXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnJztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuaXNBamF4VXBsb2FkICYmICFzZWxmLmlzRGlzYWJsZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdG1wbHQgPSBzZWxmLl9nZXRMYXlvdXRUZW1wbGF0ZSgnYnRuTGluaycpLnJlcGxhY2UoJ3tocmVmfScsIHNlbGYudXBsb2FkVXJsKTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBidG5UeXBlID0gJ3N1Ym1pdCc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSAnYnJvd3NlJzpcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYuc2hvd0Jyb3dzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHRtcGx0ID0gc2VsZi5fZ2V0TGF5b3V0VGVtcGxhdGUoJ2J0bkJyb3dzZScpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGNzcyArPSB0eXBlID09PSAnYnJvd3NlJyA/ICcgYnRuLWZpbGUnIDogJyBmaWxlaW5wdXQtJyArIHR5cGUgKyAnIGZpbGVpbnB1dC0nICsgdHlwZSArICctYnV0dG9uJztcclxuICAgICAgICAgICAgaWYgKCEkaC5pc0VtcHR5KGxhYmVsKSkge1xyXG4gICAgICAgICAgICAgICAgbGFiZWwgPSAnIDxzcGFuIGNs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VBY3Rpb25zKHBhcmFtcywgZmFsc2UsIGZhbHNlLCBmYWxzZSwgem9vbSwgZHJnLCBmYWxzZSwgZmFsc2UsIGZhbHNlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBvdXQgPSB0ZW1wbGF0ZS5zZXRUb2tlbnMocGFyYW1zKTtcclxuICAgICAgICAgICAgb3V0ID0gJGgucmVwbGFjZVRhZ3Mob3V0LCBzZWxmLnByZXZpZXdUaHVtYlRhZ3MpO1xyXG4gICAgICAgICAgICByZXR1cm4gb3V0O1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX3JlbmRlckZpbGVBY3Rpb25zOiBmdW5jdGlvbiAoXHJcbiAgICAgICAgICAgIGNmZyxcclxuICAgICAgICAgICAgc2hvd1VwbCxcclxuICAgICAgICAgICAgc2hvd0R3bixcclxuICAgICAgICAgICAgc2hvd0RlbCxcclxuICAgICAgICAgICAgc2hvd1pvb20sXHJcbiAgICAgICAgICAgIHNob3dEcmFnLFxyXG4gICAgICAgICAgICBkaXNhYmxlZCxcclxuICAgICAgICAgICAgdXJsLFxyXG4gICAgICAgICAgICBrZXksXHJcbiAgICAgICAgICAgIGlzSW5pdCxcclxuICAgICAgICAgICAgZFVybCxcclxuICAgICAgICAgICAgZEZpbGVcclxuICAgICAgICApIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICBpZiAoIWNmZy50eXBlICYmIGlzSW5pdCkge1xyXG4gICAgICAgICAgICAgICAgY2ZnLnR5cGUgPSAnaW1hZ2UnO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmVuYWJsZVJlc3VtYWJsZVVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgc2hvd1VwbCA9IGZhbHNlO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzaG93VXBsID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2hvd1VwbCA9IHNob3dVcGwoY2ZnKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAodHlwZW9mIHNob3dEd24gPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgICAgIHNob3dEd24gPSBzaG93RHduKGNmZyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHR5cGVvZiBzaG93RGVsID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICBzaG93RGVsID0gc2hvd0RlbChjZmcpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygc2hvd1pvb20gPT09ICdmdW5jdGlvbicpIHtcclxuICAgICAgICAgICAgICAgIHNob3dab29tID0gc2hvd1pvb20oY2ZnKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAodHlwZW9mIHNob3dEcmFnID09PSAnZnVuY3Rpb24nKSB7XHJcbiAgICAgICAgICAgICAgICBzaG93RHJhZyA9IHNob3dEcmFnKGNmZyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKCFzaG93VXBsICYmICFzaG93RHduICYmICFzaG93RGVsICYmICFzaG93Wm9vbSAmJiAhc2hvd0RyYWcpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiAnJztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB2YXIgdlVybCA9IHVybCA9PT0gZmFsc2UgPyAnJyA6ICcgZGF0YS11cmw9XCInICsgdXJsICsgJ1wiJywgYnRuWm9vbSA9ICcnLCBidG5EcmFnID0gJycsIGNzcyxcclxuICAgICAgICAgICAgICAgIHZLZXkgPSBrZXkgPT09IGZhbHNlID8gJycgOiAnIGRhdGEta2V5PVwiJyArIGtleSArICdcIicsIGJ0bkRlbGV0ZSA9ICcnLCBidG5VcGxvYWQgPSAnJywgYnRuRG93bmxvYWQgPSAnJyxcclxuICAgICAgICAgICAgICAgIHRlbXBsYXRlID0gc2VsZi5fZ2V0TGF5b3V0VGVtcGxhdGUoJ2FjdGlvbnMnKSwgY29uZmlnID0gc2VsZi5maWxlQWN0aW9uU2V0dGluZ3MsXHJcbiAgICAgICAgICAgICAgICBvdGhlckJ1dHRvbnMgPSBzZWxmLm90aGVyQWN0aW9uQnV0dG9ucy5zZXRUb2tlbnMoeydkYXRhS2V5JzogdktleSwgJ2tleSc6IGtleX0pLFxyXG4gICAgICAgICAgICAgICAgcmVtb3ZlQ2xhc3MgPSBkaXNhYmxlZCA/IGNvbmZpZy5yZW1vdmVDbGFzcyArICcgZGlzYWJsZWQnIDogY29uZmlnLnJlbW92ZUNsYXNzO1xyXG4gICAgICAgICAgICBpZiAoc2hvd0RlbCkge1xyXG4gICAgICAgICAgICAgICAgYnRuRGVsZXRlID0gc2VsZi5fZ2V0TGF5b3V0VGVtcGxhdGUoJ2FjdGlvbkRlbGV0ZScpLnNldFRva2Vucyh7XHJcbiAgICAgICAgICAgICAgICAgICAgJ3JlbW92ZUNsYXNzJzogcmVtb3ZlQ2xhc3MsXHJcbiAgICAgICAgICAgICAgICAgICAgJ3JlbW92ZUljb24nOiBjb25maWcucmVtb3ZlSWNvbixcclxuICAgICAgICAgICAgICAgICAgICAncmVtb3ZlVGl0bGUnOiBjb25maWcucmVtb3ZlVGl0bGUsXHJcbiAgICAgICAgICAgICAgICAgICAgJ2RhdGFVcmwnOiB2VXJsLFxyXG4gICAgICAgICAgICAgICAgICAgICdkYXRhS2V5JzogdktleSxcclxuICAgICAgICAgICAgICAgICAgICAna2V5Jzoga2V5XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2hvd1VwbCkge1xyXG4gICAgICAgICAgICAgICAgYnRuVXBsb2FkID0gc2VsZi5fZ2V0TGF5b3V0VGVtcGxhdGUoJ2FjdGlvblVwbG9hZCcpLnNldFRva2Vucyh7XHJcbiAgICAgICAgICAgICAgICAgICAgJ3VwbG9hZENsYXNzJzogY29uZmlnLnVwbG9hZENsYXNzLFxyXG4gICAgICAgICAgICAgICAgICAgICd1cGxvYWRJY29uJzogY29uZmlnLnVwbG9hZEljb24sXHJcbiAgICAgICAgICAgICAgICAgICAgJ3VwbG9hZFRpdGxlJzogY29uZmlnLnVwbG9hZFRpdGxlXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2hvd0R3bikge1xyXG4gICAgICAgICAgICAgICAgYnRuRG93bmxvYWQgPSBzZWxmLl9nZXRMYXlvdXRUZW1wbGF0ZSgnYWN0aW9uRG93bmxvYWQnKS5zZXRUb2tlbnMoe1xyXG4gICAgICAgICAgICAgICAgICAgICdkb3dubG9hZENsYXNzJzogY29uZmlnLmRvd25sb2FkQ2xhc3MsXHJcbiAgICAgICAgICAgICAgICAgICAgJ2Rvd25sb2FkSWNvbic6IGNvbmZpZy5kb3dubG9hZEljb24sXHJcbiAgICAgICAgICAgICAgICAgICAgJ2Rvd25sb2FkVGl0bGUnOiBjb25maWcuZG93bmxvYWRUaXRsZSxcclxuICAgICAgICAgICAgICAgICAgICAnZG93bmxvYWRVcmwnOiBkVXJsIHx8IHNlbGYuaW5pdGlhbFByZXZpZXdEb3dubG9hZFVybFxyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICBidG5Eb3dubG9hZCA9IGJ0bkRvd25sb2FkLnNldFRva2Vucyh7J2ZpbGVuYW1lJzogZEZpbGUsICdrZXknOiBrZXl9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2hvd1pvb20pIHtcclxuICAgICAgICAgICAgICAgIGJ0blpvb20gPSBzZWxmLl9nZXRMYXlvdXRUZW1wbGF0ZSgnYWN0aW9uWm9vbScpLnNldFRva2Vucyh7XHJcbiAgICAgICAgICAgICAgICAgICAgJ3pvb21DbGFzcyc6IGNvbmZpZy56b29tQ2xhc3MsXHJcbiAgICAgICAgICAgICAgICAgICAgJ3pvb21JY29uJzogY29uZmlnLnpvb21JY29uLFxyXG4gICAgICAgICAgICAgICAgICAgICd6b29tVGl0bGUnOiBjb25maWcuem9vbVRpdGxlXHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2hvd0RyYWcgJiYgaXNJbml0KSB7XHJcbiAgICAgICAgICAgICAgICBjc3MgPSAnZHJhZy1oYW5kbGUtaW5pdCAnICsgY29uZmlnLmRyYWdDbGFzcztcclxuICAgICAgICAgICAgICAgIGJ0bkRyYWcgPSBzZWxmLl9nZXRMYXlvdXRUZW1wbGF0ZSgnYWN0aW9uRHJhZycpLnNldFRva2Vucyh7XHJcbiAgICAgICAgICAgICAgICAgICAgJ2RyYWdDbGFzcyc6IGNzcyxcclxuICAgICAgICAgICAgICAgICAgICAnZHJhZ1RpdGxlJzogY29uZmlnLmRyYWdUaXRsZSxcclxuICAgICAgICAgICAgICAgICAgICAnZHJhZ0ljb24nOiBjb25maWcuZHJhZ0ljb25cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0ZW1wbGF0ZS5zZXRUb2tlbnMoe1xyXG4gICAgICAgICAgICAgICAgJ2RlbGV0ZSc6IGJ0bkRlbGV0ZSxcclxuICAgICAgICAgICAgICAgICd1cGxvYWQnOiBidG5VcGxvYWQsXHJcbiAgICAgICAgICAgICAgICAnZG93bmxvYWQnOiBidG5Eb3dubG9hZCxcclxuICAgICAgICAgICAgICAgICd6b29tJzogYnRuWm9vbSxcclxuICAgICAgICAgICAgICAgICdkcmFnJzogYnRuRHJhZyxcclxuICAgICAgICAgICAgICAgICdvdGhlcic6IG90aGVyQnV0dG9uc1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9icm93c2U6IGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcclxuICAgICAgICAgICAgaWYgKGUgJiYgZS5pc0RlZmF1bHRQcmV2ZW50ZWQoKSB8fCAhc2VsZi5fcmFpc2UoJ2ZpbGVicm93c2UnKSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmlzRXJyb3IgJiYgIXNlbGYuaXNBamF4VXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLmNsZWFyKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHNlbGYuZm9jdXNDYXB0aW9uT25Ccm93c2UpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuJGNhcHRpb25Db250YWluZXIuZm9jdXMoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2NoYW5nZTogZnVuY3Rpb24gKGUpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5jaGFuZ2VUcmlnZ2VyZWQpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB2YXIgJGVsID0gc2VsZi4kZWxlbWVudCwgaXNEcmFnRHJvcCA9IGFyZ3VtZW50cy5sZW5ndGggPiAxLCBpc0FqYXhVcGxvYWQgPSBzZWxmLmlzQWpheFVwbG9hZCxcclxuICAgICAgICAgICAgICAgIHRmaWxlcywgZmlsZXMgPSBpc0RyYWdEcm9wID8gYXJndW1lbnRzWzFdIDogJGVsLmdldCgwKS5maWxlcywgY3RyID0gc2VsZi5maWxlTWFuYWdlci5jb3VudCgpLFxyXG4gICAgICAgICAgICAgICAgdG90YWwsIGluaXRDb3VudCwgbGVuLCBpc1NpbmdsZVVwbCA9ICRoLmlzRW1wdHkoJGVsLmF0dHIoJ211bHRpcGxlJykpLFxyXG4gICAgICAgICAgICAgICAgbWF4Q291bnQgPSAhaXNBamF4VXBsb2FkICYmIGlzU2luZ2xlVXBsID8gMSA6IHNlbGYubWF4RmlsZUNvdW50LCBtYXhUb3RDb3VudCA9IHNlbGYubWF4VG90YWxGaWxlQ291bnQsXHJcbiAgICAgICAgICAgICAgICBpbmNsQWxsID0gbWF4VG90Q291bnQgPiAwICYmIG1heFRvdENvdW50ID4gbWF4Q291bnQsIGZsYWdTaW5nbGUgPSAoaXNTaW5nbGVVcGwgJiYgY3RyID4gMCksXHJcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yID0gZnVuY3Rpb24gKG1lc2csIGZpbGUsIHByZXZpZXdJZCwgaW5kZXgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcDEgPSAkLmV4dGVuZCh0cnVlLCB7fSwgc2VsZi5fZ2V0T3V0RGF0YShudWxsLCB7fSwge30sIGZpbGVzKSwge2lkOiBwcmV2aWV3SWQsIGluZGV4OiBpbmRleH0pLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwMiA9IHtpZDogcHJldmlld0lkLCBpbmRleDogaW5kZXgsIGZpbGU6IGZpbGUsIGZpbGVzOiBmaWxlc307XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlzQWpheFVwbG9hZCA/IHNlbGYuX3Nob3dGaWxlRXJyb3IobWVzZywgcDEpIDogc2VsZi5fc2hvd0Vycm9yKG1lc2csIHAyKTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICBtYXhDb3VudENoZWNrID0gZnVuY3Rpb24gKG4sIG0sIGFsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBtc2cgPSBhbGwgPyBzZWxmLm1zZ1RvdGFsRmlsZXNUb29NYW55IDogc2VsZi5tc2dGaWxlc1Rvb01hbnk7XHJcbiAgICAgICAgICAgICAgICAgICAgbXNnID0gbXNnLnJlcGxhY2UoJ3ttfScsIG0pLnJlcGxhY2UoJ3tufScsIG4pO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuaXNFcnJvciA9IHRocm93RXJyb3IobXNnLCBudWxsLCBudWxsLCBudWxsKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLiRjYXB0aW9uQ29udGFpbmVyLnJlbW92ZUNsYXNzKCdpY29uLXZpc2libGUnKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9zZXRDYXB0aW9uKCcnLCB0cnVlKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLiRjb250YWluZXIucmVtb3ZlQ2xhc3MoJ2ZpbGUtaW5wdXQtbmV3IGZpbGUtaW5wdXQtYWpheC1uZXcnKTtcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIHNlbGYucmVhZGVyID0gbnVsbDtcclxuICAgICAgICAgICAgc2VsZi5fcmVzZXRVcGxvYWQoKTtcclxuICAgICAgICAgICAgc2VsZi5faGlkZUZpbGVJY29uKCk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmRyb3Bab25lRW5hYmxlZCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kY29udGFpbmVyLmZpbmQoJy5maWxlLWRyb3Atem9uZSAuJyArIHNlbGYuZHJvcFpvbmVUaXRsZUNsYXNzKS5yZW1vdmUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoIWlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKGUudGFyZ2V0ICYmIGUudGFyZ2V0LmZpbGVzID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlcyA9IGUudGFyZ2V0LnZhbHVlID8gW3tuYW1lOiBlLnRhcmdldC52YWx1ZS5yZXBsYWNlKC9eLitcXFxcLywgJycpfV0gOiBbXTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZXMgPSBlLnRhcmdldC5maWxlcyB8fCB7fTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB0ZmlsZXMgPSBmaWxlcztcclxuICAgICAgICAgICAgaWYgKCRoLmlzRW1wdHkodGZpbGVzKSB8fCB0ZmlsZXMubGVuZ3RoID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoIWlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuY2xlYXIoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlc2VsZWN0bm9uZScpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX3Jlc2V0RXJyb3JzKCk7XHJcbiAgICAgICAgICAgIGxlbiA9IHRmaWxlcy5sZW5ndGg7XHJcbiAgICAgICAgICAgIGluaXRDb3VudCA9IGlzQWpheFVwbG9hZCA/IChzZWxmLmZpbGVNYW5hZ2VyLmNvdW50KCkgKyBsZW4pIDogbGVuO1xyXG4gICAgICAgICAgICB0b3RhbCA9IHNlbGYuX2dldEZpbGVDb3VudChpbml0Q291bnQsIGluY2xBbGwgPyBmYWxzZSA6IHVuZGVmaW5lZCk7XHJcbiAgICAgICAgICAgIGlmIChtYXhDb3VudCA+IDAgJiYgdG90YWwgPiBtYXhDb3VudCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFzZWxmLmF1dG9SZXBsYWNlIHx8IGxlbiA+IG1heENvdW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbWF4Q291bnRDaGVjaygoc2VsZi5hdXRvUmVwbGFjZSAmJiBsZW4gPiBtYXhDb3VudCA/IGxlbiA6IHRvdGFsKSwgbWF4Q291bnQpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICh0b3RhbCA+IG1heENvdW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmVzZXRQcmV2aWV3VGh1bWJzKGlzQWpheFVwbG9hZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaW5jbEFsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRvdGFsID0gc2VsZi5fZ2V0RmlsZUNvdW50KGluaXRDb3VudCwgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1heFRvdENvdW50ID4gMCAmJiB0b3RhbCA+IG1heFRvdENvdW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghc2VsZi5hdXRvUmVwbGFjZSB8fCBsZW4gPiBtYXhDb3VudCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4Q291bnRDaGVjaygoc2VsZi5hdXRvUmVwbGFjZSAmJiBsZW4gPiBtYXhUb3RDb3VudCA/IGxlbiA6IHRvdGFsKSwgbWF4VG90Q291bnQsIHRydWUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0b3RhbCA+IG1heENvdW50KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yZXNldFByZXZpZXdUaHVtYnMoaXNBamF4VXBsb2FkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICghaXNBamF4VXBsb2FkIHx8IGZsYWdTaW5nbGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9yZXNldFByZXZpZXdUaHVtYnMoZmFsc2UpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChmbGFnU2luZ2xlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuY2xlYXJGaWxlU3RhY2soKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0FqYXhVcGxvYWQgJiYgY3RyID09PSAwICYmICghc2VsZi5wcmV2aWV3Q2FjaGUuY291bnQodHJ1ZSkgfHwgc2VsZi5vdmVyd3JpdGVJbml0aWFsKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yZXNldFByZXZpZXdUaHVtYnModHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYucmVhZEZpbGVzKHRmaWxlcyk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfYWJvcnQ6IGZ1bmN0aW9uIChwYXJhbXMpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBkYXRhO1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5hamF4QWJvcnRlZCAmJiB0eXBlb2Ygc2VsZi5hamF4QWJvcnRlZCA9PT0gJ29iamVjdCcgJiYgc2VsZi5hamF4QWJvcnRlZC5tZXNzYWdlICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIGRhdGEgPSAkLmV4dGVuZCh0cnVlLCB7fSwgc2VsZi5fZ2V0T3V0RGF0YShudWxsKSwgcGFyYW1zKTtcclxuICAgICAgICAgICAgICAgIGRhdGEuYWJvcnREYXRhID0gc2VsZi5hamF4QWJvcnRlZC5kYXRhIHx8IHt9O1xyXG4gICAgICAgICAgICAgICAgZGF0YS5hYm9ydE1lc3NhZ2UgPSBzZWxmLmFqYXhBYm9ydGVkLm1lc3NhZ2U7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcygxMDEsIHNlbGYuJHByb2dyZXNzLCBzZWxmLm1zZ0NhbmNlbGxlZCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zaG93RmlsZUVycm9yKHNlbGYuYWpheEFib3J0ZWQubWVzc2FnZSwgZGF0YSwgJ2ZpbGVjdXN0b21lcnJvcicpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5jYW5jZWwoKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiAhIXNlbGYuYWpheEFib3J0ZWQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBfcmVzZXRGaWxlU3RhY2s6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBpID0gMDtcclxuICAgICAgICAgICAgc2VsZi5fZ2V0VGh1bWJzKCkuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgJHRodW1iID0gJCh0aGlzKSwgaW5kID0gJHRodW1iLmF0dHIoJ2RhdGEtZmlsZWluZGV4JyksIHBpZCA9ICR0aHVtYi5hdHRyKCdpZCcpO1xyXG4gICAgICAgICAgICAgICAgaWYgKGluZCA9PT0gJy0xJyB8fCBpbmQgPT09IC0xKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKCFzZWxmLmZpbGVNYW5hZ2VyLmdldEZpbGUoJHRodW1iLmF0dHIoJ2RhdGEtZmlsZWlkJykpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgJHRodW1iLmF0dHIoeydkYXRhLWZpbGVpbmRleCc6IGl9KTtcclxuICAgICAgICAgICAgICAgICAgICBpKys7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICR0aHVtYi5hdHRyKHsnZGF0YS1maWxlaW5kZXgnOiAnLTEnfSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9nZXRab29tKHBpZCkuYXR0cih7XHJcbiAgICAgICAgICAgICAgICAgICAgJ2RhdGEtZmlsZWluZGV4JzogJHRodW1iLmF0dHIoJ2RhdGEtZmlsZWluZGV4JylcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIF9pc0ZpbGVTZWxlY3Rpb25WYWxpZDogZnVuY3Rpb24gKGNudCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIGNudCA9IGNudCB8fCAwO1xyXG4gICAgICAgICAgICBpZiAoc2VsZi5yZXF1aXJlZCAmJiAhc2VsZi5nZXRGaWxlc0NvdW50KCkpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuJGVycm9yQ29udGFpbmVyLmh0bWwoJycpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fc2hvd0ZpbGVFcnJvcihzZWxmLm1zZ0ZpbGVSZXF1aXJlZCk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHNlbGYubWluRmlsZUNvdW50ID4gMCAmJiBzZWxmLl9nZXRGaWxlQ291bnQoY250KSA8IHNlbGYubWluRmlsZUNvdW50KSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9ub0ZpbGVzRXJyb3Ioe30pO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgX2NhblByZXZpZXc6IGZ1bmN0aW9uIChmaWxlKSB7XHJcbiAg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ICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLmNsZWFyKCk7XHJcbiAgICAgICAgICAgIHNlbGYuX2luaXRSZXN1bWFibGVVcGxvYWQoKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYuZW5hYmxlUmVzdW1hYmxlVXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93UGF1c2UgPT09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnNob3dQYXVzZSA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93Q2FuY2VsID09PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5zaG93Q2FuY2VsID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLnNob3dQYXVzZSA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuc2hvd0NhbmNlbCA9PT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuc2hvd0NhbmNlbCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRGaWxlU3RhY2s6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZmlsZU1hbmFnZXIuc3RhY2s7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRGaWxlTGlzdDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5maWxlTWFuYWdlci5saXN0KCk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRGaWxlc0NvdW50OiBmdW5jdGlvbiAoaW5jbHVkZUluaXRpYWwpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBsZW4gPSBzZWxmLmlzQWpheFVwbG9hZCA/IHNlbGYuZmlsZU1hbmFnZXIuY291bnQoKSA6IHNlbGYuX2lucHV0RmlsZUNvdW50KCk7XHJcbiAgICAgICAgICAgIGlmIChpbmNsdWRlSW5pdGlhbCkge1xyXG4gICAgICAgICAgICAgICAgbGVuICs9IHNlbGYucHJldmlld0NhY2hlLmNvdW50KHRydWUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHJldHVybiBzZWxmLl9nZXRGaWxlQ291bnQobGVuKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHJlYWRGaWxlczogZnVuY3Rpb24gKGZpbGVzKSB7XHJcbiAgICAgICAgICAgIHRoaXMucmVhZGVyID0gbmV3IEZpbGVSZWFkZXIoKTtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCAkZWwgPSBzZWxmLiRlbGVtZW50LCByZWFkZXIgPSBzZWxmLnJlYWRlciwgJGNvbnRhaW5lciA9IHNlbGYuJHByZXZpZXdDb250YWluZXIsXHJcbiAgICAgICAgICAgICAgICAkc3RhdHVzID0gc2VsZi4kcHJldmlld1N0YXR1cywgbXNnTG9hZGluZyA9IHNlbGYubXNnTG9hZGluZywgbXNnUHJvZ3Jlc3MgPSBzZWxmLm1zZ1Byb2dyZXNzLFxyXG4gICAgICAgICAgICAgICAgcHJldmlld0luaXRJZCA9IHNlbGYucHJldmlld0luaXRJZCwgbnVtRmlsZXMgPSBmaWxlcy5sZW5ndGgsIHNldHRpbmdzID0gc2VsZi5maWxlVHlwZVNldHRpbmdzLFxyXG4gICAgICAgICAgICAgICAgcmVhZEZpbGUsIGZpbGVUeXBlcyA9IHNlbGYuYWxsb3dlZEZpbGVUeXBlcywgdHlwTGVuID0gZmlsZVR5cGVzID8gZmlsZVR5cGVzLmxlbmd0aCA6IDAsXHJcbiAgICAgICAgICAgICAgICBmaWxlRXh0ID0gc2VsZi5hbGxvd2VkRmlsZUV4dGVuc2lvbnMsIHN0ckV4dCA9ICRoLmlzRW1wdHkoZmlsZUV4dCkgPyAnJyA6IGZpbGVFeHQuam9pbignLCAnKSxcclxuICAgICAgICAgICAgICAgIHRocm93RXJyb3IgPSBmdW5jdGlvbiAobXNnLCBmaWxlLCBwcmV2aWV3SWQsIGluZGV4LCBmaWxlSWQsIHJlbW92ZVRodW1iKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHAxID0gJC5leHRlbmQodHJ1ZSwge30sIHNlbGYuX2dldE91dERhdGEobnVsbCwge30sIHt9LCBmaWxlcyksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtpZDogcHJldmlld0lkLCBpbmRleDogaW5kZXgsIGZpbGVJZDogZmlsZUlkfSksICR0aHVtYixcclxuICAgICAgICAgICAgICAgICAgICAgICAgcDIgPSB7aWQ6IHByZXZpZXdJZCwgaW5kZXg6IGluZGV4LCBmaWxlSWQ6IGZpbGVJZCwgZmlsZTogZmlsZSwgZmlsZXM6IGZpbGVzfTtcclxuICAgICAgICAgICAgICAgICAgICByZW1vdmVUaHVtYiA9IHJlbW92ZVRodW1iIHx8IHNlbGYucmVtb3ZlRnJvbVByZXZpZXdPbkVycm9yO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICghcmVtb3ZlVGh1bWIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcHJldmlld0RlZmF1bHQoZmlsZSwgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICR0aHVtYiA9IHNlbGYuX2dldEZyYW1lKHByZXZpZXdJZCwgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuaXNBamF4VXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhZEZpbGUoaW5kZXggKyAxKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2VsZi5wcm9jZXNzRGVsYXkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYudW5sb2NrKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bUZpbGVzID0gMDtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlbW92ZVRodW1iICYmICR0aHVtYi5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgJHRodW1iLnJlbW92ZSgpO1xyXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX2luaXRGaWxlQWN0aW9ucygpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGh1bWIuZmluZCgnLmt2LWZpbGUtdXBsb2FkJykucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuaXNFcnJvciA9IHNlbGYuaXNBamF4VXBsb2FkID8gc2VsZi5fc2hvd0ZpbGVFcnJvcihtc2csIHAxKSA6IHNlbGYuX3Nob3dFcnJvcihtc2csIHAyKTtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl91cGRhdGVGaWxlRGV0YWlscyhudW1GaWxlcyk7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLmNsZWFySW1hZ2VzKCk7XHJcbiAgICAgICAgICAgICQuZWFjaChmaWxlcywgZnVuY3Rpb24gKGtleSwgZmlsZSkge1xyXG4gICAgICAgICAgICAgICAgdmFyIGZ1bmMgPSBzZWxmLmZpbGVUeXBlU2V0dGluZ3MuaW1hZ2U7XHJcbiAgICAgICAgICAgICAgICBpZiAoZnVuYyAmJiBmdW5jKGZpbGUudHlwZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLmZpbGVNYW5hZ2VyLnRvdGFsSW1hZ2VzKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICByZWFkRmlsZSA9IGZ1bmN0aW9uIChpKSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgJGVycm9yID0gc2VsZi4kZXJyb3JDb250YWluZXIsIGVycm9ycywgZm0gPSBzZWxmLmZpbGVNYW5hZ2VyO1xyXG4gICAgICAgICAgICAgICAgaWYgKCRoLmlzRW1wdHkoJGVsLmF0dHIoJ211bHRpcGxlJykpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbnVtRmlsZXMgPSAxO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKGkgPj0gbnVtRmlsZXMpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnVubG9jaygpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLmR1cGxpY2F0ZUVycm9ycy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3JzID0gJzxsaT4nICsgc2VsZi5kdXBsaWNhdGVFcnJvcnMuam9pbignPC9saT48bGk+JykgKyAnPC9saT4nO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoJGVycm9yLmZpbmQoJ3VsJykubGVuZ3RoID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZXJyb3IuaHRtbChzZWxmLmVycm9yQ2xvc2VCdXR0b24gKyAnPHVsPicgKyBlcnJvcnMgKyAnPC91bD4nKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRlcnJvci5maW5kKCd1bCcpLmFwcGVuZChlcnJvcnMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRlcnJvci5mYWRlSW4oc2VsZi5mYWRlRGVsYXkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9oYW5kbGVyKCRlcnJvci5maW5kKCcua3YtZXJyb3ItY2xvc2UnKSwgJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGVycm9yLmZhZGVPdXQoc2VsZi5mYWRlRGVsYXkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5kdXBsaWNhdGVFcnJvcnMgPSBbXTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuaXNBamF4VXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlYmF0Y2hzZWxlY3RlZCcsIFtmbS5zdGFja10pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm0uY291bnQoKSA9PT0gMCAmJiAhc2VsZi5pc0Vycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnJlc2V0KCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWJhdGNoc2VsZWN0ZWQnLCBbZmlsZXNdKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgJGNvbnRhaW5lci5yZW1vdmVDbGFzcygnZmlsZS10aHVtYi1sb2FkaW5nJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgJHN0YXR1cy5odG1sKCcnKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XH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AgICAgICdwZXJjZW50JzogNTAsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IGNhcHRpb25cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHN0YXR1cy5odG1sKG1zZyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl91cGRhdGVGaWxlRGV0YWlscyhudW1GaWxlcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkRmlsZShpICsgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuX3JhaXNlKCdmaWxlbG9hZGVkJywgW2ZpbGUsIHByZXZpZXdJZCwgaSwgcmVhZGVyXSkgJiYgc2VsZi5pc0FqYXhVcGxvYWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZtLmFkZChmaWxlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICBpZiAoIWZpbGUpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBmaWxlSWQgPSBmbS5nZXRJZChmaWxlKTtcclxuICAgICAgICAgICAgICAgIGlmICh0eXBMZW4gPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHR5cExlbjsgaisrKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cDEgPSBmaWxlVHlwZXNbal07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cDIgPSBzZWxmLm1zZ0ZpbGVUeXBlc1t0eXAxXSB8fCB0eXAxO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJUeXBlcyArPSBqID09PSAwID8gdHlwMiA6ICcsICcgKyB0eXAyO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChjYXB0aW9uID09PSBmYWxzZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlYWRGaWxlKGkgKyAxKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoY2FwdGlvbi5sZW5ndGggPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBtc2cgPSBzZWxmLm1zZ0ludmFsaWRGaWxlTmFtZS5yZXBsYWNlKCd7bmFtZX0nLCAkaC5odG1sRW5jb2RlKCRoLmdldEZpbGVOYW1lKGZpbGUpLCAnW3Vua25vd25dJykpO1xyXG4gICAgICAgICAgICAgICAgICAgIHRocm93RXJyb3IobXNnLCBmaWxlLCBwcmV2aWV3SWQsIGksIGZpbGVJZCk7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKCEkaC5pc0VtcHR5KGZpbGVFeHQpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZUV4dEV4cHIgPSBuZXcgUmVnRXhwKCdcXFxcLignICsgZmlsZUV4dC5qb2luKCd8JykgKyAnKSQnLCAnaScpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgZlNpemVLQiA9IGZpbGVTaXplLnRvRml4ZWQoMik7XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5pc0FqYXhVcGxvYWQgJiYgZm0uZXhpc3RzKGZpbGVJZCkgfHwgc2VsZi5fZ2V0RnJhbWUocHJldmlld0lkLCB0cnVlKS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICAgICB2YXIgcDIgPSB7aWQ6IHByZXZpZXdJZCwgaW5kZXg6IGksIGZpbGVJZDogZmlsZUlkLCBmaWxlOiBmaWxlLCBmaWxlczogZmlsZXN9O1xyXG4gICAgICAgICAgICAgICAgICAgIG1zZyA9IHNlbGYubXNnRHVwbGljYXRlRmlsZS5zZXRUb2tlbnMoe25hbWU6IGNhcHRpb24sIHNpemU6IGZTaXplS0J9KTtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5pc0FqYXhVcGxvYWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmR1cGxpY2F0ZUVycm9ycy5wdXNoKG1zZyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWR1cGxpY2F0ZWVycm9yJywgW2ZpbGUsIGZpbGVJZCwgY2FwdGlvbiwgZlNpemVLQiwgcHJldmlld0lkLCBpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkRmlsZShpICsgMSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl91cGRhdGVGaWxlRGV0YWlscyhudW1GaWxlcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9zaG93RXJyb3IobXNnLCBwMik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYudW5sb2NrKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bUZpbGVzID0gMDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fY2xlYXJGaWxlSW5wdXQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5yZXNldCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl91cGRhdGVGaWxlRGV0YWlscyhudW1GaWxlcyk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLm1heEZpbGVTaXplID4gMCAmJiBmaWxlU2l6ZSA+IHNlbGYubWF4RmlsZVNpemUpIHtcclxuICAgICAgICAgICAgICAgICAgICBtc2cgPSBzZWxmLm1zZ1NpemVUb29MYXJnZS5zZXRUb2tlbnMoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IGNhcHRpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogZlNpemVLQixcclxuICAgICAgICAgICAgICAgICAgICAgICAgJ21heFNpemUnOiBzZWxmLm1heEZpbGVTaXplXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcihtc2csIGZpbGUsIHByZXZpZXdJZCwgaSwgZmlsZUlkKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5taW5GaWxlU2l6ZSAhPT0gbnVsbCAmJiBmaWxlU2l6ZSA8PSAkaC5nZXROdW0oc2VsZi5taW5GaWxlU2l6ZSkpIHtcclxuICAgICAgICAgICAgICAgICAgICBtc2cgPSBzZWxmLm1zZ1NpemVUb29TbWFsbC5zZXRUb2tlbnMoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAnbmFtZSc6IGNhcHRpb24sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICdzaXplJzogZlNpemVLQixcclxuICAgICAgICAgICAgICAgICAgICAgICAgJ21pblNpemUnOiBzZWxmLm1pbkZpbGVTaXplXHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcihtc2csIGZpbGUsIHByZXZpZXdJZCwgaSwgZmlsZUlkKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoISRoLmlzRW1wdHkoZmlsZVR5cGVzKSAmJiAkaC5pc0FycmF5KGZpbGVUeXBlcykpIHtcclxuICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgZmlsZVR5cGVzLmxlbmd0aDsgaiArPSAxKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cCA9IGZpbGVUeXBlc1tqXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuYyA9IHNldHRpbmdzW3R5cF07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVDb3VudCArPSAhZnVuYyB8fCAodHlwZW9mIGZ1bmMgIT09ICdmdW5jdGlvbicpID8gMCA6IChmdW5jKGZpbGUudHlwZSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoLmdldEZpbGVOYW1lKGZpbGUpKSA/IDEgOiAwKTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZpbGVDb3VudCA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBtc2cgPSBzZWxmLm1zZ0ludmFsaWRGaWxlVHlwZS5zZXRUb2tlbnMoe25hbWU6IGNhcHRpb24sIHR5cGVzOiBzdHJUeXBlc30pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKG1zZywgZmlsZSwgcHJldmlld0lkLCBpLCBmaWxlSWQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgaWYgKGZpbGVDb3VudCA9PT0gMCAmJiAhJGguaXNFbXB0eShmaWxlRXh0KSAmJiAkaC5pc0FycmF5KGZpbGVFeHQpICYmICEkaC5pc0VtcHR5KGZpbGVFeHRFeHByKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNoayA9ICRoLmNvbXBhcmUoY2FwdGlvbiwgZmlsZUV4dEV4cHIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGZpbGVDb3VudCArPSAkaC5pc0VtcHR5KGNoaykgPyAwIDogY2hrLmxlbmd0aDtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZmlsZUNvdW50ID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZyA9IHNlbGYubXNnSW52YWxpZEZpbGVFeHRlbnNpb24uc2V0VG9rZW5zKHtuYW1lOiBjYXB0aW9uLCBleHRlbnNpb25zOiBzdHJFeHR9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcihtc2csIGZpbGUsIHByZXZpZXdJZCwgaSwgZmlsZUlkKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlmICghc2VsZi5fY2FuUHJldmlldyhmaWxlKSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNhbkxvYWQgPSBzZWxmLmlzQWpheFVwbG9hZCAmJiBzZWxmLl9yYWlzZSgnZmlsZWJlZm9yZWxvYWQnLCBbZmlsZSwgaSwgcmVhZGVyXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuaXNBamF4VXBsb2FkICYmIGNhbkxvYWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm0uYWRkKGZpbGUpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5zaG93UHJldmlldyAmJiBjYW5Mb2FkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRjb250YWluZXIuYWRkQ2xhc3MoJ2ZpbGUtdGh1bWItbG9hZGluZycpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9wcmV2aWV3RGVmYXVsdChmaWxlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5pdEZpbGVBY3Rpb25zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2FuTG9hZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fdXBkYXRlRmlsZURldGFpbHMobnVtRmlsZXMpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRGaWxlKGkgKyAxKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGVsb2FkZWQnLCBbZmlsZSwgcHJldmlld0lkLCBpXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSwgMTApO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGlzVGV4dCA9IGZuVGV4dChmaWxlLnR5cGUsIGNhcHRpb24pO1xyXG4gICAgICAgICAgICAgICAgaXNIdG1sID0gZm5IdG1sKGZpbGUudHlwZSwgY2FwdGlvbik7XHJcbiAgICAgICAgICAgICAgICBpc0ltYWdlID0gZm5JbWFnZShmaWxlLnR5cGUsIGNhcHRpb24pO1xyXG4gICAgICAgICAgICAgICAgJHN0YXR1cy5odG1sKG1zZ0xvYWRpbmcucmVwbGFjZSgne2luZGV4fScsIGkgKyAxKS5yZXBsYWNlKCd7ZmlsZXN9JywgbnVtRmlsZXMpKTtcclxuICAgICAgICAgICAgICAgICRjb250YWluZXIuYWRkQ2xhc3MoJ2ZpbGUtdGh1bWItbG9hZGluZycpO1xyXG4gICAgICAgICAgICAgICAgcmVhZGVyLm9uZXJyb3IgPSBmdW5jdGlvbiAoZXZ0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5fZXJyb3JIYW5kbGVyKGV2dCwgY2FwdGlvbik7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgcmVhZGVyLm9ubG9hZCA9IGZ1bmN0aW9uICh0aGVGaWxlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhleCwgZmlsZUluZm8sIHVpbnQsIGJ5dGUsIGJ5dGVzID0gW10sIGNvbnRlbnRzLCBtaW1lLCByZWFkVGV4dEltYWdlID0gZnVuY3Rpb24gKHRleHRGbGFnKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuZXdSZWFkZXIgPSBuZXcgRmlsZVJlYWRlcigpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdSZWFkZXIub25lcnJvciA9IGZ1bmN0aW9uICh0aGVGaWxlTmV3KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9lcnJvckhhbmRsZXIodGhlRmlsZU5ldywgY2FwdGlvbik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1JlYWRlci5vbmxvYWQgPSBmdW5jdGlvbiAodGhlRmlsZU5ldykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuaXNBamF4VXBsb2FkICYmICFzZWxmLl9yYWlzZSgnZmlsZWJlZm9yZWxvYWQnLCBbZmlsZSwgaSwgcmVhZGVyXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLl9wcmV2aWV3RmlsZShpLCBmaWxlLCB0aGVGaWxlTmV3LCBwcmV2aWV3RGF0YSwgZmlsZUluZm8pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5faW5pdEZpbGVBY3Rpb25zKCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9jZXNzRmlsZUxvYWRlZCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGV4dEZsYWcpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1JlYWRlci5yZWFkQXNUZXh0KGZpbGUsIHNlbGYudGV4dEVuY29kaW5nKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1JlYWRlci5yZWFkQXNEYXRhVVJMKGZpbGUpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlSW5mbyA9IHsnbmFtZSc6IGNhcHRpb24sICd0eXBlJzogZmlsZS50eXBlfTtcclxuICAgICAgICAgICAgICAgICAgICAkLmVhY2goc2V0dGluZ3MsIGZ1bmN0aW9uIChrLCBmKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChrICE9PSAnb2JqZWN0JyAmJiBrICE9PSAnb3RoZXInICYmIHR5cGVvZiBmID09PSAnZnVuY3Rpb24nICYmIGYoZmlsZS50eXBlLCBjYXB0aW9uKSkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga25vd25UeXBlcysrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGtub3duVHlwZXMgPT09IDApIHsgLy8gYXV0byBkZXRlY3QgbWltZSB0eXBlcyBmcm9tIGNvbnRlbnQgaWYgbm8ga25vd24gZmlsZSB0eXBlcyBkZXRlY3RlZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB1aW50ID0gbmV3IFVpbnQ4QXJyYXkodGhlRmlsZS50YXJnZXQucmVzdWx0KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHVpbnQubGVuZ3RoOyBqKyspIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGUgPSB1aW50W2pdLnRvU3RyaW5nKDE2KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzLnB1c2goYnl0ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgaGV4ID0gYnl0ZXMuam9pbignJykudG9Mb3dlckNhc2UoKS5zdWJzdHJpbmcoMCwgOCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pbWUgPSAkaC5nZXRNaW1lVHlwZShoZXgsICcnLCAnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkaC5pc0VtcHR5KG1pbWUpKSB7IC8vIGxvb2sgZm9yIGFzY2lpIHRleHQgY29udGVudFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudHMgPSAkaC5hcnJheUJ1ZmZlcjJTdHJpbmcocmVhZGVyLnJlc3VsdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW1lID0gJGguaXNTdmcoY29udGVudHMpID8gJ2ltYWdlL3N2Zyt4bWwnIDogJGguZ2V0TWltZVR5cGUoaGV4LCBjb250ZW50cywgZmlsZS50eXBlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlSW5mbyA9IHsnbmFtZSc6IGNhcHRpb24sICd0eXBlJzogbWltZX07XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzVGV4dCA9IGZuVGV4dChtaW1lLCAnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzSHRtbCA9IGZuSHRtbChtaW1lLCAnJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzSW1hZ2UgPSBmbkltYWdlKG1pbWUsICcnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHh0RmxhZyA9IGlzVGV4dCB8fCBpc0h0bWw7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eHRGbGFnIHx8IGlzSW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRUZXh0SW1hZ2UodHh0RmxhZyk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYuaXNBamF4VXBsb2FkICYmICFzZWxmLl9yYWlzZSgnZmlsZWJlZm9yZWxvYWQnLCBbZmlsZSwgaSwgcmVhZGVyXSkpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9wcmV2aWV3RmlsZShpLCBmaWxlLCB0aGVGaWxlLCBwcmV2aWV3RGF0YSwgZmlsZUluZm8pO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX2luaXRGaWxlQWN0aW9ucygpO1xyXG4gICAgICAgICAgICAgICAgICAgIHByb2Nlc3NGaWxlTG9hZGVkKCk7XHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgcmVhZGVyLm9ucHJvZ3Jlc3MgPSBmdW5jdGlvbiAoZGF0YSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmxlbmd0aENvbXB1dGFibGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZhY3QgPSAoZGF0YS5sb2FkZWQgLyBkYXRhLnRvdGFsKSAqIDEwMCwgcHJvZ3Jlc3MgPSBNYXRoLmNlaWwoZmFjdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZyA9IG1zZ1Byb2dyZXNzLnNldFRva2Vucyh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaW5kZXgnOiBpICsgMSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdmaWxlcyc6IG51bUZpbGVzLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3BlcmNlbnQnOiBwcm9ncmVzcyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICduYW1lJzogY2FwdGlvblxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3RhdHVzLmh0bWwobXNnKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2VsZi5wcm9jZXNzRGVsYXkpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICBpZiAoaXNUZXh0IHx8IGlzSHRtbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlYWRlci5yZWFkQXNUZXh0KGZpbGUsIHNlbGYudGV4dEVuY29kaW5nKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzSW1hZ2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVhZGVyLnJlYWRBc0RhdGFVUkwoZmlsZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVhZGVyLnJlYWRBc0FycmF5QnVmZmVyKGZpbGUpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgIHJlYWRGaWxlKDApO1xyXG4gICAgICAgICAgICBzZWxmLl91cGRhdGVGaWxlRGV0YWlscyhudW1GaWxlcywgdHJ1ZSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBsb2NrOiBmdW5jdGlvbiAoc2VsZWN0TW9kZSkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRjb250YWluZXIgPSBzZWxmLiRjb250YWluZXI7XHJcbiAgICAgICAgICAgIHNlbGYuX3Jlc2V0RXJyb3JzKCk7XHJcbiAgICAgICAgICAgIHNlbGYuZGlzYWJsZSgpO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGVjdE1vZGUgJiYgc2VsZi5zaG93Q2FuY2VsKSB7XHJcbiAgICAgICAgICAgICAgICAkY29udGFpbmVyLmZpbmQoJy5maWxlaW5wdXQtY2FuY2VsJykuc2hvdygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmICghc2VsZWN0TW9kZSAmJiBzZWxmLnNob3dQYXVzZSkge1xyXG4gICAgICAgICAgICAgICAgJGNvbnRhaW5lci5maW5kKCcuZmlsZWlucHV0LXBhdXNlJykuc2hvdygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxlbG9jaycsIFtzZWxmLmZpbGVNYW5hZ2VyLnN0YWNrLCBzZWxmLl9nZXRFeHRyYURhdGEoKV0pO1xyXG4gICAgICAgICAgICByZXR1cm4gc2VsZi4kZWxlbWVudDtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHVubG9jazogZnVuY3Rpb24gKHJlc2V0KSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGNvbnRhaW5lciA9IHNlbGYuJGNvbnRhaW5lcjtcclxuICAgICAgICAgICAgaWYgKHJlc2V0ID09PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHJlc2V0ID0gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLmVuYWJsZSgpO1xyXG4gICAgICAgICAgICAkY29udGFpbmVyLnJlbW92ZUNsYXNzKCdpcy1sb2NrZWQnKTtcclxuICAgICAgICAgICAgaWYgKHNlbGYuc2hvd0NhbmNlbCkge1xyXG4gICAgICAgICAgICAgICAgJGNvbnRhaW5lci5maW5kKCcuZmlsZWlucHV0LWNhbmNlbCcpLmhpZGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2VsZi5zaG93UGF1c2UpIHtcclxuICAgICAgICAgICAgICAgICRjb250YWluZXIuZmluZCgnLmZpbGVpbnB1dC1wYXVzZScpLmhpZGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocmVzZXQpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3Jlc2V0RmlsZVN0YWNrKCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGV1bmxvY2snLCBbc2VsZi5maWxlTWFuYWdlci5zdGFjaywgc2VsZi5fZ2V0RXh0cmFEYXRhKCldKTtcclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICByZXN1bWU6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCBmbGFnID0gZmFsc2UsIHJtID0gc2VsZi5yZXN1bWFibGVNYW5hZ2VyO1xyXG4gICAgICAgICAgICBpZiAoIXNlbGYuZW5hYmxlUmVzdW1hYmxlVXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi4kZWxlbWVudDtcclxuICAgICAgIC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ICByZXR1cm4gc2VsZi4kZWxlbWVudDtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAocm0uY2h1bmtJbnRlcnZhbElkKSB7XHJcbiAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHJtLmNodW5rSW50ZXJ2YWxJZCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHNlbGYuYWpheFF1ZXVlSW50ZXJ2YWxJZCkge1xyXG4gICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChzZWxmLmFqYXhRdWV1ZUludGVydmFsSWQpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX3JhaXNlKCdmaWxldXBsb2FkcGF1c2VkJywgW3NlbGYuZmlsZU1hbmFnZXIsIHJtXSk7XHJcbiAgICAgICAgICAgIGlmIChsZW4gPiAwKSB7XHJcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpICs9IDEpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLnBhdXNlZCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgeGhyW2ldLmFib3J0KCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHNlbGYuc2hvd1ByZXZpZXcpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX2dldFRodW1icygpLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciAkdGh1bWIgPSAkKHRoaXMpLCBmaWxlSWQgPSAkdGh1bWIuYXR0cignZGF0YS1maWxlaWQnKSwgdCA9IHNlbGYuX2dldExheW91dFRlbXBsYXRlKCdzdGF0cycpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0cywgJGluZGljYXRvciA9ICR0aHVtYi5maW5kKCcuZmlsZS11cGxvYWQtaW5kaWNhdG9yJyk7XHJcbiAgICAgICAgICAgICAgICAgICAgJHRodW1iLnJlbW92ZUNsYXNzKCdmaWxlLXVwbG9hZGluZycpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgkaW5kaWNhdG9yLmF0dHIoJ3RpdGxlJykgPT09IGFjdGlvbnMuaW5kaWNhdG9yTG9hZGluZ1RpdGxlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFRodW1iU3RhdHVzKCR0aHVtYiwgJ1BhdXNlZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0cyA9IHQuc2V0VG9rZW5zKHtwZW5kaW5nVGltZTogc2VsZi5tc2dQYXVzZWQsIHVwbG9hZFNwZWVkOiAnJ30pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnBhdXNlZCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKHBjdCwgJHRodW1iLmZpbmQoJy5maWxlLXRodW1iLXByb2dyZXNzJyksIHBjdCArICclJywgc3RhdHMpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAoIXNlbGYuZmlsZU1hbmFnZXIuZ2V0RmlsZShmaWxlSWQpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICR0aHVtYi5maW5kKCcua3YtZmlsZS1yZW1vdmUnKS5yZW1vdmVDbGFzcygnZGlzYWJsZWQnKS5yZW1vdmVBdHRyKCdkaXNhYmxlZCcpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDEwMSwgc2VsZi4kcHJvZ3Jlc3MsIHNlbGYubXNnUGF1c2VkKTtcclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjYW5jZWw6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzLCB4aHIgPSBzZWxmLmFqYXhSZXF1ZXN0cywgcm0gPSBzZWxmLnJlc3VtYWJsZU1hbmFnZXIsIGxlbiA9IHhoci5sZW5ndGgsIGk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmVuYWJsZVJlc3VtYWJsZVVwbG9hZCAmJiBybS5jaHVua0ludGVydmFsSWQpIHtcclxuICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwocm0uY2h1bmtJbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgICAgIHJtLnJlc2V0KCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZXVwbG9hZGNhbmNlbGxlZCcsIFtzZWxmLmZpbGVNYW5hZ2VyLCBybV0pO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fcmFpc2UoJ2ZpbGV1cGxvYWRjYW5jZWxsZWQnLCBbc2VsZi5maWxlTWFuYWdlcl0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmFqYXhRdWV1ZUludGVydmFsSWQpIHtcclxuICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoc2VsZi5hamF4UXVldWVJbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9pbml0QWpheCgpO1xyXG4gICAgICAgICAgICBpZiAobGVuID4gMCkge1xyXG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSArPSAxKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5jYW5jZWxsaW5nID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgICAgICB4aHJbaV0uYWJvcnQoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9nZXRUaHVtYnMoKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciAkdGh1bWIgPSAkKHRoaXMpLCBmaWxlSWQgPSAkdGh1bWIuYXR0cignZGF0YS1maWxlaWQnKSwgJHByb2cgPSAkdGh1bWIuZmluZCgnLmZpbGUtdGh1bWItcHJvZ3Jlc3MnKTtcclxuICAgICAgICAgICAgICAgICR0aHVtYi5yZW1vdmVDbGFzcygnZmlsZS11cGxvYWRpbmcnKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDAsICRwcm9nKTtcclxuICAgICAgICAgICAgICAgICRwcm9nLmhpZGUoKTtcclxuICAgICAgICAgICAgICAgIGlmICghc2VsZi5maWxlTWFuYWdlci5nZXRGaWxlKGZpbGVJZCkpIHtcclxuICAgICAgICAgICAgICAgICAgICAkdGh1bWIuZmluZCgnLmt2LWZpbGUtdXBsb2FkJykucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkJykucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgICAgICAgICAkdGh1bWIuZmluZCgnLmt2LWZpbGUtcmVtb3ZlJykucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkJykucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNlbGYudW5sb2NrKCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzQ2FuY2VsbGVkKCk7XHJcbiAgICAgICAgICAgIH0sIHNlbGYucHJvY2Vzc0RlbGF5KTtcclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBjbGVhcjogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsIGNhcDtcclxuICAgICAgICAgICAgaWYgKCFzZWxmLl9yYWlzZSgnZmlsZWNsZWFyJykpIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLiRidG5VcGxvYWQucmVtb3ZlQXR0cignZGlzYWJsZWQnKTtcclxuICAgICAgICAgICAgc2VsZi5fZ2V0VGh1bWJzKCkuZmluZCgndmlkZW8sYXVkaW8saW1nJykuZWFjaChmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgICAgICAkaC5jbGVhbk1lbW9yeSgkKHRoaXMpKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHNlbGYuX2NsZWFyRmlsZUlucHV0KCk7XHJcbiAgICAgICAgICAgIHNlbGYuX3Jlc2V0VXBsb2FkKCk7XHJcbiAgICAgICAgICAgIHNlbGYuY2xlYXJGaWxlU3RhY2soKTtcclxuICAgICAgICAgICAgc2VsZi5fcmVzZXRFcnJvcnModHJ1ZSk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLl9oYXNJbml0aWFsUHJldmlldygpKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9zaG93RmlsZUljb24oKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3Jlc2V0UHJldmlldygpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5faW5pdFByZXZpZXdBY3Rpb25zKCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLiRjb250YWluZXIucmVtb3ZlQ2xhc3MoJ2ZpbGUtaW5wdXQtbmV3Jyk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9nZXRUaHVtYnMoKS5lYWNoKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICBzZWxmLl9jbGVhck9iamVjdHMoJCh0aGlzKSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgIGlmIChzZWxmLmlzQWpheFVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYucHJldmlld0NhY2hlLmRhdGEgPSB7fTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNlbGYuJHByZXZpZXcuaHRtbCgnJyk7XHJcbiAgICAgICAgICAgICAgICBjYXAgPSAoIXNlbGYub3ZlcndyaXRlSW5pdGlhbCAmJiBzZWxmLmluaXRpYWxDYXB0aW9uLmxlbmd0aCA+IDApID8gc2VsZi5pbml0aWFsQ2FwdGlvbiA6ICcnO1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kY2FwdGlvbi5hdHRyKCd0aXRsZScsICcnKS52YWwoY2FwKTtcclxuICAgICAgICAgICAgICAgICRoLmFkZENzcyhzZWxmLiRjb250YWluZXIsICdmaWxlLWlucHV0LW5ldycpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fdmFsaWRhdGVEZWZhdWx0UHJldmlldygpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChzZWxmLiRjb250YWluZXIuZmluZCgkaC5GUkFNRVMpLmxlbmd0aCA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKCFzZWxmLl9pbml0Q2FwdGlvbigpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi4kY2FwdGlvbkNvbnRhaW5lci5yZW1vdmVDbGFzcygnaWNvbi12aXNpYmxlJyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5faGlkZUZpbGVJY29uKCk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmZvY3VzQ2FwdGlvbk9uQ2xlYXIpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuJGNhcHRpb25Db250YWluZXIuZm9jdXMoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9zZXRGaWxlRHJvcFpvbmVUaXRsZSgpO1xyXG4gICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWNsZWFyZWQnKTtcclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICByZXNldDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XHJcbiAgICAgICAgICAgIGlmICghc2VsZi5fcmFpc2UoJ2ZpbGVyZXNldCcpKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5sYXN0UHJvZ3Jlc3MgPSAwO1xyXG4gICAgICAgICAgICBzZWxmLl9yZXNldFByZXZpZXcoKTtcclxuICAgICAgICAgICAgc2VsZi4kY29udGFpbmVyLmZpbmQoJy5maWxlaW5wdXQtZmlsZW5hbWUnKS50ZXh0KCcnKTtcclxuICAgICAgICAgICAgJGguYWRkQ3NzKHNlbGYuJGNvbnRhaW5lciwgJ2ZpbGUtaW5wdXQtbmV3Jyk7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLmdldEZyYW1lcygpLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kY29udGFpbmVyLnJlbW92ZUNsYXNzKCdmaWxlLWlucHV0LW5ldycpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuY2xlYXJGaWxlU3RhY2soKTtcclxuICAgICAgICAgICAgc2VsZi5fc2V0RmlsZURyb3Bab25lVGl0bGUoKTtcclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBkaXNhYmxlOiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGNvbnRhaW5lciA9IHNlbGYuJGNvbnRhaW5lcjtcclxuICAgICAgICAg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BpZiAodG90TGVuID09PSAwICYmICFoYXNFeHRyYURhdGEpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3Nob3dGaWxlRXJyb3Ioc2VsZi5tc2dVcGxvYWRFbXB0eSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5jYW5jZWxsaW5nID0gZmFsc2U7XHJcbiAgICAgICAgICAgIHNlbGYuX3Nob3dQcm9ncmVzcygpO1xyXG4gICAgICAgICAgICBzZWxmLmxvY2soKTtcclxuICAgICAgICAgICAgaWYgKHRvdExlbiA9PT0gMCAmJiBoYXNFeHRyYURhdGEpIHtcclxuICAgICAgICAgICAgICAgIHNlbGYuX3NldFByb2dyZXNzKDIpO1xyXG4gICAgICAgICAgICAgICAgc2VsZi5fdXBsb2FkRXh0cmFPbmx5KCk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHNlbGYuZW5hYmxlUmVzdW1hYmxlVXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5yZXN1bWUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoc2VsZi51cGxvYWRBc3luYyB8fCBzZWxmLmVuYWJsZVJlc3VtYWJsZVVwbG9hZCkge1xyXG4gICAgICAgICAgICAgICAgb3V0RGF0YSA9IHNlbGYuX2dldE91dERhdGEobnVsbCk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9yYWlzZSgnZmlsZWJhdGNocHJldXBsb2FkJywgW291dERhdGFdKTtcclxuICAgICAgICAgICAgICAgIHNlbGYuZmlsZUJhdGNoQ29tcGxldGVkID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICBzZWxmLnVwbG9hZENhY2hlID0gW107XHJcbiAgICAgICAgICAgICAgICAkLmVhY2goc2VsZi5nZXRGaWxlU3RhY2soKSwgZnVuY3Rpb24gKGlkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByZXZpZXdJZCA9IHNlbGYuX2dldFRodW1iSWQoaWQpO1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYudXBsb2FkQ2FjaGUucHVzaCh7aWQ6IHByZXZpZXdJZCwgY29udGVudDogbnVsbCwgY29uZmlnOiBudWxsLCB0YWdzOiBudWxsLCBhcHBlbmQ6IHRydWV9KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgc2VsZi4kcHJldmlldy5maW5kKCcuZmlsZS1wcmV2aWV3LWluaXRpYWwnKS5yZW1vdmVDbGFzcygkaC5TT1JUX0NTUyk7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9pbml0U29ydGFibGUoKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9zZXRQcm9ncmVzcygyKTtcclxuICAgICAgICAgICAgc2VsZi5oYXNJbml0RGF0YSA9IGZhbHNlO1xyXG4gICAgICAgICAgICBpZiAoc2VsZi51cGxvYWRBc3luYykge1xyXG4gICAgICAgICAgICAgICAgaSA9IDA7XHJcbiAgICAgICAgICAgICAgICAkLmVhY2goZm0uc3RhY2ssIGZ1bmN0aW9uIChpZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuX3VwbG9hZFNpbmdsZShpLCBpZCwgdHJ1ZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgaSsrO1xyXG4gICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgc2VsZi5fdXBsb2FkQmF0Y2goKTtcclxuICAgICAgICAgICAgcmV0dXJuIHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBkZXN0cm95OiBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGZvcm0gPSBzZWxmLiRmb3JtLCAkY29udCA9IHNlbGYuJGNvbnRhaW5lciwgJGVsID0gc2VsZi4kZWxlbWVudCwgbnMgPSBzZWxmLm5hbWVzcGFjZTtcclxuICAgICAgICAgICAgJChkb2N1bWVudCkub2ZmKG5zKTtcclxuICAgICAgICAgICAgJCh3aW5kb3cpLm9mZihucyk7XHJcbiAgICAgICAgICAgIGlmICgkZm9ybSAmJiAkZm9ybS5sZW5ndGgpIHtcclxuICAgICAgICAgICAgICAgICRmb3JtLm9mZihucyk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKHNlbGYuaXNBamF4VXBsb2FkKSB7XHJcbiAgICAgICAgICAgICAgICBzZWxmLl9jbGVhckZpbGVJbnB1dCgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHNlbGYuX2NsZWFudXAoKTtcclxuICAgICAgICAgICAgc2VsZi5faW5pdFByZXZpZXdDYWNoZSgpO1xyXG4gICAgICAgICAgICAkZWwuaW5zZXJ0QmVmb3JlKCRjb250KS5vZmYobnMpLnJlbW92ZURhdGEoKTtcclxuICAgICAgICAgICAgJGNvbnQub2ZmKCkucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgIHJldHVybiAkZWw7XHJcbiAgICAgICAgfSxcclxuICAgICAgICByZWZyZXNoOiBmdW5jdGlvbiAob3B0aW9ucykge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXMsICRlbCA9IHNlbGYuJGVsZW1lbnQ7XHJcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucyAhPT0gJ29iamVjdCcgfHwgJGguaXNFbXB0eShvcHRpb25zKSkge1xyXG4gICAgICAgICAgICAgICAgb3B0aW9ucyA9IHNlbGYub3B0aW9ucztcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIG9wdGlvbnMgPSAkLmV4dGVuZCh0cnVlLCB7fSwgc2VsZi5vcHRpb25zLCBvcHRpb25zKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBzZWxmLl9pbml0KG9wdGlvbnMsIHRydWUpO1xyXG4gICAgICAgICAgICBzZWxmLl9saXN0ZW4oKTtcclxuICAgICAgICAgICAgcmV0dXJuICRlbDtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHpvb206IGZ1bmN0aW9uIChmcmFtZUlkKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGZyYW1lID0gc2VsZi5fZ2V0RnJhbWUoZnJhbWVJZCksICRtb2RhbCA9IHNlbGYuJG1vZGFsO1xyXG4gICAgICAgICAgICBpZiAoISRmcmFtZSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICRoLmluaXRNb2RhbCgkbW9kYWwpO1xyXG4gICAgICAgICAgICAkbW9kYWwuaHRtbChzZWxmLl9nZXRNb2RhbENvbnRlbnQoKSk7XHJcbiAgICAgICAgICAgIHNlbGYuX3NldFpvb21Db250ZW50KCRmcmFtZSk7XHJcbiAgICAgICAgICAgICRtb2RhbC5tb2RhbCgnc2hvdycpO1xyXG4gICAgICAgICAgICBzZWxmLl9pbml0Wm9vbUJ1dHRvbnMoKTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGdldEV4aWY6IGZ1bmN0aW9uIChmcmFtZUlkKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGZyYW1lID0gc2VsZi5fZ2V0RnJhbWUoZnJhbWVJZCk7XHJcbiAgICAgICAgICAgIHJldHVybiAkZnJhbWUgJiYgJGZyYW1lLmRhdGEoJ2V4aWYnKSB8fCBudWxsO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZ2V0RnJhbWVzOiBmdW5jdGlvbiAoY3NzRmlsdGVyKSB7XHJcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcywgJGZyYW1lcztcclxuICAgICAgICAgICAgY3NzRmlsdGVyID0gY3NzRmlsdGVyIHx8ICcnO1xyXG4gICAgICAgICAgICAkZnJhbWVzID0gc2VsZi4kcHJldmlldy5maW5kKCRoLkZSQU1FUyArIGNzc0ZpbHRlcik7XHJcbiAgICAgICAgICAgIGlmIChzZWxmLnJldmVyc2VQcmV2aWV3T3JkZXIpIHtcclxuICAgICAgICAgICAgICAgICRmcmFtZXMgPSAkKCRmcmFtZXMuZ2V0KCkucmV2ZXJzZSgpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm4gJGZyYW1lcztcclxuICAgICAgICB9LFxyXG4gICAgICAgIGdldFByZXZpZXc6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgY29udGVudDogc2VsZi5pbml0aWFsUHJldmlldyxcclxuICAgICAgICAgICAgICAgIGNvbmZpZzogc2VsZi5pbml0aWFsUHJldmlld0NvbmZpZyxcclxuICAgICAgICAgICAgICAgIHRhZ3M6IHNlbGYuaW5pdGlhbFByZXZpZXdUaHVtYlRhZ3NcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcbiAgICB9O1xyXG5cclxuICAgICQuZm4uZmlsZWlucHV0ID0gZnVuY3Rpb24gKG9wdGlvbikge1xyXG4gICAgICAgIGlmICghJGguaGFzRmlsZUFQSVN1cHBvcnQoKSAmJiAhJGguaXNJRSg5KSkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHZhciBhcmdzID0gQXJyYXkuYXBwbHkobnVsbCwgYXJndW1lbnRzKSwgcmV0dmFscyA9IFtdO1xyXG4gICAgICAgIGFyZ3Muc2hpZnQoKTtcclxuICAgICAgICB0aGlzLmVhY2goZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICB2YXIgc2VsZiA9ICQodGhpcyksIGRhdGEgPSBzZWxmLmRhdGE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J1ZSxcclxuICAgICAgICBmaWxlU2l6ZUdldHRlcjogbnVsbCxcclxuICAgICAgICBpbml0aWFsQ2FwdGlvbjogJycsXHJcbiAgICAgICAgaW5pdGlhbFByZXZpZXc6IFtdLFxyXG4gICAgICAgIGluaXRpYWxQcmV2aWV3RGVsaW1pdGVyOiAnKiQkKicsXHJcbiAgICAgICAgaW5pdGlhbFByZXZpZXdBc0RhdGE6IGZhbHNlLFxyXG4gICAgICAgIGluaXRpYWxQcmV2aWV3RmlsZVR5cGU6ICdpbWFnZScsXHJcbiAgICAgICAgaW5pdGlhbFByZXZpZXdDb25maWc6IFtdLFxyXG4gICAgICAgIGluaXRpYWxQcmV2aWV3VGh1bWJUYWdzOiBbXSxcclxuICAgICAgICBwcmV2aWV3VGh1bWJUYWdzOiB7fSxcclxuICAgICAgICBpbml0aWFsUHJldmlld1Nob3dEZWxldGU6IHRydWUsXHJcbiAgICAgICAgaW5pdGlhbFByZXZpZXdEb3dubG9hZFVybDogJycsXHJcbiAgICAgICAgcmVtb3ZlRnJvbVByZXZpZXdPbkVycm9yOiBmYWxzZSxcclxuICAgICAgICBkZWxldGVVcmw6ICcnLFxyXG4gICAgICAgIGRlbGV0ZUV4dHJhRGF0YToge30sXHJcbiAgICAgICAgb3ZlcndyaXRlSW5pdGlhbDogdHJ1ZSxcclxuICAgICAgICBzYW5pdGl6ZVpvb21DYWNoZTogZnVuY3Rpb24gKGNvbnRlbnQpIHtcclxuICAgICAgICAgICAgdmFyICRjb250YWluZXIgPSAkKGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpKS5hcHBlbmQoY29udGVudCk7XHJcbiAgICAgICAgICAgICRjb250YWluZXIuZmluZCgnaW5wdXQsc2VsZWN0LC5maWxlLXRodW1ibmFpbC1mb290ZXInKS5yZW1vdmUoKTtcclxuICAgICAgICAgICAgcmV0dXJuICRjb250YWluZXIuaHRtbCgpO1xyXG4gICAgICAgIH0sXHJcbiAgICAgICAgcHJldmlld1pvb21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gYnRuLWRlZmF1bHQgYnRuLW91dGxpbmUtc2Vjb25kYXJ5JyxcclxuICAgICAgICAgICAgY2xvc2U6ICdidG4gYnRuLXNtIGJ0bi1rdiBidG4tZGVmYXVsdCBidG4tb3V0bGluZS1zZWNvbmRhcnknXHJcbiAgICAgICAgfSxcclxuICAgICAgICBwcmV2aWV3VGVtcGxhdGVzOiB7fSxcclxuICAgICAgICBwcmV2aWV3Q29udGVudFRlbXBsYXRlczoge30sXHJcbiAgICAgICAgcHJlZmVySWNvbmljUHJldmlldzogZmFsc2UsXHJcbiAgICAgICAgcHJlZmVySWNvbmljWm9vbVByZXZpZXc6IGZhbHNlLFxyXG4gICAgICAgIGFsbG93ZWRGaWxlVHlwZXM6IG51bGwsXHJcbiAgICAgICAgYWxsb3dlZEZpbGVFeHRlbnNpb25zOiBudWxsLFxyXG4gICAgICAgIGFsbG93ZWRQcmV2aWV3VHlwZXM6IHVuZGVmaW5lZCxcclxuICAgICAgICBhbGxvd2VkUHJldmlld01pbWVUeXBlczogbnVsbCxcclxuICAgICAgICBhbGxvd2VkUHJldmlld0V4dGVuc2lvbnM6IG51bGwsXHJcbiAgICAgICAgZGlzYWJsZWRQcmV2aWV3VHlwZXM6IHVuZGVmaW5lZCxcclxuICAgICAgICBkaXNhYmxlZFByZXZpZXdFeHRlbnNpb25zOiBbJ21zaScsICdleGUnLCAnY29tJywgJ3ppcCcsICdyYXInLCAnYXBwJywgJ3ZiJywgJ3NjciddLFxyXG4gICAgICAgIGRpc2FibGVkUHJldmlld01pbWVUeXBlczogbnVsbCxcclxuICAgICAgICBkZWZhdWx0UHJldmlld0NvbnRlbnQ6IG51bGwsXHJcbiAgICAgICAgY3VzdG9tTGF5b3V0VGFnczoge30sXHJcbiAgICAgICAgY3VzdG9tUHJldmlld1RhZ3M6IHt9LFxyXG4gICAgICAgIHByZXZpZXdGaWxlSWNvbjogJzxpIGNsYXNzPVwiZ2x5cGhpY29uIGdseXBoaWNvbi1maWxlXCI+PC9pPicsXHJcbiAgICAgICAgcHJldmlld0ZpbGVJY29uQ2xhc3M6ICdmaWxlLW90aGVyLWljb24nLFxyXG4gICAgICAgIHByZXZpZXdGaWxlSWNvblNldHRpbmdzOiB7fSxcclxuICAgICAgICBwcmV2aWV3RmlsZUV4dFNldHRpbmdzOiB7fSxcclxuICAgICAgICBidXR0b25MYWJlbENsYXNzOiAnaGlkZGVuLXhzJyxcclxuICAgICAgICBicm93c2VJY29uOiAnPGkgY2xhc3M9XCJnbHlwaGljb24gZ2x5cGhpY29uLWZvbGRlci1vcGVuXCI+PC9pPiZuYnNwOycsXHJcbiAgICAgICAgYnJvd3NlQ2xhc3M6ICdidG4gYnRuLXByaW1hcnknLFxyXG4gICAgICAgIHJlbW92ZUljb246ICc8aSBjbGFzcz1cImdseXBoaWNvbiBnbHlwaGljb24tdHJhc2hcIj48L2k+JyxcclxuICAgICAgICByZW1vdmVDbGFzczogJ2J0biBidG4tZGVmYXVsdCBidG4tc2Vjb25kYXJ5JyxcclxuICAgICAgICBjYW5jZWxJY29uOiAnPGkgY2xhc3M9XCJnbHlwaGljb24gZ2x5cGhpY29uLWJhbi1jaXJjbGVcIj48L2k+JyxcclxuICAgICAgICBjYW5jZWxDbGFzczogJ2J0biBidG4tZGVmYXVsdCBidG4tc2Vjb25kYXJ5JyxcclxuICAgICAgICBwYXVzZUljb246ICc8aSBjbGFzcz1cImdseXBoaWNvbiBnbHlwaGljb24tcGF1c2VcIj48L2k+JyxcclxuICAgICAgICBwYXVzZUNsYXNzOiAnYnRuIGJ0bi1kZWZhdWx0IGJ0bi1zZWNvbmRhcnknLFxyXG4gICAgICAgIHVwbG9hZEljb246ICc8aSBjbGFzcz1cImdseXBoaWNvbiBnbHlwaGljb24tdXBsb2FkXCI+PC9pPicsXHJcbiAgICAgICAgdXBsb2FkQ2xhc3M6ICdidG4gYnRuLWRlZmF1bHQgYnRuLXNlY29uZGFyeScsXHJcbiAgICAgICAgdXBsb2FkVXJsOiBudWxsLFxyXG4gICAg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9hZE9wdGlvbnM6IHtcclxuICAgICAgICAgICAgZmFsbGJhY2s6IG51bGwsXHJcbiAgICAgICAgICAgIHRlc3RVcmw6IG51bGwsIC8vIHVzZWQgZm9yIGNoZWNraW5nIHN0YXR1cyBvZiBjaHVua3MvIGZpbGVzIHByZXZpb3VzbHkgLyBwYXJ0aWFsbHkgdXBsb2FkZWRcclxuICAgICAgICAgICAgY2h1bmtTaXplOiAyICogMTAyNCwgLy8gaW4gS0JcclxuICAgICAgICAgICAgbWF4VGhyZWFkczogNCxcclxuICAgICAgICAgICAgbWF4UmV0cmllczogMyxcclxuICAgICAgICAgICAgc2hvd0Vycm9yTG9nOiB0cnVlXHJcbiAgICAgICAgfSxcclxuICAgICAgICB1cGxvYWRFeHRyYURhdGE6IHt9LFxyXG4gICAgICAgIHpvb21Nb2RhbEhlaWdodDogNDgwLFxyXG4gICAgICAgIG1pbkltYWdlV2lkdGg6IG51bGwsXHJcbiAgICAgICAgbWluSW1hZ2VIZWlnaHQ6IG51bGwsXHJcbiAgICAgICAgbWF4SW1hZ2VXaWR0aDogbnVsbCxcclxuICAgICAgICBtYXhJbWFnZUhlaWdodDogbnVsbCxcclxuICAgICAgICByZXNpemVJbWFnZTogZmFsc2UsXHJcbiAgICAgICAgcmVzaXplUHJlZmVyZW5jZTogJ3dpZHRoJyxcclxuICAgICAgICByZXNpemVRdWFsaXR5OiAwLjkyLFxyXG4gICAgICAgIHJlc2l6ZURlZmF1bHRJbWFnZVR5cGU6ICdpbWFnZS9qcGVnJyxcclxuICAgICAgICByZXNpemVJZlNpemVNb3JlVGhhbjogMCwgLy8gaW4gS0JcclxuICAgICAgICBtaW5GaWxlU2l6ZTogMCxcclxuICAgICAgICBtYXhGaWxlU2l6ZTogMCxcclxuICAgICAgICBtYXhGaWxlUHJldmlld1NpemU6IDI1NjAwLCAvLyAyNSBNQlxyXG4gICAgICAgIG1pbkZpbGVDb3VudDogMCxcclxuICAgICAgICBtYXhGaWxlQ291bnQ6IDAsXHJc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ItZGFuZ2VyJyxcclxuICAgICAgICBwcm9ncmVzc1VwbG9hZFRocmVzaG9sZDogOTksXHJcbiAgICAgICAgcHJldmlld0ZpbGVUeXBlOiAnaW1hZ2UnLFxyXG4gICAgICAgIGVsQ2FwdGlvbkNvbnRhaW5lcjogbnVsbCxcclxuICAgICAgICBlbENhcHRpb25UZXh0OiBudWxsLFxyXG4gICAgICAgIGVsUHJldmlld0NvbnRhaW5lcjogbnVsbCxcclxuICAgICAgICBlbFByZXZpZXdJbWFnZTogbnVsbCxcclxuICAgICAgICBlbFByZXZpZXdTdGF0dXM6IG51bGwsXHJcbiAgICAgICAgZWxFcnJvckNvbnRhaW5lcjogbnVsbCxcclxuICAgICAgICBlcnJvckNsb3NlQnV0dG9uOiAkaC5jbG9zZUJ1dHRvbigna3YtZXJyb3ItY2xvc2UnKSxcclxuICAgICAgICBzbHVnQ2FsbGJhY2s6IG51bGwsXHJcbiAgICAgICAgZHJvcFpvbmVFbmFibGVkOiB0cnVlLFxyXG4gICAgICAgIGRyb3Bab25lVGl0bGVDbGFzczogJ2ZpbGUtZHJvcC16b25lLXRpdGxlJyxcclxuICAgICAgICBmaWxlQWN0aW9uU2V0dGluZ3M6IHt9LFxyXG4gICAgICAgIG90aGVyQWN0aW9uQnV0dG9uczogJycsXHJcbiAgICAgICAgdGV4dEVuY29kaW5nOiAnVVRGLTgnLFxyXG4gICAgICAgIGFqYXhTZXR0aW5nczoge30sXHJcbiAgICAgICAgYWpheERlbGV0ZVNldHRpbmdzOiB7fSxcclxuICAgICAgICBzaG93QWpheEVycm9yRGV0YWlsczogdHJ1ZSxcclxuICAgICAgICBtZXJnZUFqYXhDYWxsYmFja3M6IGZhbHNlLFxyXG4gICAgICAgIG1lcmdlQWpheERlbGV0ZUNhbGxiYWNrczogZmFsc2UsXHJcbiAgICAgICAgcmV0cnlFcnJvclVwbG9hZHM6IHRydWUsXHJcbiAgICAgICAgcmV2ZXJzZVByZXZpZXdPcmRlcjogZmFsc2UsXHJcb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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/bootstrap-fileinput/js/fileinput.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/bootstrap-slider/dist/bootstrap-slider.js":
-/*!*****************************************************************!*\
-  !*** ../node_modules/bootstrap-slider/dist/bootstrap-slider.js ***!
-  \*****************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! =======================================================\n                      VERSION  10.6.2              \n========================================================= */\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/*! =========================================================\n * bootstrap-slider.js\n *\n * Maintainers:\n *\t\tKyle Kemp\n *\t\t\t- Twitter: @seiyria\n *\t\t\t- Github:  seiyria\n *\t\tRohit Kalkur\n *\t\t\t- Twitter: @Rovolutionary\n *\t\t\t- Github:  rovolution\n *\n * =========================================================\n *\n * bootstrap-slider is released under the MIT License\n * Copyright (c) 2019 Kyle Kemp, Rohit Kalkur, and contributors\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n *\n * ========================================================= */\n\n/**\n * Bridget makes jQuery widgets\n * v1.0.1\n * MIT license\n */\nvar windowIsDefined = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\";\n\n(function (factory) {\n\tif (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"../node_modules/jquery/dist/jquery.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else { var jQuery; }\n})(function ($) {\n\t// Constants\n\tvar NAMESPACE_MAIN = 'slider';\n\tvar NAMESPACE_ALTERNATE = 'bootstrapSlider';\n\n\t// Polyfill console methods\n\tif (windowIsDefined && !window.console) {\n\t\twindow.console = {};\n\t}\n\tif (windowIsDefined && !window.console.log) {\n\t\twindow.console.log = function () {};\n\t}\n\tif (windowIsDefined && !window.console.warn) {\n\t\twindow.console.warn = function () {};\n\t}\n\n\t// Reference to Slider constructor\n\tvar Slider;\n\n\t(function ($) {\n\n\t\t'use strict';\n\n\t\t// -------------------------- utils -------------------------- //\n\n\t\tvar slice = Array.prototype.slice;\n\n\t\tfunction noop() {}\n\n\t\t// -------------------------- definition -------------------------- //\n\n\t\tfunction defineBridget($) {\n\n\t\t\t// bail if no jQuery\n\t\t\tif (!$) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// -------------------------- addOptionMethod -------------------------- //\n\n\t\t\t/**\n    * adds option method -> $().plugin('option', {...})\n    * @param {Function} PluginClass - constructor class\n    */\n\t\t\tfunction addOptionMethod(PluginClass) {\n\t\t\t\t// don't overwrite original option method\n\t\t\t\tif (PluginClass.prototype.option) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// option setter\n\t\t\t\tPluginClass.prototype.option = function (opts) {\n\t\t\t\t\t// bail out if not an object\n\t\t\t\t\tif (!$.isPlainObject(opts)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.options = $.extend(true, this.options, opts);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// -------------------------- plugin bridge -------------------------- //\n\n\t\t\t// helper function for logging errors\n\t\t\t// $.error breaks jQuery chaining\n\t\t\tvar logError = typeof console === 'undefined' ? noop : function (message) {\n\t\t\t\tconsole.error(message);\n\t\t\t};\n\n\t\t\t/**\n    * jQuery plugin bridge, access methods like $elem.plugin('method')\n    * @param {String} namespace - plugin name\n    * @param {Function} PluginClass - constructor class\n    */\n\t\t\tfunction bridge(namespace, PluginClass) {\n\t\t\t\t// add to jQuery fn namespace\n\t\t\t\t$.fn[namespace] = function (options) {\n\t\t\t\t\tif (typeof options === 'string') {\n\t\t\t\t\t\t// call plugin method when first argument is a string\n\t\t\t\t\t\t// get arguments for method\n\t\t\t\t\t\tvar args = slice.call(arguments, 1);\n\n\t\t\t\t\t\tfor (var i = 0, len = this.length; i < len; i++) {\n\t\t\t\t\t\t\tvar elem = this[i];\n\t\t\t\t\t\t\tvar instance = $.data(elem, namespace);\n\t\t\t\t\t\t\tif (!instance) {\n\t\t\t\t\t\t\t\tlogError(\"cannot call methods on \" + namespace + \" prior to initialization; \" + \"attempted to call '\" + options + \"'\");\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$.isFunction(instance[options]) || options.charAt(0) === '_') {\n\t\t\t\t\t\t\t\tlogError(\"no such method '\" + options + \"' for \" + namespace + \" instance\");\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// trigger method with arguments\n\t\t\t\t\t\t\tvar returnValue = instance[options].apply(instance, args);\n\n\t\t\t\t\t\t\t// break look and return first value if provided\n\t\t\t\t\t\t\tif (returnValue !== undefined && returnValue !== instance) {\n\t\t\t\t\t\t\t\treturn returnValue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// return this if no return value\n\t\t\t\t\t\treturn this;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar objects = this.map(function () {\n\t\t\t\t\t\t\tvar instance = $.data(this, namespace);\n\t\t\t\t\t\t\tif (instance) {\n\t\t\t\t\t\t\t\t// apply options & init\n\t\t\t\t\t\t\t\tinstance.option(options);\n\t\t\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// initialize new instance\n\t\t\t\t\t\t\t\tinstance = new PluginClass(this, options);\n\t\t\t\t\t\t\t\t$.data(this, namespace, instance);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn $(this);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (objects.length === 1) {\n\t\t\t\t\t\t\treturn objects[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn objects;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// -------------------------- bridget -------------------------- //\n\n\t\t\t/**\n    * converts a Prototypical class into a proper jQuery plugin\n    *   the class must have a ._init method\n    * @param {String} namespace - plugin name, used in $().pluginName\n    * @param {Function} PluginClass - constructor class\n    */\n\t\t\t$.bridget = function (namespace, PluginClass) {\n\t\t\t\taddOptionMethod(PluginClass);\n\t\t\t\tbridge(namespace, PluginClass);\n\t\t\t};\n\n\t\t\treturn $.bridget;\n\t\t}\n\n\t\t// get jquery from browser global\n\t\tdefineBridget($);\n\t})($);\n\n\t/*************************************************\n \t\t\tBOOTSTRAP-SLIDER SOURCE CODE\n \t**************************************************/\n\n\t(function ($) {\n\t\tvar autoRegisterNamespace = void 0;\n\n\t\tvar ErrorMsgs = {\n\t\t\tformatInvalidInputErrorMsg: function formatInvalidInputErrorMsg(input) {\n\t\t\t\treturn \"Invalid input value '\" + input + \"' passed in\";\n\t\t\t},\n\t\t\tcallingContextNotSliderInstance: \"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method\"\n\t\t};\n\n\t\tvar SliderScale = {\n\t\t\tlinear: {\n\t\t\t\tgetValue: function getValue(value, options) {\n\t\t\t\t\tif (value < options.min) {\n\t\t\t\t\t\treturn options.min;\n\t\t\t\t\t} else if (value > options.max) {\n\t\t\t\t\t\treturn options.max;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttoValue: function toValue(percentage) {\n\t\t\t\t\tvar rawValue = percentage / 100 * (this.options.max - this.options.min);\n\t\t\t\t\tvar shouldAdjustWithBase = true;\n\t\t\t\t\tif (this.options.ticks_positions.length > 0) {\n\t\t\t\t\t\tvar minv,\n\t\t\t\t\t\t    maxv,\n\t\t\t\t\t\t    minp,\n\t\t\t\t\t\t    maxp = 0;\n\t\t\t\t\t\tfor (var i = 1; i < this.options.ticks_positions.length; i++) {\n\t\t\t\t\t\t\tif (percentage <= this.options.ticks_positions[i]) {\n\t\t\t\t\t\t\t\tminv = this.options.ticks[i - 1];\n\t\t\t\t\t\t\t\tminp = this.options.ticks_positions[i - 1];\n\t\t\t\t\t\t\t\tmaxv = this.options.ticks[i];\n\t\t\t\t\t\t\t\tmaxp = this.options.ticks_positions[i];\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar partialPercentage = (percentage - minp) / (maxp - minp);\n\t\t\t\t\t\trawValue = minv + partialPercentage * (maxv - minv);\n\t\t\t\t\t\tshouldAdjustWithBase = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar adjustment = shouldAdjustWithBase ? this.options.min : 0;\n\t\t\t\t\tvar value = adjustment + Math.round(rawValue / this.options.step) * this.options.step;\n\t\t\t\t\treturn SliderScale.linear.getValue(value, this.options);\n\t\t\t\t},\n\t\t\t\ttoPercentage: function toPercentage(value) {\n\t\t\t\t\tif (this.options.max === this.options.min) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.options.ticks_positions.length > 0) {\n\t\t\t\t\t\tvar minv,\n\t\t\t\t\t\t    maxv,\n\t\t\t\t\t\t    minp,\n\t\t\t\t\t\t    maxp = 0;\n\t\t\t\t\t\tfor (var i = 0; i < this.options.ticks.length; i++) {\n\t\t\t\t\t\t\tif (value <= this.options.ticks[i]) {\n\t\t\t\t\t\t\t\tminv = i > 0 ? this.options.ticks[i - 1] : 0;\n\t\t\t\t\t\t\t\tminp = i > 0 ? this.options.ticks_positions[i - 1] : 0;\n\t\t\t\t\t\t\t\tmaxv = this.options.ticks[i];\n\t\t\t\t\t\t\t\tmaxp = this.options.ticks_positions[i];\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i > 0) {\n\t\t\t\t\t\t\tvar partialPercentage = (value - minv) / (maxv - minv);\n\t\t\t\t\t\t\treturn minp + partialPercentage * (maxp - minp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn 100 * (value - this.options.min) / (this.options.max - this.options.min);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tlogarithmic: {\n\t\t\t\t/* Based on http://stackoverflow.com/questions/846221/logarithmic-slider */\n\t\t\t\ttoValue: function toValue(percentage) {\n\t\t\t\t\tvar offset = 1 - this.options.min;\n\t\t\t\t\tvar min = Math.log(this.options.min + offset);\n\t\t\t\t\tvar max = Math.log(this.options.max + offset);\n\t\t\t\t\tvar value = Math.exp(min + (max - min) * percentage / 100) - offset;\n\t\t\t\t\tif (Math.round(value) === max) {\n\t\t\t\t\t\treturn max;\n\t\t\t\t\t}\n\t\t\t\t\tvalue = this.options.min + Math.round((value - this.options.min) / this.options.step) * this.options.step;\n\t\t\t\t\t/* Rounding to the nearest step could exceed the min or\n      * max, so clip to those values. */\n\t\t\t\t\treturn SliderScale.linear.getValue(value, this.options);\n\t\t\t\t},\n\t\t\t\ttoPercentage: function toPercentage(value) {\n\t\t\t\t\tif (this.options.max === this.options.min) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar offset = 1 - this.options.min;\n\t\t\t\t\t\tvar max = Math.log(this.options.max + offset);\n\t\t\t\t\t\tvar min = Math.log(this.options.min + offset);\n\t\t\t\t\t\tvar v = Math.log(value + offset);\n\t\t\t\t\t\treturn 100 * (v - min) / (max - min);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/*************************************************\n  \t\t\t\t\t\tCONSTRUCTOR\n  \t**************************************************/\n\t\tSlider = function Slider(element, options) {\n\t\t\tcreateNewSlider.call(this, element, options);\n\t\t\treturn this;\n\t\t};\n\n\t\tfunction createNewSlider(element, options) {\n\n\t\t\t/*\n   \tThe internal state object is used to store data about the current 'state' of slider.\n   \tThis includes values such as the `value`, `enabled`, etc...\n   */\n\t\t\tthis._state = {\n\t\t\t\tvalue: null,\n\t\t\t\tenabled: null,\n\t\t\t\toffset: null,\n\t\t\t\tsize: null,\n\t\t\t\tpercentage: null,\n\t\t\t\tinDrag: false,\n\t\t\t\tover: false,\n\t\t\t\ttickIndex: null\n\t\t\t};\n\n\t\t\t// The objects used to store the reference to the tick methods if ticks_tooltip is on\n\t\t\tthis.ticksCallbackMap = {};\n\t\t\tthis.handleCallbackMap = {};\n\n\t\t\tif (typeof element === \"string\") {\n\t\t\t\tthis.element = document.querySelector(element);\n\t\t\t} else if (element instanceof HTMLElement) {\n\t\t\t\tthis.element = element;\n\t\t\t}\n\n\t\t\t/*************************************************\n   \t\t\t\t\tProcess Options\n   \t**************************************************/\n\t\t\toptions = options ? options : {};\n\t\t\tvar optionTypes = Object.keys(this.defaultOptions);\n\n\t\t\tvar isMinSet = options.hasOwnProperty('min');\n\t\t\tvar isMaxSet = options.hasOwnProperty('max');\n\n\t\t\tfor (var i = 0; i < optionTypes.length; i++) {\n\t\t\t\tvar optName = optionTypes[i];\n\n\t\t\t\t// First check if an option was passed in via the constructor\n\t\t\t\tvar val = options[optName];\n\t\t\t\t// If no data attrib, then check data atrributes\n\t\t\t\tval = typeof val !== 'undefined' ? val : getDataAttrib(this.element, optName);\n\t\t\t\t// Finally, if nothing was specified, use the defaults\n\t\t\t\tval = val !== null ? val : this.defaultOptions[optName];\n\n\t\t\t\t// Set all options on the instance of the Slider\n\t\t\t\tif (!this.options) {\n\t\t\t\t\tthis.options = {};\n\t\t\t\t}\n\t\t\t\tthis.options[optName] = val;\n\t\t\t}\n\n\t\t\tthis.ticksAreValid = Array.isArray(this.options.ticks) && this.options.ticks.length > 0;\n\n\t\t\t// Lock to ticks only when ticks[] is defined and set\n\t\t\tif (!this.ticksAreValid) {\n\t\t\t\tthis.options.lock_to_ticks = false;\n\t\t\t}\n\n\t\t\t// Check options.rtl\n\t\t\tif (this.options.rtl === 'auto') {\n\t\t\t\tvar computedStyle = window.getComputedStyle(this.element);\n\t\t\t\tif (computedStyle != null) {\n\t\t\t\t\tthis.options.rtl = computedStyle.direction === 'rtl';\n\t\t\t\t} else {\n\t\t\t\t\t// Fix for Firefox bug in versions less than 62:\n\t\t\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n\t\t\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=1467722\n\t\t\t\t\tthis.options.rtl = this.element.style.direction === 'rtl';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n   \tValidate `tooltip_position` against 'orientation`\n   \t- if `tooltip_position` is incompatible with orientation, swith it to a default compatible with specified `orientation`\n   \t\t-- default for \"vertical\" -> \"right\", \"left\" if rtl\n   \t\t-- default for \"horizontal\" -> \"top\"\n   */\n\t\t\tif (this.options.orientation === \"vertical\" && (this.options.tooltip_position === \"top\" || this.options.tooltip_position === \"bottom\")) {\n\t\t\t\tif (this.options.rtl) {\n\t\t\t\t\tthis.options.tooltip_position = \"left\";\n\t\t\t\t} else {\n\t\t\t\t\tthis.options.tooltip_position = \"right\";\n\t\t\t\t}\n\t\t\t} else if (this.options.orientation === \"horizontal\" && (this.options.tooltip_position === \"left\" || this.options.tooltip_position === \"right\")) {\n\n\t\t\t\tthis.options.tooltip_position = \"top\";\n\t\t\t}\n\n\t\t\tfunction getDataAttrib(element, optName) {\n\t\t\t\tvar dataName = \"data-slider-\" + optName.replace(/_/g, '-');\n\t\t\t\tvar dataValString = element.getAttribute(dataName);\n\n\t\t\t\ttry {\n\t\t\t\t\treturn JSON.parse(dataValString);\n\t\t\t\t} catch (err) {\n\t\t\t\t\treturn dataValString;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*************************************************\n   \t\t\t\t\tCreate Markup\n   \t**************************************************/\n\n\t\t\tvar origWidth = this.element.style.width;\n\t\t\tvar updateSlider = false;\n\t\t\tvar parent = this.element.parentNode;\n\t\t\tvar sliderTrackSelection;\n\t\t\tvar sliderTrackLow, sliderTrackHigh;\n\t\t\tvar sliderMinHandle;\n\t\t\tvar sliderMaxHandle;\n\n\t\t\tif (this.sliderElem) {\n\t\t\t\tupdateSlider = true;\n\t\t\t} else {\n\t\t\t\t/* Create elements needed for slider */\n\t\t\t\tthis.sliderElem = document.createElement(\"div\");\n\t\t\t\tthis.sliderElem.className = \"slider\";\n\n\t\t\t\t/* Create slider track elements */\n\t\t\t\tvar sliderTrack = document.createElement(\"div\");\n\t\t\t\tsliderTrack.className = \"slider-track\";\n\n\t\t\t\tsliderTrackLow = document.createElement(\"div\");\n\t\t\t\tsliderTrackLow.className = \"slider-track-low\";\n\n\t\t\t\tsliderTrackSelection = document.createElement(\"div\");\n\t\t\t\tsliderTrackSelection.className = \"slider-selection\";\n\n\t\t\t\tsliderTrackHigh = document.createElement(\"div\");\n\t\t\t\tsliderTrackHigh.className = \"slider-track-high\";\n\n\t\t\t\tsliderMinHandle = document.createElement(\"div\");\n\t\t\t\tsliderMinHandle.className = \"slider-handle min-slider-handle\";\n\t\t\t\tsliderMinHandle.setAttribute('role', 'slider');\n\t\t\t\tsliderMinHandle.setAttribute('aria-valuemin', this.options.min);\n\t\t\t\tsliderMinHandle.setAttribute('aria-valuemax', this.options.max);\n\n\t\t\t\tsliderMaxHandle = document.createElement(\"div\");\n\t\t\t\tsliderMaxHandle.className = \"slider-handle max-slider-handle\";\n\t\t\t\tsliderMaxHandle.setAttribute('role', 'slider');\n\t\t\t\tsliderMaxHandle.setAttribute('aria-valuemin', this.options.min);\n\t\t\t\tsliderMaxHandle.setAttribute('aria-valuemax', this.options.max);\n\n\t\t\t\tsliderTrack.appendChild(sliderTrackLow);\n\t\t\t\tsliderTrack.appendChild(sliderTrackSelection);\n\t\t\t\tsliderTrack.appendChild(sliderTrackHigh);\n\n\t\t\t\t/* Create highlight range elements */\n\t\t\t\tthis.rangeHighlightElements = [];\n\t\t\t\tvar rangeHighlightsOpts = this.options.rangeHighlights;\n\t\t\t\tif (Array.isArray(rangeHighlightsOpts) && rangeHighlightsOpts.length > 0) {\n\t\t\t\t\tfor (var j = 0; j < rangeHighlightsOpts.length; j++) {\n\t\t\t\t\t\tvar rangeHighlightElement = document.createElement(\"div\");\n\t\t\t\t\t\tvar customClassString = rangeHighlightsOpts[j].class || \"\";\n\t\t\t\t\t\trangeHighlightElement.className = \"slider-rangeHighlight slider-selection \" + customClassString;\n\t\t\t\t\t\tthis.rangeHighlightElements.push(rangeHighlightElement);\n\t\t\t\t\t\tsliderTrack.appendChild(rangeHighlightElement);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Add aria-labelledby to handle's */\n\t\t\t\tvar isLabelledbyArray = Array.isArray(this.options.labelledby);\n\t\t\t\tif (isLabelledbyArray && this.options.labelledby[0]) {\n\t\t\t\t\tsliderMinHandle.setAttribute('aria-labelledby', this.options.labelledby[0]);\n\t\t\t\t}\n\t\t\t\tif (isLabelledbyArray && this.options.labelledby[1]) {\n\t\t\t\t\tsliderMaxHandle.setAttribute('aria-labelledby', this.options.labelledby[1]);\n\t\t\t\t}\n\t\t\t\tif (!isLabelledbyArray && this.options.labelledby) {\n\t\t\t\t\tsliderMinHandle.setAttribute('aria-labelledby', this.options.labelledby);\n\t\t\t\t\tsliderMaxHandle.setAttribute('aria-labelledby', this.options.labelledby);\n\t\t\t\t}\n\n\t\t\t\t/* Create ticks */\n\t\t\t\tthis.ticks = [];\n\t\t\t\tif (Array.isArray(this.options.ticks) && this.options.ticks.length > 0) {\n\t\t\t\t\tthis.ticksContainer = document.createElement('div');\n\t\t\t\t\tthis.ticksContainer.className = 'slider-tick-container';\n\n\t\t\t\t\tfor (i = 0; i < this.options.ticks.length; i++) {\n\t\t\t\t\t\tvar tick = document.createElement('div');\n\t\t\t\t\t\ttick.className = 'slider-tick';\n\t\t\t\t\t\tif (this.options.ticks_tooltip) {\n\t\t\t\t\t\t\tvar tickListenerReference = this._addTickListener();\n\t\t\t\t\t\t\tvar enterCallback = tickListenerReference.addMouseEnter(this, tick, i);\n\t\t\t\t\t\t\tvar leaveCallback = tickListenerReference.addMouseLeave(this, tick);\n\n\t\t\t\t\t\t\tthis.ticksCallbackMap[i] = {\n\t\t\t\t\t\t\t\tmouseEnter: enterCallback,\n\t\t\t\t\t\t\t\tmouseLeave: leaveCallback\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.ticks.push(tick);\n\t\t\t\t\t\tthis.ticksContainer.appendChild(tick);\n\t\t\t\t\t}\n\n\t\t\t\t\tsliderTrackSelection.className += \" tick-slider-selection\";\n\t\t\t\t}\n\n\t\t\t\tthis.tickLabels = [];\n\t\t\t\tif (Array.isArray(this.options.ticks_labels) && this.options.ticks_labels.length > 0) {\n\t\t\t\t\tthis.tickLabelContainer = document.createElement('div');\n\t\t\t\t\tthis.tickLabelContainer.className = 'slider-tick-label-container';\n\n\t\t\t\t\tfor (i = 0; i < this.options.ticks_labels.length; i++) {\n\t\t\t\t\t\tvar label = document.createElement('div');\n\t\t\t\t\t\tvar noTickPositionsSpecified = this.options.ticks_positions.length === 0;\n\t\t\t\t\t\tvar tickLabelsIndex = this.options.reversed && noTickPositionsSpecified ? this.options.ticks_labels.length - (i + 1) : i;\n\t\t\t\t\t\tlabel.className = 'slider-tick-label';\n\t\t\t\t\t\tlabel.innerHTML = this.options.ticks_labels[tickLabelsIndex];\n\n\t\t\t\t\t\tthis.tickLabels.push(label);\n\t\t\t\t\t\tthis.tickLabelContainer.appendChild(label);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar createAndAppendTooltipSubElements = function createAndAppendTooltipSubElements(tooltipElem) {\n\t\t\t\t\tvar arrow = document.createElement(\"div\");\n\t\t\t\t\tarrow.className = \"tooltip-arrow\";\n\n\t\t\t\t\tvar inner = document.createElement(\"div\");\n\t\t\t\t\tinner.className = \"tooltip-inner\";\n\n\t\t\t\t\ttooltipElem.appendChild(arrow);\n\t\t\t\t\ttooltipElem.appendChild(inner);\n\t\t\t\t};\n\n\t\t\t\t/* Create tooltip elements */\n\t\t\t\tvar sliderTooltip = document.createElement(\"div\");\n\t\t\t\tsliderTooltip.className = \"tooltip tooltip-main\";\n\t\t\t\tsliderTooltip.setAttribute('role', 'presentation');\n\t\t\t\tcreateAndAppendTooltipSubElements(sliderTooltip);\n\n\t\t\t\tvar sliderTooltipMin = document.createElement(\"div\");\n\t\t\t\tsliderTooltipMin.className = \"tooltip tooltip-min\";\n\t\t\t\tsliderTooltipMin.setAttribute('role', 'presentation');\n\t\t\t\tcreateAndAppendTooltipSubElements(sliderTooltipMin);\n\n\t\t\t\tvar sliderTooltipMax = document.createElement(\"div\");\n\t\t\t\tsliderTooltipMax.className = \"tooltip tooltip-max\";\n\t\t\t\tsliderTooltipMax.setAttribute('role', 'presentation');\n\t\t\t\tcreateAndAppendTooltipSubElements(sliderTooltipMax);\n\n\t\t\t\t/* Append components to sliderElem */\n\t\t\t\tthis.sliderElem.appendChild(sliderTrack);\n\t\t\t\tthis.sliderElem.appendChild(sliderTooltip);\n\t\t\t\tthis.sliderElem.appendChild(sliderTooltipMin);\n\t\t\t\tthis.sliderElem.appendChild(sliderTooltipMax);\n\n\t\t\t\tif (this.tickLabelContainer) {\n\t\t\t\t\tthis.sliderElem.appendChild(this.tickLabelContainer);\n\t\t\t\t}\n\t\t\t\tif (this.ticksContainer) {\n\t\t\t\t\tthis.sliderElem.appendChild(this.ticksContainer);\n\t\t\t\t}\n\n\t\t\t\tthis.sliderElem.appendChild(sliderMinHandle);\n\t\t\t\tthis.sliderElem.appendChild(sliderMaxHandle);\n\n\t\t\t\t/* Append slider element to parent container, right before the original <input> element */\n\t\t\t\tparent.insertBefore(this.sliderElem, this.element);\n\n\t\t\t\t/* Hide original <input> element */\n\t\t\t\tthis.element.style.display = \"none\";\n\t\t\t}\n\t\t\t/* If JQuery exists, cache JQ references */\n\t\t\tif ($) {\n\t\t\t\tthis.$element = $(this.element);\n\t\t\t\tthis.$sliderElem = $(this.sliderElem);\n\t\t\t}\n\n\t\t\t/*************************************************\n   \t\t\t\t\t\tSetup\n   \t**************************************************/\n\t\t\tthis.eventToCallbackMap = {};\n\t\t\tthis.sliderElem.id = this.options.id;\n\n\t\t\tthis.touchCapable = 'ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch;\n\n\t\t\tthis.touchX = 0;\n\t\t\tthis.touchY = 0;\n\n\t\t\tthis.tooltip = this.sliderElem.querySelector('.tooltip-main');\n\t\t\tthis.tooltipInner = this.tooltip.querySelector('.tooltip-inner');\n\n\t\t\tthis.tooltip_min = this.sliderElem.querySelector('.tooltip-min');\n\t\t\tthis.tooltipInner_min = this.tooltip_min.querySelector('.tooltip-inner');\n\n\t\t\tthis.tooltip_max = this.sliderElem.querySelector('.tooltip-max');\n\t\t\tthis.tooltipInner_max = this.tooltip_max.querySelector('.tooltip-inner');\n\n\t\t\tif (SliderScale[this.options.scale]) {\n\t\t\t\tthis.options.scale = SliderScale[this.options.scale];\n\t\t\t}\n\n\t\t\tif (updateSlider === true) {\n\t\t\t\t// Reset classes\n\t\t\t\tthis._removeClass(this.sliderElem, 'slider-horizontal');\n\t\t\t\tthis._removeClass(this.sliderElem, 'slider-vertical');\n\t\t\t\tthis._removeClass(this.sliderElem, 'slider-rtl');\n\t\t\t\tthis._removeClass(this.tooltip, 'hide');\n\t\t\t\tthis._removeClass(this.tooltip_min, 'hide');\n\t\t\t\tthis._removeClass(this.tooltip_max, 'hide');\n\n\t\t\t\t// Undo existing inline styles for track\n\t\t\t\t[\"left\", \"right\", \"top\", \"width\", \"height\"].forEach(function (prop) {\n\t\t\t\t\tthis._removeProperty(this.trackLow, prop);\n\t\t\t\t\tthis._removeProperty(this.trackSelection, prop);\n\t\t\t\t\tthis._removeProperty(this.trackHigh, prop);\n\t\t\t\t}, this);\n\n\t\t\t\t// Undo inline styles on handles\n\t\t\t\t[this.handle1, this.handle2].forEach(function (handle) {\n\t\t\t\t\tthis._removeProperty(handle, 'left');\n\t\t\t\t\tthis._removeProperty(handle, 'right');\n\t\t\t\t\tthis._removeProperty(handle, 'top');\n\t\t\t\t}, this);\n\n\t\t\t\t// Undo inline styles and classes on tooltips\n\t\t\t\t[this.tooltip, this.tooltip_min, this.tooltip_max].forEach(function (tooltip) {\n\t\t\t\t\tthis._removeProperty(tooltip, 'left');\n\t\t\t\t\tthis._removeProperty(tooltip, 'right');\n\t\t\t\t\tthis._removeProperty(tooltip, 'top');\n\n\t\t\t\t\tthis._removeClass(tooltip, 'right');\n\t\t\t\t\tthis._removeClass(tooltip, 'left');\n\t\t\t\t\tthis._removeClass(tooltip, 'top');\n\t\t\t\t}, this);\n\t\t\t}\n\n\t\t\tif (this.options.orientation === 'vertical') {\n\t\t\t\tthis._addClass(this.sliderElem, 'slider-vertical');\n\t\t\t\tthis.stylePos = 'top';\n\t\t\t\tthis.mousePos = 'pageY';\n\t\t\t\tthis.sizePos = 'offsetHeight';\n\t\t\t} else {\n\t\t\t\tthis._addClass(this.sliderElem, 'slider-horizontal');\n\t\t\t\tthis.sliderElem.style.width = origWidth;\n\t\t\t\tthis.options.orientation = 'horizontal';\n\t\t\t\tif (this.options.rtl) {\n\t\t\t\t\tthis.stylePos = 'right';\n\t\t\t\t} else {\n\t\t\t\t\tthis.stylePos = 'left';\n\t\t\t\t}\n\t\t\t\tthis.mousePos = 'clientX';\n\t\t\t\tthis.sizePos = 'offsetWidth';\n\t\t\t}\n\t\t\t// specific rtl class\n\t\t\tif (this.options.rtl) {\n\t\t\t\tthis._addClass(this.sliderElem, 'slider-rtl');\n\t\t\t}\n\t\t\tthis._setTooltipPosition();\n\t\t\t/* In case ticks are specified, overwrite the min and max bounds */\n\t\t\tif (Array.isArray(this.options.ticks) && this.options.ticks.length > 0) {\n\t\t\t\tif (!isMaxSet) {\n\t\t\t\t\tthis.options.max = Math.max.apply(Math, this.options.ticks);\n\t\t\t\t}\n\t\t\t\tif (!isMinSet) {\n\t\t\t\t\tthis.options.min = Math.min.apply(Math, this.options.ticks);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Array.isArray(this.options.value)) {\n\t\t\t\tthis.options.range = true;\n\t\t\t\tthis._state.value = this.options.value;\n\t\t\t} else if (this.options.range) {\n\t\t\t\t// User wants a range, but value is not an array\n\t\t\t\tthis._state.value = [this.options.value, this.options.max];\n\t\t\t} else {\n\t\t\t\tthis._state.value = this.options.value;\n\t\t\t}\n\n\t\t\tthis.trackLow = sliderTrackLow || this.trackLow;\n\t\t\tthis.trackSelection = sliderTrackSelection || this.trackSelection;\n\t\t\tthis.trackHigh = sliderTrackHigh || this.trackHigh;\n\n\t\t\tif (this.options.selection === 'none') {\n\t\t\t\tthis._addClass(this.trackLow, 'hide');\n\t\t\t\tthis._addClass(this.trackSelection, 'hide');\n\t\t\t\tthis._addClass(this.trackHigh, 'hide');\n\t\t\t} else if (this.options.selection === 'after' || this.options.selection === 'before') {\n\t\t\t\tthis._removeClass(this.trackLow, 'hide');\n\t\t\t\tthis._removeClass(this.trackSelection, 'hide');\n\t\t\t\tthis._removeClass(this.trackHigh, 'hide');\n\t\t\t}\n\n\t\t\tthis.handle1 = sliderMinHandle || this.handle1;\n\t\t\tthis.handle2 = sliderMaxHandle || this.handle2;\n\n\t\t\tif (updateSlider === true) {\n\t\t\t\t// Reset classes\n\t\t\t\tthis._removeClass(this.handle1, 'round triangle');\n\t\t\t\tthis._removeClass(this.handle2, 'round triangle hide');\n\n\t\t\t\tfor (i = 0; i < this.ticks.length; i++) {\n\t\t\t\t\tthis._removeClass(this.ticks[i], 'round triangle hide');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar availableHandleModifiers = ['round', 'triangle', 'custom'];\n\t\t\tvar isValidHandleType = availableHandleModifiers.indexOf(this.options.handle) !== -1;\n\t\t\tif (isValidHandleType) {\n\t\t\t\tthis._addClass(this.handle1, this.options.handle);\n\t\t\t\tthis._addClass(this.handle2, this.options.handle);\n\n\t\t\t\tfor (i = 0; i < this.ticks.length; i++) {\n\t\t\t\t\tthis._addClass(this.ticks[i], this.options.handle);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._state.offset = this._offset(this.sliderElem);\n\t\t\tthis._state.size = this.sliderElem[this.sizePos];\n\t\t\tthis.setValue(this._state.value);\n\n\t\t\t/******************************************\n   \t\t\t\tBind Event Listeners\n   \t******************************************/\n\n\t\t\t// Bind keyboard handlers\n\t\t\tthis.handle1Keydown = this._keydown.bind(this, 0);\n\t\t\tthis.handle1.addEventListener(\"keydown\", this.handle1Keydown, false);\n\n\t\t\tthis.handle2Keydown = this._keydown.bind(this, 1);\n\t\t\tthis.handle2.addEventListener(\"keydown\", this.handle2Keydown, false);\n\n\t\t\tthis.mousedown = this._mousedown.bind(this);\n\t\t\tthis.touchstart = this._touchstart.bind(this);\n\t\t\tthis.touchmove = this._touchmove.bind(this);\n\n\t\t\tif (this.touchCapable) {\n\t\t\t\tthis.sliderElem.addEventListener(\"touchstart\", this.touchstart, false);\n\t\t\t\tthis.sliderElem.addEventListener(\"touchmove\", this.touchmove, false);\n\t\t\t}\n\n\t\t\tthis.sliderElem.addEventListener(\"mousedown\", this.mousedown, false);\n\n\t\t\t// Bind window handlers\n\t\t\tthis.resize = this._resize.bind(this);\n\t\t\twindow.addEventListener(\"resize\", this.resize, false);\n\n\t\t\t// Bind tooltip-related handlers\n\t\t\tif (this.options.tooltip === 'hide') {\n\t\t\t\tthis._addClass(this.tooltip, 'hide');\n\t\t\t\tthis._addClass(this.tooltip_min, 'hide');\n\t\t\t\tthis._addClass(this.tooltip_max, 'hide');\n\t\t\t} else if (this.options.tooltip === 'always') {\n\t\t\t\tthis._showTooltip();\n\t\t\t\tthis._alwaysShowTooltip = true;\n\t\t\t} else {\n\t\t\t\tthis.showTooltip = this._showTooltip.bind(this);\n\t\t\t\tthis.hideTooltip = this._hideTooltip.bind(this);\n\n\t\t\t\tif (this.options.ticks_tooltip) {\n\t\t\t\t\tvar callbackHandle = this._addTickListener();\n\t\t\t\t\t//create handle1 listeners and store references in map\n\t\t\t\t\tvar mouseEnter = callbackHandle.addMouseEnter(this, this.handle1);\n\t\t\t\t\tvar mouseLeave = callbackHandle.addMouseLeave(this, this.handle1);\n\t\t\t\t\tthis.handleCallbackMap.handle1 = {\n\t\t\t\t\t\tmouseEnter: mouseEnter,\n\t\t\t\t\t\tmouseLeave: mouseLeave\n\t\t\t\t\t};\n\t\t\t\t\t//create handle2 listeners and store references in map\n\t\t\t\t\tmouseEnter = callbackHandle.addMouseEnter(this, this.handle2);\n\t\t\t\t\tmouseLeave = callbackHandle.addMouseLeave(this, this.handle2);\n\t\t\t\t\tthis.handleCallbackMap.handle2 = {\n\t\t\t\t\t\tmouseEnter: mouseEnter,\n\t\t\t\t\t\tmouseLeave: mouseLeave\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tthis.sliderElem.addEventListener(\"mouseenter\", this.showTooltip, false);\n\t\t\t\t\tthis.sliderElem.addEventListener(\"mouseleave\", this.hideTooltip, false);\n\n\t\t\t\t\tif (this.touchCapable) {\n\t\t\t\t\t\tthis.sliderElem.addEventListener(\"touchstart\", this.showTooltip, false);\n\t\t\t\t\t\tthis.sliderElem.addEventListener(\"touchmove\", this.showTooltip, false);\n\t\t\t\t\t\tthis.sliderElem.addEventListener(\"touchend\", this.hideTooltip, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.handle1.addEventListener(\"focus\", this.showTooltip, false);\n\t\t\t\tthis.handle1.addEventListener(\"blur\", this.hideTooltip, false);\n\n\t\t\t\tthis.handle2.addEventListener(\"focus\", this.showTooltip, false);\n\t\t\t\tthis.handle2.addEventListener(\"blur\", this.hideTooltip, false);\n\n\t\t\t\tif (this.touchCapable) {\n\t\t\t\t\tthis.handle1.addEventListener(\"touchstart\", this.showTooltip, false);\n\t\t\t\t\tthis.handle1.addEventListener(\"touchmove\", this.showTooltip, false);\n\t\t\t\t\tthis.handle1.addEventListener(\"touchend\", this.hideTooltip, false);\n\n\t\t\t\t\tthis.handle2.addEventListener(\"touchstart\", this.showTooltip, false);\n\t\t\t\t\tthis.handle2.addEventListener(\"touchmove\", this.showTooltip, false);\n\t\t\t\t\tthis.handle2.addEventListener(\"touchend\", this.hideTooltip, false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.options.enabled) {\n\t\t\t\tthis.enable();\n\t\t\t} else {\n\t\t\t\tthis.disable();\n\t\t\t}\n\t\t}\n\n\t\t/*************************************************\n  \t\t\t\tINSTANCE PROPERTIES/METHODS\n  \t- Any methods bound to the prototype are considered\n  part of the plugin's `public` interface\n  \t**************************************************/\n\t\tSlider.prototype = {\n\t\t\t_init: function _init() {}, // NOTE: Must exist to support bridget\n\n\t\t\tconstructor: Slider,\n\n\t\t\tdefaultOptions: {\n\t\t\t\tid: \"\",\n\t\t\t\tmin: 0,\n\t\t\t\tmax: 10,\n\t\t\t\tstep: 1,\n\t\t\t\tprecision: 0,\n\t\t\t\torientation: 'horizontal',\n\t\t\t\tvalue: 5,\n\t\t\t\trange: false,\n\t\t\t\tselection: 'before',\n\t\t\t\ttooltip: 'show',\n\t\t\t\ttooltip_split: false,\n\t\t\t\tlock_to_ticks: false,\n\t\t\t\thandle: 'round',\n\t\t\t\treversed: false,\n\t\t\t\trtl: 'auto',\n\t\t\t\tenabled: true,\n\t\t\t\tformatter: function formatter(val) {\n\t\t\t\t\tif (Array.isArray(val)) {\n\t\t\t\t\t\treturn val[0] + \" : \" + val[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn val;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tnatural_arrow_keys: false,\n\t\t\t\tticks: [],\n\t\t\t\tticks_positions: [],\n\t\t\t\tticks_labels: [],\n\t\t\t\tticks_snap_bounds: 0,\n\t\t\t\tticks_tooltip: false,\n\t\t\t\tscale: 'linear',\n\t\t\t\tfocus: false,\n\t\t\t\ttooltip_position: null,\n\t\t\t\tlabelledby: null,\n\t\t\t\trangeHighlights: []\n\t\t\t},\n\n\t\t\tgetElement: function getElement() {\n\t\t\t\treturn this.sliderElem;\n\t\t\t},\n\n\t\t\tgetValue: function getValue() {\n\t\t\t\tif (this.options.range) {\n\t\t\t\t\treturn this._state.value;\n\t\t\t\t} else {\n\t\t\t\t\treturn this._state.value[0];\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tsetValue: function setValue(val, triggerSlideEvent, triggerChangeEvent) {\n\t\t\t\tif (!val) {\n\t\t\t\t\tval = 0;\n\t\t\t\t}\n\t\t\t\tvar oldValue = this.getValue();\n\t\t\t\tthis._state.value = this._validateInputValue(val);\n\t\t\t\tvar applyPrecision = this._applyPrecision.bind(this);\n\n\t\t\t\tif (this.options.range) {\n\t\t\t\t\tthis._state.value[0] = applyPrecision(this._state.value[0]);\n\t\t\t\t\tthis._state.value[1] = applyPrecision(this._state.value[1]);\n\n\t\t\t\t\tif (this.ticksAreValid && this.options.lock_to_ticks) {\n\t\t\t\t\t\tthis._state.value[0] = this.options.ticks[this._getClosestTickIndex(this._state.value[0])];\n\t\t\t\t\t\tthis._state.value[1] = this.options.ticks[this._getClosestTickIndex(this._state.value[1])];\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._state.value[0] = Math.max(this.options.min, Math.min(this.options.max, this._state.value[0]));\n\t\t\t\t\tthis._state.value[1] = Math.max(this.options.min, Math.min(this.options.max, this._state.value[1]));\n\t\t\t\t} else {\n\t\t\t\t\tthis._state.value = applyPrecision(this._state.value);\n\n\t\t\t\t\tif (this.ticksAreValid && this.options.lock_to_ticks) {\n\t\t\t\t\t\tthis._state.value = this.options.ticks[this._getClosestTickIndex(this._state.value)];\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._state.value = [Math.max(this.options.min, Math.min(this.options.max, this._state.value))];\n\t\t\t\t\tthis._addClass(this.handle2, 'hide');\n\t\t\t\t\tif (this.options.selection === 'after') {\n\t\t\t\t\t\tthis._state.value[1] = this.options.max;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._state.value[1] = this.options.min;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Determine which ticks the handle(s) are set at (if applicable)\n\t\t\t\tthis._setTickIndex();\n\n\t\t\t\tif (this.options.max > this.options.min) {\n\t\t\t\t\tthis._state.percentage = [this._toPercentage(this._state.value[0]), this._toPercentage(this._state.value[1]), this.options.step * 100 / (this.options.max - this.options.min)];\n\t\t\t\t} else {\n\t\t\t\t\tthis._state.percentage = [0, 0, 100];\n\t\t\t\t}\n\n\t\t\t\tthis._layout();\n\t\t\t\tvar newValue = this.options.range ? this._state.value : this._state.value[0];\n\n\t\t\t\tthis._setDataVal(newValue);\n\t\t\t\tif (triggerSlideEvent === true) {\n\t\t\t\t\tthis._trigger('slide', newValue);\n\t\t\t\t}\n\n\t\t\t\tvar hasChanged = false;\n\t\t\t\tif (Array.isArray(newValue)) {\n\t\t\t\t\thasChanged = oldValue[0] !== newValue[0] || oldValue[1] !== newValue[1];\n\t\t\t\t} else {\n\t\t\t\t\thasChanged = oldValue !== newValue;\n\t\t\t\t}\n\n\t\t\t\tif (hasChanged && triggerChangeEvent === true) {\n\t\t\t\t\tthis._trigger('change', {\n\t\t\t\t\t\toldValue: oldValue,\n\t\t\t\t\t\tnewValue: newValue\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\tdestroy: function destroy() {\n\t\t\t\t// Remove event handlers on slider elements\n\t\t\t\tthis._removeSliderEventHandlers();\n\n\t\t\t\t// Remove the slider from the DOM\n\t\t\t\tthis.sliderElem.parentNode.removeChild(this.sliderElem);\n\t\t\t\t/* Show original <input> element */\n\t\t\t\tthis.element.style.display = \"\";\n\n\t\t\t\t// Clear out custom event bindings\n\t\t\t\tthis._cleanUpEventCallbacksMap();\n\n\t\t\t\t// Remove data values\n\t\t\t\tthis.element.removeAttribute(\"data\");\n\n\t\t\t\t// Remove JQuery handlers/data\n\t\t\t\tif ($) {\n\t\t\t\t\tthis._unbindJQueryEventHandlers();\n\t\t\t\t\tif (autoRegisterNamespace === NAMESPACE_MAIN) {\n\t\t\t\t\t\tthis.$element.removeData(autoRegisterNamespace);\n\t\t\t\t\t}\n\t\t\t\t\tthis.$element.removeData(NAMESPACE_ALTERNATE);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdisable: function disable() {\n\t\t\t\tthis._state.enabled = false;\n\t\t\t\tthis.handle1.removeAttribute(\"tabindex\");\n\t\t\t\tthis.handle2.removeAttribute(\"tabindex\");\n\t\t\t\tthis._addClass(this.sliderElem, 'slider-disabled');\n\t\t\t\tthis._trigger('slideDisabled');\n\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\tenable: function enable() {\n\t\t\t\tthis._state.enabled = true;\n\t\t\t\tthis.handle1.setAttribute(\"tabindex\", 0);\n\t\t\t\tthis.handle2.setAttribute(\"tabindex\", 0);\n\t\t\t\tthis._removeClass(this.sliderElem, 'slider-disabled');\n\t\t\t\tthis._trigger('slideEnabled');\n\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\ttoggle: function toggle() {\n\t\t\t\tif (this._state.enabled) {\n\t\t\t\t\tthis.disable();\n\t\t\t\t} else {\n\t\t\t\t\tthis.enable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\tisEnabled: function isEnabled() {\n\t\t\t\treturn this._state.enabled;\n\t\t\t},\n\n\t\t\ton: function on(evt, callback) {\n\t\t\t\tthis._bindNonQueryEventHandler(evt, callback);\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\toff: function off(evt, callback) {\n\t\t\t\tif ($) {\n\t\t\t\t\tthis.$element.off(evt, callback);\n\t\t\t\t\tthis.$sliderElem.off(evt, callback);\n\t\t\t\t} else {\n\t\t\t\t\tthis._unbindNonQueryEventHandler(evt, callback);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetAttribute: function getAttribute(attribute) {\n\t\t\t\tif (attribute) {\n\t\t\t\t\treturn this.options[attribute];\n\t\t\t\t} else {\n\t\t\t\t\treturn this.options;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tsetAttribute: function setAttribute(attribute, value) {\n\t\t\t\tthis.options[attribute] = value;\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\trefresh: function refresh(options) {\n\t\t\t\tvar currentValue = this.getValue();\n\t\t\t\tthis._removeSliderEventHandlers();\n\t\t\t\tcreateNewSlider.call(this, this.element, this.options);\n\t\t\t\t// Don't reset slider's value on refresh if `useCurrentValue` is true\n\t\t\t\tif (options && options.useCurrentValue === true) {\n\t\t\t\t\tthis.setValue(currentValue);\n\t\t\t\t}\n\t\t\t\tif ($) {\n\t\t\t\t\t// Bind new instance of slider to the element\n\t\t\t\t\tif (autoRegisterNamespace === NAMESPACE_MAIN) {\n\t\t\t\t\t\t$.data(this.element, NAMESPACE_MAIN, this);\n\t\t\t\t\t\t$.data(this.element, NAMESPACE_ALTERNATE, this);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$.data(this.element, NAMESPACE_ALTERNATE, this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\trelayout: function relayout() {\n\t\t\t\tthis._resize();\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t/******************************+\n   \t\t\t\tHELPERS\n   \t- Any method that is not part of the public interface.\n   - Place it underneath this comment block and write its signature like so:\n   \t\t_fnName : function() {...}\n   \t********************************/\n\t\t\t_removeTooltipListener: function _removeTooltipListener(event, handler) {\n\t\t\t\tthis.handle1.removeEventListener(event, handler, false);\n\t\t\t\tthis.handle2.removeEventListener(event, handler, false);\n\t\t\t},\n\t\t\t_removeSliderEventHandlers: function _removeSliderEventHandlers() {\n\t\t\t\t// Remove keydown event listeners\n\t\t\t\tthis.handle1.removeEventListener(\"keydown\", this.handle1Keydown, false);\n\t\t\t\tthis.handle2.removeEventListener(\"keydown\", this.handle2Keydown, false);\n\n\t\t\t\t//remove the listeners from the ticks and handles if they had their own listeners\n\t\t\t\tif (this.options.ticks_tooltip) {\n\t\t\t\t\tvar ticks = this.ticksContainer.getElementsByClassName('slider-tick');\n\t\t\t\t\tfor (var i = 0; i < ticks.length; i++) {\n\t\t\t\t\t\tticks[i].removeEventListener('mouseenter', this.ticksCallbackMap[i].mouseEnter, false);\n\t\t\t\t\t\tticks[i].removeEventListener('mouseleave', this.ticksCallbackMap[i].mouseLeave, false);\n\t\t\t\t\t}\n\t\t\t\t\tif (this.handleCallbackMap.handle1 && this.handleCallbackMap.handle2) {\n\t\t\t\t\t\tthis.handle1.removeEventListener('mouseenter', this.handleCallbackMap.handle1.mouseEnter, false);\n\t\t\t\t\t\tthis.handle2.removeEventListener('mouseenter', this.handleCallbackMap.handle2.mouseEnter, false);\n\t\t\t\t\t\tthis.handle1.removeEventListener('mouseleave', this.handleCallbackMap.handle1.mouseLeave, false);\n\t\t\t\t\t\tthis.handle2.removeEventListener('mouseleave', this.handleCallbackMap.handle2.mouseLeave, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.handleCallbackMap = null;\n\t\t\t\tthis.ticksCallbackMap = null;\n\n\t\t\t\tif (this.showTooltip) {\n\t\t\t\t\tthis._removeTooltipListener(\"focus\", this.showTooltip);\n\t\t\t\t}\n\t\t\t\tif (this.hideTooltip) {\n\t\t\t\t\tthis._removeTooltipListener(\"blur\", this.hideTooltip);\n\t\t\t\t}\n\n\t\t\t\t// Remove event listeners from sliderElem\n\t\t\t\tif (this.showTooltip) {\n\t\t\t\t\tthis.sliderElem.removeEventListener(\"mouseenter\", this.showTooltip, false);\n\t\t\t\t}\n\t\t\t\tif (this.hideTooltip) {\n\t\t\t\t\tthis.sliderElem.removeEventListener(\"mouseleave\", this.hideTooltip, false);\n\t\t\t\t}\n\n\t\t\t\tthis.sliderElem.removeEventListener(\"mousedown\", this.mousedown, false);\n\n\t\t\t\tif (this.touchCapable) {\n\t\t\t\t\t// Remove touch event listeners from handles\n\t\t\t\t\tif (this.showTooltip) {\n\t\t\t\t\t\tthis.handle1.removeEventListener(\"touchstart\", this.showTooltip, false);\n\t\t\t\t\t\tthis.handle1.removeEventListener(\"touchmove\", this.showTooltip, false);\n\t\t\t\t\t\tthis.handle2.removeEventListener(\"touchstart\", this.showTooltip, false);\n\t\t\t\t\t\tthis.handle2.removeEventListener(\"touchmove\", this.showTooltip, false);\n\t\t\t\t\t}\n\t\t\t\t\tif (this.hideTooltip) {\n\t\t\t\t\t\tthis.handle1.removeEventListener(\"touchend\", this.hideTooltip, false);\n\t\t\t\t\t\tthis.handle2.removeEventListener(\"touchend\", this.hideTooltip, false);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove event listeners from sliderElem\n\t\t\t\t\tif (this.showTooltip) {\n\t\t\t\t\t\tthis.sliderElem.removeEventListener(\"touchstart\", this.showTooltip, false);\n\t\t\t\t\t\tthis.sliderElem.removeEventListener(\"touchmove\", this.showTooltip, false);\n\t\t\t\t\t}\n\t\t\t\t\tif (this.hideTooltip) {\n\t\t\t\t\t\tthis.sliderElem.removeEventListener(\"touchend\", this.hideTooltip, false);\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.sliderElem.removeEventListener(\"touchstart\", this.touchstart, false);\n\t\t\t\t\tthis.sliderElem.removeEventListener(\"touchmove\", this.touchmove, false);\n\t\t\t\t}\n\n\t\t\t\t// Remove window event listener\n\t\t\t\twindow.removeEventListener(\"resize\", this.resize, false);\n\t\t\t},\n\t\t\t_bindNonQueryEventHandler: function _bindNonQueryEventHandler(evt, callback) {\n\t\t\t\tif (this.eventToCallbackMap[evt] === undefined) {\n\t\t\t\t\tthis.eventToCallbackMap[evt] = [];\n\t\t\t\t}\n\t\t\t\tthis.eventToCallbackMap[evt].push(callback);\n\t\t\t},\n\t\t\t_unbindNonQueryEventHandler: function _unbindNonQueryEventHandler(evt, callback) {\n\t\t\t\tvar callbacks = this.eventToCallbackMap[evt];\n\t\t\t\tif (callbacks !== undefined) {\n\t\t\t\t\tfor (var i = 0; i < callbacks.length; i++) {\n\t\t\t\t\t\tif (callbacks[i] === callback) {\n\t\t\t\t\t\t\tcallbacks.splice(i, 1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t_cleanUpEventCallbacksMap: function _cleanUpEventCallbacksMap() {\n\t\t\t\tvar eventNames = Object.keys(this.eventToCallbackMap);\n\t\t\t\tfor (var i = 0; i < eventNames.length; i++) {\n\t\t\t\t\tvar eventName = eventNames[i];\n\t\t\t\t\tdelete this.eventToCallbackMap[eventName];\n\t\t\t\t}\n\t\t\t},\n\t\t\t_showTooltip: function _showTooltip() {\n\t\t\t\tif (this.options.tooltip_split === false) {\n\t\t\t\t\tthis._addClass(this.tooltip, 'in');\n\t\t\t\t\tthis.tooltip_min.style.display = 'none';\n\t\t\t\t\tthis.tooltip_max.style.display = 'none';\n\t\t\t\t} else {\n\t\t\t\t\tthis._addClass(this.tooltip_min, 'in');\n\t\t\t\t\tthis._addClass(this.tooltip_max, 'in');\n\t\t\t\t\tthis.tooltip.style.display = 'none';\n\t\t\t\t}\n\t\t\t\tthis._state.over = true;\n\t\t\t},\n\t\t\t_hideTooltip: function _hideTooltip() {\n\t\t\t\tif (this._state.inDrag === false && this._alwaysShowTooltip !== true) {\n\t\t\t\t\tthis._removeClass(this.tooltip, 'in');\n\t\t\t\t\tthis._removeClass(this.tooltip_min, 'in');\n\t\t\t\t\tthis._removeClass(this.tooltip_max, 'in');\n\t\t\t\t}\n\t\t\t\tthis._state.over = false;\n\t\t\t},\n\t\t\t_setToolTipOnMouseOver: function _setToolTipOnMouseOver(tempState) {\n\t\t\t\tvar self = this;\n\t\t\t\tvar formattedTooltipVal = this.options.formatter(!tempState ? this._state.value[0] : tempState.value[0]);\n\t\t\t\tvar positionPercentages = !tempState ? getPositionPercentages(this._state, this.options.reversed) : getPositionPercentages(tempState, this.options.reversed);\n\t\t\t\tthis._setText(this.tooltipInner, formattedTooltipVal);\n\n\t\t\t\tthis.tooltip.style[this.stylePos] = positionPercentages[0] + \"%\";\n\n\t\t\t\tfunction getPositionPercentages(state, reversed) {\n\t\t\t\t\tif (reversed) {\n\t\t\t\t\t\treturn [100 - state.percentage[0], self.options.range ? 100 - state.percentage[1] : state.percentage[1]];\n\t\t\t\t\t}\n\t\t\t\t\treturn [state.percentage[0], state.percentage[1]];\n\t\t\t\t}\n\t\t\t},\n\t\t\t_copyState: function _copyState() {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: [this._state.value[0], this._state.value[1]],\n\t\t\t\t\tenabled: this._state.enabled,\n\t\t\t\t\toffset: this._state.offset,\n\t\t\t\t\tsize: this._state.size,\n\t\t\t\t\tpercentage: [this._state.percentage[0], this._state.percentage[1], this._state.percentage[2]],\n\t\t\t\t\tinDrag: this._state.inDrag,\n\t\t\t\t\tover: this._state.over,\n\t\t\t\t\t// deleted or null'd keys\n\t\t\t\t\tdragged: this._state.dragged,\n\t\t\t\t\tkeyCtrl: this._state.keyCtrl\n\t\t\t\t};\n\t\t\t},\n\t\t\t_addTickListener: function _addTickListener() {\n\t\t\t\treturn {\n\t\t\t\t\taddMouseEnter: function addMouseEnter(reference, element, index) {\n\t\t\t\t\t\tvar enter = function enter() {\n\t\t\t\t\t\t\tvar tempState = reference._copyState();\n\t\t\t\t\t\t\t// Which handle is being hovered over?\n\t\t\t\t\t\t\tvar val = element === reference.handle1 ? tempState.value[0] : tempState.value[1];\n\t\t\t\t\t\t\tvar per = void 0;\n\n\t\t\t\t\t\t\t// Setup value and percentage for tick's 'mouseenter'\n\t\t\t\t\t\t\tif (index !== undefined) {\n\t\t\t\t\t\t\t\tval = reference.options.ticks[index];\n\t\t\t\t\t\t\t\tper = reference.options.ticks_positions.length > 0 && reference.options.ticks_positions[index] || reference._toPercentage(reference.options.ticks[index]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tper = reference._toPercentage(val);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttempState.value[0] = val;\n\t\t\t\t\t\t\ttempState.percentage[0] = per;\n\t\t\t\t\t\t\treference._setToolTipOnMouseOver(tempState);\n\t\t\t\t\t\t\treference._showTooltip();\n\t\t\t\t\t\t};\n\t\t\t\t\t\telement.addEventListener(\"mouseenter\", enter, false);\n\t\t\t\t\t\treturn enter;\n\t\t\t\t\t},\n\t\t\t\t\taddMouseLeave: function addMouseLeave(reference, element) {\n\t\t\t\t\t\tvar leave = function leave() {\n\t\t\t\t\t\t\treference._hideTooltip();\n\t\t\t\t\t\t};\n\t\t\t\t\t\telement.addEventListener(\"mouseleave\", leave, false);\n\t\t\t\t\t\treturn leave;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t\t_layout: function _layout() {\n\t\t\t\tvar positionPercentages;\n\t\t\t\tvar formattedValue;\n\n\t\t\t\tif (this.options.reversed) {\n\t\t\t\t\tpositionPercentages = [100 - this._state.percentage[0], this.options.range ? 100 - this._state.percentage[1] : this._state.percentage[1]];\n\t\t\t\t} else {\n\t\t\t\t\tpositionPercentages = [this._state.percentage[0], this._state.percentage[1]];\n\t\t\t\t}\n\n\t\t\t\tthis.handle1.style[this.stylePos] = positionPercentages[0] + \"%\";\n\t\t\t\tthis.handle1.setAttribute('aria-valuenow', this._state.value[0]);\n\t\t\t\tformattedValue = this.options.formatter(this._state.value[0]);\n\t\t\t\tif (isNaN(formattedValue)) {\n\t\t\t\t\tthis.handle1.setAttribute('aria-valuetext', formattedValue);\n\t\t\t\t} else {\n\t\t\t\t\tthis.handle1.removeAttribute('aria-valuetext');\n\t\t\t\t}\n\n\t\t\t\tthis.handle2.style[this.stylePos] = positionPercentages[1] + \"%\";\n\t\t\t\tthis.handle2.setAttribute('aria-valuenow', this._state.value[1]);\n\t\t\t\tformattedValue = this.options.formatter(this._state.value[1]);\n\t\t\t\tif (isNaN(formattedValue)) {\n\t\t\t\t\tthis.handle2.setAttribute('aria-valuetext', formattedValue);\n\t\t\t\t} else {\n\t\t\t\t\tthis.handle2.removeAttribute('aria-valuetext');\n\t\t\t\t}\n\n\t\t\t\t/* Position highlight range elements */\n\t\t\t\tif (this.rangeHighlightElements.length > 0 && Array.isArray(this.options.rangeHighlights) && this.options.rangeHighlights.length > 0) {\n\t\t\t\t\tfor (var _i = 0; _i < this.options.rangeHighlights.length; _i++) {\n\t\t\t\t\t\tvar startPercent = this._toPercentage(this.options.rangeHighlights[_i].start);\n\t\t\t\t\t\tvar endPercent = this._toPercentage(this.options.rangeHighlights[_i].end);\n\n\t\t\t\t\t\tif (this.options.reversed) {\n\t\t\t\t\t\t\tvar sp = 100 - endPercent;\n\t\t\t\t\t\t\tendPercent = 100 - startPercent;\n\t\t\t\t\t\t\tstartPercent = sp;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar currentRange = this._createHighlightRange(startPercent, endPercent);\n\n\t\t\t\t\t\tif (currentRange) {\n\t\t\t\t\t\t\tif (this.options.orientation === 'vertical') {\n\t\t\t\t\t\t\t\tthis.rangeHighlightElements[_i].style.top = currentRange.start + \"%\";\n\t\t\t\t\t\t\t\tthis.rangeHighlightElements[_i].style.height = currentRange.size + \"%\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (this.options.rtl) {\n\t\t\t\t\t\t\t\t\tthis.rangeHighlightElements[_i].style.right = currentRange.start + \"%\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.rangeHighlightElements[_i].style.left = currentRange.start + \"%\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.rangeHighlightElements[_i].style.width = currentRange.size + \"%\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.rangeHighlightElements[_i].style.display = \"none\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Position ticks and labels */\n\t\t\t\tif (Array.isArray(this.options.ticks) && this.options.ticks.length > 0) {\n\n\t\t\t\t\tvar styleSize = this.options.orientation === 'vertical' ? 'height' : 'width';\n\t\t\t\t\tvar styleMargin;\n\t\t\t\t\tif (this.options.orientation === 'vertical') {\n\t\t\t\t\t\tstyleMargin = 'marginTop';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (this.options.rtl) {\n\t\t\t\t\t\t\tstyleMargin = 'marginRight';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstyleMargin = 'marginLeft';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar labelSize = this._state.size / (this.options.ticks.length - 1);\n\n\t\t\t\t\tif (this.tickLabelContainer) {\n\t\t\t\t\t\tvar extraMargin = 0;\n\t\t\t\t\t\tif (this.options.ticks_positions.length === 0) {\n\t\t\t\t\t\t\tif (this.options.orientation !== 'vertical') {\n\t\t\t\t\t\t\t\tthis.tickLabelContainer.style[styleMargin] = -labelSize / 2 + \"px\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\textraMargin = this.tickLabelContainer.offsetHeight;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t/* Chidren are position absolute, calculate height by finding the max offsetHeight of a child */\n\t\t\t\t\t\t\tfor (i = 0; i < this.tickLabelContainer.childNodes.length; i++) {\n\t\t\t\t\t\t\t\tif (this.tickLabelContainer.childNodes[i].offsetHeight > extraMargin) {\n\t\t\t\t\t\t\t\t\textraMargin = this.tickLabelContainer.childNodes[i].offsetHeight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.options.orientation === 'horizontal') {\n\t\t\t\t\t\t\tthis.sliderElem.style.marginBottom = extraMargin + \"px\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (var i = 0; i < this.options.ticks.length; i++) {\n\n\t\t\t\t\t\tvar percentage = this.options.ticks_positions[i] || this._toPercentage(this.options.ticks[i]);\n\n\t\t\t\t\t\tif (this.options.reversed) {\n\t\t\t\t\t\t\tpercentage = 100 - percentage;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.ticks[i].style[this.stylePos] = percentage + \"%\";\n\n\t\t\t\t\t\t/* Set class labels to denote whether ticks are in the selection */\n\t\t\t\t\t\tthis._removeClass(this.ticks[i], 'in-selection');\n\t\t\t\t\t\tif (!this.options.range) {\n\t\t\t\t\t\t\tif (this.options.selection === 'after' && percentage >= positionPercentages[0]) {\n\t\t\t\t\t\t\t\tthis._addClass(this.ticks[i], 'in-selection');\n\t\t\t\t\t\t\t} else if (this.options.selection === 'before' && percentage <= positionPercentages[0]) {\n\t\t\t\t\t\t\t\tthis._addClass(this.ticks[i], 'in-selection');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (percentage >= positionPercentages[0] && percentage <= positionPercentages[1]) {\n\t\t\t\t\t\t\tthis._addClass(this.ticks[i], 'in-selection');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (this.tickLabels[i]) {\n\t\t\t\t\t\t\tthis.tickLabels[i].style[styleSize] = labelSize + \"px\";\n\n\t\t\t\t\t\t\tif (this.options.orientation !== 'vertical' && this.options.ticks_positions[i] !== undefined) {\n\t\t\t\t\t\t\t\tthis.tickLabels[i].style.position = 'absolute';\n\t\t\t\t\t\t\t\tthis.tickLabels[i].style[this.stylePos] = percentage + \"%\";\n\t\t\t\t\t\t\t\tthis.tickLabels[i].style[styleMargin] = -labelSize / 2 + 'px';\n\t\t\t\t\t\t\t} else if (this.options.orientation === 'vertical') {\n\t\t\t\t\t\t\t\tif (this.options.rtl) {\n\t\t\t\t\t\t\t\t\tthis.tickLabels[i].style['marginRight'] = this.sliderElem.offsetWidth + \"px\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.tickLabels[i].style['marginLeft'] = this.sliderElem.offsetWidth + \"px\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.tickLabelContainer.style[styleMargin] = this.sliderElem.offsetWidth / 2 * -1 + 'px';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* Set class labels to indicate tick labels are in the selection or selected */\n\t\t\t\t\t\t\tthis._removeClass(this.tickLabels[i], 'label-in-selection label-is-selection');\n\t\t\t\t\t\t\tif (!this.options.range) {\n\t\t\t\t\t\t\t\tif (this.options.selection === 'after' && percentage >= positionPercentages[0]) {\n\t\t\t\t\t\t\t\t\tthis._addClass(this.tickLabels[i], 'label-in-selection');\n\t\t\t\t\t\t\t\t} else if (this.options.selection === 'before' && percentage <= positionPercentages[0]) {\n\t\t\t\t\t\t\t\t\tthis._addClass(this.tickLabels[i], 'label-in-selection');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (percentage === positionPercentages[0]) {\n\t\t\t\t\t\t\t\t\tthis._addClass(this.tickLabels[i], 'label-is-selection');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (percentage >= positionPercentages[0] && percentage <= positionPercentages[1]) {\n\t\t\t\t\t\t\t\tthis._addClass(this.tickLabels[i], 'label-in-selection');\n\t\t\t\t\t\t\t\tif (percentage === positionPercentages[0] || positionPercentages[1]) {\n\t\t\t\t\t\t\t\t\tthis._addClass(this.tickLabels[i], 'label-is-selection');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar formattedTooltipVal;\n\n\t\t\t\tif (this.options.range) {\n\t\t\t\t\tformattedTooltipVal = this.options.formatter(this._state.value);\n\t\t\t\t\tthis._setText(this.tooltipInner, formattedTooltipVal);\n\t\t\t\t\tthis.tooltip.style[this.stylePos] = (positionPercentages[1] + positionPercentages[0]) / 2 + \"%\";\n\n\t\t\t\t\tvar innerTooltipMinText = this.options.formatter(this._state.value[0]);\n\t\t\t\t\tthis._setText(this.tooltipInner_min, innerTooltipMinText);\n\n\t\t\t\t\tvar innerTooltipMaxText = this.options.formatter(this._state.value[1]);\n\t\t\t\t\tthis._setText(this.tooltipInner_max, innerTooltipMaxText);\n\n\t\t\t\t\tthis.tooltip_min.style[this.stylePos] = positionPercentages[0] + \"%\";\n\n\t\t\t\t\tthis.tooltip_max.style[this.stylePos] = positionPercentages[1] + \"%\";\n\t\t\t\t} else {\n\t\t\t\t\tformattedTooltipVal = this.options.formatter(this._state.value[0]);\n\t\t\t\t\tthis._setText(this.tooltipInner, formattedTooltipVal);\n\n\t\t\t\t\tthis.tooltip.style[this.stylePos] = positionPercentages[0] + \"%\";\n\t\t\t\t}\n\n\t\t\t\tif (this.options.orientation === 'vertical') {\n\t\t\t\t\tthis.trackLow.style.top = '0';\n\t\t\t\t\tthis.trackLow.style.height = Math.min(positionPercentages[0], positionPercentages[1]) + '%';\n\n\t\t\t\t\tthis.trackSelection.style.top = Math.min(positionPercentages[0], positionPercentages[1]) + '%';\n\t\t\t\t\tthis.trackSelection.style.height = Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';\n\n\t\t\t\t\tthis.trackHigh.style.bottom = '0';\n\t\t\t\t\tthis.trackHigh.style.height = 100 - Math.min(positionPercentages[0], positionPercentages[1]) - Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';\n\t\t\t\t} else {\n\t\t\t\t\tif (this.stylePos === 'right') {\n\t\t\t\t\t\tthis.trackLow.style.right = '0';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.trackLow.style.left = '0';\n\t\t\t\t\t}\n\t\t\t\t\tthis.trackLow.style.width = Math.min(positionPercentages[0], positionPercentages[1]) + '%';\n\n\t\t\t\t\tif (this.stylePos === 'right') {\n\t\t\t\t\t\tthis.trackSelection.style.right = Math.min(positionPercentages[0], positionPercentages[1]) + '%';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.trackSelection.style.left = Math.min(positionPercentages[0], positionPercentages[1]) + '%';\n\t\t\t\t\t}\n\t\t\t\t\tthis.trackSelection.style.width = Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';\n\n\t\t\t\t\tif (this.stylePos === 'right') {\n\t\t\t\t\t\tthis.trackHigh.style.left = '0';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.trackHigh.style.right = '0';\n\t\t\t\t\t}\n\t\t\t\t\tthis.trackHigh.style.width = 100 - Math.min(positionPercentages[0], positionPercentages[1]) - Math.abs(positionPercentages[0] - positionPercentages[1]) + '%';\n\n\t\t\t\t\tvar offset_min = this.tooltip_min.getBoundingClientRect();\n\t\t\t\t\tvar offset_max = this.tooltip_max.getBoundingClientRect();\n\n\t\t\t\t\tif (this.options.tooltip_position === 'bottom') {\n\t\t\t\t\t\tif (offset_min.right > offset_max.left) {\n\t\t\t\t\t\t\tthis._removeClass(this.tooltip_max, 'bottom');\n\t\t\t\t\t\t\tthis._addClass(this.tooltip_max, 'top');\n\t\t\t\t\t\t\tthis.tooltip_max.style.top = '';\n\t\t\t\t\t\t\tthis.tooltip_max.style.bottom = 22 + 'px';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._removeClass(this.tooltip_max, 'top');\n\t\t\t\t\t\t\tthis._addClass(this.tooltip_max, 'bottom');\n\t\t\t\t\t\t\tthis.tooltip_max.style.top = this.tooltip_min.style.top;\n\t\t\t\t\t\t\tthis.tooltip_max.style.bottom = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (offset_min.right > offset_max.left) {\n\t\t\t\t\t\t\tthis._removeClass(this.tooltip_max, 'top');\n\t\t\t\t\t\t\tthis._addClass(this.tooltip_max, 'bottom');\n\t\t\t\t\t\t\tthis.tooltip_max.style.top = 18 + 'px';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._removeClass(this.tooltip_max, 'bottom');\n\t\t\t\t\t\t\tthis._addClass(this.tooltip_max, 'top');\n\t\t\t\t\t\t\tthis.tooltip_max.style.top = this.tooltip_min.style.top;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t_createHighlightRange: function _createHighlightRange(start, end) {\n\t\t\t\tif (this._isHighlightRange(start, end)) {\n\t\t\t\t\tif (start > end) {\n\t\t\t\t\t\treturn { 'start': end, 'size': start - end };\n\t\t\t\t\t}\n\t\t\t\t\treturn { 'start': start, 'size': end - start };\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\t_isHighlightRange: function _isHighlightRange(start, end) {\n\t\t\t\tif (0 <= start && start <= 100 && 0 <= end && end <= 100) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\t_resize: function _resize(ev) {\n\t\t\t\t/*jshint unused:false*/\n\t\t\t\tthis._state.offset = this._offset(this.sliderElem);\n\t\t\t\tthis._state.size = this.sliderElem[this.sizePos];\n\t\t\t\tthis._layout();\n\t\t\t},\n\t\t\t_removeProperty: function _removeProperty(element, prop) {\n\t\t\t\tif (element.style.removeProperty) {\n\t\t\t\t\telement.style.removeProperty(prop);\n\t\t\t\t} else {\n\t\t\t\t\telement.style.removeAttribute(prop);\n\t\t\t\t}\n\t\t\t},\n\t\t\t_mousedown: function _mousedown(ev) {\n\t\t\t\tif (!this._state.enabled) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (ev.preventDefault) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tthis._state.offset = this._offset(this.sliderElem);\n\t\t\t\tthis._state.size = this.sliderElem[this.sizePos];\n\n\t\t\t\tvar percentage = this._getPercentage(ev);\n\n\t\t\t\tif (this.options.range) {\n\t\t\t\t\tvar diff1 = Math.abs(this._state.percentage[0] - percentage);\n\t\t\t\t\tvar diff2 = Math.abs(this._state.percentage[1] - percentage);\n\t\t\t\t\tthis._state.dragged = diff1 < diff2 ? 0 : 1;\n\t\t\t\t\tthis._adjustPercentageForRangeSliders(percentage);\n\t\t\t\t} else {\n\t\t\t\t\tthis._state.dragged = 0;\n\t\t\t\t}\n\n\t\t\t\tthis._state.percentage[this._state.dragged] = percentage;\n\n\t\t\t\tif (this.touchCapable) {\n\t\t\t\t\tdocument.removeEventListener(\"touchmove\", this.mousemove, false);\n\t\t\t\t\tdocument.removeEventListener(\"touchend\", this.mouseup, false);\n\t\t\t\t}\n\n\t\t\t\tif (this.mousemove) {\n\t\t\t\t\tdocument.removeEventListener(\"mousemove\", this.mousemove, false);\n\t\t\t\t}\n\t\t\t\tif (this.mouseup) {\n\t\t\t\t\tdocument.removeEventListener(\"mouseup\", this.mouseup, false);\n\t\t\t\t}\n\n\t\t\t\tthis.mousemove = this._mousemove.bind(this);\n\t\t\t\tthis.mouseup = this._mouseup.bind(this);\n\n\t\t\t\tif (this.touchCapable) {\n\t\t\t\t\t// Touch: Bind touch events:\n\t\t\t\t\tdocument.addEventListener(\"touchmove\", this.mousemove, false);\n\t\t\t\t\tdocument.addEventListener(\"touchend\", this.mouseup, false);\n\t\t\t\t}\n\t\t\t\t// Bind mouse events:\n\t\t\t\tdocument.addEventListener(\"mousemove\", this.mousemove, false);\n\t\t\t\tdocument.addEventListener(\"mouseup\", this.mouseup, false);\n\n\t\t\t\tthis._state.inDrag = true;\n\t\t\t\tvar newValue = this._calculateValue();\n\n\t\t\t\tthis._trigger('slideStart', newValue);\n\n\t\t\t\tthis.setValue(newValue, false, true);\n\n\t\t\t\tev.returnValue = false;\n\n\t\t\t\tif (this.options.focus) {\n\t\t\t\t\tthis._triggerFocusOnHandle(this._state.dragged);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\t_touchstart: function _touchstart(ev) {\n\t\t\t\tthis._mousedown(ev);\n\t\t\t},\n\t\t\t_triggerFocusOnHandle: function _triggerFocusOnHandle(handleIdx) {\n\t\t\t\tif (handleIdx === 0) {\n\t\t\t\t\tthis.handle1.focus();\n\t\t\t\t}\n\t\t\t\tif (handleIdx === 1) {\n\t\t\t\t\tthis.handle2.focus();\n\t\t\t\t}\n\t\t\t},\n\t\t\t_keydown: function _keydown(handleIdx, ev) {\n\t\t\t\tif (!this._state.enabled) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar dir;\n\t\t\t\tswitch (ev.keyCode) {\n\t\t\t\t\tcase 37: // left\n\t\t\t\t\tcase 40:\n\t\t\t\t\t\t// down\n\t\t\t\t\t\tdir = -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 39: // right\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\t// up\n\t\t\t\t\t\tdir = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!dir) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// use natural arrow keys instead of from min to max\n\t\t\t\tif (this.options.natural_arrow_keys) {\n\t\t\t\t\tvar isHorizontal = this.options.orientation === 'horizontal';\n\t\t\t\t\tvar isVertical = this.options.orientation === 'vertical';\n\t\t\t\t\tvar isRTL = this.options.rtl;\n\t\t\t\t\tvar isReversed = this.options.reversed;\n\n\t\t\t\t\tif (isHorizontal) {\n\t\t\t\t\t\tif (isRTL) {\n\t\t\t\t\t\t\tif (!isReversed) {\n\t\t\t\t\t\t\t\tdir = -dir;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (isReversed) {\n\t\t\t\t\t\t\t\tdir = -dir;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (isVertical) {\n\t\t\t\t\t\tif (!isReversed) {\n\t\t\t\t\t\t\tdir = -dir;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar val;\n\t\t\t\tif (this.ticksAreValid && this.options.lock_to_ticks) {\n\t\t\t\t\tvar index = void 0;\n\t\t\t\t\t// Find tick index that handle 1/2 is currently on\n\t\t\t\t\tindex = this.options.ticks.indexOf(this._state.value[handleIdx]);\n\t\t\t\t\tif (index === -1) {\n\t\t\t\t\t\t// Set default to first tick\n\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\twindow.console.warn('(lock_to_ticks) _keydown: index should not be -1');\n\t\t\t\t\t}\n\t\t\t\t\tindex += dir;\n\t\t\t\t\tindex = Math.max(0, Math.min(this.options.ticks.length - 1, index));\n\t\t\t\t\tval = this.options.ticks[index];\n\t\t\t\t} else {\n\t\t\t\t\tval = this._state.value[handleIdx] + dir * this.options.step;\n\t\t\t\t}\n\t\t\t\tvar percentage = this._toPercentage(val);\n\t\t\t\tthis._state.keyCtrl = handleIdx;\n\t\t\t\tif (this.options.range) {\n\t\t\t\t\tthis._adjustPercentageForRangeSliders(percentage);\n\t\t\t\t\tvar val1 = !this._state.keyCtrl ? val : this._state.value[0];\n\t\t\t\t\tvar val2 = this._state.keyCtrl ? val : this._state.value[1];\n\t\t\t\t\t// Restrict values within limits\n\t\t\t\t\tval = [Math.max(this.options.min, Math.min(this.options.max, val1)), Math.max(this.options.min, Math.min(this.options.max, val2))];\n\t\t\t\t} else {\n\t\t\t\t\tval = Math.max(this.options.min, Math.min(this.options.max, val));\n\t\t\t\t}\n\n\t\t\t\tthis._trigger('slideStart', val);\n\n\t\t\t\tthis.setValue(val, true, true);\n\n\t\t\t\tthis._trigger('slideStop', val);\n\n\t\t\t\tthis._pauseEvent(ev);\n\t\t\t\tdelete this._state.keyCtrl;\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\t_pauseEvent: function _pauseEvent(ev) {\n\t\t\t\tif (ev.stopPropagation) {\n\t\t\t\t\tev.stopPropagation();\n\t\t\t\t}\n\t\t\t\tif (ev.preventDefault) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t}\n\t\t\t\tev.cancelBubble = true;\n\t\t\t\tev.returnValue = false;\n\t\t\t},\n\t\t\t_mousemove: function _mousemove(ev) {\n\t\t\t\tif (!this._state.enabled) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar percentage = this._getPercentage(ev);\n\t\t\t\tthis._adjustPercentageForRangeSliders(percentage);\n\t\t\t\tthis._state.percentage[this._state.dragged] = percentage;\n\n\t\t\t\tvar val = this._calculateValue(true);\n\t\t\t\tthis.setValue(val, true, true);\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\t_touchmove: function _touchmove(ev) {\n\t\t\t\tif (ev.changedTouches === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent page from scrolling and only drag the slider\n\t\t\t\tif (ev.preventDefault) {\n\t\t\t\t\tev.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\t_adjustPercentageForRangeSliders: function _adjustPercentageForRangeSliders(percentage) {\n\t\t\t\tif (this.options.range) {\n\t\t\t\t\tvar precision = this._getNumDigitsAfterDecimalPlace(percentage);\n\t\t\t\t\tprecision = precision ? precision - 1 : 0;\n\t\t\t\t\tvar percentageWithAdjustedPrecision = this._applyToFixedAndParseFloat(percentage, precision);\n\t\t\t\t\tif (this._state.dragged === 0 && this._applyToFixedAndParseFloat(this._state.percentage[1], precision) < percentageWithAdjustedPrecision) {\n\t\t\t\t\t\tthis._state.percentage[0] = this._state.percentage[1];\n\t\t\t\t\t\tthis._state.dragged = 1;\n\t\t\t\t\t} else if (this._state.dragged === 1 && this._applyToFixedAndParseFloat(this._state.percentage[0], precision) > percentageWithAdjustedPrecision) {\n\t\t\t\t\t\tthis._state.percentage[1] = this._state.percentage[0];\n\t\t\t\t\t\tthis._state.dragged = 0;\n\t\t\t\t\t} else if (this._state.keyCtrl === 0 && this._toPercentage(this._state.value[1]) < percentage) {\n\t\t\t\t\t\tthis._state.percentage[0] = this._state.percentage[1];\n\t\t\t\t\t\tthis._state.keyCtrl = 1;\n\t\t\t\t\t\tthis.handle2.focus();\n\t\t\t\t\t} else if (this._state.keyCtrl === 1 && this._toPercentage(this._state.value[0]) > percentage) {\n\t\t\t\t\t\tthis._state.percentage[1] = this._state.percentage[0];\n\t\t\t\t\t\tthis._state.keyCtrl = 0;\n\t\t\t\t\t\tthis.handle1.focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t_mouseup: function _mouseup(ev) {\n\t\t\t\tif (!this._state.enabled) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tvar percentage = this._getPercentage(ev);\n\t\t\t\tthis._adjustPercentageForRangeSliders(percentage);\n\t\t\t\tthis._state.percentage[this._state.dragged] = percentage;\n\n\t\t\t\tif (this.touchCapable) {\n\t\t\t\t\t// Touch: Unbind touch event handlers:\n\t\t\t\t\tdocument.removeEventListener(\"touchmove\", this.mousemove, false);\n\t\t\t\t\tdocument.removeEventListener(\"touchend\", this.mouseup, false);\n\t\t\t\t}\n\t\t\t\t// Unbind mouse event handlers:\n\t\t\t\tdocument.removeEventListener(\"mousemove\", this.mousemove, false);\n\t\t\t\tdocument.removeEventListener(\"mouseup\", this.mouseup, false);\n\n\t\t\t\tthis._state.inDrag = false;\n\t\t\t\tif (this._state.over === false) {\n\t\t\t\t\tthis._hideTooltip();\n\t\t\t\t}\n\t\t\t\tvar val = this._calculateValue(true);\n\n\t\t\t\tthis.setValue(val, false, true);\n\t\t\t\tthis._trigger('slideStop', val);\n\n\t\t\t\t// No longer need 'dragged' after mouse up\n\t\t\t\tthis._state.dragged = null;\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\t_setValues: function _setValues(index, val) {\n\t\t\t\tvar comp = 0 === index ? 0 : 100;\n\t\t\t\tif (this._state.percentage[index] !== comp) {\n\t\t\t\t\tval.data[index] = this._toValue(this._state.percentage[index]);\n\t\t\t\t\tval.data[index] = this._applyPrecision(val.data[index]);\n\t\t\t\t}\n\t\t\t},\n\t\t\t_calculateValue: function _calculateValue(snapToClosestTick) {\n\t\t\t\tvar val = {};\n\t\t\t\tif (this.options.range) {\n\t\t\t\t\tval.data = [this.options.min, this.options.max];\n\t\t\t\t\tthis._setValues(0, val);\n\t\t\t\t\tthis._setValues(1, val);\n\t\t\t\t\tif (snapToClosestTick) {\n\t\t\t\t\t\tval.data[0] = this._snapToClosestTick(val.data[0]);\n\t\t\t\t\t\tval.data[1] = this._snapToClosestTick(val.data[1]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tval.data = this._toValue(this._state.percentage[0]);\n\t\t\t\t\tval.data = parseFloat(val.data);\n\t\t\t\t\tval.data = this._applyPrecision(val.data);\n\t\t\t\t\tif (snapToClosestTick) {\n\t\t\t\t\t\tval.data = this._snapToClosestTick(val.data);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn val.data;\n\t\t\t},\n\t\t\t_snapToClosestTick: function _snapToClosestTick(val) {\n\t\t\t\tvar min = [val, Infinity];\n\t\t\t\tfor (var i = 0; i < this.options.ticks.length; i++) {\n\t\t\t\t\tvar diff = Math.abs(this.options.ticks[i] - val);\n\t\t\t\t\tif (diff <= min[1]) {\n\t\t\t\t\t\tmin = [this.options.ticks[i], diff];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (min[1] <= this.options.ticks_snap_bounds) {\n\t\t\t\t\treturn min[0];\n\t\t\t\t}\n\t\t\t\treturn val;\n\t\t\t},\n\n\t\t\t_applyPrecision: function _applyPrecision(val) {\n\t\t\t\tvar precision = this.options.precision || this._getNumDigitsAfterDecimalPlace(this.options.step);\n\t\t\t\treturn this._applyToFixedAndParseFloat(val, precision);\n\t\t\t},\n\t\t\t_getNumDigitsAfterDecimalPlace: function _getNumDigitsAfterDecimalPlace(num) {\n\t\t\t\tvar match = ('' + num).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);\n\t\t\t\tif (!match) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn Math.max(0, (match[1] ? match[1].length : 0) - (match[2] ? +match[2] : 0));\n\t\t\t},\n\t\t\t_applyToFixedAndParseFloat: function _applyToFixedAndParseFloat(num, toFixedInput) {\n\t\t\t\tvar truncatedNum = num.toFixed(toFixedInput);\n\t\t\t\treturn parseFloat(truncatedNum);\n\t\t\t},\n\t\t\t/*\n   \tCredits to Mike Samuel for the following method!\n   \tSource: http://stackoverflow.com/questions/10454518/javascript-how-to-retrieve-the-number-of-decimals-of-a-string-number\n   */\n\t\t\t_getPercentage: function _getPercentage(ev) {\n\t\t\t\tif (this.touchCapable && (ev.type === 'touchstart' || ev.type === 'touchmove' || ev.type === 'touchend')) {\n\t\t\t\t\tev = ev.changedTouches[0];\n\t\t\t\t}\n\n\t\t\t\tvar eventPosition = ev[this.mousePos];\n\t\t\t\tvar sliderOffset = this._state.offset[this.stylePos];\n\t\t\t\tvar distanceToSlide = eventPosition - sliderOffset;\n\t\t\t\tif (this.stylePos === 'right') {\n\t\t\t\t\tdistanceToSlide = -distanceToSlide;\n\t\t\t\t}\n\t\t\t\t// Calculate what percent of the length the slider handle has slid\n\t\t\t\tvar percentage = distanceToSlide / this._state.size * 100;\n\t\t\t\tpercentage = Math.round(percentage / this._state.percentage[2]) * this._state.percentage[2];\n\t\t\t\tif (this.options.reversed) {\n\t\t\t\t\tpercentage = 100 - percentage;\n\t\t\t\t}\n\n\t\t\t\t// Make sure the percent is within the bounds of the slider.\n\t\t\t\t// 0% corresponds to the 'min' value of the slide\n\t\t\t\t// 100% corresponds to the 'max' value of the slide\n\t\t\t\treturn Math.max(0, Math.min(100, percentage));\n\t\t\t},\n\t\t\t_validateInputValue: function _validateInputValue(val) {\n\t\t\t\tif (!isNaN(+val)) {\n\t\t\t\t\treturn +val;\n\t\t\t\t} else if (Array.isArray(val)) {\n\t\t\t\t\tthis._validateArray(val);\n\t\t\t\t\treturn val;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(ErrorMsgs.formatInvalidInputErrorMsg(val));\n\t\t\t\t}\n\t\t\t},\n\t\t\t_validateArray: function _validateArray(val) {\n\t\t\t\tfor (var i = 0; i < val.length; i++) {\n\t\t\t\t\tvar input = val[i];\n\t\t\t\t\tif (typeof input !== 'number') {\n\t\t\t\t\t\tthrow new Error(ErrorMsgs.formatInvalidInputErrorMsg(input));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t_setDataVal: function _setDataVal(val) {\n\t\t\t\tthis.element.setAttribute('data-value', val);\n\t\t\t\tthis.element.setAttribute('value', val);\n\t\t\t\tthis.element.value = val;\n\t\t\t},\n\t\t\t_trigger: function _trigger(evt, val) {\n\t\t\t\tval = val || val === 0 ? val : undefined;\n\n\t\t\t\tvar callbackFnArray = this.eventToCallbackMap[evt];\n\t\t\t\tif (callbackFnArray && callbackFnArray.length) {\n\t\t\t\t\tfor (var i = 0; i < callbackFnArray.length; i++) {\n\t\t\t\t\t\tvar callbackFn = callbackFnArray[i];\n\t\t\t\t\t\tcallbackFn(val);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* If JQuery exists, trigger JQuery events */\n\t\t\t\tif ($) {\n\t\t\t\t\tthis._triggerJQueryEvent(evt, val);\n\t\t\t\t}\n\t\t\t},\n\t\t\t_triggerJQueryEvent: function _triggerJQueryEvent(evt, val) {\n\t\t\t\tvar eventData = {\n\t\t\t\t\ttype: evt,\n\t\t\t\t\tvalue: val\n\t\t\t\t};\n\t\t\t\tthis.$element.trigger(eventData);\n\t\t\t\tthis.$sliderElem.trigger(eventData);\n\t\t\t},\n\t\t\t_unbindJQueryEventHandlers: function _unbindJQueryEventHandlers() {\n\t\t\t\tthis.$element.off();\n\t\t\t\tthis.$sliderElem.off();\n\t\t\t},\n\t\t\t_setText: function _setText(element, text) {\n\t\t\t\tif (typeof element.textContent !== \"undefined\") {\n\t\t\t\t\telement.textContent = text;\n\t\t\t\t} else if (typeof element.innerText !== \"undefined\") {\n\t\t\t\t\telement.innerText = text;\n\t\t\t\t}\n\t\t\t},\n\t\t\t_removeClass: function _removeClass(element, classString) {\n\t\t\t\tvar classes = classString.split(\" \");\n\t\t\t\tvar newClasses = element.className;\n\n\t\t\t\tfor (var i = 0; i < classes.length; i++) {\n\t\t\t\t\tvar classTag = classes[i];\n\t\t\t\t\tvar regex = new RegExp(\"(?:\\\\s|^)\" + classTag + \"(?:\\\\s|$)\");\n\t\t\t\t\tnewClasses = newClasses.replace(regex, \" \");\n\t\t\t\t}\n\n\t\t\t\telement.className = newClasses.trim();\n\t\t\t},\n\t\t\t_addClass: function _addClass(element, classString) {\n\t\t\t\tvar classes = classString.split(\" \");\n\t\t\t\tvar newClasses = element.className;\n\n\t\t\t\tfor (var i = 0; i < classes.length; i++) {\n\t\t\t\t\tvar classTag = classes[i];\n\t\t\t\t\tvar regex = new RegExp(\"(?:\\\\s|^)\" + classTag + \"(?:\\\\s|$)\");\n\t\t\t\t\tvar ifClassExists = regex.test(newClasses);\n\n\t\t\t\t\tif (!ifClassExists) {\n\t\t\t\t\t\tnewClasses += \" \" + classTag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telement.className = newClasses.trim();\n\t\t\t},\n\t\t\t_offsetLeft: function _offsetLeft(obj) {\n\t\t\t\treturn obj.getBoundingClientRect().left;\n\t\t\t},\n\t\t\t_offsetRight: function _offsetRight(obj) {\n\t\t\t\treturn obj.getBoundingClientRect().right;\n\t\t\t},\n\t\t\t_offsetTop: function _offsetTop(obj) {\n\t\t\t\tvar offsetTop = obj.offsetTop;\n\t\t\t\twhile ((obj = obj.offsetParent) && !isNaN(obj.offsetTop)) {\n\t\t\t\t\toffsetTop += obj.offsetTop;\n\t\t\t\t\tif (obj.tagName !== 'BODY') {\n\t\t\t\t\t\toffsetTop -= obj.scrollTop;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn offsetTop;\n\t\t\t},\n\t\t\t_offset: function _offset(obj) {\n\t\t\t\treturn {\n\t\t\t\t\tleft: this._offsetLeft(obj),\n\t\t\t\t\tright: this._offsetRight(obj),\n\t\t\t\t\ttop: this._offsetTop(obj)\n\t\t\t\t};\n\t\t\t},\n\t\t\t_css: function _css(elementRef, styleName, value) {\n\t\t\t\tif ($) {\n\t\t\t\t\t$.style(elementRef, styleName, value);\n\t\t\t\t} else {\n\t\t\t\t\tvar style = styleName.replace(/^-ms-/, \"ms-\").replace(/-([\\da-z])/gi, function (all, letter) {\n\t\t\t\t\t\treturn letter.toUpperCase();\n\t\t\t\t\t});\n\t\t\t\t\telementRef.style[style] = value;\n\t\t\t\t}\n\t\t\t},\n\t\t\t_toValue: function _toValue(percentage) {\n\t\t\t\treturn this.options.scale.toValue.apply(this, [percentage]);\n\t\t\t},\n\t\t\t_toPercentage: function _toPercentage(value) {\n\t\t\t\treturn this.options.scale.toPercentage.apply(this, [value]);\n\t\t\t},\n\t\t\t_setTooltipPosition: function _setTooltipPosition() {\n\t\t\t\tvar tooltips = [this.tooltip, this.tooltip_min, this.tooltip_max];\n\t\t\t\tif (this.options.orientation === 'vertical') {\n\t\t\t\t\tvar tooltipPos;\n\t\t\t\t\tif (this.options.tooltip_position) {\n\t\t\t\t\t\ttooltipPos = this.options.tooltip_position;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (this.options.rtl) {\n\t\t\t\t\t\t\ttooltipPos = 'left';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttooltipPos = 'right';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar oppositeSide = tooltipPos === 'left' ? 'right' : 'left';\n\t\t\t\t\ttooltips.forEach(function (tooltip) {\n\t\t\t\t\t\tthis._addClass(tooltip, tooltipPos);\n\t\t\t\t\t\ttooltip.style[oppositeSide] = '100%';\n\t\t\t\t\t}.bind(this));\n\t\t\t\t} else if (this.options.tooltip_position === 'bottom') {\n\t\t\t\t\ttooltips.forEach(function (tooltip) {\n\t\t\t\t\t\tthis._addClass(tooltip, 'bottom');\n\t\t\t\t\t\ttooltip.style.top = 22 + 'px';\n\t\t\t\t\t}.bind(this));\n\t\t\t\t} else {\n\t\t\t\t\ttooltips.forEach(function (tooltip) {\n\t\t\t\t\t\tthis._addClass(tooltip, 'top');\n\t\t\t\t\t\ttooltip.style.top = -this.tooltip.outerHeight - 14 + 'px';\n\t\t\t\t\t}.bind(this));\n\t\t\t\t}\n\t\t\t},\n\t\t\t_getClosestTickIndex: function _getClosestTickIndex(val) {\n\t\t\t\tvar difference = Math.abs(val - this.options.ticks[0]);\n\t\t\t\tvar index = 0;\n\t\t\t\tfor (var i = 0; i < this.options.ticks.length; ++i) {\n\t\t\t\t\tvar d = Math.abs(val - this.options.ticks[i]);\n\t\t\t\t\tif (d < difference) {\n\t\t\t\t\t\tdifference = d;\n\t\t\t\t\t\tindex = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn index;\n\t\t\t},\n\t\t\t/**\n    * Attempts to find the index in `ticks[]` the slider values are set at.\n    * The indexes can be -1 to indicate the slider value is not set at a value in `ticks[]`.\n    */\n\t\t\t_setTickIndex: function _setTickIndex() {\n\t\t\t\tif (this.ticksAreValid) {\n\t\t\t\t\tthis._state.tickIndex = [this.options.ticks.indexOf(this._state.value[0]), this.options.ticks.indexOf(this._state.value[1])];\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t/*********************************\n  \t\tAttach to global namespace\n  \t*********************************/\n\t\tif ($ && $.fn) {\n\t\t\tif (!$.fn.slider) {\n\t\t\t\t$.bridget(NAMESPACE_MAIN, Slider);\n\t\t\t\tautoRegisterNamespace = NAMESPACE_MAIN;\n\t\t\t} else {\n\t\t\t\tif (windowIsDefined) {\n\t\t\t\t\twindow.console.warn(\"bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.\");\n\t\t\t\t}\n\t\t\t\tautoRegisterNamespace = NAMESPACE_ALTERNATE;\n\t\t\t}\n\t\t\t$.bridget(NAMESPACE_ALTERNATE, Slider);\n\n\t\t\t// Auto-Register data-provide=\"slider\" Elements\n\t\t\t$(function () {\n\t\t\t\t$(\"input[data-provide=slider]\")[autoRegisterNamespace]();\n\t\t\t});\n\t\t}\n\t})($);\n\n\treturn Slider;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL2Jvb3RzdHJhcC1zbGlkZXIvZGlzdC9ib290c3RyYXAtc2xpZGVyLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4uL25vZGVfbW9kdWxlcy9ib290c3RyYXAtc2xpZGVyL2Rpc3QvYm9vdHN0cmFwLXNsaWRlci5qcz9iOWM4Il0sInNvdXJjZXNDb250ZW50IjpbIi8qISA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAgICAgICAgICAgICAgICAgICAgVkVSU0lPTiAgMTAuNi4yICAgICAgICAgICAgICBcbj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqL1xuXCJ1c2Ugc3RyaWN0XCI7XG5cbnZhciBfdHlwZW9mID0gdHlwZW9mIFN5bWJvbCA9PT0gXCJmdW5jdGlvblwiICYmIHR5cGVvZiBTeW1ib2wuaXRlcmF0b3IgPT09IFwic3ltYm9sXCIgPyBmdW5jdGlvbiAob2JqKSB7IHJldHVybiB0eXBlb2Ygb2JqOyB9IDogZnVuY3Rpb24gKG9iaikgeyByZXR1cm4gb2JqICYmIHR5cGVvZiBTeW1ib2wgPT09IFwiZnVuY3Rpb25cIiAmJiBvYmouY29uc3RydWN0b3IgPT09IFN5bWJvbCAmJiBvYmogIT09IFN5bWJvbC5wcm90b3R5cGUgPyBcInN5bWJvbFwiIDogdHlwZW9mIG9iajsgfTtcblxuLyohID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogYm9vdHN0cmFwLXNsaWRlci5qc1xuICpcbiAqIE1haW50YWluZXJzOlxuICpcdFx0S3lsZSBLZW1wXG4gKlx0XHRcdC0gVHdpdHRlcjogQHNlaXlyaWFcbiAqXHRcdFx0LSBHaXRodW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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/bootstrap-slider/dist/bootstrap-slider.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/bootstrap/dist/js/bootstrap.js":
-/*!******************************************************!*\
-  !*** ../node_modules/bootstrap/dist/js/bootstrap.js ***!
-  \******************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-eval("/*!\n  * Bootstrap v4.4.1 (https://getbootstrap.com/)\n  * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n  */\n(function (global, factory) {\n   true ? factory(exports, __webpack_require__(/*! jquery */ \"../node_modules/jquery/dist/jquery.js\"), __webpack_require__(/*! popper.js */ \"../node_modules/popper.js/dist/esm/popper.js\")) :\n  undefined;\n}(this, (function (exports, $, Popper) { 'use strict';\n\n  $ = $ && $.hasOwnProperty('default') ? $['default'] : $;\n  Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;\n\n  function _defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, descriptor.key, descriptor);\n    }\n  }\n\n  function _createClass(Constructor, protoProps, staticProps) {\n    if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) _defineProperties(Constructor, staticProps);\n    return Constructor;\n  }\n\n  function _defineProperty(obj, key, value) {\n    if (key in obj) {\n      Object.defineProperty(obj, key, {\n        value: value,\n        enumerable: true,\n        configurable: true,\n        writable: true\n      });\n    } else {\n      obj[key] = value;\n    }\n\n    return obj;\n  }\n\n  function ownKeys(object, enumerableOnly) {\n    var keys = Object.keys(object);\n\n    if (Object.getOwnPropertySymbols) {\n      var symbols = Object.getOwnPropertySymbols(object);\n      if (enumerableOnly) symbols = symbols.filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n      keys.push.apply(keys, symbols);\n    }\n\n    return keys;\n  }\n\n  function _objectSpread2(target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i] != null ? arguments[i] : {};\n\n      if (i % 2) {\n        ownKeys(Object(source), true).forEach(function (key) {\n          _defineProperty(target, key, source[key]);\n        });\n      } else if (Object.getOwnPropertyDescriptors) {\n        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n      } else {\n        ownKeys(Object(source)).forEach(function (key) {\n          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n        });\n      }\n    }\n\n    return target;\n  }\n\n  function _inheritsLoose(subClass, superClass) {\n    subClass.prototype = Object.create(superClass.prototype);\n    subClass.prototype.constructor = subClass;\n    subClass.__proto__ = superClass;\n  }\n\n  /**\n   * --------------------------------------------------------------------------\n   * Bootstrap (v4.4.1): util.js\n   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n   * --------------------------------------------------------------------------\n   */\n  /**\n   * ------------------------------------------------------------------------\n   * Private TransitionEnd Helpers\n   * ------------------------------------------------------------------------\n   */\n\n  var TRANSITION_END = 'transitionend';\n  var MAX_UID = 1000000;\n  var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)\n\n  function toType(obj) {\n    return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase();\n  }\n\n  function getSpecialTransitionEndEvent() {\n    return {\n      bindType: TRANSITION_END,\n      delegateType: TRANSITION_END,\n      handle: function handle(event) {\n        if ($(event.target).is(this)) {\n          return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params\n        }\n\n        return undefined; // eslint-disable-line no-undefined\n      }\n    };\n  }\n\n  function transitionEndEmulator(duration) {\n    var _this = this;\n\n    var called = false;\n    $(this).one(Util.TRANSITION_END, function () {\n      called = true;\n    });\n    setTimeout(function () {\n      if (!called) {\n        Util.triggerTransitionEnd(_this);\n      }\n    }, duration);\n    return this;\n  }\n\n  function setTransitionEndSupport() {\n    $.fn.emulateTransitionEnd = transitionEndEmulator;\n    $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();\n  }\n  /**\n   * --------------------------------------------------------------------------\n   * Public Util Api\n   * --------------------------------------------------------------------------\n   */\n\n\n  var Util = {\n    TRANSITION_END: 'bsTransitionEnd',\n    getUID: function getUID(prefix) {\n      do {\n        // eslint-disable-next-line no-bitwise\n        prefix += ~~(Math.random() * MAX_UID); // \"~~\" acts like a faster Math.floor() here\n      } while (document.getElementById(prefix));\n\n      return prefix;\n    },\n    getSelectorFromElement: function getSelectorFromElement(element) {\n      var selector = element.getAttribute('data-target');\n\n      if (!selector || selector === '#') {\n        var hrefAttr = element.getAttribute('href');\n        selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';\n      }\n\n      try {\n        return document.querySelector(selector) ? selector : null;\n      } catch (err) {\n        return null;\n      }\n    },\n    getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {\n      if (!element) {\n        return 0;\n      } // Get transition-duration of the element\n\n\n      var transitionDuration = $(element).css('transition-duration');\n      var transitionDelay = $(element).css('transition-delay');\n      var floatTransitionDuration = parseFloat(transitionDuration);\n      var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n      if (!floatTransitionDuration && !floatTransitionDelay) {\n        return 0;\n      } // If multiple durations are defined, take the first\n\n\n      transitionDuration = transitionDuration.split(',')[0];\n      transitionDelay = transitionDelay.split(',')[0];\n      return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n    },\n    reflow: function reflow(element) {\n      return element.offsetHeight;\n    },\n    triggerTransitionEnd: function triggerTransitionEnd(element) {\n      $(element).trigger(TRANSITION_END);\n    },\n    // TODO: Remove in v5\n    supportsTransitionEnd: function supportsTransitionEnd() {\n      return Boolean(TRANSITION_END);\n    },\n    isElement: function isElement(obj) {\n      return (obj[0] || obj).nodeType;\n    },\n    typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {\n      for (var property in configTypes) {\n        if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n          var expectedTypes = configTypes[property];\n          var value = config[property];\n          var valueType = value && Util.isElement(value) ? 'element' : toType(value);\n\n          if (!new RegExp(expectedTypes).test(valueType)) {\n            throw new Error(componentName.toUpperCase() + \": \" + (\"Option \\\"\" + property + \"\\\" provided type \\\"\" + valueType + \"\\\" \") + (\"but expected type \\\"\" + expectedTypes + \"\\\".\"));\n          }\n        }\n      }\n    },\n    findShadowRoot: function findShadowRoot(element) {\n      if (!document.documentElement.attachShadow) {\n        return null;\n      } // Can find the shadow root otherwise it'll return the document\n\n\n      if (typeof element.getRootNode === 'function') {\n        var root = element.getRootNode();\n        return root instanceof ShadowRoot ? root : null;\n      }\n\n      if (element instanceof ShadowRoot) {\n        return element;\n      } // when we don't find a shadow root\n\n\n      if (!element.parentNode) {\n        return null;\n      }\n\n      return Util.findShadowRoot(element.parentNode);\n    },\n    jQueryDetection: function jQueryDetection() {\n      if (typeof $ === 'undefined') {\n        throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.');\n      }\n\n      var version = $.fn.jquery.split(' ')[0].split('.');\n      var minMajor = 1;\n      var ltMajor = 2;\n      var minMinor = 9;\n      var minPatch = 1;\n      var maxMajor = 4;\n\n      if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n        throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');\n      }\n    }\n  };\n  Util.jQueryDetection();\n  setTransitionEndSupport();\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME = 'alert';\n  var VERSION = '4.4.1';\n  var DATA_KEY = 'bs.alert';\n  var EVENT_KEY = \".\" + DATA_KEY;\n  var DATA_API_KEY = '.data-api';\n  var JQUERY_NO_CONFLICT = $.fn[NAME];\n  var Selector = {\n    DISMISS: '[data-dismiss=\"alert\"]'\n  };\n  var Event = {\n    CLOSE: \"close\" + EVENT_KEY,\n    CLOSED: \"closed\" + EVENT_KEY,\n    CLICK_DATA_API: \"click\" + EVENT_KEY + DATA_API_KEY\n  };\n  var ClassName = {\n    ALERT: 'alert',\n    FADE: 'fade',\n    SHOW: 'show'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Alert =\n  /*#__PURE__*/\n  function () {\n    function Alert(element) {\n      this._element = element;\n    } // Getters\n\n\n    var _proto = Alert.prototype;\n\n    // Public\n    _proto.close = function close(element) {\n      var rootElement = this._element;\n\n      if (element) {\n        rootElement = this._getRootElement(element);\n      }\n\n      var customEvent = this._triggerCloseEvent(rootElement);\n\n      if (customEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      this._removeElement(rootElement);\n    };\n\n    _proto.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY);\n      this._element = null;\n    } // Private\n    ;\n\n    _proto._getRootElement = function _getRootElement(element) {\n      var selector = Util.getSelectorFromElement(element);\n      var parent = false;\n\n      if (selector) {\n        parent = document.querySelector(selector);\n      }\n\n      if (!parent) {\n        parent = $(element).closest(\".\" + ClassName.ALERT)[0];\n      }\n\n      return parent;\n    };\n\n    _proto._triggerCloseEvent = function _triggerCloseEvent(element) {\n      var closeEvent = $.Event(Event.CLOSE);\n      $(element).trigger(closeEvent);\n      return closeEvent;\n    };\n\n    _proto._removeElement = function _removeElement(element) {\n      var _this = this;\n\n      $(element).removeClass(ClassName.SHOW);\n\n      if (!$(element).hasClass(ClassName.FADE)) {\n        this._destroyElement(element);\n\n        return;\n      }\n\n      var transitionDuration = Util.getTransitionDurationFromElement(element);\n      $(element).one(Util.TRANSITION_END, function (event) {\n        return _this._destroyElement(element, event);\n      }).emulateTransitionEnd(transitionDuration);\n    };\n\n    _proto._destroyElement = function _destroyElement(element) {\n      $(element).detach().trigger(Event.CLOSED).remove();\n    } // Static\n    ;\n\n    Alert._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var $element = $(this);\n        var data = $element.data(DATA_KEY);\n\n        if (!data) {\n          data = new Alert(this);\n          $element.data(DATA_KEY, data);\n        }\n\n        if (config === 'close') {\n          data[config](this);\n        }\n      });\n    };\n\n    Alert._handleDismiss = function _handleDismiss(alertInstance) {\n      return function (event) {\n        if (event) {\n          event.preventDefault();\n        }\n\n        alertInstance.close(this);\n      };\n    };\n\n    _createClass(Alert, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION;\n      }\n    }]);\n\n    return Alert;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME] = Alert._jQueryInterface;\n  $.fn[NAME].Constructor = Alert;\n\n  $.fn[NAME].noConflict = function () {\n    $.fn[NAME] = JQUERY_NO_CONFLICT;\n    return Alert._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$1 = 'button';\n  var VERSION$1 = '4.4.1';\n  var DATA_KEY$1 = 'bs.button';\n  var EVENT_KEY$1 = \".\" + DATA_KEY$1;\n  var DATA_API_KEY$1 = '.data-api';\n  var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];\n  var ClassName$1 = {\n    ACTIVE: 'active',\n    BUTTON: 'btn',\n    FOCUS: 'focus'\n  };\n  var Selector$1 = {\n    DATA_TOGGLE_CARROT: '[data-toggle^=\"button\"]',\n    DATA_TOGGLES: '[data-toggle=\"buttons\"]',\n    DATA_TOGGLE: '[data-toggle=\"button\"]',\n    DATA_TOGGLES_BUTTONS: '[data-toggle=\"buttons\"] .btn',\n    INPUT: 'input:not([type=\"hidden\"])',\n    ACTIVE: '.active',\n    BUTTON: '.btn'\n  };\n  var Event$1 = {\n    CLICK_DATA_API: \"click\" + EVENT_KEY$1 + DATA_API_KEY$1,\n    FOCUS_BLUR_DATA_API: \"focus\" + EVENT_KEY$1 + DATA_API_KEY$1 + \" \" + (\"blur\" + EVENT_KEY$1 + DATA_API_KEY$1),\n    LOAD_DATA_API: \"load\" + EVENT_KEY$1 + DATA_API_KEY$1\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Button =\n  /*#__PURE__*/\n  function () {\n    function Button(element) {\n      this._element = element;\n    } // Getters\n\n\n    var _proto = Button.prototype;\n\n    // Public\n    _proto.toggle = function toggle() {\n      var triggerChangeEvent = true;\n      var addAriaPressed = true;\n      var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLES)[0];\n\n      if (rootElement) {\n        var input = this._element.querySelector(Selector$1.INPUT);\n\n        if (input) {\n          if (input.type === 'radio') {\n            if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {\n              triggerChangeEvent = false;\n            } else {\n              var activeElement = rootElement.querySelector(Selector$1.ACTIVE);\n\n              if (activeElement) {\n                $(activeElement).removeClass(ClassName$1.ACTIVE);\n              }\n            }\n          } else if (input.type === 'checkbox') {\n            if (this._element.tagName === 'LABEL' && input.checked === this._element.classList.contains(ClassName$1.ACTIVE)) {\n              triggerChangeEvent = false;\n            }\n          } else {\n            // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input\n            triggerChangeEvent = false;\n          }\n\n          if (triggerChangeEvent) {\n            input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);\n            $(input).trigger('change');\n          }\n\n          input.focus();\n          addAriaPressed = false;\n        }\n      }\n\n      if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {\n        if (addAriaPressed) {\n          this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));\n        }\n\n        if (triggerChangeEvent) {\n          $(this._element).toggleClass(ClassName$1.ACTIVE);\n        }\n      }\n    };\n\n    _proto.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY$1);\n      this._element = null;\n    } // Static\n    ;\n\n    Button._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY$1);\n\n        if (!data) {\n          data = new Button(this);\n          $(this).data(DATA_KEY$1, data);\n        }\n\n        if (config === 'toggle') {\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Button, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$1;\n      }\n    }]);\n\n    return Button;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {\n    var button = event.target;\n\n    if (!$(button).hasClass(ClassName$1.BUTTON)) {\n      button = $(button).closest(Selector$1.BUTTON)[0];\n    }\n\n    if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {\n      event.preventDefault(); // work around Firefox bug #1540995\n    } else {\n      var inputBtn = button.querySelector(Selector$1.INPUT);\n\n      if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {\n        event.preventDefault(); // work around Firefox bug #1540995\n\n        return;\n      }\n\n      Button._jQueryInterface.call($(button), 'toggle');\n    }\n  }).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {\n    var button = $(event.target).closest(Selector$1.BUTTON)[0];\n    $(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type));\n  });\n  $(window).on(Event$1.LOAD_DATA_API, function () {\n    // ensure correct active class is set to match the controls' actual values/states\n    // find all checkboxes/readio buttons inside data-toggle groups\n    var buttons = [].slice.call(document.querySelectorAll(Selector$1.DATA_TOGGLES_BUTTONS));\n\n    for (var i = 0, len = buttons.length; i < len; i++) {\n      var button = buttons[i];\n      var input = button.querySelector(Selector$1.INPUT);\n\n      if (input.checked || input.hasAttribute('checked')) {\n        button.classList.add(ClassName$1.ACTIVE);\n      } else {\n        button.classList.remove(ClassName$1.ACTIVE);\n      }\n    } // find all button toggles\n\n\n    buttons = [].slice.call(document.querySelectorAll(Selector$1.DATA_TOGGLE));\n\n    for (var _i = 0, _len = buttons.length; _i < _len; _i++) {\n      var _button = buttons[_i];\n\n      if (_button.getAttribute('aria-pressed') === 'true') {\n        _button.classList.add(ClassName$1.ACTIVE);\n      } else {\n        _button.classList.remove(ClassName$1.ACTIVE);\n      }\n    }\n  });\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME$1] = Button._jQueryInterface;\n  $.fn[NAME$1].Constructor = Button;\n\n  $.fn[NAME$1].noConflict = function () {\n    $.fn[NAME$1] = JQUERY_NO_CONFLICT$1;\n    return Button._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$2 = 'carousel';\n  var VERSION$2 = '4.4.1';\n  var DATA_KEY$2 = 'bs.carousel';\n  var EVENT_KEY$2 = \".\" + DATA_KEY$2;\n  var DATA_API_KEY$2 = '.data-api';\n  var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];\n  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key\n\n  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key\n\n  var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\n  var SWIPE_THRESHOLD = 40;\n  var Default = {\n    interval: 5000,\n    keyboard: true,\n    slide: false,\n    pause: 'hover',\n    wrap: true,\n    touch: true\n  };\n  var DefaultType = {\n    interval: '(number|boolean)',\n    keyboard: 'boolean',\n    slide: '(boolean|string)',\n    pause: '(string|boolean)',\n    wrap: 'boolean',\n    touch: 'boolean'\n  };\n  var Direction = {\n    NEXT: 'next',\n    PREV: 'prev',\n    LEFT: 'left',\n    RIGHT: 'right'\n  };\n  var Event$2 = {\n    SLIDE: \"slide\" + EVENT_KEY$2,\n    SLID: \"slid\" + EVENT_KEY$2,\n    KEYDOWN: \"keydown\" + EVENT_KEY$2,\n    MOUSEENTER: \"mouseenter\" + EVENT_KEY$2,\n    MOUSELEAVE: \"mouseleave\" + EVENT_KEY$2,\n    TOUCHSTART: \"touchstart\" + EVENT_KEY$2,\n    TOUCHMOVE: \"touchmove\" + EVENT_KEY$2,\n    TOUCHEND: \"touchend\" + EVENT_KEY$2,\n    POINTERDOWN: \"pointerdown\" + EVENT_KEY$2,\n    POINTERUP: \"pointerup\" + EVENT_KEY$2,\n    DRAG_START: \"dragstart\" + EVENT_KEY$2,\n    LOAD_DATA_API: \"load\" + EVENT_KEY$2 + DATA_API_KEY$2,\n    CLICK_DATA_API: \"click\" + EVENT_KEY$2 + DATA_API_KEY$2\n  };\n  var ClassName$2 = {\n    CAROUSEL: 'carousel',\n    ACTIVE: 'active',\n    SLIDE: 'slide',\n    RIGHT: 'carousel-item-right',\n    LEFT: 'carousel-item-left',\n    NEXT: 'carousel-item-next',\n    PREV: 'carousel-item-prev',\n    ITEM: 'carousel-item',\n    POINTER_EVENT: 'pointer-event'\n  };\n  var Selector$2 = {\n    ACTIVE: '.active',\n    ACTIVE_ITEM: '.active.carousel-item',\n    ITEM: '.carousel-item',\n    ITEM_IMG: '.carousel-item img',\n    NEXT_PREV: '.carousel-item-next, .carousel-item-prev',\n    INDICATORS: '.carousel-indicators',\n    DATA_SLIDE: '[data-slide], [data-slide-to]',\n    DATA_RIDE: '[data-ride=\"carousel\"]'\n  };\n  var PointerType = {\n    TOUCH: 'touch',\n    PEN: 'pen'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Carousel =\n  /*#__PURE__*/\n  function () {\n    function Carousel(element, config) {\n      this._items = null;\n      this._interval = null;\n      this._activeElement = null;\n      this._isPaused = false;\n      this._isSliding = false;\n      this.touchTimeout = null;\n      this.touchStartX = 0;\n      this.touchDeltaX = 0;\n      this._config = this._getConfig(config);\n      this._element = element;\n      this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS);\n      this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n      this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);\n\n      this._addEventListeners();\n    } // Getters\n\n\n    var _proto = Carousel.prototype;\n\n    // Public\n    _proto.next = function next() {\n      if (!this._isSliding) {\n        this._slide(Direction.NEXT);\n      }\n    };\n\n    _proto.nextWhenVisible = function nextWhenVisible() {\n      // Don't call next when the page isn't visible\n      // or the carousel or its parent isn't visible\n      if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {\n        this.next();\n      }\n    };\n\n    _proto.prev = function prev() {\n      if (!this._isSliding) {\n        this._slide(Direction.PREV);\n      }\n    };\n\n    _proto.pause = function pause(event) {\n      if (!event) {\n        this._isPaused = true;\n      }\n\n      if (this._element.querySelector(Selector$2.NEXT_PREV)) {\n        Util.triggerTransitionEnd(this._element);\n        this.cycle(true);\n      }\n\n      clearInterval(this._interval);\n      this._interval = null;\n    };\n\n    _proto.cycle = function cycle(event) {\n      if (!event) {\n        this._isPaused = false;\n      }\n\n      if (this._interval) {\n        clearInterval(this._interval);\n        this._interval = null;\n      }\n\n      if (this._config.interval && !this._isPaused) {\n        this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);\n      }\n    };\n\n    _proto.to = function to(index) {\n      var _this = this;\n\n      this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);\n\n      var activeIndex = this._getItemIndex(this._activeElement);\n\n      if (index > this._items.length - 1 || index < 0) {\n        return;\n      }\n\n      if (this._isSliding) {\n        $(this._element).one(Event$2.SLID, function () {\n          return _this.to(index);\n        });\n        return;\n      }\n\n      if (activeIndex === index) {\n        this.pause();\n        this.cycle();\n        return;\n      }\n\n      var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;\n\n      this._slide(direction, this._items[index]);\n    };\n\n    _proto.dispose = function dispose() {\n      $(this._element).off(EVENT_KEY$2);\n      $.removeData(this._element, DATA_KEY$2);\n      this._items = null;\n      this._config = null;\n      this._element = null;\n      this._interval = null;\n      this._isPaused = null;\n      this._isSliding = null;\n      this._activeElement = null;\n      this._indicatorsElement = null;\n    } // Private\n    ;\n\n    _proto._getConfig = function _getConfig(config) {\n      config = _objectSpread2({}, Default, {}, config);\n      Util.typeCheckConfig(NAME$2, config, DefaultType);\n      return config;\n    };\n\n    _proto._handleSwipe = function _handleSwipe() {\n      var absDeltax = Math.abs(this.touchDeltaX);\n\n      if (absDeltax <= SWIPE_THRESHOLD) {\n        return;\n      }\n\n      var direction = absDeltax / this.touchDeltaX;\n      this.touchDeltaX = 0; // swipe left\n\n      if (direction > 0) {\n        this.prev();\n      } // swipe right\n\n\n      if (direction < 0) {\n        this.next();\n      }\n    };\n\n    _proto._addEventListeners = function _addEventListeners() {\n      var _this2 = this;\n\n      if (this._config.keyboard) {\n        $(this._element).on(Event$2.KEYDOWN, function (event) {\n          return _this2._keydown(event);\n        });\n      }\n\n      if (this._config.pause === 'hover') {\n        $(this._element).on(Event$2.MOUSEENTER, function (event) {\n          return _this2.pause(event);\n        }).on(Event$2.MOUSELEAVE, function (event) {\n          return _this2.cycle(event);\n        });\n      }\n\n      if (this._config.touch) {\n        this._addTouchEventListeners();\n      }\n    };\n\n    _proto._addTouchEventListeners = function _addTouchEventListeners() {\n      var _this3 = this;\n\n      if (!this._touchSupported) {\n        return;\n      }\n\n      var start = function start(event) {\n        if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n          _this3.touchStartX = event.originalEvent.clientX;\n        } else if (!_this3._pointerEvent) {\n          _this3.touchStartX = event.originalEvent.touches[0].clientX;\n        }\n      };\n\n      var move = function move(event) {\n        // ensure swiping with one touch and not pinching\n        if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {\n          _this3.touchDeltaX = 0;\n        } else {\n          _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;\n        }\n      };\n\n      var end = function end(event) {\n        if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n          _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;\n        }\n\n        _this3._handleSwipe();\n\n        if (_this3._config.pause === 'hover') {\n          // If it's a touch-enabled device, mouseenter/leave are fired as\n          // part of the mouse compatibility events on first tap - the carousel\n          // would stop cycling until user tapped out of it;\n          // here, we listen for touchend, explicitly pause the carousel\n          // (as if it's the second time we tap on it, mouseenter compat event\n          // is NOT fired) and after a timeout (to allow for mouse compatibility\n          // events to fire) we explicitly restart cycling\n          _this3.pause();\n\n          if (_this3.touchTimeout) {\n            clearTimeout(_this3.touchTimeout);\n          }\n\n          _this3.touchTimeout = setTimeout(function (event) {\n            return _this3.cycle(event);\n          }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);\n        }\n      };\n\n      $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) {\n        return e.preventDefault();\n      });\n\n      if (this._pointerEvent) {\n        $(this._element).on(Event$2.POINTERDOWN, function (event) {\n          return start(event);\n        });\n        $(this._element).on(Event$2.POINTERUP, function (event) {\n          return end(event);\n        });\n\n        this._element.classList.add(ClassName$2.POINTER_EVENT);\n      } else {\n        $(this._element).on(Event$2.TOUCHSTART, function (event) {\n          return start(event);\n        });\n        $(this._element).on(Event$2.TOUCHMOVE, function (event) {\n          return move(event);\n        });\n        $(this._element).on(Event$2.TOUCHEND, function (event) {\n          return end(event);\n        });\n      }\n    };\n\n    _proto._keydown = function _keydown(event) {\n      if (/input|textarea/i.test(event.target.tagName)) {\n        return;\n      }\n\n      switch (event.which) {\n        case ARROW_LEFT_KEYCODE:\n          event.preventDefault();\n          this.prev();\n          break;\n\n        case ARROW_RIGHT_KEYCODE:\n          event.preventDefault();\n          this.next();\n          break;\n      }\n    };\n\n    _proto._getItemIndex = function _getItemIndex(element) {\n      this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : [];\n      return this._items.indexOf(element);\n    };\n\n    _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {\n      var isNextDirection = direction === Direction.NEXT;\n      var isPrevDirection = direction === Direction.PREV;\n\n      var activeIndex = this._getItemIndex(activeElement);\n\n      var lastItemIndex = this._items.length - 1;\n      var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;\n\n      if (isGoingToWrap && !this._config.wrap) {\n        return activeElement;\n      }\n\n      var delta = direction === Direction.PREV ? -1 : 1;\n      var itemIndex = (activeIndex + delta) % this._items.length;\n      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];\n    };\n\n    _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {\n      var targetIndex = this._getItemIndex(relatedTarget);\n\n      var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM));\n\n      var slideEvent = $.Event(Event$2.SLIDE, {\n        relatedTarget: relatedTarget,\n        direction: eventDirectionName,\n        from: fromIndex,\n        to: targetIndex\n      });\n      $(this._element).trigger(slideEvent);\n      return slideEvent;\n    };\n\n    _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {\n      if (this._indicatorsElement) {\n        var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE));\n        $(indicators).removeClass(ClassName$2.ACTIVE);\n\n        var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];\n\n        if (nextIndicator) {\n          $(nextIndicator).addClass(ClassName$2.ACTIVE);\n        }\n      }\n    };\n\n    _proto._slide = function _slide(direction, element) {\n      var _this4 = this;\n\n      var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);\n\n      var activeElementIndex = this._getItemIndex(activeElement);\n\n      var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);\n\n      var nextElementIndex = this._getItemIndex(nextElement);\n\n      var isCycling = Boolean(this._interval);\n      var directionalClassName;\n      var orderClassName;\n      var eventDirectionName;\n\n      if (direction === Direction.NEXT) {\n        directionalClassName = ClassName$2.LEFT;\n        orderClassName = ClassName$2.NEXT;\n        eventDirectionName = Direction.LEFT;\n      } else {\n        directionalClassName = ClassName$2.RIGHT;\n        orderClassName = ClassName$2.PREV;\n        eventDirectionName = Direction.RIGHT;\n      }\n\n      if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) {\n        this._isSliding = false;\n        return;\n      }\n\n      var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);\n\n      if (slideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (!activeElement || !nextElement) {\n        // Some weirdness is happening, so we bail\n        return;\n      }\n\n      this._isSliding = true;\n\n      if (isCycling) {\n        this.pause();\n      }\n\n      this._setActiveIndicatorElement(nextElement);\n\n      var slidEvent = $.Event(Event$2.SLID, {\n        relatedTarget: nextElement,\n        direction: eventDirectionName,\n        from: activeElementIndex,\n        to: nextElementIndex\n      });\n\n      if ($(this._element).hasClass(ClassName$2.SLIDE)) {\n        $(nextElement).addClass(orderClassName);\n        Util.reflow(nextElement);\n        $(activeElement).addClass(directionalClassName);\n        $(nextElement).addClass(directionalClassName);\n        var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);\n\n        if (nextElementInterval) {\n          this._config.defaultInterval = this._config.defaultInterval || this._config.interval;\n          this._config.interval = nextElementInterval;\n        } else {\n          this._config.interval = this._config.defaultInterval || this._config.interval;\n        }\n\n        var transitionDuration = Util.getTransitionDurationFromElement(activeElement);\n        $(activeElement).one(Util.TRANSITION_END, function () {\n          $(nextElement).removeClass(directionalClassName + \" \" + orderClassName).addClass(ClassName$2.ACTIVE);\n          $(activeElement).removeClass(ClassName$2.ACTIVE + \" \" + orderClassName + \" \" + directionalClassName);\n          _this4._isSliding = false;\n          setTimeout(function () {\n            return $(_this4._element).trigger(slidEvent);\n          }, 0);\n        }).emulateTransitionEnd(transitionDuration);\n      } else {\n        $(activeElement).removeClass(ClassName$2.ACTIVE);\n        $(nextElement).addClass(ClassName$2.ACTIVE);\n        this._isSliding = false;\n        $(this._element).trigger(slidEvent);\n      }\n\n      if (isCycling) {\n        this.cycle();\n      }\n    } // Static\n    ;\n\n    Carousel._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY$2);\n\n        var _config = _objectSpread2({}, Default, {}, $(this).data());\n\n        if (typeof config === 'object') {\n          _config = _objectSpread2({}, _config, {}, config);\n        }\n\n        var action = typeof config === 'string' ? config : _config.slide;\n\n        if (!data) {\n          data = new Carousel(this, _config);\n          $(this).data(DATA_KEY$2, data);\n        }\n\n        if (typeof config === 'number') {\n          data.to(config);\n        } else if (typeof action === 'string') {\n          if (typeof data[action] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + action + \"\\\"\");\n          }\n\n          data[action]();\n        } else if (_config.interval && _config.ride) {\n          data.pause();\n          data.cycle();\n        }\n      });\n    };\n\n    Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {\n      var selector = Util.getSelectorFromElement(this);\n\n      if (!selector) {\n        return;\n      }\n\n      var target = $(selector)[0];\n\n      if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) {\n        return;\n      }\n\n      var config = _objectSpread2({}, $(target).data(), {}, $(this).data());\n\n      var slideIndex = this.getAttribute('data-slide-to');\n\n      if (slideIndex) {\n        config.interval = false;\n      }\n\n      Carousel._jQueryInterface.call($(target), config);\n\n      if (slideIndex) {\n        $(target).data(DATA_KEY$2).to(slideIndex);\n      }\n\n      event.preventDefault();\n    };\n\n    _createClass(Carousel, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$2;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default;\n      }\n    }]);\n\n    return Carousel;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);\n  $(window).on(Event$2.LOAD_DATA_API, function () {\n    var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE));\n\n    for (var i = 0, len = carousels.length; i < len; i++) {\n      var $carousel = $(carousels[i]);\n\n      Carousel._jQueryInterface.call($carousel, $carousel.data());\n    }\n  });\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME$2] = Carousel._jQueryInterface;\n  $.fn[NAME$2].Constructor = Carousel;\n\n  $.fn[NAME$2].noConflict = function () {\n    $.fn[NAME$2] = JQUERY_NO_CONFLICT$2;\n    return Carousel._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$3 = 'collapse';\n  var VERSION$3 = '4.4.1';\n  var DATA_KEY$3 = 'bs.collapse';\n  var EVENT_KEY$3 = \".\" + DATA_KEY$3;\n  var DATA_API_KEY$3 = '.data-api';\n  var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];\n  var Default$1 = {\n    toggle: true,\n    parent: ''\n  };\n  var DefaultType$1 = {\n    toggle: 'boolean',\n    parent: '(string|element)'\n  };\n  var Event$3 = {\n    SHOW: \"show\" + EVENT_KEY$3,\n    SHOWN: \"shown\" + EVENT_KEY$3,\n    HIDE: \"hide\" + EVENT_KEY$3,\n    HIDDEN: \"hidden\" + EVENT_KEY$3,\n    CLICK_DATA_API: \"click\" + EVENT_KEY$3 + DATA_API_KEY$3\n  };\n  var ClassName$3 = {\n    SHOW: 'show',\n    COLLAPSE: 'collapse',\n    COLLAPSING: 'collapsing',\n    COLLAPSED: 'collapsed'\n  };\n  var Dimension = {\n    WIDTH: 'width',\n    HEIGHT: 'height'\n  };\n  var Selector$3 = {\n    ACTIVES: '.show, .collapsing',\n    DATA_TOGGLE: '[data-toggle=\"collapse\"]'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Collapse =\n  /*#__PURE__*/\n  function () {\n    function Collapse(element, config) {\n      this._isTransitioning = false;\n      this._element = element;\n      this._config = this._getConfig(config);\n      this._triggerArray = [].slice.call(document.querySelectorAll(\"[data-toggle=\\\"collapse\\\"][href=\\\"#\" + element.id + \"\\\"],\" + (\"[data-toggle=\\\"collapse\\\"][data-target=\\\"#\" + element.id + \"\\\"]\")));\n      var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE));\n\n      for (var i = 0, len = toggleList.length; i < len; i++) {\n        var elem = toggleList[i];\n        var selector = Util.getSelectorFromElement(elem);\n        var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {\n          return foundElem === element;\n        });\n\n        if (selector !== null && filterElement.length > 0) {\n          this._selector = selector;\n\n          this._triggerArray.push(elem);\n        }\n      }\n\n      this._parent = this._config.parent ? this._getParent() : null;\n\n      if (!this._config.parent) {\n        this._addAriaAndCollapsedClass(this._element, this._triggerArray);\n      }\n\n      if (this._config.toggle) {\n        this.toggle();\n      }\n    } // Getters\n\n\n    var _proto = Collapse.prototype;\n\n    // Public\n    _proto.toggle = function toggle() {\n      if ($(this._element).hasClass(ClassName$3.SHOW)) {\n        this.hide();\n      } else {\n        this.show();\n      }\n    };\n\n    _proto.show = function show() {\n      var _this = this;\n\n      if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) {\n        return;\n      }\n\n      var actives;\n      var activesData;\n\n      if (this._parent) {\n        actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) {\n          if (typeof _this._config.parent === 'string') {\n            return elem.getAttribute('data-parent') === _this._config.parent;\n          }\n\n          return elem.classList.contains(ClassName$3.COLLAPSE);\n        });\n\n        if (actives.length === 0) {\n          actives = null;\n        }\n      }\n\n      if (actives) {\n        activesData = $(actives).not(this._selector).data(DATA_KEY$3);\n\n        if (activesData && activesData._isTransitioning) {\n          return;\n        }\n      }\n\n      var startEvent = $.Event(Event$3.SHOW);\n      $(this._element).trigger(startEvent);\n\n      if (startEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (actives) {\n        Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');\n\n        if (!activesData) {\n          $(actives).data(DATA_KEY$3, null);\n        }\n      }\n\n      var dimension = this._getDimension();\n\n      $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING);\n      this._element.style[dimension] = 0;\n\n      if (this._triggerArray.length) {\n        $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true);\n      }\n\n      this.setTransitioning(true);\n\n      var complete = function complete() {\n        $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW);\n        _this._element.style[dimension] = '';\n\n        _this.setTransitioning(false);\n\n        $(_this._element).trigger(Event$3.SHOWN);\n      };\n\n      var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n      var scrollSize = \"scroll\" + capitalizedDimension;\n      var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n      $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n      this._element.style[dimension] = this._element[scrollSize] + \"px\";\n    };\n\n    _proto.hide = function hide() {\n      var _this2 = this;\n\n      if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) {\n        return;\n      }\n\n      var startEvent = $.Event(Event$3.HIDE);\n      $(this._element).trigger(startEvent);\n\n      if (startEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      var dimension = this._getDimension();\n\n      this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + \"px\";\n      Util.reflow(this._element);\n      $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW);\n      var triggerArrayLength = this._triggerArray.length;\n\n      if (triggerArrayLength > 0) {\n        for (var i = 0; i < triggerArrayLength; i++) {\n          var trigger = this._triggerArray[i];\n          var selector = Util.getSelectorFromElement(trigger);\n\n          if (selector !== null) {\n            var $elem = $([].slice.call(document.querySelectorAll(selector)));\n\n            if (!$elem.hasClass(ClassName$3.SHOW)) {\n              $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false);\n            }\n          }\n        }\n      }\n\n      this.setTransitioning(true);\n\n      var complete = function complete() {\n        _this2.setTransitioning(false);\n\n        $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN);\n      };\n\n      this._element.style[dimension] = '';\n      var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n      $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n    };\n\n    _proto.setTransitioning = function setTransitioning(isTransitioning) {\n      this._isTransitioning = isTransitioning;\n    };\n\n    _proto.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY$3);\n      this._config = null;\n      this._parent = null;\n      this._element = null;\n      this._triggerArray = null;\n      this._isTransitioning = null;\n    } // Private\n    ;\n\n    _proto._getConfig = function _getConfig(config) {\n      config = _objectSpread2({}, Default$1, {}, config);\n      config.toggle = Boolean(config.toggle); // Coerce string values\n\n      Util.typeCheckConfig(NAME$3, config, DefaultType$1);\n      return config;\n    };\n\n    _proto._getDimension = function _getDimension() {\n      var hasWidth = $(this._element).hasClass(Dimension.WIDTH);\n      return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;\n    };\n\n    _proto._getParent = function _getParent() {\n      var _this3 = this;\n\n      var parent;\n\n      if (Util.isElement(this._config.parent)) {\n        parent = this._config.parent; // It's a jQuery object\n\n        if (typeof this._config.parent.jquery !== 'undefined') {\n          parent = this._config.parent[0];\n        }\n      } else {\n        parent = document.querySelector(this._config.parent);\n      }\n\n      var selector = \"[data-toggle=\\\"collapse\\\"][data-parent=\\\"\" + this._config.parent + \"\\\"]\";\n      var children = [].slice.call(parent.querySelectorAll(selector));\n      $(children).each(function (i, element) {\n        _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);\n      });\n      return parent;\n    };\n\n    _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {\n      var isOpen = $(element).hasClass(ClassName$3.SHOW);\n\n      if (triggerArray.length) {\n        $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);\n      }\n    } // Static\n    ;\n\n    Collapse._getTargetFromElement = function _getTargetFromElement(element) {\n      var selector = Util.getSelectorFromElement(element);\n      return selector ? document.querySelector(selector) : null;\n    };\n\n    Collapse._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var $this = $(this);\n        var data = $this.data(DATA_KEY$3);\n\n        var _config = _objectSpread2({}, Default$1, {}, $this.data(), {}, typeof config === 'object' && config ? config : {});\n\n        if (!data && _config.toggle && /show|hide/.test(config)) {\n          _config.toggle = false;\n        }\n\n        if (!data) {\n          data = new Collapse(this, _config);\n          $this.data(DATA_KEY$3, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Collapse, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$3;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default$1;\n      }\n    }]);\n\n    return Collapse;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {\n    // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n    if (event.currentTarget.tagName === 'A') {\n      event.preventDefault();\n    }\n\n    var $trigger = $(this);\n    var selector = Util.getSelectorFromElement(this);\n    var selectors = [].slice.call(document.querySelectorAll(selector));\n    $(selectors).each(function () {\n      var $target = $(this);\n      var data = $target.data(DATA_KEY$3);\n      var config = data ? 'toggle' : $trigger.data();\n\n      Collapse._jQueryInterface.call($target, config);\n    });\n  });\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME$3] = Collapse._jQueryInterface;\n  $.fn[NAME$3].Constructor = Collapse;\n\n  $.fn[NAME$3].noConflict = function () {\n    $.fn[NAME$3] = JQUERY_NO_CONFLICT$3;\n    return Collapse._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$4 = 'dropdown';\n  var VERSION$4 = '4.4.1';\n  var DATA_KEY$4 = 'bs.dropdown';\n  var EVENT_KEY$4 = \".\" + DATA_KEY$4;\n  var DATA_API_KEY$4 = '.data-api';\n  var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];\n  var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key\n\n  var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key\n\n  var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key\n\n  var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key\n\n  var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key\n\n  var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)\n\n  var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + \"|\" + ARROW_DOWN_KEYCODE + \"|\" + ESCAPE_KEYCODE);\n  var Event$4 = {\n    HIDE: \"hide\" + EVENT_KEY$4,\n    HIDDEN: \"hidden\" + EVENT_KEY$4,\n    SHOW: \"show\" + EVENT_KEY$4,\n    SHOWN: \"shown\" + EVENT_KEY$4,\n    CLICK: \"click\" + EVENT_KEY$4,\n    CLICK_DATA_API: \"click\" + EVENT_KEY$4 + DATA_API_KEY$4,\n    KEYDOWN_DATA_API: \"keydown\" + EVENT_KEY$4 + DATA_API_KEY$4,\n    KEYUP_DATA_API: \"keyup\" + EVENT_KEY$4 + DATA_API_KEY$4\n  };\n  var ClassName$4 = {\n    DISABLED: 'disabled',\n    SHOW: 'show',\n    DROPUP: 'dropup',\n    DROPRIGHT: 'dropright',\n    DROPLEFT: 'dropleft',\n    MENURIGHT: 'dropdown-menu-right',\n    MENULEFT: 'dropdown-menu-left',\n    POSITION_STATIC: 'position-static'\n  };\n  var Selector$4 = {\n    DATA_TOGGLE: '[data-toggle=\"dropdown\"]',\n    FORM_CHILD: '.dropdown form',\n    MENU: '.dropdown-menu',\n    NAVBAR_NAV: '.navbar-nav',\n    VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n  };\n  var AttachmentMap = {\n    TOP: 'top-start',\n    TOPEND: 'top-end',\n    BOTTOM: 'bottom-start',\n    BOTTOMEND: 'bottom-end',\n    RIGHT: 'right-start',\n    RIGHTEND: 'right-end',\n    LEFT: 'left-start',\n    LEFTEND: 'left-end'\n  };\n  var Default$2 = {\n    offset: 0,\n    flip: true,\n    boundary: 'scrollParent',\n    reference: 'toggle',\n    display: 'dynamic',\n    popperConfig: null\n  };\n  var DefaultType$2 = {\n    offset: '(number|string|function)',\n    flip: 'boolean',\n    boundary: '(string|element)',\n    reference: '(string|element)',\n    display: 'string',\n    popperConfig: '(null|object)'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Dropdown =\n  /*#__PURE__*/\n  function () {\n    function Dropdown(element, config) {\n      this._element = element;\n      this._popper = null;\n      this._config = this._getConfig(config);\n      this._menu = this._getMenuElement();\n      this._inNavbar = this._detectNavbar();\n\n      this._addEventListeners();\n    } // Getters\n\n\n    var _proto = Dropdown.prototype;\n\n    // Public\n    _proto.toggle = function toggle() {\n      if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) {\n        return;\n      }\n\n      var isActive = $(this._menu).hasClass(ClassName$4.SHOW);\n\n      Dropdown._clearMenus();\n\n      if (isActive) {\n        return;\n      }\n\n      this.show(true);\n    };\n\n    _proto.show = function show(usePopper) {\n      if (usePopper === void 0) {\n        usePopper = false;\n      }\n\n      if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) {\n        return;\n      }\n\n      var relatedTarget = {\n        relatedTarget: this._element\n      };\n      var showEvent = $.Event(Event$4.SHOW, relatedTarget);\n\n      var parent = Dropdown._getParentFromElement(this._element);\n\n      $(parent).trigger(showEvent);\n\n      if (showEvent.isDefaultPrevented()) {\n        return;\n      } // Disable totally Popper.js for Dropdown in Navbar\n\n\n      if (!this._inNavbar && usePopper) {\n        /**\n         * Check for Popper dependency\n         * Popper - https://popper.js.org\n         */\n        if (typeof Popper === 'undefined') {\n          throw new TypeError('Bootstrap\\'s dropdowns require Popper.js (https://popper.js.org/)');\n        }\n\n        var referenceElement = this._element;\n\n        if (this._config.reference === 'parent') {\n          referenceElement = parent;\n        } else if (Util.isElement(this._config.reference)) {\n          referenceElement = this._config.reference; // Check if it's jQuery element\n\n          if (typeof this._config.reference.jquery !== 'undefined') {\n            referenceElement = this._config.reference[0];\n          }\n        } // If boundary is not `scrollParent`, then set position to `static`\n        // to allow the menu to \"escape\" the scroll parent's boundaries\n        // https://github.com/twbs/bootstrap/issues/24251\n\n\n        if (this._config.boundary !== 'scrollParent') {\n          $(parent).addClass(ClassName$4.POSITION_STATIC);\n        }\n\n        this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());\n      } // If this is a touch-enabled device we add extra\n      // empty mouseover listeners to the body's immediate children;\n      // only needed because of broken event delegation on iOS\n      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n      if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) {\n        $(document.body).children().on('mouseover', null, $.noop);\n      }\n\n      this._element.focus();\n\n      this._element.setAttribute('aria-expanded', true);\n\n      $(this._menu).toggleClass(ClassName$4.SHOW);\n      $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));\n    };\n\n    _proto.hide = function hide() {\n      if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) {\n        return;\n      }\n\n      var relatedTarget = {\n        relatedTarget: this._element\n      };\n      var hideEvent = $.Event(Event$4.HIDE, relatedTarget);\n\n      var parent = Dropdown._getParentFromElement(this._element);\n\n      $(parent).trigger(hideEvent);\n\n      if (hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (this._popper) {\n        this._popper.destroy();\n      }\n\n      $(this._menu).toggleClass(ClassName$4.SHOW);\n      $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));\n    };\n\n    _proto.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY$4);\n      $(this._element).off(EVENT_KEY$4);\n      this._element = null;\n      this._menu = null;\n\n      if (this._popper !== null) {\n        this._popper.destroy();\n\n        this._popper = null;\n      }\n    };\n\n    _proto.update = function update() {\n      this._inNavbar = this._detectNavbar();\n\n      if (this._popper !== null) {\n        this._popper.scheduleUpdate();\n      }\n    } // Private\n    ;\n\n    _proto._addEventListeners = function _addEventListeners() {\n      var _this = this;\n\n      $(this._element).on(Event$4.CLICK, function (event) {\n        event.preventDefault();\n        event.stopPropagation();\n\n        _this.toggle();\n      });\n    };\n\n    _proto._getConfig = function _getConfig(config) {\n      config = _objectSpread2({}, this.constructor.Default, {}, $(this._element).data(), {}, config);\n      Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);\n      return config;\n    };\n\n    _proto._getMenuElement = function _getMenuElement() {\n      if (!this._menu) {\n        var parent = Dropdown._getParentFromElement(this._element);\n\n        if (parent) {\n          this._menu = parent.querySelector(Selector$4.MENU);\n        }\n      }\n\n      return this._menu;\n    };\n\n    _proto._getPlacement = function _getPlacement() {\n      var $parentDropdown = $(this._element.parentNode);\n      var placement = AttachmentMap.BOTTOM; // Handle dropup\n\n      if ($parentDropdown.hasClass(ClassName$4.DROPUP)) {\n        placement = AttachmentMap.TOP;\n\n        if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {\n          placement = AttachmentMap.TOPEND;\n        }\n      } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) {\n        placement = AttachmentMap.RIGHT;\n      } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) {\n        placement = AttachmentMap.LEFT;\n      } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {\n        placement = AttachmentMap.BOTTOMEND;\n      }\n\n      return placement;\n    };\n\n    _proto._detectNavbar = function _detectNavbar() {\n      return $(this._element).closest('.navbar').length > 0;\n    };\n\n    _proto._getOffset = function _getOffset() {\n      var _this2 = this;\n\n      var offset = {};\n\n      if (typeof this._config.offset === 'function') {\n        offset.fn = function (data) {\n          data.offsets = _objectSpread2({}, data.offsets, {}, _this2._config.offset(data.offsets, _this2._element) || {});\n          return data;\n        };\n      } else {\n        offset.offset = this._config.offset;\n      }\n\n      return offset;\n    };\n\n    _proto._getPopperConfig = function _getPopperConfig() {\n      var popperConfig = {\n        placement: this._getPlacement(),\n        modifiers: {\n          offset: this._getOffset(),\n          flip: {\n            enabled: this._config.flip\n          },\n          preventOverflow: {\n            boundariesElement: this._config.boundary\n          }\n        }\n      }; // Disable Popper.js if we have a static display\n\n      if (this._config.display === 'static') {\n        popperConfig.modifiers.applyStyle = {\n          enabled: false\n        };\n      }\n\n      return _objectSpread2({}, popperConfig, {}, this._config.popperConfig);\n    } // Static\n    ;\n\n    Dropdown._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY$4);\n\n        var _config = typeof config === 'object' ? config : null;\n\n        if (!data) {\n          data = new Dropdown(this, _config);\n          $(this).data(DATA_KEY$4, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config]();\n        }\n      });\n    };\n\n    Dropdown._clearMenus = function _clearMenus(event) {\n      if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n        return;\n      }\n\n      var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE));\n\n      for (var i = 0, len = toggles.length; i < len; i++) {\n        var parent = Dropdown._getParentFromElement(toggles[i]);\n\n        var context = $(toggles[i]).data(DATA_KEY$4);\n        var relatedTarget = {\n          relatedTarget: toggles[i]\n        };\n\n        if (event && event.type === 'click') {\n          relatedTarget.clickEvent = event;\n        }\n\n        if (!context) {\n          continue;\n        }\n\n        var dropdownMenu = context._menu;\n\n        if (!$(parent).hasClass(ClassName$4.SHOW)) {\n          continue;\n        }\n\n        if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {\n          continue;\n        }\n\n        var hideEvent = $.Event(Event$4.HIDE, relatedTarget);\n        $(parent).trigger(hideEvent);\n\n        if (hideEvent.isDefaultPrevented()) {\n          continue;\n        } // If this is a touch-enabled device we remove the extra\n        // empty mouseover listeners we added for iOS support\n\n\n        if ('ontouchstart' in document.documentElement) {\n          $(document.body).children().off('mouseover', null, $.noop);\n        }\n\n        toggles[i].setAttribute('aria-expanded', 'false');\n\n        if (context._popper) {\n          context._popper.destroy();\n        }\n\n        $(dropdownMenu).removeClass(ClassName$4.SHOW);\n        $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));\n      }\n    };\n\n    Dropdown._getParentFromElement = function _getParentFromElement(element) {\n      var parent;\n      var selector = Util.getSelectorFromElement(element);\n\n      if (selector) {\n        parent = document.querySelector(selector);\n      }\n\n      return parent || element.parentNode;\n    } // eslint-disable-next-line complexity\n    ;\n\n    Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {\n      // If not input/textarea:\n      //  - And not a key in REGEXP_KEYDOWN => not a dropdown command\n      // If input/textarea:\n      //  - If space key => not a dropdown command\n      //  - If key is other than escape\n      //    - If key is not up or down => not a dropdown command\n      //    - If trigger inside the menu => not a dropdown command\n      if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n        return;\n      }\n\n      event.preventDefault();\n      event.stopPropagation();\n\n      if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) {\n        return;\n      }\n\n      var parent = Dropdown._getParentFromElement(this);\n\n      var isActive = $(parent).hasClass(ClassName$4.SHOW);\n\n      if (!isActive && event.which === ESCAPE_KEYCODE) {\n        return;\n      }\n\n      if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n        if (event.which === ESCAPE_KEYCODE) {\n          var toggle = parent.querySelector(Selector$4.DATA_TOGGLE);\n          $(toggle).trigger('focus');\n        }\n\n        $(this).trigger('click');\n        return;\n      }\n\n      var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS)).filter(function (item) {\n        return $(item).is(':visible');\n      });\n\n      if (items.length === 0) {\n        return;\n      }\n\n      var index = items.indexOf(event.target);\n\n      if (event.which === ARROW_UP_KEYCODE && index > 0) {\n        // Up\n        index--;\n      }\n\n      if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {\n        // Down\n        index++;\n      }\n\n      if (index < 0) {\n        index = 0;\n      }\n\n      items[index].focus();\n    };\n\n    _createClass(Dropdown, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$4;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default$2;\n      }\n    }, {\n      key: \"DefaultType\",\n      get: function get() {\n        return DefaultType$2;\n      }\n    }]);\n\n    return Dropdown;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + \" \" + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {\n    event.preventDefault();\n    event.stopPropagation();\n\n    Dropdown._jQueryInterface.call($(this), 'toggle');\n  }).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {\n    e.stopPropagation();\n  });\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME$4] = Dropdown._jQueryInterface;\n  $.fn[NAME$4].Constructor = Dropdown;\n\n  $.fn[NAME$4].noConflict = function () {\n    $.fn[NAME$4] = JQUERY_NO_CONFLICT$4;\n    return Dropdown._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$5 = 'modal';\n  var VERSION$5 = '4.4.1';\n  var DATA_KEY$5 = 'bs.modal';\n  var EVENT_KEY$5 = \".\" + DATA_KEY$5;\n  var DATA_API_KEY$5 = '.data-api';\n  var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];\n  var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key\n\n  var Default$3 = {\n    backdrop: true,\n    keyboard: true,\n    focus: true,\n    show: true\n  };\n  var DefaultType$3 = {\n    backdrop: '(boolean|string)',\n    keyboard: 'boolean',\n    focus: 'boolean',\n    show: 'boolean'\n  };\n  var Event$5 = {\n    HIDE: \"hide\" + EVENT_KEY$5,\n    HIDE_PREVENTED: \"hidePrevented\" + EVENT_KEY$5,\n    HIDDEN: \"hidden\" + EVENT_KEY$5,\n    SHOW: \"show\" + EVENT_KEY$5,\n    SHOWN: \"shown\" + EVENT_KEY$5,\n    FOCUSIN: \"focusin\" + EVENT_KEY$5,\n    RESIZE: \"resize\" + EVENT_KEY$5,\n    CLICK_DISMISS: \"click.dismiss\" + EVENT_KEY$5,\n    KEYDOWN_DISMISS: \"keydown.dismiss\" + EVENT_KEY$5,\n    MOUSEUP_DISMISS: \"mouseup.dismiss\" + EVENT_KEY$5,\n    MOUSEDOWN_DISMISS: \"mousedown.dismiss\" + EVENT_KEY$5,\n    CLICK_DATA_API: \"click\" + EVENT_KEY$5 + DATA_API_KEY$5\n  };\n  var ClassName$5 = {\n    SCROLLABLE: 'modal-dialog-scrollable',\n    SCROLLBAR_MEASURER: 'modal-scrollbar-measure',\n    BACKDROP: 'modal-backdrop',\n    OPEN: 'modal-open',\n    FADE: 'fade',\n    SHOW: 'show',\n    STATIC: 'modal-static'\n  };\n  var Selector$5 = {\n    DIALOG: '.modal-dialog',\n    MODAL_BODY: '.modal-body',\n    DATA_TOGGLE: '[data-toggle=\"modal\"]',\n    DATA_DISMISS: '[data-dismiss=\"modal\"]',\n    FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',\n    STICKY_CONTENT: '.sticky-top'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Modal =\n  /*#__PURE__*/\n  function () {\n    function Modal(element, config) {\n      this._config = this._getConfig(config);\n      this._element = element;\n      this._dialog = element.querySelector(Selector$5.DIALOG);\n      this._backdrop = null;\n      this._isShown = false;\n      this._isBodyOverflowing = false;\n      this._ignoreBackdropClick = false;\n      this._isTransitioning = false;\n      this._scrollbarWidth = 0;\n    } // Getters\n\n\n    var _proto = Modal.prototype;\n\n    // Public\n    _proto.toggle = function toggle(relatedTarget) {\n      return this._isShown ? this.hide() : this.show(relatedTarget);\n    };\n\n    _proto.show = function show(relatedTarget) {\n      var _this = this;\n\n      if (this._isShown || this._isTransitioning) {\n        return;\n      }\n\n      if ($(this._element).hasClass(ClassName$5.FADE)) {\n        this._isTransitioning = true;\n      }\n\n      var showEvent = $.Event(Event$5.SHOW, {\n        relatedTarget: relatedTarget\n      });\n      $(this._element).trigger(showEvent);\n\n      if (this._isShown || showEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      this._isShown = true;\n\n      this._checkScrollbar();\n\n      this._setScrollbar();\n\n      this._adjustDialog();\n\n      this._setEscapeEvent();\n\n      this._setResizeEvent();\n\n      $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {\n        return _this.hide(event);\n      });\n      $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () {\n        $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) {\n          if ($(event.target).is(_this._element)) {\n            _this._ignoreBackdropClick = true;\n          }\n        });\n      });\n\n      this._showBackdrop(function () {\n        return _this._showElement(relatedTarget);\n      });\n    };\n\n    _proto.hide = function hide(event) {\n      var _this2 = this;\n\n      if (event) {\n        event.preventDefault();\n      }\n\n      if (!this._isShown || this._isTransitioning) {\n        return;\n      }\n\n      var hideEvent = $.Event(Event$5.HIDE);\n      $(this._element).trigger(hideEvent);\n\n      if (!this._isShown || hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      this._isShown = false;\n      var transition = $(this._element).hasClass(ClassName$5.FADE);\n\n      if (transition) {\n        this._isTransitioning = true;\n      }\n\n      this._setEscapeEvent();\n\n      this._setResizeEvent();\n\n      $(document).off(Event$5.FOCUSIN);\n      $(this._element).removeClass(ClassName$5.SHOW);\n      $(this._element).off(Event$5.CLICK_DISMISS);\n      $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS);\n\n      if (transition) {\n        var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n        $(this._element).one(Util.TRANSITION_END, function (event) {\n          return _this2._hideModal(event);\n        }).emulateTransitionEnd(transitionDuration);\n      } else {\n        this._hideModal();\n      }\n    };\n\n    _proto.dispose = function dispose() {\n      [window, this._element, this._dialog].forEach(function (htmlElement) {\n        return $(htmlElement).off(EVENT_KEY$5);\n      });\n      /**\n       * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`\n       * Do not move `document` in `htmlElements` array\n       * It will remove `Event.CLICK_DATA_API` event that should remain\n       */\n\n      $(document).off(Event$5.FOCUSIN);\n      $.removeData(this._element, DATA_KEY$5);\n      this._config = null;\n      this._element = null;\n      this._dialog = null;\n      this._backdrop = null;\n      this._isShown = null;\n      this._isBodyOverflowing = null;\n      this._ignoreBackdropClick = null;\n      this._isTransitioning = null;\n      this._scrollbarWidth = null;\n    };\n\n    _proto.handleUpdate = function handleUpdate() {\n      this._adjustDialog();\n    } // Private\n    ;\n\n    _proto._getConfig = function _getConfig(config) {\n      config = _objectSpread2({}, Default$3, {}, config);\n      Util.typeCheckConfig(NAME$5, config, DefaultType$3);\n      return config;\n    };\n\n    _proto._triggerBackdropTransition = function _triggerBackdropTransition() {\n      var _this3 = this;\n\n      if (this._config.backdrop === 'static') {\n        var hideEventPrevented = $.Event(Event$5.HIDE_PREVENTED);\n        $(this._element).trigger(hideEventPrevented);\n\n        if (hideEventPrevented.defaultPrevented) {\n          return;\n        }\n\n        this._element.classList.add(ClassName$5.STATIC);\n\n        var modalTransitionDuration = Util.getTransitionDurationFromElement(this._element);\n        $(this._element).one(Util.TRANSITION_END, function () {\n          _this3._element.classList.remove(ClassName$5.STATIC);\n        }).emulateTransitionEnd(modalTransitionDuration);\n\n        this._element.focus();\n      } else {\n        this.hide();\n      }\n    };\n\n    _proto._showElement = function _showElement(relatedTarget) {\n      var _this4 = this;\n\n      var transition = $(this._element).hasClass(ClassName$5.FADE);\n      var modalBody = this._dialog ? this._dialog.querySelector(Selector$5.MODAL_BODY) : null;\n\n      if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n        // Don't move modal's DOM position\n        document.body.appendChild(this._element);\n      }\n\n      this._element.style.display = 'block';\n\n      this._element.removeAttribute('aria-hidden');\n\n      this._element.setAttribute('aria-modal', true);\n\n      if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE) && modalBody) {\n        modalBody.scrollTop = 0;\n      } else {\n        this._element.scrollTop = 0;\n      }\n\n      if (transition) {\n        Util.reflow(this._element);\n      }\n\n      $(this._element).addClass(ClassName$5.SHOW);\n\n      if (this._config.focus) {\n        this._enforceFocus();\n      }\n\n      var shownEvent = $.Event(Event$5.SHOWN, {\n        relatedTarget: relatedTarget\n      });\n\n      var transitionComplete = function transitionComplete() {\n        if (_this4._config.focus) {\n          _this4._element.focus();\n        }\n\n        _this4._isTransitioning = false;\n        $(_this4._element).trigger(shownEvent);\n      };\n\n      if (transition) {\n        var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);\n        $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);\n      } else {\n        transitionComplete();\n      }\n    };\n\n    _proto._enforceFocus = function _enforceFocus() {\n      var _this5 = this;\n\n      $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop\n      .on(Event$5.FOCUSIN, function (event) {\n        if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {\n          _this5._element.focus();\n        }\n      });\n    };\n\n    _proto._setEscapeEvent = function _setEscapeEvent() {\n      var _this6 = this;\n\n      if (this._isShown && this._config.keyboard) {\n        $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) {\n          if (event.which === ESCAPE_KEYCODE$1) {\n            _this6._triggerBackdropTransition();\n          }\n        });\n      } else if (!this._isShown) {\n        $(this._element).off(Event$5.KEYDOWN_DISMISS);\n      }\n    };\n\n    _proto._setResizeEvent = function _setResizeEvent() {\n      var _this7 = this;\n\n      if (this._isShown) {\n        $(window).on(Event$5.RESIZE, function (event) {\n          return _this7.handleUpdate(event);\n        });\n      } else {\n        $(window).off(Event$5.RESIZE);\n      }\n    };\n\n    _proto._hideModal = function _hideModal() {\n      var _this8 = this;\n\n      this._element.style.display = 'none';\n\n      this._element.setAttribute('aria-hidden', true);\n\n      this._element.removeAttribute('aria-modal');\n\n      this._isTransitioning = false;\n\n      this._showBackdrop(function () {\n        $(document.body).removeClass(ClassName$5.OPEN);\n\n        _this8._resetAdjustments();\n\n        _this8._resetScrollbar();\n\n        $(_this8._element).trigger(Event$5.HIDDEN);\n      });\n    };\n\n    _proto._removeBackdrop = function _removeBackdrop() {\n      if (this._backdrop) {\n        $(this._backdrop).remove();\n        this._backdrop = null;\n      }\n    };\n\n    _proto._showBackdrop = function _showBackdrop(callback) {\n      var _this9 = this;\n\n      var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : '';\n\n      if (this._isShown && this._config.backdrop) {\n        this._backdrop = document.createElement('div');\n        this._backdrop.className = ClassName$5.BACKDROP;\n\n        if (animate) {\n          this._backdrop.classList.add(animate);\n        }\n\n        $(this._backdrop).appendTo(document.body);\n        $(this._element).on(Event$5.CLICK_DISMISS, function (event) {\n          if (_this9._ignoreBackdropClick) {\n            _this9._ignoreBackdropClick = false;\n            return;\n          }\n\n          if (event.target !== event.currentTarget) {\n            return;\n          }\n\n          _this9._triggerBackdropTransition();\n        });\n\n        if (animate) {\n          Util.reflow(this._backdrop);\n        }\n\n        $(this._backdrop).addClass(ClassName$5.SHOW);\n\n        if (!callback) {\n          return;\n        }\n\n        if (!animate) {\n          callback();\n          return;\n        }\n\n        var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);\n        $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);\n      } else if (!this._isShown && this._backdrop) {\n        $(this._backdrop).removeClass(ClassName$5.SHOW);\n\n        var callbackRemove = function callbackRemove() {\n          _this9._removeBackdrop();\n\n          if (callback) {\n            callback();\n          }\n        };\n\n        if ($(this._element).hasClass(ClassName$5.FADE)) {\n          var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);\n\n          $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);\n        } else {\n          callbackRemove();\n        }\n      } else if (callback) {\n        callback();\n      }\n    } // ----------------------------------------------------------------------\n    // the following methods are used to handle overflowing modals\n    // todo (fat): these should probably be refactored out of modal.js\n    // ----------------------------------------------------------------------\n    ;\n\n    _proto._adjustDialog = function _adjustDialog() {\n      var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n      if (!this._isBodyOverflowing && isModalOverflowing) {\n        this._element.style.paddingLeft = this._scrollbarWidth + \"px\";\n      }\n\n      if (this._isBodyOverflowing && !isModalOverflowing) {\n        this._element.style.paddingRight = this._scrollbarWidth + \"px\";\n      }\n    };\n\n    _proto._resetAdjustments = function _resetAdjustments() {\n      this._element.style.paddingLeft = '';\n      this._element.style.paddingRight = '';\n    };\n\n    _proto._checkScrollbar = function _checkScrollbar() {\n      var rect = document.body.getBoundingClientRect();\n      this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;\n      this._scrollbarWidth = this._getScrollbarWidth();\n    };\n\n    _proto._setScrollbar = function _setScrollbar() {\n      var _this10 = this;\n\n      if (this._isBodyOverflowing) {\n        // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n        //   while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n        var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));\n        var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding\n\n        $(fixedContent).each(function (index, element) {\n          var actualPadding = element.style.paddingRight;\n          var calculatedPadding = $(element).css('padding-right');\n          $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + \"px\");\n        }); // Adjust sticky content margin\n\n        $(stickyContent).each(function (index, element) {\n          var actualMargin = element.style.marginRight;\n          var calculatedMargin = $(element).css('margin-right');\n          $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + \"px\");\n        }); // Adjust body padding\n\n        var actualPadding = document.body.style.paddingRight;\n        var calculatedPadding = $(document.body).css('padding-right');\n        $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + \"px\");\n      }\n\n      $(document.body).addClass(ClassName$5.OPEN);\n    };\n\n    _proto._resetScrollbar = function _resetScrollbar() {\n      // Restore fixed content padding\n      var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));\n      $(fixedContent).each(function (index, element) {\n        var padding = $(element).data('padding-right');\n        $(element).removeData('padding-right');\n        element.style.paddingRight = padding ? padding : '';\n      }); // Restore sticky content\n\n      var elements = [].slice.call(document.querySelectorAll(\"\" + Selector$5.STICKY_CONTENT));\n      $(elements).each(function (index, element) {\n        var margin = $(element).data('margin-right');\n\n        if (typeof margin !== 'undefined') {\n          $(element).css('margin-right', margin).removeData('margin-right');\n        }\n      }); // Restore body padding\n\n      var padding = $(document.body).data('padding-right');\n      $(document.body).removeData('padding-right');\n      document.body.style.paddingRight = padding ? padding : '';\n    };\n\n    _proto._getScrollbarWidth = function _getScrollbarWidth() {\n      // thx d.walsh\n      var scrollDiv = document.createElement('div');\n      scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER;\n      document.body.appendChild(scrollDiv);\n      var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;\n      document.body.removeChild(scrollDiv);\n      return scrollbarWidth;\n    } // Static\n    ;\n\n    Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY$5);\n\n        var _config = _objectSpread2({}, Default$3, {}, $(this).data(), {}, typeof config === 'object' && config ? config : {});\n\n        if (!data) {\n          data = new Modal(this, _config);\n          $(this).data(DATA_KEY$5, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config](relatedTarget);\n        } else if (_config.show) {\n          data.show(relatedTarget);\n        }\n      });\n    };\n\n    _createClass(Modal, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$5;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default$3;\n      }\n    }]);\n\n    return Modal;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {\n    var _this11 = this;\n\n    var target;\n    var selector = Util.getSelectorFromElement(this);\n\n    if (selector) {\n      target = document.querySelector(selector);\n    }\n\n    var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread2({}, $(target).data(), {}, $(this).data());\n\n    if (this.tagName === 'A' || this.tagName === 'AREA') {\n      event.preventDefault();\n    }\n\n    var $target = $(target).one(Event$5.SHOW, function (showEvent) {\n      if (showEvent.isDefaultPrevented()) {\n        // Only register focus restorer if modal will actually get shown\n        return;\n      }\n\n      $target.one(Event$5.HIDDEN, function () {\n        if ($(_this11).is(':visible')) {\n          _this11.focus();\n        }\n      });\n    });\n\n    Modal._jQueryInterface.call($(target), config, this);\n  });\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME$5] = Modal._jQueryInterface;\n  $.fn[NAME$5].Constructor = Modal;\n\n  $.fn[NAME$5].noConflict = function () {\n    $.fn[NAME$5] = JQUERY_NO_CONFLICT$5;\n    return Modal._jQueryInterface;\n  };\n\n  /**\n   * --------------------------------------------------------------------------\n   * Bootstrap (v4.4.1): tools/sanitizer.js\n   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n   * --------------------------------------------------------------------------\n   */\n  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];\n  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n  var DefaultWhitelist = {\n    // Global attributes allowed on any supplied element below.\n    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n    a: ['target', 'href', 'title', 'rel'],\n    area: [],\n    b: [],\n    br: [],\n    col: [],\n    code: [],\n    div: [],\n    em: [],\n    hr: [],\n    h1: [],\n    h2: [],\n    h3: [],\n    h4: [],\n    h5: [],\n    h6: [],\n    i: [],\n    img: ['src', 'alt', 'title', 'width', 'height'],\n    li: [],\n    ol: [],\n    p: [],\n    pre: [],\n    s: [],\n    small: [],\n    span: [],\n    sub: [],\n    sup: [],\n    strong: [],\n    u: [],\n    ul: []\n  };\n  /**\n   * A pattern that recognizes a commonly useful subset of URLs that are safe.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n\n  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n  /**\n   * A pattern that matches safe data URLs. Only matches image, video and audio types.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n\n  var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;\n\n  function allowedAttribute(attr, allowedAttributeList) {\n    var attrName = attr.nodeName.toLowerCase();\n\n    if (allowedAttributeList.indexOf(attrName) !== -1) {\n      if (uriAttrs.indexOf(attrName) !== -1) {\n        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));\n      }\n\n      return true;\n    }\n\n    var regExp = allowedAttributeList.filter(function (attrRegex) {\n      return attrRegex instanceof RegExp;\n    }); // Check if a regular expression validates the attribute.\n\n    for (var i = 0, l = regExp.length; i < l; i++) {\n      if (attrName.match(regExp[i])) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n    if (unsafeHtml.length === 0) {\n      return unsafeHtml;\n    }\n\n    if (sanitizeFn && typeof sanitizeFn === 'function') {\n      return sanitizeFn(unsafeHtml);\n    }\n\n    var domParser = new window.DOMParser();\n    var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n    var whitelistKeys = Object.keys(whiteList);\n    var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));\n\n    var _loop = function _loop(i, len) {\n      var el = elements[i];\n      var elName = el.nodeName.toLowerCase();\n\n      if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {\n        el.parentNode.removeChild(el);\n        return \"continue\";\n      }\n\n      var attributeList = [].slice.call(el.attributes);\n      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);\n      attributeList.forEach(function (attr) {\n        if (!allowedAttribute(attr, whitelistedAttributes)) {\n          el.removeAttribute(attr.nodeName);\n        }\n      });\n    };\n\n    for (var i = 0, len = elements.length; i < len; i++) {\n      var _ret = _loop(i);\n\n      if (_ret === \"continue\") continue;\n    }\n\n    return createdDocument.body.innerHTML;\n  }\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$6 = 'tooltip';\n  var VERSION$6 = '4.4.1';\n  var DATA_KEY$6 = 'bs.tooltip';\n  var EVENT_KEY$6 = \".\" + DATA_KEY$6;\n  var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];\n  var CLASS_PREFIX = 'bs-tooltip';\n  var BSCLS_PREFIX_REGEX = new RegExp(\"(^|\\\\s)\" + CLASS_PREFIX + \"\\\\S+\", 'g');\n  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];\n  var DefaultType$4 = {\n    animation: 'boolean',\n    template: 'string',\n    title: '(string|element|function)',\n    trigger: 'string',\n    delay: '(number|object)',\n    html: 'boolean',\n    selector: '(string|boolean)',\n    placement: '(string|function)',\n    offset: '(number|string|function)',\n    container: '(string|element|boolean)',\n    fallbackPlacement: '(string|array)',\n    boundary: '(string|element)',\n    sanitize: 'boolean',\n    sanitizeFn: '(null|function)',\n    whiteList: 'object',\n    popperConfig: '(null|object)'\n  };\n  var AttachmentMap$1 = {\n    AUTO: 'auto',\n    TOP: 'top',\n    RIGHT: 'right',\n    BOTTOM: 'bottom',\n    LEFT: 'left'\n  };\n  var Default$4 = {\n    animation: true,\n    template: '<div class=\"tooltip\" role=\"tooltip\">' + '<div class=\"arrow\"></div>' + '<div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    selector: false,\n    placement: 'top',\n    offset: 0,\n    container: false,\n    fallbackPlacement: 'flip',\n    boundary: 'scrollParent',\n    sanitize: true,\n    sanitizeFn: null,\n    whiteList: DefaultWhitelist,\n    popperConfig: null\n  };\n  var HoverState = {\n    SHOW: 'show',\n    OUT: 'out'\n  };\n  var Event$6 = {\n    HIDE: \"hide\" + EVENT_KEY$6,\n    HIDDEN: \"hidden\" + EVENT_KEY$6,\n    SHOW: \"show\" + EVENT_KEY$6,\n    SHOWN: \"shown\" + EVENT_KEY$6,\n    INSERTED: \"inserted\" + EVENT_KEY$6,\n    CLICK: \"click\" + EVENT_KEY$6,\n    FOCUSIN: \"focusin\" + EVENT_KEY$6,\n    FOCUSOUT: \"focusout\" + EVENT_KEY$6,\n    MOUSEENTER: \"mouseenter\" + EVENT_KEY$6,\n    MOUSELEAVE: \"mouseleave\" + EVENT_KEY$6\n  };\n  var ClassName$6 = {\n    FADE: 'fade',\n    SHOW: 'show'\n  };\n  var Selector$6 = {\n    TOOLTIP: '.tooltip',\n    TOOLTIP_INNER: '.tooltip-inner',\n    ARROW: '.arrow'\n  };\n  var Trigger = {\n    HOVER: 'hover',\n    FOCUS: 'focus',\n    CLICK: 'click',\n    MANUAL: 'manual'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Tooltip =\n  /*#__PURE__*/\n  function () {\n    function Tooltip(element, config) {\n      if (typeof Popper === 'undefined') {\n        throw new TypeError('Bootstrap\\'s tooltips require Popper.js (https://popper.js.org/)');\n      } // private\n\n\n      this._isEnabled = true;\n      this._timeout = 0;\n      this._hoverState = '';\n      this._activeTrigger = {};\n      this._popper = null; // Protected\n\n      this.element = element;\n      this.config = this._getConfig(config);\n      this.tip = null;\n\n      this._setListeners();\n    } // Getters\n\n\n    var _proto = Tooltip.prototype;\n\n    // Public\n    _proto.enable = function enable() {\n      this._isEnabled = true;\n    };\n\n    _proto.disable = function disable() {\n      this._isEnabled = false;\n    };\n\n    _proto.toggleEnabled = function toggleEnabled() {\n      this._isEnabled = !this._isEnabled;\n    };\n\n    _proto.toggle = function toggle(event) {\n      if (!this._isEnabled) {\n        return;\n      }\n\n      if (event) {\n        var dataKey = this.constructor.DATA_KEY;\n        var context = $(event.currentTarget).data(dataKey);\n\n        if (!context) {\n          context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n          $(event.currentTarget).data(dataKey, context);\n        }\n\n        context._activeTrigger.click = !context._activeTrigger.click;\n\n        if (context._isWithActiveTrigger()) {\n          context._enter(null, context);\n        } else {\n          context._leave(null, context);\n        }\n      } else {\n        if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) {\n          this._leave(null, this);\n\n          return;\n        }\n\n        this._enter(null, this);\n      }\n    };\n\n    _proto.dispose = function dispose() {\n      clearTimeout(this._timeout);\n      $.removeData(this.element, this.constructor.DATA_KEY);\n      $(this.element).off(this.constructor.EVENT_KEY);\n      $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);\n\n      if (this.tip) {\n        $(this.tip).remove();\n      }\n\n      this._isEnabled = null;\n      this._timeout = null;\n      this._hoverState = null;\n      this._activeTrigger = null;\n\n      if (this._popper) {\n        this._popper.destroy();\n      }\n\n      this._popper = null;\n      this.element = null;\n      this.config = null;\n      this.tip = null;\n    };\n\n    _proto.show = function show() {\n      var _this = this;\n\n      if ($(this.element).css('display') === 'none') {\n        throw new Error('Please use show on visible elements');\n      }\n\n      var showEvent = $.Event(this.constructor.Event.SHOW);\n\n      if (this.isWithContent() && this._isEnabled) {\n        $(this.element).trigger(showEvent);\n        var shadowRoot = Util.findShadowRoot(this.element);\n        var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);\n\n        if (showEvent.isDefaultPrevented() || !isInTheDom) {\n          return;\n        }\n\n        var tip = this.getTipElement();\n        var tipId = Util.getUID(this.constructor.NAME);\n        tip.setAttribute('id', tipId);\n        this.element.setAttribute('aria-describedby', tipId);\n        this.setContent();\n\n        if (this.config.animation) {\n          $(tip).addClass(ClassName$6.FADE);\n        }\n\n        var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;\n\n        var attachment = this._getAttachment(placement);\n\n        this.addAttachmentClass(attachment);\n\n        var container = this._getContainer();\n\n        $(tip).data(this.constructor.DATA_KEY, this);\n\n        if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {\n          $(tip).appendTo(container);\n        }\n\n        $(this.element).trigger(this.constructor.Event.INSERTED);\n        this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));\n        $(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra\n        // empty mouseover listeners to the body's immediate children;\n        // only needed because of broken event delegation on iOS\n        // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n        if ('ontouchstart' in document.documentElement) {\n          $(document.body).children().on('mouseover', null, $.noop);\n        }\n\n        var complete = function complete() {\n          if (_this.config.animation) {\n            _this._fixTransition();\n          }\n\n          var prevHoverState = _this._hoverState;\n          _this._hoverState = null;\n          $(_this.element).trigger(_this.constructor.Event.SHOWN);\n\n          if (prevHoverState === HoverState.OUT) {\n            _this._leave(null, _this);\n          }\n        };\n\n        if ($(this.tip).hasClass(ClassName$6.FADE)) {\n          var transitionDuration = Util.getTransitionDurationFromElement(this.tip);\n          $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n        } else {\n          complete();\n        }\n      }\n    };\n\n    _proto.hide = function hide(callback) {\n      var _this2 = this;\n\n      var tip = this.getTipElement();\n      var hideEvent = $.Event(this.constructor.Event.HIDE);\n\n      var complete = function complete() {\n        if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {\n          tip.parentNode.removeChild(tip);\n        }\n\n        _this2._cleanTipClass();\n\n        _this2.element.removeAttribute('aria-describedby');\n\n        $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);\n\n        if (_this2._popper !== null) {\n          _this2._popper.destroy();\n        }\n\n        if (callback) {\n          callback();\n        }\n      };\n\n      $(this.element).trigger(hideEvent);\n\n      if (hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra\n      // empty mouseover listeners we added for iOS support\n\n      if ('ontouchstart' in document.documentElement) {\n        $(document.body).children().off('mouseover', null, $.noop);\n      }\n\n      this._activeTrigger[Trigger.CLICK] = false;\n      this._activeTrigger[Trigger.FOCUS] = false;\n      this._activeTrigger[Trigger.HOVER] = false;\n\n      if ($(this.tip).hasClass(ClassName$6.FADE)) {\n        var transitionDuration = Util.getTransitionDurationFromElement(tip);\n        $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n      } else {\n        complete();\n      }\n\n      this._hoverState = '';\n    };\n\n    _proto.update = function update() {\n      if (this._popper !== null) {\n        this._popper.scheduleUpdate();\n      }\n    } // Protected\n    ;\n\n    _proto.isWithContent = function isWithContent() {\n      return Boolean(this.getTitle());\n    };\n\n    _proto.addAttachmentClass = function addAttachmentClass(attachment) {\n      $(this.getTipElement()).addClass(CLASS_PREFIX + \"-\" + attachment);\n    };\n\n    _proto.getTipElement = function getTipElement() {\n      this.tip = this.tip || $(this.config.template)[0];\n      return this.tip;\n    };\n\n    _proto.setContent = function setContent() {\n      var tip = this.getTipElement();\n      this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle());\n      $(tip).removeClass(ClassName$6.FADE + \" \" + ClassName$6.SHOW);\n    };\n\n    _proto.setElementContent = function setElementContent($element, content) {\n      if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n        // Content is a DOM node or a jQuery\n        if (this.config.html) {\n          if (!$(content).parent().is($element)) {\n            $element.empty().append(content);\n          }\n        } else {\n          $element.text($(content).text());\n        }\n\n        return;\n      }\n\n      if (this.config.html) {\n        if (this.config.sanitize) {\n          content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);\n        }\n\n        $element.html(content);\n      } else {\n        $element.text(content);\n      }\n    };\n\n    _proto.getTitle = function getTitle() {\n      var title = this.element.getAttribute('data-original-title');\n\n      if (!title) {\n        title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;\n      }\n\n      return title;\n    } // Private\n    ;\n\n    _proto._getPopperConfig = function _getPopperConfig(attachment) {\n      var _this3 = this;\n\n      var defaultBsConfig = {\n        placement: attachment,\n        modifiers: {\n          offset: this._getOffset(),\n          flip: {\n            behavior: this.config.fallbackPlacement\n          },\n          arrow: {\n            element: Selector$6.ARROW\n          },\n          preventOverflow: {\n            boundariesElement: this.config.boundary\n          }\n        },\n        onCreate: function onCreate(data) {\n          if (data.originalPlacement !== data.placement) {\n            _this3._handlePopperPlacementChange(data);\n          }\n        },\n        onUpdate: function onUpdate(data) {\n          return _this3._handlePopperPlacementChange(data);\n        }\n      };\n      return _objectSpread2({}, defaultBsConfig, {}, this.config.popperConfig);\n    };\n\n    _proto._getOffset = function _getOffset() {\n      var _this4 = this;\n\n      var offset = {};\n\n      if (typeof this.config.offset === 'function') {\n        offset.fn = function (data) {\n          data.offsets = _objectSpread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {});\n          return data;\n        };\n      } else {\n        offset.offset = this.config.offset;\n      }\n\n      return offset;\n    };\n\n    _proto._getContainer = function _getContainer() {\n      if (this.config.container === false) {\n        return document.body;\n      }\n\n      if (Util.isElement(this.config.container)) {\n        return $(this.config.container);\n      }\n\n      return $(document).find(this.config.container);\n    };\n\n    _proto._getAttachment = function _getAttachment(placement) {\n      return AttachmentMap$1[placement.toUpperCase()];\n    };\n\n    _proto._setListeners = function _setListeners() {\n      var _this5 = this;\n\n      var triggers = this.config.trigger.split(' ');\n      triggers.forEach(function (trigger) {\n        if (trigger === 'click') {\n          $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {\n            return _this5.toggle(event);\n          });\n        } else if (trigger !== Trigger.MANUAL) {\n          var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;\n          var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;\n          $(_this5.element).on(eventIn, _this5.config.selector, function (event) {\n            return _this5._enter(event);\n          }).on(eventOut, _this5.config.selector, function (event) {\n            return _this5._leave(event);\n          });\n        }\n      });\n\n      this._hideModalHandler = function () {\n        if (_this5.element) {\n          _this5.hide();\n        }\n      };\n\n      $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);\n\n      if (this.config.selector) {\n        this.config = _objectSpread2({}, this.config, {\n          trigger: 'manual',\n          selector: ''\n        });\n      } else {\n        this._fixTitle();\n      }\n    };\n\n    _proto._fixTitle = function _fixTitle() {\n      var titleType = typeof this.element.getAttribute('data-original-title');\n\n      if (this.element.getAttribute('title') || titleType !== 'string') {\n        this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');\n        this.element.setAttribute('title', '');\n      }\n    };\n\n    _proto._enter = function _enter(event, context) {\n      var dataKey = this.constructor.DATA_KEY;\n      context = context || $(event.currentTarget).data(dataKey);\n\n      if (!context) {\n        context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n        $(event.currentTarget).data(dataKey, context);\n      }\n\n      if (event) {\n        context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;\n      }\n\n      if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {\n        context._hoverState = HoverState.SHOW;\n        return;\n      }\n\n      clearTimeout(context._timeout);\n      context._hoverState = HoverState.SHOW;\n\n      if (!context.config.delay || !context.config.delay.show) {\n        context.show();\n        return;\n      }\n\n      context._timeout = setTimeout(function () {\n        if (context._hoverState === HoverState.SHOW) {\n          context.show();\n        }\n      }, context.config.delay.show);\n    };\n\n    _proto._leave = function _leave(event, context) {\n      var dataKey = this.constructor.DATA_KEY;\n      context = context || $(event.currentTarget).data(dataKey);\n\n      if (!context) {\n        context = new this.constructor(event.currentTarget, this._getDelegateConfig());\n        $(event.currentTarget).data(dataKey, context);\n      }\n\n      if (event) {\n        context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;\n      }\n\n      if (context._isWithActiveTrigger()) {\n        return;\n      }\n\n      clearTimeout(context._timeout);\n      context._hoverState = HoverState.OUT;\n\n      if (!context.config.delay || !context.config.delay.hide) {\n        context.hide();\n        return;\n      }\n\n      context._timeout = setTimeout(function () {\n        if (context._hoverState === HoverState.OUT) {\n          context.hide();\n        }\n      }, context.config.delay.hide);\n    };\n\n    _proto._isWithActiveTrigger = function _isWithActiveTrigger() {\n      for (var trigger in this._activeTrigger) {\n        if (this._activeTrigger[trigger]) {\n          return true;\n        }\n      }\n\n      return false;\n    };\n\n    _proto._getConfig = function _getConfig(config) {\n      var dataAttributes = $(this.element).data();\n      Object.keys(dataAttributes).forEach(function (dataAttr) {\n        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {\n          delete dataAttributes[dataAttr];\n        }\n      });\n      config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {});\n\n      if (typeof config.delay === 'number') {\n        config.delay = {\n          show: config.delay,\n          hide: config.delay\n        };\n      }\n\n      if (typeof config.title === 'number') {\n        config.title = config.title.toString();\n      }\n\n      if (typeof config.content === 'number') {\n        config.content = config.content.toString();\n      }\n\n      Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);\n\n      if (config.sanitize) {\n        config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);\n      }\n\n      return config;\n    };\n\n    _proto._getDelegateConfig = function _getDelegateConfig() {\n      var config = {};\n\n      if (this.config) {\n        for (var key in this.config) {\n          if (this.constructor.Default[key] !== this.config[key]) {\n            config[key] = this.config[key];\n          }\n        }\n      }\n\n      return config;\n    };\n\n    _proto._cleanTipClass = function _cleanTipClass() {\n      var $tip = $(this.getTipElement());\n      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);\n\n      if (tabClass !== null && tabClass.length) {\n        $tip.removeClass(tabClass.join(''));\n      }\n    };\n\n    _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {\n      var popperInstance = popperData.instance;\n      this.tip = popperInstance.popper;\n\n      this._cleanTipClass();\n\n      this.addAttachmentClass(this._getAttachment(popperData.placement));\n    };\n\n    _proto._fixTransition = function _fixTransition() {\n      var tip = this.getTipElement();\n      var initConfigAnimation = this.config.animation;\n\n      if (tip.getAttribute('x-placement') !== null) {\n        return;\n      }\n\n      $(tip).removeClass(ClassName$6.FADE);\n      this.config.animation = false;\n      this.hide();\n      this.show();\n      this.config.animation = initConfigAnimation;\n    } // Static\n    ;\n\n    Tooltip._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY$6);\n\n        var _config = typeof config === 'object' && config;\n\n        if (!data && /dispose|hide/.test(config)) {\n          return;\n        }\n\n        if (!data) {\n          data = new Tooltip(this, _config);\n          $(this).data(DATA_KEY$6, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Tooltip, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$6;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default$4;\n      }\n    }, {\n      key: \"NAME\",\n      get: function get() {\n        return NAME$6;\n      }\n    }, {\n      key: \"DATA_KEY\",\n      get: function get() {\n        return DATA_KEY$6;\n      }\n    }, {\n      key: \"Event\",\n      get: function get() {\n        return Event$6;\n      }\n    }, {\n      key: \"EVENT_KEY\",\n      get: function get() {\n        return EVENT_KEY$6;\n      }\n    }, {\n      key: \"DefaultType\",\n      get: function get() {\n        return DefaultType$4;\n      }\n    }]);\n\n    return Tooltip;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n\n  $.fn[NAME$6] = Tooltip._jQueryInterface;\n  $.fn[NAME$6].Constructor = Tooltip;\n\n  $.fn[NAME$6].noConflict = function () {\n    $.fn[NAME$6] = JQUERY_NO_CONFLICT$6;\n    return Tooltip._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$7 = 'popover';\n  var VERSION$7 = '4.4.1';\n  var DATA_KEY$7 = 'bs.popover';\n  var EVENT_KEY$7 = \".\" + DATA_KEY$7;\n  var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];\n  var CLASS_PREFIX$1 = 'bs-popover';\n  var BSCLS_PREFIX_REGEX$1 = new RegExp(\"(^|\\\\s)\" + CLASS_PREFIX$1 + \"\\\\S+\", 'g');\n\n  var Default$5 = _objectSpread2({}, Tooltip.Default, {\n    placement: 'right',\n    trigger: 'click',\n    content: '',\n    template: '<div class=\"popover\" role=\"tooltip\">' + '<div class=\"arrow\"></div>' + '<h3 class=\"popover-header\"></h3>' + '<div class=\"popover-body\"></div></div>'\n  });\n\n  var DefaultType$5 = _objectSpread2({}, Tooltip.DefaultType, {\n    content: '(string|element|function)'\n  });\n\n  var ClassName$7 = {\n    FADE: 'fade',\n    SHOW: 'show'\n  };\n  var Selector$7 = {\n    TITLE: '.popover-header',\n    CONTENT: '.popover-body'\n  };\n  var Event$7 = {\n    HIDE: \"hide\" + EVENT_KEY$7,\n    HIDDEN: \"hidden\" + EVENT_KEY$7,\n    SHOW: \"show\" + EVENT_KEY$7,\n    SHOWN: \"shown\" + EVENT_KEY$7,\n    INSERTED: \"inserted\" + EVENT_KEY$7,\n    CLICK: \"click\" + EVENT_KEY$7,\n    FOCUSIN: \"focusin\" + EVENT_KEY$7,\n    FOCUSOUT: \"focusout\" + EVENT_KEY$7,\n    MOUSEENTER: \"mouseenter\" + EVENT_KEY$7,\n    MOUSELEAVE: \"mouseleave\" + EVENT_KEY$7\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Popover =\n  /*#__PURE__*/\n  function (_Tooltip) {\n    _inheritsLoose(Popover, _Tooltip);\n\n    function Popover() {\n      return _Tooltip.apply(this, arguments) || this;\n    }\n\n    var _proto = Popover.prototype;\n\n    // Overrides\n    _proto.isWithContent = function isWithContent() {\n      return this.getTitle() || this._getContent();\n    };\n\n    _proto.addAttachmentClass = function addAttachmentClass(attachment) {\n      $(this.getTipElement()).addClass(CLASS_PREFIX$1 + \"-\" + attachment);\n    };\n\n    _proto.getTipElement = function getTipElement() {\n      this.tip = this.tip || $(this.config.template)[0];\n      return this.tip;\n    };\n\n    _proto.setContent = function setContent() {\n      var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events\n\n      this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle());\n\n      var content = this._getContent();\n\n      if (typeof content === 'function') {\n        content = content.call(this.element);\n      }\n\n      this.setElementContent($tip.find(Selector$7.CONTENT), content);\n      $tip.removeClass(ClassName$7.FADE + \" \" + ClassName$7.SHOW);\n    } // Private\n    ;\n\n    _proto._getContent = function _getContent() {\n      return this.element.getAttribute('data-content') || this.config.content;\n    };\n\n    _proto._cleanTipClass = function _cleanTipClass() {\n      var $tip = $(this.getTipElement());\n      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);\n\n      if (tabClass !== null && tabClass.length > 0) {\n        $tip.removeClass(tabClass.join(''));\n      }\n    } // Static\n    ;\n\n    Popover._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY$7);\n\n        var _config = typeof config === 'object' ? config : null;\n\n        if (!data && /dispose|hide/.test(config)) {\n          return;\n        }\n\n        if (!data) {\n          data = new Popover(this, _config);\n          $(this).data(DATA_KEY$7, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Popover, null, [{\n      key: \"VERSION\",\n      // Getters\n      get: function get() {\n        return VERSION$7;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default$5;\n      }\n    }, {\n      key: \"NAME\",\n      get: function get() {\n        return NAME$7;\n      }\n    }, {\n      key: \"DATA_KEY\",\n      get: function get() {\n        return DATA_KEY$7;\n      }\n    }, {\n      key: \"Event\",\n      get: function get() {\n        return Event$7;\n      }\n    }, {\n      key: \"EVENT_KEY\",\n      get: function get() {\n        return EVENT_KEY$7;\n      }\n    }, {\n      key: \"DefaultType\",\n      get: function get() {\n        return DefaultType$5;\n      }\n    }]);\n\n    return Popover;\n  }(Tooltip);\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n\n  $.fn[NAME$7] = Popover._jQueryInterface;\n  $.fn[NAME$7].Constructor = Popover;\n\n  $.fn[NAME$7].noConflict = function () {\n    $.fn[NAME$7] = JQUERY_NO_CONFLICT$7;\n    return Popover._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$8 = 'scrollspy';\n  var VERSION$8 = '4.4.1';\n  var DATA_KEY$8 = 'bs.scrollspy';\n  var EVENT_KEY$8 = \".\" + DATA_KEY$8;\n  var DATA_API_KEY$6 = '.data-api';\n  var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];\n  var Default$6 = {\n    offset: 10,\n    method: 'auto',\n    target: ''\n  };\n  var DefaultType$6 = {\n    offset: 'number',\n    method: 'string',\n    target: '(string|element)'\n  };\n  var Event$8 = {\n    ACTIVATE: \"activate\" + EVENT_KEY$8,\n    SCROLL: \"scroll\" + EVENT_KEY$8,\n    LOAD_DATA_API: \"load\" + EVENT_KEY$8 + DATA_API_KEY$6\n  };\n  var ClassName$8 = {\n    DROPDOWN_ITEM: 'dropdown-item',\n    DROPDOWN_MENU: 'dropdown-menu',\n    ACTIVE: 'active'\n  };\n  var Selector$8 = {\n    DATA_SPY: '[data-spy=\"scroll\"]',\n    ACTIVE: '.active',\n    NAV_LIST_GROUP: '.nav, .list-group',\n    NAV_LINKS: '.nav-link',\n    NAV_ITEMS: '.nav-item',\n    LIST_ITEMS: '.list-group-item',\n    DROPDOWN: '.dropdown',\n    DROPDOWN_ITEMS: '.dropdown-item',\n    DROPDOWN_TOGGLE: '.dropdown-toggle'\n  };\n  var OffsetMethod = {\n    OFFSET: 'offset',\n    POSITION: 'position'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var ScrollSpy =\n  /*#__PURE__*/\n  function () {\n    function ScrollSpy(element, config) {\n      var _this = this;\n\n      this._element = element;\n      this._scrollElement = element.tagName === 'BODY' ? window : element;\n      this._config = this._getConfig(config);\n      this._selector = this._config.target + \" \" + Selector$8.NAV_LINKS + \",\" + (this._config.target + \" \" + Selector$8.LIST_ITEMS + \",\") + (this._config.target + \" \" + Selector$8.DROPDOWN_ITEMS);\n      this._offsets = [];\n      this._targets = [];\n      this._activeTarget = null;\n      this._scrollHeight = 0;\n      $(this._scrollElement).on(Event$8.SCROLL, function (event) {\n        return _this._process(event);\n      });\n      this.refresh();\n\n      this._process();\n    } // Getters\n\n\n    var _proto = ScrollSpy.prototype;\n\n    // Public\n    _proto.refresh = function refresh() {\n      var _this2 = this;\n\n      var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;\n      var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;\n      var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;\n      this._offsets = [];\n      this._targets = [];\n      this._scrollHeight = this._getScrollHeight();\n      var targets = [].slice.call(document.querySelectorAll(this._selector));\n      targets.map(function (element) {\n        var target;\n        var targetSelector = Util.getSelectorFromElement(element);\n\n        if (targetSelector) {\n          target = document.querySelector(targetSelector);\n        }\n\n        if (target) {\n          var targetBCR = target.getBoundingClientRect();\n\n          if (targetBCR.width || targetBCR.height) {\n            // TODO (fat): remove sketch reliance on jQuery position/offset\n            return [$(target)[offsetMethod]().top + offsetBase, targetSelector];\n          }\n        }\n\n        return null;\n      }).filter(function (item) {\n        return item;\n      }).sort(function (a, b) {\n        return a[0] - b[0];\n      }).forEach(function (item) {\n        _this2._offsets.push(item[0]);\n\n        _this2._targets.push(item[1]);\n      });\n    };\n\n    _proto.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY$8);\n      $(this._scrollElement).off(EVENT_KEY$8);\n      this._element = null;\n      this._scrollElement = null;\n      this._config = null;\n      this._selector = null;\n      this._offsets = null;\n      this._targets = null;\n      this._activeTarget = null;\n      this._scrollHeight = null;\n    } // Private\n    ;\n\n    _proto._getConfig = function _getConfig(config) {\n      config = _objectSpread2({}, Default$6, {}, typeof config === 'object' && config ? config : {});\n\n      if (typeof config.target !== 'string') {\n        var id = $(config.target).attr('id');\n\n        if (!id) {\n          id = Util.getUID(NAME$8);\n          $(config.target).attr('id', id);\n        }\n\n        config.target = \"#\" + id;\n      }\n\n      Util.typeCheckConfig(NAME$8, config, DefaultType$6);\n      return config;\n    };\n\n    _proto._getScrollTop = function _getScrollTop() {\n      return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;\n    };\n\n    _proto._getScrollHeight = function _getScrollHeight() {\n      return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);\n    };\n\n    _proto._getOffsetHeight = function _getOffsetHeight() {\n      return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;\n    };\n\n    _proto._process = function _process() {\n      var scrollTop = this._getScrollTop() + this._config.offset;\n\n      var scrollHeight = this._getScrollHeight();\n\n      var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();\n\n      if (this._scrollHeight !== scrollHeight) {\n        this.refresh();\n      }\n\n      if (scrollTop >= maxScroll) {\n        var target = this._targets[this._targets.length - 1];\n\n        if (this._activeTarget !== target) {\n          this._activate(target);\n        }\n\n        return;\n      }\n\n      if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n        this._activeTarget = null;\n\n        this._clear();\n\n        return;\n      }\n\n      var offsetLength = this._offsets.length;\n\n      for (var i = offsetLength; i--;) {\n        var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);\n\n        if (isActiveTarget) {\n          this._activate(this._targets[i]);\n        }\n      }\n    };\n\n    _proto._activate = function _activate(target) {\n      this._activeTarget = target;\n\n      this._clear();\n\n      var queries = this._selector.split(',').map(function (selector) {\n        return selector + \"[data-target=\\\"\" + target + \"\\\"],\" + selector + \"[href=\\\"\" + target + \"\\\"]\";\n      });\n\n      var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));\n\n      if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) {\n        $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE);\n        $link.addClass(ClassName$8.ACTIVE);\n      } else {\n        // Set triggered link as active\n        $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active\n        // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n\n        $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_LINKS + \", \" + Selector$8.LIST_ITEMS).addClass(ClassName$8.ACTIVE); // Handle special case when .nav-link is inside .nav-item\n\n        $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_ITEMS).children(Selector$8.NAV_LINKS).addClass(ClassName$8.ACTIVE);\n      }\n\n      $(this._scrollElement).trigger(Event$8.ACTIVATE, {\n        relatedTarget: target\n      });\n    };\n\n    _proto._clear = function _clear() {\n      [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {\n        return node.classList.contains(ClassName$8.ACTIVE);\n      }).forEach(function (node) {\n        return node.classList.remove(ClassName$8.ACTIVE);\n      });\n    } // Static\n    ;\n\n    ScrollSpy._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var data = $(this).data(DATA_KEY$8);\n\n        var _config = typeof config === 'object' && config;\n\n        if (!data) {\n          data = new ScrollSpy(this, _config);\n          $(this).data(DATA_KEY$8, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(ScrollSpy, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$8;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default$6;\n      }\n    }]);\n\n    return ScrollSpy;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(window).on(Event$8.LOAD_DATA_API, function () {\n    var scrollSpys = [].slice.call(document.querySelectorAll(Selector$8.DATA_SPY));\n    var scrollSpysLength = scrollSpys.length;\n\n    for (var i = scrollSpysLength; i--;) {\n      var $spy = $(scrollSpys[i]);\n\n      ScrollSpy._jQueryInterface.call($spy, $spy.data());\n    }\n  });\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME$8] = ScrollSpy._jQueryInterface;\n  $.fn[NAME$8].Constructor = ScrollSpy;\n\n  $.fn[NAME$8].noConflict = function () {\n    $.fn[NAME$8] = JQUERY_NO_CONFLICT$8;\n    return ScrollSpy._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$9 = 'tab';\n  var VERSION$9 = '4.4.1';\n  var DATA_KEY$9 = 'bs.tab';\n  var EVENT_KEY$9 = \".\" + DATA_KEY$9;\n  var DATA_API_KEY$7 = '.data-api';\n  var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];\n  var Event$9 = {\n    HIDE: \"hide\" + EVENT_KEY$9,\n    HIDDEN: \"hidden\" + EVENT_KEY$9,\n    SHOW: \"show\" + EVENT_KEY$9,\n    SHOWN: \"shown\" + EVENT_KEY$9,\n    CLICK_DATA_API: \"click\" + EVENT_KEY$9 + DATA_API_KEY$7\n  };\n  var ClassName$9 = {\n    DROPDOWN_MENU: 'dropdown-menu',\n    ACTIVE: 'active',\n    DISABLED: 'disabled',\n    FADE: 'fade',\n    SHOW: 'show'\n  };\n  var Selector$9 = {\n    DROPDOWN: '.dropdown',\n    NAV_LIST_GROUP: '.nav, .list-group',\n    ACTIVE: '.active',\n    ACTIVE_UL: '> li > .active',\n    DATA_TOGGLE: '[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]',\n    DROPDOWN_TOGGLE: '.dropdown-toggle',\n    DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Tab =\n  /*#__PURE__*/\n  function () {\n    function Tab(element) {\n      this._element = element;\n    } // Getters\n\n\n    var _proto = Tab.prototype;\n\n    // Public\n    _proto.show = function show() {\n      var _this = this;\n\n      if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) {\n        return;\n      }\n\n      var target;\n      var previous;\n      var listElement = $(this._element).closest(Selector$9.NAV_LIST_GROUP)[0];\n      var selector = Util.getSelectorFromElement(this._element);\n\n      if (listElement) {\n        var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;\n        previous = $.makeArray($(listElement).find(itemSelector));\n        previous = previous[previous.length - 1];\n      }\n\n      var hideEvent = $.Event(Event$9.HIDE, {\n        relatedTarget: this._element\n      });\n      var showEvent = $.Event(Event$9.SHOW, {\n        relatedTarget: previous\n      });\n\n      if (previous) {\n        $(previous).trigger(hideEvent);\n      }\n\n      $(this._element).trigger(showEvent);\n\n      if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (selector) {\n        target = document.querySelector(selector);\n      }\n\n      this._activate(this._element, listElement);\n\n      var complete = function complete() {\n        var hiddenEvent = $.Event(Event$9.HIDDEN, {\n          relatedTarget: _this._element\n        });\n        var shownEvent = $.Event(Event$9.SHOWN, {\n          relatedTarget: previous\n        });\n        $(previous).trigger(hiddenEvent);\n        $(_this._element).trigger(shownEvent);\n      };\n\n      if (target) {\n        this._activate(target, target.parentNode, complete);\n      } else {\n        complete();\n      }\n    };\n\n    _proto.dispose = function dispose() {\n      $.removeData(this._element, DATA_KEY$9);\n      this._element = null;\n    } // Private\n    ;\n\n    _proto._activate = function _activate(element, container, callback) {\n      var _this2 = this;\n\n      var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE);\n      var active = activeElements[0];\n      var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE);\n\n      var complete = function complete() {\n        return _this2._transitionComplete(element, active, callback);\n      };\n\n      if (active && isTransitioning) {\n        var transitionDuration = Util.getTransitionDurationFromElement(active);\n        $(active).removeClass(ClassName$9.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n      } else {\n        complete();\n      }\n    };\n\n    _proto._transitionComplete = function _transitionComplete(element, active, callback) {\n      if (active) {\n        $(active).removeClass(ClassName$9.ACTIVE);\n        var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0];\n\n        if (dropdownChild) {\n          $(dropdownChild).removeClass(ClassName$9.ACTIVE);\n        }\n\n        if (active.getAttribute('role') === 'tab') {\n          active.setAttribute('aria-selected', false);\n        }\n      }\n\n      $(element).addClass(ClassName$9.ACTIVE);\n\n      if (element.getAttribute('role') === 'tab') {\n        element.setAttribute('aria-selected', true);\n      }\n\n      Util.reflow(element);\n\n      if (element.classList.contains(ClassName$9.FADE)) {\n        element.classList.add(ClassName$9.SHOW);\n      }\n\n      if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) {\n        var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0];\n\n        if (dropdownElement) {\n          var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE));\n          $(dropdownToggleList).addClass(ClassName$9.ACTIVE);\n        }\n\n        element.setAttribute('aria-expanded', true);\n      }\n\n      if (callback) {\n        callback();\n      }\n    } // Static\n    ;\n\n    Tab._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var $this = $(this);\n        var data = $this.data(DATA_KEY$9);\n\n        if (!data) {\n          data = new Tab(this);\n          $this.data(DATA_KEY$9, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config]();\n        }\n      });\n    };\n\n    _createClass(Tab, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$9;\n      }\n    }]);\n\n    return Tab;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * Data Api implementation\n   * ------------------------------------------------------------------------\n   */\n\n\n  $(document).on(Event$9.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {\n    event.preventDefault();\n\n    Tab._jQueryInterface.call($(this), 'show');\n  });\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n  $.fn[NAME$9] = Tab._jQueryInterface;\n  $.fn[NAME$9].Constructor = Tab;\n\n  $.fn[NAME$9].noConflict = function () {\n    $.fn[NAME$9] = JQUERY_NO_CONFLICT$9;\n    return Tab._jQueryInterface;\n  };\n\n  /**\n   * ------------------------------------------------------------------------\n   * Constants\n   * ------------------------------------------------------------------------\n   */\n\n  var NAME$a = 'toast';\n  var VERSION$a = '4.4.1';\n  var DATA_KEY$a = 'bs.toast';\n  var EVENT_KEY$a = \".\" + DATA_KEY$a;\n  var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];\n  var Event$a = {\n    CLICK_DISMISS: \"click.dismiss\" + EVENT_KEY$a,\n    HIDE: \"hide\" + EVENT_KEY$a,\n    HIDDEN: \"hidden\" + EVENT_KEY$a,\n    SHOW: \"show\" + EVENT_KEY$a,\n    SHOWN: \"shown\" + EVENT_KEY$a\n  };\n  var ClassName$a = {\n    FADE: 'fade',\n    HIDE: 'hide',\n    SHOW: 'show',\n    SHOWING: 'showing'\n  };\n  var DefaultType$7 = {\n    animation: 'boolean',\n    autohide: 'boolean',\n    delay: 'number'\n  };\n  var Default$7 = {\n    animation: true,\n    autohide: true,\n    delay: 500\n  };\n  var Selector$a = {\n    DATA_DISMISS: '[data-dismiss=\"toast\"]'\n  };\n  /**\n   * ------------------------------------------------------------------------\n   * Class Definition\n   * ------------------------------------------------------------------------\n   */\n\n  var Toast =\n  /*#__PURE__*/\n  function () {\n    function Toast(element, config) {\n      this._element = element;\n      this._config = this._getConfig(config);\n      this._timeout = null;\n\n      this._setListeners();\n    } // Getters\n\n\n    var _proto = Toast.prototype;\n\n    // Public\n    _proto.show = function show() {\n      var _this = this;\n\n      var showEvent = $.Event(Event$a.SHOW);\n      $(this._element).trigger(showEvent);\n\n      if (showEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      if (this._config.animation) {\n        this._element.classList.add(ClassName$a.FADE);\n      }\n\n      var complete = function complete() {\n        _this._element.classList.remove(ClassName$a.SHOWING);\n\n        _this._element.classList.add(ClassName$a.SHOW);\n\n        $(_this._element).trigger(Event$a.SHOWN);\n\n        if (_this._config.autohide) {\n          _this._timeout = setTimeout(function () {\n            _this.hide();\n          }, _this._config.delay);\n        }\n      };\n\n      this._element.classList.remove(ClassName$a.HIDE);\n\n      Util.reflow(this._element);\n\n      this._element.classList.add(ClassName$a.SHOWING);\n\n      if (this._config.animation) {\n        var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n        $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n      } else {\n        complete();\n      }\n    };\n\n    _proto.hide = function hide() {\n      if (!this._element.classList.contains(ClassName$a.SHOW)) {\n        return;\n      }\n\n      var hideEvent = $.Event(Event$a.HIDE);\n      $(this._element).trigger(hideEvent);\n\n      if (hideEvent.isDefaultPrevented()) {\n        return;\n      }\n\n      this._close();\n    };\n\n    _proto.dispose = function dispose() {\n      clearTimeout(this._timeout);\n      this._timeout = null;\n\n      if (this._element.classList.contains(ClassName$a.SHOW)) {\n        this._element.classList.remove(ClassName$a.SHOW);\n      }\n\n      $(this._element).off(Event$a.CLICK_DISMISS);\n      $.removeData(this._element, DATA_KEY$a);\n      this._element = null;\n      this._config = null;\n    } // Private\n    ;\n\n    _proto._getConfig = function _getConfig(config) {\n      config = _objectSpread2({}, Default$7, {}, $(this._element).data(), {}, typeof config === 'object' && config ? config : {});\n      Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);\n      return config;\n    };\n\n    _proto._setListeners = function _setListeners() {\n      var _this2 = this;\n\n      $(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {\n        return _this2.hide();\n      });\n    };\n\n    _proto._close = function _close() {\n      var _this3 = this;\n\n      var complete = function complete() {\n        _this3._element.classList.add(ClassName$a.HIDE);\n\n        $(_this3._element).trigger(Event$a.HIDDEN);\n      };\n\n      this._element.classList.remove(ClassName$a.SHOW);\n\n      if (this._config.animation) {\n        var transitionDuration = Util.getTransitionDurationFromElement(this._element);\n        $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);\n      } else {\n        complete();\n      }\n    } // Static\n    ;\n\n    Toast._jQueryInterface = function _jQueryInterface(config) {\n      return this.each(function () {\n        var $element = $(this);\n        var data = $element.data(DATA_KEY$a);\n\n        var _config = typeof config === 'object' && config;\n\n        if (!data) {\n          data = new Toast(this, _config);\n          $element.data(DATA_KEY$a, data);\n        }\n\n        if (typeof config === 'string') {\n          if (typeof data[config] === 'undefined') {\n            throw new TypeError(\"No method named \\\"\" + config + \"\\\"\");\n          }\n\n          data[config](this);\n        }\n      });\n    };\n\n    _createClass(Toast, null, [{\n      key: \"VERSION\",\n      get: function get() {\n        return VERSION$a;\n      }\n    }, {\n      key: \"DefaultType\",\n      get: function get() {\n        return DefaultType$7;\n      }\n    }, {\n      key: \"Default\",\n      get: function get() {\n        return Default$7;\n      }\n    }]);\n\n    return Toast;\n  }();\n  /**\n   * ------------------------------------------------------------------------\n   * jQuery\n   * ------------------------------------------------------------------------\n   */\n\n\n  $.fn[NAME$a] = Toast._jQueryInterface;\n  $.fn[NAME$a].Constructor = Toast;\n\n  $.fn[NAME$a].noConflict = function () {\n    $.fn[NAME$a] = JQUERY_NO_CONFLICT$a;\n    return Toast._jQueryInterface;\n  };\n\n  exports.Alert = Alert;\n  exports.Button = Button;\n  exports.Carousel = Carousel;\n  exports.Collapse = Collapse;\n  exports.Dropdown = Dropdown;\n  exports.Modal = Modal;\n  exports.Popover = Popover;\n  exports.Scrollspy = ScrollSpy;\n  exports.Tab = Tab;\n  exports.Toast = Toast;\n  exports.Tooltip = Tooltip;\n  exports.Util = Util;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=bootstrap.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL2Jvb3RzdHJhcC9kaXN0L2pzL2Jvb3RzdHJhcC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uLi9ub2RlX21vZHVsZ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QodGhpcykuZGF0YShEQVRBX0tFWSQ0KTtcblxuICAgICAgICB2YXIgX2NvbmZpZyA9IHR5cGVvZiBjb25maWcgPT09ICdvYmplY3QnID8gY29uZmlnIDogbnVsbDtcblxuICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICBkYXRhID0gbmV3IERyb3Bkb3duKHRoaXMsIF9jb25maWcpO1xuICAgICAgICAgICQodGhpcykuZGF0YShEQVRBX0tFWSQ0LCBkYXRhKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2YgY29uZmlnID09PSAnc3RyaW5nJykge1xuICAgICAgICAgIGlmICh0eXBlb2YgZGF0YVtjb25maWddID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIk5vIG1ldGhvZCBuYW1lZCBcXFwiXCIgKyBjb25maWcgKyBcIlxcXCJcIik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgZGF0YVtjb25maWddKCk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBEcm9wZG93bi5fY2xlYXJNZW51cyA9IGZ1bmN0aW9uIF9jbGVhck1lbnVzKGV2ZW50KSB7XG4gICAgICBpZiAoZXZlbnQgJiYgKGV2ZW50LndoaWNoID09PSBSSUdIVF9NT1VTRV9CVVRUT05fV0hJQ0ggfHwgZXZlbnQudHlwZSA9PT0gJ2tleXVwJyAmJiBldmVudC53aGljaCAhPT0gVEFCX0tFWUNPREUpKSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgdmFyIHRvZ2dsZXMgPSBbXS5zbGljZS5jYWxsKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoU2VsZWN0b3IkNC5EQVRBX1RPR0dMRSkpO1xuXG4gICAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gdG9nZ2xlcy5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgICAgICB2YXIgcGF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lmaWVyczoge1xuICAgICAgICAgIG9mZnNldDogdGhpcy5fZ2V0T2Zmc2V0KCksXG4gICAgICAgICAgZmxpcDoge1xuICAgICAgICAgICAgYmVoYXZpb3I6IHRoaXMuY29uZmlnLmZhbGxiYWNrUGxhY2VtZW50XG4gICAgICAgICAgfSxcbiAgICAgICAgICBhcnJvdzoge1xuICAgICAgICAgICAgZWxlbWVudDogU2VsZWN0b3IkNi5BUlJPV1xuICAgICAgICAgIH0sXG4gICAgICAgICAgcHJldmVudE92ZXJmbG93OiB7XG4gICAgICAgICAgICBib3VuZGFyaWVzRWxlbWVudDogdGhpcy5jb25maWcuYm91bmRhcnlcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uQ3JlYXRlOiBmdW5jdGlvbiBvbkNyZWF0ZShkYXRhKSB7XG4gICAgICAgICAgaWYgKGRhdGEub3JpZ2luYWxQbGFjZW1lbnQgIT09IGRhdGEucGxhY2VtZW50KSB7XG4gICAgICAgICAgICBfdGhpczMuX2hhbmRsZVBvcHBlclBsYWNlbWVudENoYW5nZShkYXRhKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIG9uVXBkYXRlOiBmdW5jdGlvbiBvblVwZGF0ZShkYXRhKSB7XG4gICAgICAgICAgcmV0dXJuIF90aGlzMy5faGFuZGxlUG9wcGVyUGxhY2VtZW50Q2hhbmdlKGRhdGEpO1xuICAgICAgICB9XG4gICAgICB9O1xuICAgICAgcmV0dXJuIF9vYmplY3RTcHJlYWQyKHt9LCBkZWZhdWx0QnNDb25maWcsIHt9LCB0aGlzLmNvbmZpZy5wb3BwZXJDb25maWcpO1xuICAgIH07XG5cbiAgICBfcHJvdG8uX2dldE9mZnNldCA9IGZ1bmN0aW9uIF9nZXRPZmZzZXQoKSB7XG4gICAgICB2YXIgX3RoaXM0ID0gdGhpcztcblxuICAgICAgdmFyIG9mZnNldCA9IHt9O1xuXG4gICAgICBpZiAodHlwZW9mIHRoaXMuY29uZmln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F9BVFRSSUJVVEVTLmluZGV4T2YoZGF0YUF0dHIpICE9PSAtMSkge1xuICAgICAgICAgIGRlbGV0ZSBkYXRhQXR0cmlidXRlc1tkYXRhQXR0cl07XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgICAgY29uZmlnID0gX29iamVjdFNwcmVhZDIoe30sIHRoaXMuY29uc3RydWN0b3IuRGVmYXVsdCwge30sIGRhdGFBdHRyaWJ1dGVzLCB7fSwgdHlwZW9mIGNvbmZpZyA9PT0gJ29iamVjdCcgJiYgY29uZmlnID8gY29uZmlnIDoge30pO1xuXG4gICAgICBpZiAodHlwZW9mIGNvbmZpZy5kZWxheSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgY29uZmlnLmRlbGF5ID0ge1xuICAgICAgICAgIHNob3c6IGNvbmZpZy5kZWxheSxcbiAgICAgICAgICBoaWRlOiBjb25maWcuZGVsYXlcbiAgICAgICAgfTtcbiAgICAgIH1cblxuICAgICAgaWYgKHR5cGVvZiBjb25maWcudGl0bGUgPT09ICdudW1iZXInKSB7XG4gICAgICAgIGNvbmZpZy50aXRsZSA9IGNvbmZpZy50aXRsZS50b1N0cmluZygpO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIGNvbmZpZy5jb250ZW50ID09PSAnbnVtYmVyJykge1xuICAgICAgICBjb25maWcuY29udGVudCA9IGNvbmZpZy5jb250ZW50LnRvU3RyaW5nKCk7XG4gICAgICB9XG5cbiAgICAgIFV0aWwudHlwZUNoZWNrQ29uZmlnKE5BTUUkNiwgY29uZmlnLCB0aGlzLmNvbnN0cnVjdG9yLkRlZmF1bHRUeXBlKTtcblxuICAgICAgaWYgKGNvbmZpZy5zYW5pdGl6ZSkge1xuICAgICAgICBjb25maWcudGVtcGxhdGUgPSBzYW5pdGl6ZUh0bWwoY29uZmlnLnRlbXBsYXRlLCBjb25maWcud2hpdGVMaXN0LCBjb25maWcuc2FuaXRpemVGbik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB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Muam9pbignJykpO1xuICAgICAgfVxuICAgIH0gLy8gU3RhdGljXG4gICAgO1xuXG4gICAgUG9wb3Zlci5falF1ZXJ5SW50ZXJmYWNlID0gZnVuY3Rpb24gX2pRdWVyeUludGVyZmFjZShjb25maWcpIHtcbiAgICAgIHJldHVybiB0aGlzLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgZGF0YSA9ICQodGhpcykuZGF0YShEQVRBX0tFWSQ3KTtcblxuICAgICAgICB2YXIgX2NvbmZpZyA9IHR5cGVvZiBjb25maWcgPT09ICdvYmplY3QnID8gY29uZmlnIDogbnVsbDtcblxuICAgICAgICBpZiAoIWRhdGEgJiYgL2Rpc3Bvc2V8aGlkZS8udGVzdChjb25maWcpKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFkYXRhKSB7XG4gICAgICAgICAgZGF0YSA9IG5ldyBQb3BvdmVyKHRoaXMsIF9jb25maWcpO1xuICAgICAgICAgICQodGhpcykuZGF0YShEQVRBX0tFWSQ3LCBkYXRhKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0eXBlb2YgY29uZmlnID09PSAnc3RyaW5nJykge1xuICAgICAgICAgIGlmICh0eXBlb2YgZGF0YVtjb25maWddID09PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIk5vIG1ldGhvZCBuYW1lZCBcXFwiXCIgKyBjb25maWcgKyBcIlxcXCJcIik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgZGF0YVtjb25maWddKCk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH07XG5cbiAgICBfY3JlYXRlQ2xhc3MoUG9wb3ZlciwgbnVsbCwgW3tcbiAgICAgIGtleTogXCJWRVJTSU9OXCIsXG4gICAgICAvLyBHZXR0ZXJzXG4gICAgICBnZXQ6IGZ1bmN0aW9uIGdldCgpIHtcbiAgICAgICAgcmV0dXJ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QUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/bootstrap/dist/js/bootstrap.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/jquery-mousewheel/jquery.mousewheel.js":
-/*!**************************************************************!*\
-  !*** ../node_modules/jquery-mousewheel/jquery.mousewheel.js ***!
-  \**************************************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery Mousewheel 3.1.13\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n */\n\n(function (factory) {\n    if ( true ) {\n        // AMD. Register as an anonymous module.\n        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"../node_modules/jquery/dist/jquery.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n    } else {}\n}(function ($) {\n\n    var toFix  = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],\n        toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?\n                    ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],\n        slice  = Array.prototype.slice,\n        nullLowestDeltaTimeout, lowestDelta;\n\n    if ( $.event.fixHooks ) {\n        for ( var i = toFix.length; i; ) {\n            $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;\n        }\n    }\n\n    var special = $.event.special.mousewheel = {\n        version: '3.1.12',\n\n        setup: function() {\n            if ( this.addEventListener ) {\n                for ( var i = toBind.length; i; ) {\n                    this.addEventListener( toBind[--i], handler, false );\n                }\n            } else {\n                this.onmousewheel = handler;\n            }\n            // Store the line height and page height for this particular element\n            $.data(this, 'mousewheel-line-height', special.getLineHeight(this));\n            $.data(this, 'mousewheel-page-height', special.getPageHeight(this));\n        },\n\n        teardown: function() {\n            if ( this.removeEventListener ) {\n                for ( var i = toBind.length; i; ) {\n                    this.removeEventListener( toBind[--i], handler, false );\n                }\n            } else {\n                this.onmousewheel = null;\n            }\n            // Clean up the data we added to the element\n            $.removeData(this, 'mousewheel-line-height');\n            $.removeData(this, 'mousewheel-page-height');\n        },\n\n        getLineHeight: function(elem) {\n            var $elem = $(elem),\n                $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();\n            if (!$parent.length) {\n                $parent = $('body');\n            }\n            return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;\n        },\n\n        getPageHeight: function(elem) {\n            return $(elem).height();\n        },\n\n        settings: {\n            adjustOldDeltas: true, // see shouldAdjustOldDeltas() below\n            normalizeOffset: true  // calls getBoundingClientRect for each event\n        }\n    };\n\n    $.fn.extend({\n        mousewheel: function(fn) {\n            return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');\n        },\n\n        unmousewheel: function(fn) {\n            return this.unbind('mousewheel', fn);\n        }\n    });\n\n\n    function handler(event) {\n        var orgEvent   = event || window.event,\n            args       = slice.call(arguments, 1),\n            delta      = 0,\n            deltaX     = 0,\n            deltaY     = 0,\n            absDelta   = 0,\n            offsetX    = 0,\n            offsetY    = 0;\n        event = $.event.fix(orgEvent);\n        event.type = 'mousewheel';\n\n        // Old school scrollwheel delta\n        if ( 'detail'      in orgEvent ) { deltaY = orgEvent.detail * -1;      }\n        if ( 'wheelDelta'  in orgEvent ) { deltaY = orgEvent.wheelDelta;       }\n        if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY;      }\n        if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }\n\n        // Firefox < 17 horizontal scrolling related to DOMMouseScroll event\n        if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\n            deltaX = deltaY * -1;\n            deltaY = 0;\n        }\n\n        // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy\n        delta = deltaY === 0 ? deltaX : deltaY;\n\n        // New school wheel delta (wheel event)\n        if ( 'deltaY' in orgEvent ) {\n            deltaY = orgEvent.deltaY * -1;\n            delta  = deltaY;\n        }\n        if ( 'deltaX' in orgEvent ) {\n            deltaX = orgEvent.deltaX;\n            if ( deltaY === 0 ) { delta  = deltaX * -1; }\n        }\n\n        // No change actually happened, no reason to go any further\n        if ( deltaY === 0 && deltaX === 0 ) { return; }\n\n        // Need to convert lines and pages to pixels if we aren't already in pixels\n        // There are three delta modes:\n        //   * deltaMode 0 is by pixels, nothing to do\n        //   * deltaMode 1 is by lines\n        //   * deltaMode 2 is by pages\n        if ( orgEvent.deltaMode === 1 ) {\n            var lineHeight = $.data(this, 'mousewheel-line-height');\n            delta  *= lineHeight;\n            deltaY *= lineHeight;\n            deltaX *= lineHeight;\n        } else if ( orgEvent.deltaMode === 2 ) {\n            var pageHeight = $.data(this, 'mousewheel-page-height');\n            delta  *= pageHeight;\n            deltaY *= pageHeight;\n            deltaX *= pageHeight;\n        }\n\n        // Store lowest absolute delta to normalize the delta values\n        absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );\n\n        if ( !lowestDelta || absDelta < lowestDelta ) {\n            lowestDelta = absDelta;\n\n            // Adjust older deltas if necessary\n            if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\n                lowestDelta /= 40;\n            }\n        }\n\n        // Adjust older deltas if necessary\n        if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\n            // Divide all the things by 40!\n            delta  /= 40;\n            deltaX /= 40;\n            deltaY /= 40;\n        }\n\n        // Get a whole, normalized value for the deltas\n        delta  = Math[ delta  >= 1 ? 'floor' : 'ceil' ](delta  / lowestDelta);\n        deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);\n        deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);\n\n        // Normalise offsetX and offsetY properties\n        if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {\n            var boundingRect = this.getBoundingClientRect();\n            offsetX = event.clientX - boundingRect.left;\n            offsetY = event.clientY - boundingRect.top;\n        }\n\n        // Add information to the event object\n        event.deltaX = deltaX;\n        event.deltaY = deltaY;\n        event.deltaFactor = lowestDelta;\n        event.offsetX = offsetX;\n        event.offsetY = offsetY;\n        // Go ahead and set deltaMode to 0 since we converted to pixels\n        // Although this is a little odd since we overwrite the deltaX/Y\n        // properties with normalized deltas.\n        event.deltaMode = 0;\n\n        // Add event and delta to the front of the arguments\n        args.unshift(event, delta, deltaX, deltaY);\n\n        // Clearout lowestDelta after sometime to better\n        // handle multiple device types that give different\n        // a different lowestDelta\n        // Ex: trackpad = 3 and mouse wheel = 120\n        if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }\n        nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);\n\n        return ($.event.dispatch || $.event.handle).apply(this, args);\n    }\n\n    function nullLowestDelta() {\n        lowestDelta = null;\n    }\n\n    function shouldAdjustOldDeltas(orgEvent, absDelta) {\n        // If this is an older event and the delta is divisable by 120,\n        // then we are assuming that the browser is treating this as an\n        // older mouse wheel event and that we should divide the deltas\n        // by 40 to try and get a more usable deltaFactor.\n        // Side note, this actually impacts the reported scroll distance\n        // in older browsers and can cause scrolling to be slower than native.\n        // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.\n        return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;\n    }\n\n}));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL2pxdWVyeS1tb3VzZXdoZWVsL2pxdWVyeS5tb3VzZXdoZWVsLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4uL25vZGVfbW9kdWxlcy9qcXVlcnktbW91c2V3aGVlbC9qcXVlcnkubW91c2V3aGVlbC5qcz9lMWI1Il0sInNvdXJjZXNDb250ZW50Ijpb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ucHJvdG90eXBlLnNsaWNlLFxuICAgICAgICBudWxsTG93ZXN0RGVsdGFUaW1lb3V0LCBsb3dlc3REZWx0YTtcblxuICAgIGlmICggJC5ldmVudC5maXhIb29rcyApIHtcbiAgICAgICAgZm9yICggdmFyIGkgPSB0b0ZpeC5sZW5ndGg7IGk7ICkge1xuICAgICAgICAgICAgJC5ldmVudC5maXhIb29rc1sgdG9GaXhbLS1pXSBdID0gJC5ldmVudC5tb3VzZUhvb2tzO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgdmFyIHNwZWNpYWwgPSAkLmV2ZW50LnNwZWNpYWwubW91c2V3aGVlbCA9IHtcbiAgICAgICAgdmVyc2lvbjogJzMuMS4xMicsXG5cbiAgICAgICAgc2V0dXA6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgaWYgKCB0aGlzLmFkZEV2ZW50TGlzdGVuZXIgKSB7XG4gICAgICAgICAgICAgICAgZm9yICggdmFyIGkgPSB0b0JpbmQubGVuZ3RoOyBpOyApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hZGRFdmVudExpc3RlbmVyKCB0b0JpbmRbLS1pXSwgaGFuZGxlciwgZmFsc2UgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMub25tb3VzZXdoZWVsID0gaGFuZGxlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFN0b3JlIHRoZSBsaW5lIGhlaWdodCBhbmQgcGFnZSBoZWlnaHQgZm9yIHRoaXMgcGFydGljdWxhciBlbGVtZW50XG4gICAgICAgICAgICAkLmRhdGEodGhpcywgJ21vdXNld2hlZWwtbGluZS1oZWlnaHQnLCBzcGVjaWFsLmdldExpbmVIZWlnaHQodGhpcykpO1xuICAgICAgICAgICAgJC5kYXRhKHRoaXMsICdtb3VzZXdoZWVsLXBhZ2UtaGVpZ2h0Jywgc3BlY2lhbC5nZXRQYWdlSGVpZ2h0KHRoaXMpKTtcbiAgICAgICAgfSxcblxuICAgICAgICB0ZWFyZG93bjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBpZiAoIHRoaXMucmVtb3ZlRXZlbnRMaXN0ZW5lciApIHtcbiAgICAgICAgICAgICAgICBmb3IgKCB2YXIgaSA9IHRvQmluZC5sZW5ndGg7IGk7ICkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUV2ZW50TGlzdGVuZXIoIHRvQmluZFstLWldLCBoYW5kbGVyLCBmYWxzZSApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5vbm1vdXNld2hlZWwgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gQ2xlYW4gdXAgdGhlIGRhdGEgd2UgYWRkZWQgdG8gdGhlIGVsZW1lbnRcbiAgICAgICAgICAgICQucmVtb3ZlRGF0YSh0aGlzLCAnbW91c2V3aGVlbC1saW5lLWhlaWdodCcpO1xuICAgICAgICAgICAgJC5yZW1vdmVEYXRhKHRoaXMsICdtb3VzZXdoZWVsLXBhZ2UtaGVpZ2h0Jyk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgZ2V0TGluZUhlaWdodDogZnVuY3Rpb24oZWxlbSkge1xuICAgICAgICAgICAgdmFyICRlbGVtID0gJChlbGVtKSxcbiAgICAgICAgICAgICAgICAkcGFyZW50ID0gJGVsZW1bJ29mZnNldFBhcmVudCcgaW4gJC5mbiA/ICdvZmZzZXRQYXJlbnQnIDogJ3BhcmVudCddKCk7XG4gICAgICAgICAgICBpZiAoISRwYXJlbnQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgJHBhcmVudCA9ICQoJ2JvZHknKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBwYXJzZUludCgkcGFyZW50LmNzcygnZm9udFNpemUnKSwgMTApIHx8IHBhcnNlSW50KCRlbGVtLmNzcygnZm9udFNpemUnKSwgMTApIHx8IDE2O1xuICAgICAgICB9LFxuXG4gICAgICAgIGdldFBhZ2VIZWlnaHQ6IGZ1bmN0aW9uKGVsZW0pIHtcbiAgICAgICAgICAgIHJldHVybiAkKGVsZW0pLmhlaWdodCgpO1xuICAgICAgICB9LFxuXG4gICAgICAgIHNldHRpbmdzOiB7XG4gICAgICAgICAgICBhZGp1c3RPbGREZWx0YXM6IHRydWUsIC8vIHNlZSBzaG91bGRBZGp1c3RPbGREZWx0YXMoKSBiZWxvd1xuICAgICAgICAgICAgbm9ybWFsaXplT2Zmc2V0OiB0cnVlICAvLyBjYWxscyBnZXRCb3VuZGluZ0NsaWVudFJlY3QgZm9yIGVhY2ggZXZlbnRcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAkLmZuLmV4dGVuZCh7XG4gICAgICAgIG1vdXNld2hlZWw6IGZ1bmN0aW9uKGZuKSB7XG4gICAgICAgICAgICByZXR1cm4gZm4gPyB0aGlzLmJpbmQoJ21vdXNld2hlZWwnLCBmbikgOiB0aGlzLnRyaWdnZXIoJ21vdXNld2hlZWwnKTtcbiAgICAgICAgfSxcblxuICAgICAgICB1bm1vdXNld2hlZWw6IGZ1bmN0aW9uKGZuKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy51bmJpbmQoJ21vdXNld2hlZWwnLCBmbik7XG4gICAgICAgIH1cbiAgICB9KTtcblxuXG4gICAgZnVuY3Rpb24gaGFuZGxlcihldmVudCkge1xuICAgICAgICB2YXIgb3JnRXZlbnQgICA9IGV2ZW50IHx8IHdpbmRvdy5ldmVudCxcbiAgICAgICAgICAgIGFyZ3MgICAgICAgPSBzbGljZS5jYWxsKGFyZ3VtZW50cywgMSksXG4gICAgICAgICAgICBkZWx0YSAgICAgID0gMCxcbiAgICAgICAgICAgIGRlbHRhWCAgICAgPSAwLFxuICAgICAgICAgICAgZGVsdGFZICAgICA9IDAsXG4gICAgICAgICAgICBhYnNEZWx0YSAgID0gMCxcbiAg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TtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/jquery-mousewheel/jquery.mousewheel.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/jquery/dist/jquery.js":
-/*!*********************************************!*\
-  !*** ../node_modules/jquery/dist/jquery.js ***!
-  \*********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\n * jQuery JavaScript Library v3.5.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2020-05-04T22:49Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif (  true && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n      // Support: Chrome <=57, Firefox <=52\n      // In some browsers, typeof returns \"function\" for HTML <object> elements\n      // (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n      // We don't want to classify *any* DOM node as a function.\n      return typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\n  };\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.5.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\nfunction( _i, name ) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.5\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2020-03-14\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem.namespaceURI,\n\t\tdocElem = ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n  return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n};\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the master Deferred\n\t\t\tmaster = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tmaster.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( master.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn master.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\n\t\t}\n\n\t\treturn master.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\tvalue :\n\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (#9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see #8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (#13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (#13208)\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (#504, #13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\n\twhich: function( event ) {\n\t\tvar button = event.button;\n\n\t\t// Add which for key events\n\t\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\n\t\t\treturn event.charCode != null ? event.charCode : event.keyCode;\n\t\t}\n\n\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\n\t\t\tif ( button & 1 ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif ( button & 2 ) {\n\t\t\t\treturn 3;\n\t\t\t}\n\n\t\t\tif ( button & 4 ) {\n\t\t\t\treturn 2;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn event.which;\n\t}\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px\";\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = parseInt( trStyle.height ) > 3;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, #12537)\n\t//   .css('--customProperty) (#3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trcustomProp = /^--/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t\t} ) :\n\t\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\n\t\t\t\t// Use proper attribute retrieval(#12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, curValue, clazz, j, finalValue,\n\t\t\ti = 0;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclasses = classesToArray( value );\n\n\t\tif ( classes.length ) {\n\t\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\t\tcurValue = getClass( elem );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( ( clazz = classes[ j++ ] ) ) {\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\telem.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar className, i, self, classNames;\n\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\ti = 0;\n\t\t\t\tself = jQuery( this );\n\t\t\t\tclassNames = classesToArray( value );\n\n\t\t\t\twhile ( ( className = classNames[ i++ ] ) ) {\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = (\n\t\t\t\t\tdataPriv.get( cur, \"events\" ) || Object.create( null )\n\t\t\t\t)[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} )\n\t\t.filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} )\n\t\t.map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\toriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script\n\t\t\tif ( !isSuccess && jQuery.inArray( \"script\", s.dataTypes ) > -1 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (#11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tif ( typeof props.top === \"number\" ) {\n\t\t\t\tprops.top += \"px\";\n\t\t\t}\n\t\t\tif ( typeof props.left === \"number\" ) {\n\t\t\t\tprops.left += \"px\";\n\t\t\t}\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name },\n\t\tfunction( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each( ( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t} );\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( true ) {\n\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\treturn jQuery;\n\t}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL2pxdWVyeS9kaXN0L2pxdWVyeS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uLi9ub2RlX21vZHVsZXMvanF1ZXJ5L2Rpc3QvanF1ZXJ5LmpzP2E4ODEiXSwic291cmNlc0NvbnRlbnQiOlsiLyohXG4gKiBqUXVlcnkgSmF2YVNjcmlwdCBMaWJyYXJ5IHYzLjUuMVxuICogaHR0cHM6Ly9qcXVlcnkuY29tL1xuICpcbiAqIEluY2x1ZGVzIFNpenpsZS5qc1xuICogaHR0cHM6Ly9zaXp6bGVqcy5jb20vXG4gKlxuICogQ29weXJpZ2h0IEpTIEZvdW5kYXRpb24gYW5kIG90aGVyIGNvbnRyaWJ1dG9yc1xuICogUmVsZWFzZWQgdW5kZXIgdGhlIE1JVCBsaWNlbnNlXG4gKiBodHRwczovL2pxdWVyeS5vcmcvbGljZW5zZVxuICpcbiAqIERhdGU6IDIwMjAtMDUtMDRUMjI6NDlaXG4gKi9cbiggZnVuY3Rpb24oIGdsb2JhbCwgZmFjdG9yeSApIHtcblxuXHRcInVzZSBzdHJpY3RcIjtcblxuXHRpZiAoIHR5cGVvZiBtb2R1bGUgPT09IFwib2JqZWN0XCIgJiYgdHlwZW9mIG1vZHVsZS5leHBvcnRzID09PSBcIm9iamVjdFwiICkge1xuXG5cdFx0Ly8gRm9yIENvbW1vbkpTIGFuZCBDb21tb25KUy1saWtlIGVudmlyb25tZW50cyB3aGVyZSBhIHByb3BlciBgd2luZG93YFxuXHRcdC8vIGlzIHByZXNlbnQsIGV4ZWN1dGUgdGhlIGZhY3RvcnkgYW5kIGdldCBqUXVlcnkuXG5cdFx0Ly8gRm9yIGVudmlyb25tZW50cyB0aGF0IGRvIG5vdCBoYXZ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URL=webpack-internal:///../node_modules/jquery/dist/jquery.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/popper.js/dist/esm/popper.js":
-/*!****************************************************!*\
-  !*** ../node_modules/popper.js/dist/esm/popper.js ***!
-  \****************************************************/
-/*! exports provided: default */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n\nvar timeoutDuration = function () {\n  var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n  for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n    if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n      return 1;\n    }\n  }\n  return 0;\n}();\n\nfunction microtaskDebounce(fn) {\n  var called = false;\n  return function () {\n    if (called) {\n      return;\n    }\n    called = true;\n    window.Promise.resolve().then(function () {\n      called = false;\n      fn();\n    });\n  };\n}\n\nfunction taskDebounce(fn) {\n  var scheduled = false;\n  return function () {\n    if (!scheduled) {\n      scheduled = true;\n      setTimeout(function () {\n        scheduled = false;\n        fn();\n      }, timeoutDuration);\n    }\n  };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n  var getType = {};\n  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n  if (element.nodeType !== 1) {\n    return [];\n  }\n  // NOTE: 1 DOM access here\n  var window = element.ownerDocument.defaultView;\n  var css = window.getComputedStyle(element, null);\n  return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n  if (element.nodeName === 'HTML') {\n    return element;\n  }\n  return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n  // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n  if (!element) {\n    return document.body;\n  }\n\n  switch (element.nodeName) {\n    case 'HTML':\n    case 'BODY':\n      return element.ownerDocument.body;\n    case '#document':\n      return element.body;\n  }\n\n  // Firefox want us to check `-x` and `-y` variations as well\n\n  var _getStyleComputedProp = getStyleComputedProperty(element),\n      overflow = _getStyleComputedProp.overflow,\n      overflowX = _getStyleComputedProp.overflowX,\n      overflowY = _getStyleComputedProp.overflowY;\n\n  if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n    return element;\n  }\n\n  return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nfunction getReferenceNode(reference) {\n  return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n  if (version === 11) {\n    return isIE11;\n  }\n  if (version === 10) {\n    return isIE10;\n  }\n  return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n  if (!element) {\n    return document.documentElement;\n  }\n\n  var noOffsetParent = isIE(10) ? document.body : null;\n\n  // NOTE: 1 DOM access here\n  var offsetParent = element.offsetParent || null;\n  // Skip hidden elements which don't have an offsetParent\n  while (offsetParent === noOffsetParent && element.nextElementSibling) {\n    offsetParent = (element = element.nextElementSibling).offsetParent;\n  }\n\n  var nodeName = offsetParent && offsetParent.nodeName;\n\n  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n    return element ? element.ownerDocument.documentElement : document.documentElement;\n  }\n\n  // .offsetParent will return the closest TH, TD or TABLE in case\n  // no offsetParent is present, I hate this job...\n  if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n    return getOffsetParent(offsetParent);\n  }\n\n  return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n  var nodeName = element.nodeName;\n\n  if (nodeName === 'BODY') {\n    return false;\n  }\n  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n  if (node.parentNode !== null) {\n    return getRoot(node.parentNode);\n  }\n\n  return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n    return document.documentElement;\n  }\n\n  // Here we make sure to give as \"start\" the element that comes first in the DOM\n  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n  var start = order ? element1 : element2;\n  var end = order ? element2 : element1;\n\n  // Get common ancestor container\n  var range = document.createRange();\n  range.setStart(start, 0);\n  range.setEnd(end, 0);\n  var commonAncestorContainer = range.commonAncestorContainer;\n\n  // Both nodes are inside #document\n\n  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n    if (isOffsetContainer(commonAncestorContainer)) {\n      return commonAncestorContainer;\n    }\n\n    return getOffsetParent(commonAncestorContainer);\n  }\n\n  // one of the nodes is inside shadowDOM, find which one\n  var element1root = getRoot(element1);\n  if (element1root.host) {\n    return findCommonOffsetParent(element1root.host, element2);\n  } else {\n    return findCommonOffsetParent(element1, getRoot(element2).host);\n  }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n  var nodeName = element.nodeName;\n\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    var html = element.ownerDocument.documentElement;\n    var scrollingElement = element.ownerDocument.scrollingElement || html;\n    return scrollingElement[upperSide];\n  }\n\n  return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n  var scrollTop = getScroll(element, 'top');\n  var scrollLeft = getScroll(element, 'left');\n  var modifier = subtract ? -1 : 1;\n  rect.top += scrollTop * modifier;\n  rect.bottom += scrollTop * modifier;\n  rect.left += scrollLeft * modifier;\n  rect.right += scrollLeft * modifier;\n  return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n  var sideA = axis === 'x' ? 'Left' : 'Top';\n  var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n  return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n  var body = document.body;\n  var html = document.documentElement;\n  var computedStyle = isIE(10) && getComputedStyle(html);\n\n  return {\n    height: getSize('Height', body, html, computedStyle),\n    width: getSize('Width', body, html, computedStyle)\n  };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n};\n\nvar createClass = function () {\n  function defineProperties(target, props) {\n    for (var i = 0; i < props.length; i++) {\n      var descriptor = props[i];\n      descriptor.enumerable = descriptor.enumerable || false;\n      descriptor.configurable = true;\n      if (\"value\" in descriptor) descriptor.writable = true;\n      Object.defineProperty(target, descriptor.key, descriptor);\n    }\n  }\n\n  return function (Constructor, protoProps, staticProps) {\n    if (protoProps) defineProperties(Constructor.prototype, protoProps);\n    if (staticProps) defineProperties(Constructor, staticProps);\n    return Constructor;\n  };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i];\n\n    for (var key in source) {\n      if (Object.prototype.hasOwnProperty.call(source, key)) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n  return _extends({}, offsets, {\n    right: offsets.left + offsets.width,\n    bottom: offsets.top + offsets.height\n  });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n  var rect = {};\n\n  // IE10 10 FIX: Please, don't ask, the element isn't\n  // considered in DOM in some circumstances...\n  // This isn't reproducible in IE10 compatibility mode of IE11\n  try {\n    if (isIE(10)) {\n      rect = element.getBoundingClientRect();\n      var scrollTop = getScroll(element, 'top');\n      var scrollLeft = getScroll(element, 'left');\n      rect.top += scrollTop;\n      rect.left += scrollLeft;\n      rect.bottom += scrollTop;\n      rect.right += scrollLeft;\n    } else {\n      rect = element.getBoundingClientRect();\n    }\n  } catch (e) {}\n\n  var result = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.right - rect.left,\n    height: rect.bottom - rect.top\n  };\n\n  // subtract scrollbar size from sizes\n  var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n  var width = sizes.width || element.clientWidth || result.width;\n  var height = sizes.height || element.clientHeight || result.height;\n\n  var horizScrollbar = element.offsetWidth - width;\n  var vertScrollbar = element.offsetHeight - height;\n\n  // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n  // we make this check conditional for performance reasons\n  if (horizScrollbar || vertScrollbar) {\n    var styles = getStyleComputedProperty(element);\n    horizScrollbar -= getBordersSize(styles, 'x');\n    vertScrollbar -= getBordersSize(styles, 'y');\n\n    result.width -= horizScrollbar;\n    result.height -= vertScrollbar;\n  }\n\n  return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n  var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n  var isIE10 = isIE(10);\n  var isHTML = parent.nodeName === 'HTML';\n  var childrenRect = getBoundingClientRect(children);\n  var parentRect = getBoundingClientRect(parent);\n  var scrollParent = getScrollParent(children);\n\n  var styles = getStyleComputedProperty(parent);\n  var borderTopWidth = parseFloat(styles.borderTopWidth);\n  var borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n  // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n  if (fixedPosition && isHTML) {\n    parentRect.top = Math.max(parentRect.top, 0);\n    parentRect.left = Math.max(parentRect.left, 0);\n  }\n  var offsets = getClientRect({\n    top: childrenRect.top - parentRect.top - borderTopWidth,\n    left: childrenRect.left - parentRect.left - borderLeftWidth,\n    width: childrenRect.width,\n    height: childrenRect.height\n  });\n  offsets.marginTop = 0;\n  offsets.marginLeft = 0;\n\n  // Subtract margins of documentElement in case it's being used as parent\n  // we do this only on HTML because it's the only element that behaves\n  // differently when margins are applied to it. The margins are included in\n  // the box of the documentElement, in the other cases not.\n  if (!isIE10 && isHTML) {\n    var marginTop = parseFloat(styles.marginTop);\n    var marginLeft = parseFloat(styles.marginLeft);\n\n    offsets.top -= borderTopWidth - marginTop;\n    offsets.bottom -= borderTopWidth - marginTop;\n    offsets.left -= borderLeftWidth - marginLeft;\n    offsets.right -= borderLeftWidth - marginLeft;\n\n    // Attach marginTop and marginLeft because in some circumstances we may need them\n    offsets.marginTop = marginTop;\n    offsets.marginLeft = marginLeft;\n  }\n\n  if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n    offsets = includeScroll(offsets, parent);\n  }\n\n  return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n  var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  var html = element.ownerDocument.documentElement;\n  var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n  var width = Math.max(html.clientWidth, window.innerWidth || 0);\n  var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n  var scrollTop = !excludeScroll ? getScroll(html) : 0;\n  var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n  var offset = {\n    top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n    left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n    width: width,\n    height: height\n  };\n\n  return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n  var nodeName = element.nodeName;\n  if (nodeName === 'BODY' || nodeName === 'HTML') {\n    return false;\n  }\n  if (getStyleComputedProperty(element, 'position') === 'fixed') {\n    return true;\n  }\n  var parentNode = getParentNode(element);\n  if (!parentNode) {\n    return false;\n  }\n  return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n  // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n  if (!element || !element.parentElement || isIE()) {\n    return document.documentElement;\n  }\n  var el = element.parentElement;\n  while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n    el = el.parentElement;\n  }\n  return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n  var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n  // NOTE: 1 DOM access here\n\n  var boundaries = { top: 0, left: 0 };\n  var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n  // Handle viewport case\n  if (boundariesElement === 'viewport') {\n    boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n  } else {\n    // Handle other cases based on DOM element used as boundaries\n    var boundariesNode = void 0;\n    if (boundariesElement === 'scrollParent') {\n      boundariesNode = getScrollParent(getParentNode(reference));\n      if (boundariesNode.nodeName === 'BODY') {\n        boundariesNode = popper.ownerDocument.documentElement;\n      }\n    } else if (boundariesElement === 'window') {\n      boundariesNode = popper.ownerDocument.documentElement;\n    } else {\n      boundariesNode = boundariesElement;\n    }\n\n    var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n    // In case of HTML, we need a different computation\n    if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n      var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n          height = _getWindowSizes.height,\n          width = _getWindowSizes.width;\n\n      boundaries.top += offsets.top - offsets.marginTop;\n      boundaries.bottom = height + offsets.top;\n      boundaries.left += offsets.left - offsets.marginLeft;\n      boundaries.right = width + offsets.left;\n    } else {\n      // for all the other DOM elements, this one is good\n      boundaries = offsets;\n    }\n  }\n\n  // Add paddings\n  padding = padding || 0;\n  var isPaddingNumber = typeof padding === 'number';\n  boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n  boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n  boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n  boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n  return boundaries;\n}\n\nfunction getArea(_ref) {\n  var width = _ref.width,\n      height = _ref.height;\n\n  return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n  var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n  if (placement.indexOf('auto') === -1) {\n    return placement;\n  }\n\n  var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n  var rects = {\n    top: {\n      width: boundaries.width,\n      height: refRect.top - boundaries.top\n    },\n    right: {\n      width: boundaries.right - refRect.right,\n      height: boundaries.height\n    },\n    bottom: {\n      width: boundaries.width,\n      height: boundaries.bottom - refRect.bottom\n    },\n    left: {\n      width: refRect.left - boundaries.left,\n      height: boundaries.height\n    }\n  };\n\n  var sortedAreas = Object.keys(rects).map(function (key) {\n    return _extends({\n      key: key\n    }, rects[key], {\n      area: getArea(rects[key])\n    });\n  }).sort(function (a, b) {\n    return b.area - a.area;\n  });\n\n  var filteredAreas = sortedAreas.filter(function (_ref2) {\n    var width = _ref2.width,\n        height = _ref2.height;\n    return width >= popper.clientWidth && height >= popper.clientHeight;\n  });\n\n  var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n  var variation = placement.split('-')[1];\n\n  return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n  var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n  var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n  return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n  var window = element.ownerDocument.defaultView;\n  var styles = window.getComputedStyle(element);\n  var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n  var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n  var result = {\n    width: element.offsetWidth + y,\n    height: element.offsetHeight + x\n  };\n  return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n  var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n  placement = placement.split('-')[0];\n\n  // Get popper node sizes\n  var popperRect = getOuterSizes(popper);\n\n  // Add position, width and height to our offsets object\n  var popperOffsets = {\n    width: popperRect.width,\n    height: popperRect.height\n  };\n\n  // depending by the popper placement we have to compute its offsets slightly differently\n  var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n  var mainSide = isHoriz ? 'top' : 'left';\n  var secondarySide = isHoriz ? 'left' : 'top';\n  var measurement = isHoriz ? 'height' : 'width';\n  var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n  popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n  if (placement === secondarySide) {\n    popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n  } else {\n    popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n  }\n\n  return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n  // use native find if supported\n  if (Array.prototype.find) {\n    return arr.find(check);\n  }\n\n  // use `filter` to obtain the same behavior of `find`\n  return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n  // use native findIndex if supported\n  if (Array.prototype.findIndex) {\n    return arr.findIndex(function (cur) {\n      return cur[prop] === value;\n    });\n  }\n\n  // use `find` + `indexOf` if `findIndex` isn't supported\n  var match = find(arr, function (obj) {\n    return obj[prop] === value;\n  });\n  return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n  var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n  modifiersToRun.forEach(function (modifier) {\n    if (modifier['function']) {\n      // eslint-disable-line dot-notation\n      console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n    }\n    var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n    if (modifier.enabled && isFunction(fn)) {\n      // Add properties to offsets to make them a complete clientRect object\n      // we do this before each modifier to make sure the previous one doesn't\n      // mess with these values\n      data.offsets.popper = getClientRect(data.offsets.popper);\n      data.offsets.reference = getClientRect(data.offsets.reference);\n\n      data = fn(data, modifier);\n    }\n  });\n\n  return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n  // if popper is destroyed, don't perform any further update\n  if (this.state.isDestroyed) {\n    return;\n  }\n\n  var data = {\n    instance: this,\n    styles: {},\n    arrowStyles: {},\n    attributes: {},\n    flipped: false,\n    offsets: {}\n  };\n\n  // compute reference element offsets\n  data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n  // store the computed placement inside `originalPlacement`\n  data.originalPlacement = data.placement;\n\n  data.positionFixed = this.options.positionFixed;\n\n  // compute the popper offsets\n  data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n  data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n  // run the modifiers\n  data = runModifiers(this.modifiers, data);\n\n  // the first `update` will call `onCreate` callback\n  // the other ones will call `onUpdate` callback\n  if (!this.state.isCreated) {\n    this.state.isCreated = true;\n    this.options.onCreate(data);\n  } else {\n    this.options.onUpdate(data);\n  }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n  return modifiers.some(function (_ref) {\n    var name = _ref.name,\n        enabled = _ref.enabled;\n    return enabled && name === modifierName;\n  });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n  var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n  var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n  for (var i = 0; i < prefixes.length; i++) {\n    var prefix = prefixes[i];\n    var toCheck = prefix ? '' + prefix + upperProp : property;\n    if (typeof document.body.style[toCheck] !== 'undefined') {\n      return toCheck;\n    }\n  }\n  return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n  this.state.isDestroyed = true;\n\n  // touch DOM only if `applyStyle` modifier is enabled\n  if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n    this.popper.removeAttribute('x-placement');\n    this.popper.style.position = '';\n    this.popper.style.top = '';\n    this.popper.style.left = '';\n    this.popper.style.right = '';\n    this.popper.style.bottom = '';\n    this.popper.style.willChange = '';\n    this.popper.style[getSupportedPropertyName('transform')] = '';\n  }\n\n  this.disableEventListeners();\n\n  // remove the popper if user explicitly asked for the deletion on destroy\n  // do not use `remove` because IE11 doesn't support it\n  if (this.options.removeOnDestroy) {\n    this.popper.parentNode.removeChild(this.popper);\n  }\n  return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n  var ownerDocument = element.ownerDocument;\n  return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n  var isBody = scrollParent.nodeName === 'BODY';\n  var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n  target.addEventListener(event, callback, { passive: true });\n\n  if (!isBody) {\n    attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n  }\n  scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n  // Resize event listener on window\n  state.updateBound = updateBound;\n  getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n  // Scroll event listener on scroll parents\n  var scrollElement = getScrollParent(reference);\n  attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n  state.scrollElement = scrollElement;\n  state.eventsEnabled = true;\n\n  return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n  if (!this.state.eventsEnabled) {\n    this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n  }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n  // Remove resize event listener on window\n  getWindow(reference).removeEventListener('resize', state.updateBound);\n\n  // Remove scroll event listener on scroll parents\n  state.scrollParents.forEach(function (target) {\n    target.removeEventListener('scroll', state.updateBound);\n  });\n\n  // Reset state\n  state.updateBound = null;\n  state.scrollParents = [];\n  state.scrollElement = null;\n  state.eventsEnabled = false;\n  return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n  if (this.state.eventsEnabled) {\n    cancelAnimationFrame(this.scheduleUpdate);\n    this.state = removeEventListeners(this.reference, this.state);\n  }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n  return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n  Object.keys(styles).forEach(function (prop) {\n    var unit = '';\n    // add unit if the value is numeric and is one of the following\n    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n      unit = 'px';\n    }\n    element.style[prop] = styles[prop] + unit;\n  });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n  Object.keys(attributes).forEach(function (prop) {\n    var value = attributes[prop];\n    if (value !== false) {\n      element.setAttribute(prop, attributes[prop]);\n    } else {\n      element.removeAttribute(prop);\n    }\n  });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n  // any property present in `data.styles` will be applied to the popper,\n  // in this way we can make the 3rd party modifiers add custom styles to it\n  // Be aware, modifiers could override the properties defined in the previous\n  // lines of this modifier!\n  setStyles(data.instance.popper, data.styles);\n\n  // any property present in `data.attributes` will be applied to the popper,\n  // they will be set as HTML attributes of the element\n  setAttributes(data.instance.popper, data.attributes);\n\n  // if arrowElement is defined and arrowStyles has some properties\n  if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n    setStyles(data.arrowElement, data.arrowStyles);\n  }\n\n  return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n  // compute reference element offsets\n  var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n  // compute auto placement, store placement inside the data object,\n  // modifiers will be able to edit `placement` if needed\n  // and refer to originalPlacement to know the original value\n  var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n  popper.setAttribute('x-placement', placement);\n\n  // Apply `position` to popper before anything else because\n  // without the position applied we can't guarantee correct computations\n  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n  return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n  var round = Math.round,\n      floor = Math.floor;\n\n  var noRound = function noRound(v) {\n    return v;\n  };\n\n  var referenceWidth = round(reference.width);\n  var popperWidth = round(popper.width);\n\n  var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n  var isVariation = data.placement.indexOf('-') !== -1;\n  var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n  var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n  var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n  var verticalToInteger = !shouldRound ? noRound : round;\n\n  return {\n    left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n    top: verticalToInteger(popper.top),\n    bottom: verticalToInteger(popper.bottom),\n    right: horizontalToInteger(popper.right)\n  };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n  var x = options.x,\n      y = options.y;\n  var popper = data.offsets.popper;\n\n  // Remove this legacy support in Popper.js v2\n\n  var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n    return modifier.name === 'applyStyle';\n  }).gpuAcceleration;\n  if (legacyGpuAccelerationOption !== undefined) {\n    console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n  }\n  var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n  var offsetParent = getOffsetParent(data.instance.popper);\n  var offsetParentRect = getBoundingClientRect(offsetParent);\n\n  // Styles\n  var styles = {\n    position: popper.position\n  };\n\n  var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n  var sideA = x === 'bottom' ? 'top' : 'bottom';\n  var sideB = y === 'right' ? 'left' : 'right';\n\n  // if gpuAcceleration is set to `true` and transform is supported,\n  //  we use `translate3d` to apply the position to the popper we\n  // automatically use the supported prefixed version if needed\n  var prefixedProperty = getSupportedPropertyName('transform');\n\n  // now, let's make a step back and look at this code closely (wtf?)\n  // If the content of the popper grows once it's been positioned, it\n  // may happen that the popper gets misplaced because of the new content\n  // overflowing its reference element\n  // To avoid this problem, we provide two options (x and y), which allow\n  // the consumer to define the offset origin.\n  // If we position a popper on top of a reference element, we can set\n  // `x` to `top` to make the popper grow towards its top instead of\n  // its bottom.\n  var left = void 0,\n      top = void 0;\n  if (sideA === 'bottom') {\n    // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)\n    // and not the bottom of the html element\n    if (offsetParent.nodeName === 'HTML') {\n      top = -offsetParent.clientHeight + offsets.bottom;\n    } else {\n      top = -offsetParentRect.height + offsets.bottom;\n    }\n  } else {\n    top = offsets.top;\n  }\n  if (sideB === 'right') {\n    if (offsetParent.nodeName === 'HTML') {\n      left = -offsetParent.clientWidth + offsets.right;\n    } else {\n      left = -offsetParentRect.width + offsets.right;\n    }\n  } else {\n    left = offsets.left;\n  }\n  if (gpuAcceleration && prefixedProperty) {\n    styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n    styles[sideA] = 0;\n    styles[sideB] = 0;\n    styles.willChange = 'transform';\n  } else {\n    // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n    var invertTop = sideA === 'bottom' ? -1 : 1;\n    var invertLeft = sideB === 'right' ? -1 : 1;\n    styles[sideA] = top * invertTop;\n    styles[sideB] = left * invertLeft;\n    styles.willChange = sideA + ', ' + sideB;\n  }\n\n  // Attributes\n  var attributes = {\n    'x-placement': data.placement\n  };\n\n  // Update `data` attributes, styles and arrowStyles\n  data.attributes = _extends({}, attributes, data.attributes);\n  data.styles = _extends({}, styles, data.styles);\n  data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n  return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n  var requesting = find(modifiers, function (_ref) {\n    var name = _ref.name;\n    return name === requestingName;\n  });\n\n  var isRequired = !!requesting && modifiers.some(function (modifier) {\n    return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n  });\n\n  if (!isRequired) {\n    var _requesting = '`' + requestingName + '`';\n    var requested = '`' + requestedName + '`';\n    console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n  }\n  return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n  var _data$offsets$arrow;\n\n  // arrow depends on keepTogether in order to work\n  if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n    return data;\n  }\n\n  var arrowElement = options.element;\n\n  // if arrowElement is a string, suppose it's a CSS selector\n  if (typeof arrowElement === 'string') {\n    arrowElement = data.instance.popper.querySelector(arrowElement);\n\n    // if arrowElement is not found, don't run the modifier\n    if (!arrowElement) {\n      return data;\n    }\n  } else {\n    // if the arrowElement isn't a query selector we must check that the\n    // provided DOM node is child of its popper node\n    if (!data.instance.popper.contains(arrowElement)) {\n      console.warn('WARNING: `arrow.element` must be child of its popper element!');\n      return data;\n    }\n  }\n\n  var placement = data.placement.split('-')[0];\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n  var len = isVertical ? 'height' : 'width';\n  var sideCapitalized = isVertical ? 'Top' : 'Left';\n  var side = sideCapitalized.toLowerCase();\n  var altSide = isVertical ? 'left' : 'top';\n  var opSide = isVertical ? 'bottom' : 'right';\n  var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n  //\n  // extends keepTogether behavior making sure the popper and its\n  // reference have enough pixels in conjunction\n  //\n\n  // top/left side\n  if (reference[opSide] - arrowElementSize < popper[side]) {\n    data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n  }\n  // bottom/right side\n  if (reference[side] + arrowElementSize > popper[opSide]) {\n    data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n  }\n  data.offsets.popper = getClientRect(data.offsets.popper);\n\n  // compute center of the popper\n  var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n  // Compute the sideValue using the updated popper offsets\n  // take popper margin in account because we don't have this info available\n  var css = getStyleComputedProperty(data.instance.popper);\n  var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n  var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n  var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n  // prevent arrowElement from being placed not contiguously to its popper\n  sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n  data.arrowElement = arrowElement;\n  data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n  return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n  if (variation === 'end') {\n    return 'start';\n  } else if (variation === 'start') {\n    return 'end';\n  }\n  return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n  var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n  var index = validPlacements.indexOf(placement);\n  var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n  return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n  FLIP: 'flip',\n  CLOCKWISE: 'clockwise',\n  COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n  // if `inner` modifier is enabled, we can't use the `flip` modifier\n  if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n    return data;\n  }\n\n  if (data.flipped && data.placement === data.originalPlacement) {\n    // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n    return data;\n  }\n\n  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n  var placement = data.placement.split('-')[0];\n  var placementOpposite = getOppositePlacement(placement);\n  var variation = data.placement.split('-')[1] || '';\n\n  var flipOrder = [];\n\n  switch (options.behavior) {\n    case BEHAVIORS.FLIP:\n      flipOrder = [placement, placementOpposite];\n      break;\n    case BEHAVIORS.CLOCKWISE:\n      flipOrder = clockwise(placement);\n      break;\n    case BEHAVIORS.COUNTERCLOCKWISE:\n      flipOrder = clockwise(placement, true);\n      break;\n    default:\n      flipOrder = options.behavior;\n  }\n\n  flipOrder.forEach(function (step, index) {\n    if (placement !== step || flipOrder.length === index + 1) {\n      return data;\n    }\n\n    placement = data.placement.split('-')[0];\n    placementOpposite = getOppositePlacement(placement);\n\n    var popperOffsets = data.offsets.popper;\n    var refOffsets = data.offsets.reference;\n\n    // using floor because the reference offsets may contain decimals we are not going to consider here\n    var floor = Math.floor;\n    var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n    var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n    var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n    var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n    var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n    var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n    // flip the variation if required\n    var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n    // flips variation if reference element overflows boundaries\n    var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n    // flips variation if popper content overflows boundaries\n    var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n\n    var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n    if (overlapsRef || overflowsBoundaries || flippedVariation) {\n      // this boolean to detect any flip loop\n      data.flipped = true;\n\n      if (overlapsRef || overflowsBoundaries) {\n        placement = flipOrder[index + 1];\n      }\n\n      if (flippedVariation) {\n        variation = getOppositeVariation(variation);\n      }\n\n      data.placement = placement + (variation ? '-' + variation : '');\n\n      // this object contains `position`, we want to preserve it along with\n      // any additional property we may add in the future\n      data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n      data = runModifiers(data.instance.modifiers, data, 'flip');\n    }\n  });\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var placement = data.placement.split('-')[0];\n  var floor = Math.floor;\n  var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n  var side = isVertical ? 'right' : 'bottom';\n  var opSide = isVertical ? 'left' : 'top';\n  var measurement = isVertical ? 'width' : 'height';\n\n  if (popper[side] < floor(reference[opSide])) {\n    data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n  }\n  if (popper[opSide] > floor(reference[side])) {\n    data.offsets.popper[opSide] = floor(reference[side]);\n  }\n\n  return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n  // separate value from unit\n  var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n  var value = +split[1];\n  var unit = split[2];\n\n  // If it's not a number it's an operator, I guess\n  if (!value) {\n    return str;\n  }\n\n  if (unit.indexOf('%') === 0) {\n    var element = void 0;\n    switch (unit) {\n      case '%p':\n        element = popperOffsets;\n        break;\n      case '%':\n      case '%r':\n      default:\n        element = referenceOffsets;\n    }\n\n    var rect = getClientRect(element);\n    return rect[measurement] / 100 * value;\n  } else if (unit === 'vh' || unit === 'vw') {\n    // if is a vh or vw, we calculate the size based on the viewport\n    var size = void 0;\n    if (unit === 'vh') {\n      size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n    } else {\n      size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n    }\n    return size / 100 * value;\n  } else {\n    // if is an explicit pixel unit, we get rid of the unit and keep the value\n    // if is an implicit unit, it's px, and we return just the value\n    return value;\n  }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n  var offsets = [0, 0];\n\n  // Use height if placement is left or right and index is 0 otherwise use width\n  // in this way the first offset will use an axis and the second one\n  // will use the other one\n  var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n  // Split the offset string to obtain a list of values and operands\n  // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n  var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n    return frag.trim();\n  });\n\n  // Detect if the offset string contains a pair of values or a single one\n  // they could be separated by comma or space\n  var divider = fragments.indexOf(find(fragments, function (frag) {\n    return frag.search(/,|\\s/) !== -1;\n  }));\n\n  if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n    console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n  }\n\n  // If divider is found, we divide the list of values and operands to divide\n  // them by ofset X and Y.\n  var splitRegex = /\\s*,\\s*|\\s+/;\n  var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n  // Convert the values with units to absolute pixels to allow our computations\n  ops = ops.map(function (op, index) {\n    // Most of the units rely on the orientation of the popper\n    var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n    var mergeWithPrevious = false;\n    return op\n    // This aggregates any `+` or `-` sign that aren't considered operators\n    // e.g.: 10 + +5 => [10, +, +5]\n    .reduce(function (a, b) {\n      if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n        a[a.length - 1] = b;\n        mergeWithPrevious = true;\n        return a;\n      } else if (mergeWithPrevious) {\n        a[a.length - 1] += b;\n        mergeWithPrevious = false;\n        return a;\n      } else {\n        return a.concat(b);\n      }\n    }, [])\n    // Here we convert the string values into number values (in px)\n    .map(function (str) {\n      return toValue(str, measurement, popperOffsets, referenceOffsets);\n    });\n  });\n\n  // Loop trough the offsets arrays and execute the operations\n  ops.forEach(function (op, index) {\n    op.forEach(function (frag, index2) {\n      if (isNumeric(frag)) {\n        offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n      }\n    });\n  });\n  return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n  var offset = _ref.offset;\n  var placement = data.placement,\n      _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var basePlacement = placement.split('-')[0];\n\n  var offsets = void 0;\n  if (isNumeric(+offset)) {\n    offsets = [+offset, 0];\n  } else {\n    offsets = parseOffset(offset, popper, reference, basePlacement);\n  }\n\n  if (basePlacement === 'left') {\n    popper.top += offsets[0];\n    popper.left -= offsets[1];\n  } else if (basePlacement === 'right') {\n    popper.top += offsets[0];\n    popper.left += offsets[1];\n  } else if (basePlacement === 'top') {\n    popper.left += offsets[0];\n    popper.top -= offsets[1];\n  } else if (basePlacement === 'bottom') {\n    popper.left += offsets[0];\n    popper.top += offsets[1];\n  }\n\n  data.popper = popper;\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n  var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n  // If offsetParent is the reference element, we really want to\n  // go one step up and use the next offsetParent as reference to\n  // avoid to make this modifier completely useless and look like broken\n  if (data.instance.reference === boundariesElement) {\n    boundariesElement = getOffsetParent(boundariesElement);\n  }\n\n  // NOTE: DOM access here\n  // resets the popper's position so that the document size can be calculated excluding\n  // the size of the popper element itself\n  var transformProp = getSupportedPropertyName('transform');\n  var popperStyles = data.instance.popper.style; // assignment to help minification\n  var top = popperStyles.top,\n      left = popperStyles.left,\n      transform = popperStyles[transformProp];\n\n  popperStyles.top = '';\n  popperStyles.left = '';\n  popperStyles[transformProp] = '';\n\n  var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n  // NOTE: DOM access here\n  // restores the original style properties after the offsets have been computed\n  popperStyles.top = top;\n  popperStyles.left = left;\n  popperStyles[transformProp] = transform;\n\n  options.boundaries = boundaries;\n\n  var order = options.priority;\n  var popper = data.offsets.popper;\n\n  var check = {\n    primary: function primary(placement) {\n      var value = popper[placement];\n      if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n        value = Math.max(popper[placement], boundaries[placement]);\n      }\n      return defineProperty({}, placement, value);\n    },\n    secondary: function secondary(placement) {\n      var mainSide = placement === 'right' ? 'left' : 'top';\n      var value = popper[mainSide];\n      if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n        value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n      }\n      return defineProperty({}, mainSide, value);\n    }\n  };\n\n  order.forEach(function (placement) {\n    var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n    popper = _extends({}, popper, check[side](placement));\n  });\n\n  data.offsets.popper = popper;\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n  var placement = data.placement;\n  var basePlacement = placement.split('-')[0];\n  var shiftvariation = placement.split('-')[1];\n\n  // if shift shiftvariation is specified, run the modifier\n  if (shiftvariation) {\n    var _data$offsets = data.offsets,\n        reference = _data$offsets.reference,\n        popper = _data$offsets.popper;\n\n    var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n    var side = isVertical ? 'left' : 'top';\n    var measurement = isVertical ? 'width' : 'height';\n\n    var shiftOffsets = {\n      start: defineProperty({}, side, reference[side]),\n      end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n    };\n\n    data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n  }\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n  if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n    return data;\n  }\n\n  var refRect = data.offsets.reference;\n  var bound = find(data.instance.modifiers, function (modifier) {\n    return modifier.name === 'preventOverflow';\n  }).boundaries;\n\n  if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === true) {\n      return data;\n    }\n\n    data.hide = true;\n    data.attributes['x-out-of-boundaries'] = '';\n  } else {\n    // Avoid unnecessary DOM access if visibility hasn't changed\n    if (data.hide === false) {\n      return data;\n    }\n\n    data.hide = false;\n    data.attributes['x-out-of-boundaries'] = false;\n  }\n\n  return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n  var placement = data.placement;\n  var basePlacement = placement.split('-')[0];\n  var _data$offsets = data.offsets,\n      popper = _data$offsets.popper,\n      reference = _data$offsets.reference;\n\n  var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n  var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n  popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n  data.placement = getOppositePlacement(placement);\n  data.offsets.popper = getClientRect(popper);\n\n  return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n  /**\n   * Modifier used to shift the popper on the start or end of its reference\n   * element.<br />\n   * It will read the variation of the `placement` property.<br />\n   * It can be one either `-end` or `-start`.\n   * @memberof modifiers\n   * @inner\n   */\n  shift: {\n    /** @prop {number} order=100 - Index used to define the order of execution */\n    order: 100,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: shift\n  },\n\n  /**\n   * The `offset` modifier can shift your popper on both its axis.\n   *\n   * It accepts the following units:\n   * - `px` or unit-less, interpreted as pixels\n   * - `%` or `%r`, percentage relative to the length of the reference element\n   * - `%p`, percentage relative to the length of the popper element\n   * - `vw`, CSS viewport width unit\n   * - `vh`, CSS viewport height unit\n   *\n   * For length is intended the main axis relative to the placement of the popper.<br />\n   * This means that if the placement is `top` or `bottom`, the length will be the\n   * `width`. In case of `left` or `right`, it will be the `height`.\n   *\n   * You can provide a single value (as `Number` or `String`), or a pair of values\n   * as `String` divided by a comma or one (or more) white spaces.<br />\n   * The latter is a deprecated method because it leads to confusion and will be\n   * removed in v2.<br />\n   * Additionally, it accepts additions and subtractions between different units.\n   * Note that multiplications and divisions aren't supported.\n   *\n   * Valid examples are:\n   * ```\n   * 10\n   * '10%'\n   * '10, 10'\n   * '10%, 10'\n   * '10 + 10%'\n   * '10 - 5vh + 3%'\n   * '-10px + 5vh, 5px - 6%'\n   * ```\n   * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n   * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n   * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  offset: {\n    /** @prop {number} order=200 - Index used to define the order of execution */\n    order: 200,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: offset,\n    /** @prop {Number|String} offset=0\n     * The offset value as described in the modifier description\n     */\n    offset: 0\n  },\n\n  /**\n   * Modifier used to prevent the popper from being positioned outside the boundary.\n   *\n   * A scenario exists where the reference itself is not within the boundaries.<br />\n   * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n   * In this case we need to decide whether the popper should either:\n   *\n   * - detach from the reference and remain \"trapped\" in the boundaries, or\n   * - if it should ignore the boundary and \"escape with its reference\"\n   *\n   * When `escapeWithReference` is set to`true` and reference is completely\n   * outside its boundaries, the popper will overflow (or completely leave)\n   * the boundaries in order to remain attached to the edge of the reference.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  preventOverflow: {\n    /** @prop {number} order=300 - Index used to define the order of execution */\n    order: 300,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: preventOverflow,\n    /**\n     * @prop {Array} [priority=['left','right','top','bottom']]\n     * Popper will try to prevent overflow following these priorities by default,\n     * then, it could overflow on the left and on top of the `boundariesElement`\n     */\n    priority: ['left', 'right', 'top', 'bottom'],\n    /**\n     * @prop {number} padding=5\n     * Amount of pixel used to define a minimum distance between the boundaries\n     * and the popper. This makes sure the popper always has a little padding\n     * between the edges of its container\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='scrollParent'\n     * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n     * `viewport` or any DOM element.\n     */\n    boundariesElement: 'scrollParent'\n  },\n\n  /**\n   * Modifier used to make sure the reference and its popper stay near each other\n   * without leaving any gap between the two. Especially useful when the arrow is\n   * enabled and you want to ensure that it points to its reference element.\n   * It cares only about the first axis. You can still have poppers with margin\n   * between the popper and its reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  keepTogether: {\n    /** @prop {number} order=400 - Index used to define the order of execution */\n    order: 400,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: keepTogether\n  },\n\n  /**\n   * This modifier is used to move the `arrowElement` of the popper to make\n   * sure it is positioned between the reference element and its popper element.\n   * It will read the outer size of the `arrowElement` node to detect how many\n   * pixels of conjunction are needed.\n   *\n   * It has no effect if no `arrowElement` is provided.\n   * @memberof modifiers\n   * @inner\n   */\n  arrow: {\n    /** @prop {number} order=500 - Index used to define the order of execution */\n    order: 500,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: arrow,\n    /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n    element: '[x-arrow]'\n  },\n\n  /**\n   * Modifier used to flip the popper's placement when it starts to overlap its\n   * reference element.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   *\n   * **NOTE:** this modifier will interrupt the current update cycle and will\n   * restart it if it detects the need to flip the placement.\n   * @memberof modifiers\n   * @inner\n   */\n  flip: {\n    /** @prop {number} order=600 - Index used to define the order of execution */\n    order: 600,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: flip,\n    /**\n     * @prop {String|Array} behavior='flip'\n     * The behavior used to change the popper's placement. It can be one of\n     * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n     * placements (with optional variations)\n     */\n    behavior: 'flip',\n    /**\n     * @prop {number} padding=5\n     * The popper will flip if it hits the edges of the `boundariesElement`\n     */\n    padding: 5,\n    /**\n     * @prop {String|HTMLElement} boundariesElement='viewport'\n     * The element which will define the boundaries of the popper position.\n     * The popper will never be placed outside of the defined boundaries\n     * (except if `keepTogether` is enabled)\n     */\n    boundariesElement: 'viewport',\n    /**\n     * @prop {Boolean} flipVariations=false\n     * The popper will switch placement variation between `-start` and `-end` when\n     * the reference element overlaps its boundaries.\n     *\n     * The original placement should have a set variation.\n     */\n    flipVariations: false,\n    /**\n     * @prop {Boolean} flipVariationsByContent=false\n     * The popper will switch placement variation between `-start` and `-end` when\n     * the popper element overlaps its reference boundaries.\n     *\n     * The original placement should have a set variation.\n     */\n    flipVariationsByContent: false\n  },\n\n  /**\n   * Modifier used to make the popper flow toward the inner of the reference element.\n   * By default, when this modifier is disabled, the popper will be placed outside\n   * the reference element.\n   * @memberof modifiers\n   * @inner\n   */\n  inner: {\n    /** @prop {number} order=700 - Index used to define the order of execution */\n    order: 700,\n    /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n    enabled: false,\n    /** @prop {ModifierFn} */\n    fn: inner\n  },\n\n  /**\n   * Modifier used to hide the popper when its reference element is outside of the\n   * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n   * be used to hide with a CSS selector the popper when its reference is\n   * out of boundaries.\n   *\n   * Requires the `preventOverflow` modifier before it in order to work.\n   * @memberof modifiers\n   * @inner\n   */\n  hide: {\n    /** @prop {number} order=800 - Index used to define the order of execution */\n    order: 800,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: hide\n  },\n\n  /**\n   * Computes the style that will be applied to the popper element to gets\n   * properly positioned.\n   *\n   * Note that this modifier will not touch the DOM, it just prepares the styles\n   * so that `applyStyle` modifier can apply it. This separation is useful\n   * in case you need to replace `applyStyle` with a custom implementation.\n   *\n   * This modifier has `850` as `order` value to maintain backward compatibility\n   * with previous versions of Popper.js. Expect the modifiers ordering method\n   * to change in future major versions of the library.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  computeStyle: {\n    /** @prop {number} order=850 - Index used to define the order of execution */\n    order: 850,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: computeStyle,\n    /**\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3D transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties\n     */\n    gpuAcceleration: true,\n    /**\n     * @prop {string} [x='bottom']\n     * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n     * Change this if your popper should grow in a direction different from `bottom`\n     */\n    x: 'bottom',\n    /**\n     * @prop {string} [x='left']\n     * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n     * Change this if your popper should grow in a direction different from `right`\n     */\n    y: 'right'\n  },\n\n  /**\n   * Applies the computed styles to the popper element.\n   *\n   * All the DOM manipulations are limited to this modifier. This is useful in case\n   * you want to integrate Popper.js inside a framework or view library and you\n   * want to delegate all the DOM manipulations to it.\n   *\n   * Note that if you disable this modifier, you must make sure the popper element\n   * has its position set to `absolute` before Popper.js can do its work!\n   *\n   * Just disable this modifier and define your own to achieve the desired effect.\n   *\n   * @memberof modifiers\n   * @inner\n   */\n  applyStyle: {\n    /** @prop {number} order=900 - Index used to define the order of execution */\n    order: 900,\n    /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n    enabled: true,\n    /** @prop {ModifierFn} */\n    fn: applyStyle,\n    /** @prop {Function} */\n    onLoad: applyStyleOnLoad,\n    /**\n     * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n     * @prop {Boolean} gpuAcceleration=true\n     * If true, it uses the CSS 3D transformation to position the popper.\n     * Otherwise, it will use the `top` and `left` properties\n     */\n    gpuAcceleration: undefined\n  }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overridden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n *   modifiers: {\n *     preventOverflow: { enabled: false }\n *   }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n  /**\n   * Popper's placement.\n   * @prop {Popper.placements} placement='bottom'\n   */\n  placement: 'bottom',\n\n  /**\n   * Set this to true if you want popper to position it self in 'fixed' mode\n   * @prop {Boolean} positionFixed=false\n   */\n  positionFixed: false,\n\n  /**\n   * Whether events (resize, scroll) are initially enabled.\n   * @prop {Boolean} eventsEnabled=true\n   */\n  eventsEnabled: true,\n\n  /**\n   * Set to true if you want to automatically remove the popper when\n   * you call the `destroy` method.\n   * @prop {Boolean} removeOnDestroy=false\n   */\n  removeOnDestroy: false,\n\n  /**\n   * Callback called when the popper is created.<br />\n   * By default, it is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onCreate}\n   */\n  onCreate: function onCreate() {},\n\n  /**\n   * Callback called when the popper is updated. This callback is not called\n   * on the initialization/creation of the popper, but only on subsequent\n   * updates.<br />\n   * By default, it is set to no-op.<br />\n   * Access Popper.js instance with `data.instance`.\n   * @prop {onUpdate}\n   */\n  onUpdate: function onUpdate() {},\n\n  /**\n   * List of modifiers used to modify the offsets before they are applied to the popper.\n   * They provide most of the functionalities of Popper.js.\n   * @prop {modifiers}\n   */\n  modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n  /**\n   * Creates a new Popper.js instance.\n   * @class Popper\n   * @param {Element|referenceObject} reference - The reference element used to position the popper\n   * @param {Element} popper - The HTML / XML element used as the popper\n   * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n   * @return {Object} instance - The generated Popper.js instance\n   */\n  function Popper(reference, popper) {\n    var _this = this;\n\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    classCallCheck(this, Popper);\n\n    this.scheduleUpdate = function () {\n      return requestAnimationFrame(_this.update);\n    };\n\n    // make update() debounced, so that it only runs at most once-per-tick\n    this.update = debounce(this.update.bind(this));\n\n    // with {} we create a new object with the options inside it\n    this.options = _extends({}, Popper.Defaults, options);\n\n    // init state\n    this.state = {\n      isDestroyed: false,\n      isCreated: false,\n      scrollParents: []\n    };\n\n    // get reference and popper elements (allow jQuery wrappers)\n    this.reference = reference && reference.jquery ? reference[0] : reference;\n    this.popper = popper && popper.jquery ? popper[0] : popper;\n\n    // Deep merge modifiers options\n    this.options.modifiers = {};\n    Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n      _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n    });\n\n    // Refactoring modifiers' list (Object => Array)\n    this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n      return _extends({\n        name: name\n      }, _this.options.modifiers[name]);\n    })\n    // sort the modifiers by order\n    .sort(function (a, b) {\n      return a.order - b.order;\n    });\n\n    // modifiers have the ability to execute arbitrary code when Popper.js get inited\n    // such code is executed in the same order of its modifier\n    // they could add new properties to their options configuration\n    // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n    this.modifiers.forEach(function (modifierOptions) {\n      if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n        modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n      }\n    });\n\n    // fire the first update to position the popper in the right place\n    this.update();\n\n    var eventsEnabled = this.options.eventsEnabled;\n    if (eventsEnabled) {\n      // setup event listeners, they will take care of update the position in specific situations\n      this.enableEventListeners();\n    }\n\n    this.state.eventsEnabled = eventsEnabled;\n  }\n\n  // We can't use class properties because they don't get listed in the\n  // class prototype and break stuff like Sinon stubs\n\n\n  createClass(Popper, [{\n    key: 'update',\n    value: function update$$1() {\n      return update.call(this);\n    }\n  }, {\n    key: 'destroy',\n    value: function destroy$$1() {\n      return destroy.call(this);\n    }\n  }, {\n    key: 'enableEventListeners',\n    value: function enableEventListeners$$1() {\n      return enableEventListeners.call(this);\n    }\n  }, {\n    key: 'disableEventListeners',\n    value: function disableEventListeners$$1() {\n      return disableEventListeners.call(this);\n    }\n\n    /**\n     * Schedules an update. It will run on the next UI update available.\n     * @method scheduleUpdate\n     * @memberof Popper\n     */\n\n\n    /**\n     * Collection of utilities useful when writing custom modifiers.\n     * Starting from version 1.7, this method is available only if you\n     * include `popper-utils.js` before `popper.js`.\n     *\n     * **DEPRECATION**: This way to access PopperUtils is deprecated\n     * and will be removed in v2! Use the PopperUtils module directly instead.\n     * Due to the high instability of the methods contained in Utils, we can't\n     * guarantee them to follow semver. Use them at your own risk!\n     * @static\n     * @private\n     * @type {Object}\n     * @deprecated since version 1.8\n     * @member Utils\n     * @memberof Popper\n     */\n\n  }]);\n  return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.<br />\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Popper);\n//# sourceMappingURL=popper.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"../node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3BvcHBlci5qcy9kaXN0L2VzbS9wb3BwZXIuanMuanMiLCJzb3V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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/popper.js/dist/esm/popper.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/toastr/toastr.js":
-/*!****************************************!*\
-  !*** ../node_modules/toastr/toastr.js ***!
-  \****************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n * Toastr\n * Copyright 2012-2015\n * Authors: John Papa, Hans Fjällemark, and Tim Ferrell.\n * All Rights Reserved.\n * Use, reproduction, distribution, and modification of this code is subject to the terms and\n * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php\n *\n * ARIA Support: Greta Krafsig\n *\n * Project: https://github.com/CodeSeven/toastr\n */\n/* global define */\n(function (define) {\n    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! jquery */ \"../node_modules/jquery/dist/jquery.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($) {\n        return (function () {\n            var $container;\n            var listener;\n            var toastId = 0;\n            var toastType = {\n                error: 'error',\n                info: 'info',\n                success: 'success',\n                warning: 'warning'\n            };\n\n            var toastr = {\n                clear: clear,\n                remove: remove,\n                error: error,\n                getContainer: getContainer,\n                info: info,\n                options: {},\n                subscribe: subscribe,\n                success: success,\n                version: '2.1.4',\n                warning: warning\n            };\n\n            var previousToast;\n\n            return toastr;\n\n            ////////////////\n\n            function error(message, title, optionsOverride) {\n                return notify({\n                    type: toastType.error,\n                    iconClass: getOptions().iconClasses.error,\n                    message: message,\n                    optionsOverride: optionsOverride,\n                    title: title\n                });\n            }\n\n            function getContainer(options, create) {\n                if (!options) { options = getOptions(); }\n                $container = $('#' + options.containerId);\n                if ($container.length) {\n                    return $container;\n                }\n                if (create) {\n                    $container = createContainer(options);\n                }\n                return $container;\n            }\n\n            function info(message, title, optionsOverride) {\n                return notify({\n                    type: toastType.info,\n                    iconClass: getOptions().iconClasses.info,\n                    message: message,\n                    optionsOverride: optionsOverride,\n                    title: title\n                });\n            }\n\n            function subscribe(callback) {\n                listener = callback;\n            }\n\n            function success(message, title, optionsOverride) {\n                return notify({\n                    type: toastType.success,\n                    iconClass: getOptions().iconClasses.success,\n                    message: message,\n                    optionsOverride: optionsOverride,\n                    title: title\n                });\n            }\n\n            function warning(message, title, optionsOverride) {\n                return notify({\n                    type: toastType.warning,\n                    iconClass: getOptions().iconClasses.warning,\n                    message: message,\n                    optionsOverride: optionsOverride,\n                    title: title\n                });\n            }\n\n            function clear($toastElement, clearOptions) {\n                var options = getOptions();\n                if (!$container) { getContainer(options); }\n                if (!clearToast($toastElement, options, clearOptions)) {\n                    clearContainer(options);\n                }\n            }\n\n            function remove($toastElement) {\n                var options = getOptions();\n                if (!$container) { getContainer(options); }\n                if ($toastElement && $(':focus', $toastElement).length === 0) {\n                    removeToast($toastElement);\n                    return;\n                }\n                if ($container.children().length) {\n                    $container.remove();\n                }\n            }\n\n            // internal functions\n\n            function clearContainer (options) {\n                var toastsToClear = $container.children();\n                for (var i = toastsToClear.length - 1; i >= 0; i--) {\n                    clearToast($(toastsToClear[i]), options);\n                }\n            }\n\n            function clearToast ($toastElement, options, clearOptions) {\n                var force = clearOptions && clearOptions.force ? clearOptions.force : false;\n                if ($toastElement && (force || $(':focus', $toastElement).length === 0)) {\n                    $toastElement[options.hideMethod]({\n                        duration: options.hideDuration,\n                        easing: options.hideEasing,\n                        complete: function () { removeToast($toastElement); }\n                    });\n                    return true;\n                }\n                return false;\n            }\n\n            function createContainer(options) {\n                $container = $('<div/>')\n                    .attr('id', options.containerId)\n                    .addClass(options.positionClass);\n\n                $container.appendTo($(options.target));\n                return $container;\n            }\n\n            function getDefaults() {\n                return {\n                    tapToDismiss: true,\n                    toastClass: 'toast',\n                    containerId: 'toast-container',\n                    debug: false,\n\n                    showMethod: 'fadeIn', //fadeIn, slideDown, and show are built into jQuery\n                    showDuration: 300,\n                    showEasing: 'swing', //swing and linear are built into jQuery\n                    onShown: undefined,\n                    hideMethod: 'fadeOut',\n                    hideDuration: 1000,\n                    hideEasing: 'swing',\n                    onHidden: undefined,\n                    closeMethod: false,\n                    closeDuration: false,\n                    closeEasing: false,\n                    closeOnHover: true,\n\n                    extendedTimeOut: 1000,\n                    iconClasses: {\n                        error: 'toast-error',\n                        info: 'toast-info',\n                        success: 'toast-success',\n                        warning: 'toast-warning'\n                    },\n                    iconClass: 'toast-info',\n                    positionClass: 'toast-top-right',\n                    timeOut: 5000, // Set timeOut and extendedTimeOut to 0 to make it sticky\n                    titleClass: 'toast-title',\n                    messageClass: 'toast-message',\n                    escapeHtml: false,\n                    target: 'body',\n                    closeHtml: '<button type=\"button\">&times;</button>',\n                    closeClass: 'toast-close-button',\n                    newestOnTop: true,\n                    preventDuplicates: false,\n                    progressBar: false,\n                    progressClass: 'toast-progress',\n                    rtl: false\n                };\n            }\n\n            function publish(args) {\n                if (!listener) { return; }\n                listener(args);\n            }\n\n            function notify(map) {\n                var options = getOptions();\n                var iconClass = map.iconClass || options.iconClass;\n\n                if (typeof (map.optionsOverride) !== 'undefined') {\n                    options = $.extend(options, map.optionsOverride);\n                    iconClass = map.optionsOverride.iconClass || iconClass;\n                }\n\n                if (shouldExit(options, map)) { return; }\n\n                toastId++;\n\n                $container = getContainer(options, true);\n\n                var intervalId = null;\n                var $toastElement = $('<div/>');\n                var $titleElement = $('<div/>');\n                var $messageElement = $('<div/>');\n                var $progressElement = $('<div/>');\n                var $closeElement = $(options.closeHtml);\n                var progressBar = {\n                    intervalId: null,\n                    hideEta: null,\n                    maxHideTime: null\n                };\n                var response = {\n                    toastId: toastId,\n                    state: 'visible',\n                    startTime: new Date(),\n                    options: options,\n                    map: map\n                };\n\n                personalizeToast();\n\n                displayToast();\n\n                handleEvents();\n\n                publish(response);\n\n                if (options.debug && console) {\n                    console.log(response);\n                }\n\n                return $toastElement;\n\n                function escapeHtml(source) {\n                    if (source == null) {\n                        source = '';\n                    }\n\n                    return source\n                        .replace(/&/g, '&amp;')\n                        .replace(/\"/g, '&quot;')\n                        .replace(/'/g, '&#39;')\n                        .replace(/</g, '&lt;')\n                        .replace(/>/g, '&gt;');\n                }\n\n                function personalizeToast() {\n                    setIcon();\n                    setTitle();\n                    setMessage();\n                    setCloseButton();\n                    setProgressBar();\n                    setRTL();\n                    setSequence();\n                    setAria();\n                }\n\n                function setAria() {\n                    var ariaValue = '';\n                    switch (map.iconClass) {\n                        case 'toast-success':\n                        case 'toast-info':\n                            ariaValue =  'polite';\n                            break;\n                        default:\n                            ariaValue = 'assertive';\n                    }\n                    $toastElement.attr('aria-live', ariaValue);\n                }\n\n                function handleEvents() {\n                    if (options.closeOnHover) {\n                        $toastElement.hover(stickAround, delayedHideToast);\n                    }\n\n                    if (!options.onclick && options.tapToDismiss) {\n                        $toastElement.click(hideToast);\n                    }\n\n                    if (options.closeButton && $closeElement) {\n                        $closeElement.click(function (event) {\n                            if (event.stopPropagation) {\n                                event.stopPropagation();\n                            } else if (event.cancelBubble !== undefined && event.cancelBubble !== true) {\n                                event.cancelBubble = true;\n                            }\n\n                            if (options.onCloseClick) {\n                                options.onCloseClick(event);\n                            }\n\n                            hideToast(true);\n                        });\n                    }\n\n                    if (options.onclick) {\n                        $toastElement.click(function (event) {\n                            options.onclick(event);\n                            hideToast();\n                        });\n                    }\n                }\n\n                function displayToast() {\n                    $toastElement.hide();\n\n                    $toastElement[options.showMethod](\n                        {duration: options.showDuration, easing: options.showEasing, complete: options.onShown}\n                    );\n\n                    if (options.timeOut > 0) {\n                        intervalId = setTimeout(hideToast, options.timeOut);\n                        progressBar.maxHideTime = parseFloat(options.timeOut);\n                        progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;\n                        if (options.progressBar) {\n                            progressBar.intervalId = setInterval(updateProgress, 10);\n                        }\n                    }\n                }\n\n                function setIcon() {\n                    if (map.iconClass) {\n                        $toastElement.addClass(options.toastClass).addClass(iconClass);\n                    }\n                }\n\n                function setSequence() {\n                    if (options.newestOnTop) {\n                        $container.prepend($toastElement);\n                    } else {\n                        $container.append($toastElement);\n                    }\n                }\n\n                function setTitle() {\n                    if (map.title) {\n                        var suffix = map.title;\n                        if (options.escapeHtml) {\n                            suffix = escapeHtml(map.title);\n                        }\n                        $titleElement.append(suffix).addClass(options.titleClass);\n                        $toastElement.append($titleElement);\n                    }\n                }\n\n                function setMessage() {\n                    if (map.message) {\n                        var suffix = map.message;\n                        if (options.escapeHtml) {\n                            suffix = escapeHtml(map.message);\n                        }\n                        $messageElement.append(suffix).addClass(options.messageClass);\n                        $toastElement.append($messageElement);\n                    }\n                }\n\n                function setCloseButton() {\n                    if (options.closeButton) {\n                        $closeElement.addClass(options.closeClass).attr('role', 'button');\n                        $toastElement.prepend($closeElement);\n                    }\n                }\n\n                function setProgressBar() {\n                    if (options.progressBar) {\n                        $progressElement.addClass(options.progressClass);\n                        $toastElement.prepend($progressElement);\n                    }\n                }\n\n                function setRTL() {\n                    if (options.rtl) {\n                        $toastElement.addClass('rtl');\n                    }\n                }\n\n                function shouldExit(options, map) {\n                    if (options.preventDuplicates) {\n                        if (map.message === previousToast) {\n                            return true;\n                        } else {\n                            previousToast = map.message;\n                        }\n                    }\n                    return false;\n                }\n\n                function hideToast(override) {\n                    var method = override && options.closeMethod !== false ? options.closeMethod : options.hideMethod;\n                    var duration = override && options.closeDuration !== false ?\n                        options.closeDuration : options.hideDuration;\n                    var easing = override && options.closeEasing !== false ? options.closeEasing : options.hideEasing;\n                    if ($(':focus', $toastElement).length && !override) {\n                        return;\n                    }\n                    clearTimeout(progressBar.intervalId);\n                    return $toastElement[method]({\n                        duration: duration,\n                        easing: easing,\n                        complete: function () {\n                            removeToast($toastElement);\n                            clearTimeout(intervalId);\n                            if (options.onHidden && response.state !== 'hidden') {\n                                options.onHidden();\n                            }\n                            response.state = 'hidden';\n                            response.endTime = new Date();\n                            publish(response);\n                        }\n                    });\n                }\n\n                function delayedHideToast() {\n                    if (options.timeOut > 0 || options.extendedTimeOut > 0) {\n                        intervalId = setTimeout(hideToast, options.extendedTimeOut);\n                        progressBar.maxHideTime = parseFloat(options.extendedTimeOut);\n                        progressBar.hideEta = new Date().getTime() + progressBar.maxHideTime;\n                    }\n                }\n\n                function stickAround() {\n                    clearTimeout(intervalId);\n                    progressBar.hideEta = 0;\n                    $toastElement.stop(true, true)[options.showMethod](\n                        {duration: options.showDuration, easing: options.showEasing}\n                    );\n                }\n\n                function updateProgress() {\n                    var percentage = ((progressBar.hideEta - (new Date().getTime())) / progressBar.maxHideTime) * 100;\n                    $progressElement.width(percentage + '%');\n                }\n            }\n\n            function getOptions() {\n                return $.extend({}, getDefaults(), toastr.options);\n            }\n\n            function removeToast($toastElement) {\n                if (!$container) { $container = getContainer(); }\n                if ($toastElement.is(':visible')) {\n                    return;\n                }\n                $toastElement.remove();\n                $toastElement = null;\n                if ($container.children().length === 0) {\n                    $container.remove();\n                    previousToast = undefined;\n                }\n            }\n\n        })();\n    }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n}(__webpack_require__(/*! !webpack amd define */ \"../node_modules/webpack/buildin/amd-define.js\")));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3RvYXN0ci90b2FzdHIuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vbm9kZV9tb2R1bGVzL3RvYXN0ci90b2FzdHIuanM/NTU4YSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogVG9hc3RyXG4gKiBDb3B5cmlnaHQgMjAxMi0yMDE1XG4gKiBBdXRob3JzOiBKb2huIFBhcG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ICAgICAgICAgICAgZXJyb3I6IGVycm9yLFxuICAgICAgICAgICAgICAgIGdldENvbnRhaW5lcjogZ2V0Q29udGFpbmVyLFxuICAgICAgICAgICAgICAgIGluZm86IGluZm8sXG4gICAgICAgICAgICAgICAgb3B0aW9uczoge30sXG4gICAgICAgICAgICAgICAgc3Vic2NyaWJlOiBzdWJzY3JpYmUsXG4gICAgICAgICAgICAgICAgc3VjY2Vzczogc3VjY2VzcyxcbiAgICAgICAgICAgICAgICB2ZXJzaW9uOiAnMi4xLjQnLFxuICAgICAgICAgICAgICAgIHdhcm5pbmc6IHdhcm5pbmdcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHZhciBwcmV2aW91c1RvYXN0O1xuXG4gICAgICAgICAgICByZXR1cm4gdG9hc3RyO1xuXG4gICAgICAgICAgICAvLy8vLy8vLy8vLy8vLy8vXG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGVycm9yKG1lc3NhZ2UsIHRpdGxlLCBvcHRpb25zT3ZlcnJpZGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm90aWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogdG9hc3RUeXBlLmVycm9yLFxuICAgICAgICAgICAgICAgICAgICBpY29uQ2xhc3M6IGdldE9wdGlvbnMoKS5pY29uQ2xhc3Nlcy5lcnJvcixcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogbWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uc092ZXJyaWRlOiBvcHRpb25zT3ZlcnJpZGUsXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW5jdGlvbiBnZXRDb250YWluZXIob3B0aW9ucywgY3JlYXRlKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFvcHRpb25zKSB7IG9wdGlvbnMgPSBnZXRPcHRpb25zKCk7IH1cbiAgICAgICAgICAgICAgICAkY29udGFpbmVyID0gJCgnIycgKyBvcHRpb25zLmNvbnRhaW5lcklkKTtcbiAgICAgICAgICAgICAgICBpZiAoJGNvbnRhaW5lci5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRjb250YWluZXI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjcmVhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgJGNvbnRhaW5lciA9IGNyZWF0ZUNvbnRhaW5lcihvcHRpb25zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuICRjb250YWluZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGluZm8obWVzc2FnZSwgdGl0bGUsIG9wdGlvbnNPdmVycmlkZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBub3RpZnkoe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiB0b2FzdFR5cGUuaW5mbyxcbiAgICAgICAgICAgICAgICAgICAgaWNvbkNsYXNzOiBnZXRPcHRpb25zKCkuaWNvbkNsYXNzZXMuaW5mbyxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogbWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uc092ZXJyaWRlOiBvcHRpb25zT3ZlcnJpZGUsXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW5jdGlvbiBzdWJzY3JpYmUoY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lciA9IGNhbGxiYWNrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW5jdGlvbiBzdWNjZXNzKG1lc3NhZ2UsIHRpdGxlLCBvcHRpb25zT3ZlcnJpZGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm90aWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogdG9hc3RUeXBlLnN1Y2Nlc3MsXG4gICAgICAgICAgICAgICAgICAgIGljb25DbGFzczogZ2V0T3B0aW9ucygpLmljb25DbGFzc2VzLnN1Y2Nlc3MsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnNPdmVycmlkZTogb3B0aW9uc092ZXJyaWRlLFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gd2FybmluZyhtZXNzYWdlLCB0aXRsZSwgb3B0aW9uc092ZXJyaWRlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vdGlmeSh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IHRvYXN0VHlwZS53YXJuaW5nLFxuICAgICAgICAgICAgICAgICAgICBpY29uQ2xhc3M6IGdldE9wdGlvbnMoKS5pY29uQ2xhc3Nlcy53YXJuaW5nLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBtZXNzYWdlLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zT3ZlcnJpZGU6IG9wdGlvbnNPdmVycmlkZSxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNsZWFyKCR0b2FzdEVsZW1lbnQsIGNsZWFyT3B0aW9ucykge1xuICAgICAgICAgICAgICAgIHZhciBvcHRpb25zID0gZ2V0T3B0aW9ucygpO1xuICAgICAgICAgICAgICAgIGlmICghJGNvbnRhaW5lcikgeyBnZXRDb250YWluZXIob3B0aW9ucyk7IH1cbiAgICAgICAgICAgICAgICBpZiAoIWNsZWFyVG9hc3QoJHRvYXN0RWxlbWVudCwgb3B0aW9ucywgY2xlYXJPcHRpb25zKSkge1xuICAgICAgICAgICAgICAgICAgICBjbGVhckNvbnRhaW5lcihvcHRpb25zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIHJlbW92ZSgkdG9hc3RFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgdmFyIG9wdGlvbnMgPSBnZXRPcHRpb25zKCk7XG4gICAgICAgICAgICAgICAgaWYgKCEkY29udGFpbmVyKSB7IGdldENvbnRhaW5lcihvcHRpb25zKTsgfVxuICAgICAgICAgICAgICAgIGlmICgkdG9hc3RFbGVtZW50ICYmICQoJzpmb2N1cycsICR0b2FzdEVsZW1lbnQpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZW1vdmVUb2FzdCgkdG9hc3RFbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoJGNvbnRhaW5lci5jaGlsZHJlbigpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAkY29udGFpbmVyLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gaW50ZXJuYWwgZnVuY3Rpb25zXG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNsZWFyQ29udGFpbmVyIChvcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRvYXN0c1RvQ2xlYXIgPSAkY29udGFpbmVyLmNoaWxkcmVuKCk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IHRvYXN0c1RvQ2xlYXIubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJUb2FzdCgkKHRvYXN0c1RvQ2xlYXJbaV0pLCBvcHRpb25zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNsZWFyVG9hc3QgKCR0b2FzdEVsZW1lbnQsIG9wdGlvbnMsIGNsZWFyT3B0aW9ucykge1xuICAgICAgICAgICAgICAgIHZhciBmb3JjZSA9IGNsZWFyT3B0aW9ucyAmJiBjbGVhck9wdGlvbnMuZm9yY2UgPyBjbGVhck9wdGlvbnMuZm9yY2UgOiBmYWxzZTtcbiAgICAgICAgICAgICAgICBpZiAoJHRvYXN0RWxlbWVudCAmJiAoZm9yY2UgfHwgJCgnOmZvY3VzJywgJHRvYXN0RWxlbWVudCkubGVuZ3RoID09PSAwKSkge1xuICAgICAgICAgICAgICAgICAgICAkdG9hc3RFbGVtZW50W29wdGlvbnMuaGlkZU1ldGhvZF0oe1xuICAgICAgICAgICAgICAgICAgICAgICAgZHVyYXRpb246IG9wdGlvbnMuaGlkZUR1cmF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgZWFzaW5nOiBvcHRpb25zLmhpZGVFYXNpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZTogZnVuY3Rpb24gKCkgeyByZW1vdmVUb2FzdCgkdG9hc3RFbGVtZW50KTsgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gY3JlYXRlQ29udGFpbmVyKG9wdGlvbnMpIHtcbiAgICAgICAgICAgICAgICAkY29udGFpbmVyID0gJCgnPGRpdi8+JylcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ2lkJywgb3B0aW9ucy5jb250YWluZXJJZClcbiAgICAgICAgICAgICAgICAgICAgLmFkZENsYXNzKG9wdGlvbnMucG9zaXRpb25DbGFzcyk7XG5cbiAgICAgICAgICAgICAgICAkY29udGFpbmVyLmFwcGVuZFRvKCQob3B0aW9ucy50YXJnZXQpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gJGNvbnRhaW5lcjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gZ2V0RGVmYXVsdHMoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdGFwVG9EaXNtaXNzOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICB0b2FzdENsYXNzOiAndG9hc3QnLFxuICAgICAgICAgICAgICAgICAgICBjb250YWluZXJJZDogJ3RvYXN0LWNvbnRhaW5lcicsXG4gICAgICAgICAgICAgICAgICAgIGRlYnVnOiBmYWxzZSxcblxuICAgICAgICAgICAgICAgICAgICBzaG93TWV0aG9kOiAnZmFkZUluJywgLy9mYWRlSW4sIHNsaWRlRG93biwgYW5kIHNob3cgYXJlIGJ1aWx0IGludG8galF1ZXJ5XG4gICAgICAgICAgICAgICAgICAgIHNob3dEdXJhdGlvbjogMzAwLFxuICAgICAgICAgICAgICAgICAgICBzaG93RWFzaW5nOiAnc3dpbmcnLCAvL3N3aW5nIGFuZCBsaW5lYXIgYXJlIGJ1aWx0IGludG8galF1ZXJ5XG4gICAgICAgICAgICAgICAgICAgIG9uU2hvd246IHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICAgICAgaGlkZU1ldGhvZDogJ2ZhZGVPdXQnLFxuICAgICAgICAgICAgICAgICAgICBoaWRlRHVyYXRpb246IDEwMDAsXG4gICAgICAgICAgICAgICAgICAgIGhpZGVFYXNpbmc6ICdzd2luZycsXG4gICAgICAgICAgICAgICAgICAgIG9uSGlkZGVuOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIGNsb3NlTWV0aG9kOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2xvc2VEdXJhdGlvbjogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGNsb3NlRWFzaW5nOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2xvc2VPbkhvdmVyOiB0cnVlLFxuXG4gICAgICAgICAgICAgICAgICAgIGV4dGVuZGVkVGltZU91dDogMTAwMCxcbiAgICAgICAgICAgICAgICAgICAgaWNvbkNsYXNzZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yOiAndG9hc3QtZXJyb3InLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5mbzogJ3RvYXN0LWluZm8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2VzczogJ3RvYXN0LXN1Y2Nlc3MnLFxuICAgICAgICAgICAgICAgICAgICAgICAgd2FybmluZzogJ3RvYXN0LXdhcm5pbmcnXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGljb25DbGFzczogJ3RvYXN0LWluZm8nLFxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbkNsYXNzOiAndG9hc3QtdG9wLXJpZ2h0JyxcbiAgICAgICAgICAgICAgICAgICAgdGltZU91dDogNTAwMCwgLy8gU2V0IHRpbWVPdXQgYW5kIGV4dGVuZGVkVGltZU91dCB0byAwIHRvIG1ha2UgaXQgc3RpY2t5XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlQ2xhc3M6ICd0b2FzdC10aXRsZScsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VDbGFzczogJ3RvYXN0LW1lc3NhZ2UnLFxuICAgICAgICAgICAgICAgICAgICBlc2NhcGVIdG1sOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0OiAnYm9keScsXG4gICAgICAgICAgICAgICAgICAgIGNsb3NlSHRtbDogJzxidXR0b24gdHlwZT1cImJ1dHRvblwiPiZ0aW1lczs8L2J1dHRvbj4nLFxuICAgICAgICAgICAgICAgICAgICBjbG9zZUNsYXNzOiAndG9hc3QtY2xvc2UtYnV0dG9uJyxcbiAgICAgICAgICAgICAgICAgICAgbmV3ZXN0T25Ub3A6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIHByZXZlbnREdXBsaWNhdGVzOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgcHJvZ3Jlc3NCYXI6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBwcm9ncmVzc0NsYXNzOiAndG9hc3QtcHJvZ3Jlc3MnLFxuICAgICAgICAgICAgICAgICAgICBydGw6IGZhbHNlXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gcHVibGlzaChhcmdzKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFsaXN0ZW5lcikgeyByZXR1cm47IH1cbiAgICAgICAgICAgICAgICBsaXN0ZW5lcihhcmdzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuY3Rpb24gbm90aWZ5KG1hcCkge1xuICAgICAgICAgICAgICAgIHZhciBvcHRpb25zID0gZ2V0T3B0aW9ucygpO1xuICAgICAgICAgICAgICAgIHZhciBpY29uQ2xhc3MgPSBtYXAuaWNvbkNsYXNzIHx8IG9wdGlvbnMuaWNvbkNsYXNzO1xuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAobWFwLm9wdGlvbnNPdmVycmlkZSkgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMgPSAkLmV4dGVuZChvcHRpb25zLCBtYXAub3B0aW9uc092ZXJyaWRlKTtcbiAgICAgICAgICAgICAgICAgICAgaWNvbkNsYXNzID0gbWFwLm9wdGlvbnNPdmVycmlkZS5pY29uQ2xhc3MgfHwgaWNvbkNsYXNzO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChzaG91bGRFeGl0KG9wdGlvbnMsIG1hcCkpIHsgcmV0dXJuOyB9XG5cbiAgICAgICAgICAgICAgICB0b2FzdElkKys7XG5cbiAgICAgICAgICAgICAgICAkY29udGFpbmVyID0gZ2V0Q29udGFpbmVyKG9wdGlvbnMsIHRydWUpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGludGVydmFsSWQgPSBudWxsO1xuICAgICAgICAgICAgICAgIHZhciAkdG9hc3RFbGVtZW50ID0gJCgnPGRpdi8+Jyk7XG4gICAgICAgICAgICAgICAgdmFyICR0aXRsZUVsZW1lbnQgPSAkKCc8ZGl2Lz4nKTtcbiAgICAgICAgICAgICAgICB2YXIgJG1lc3NhZ2VFbGVtZW50ID0gJCgnPGRpdi8+Jyk7XG4gICAgICAgICAgICAgICAgdmFyICRwcm9ncmVzc0VsZW1lbnQgPSAkKCc8ZGl2Lz4nKTtcbiAgICAgICAgICAgICAgICB2YXIgJGNsb3NlRWxlbWVudCA9ICQob3B0aW9ucy5jbG9zZUh0bWwpO1xuICAgICAgICAgICAgICAgIHZhciBwcm9ncmVzc0JhciA9IHtcbiAgICAgICAgICAgICAgICAgICAgaW50ZXJ2YWxJZDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUV0YTogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgbWF4SGlkZVRpbWU6IG51bGxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHZhciByZXNwb25zZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgdG9hc3RJZDogdG9hc3RJZCxcbiAgICAgICAgICAgICAgICAgICAgc3RhdGU6ICd2aXNpYmxlJyxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRUaW1lOiBuZXcgRGF0ZSgpLFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiBvcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICBtYXA6IG1hcFxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICBwZXJzb25hbGl6ZVRvYXN0KCk7XG5cbiAgICAgICAgICAgICAgICBkaXNwbGF5VG9hc3QoKTtcblxuICAgICAgICAgICAgICAgIGhhbmRsZUV2ZW50cygpO1xuXG4gICAgICAgICAgICAgICAgcHVibGlzaChyZXNwb25zZSk7XG5cbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5kZWJ1ZyAmJiBjb25zb2xlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gJHRvYXN0RWxlbWVudDtcblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGVzY2FwZUh0bWwoc291cmNlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzb3VyY2UgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlID0gJyc7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvJi9nLCAnJmFtcDsnKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoL1wiL2csICcmcXVvdDsnKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLycvZywgJyYjMzk7JylcbiAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC88L2csICcmbHQ7JylcbiAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC8+L2csICcmZ3Q7Jyk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gcGVyc29uYWxpemVUb2FzdCgpIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0SWNvbigpO1xuICAgICAgICAgICAgICAgICAgICBzZXRUaXRsZSgpO1xuICAgICAgICAgICAgICAgICAgICBzZXRNZXNzYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgIHNldENsb3NlQnV0dG9uKCk7XG4gICAgICAgICAgICAgICAgICAgIHNldFByb2dyZXNzQmFyKCk7XG4gICAgICAgICAgICAgICAgICAgIHNldFJUTCgpO1xuICAgICAgICAgICAgICAgICAgICBzZXRTZXF1ZW5jZSgpO1xuICAgICAgICAgICAgICAgICAgICBzZXRBcmlhKCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0QXJpYSgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGFyaWFWYWx1ZSA9ICcnO1xuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG1hcC5pY29uQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3RvYXN0LXN1Y2Nlc3MnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAndG9hc3QtaW5mbyc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJpYVZhbHVlID0gICdwb2xpdGUnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmlhVmFsdWUgPSAnYXNzZXJ0aXZlJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAkdG9hc3RFbGVtZW50LmF0dHIoJ2FyaWEtbGl2ZScsIGFyaWFWYWx1ZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gaGFuZGxlRXZlbnRzKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5jbG9zZU9uSG92ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICR0b2FzdEVsZW1lbnQuaG92ZXIoc3RpY2tBcm91bmQsIGRlbGF5ZWRIaWRlVG9hc3QpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFvcHRpb25zLm9uY2xpY2sgJiYgb3B0aW9ucy50YXBUb0Rpc21pc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICR0b2FzdEVsZW1lbnQuY2xpY2soaGlkZVRvYXN0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmNsb3NlQnV0dG9uICYmICRjbG9zZUVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRjbG9zZUVsZW1lbnQuY2xpY2soZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV2ZW50LnN0b3BQcm9wYWdhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGV2ZW50LmNhbmNlbEJ1YmJsZSAhPT0gdW5kZWZpbmVkICYmIGV2ZW50LmNhbmNlbEJ1YmJsZSAhPT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudC5jYW5jZWxCdWJibGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLm9uQ2xvc2VDbGljaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uQ2xvc2VDbGljayhldmVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlkZVRvYXN0KHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5vbmNsaWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkdG9hc3RFbGVtZW50LmNsaWNrKGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25jbGljayhldmVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlkZVRvYXN0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGRpc3BsYXlUb2FzdCgpIHtcbiAgICAgICAgICAgICAgICAgICAgJHRvYXN0RWxlbWVudC5oaWRlKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgJHRvYXN0RWxlbWVudFtvcHRpb25zLnNob3dNZXRob2RdKFxuICAgICAgICAgICAgICAgICAgICAgICAge2R1cmF0aW9uOiBvcHRpb25zLnNob3dEdXJhdGlvbiwgZWFzaW5nOiBvcHRpb25zLnNob3dFYXNpbmcsIGNvbXBsZXRlOiBvcHRpb25zLm9uU2hvd259XG4gICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMudGltZU91dCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGludGVydmFsSWQgPSBzZXRUaW1lb3V0KGhpZGVUb2FzdCwgb3B0aW9ucy50aW1lT3V0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzQmFyLm1heEhpZGVUaW1lID0gcGFyc2VGbG9hdChvcHRpb25zLnRpbWVPdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvZ3Jlc3NCYXIuaGlkZUV0YSA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpICsgcHJvZ3Jlc3NCYXIubWF4SGlkZVRpbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5wcm9ncmVzc0Jhcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzQmFyLmludGVydmFsSWQgPSBzZXRJbnRlcnZhbCh1cGRhdGVQcm9ncmVzcywgMTApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0SWNvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hcC5pY29uQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICR0b2FzdEVsZW1lbnQuYWRkQ2xhc3Mob3B0aW9ucy50b2FzdENsYXNzKS5hZGRDbGFzcyhpY29uQ2xhc3MpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0U2VxdWVuY2UoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLm5ld2VzdE9uVG9wKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkY29udGFpbmVyLnByZXBlbmQoJHRvYXN0RWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkY29udGFpbmVyLmFwcGVuZCgkdG9hc3RFbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNldFRpdGxlKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobWFwLnRpdGxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3VmZml4ID0gbWFwLnRpdGxlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXNjYXBlSHRtbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1ZmZpeCA9IGVzY2FwZUh0bWwobWFwLnRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICR0aXRsZUVsZW1lbnQuYXBwZW5kKHN1ZmZpeCkuYWRkQ2xhc3Mob3B0aW9ucy50aXRsZUNsYXNzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICR0b2FzdEVsZW1lbnQuYXBwZW5kKCR0aXRsZUVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0TWVzc2FnZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hcC5tZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc3VmZml4ID0gbWFwLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5lc2NhcGVIdG1sKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VmZml4ID0gZXNjYXBlSHRtbChtYXAubWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAkbWVzc2FnZUVsZW1lbnQuYXBwZW5kKHN1ZmZpeCkuYWRkQ2xhc3Mob3B0aW9ucy5tZXNzYWdlQ2xhc3MpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJHRvYXN0RWxlbWVudC5hcHBlbmQoJG1lc3NhZ2VFbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNldENsb3NlQnV0dG9uKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5jbG9zZUJ1dHRvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgJGNsb3NlRWxlbWVudC5hZGRDbGFzcyhvcHRpb25zLmNsb3NlQ2xhc3MpLmF0dHIoJ3JvbGUnLCAnYnV0dG9uJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkdG9hc3RFbGVtZW50LnByZXBlbmQoJGNsb3NlRWxlbWVudCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBzZXRQcm9ncmVzc0JhcigpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMucHJvZ3Jlc3NCYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRwcm9ncmVzc0VsZW1lbnQuYWRkQ2xhc3Mob3B0aW9ucy5wcm9ncmVzc0NsYXNzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICR0b2FzdEVsZW1lbnQucHJlcGVuZCgkcHJvZ3Jlc3NFbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNldFJUTCgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMucnRsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkdG9hc3RFbGVtZW50LmFkZENsYXNzKCdydGwnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNob3VsZEV4aXQob3B0aW9ucywgbWFwKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLnByZXZlbnREdXBsaWNhdGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWFwLm1lc3NhZ2UgPT09IHByZXZpb3VzVG9hc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNUb2FzdCA9IG1hcC5tZXNzYWdlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBoaWRlVG9hc3Qob3ZlcnJpZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG1ldGhvZCA9IG92ZXJyaWRlICYmIG9wdGlvbnMuY2xvc2VNZXRob2QgIT09IGZhbHNlID8gb3B0aW9ucy5jbG9zZU1ldGhvZCA6IG9wdGlvbnMuaGlkZU1ldGhvZDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGR1cmF0aW9uID0gb3ZlcnJpZGUgJiYgb3B0aW9ucy5jbG9zZUR1cmF0aW9uICE9PSBmYWxzZSA/XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmNsb3NlRHVyYXRpb24gOiBvcHRpb25zLmhpZGVEdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGVhc2luZyA9IG92ZXJyaWRlICYmIG9wdGlvbnMuY2xvc2VFYXNpbmcgIT09IGZhbHNlID8gb3B0aW9ucy5jbG9zZUVhc2luZyA6IG9wdGlvbnMuaGlkZUVhc2luZztcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQoJzpmb2N1cycsICR0b2FzdEVsZW1lbnQpLmxlbmd0aCAmJiAhb3ZlcnJpZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQocHJvZ3Jlc3NCYXIuaW50ZXJ2YWxJZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkdG9hc3RFbGVtZW50W21ldGhvZF0oe1xuICAgICAgICAgICAgICAgICAgICAgICAgZHVyYXRpb246IGR1cmF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgZWFzaW5nOiBlYXNpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZVRvYXN0KCR0b2FzdEVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChpbnRlcnZhbElkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5vbkhpZGRlbiAmJiByZXNwb25zZS5zdGF0ZSAhPT0gJ2hpZGRlbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkhpZGRlbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZS5zdGF0ZSA9ICdoaWRkZW4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLmVuZFRpbWUgPSBuZXcgRGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1Ymxpc2gocmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBkZWxheWVkSGlkZVRvYXN0KCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy50aW1lT3V0ID4gMCB8fCBvcHRpb25zLmV4dGVuZGVkVGltZU91dCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGludGVydmFsSWQgPSBzZXRUaW1lb3V0KGhpZGVUb2FzdCwgb3B0aW9ucy5leHRlbmRlZFRpbWVPdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvZ3Jlc3NCYXIubWF4SGlkZVRpbWUgPSBwYXJzZUZsb2F0KG9wdGlvbnMuZXh0ZW5kZWRUaW1lT3V0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzQmFyLmhpZGVFdGEgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKSArIHByb2dyZXNzQmFyLm1heEhpZGVUaW1lO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gc3RpY2tBcm91bmQoKSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChpbnRlcnZhbElkKTtcbiAgICAgICAgICAgICAgICAgICAgcHJvZ3Jlc3NCYXIuaGlkZUV0YSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICR0b2FzdEVsZW1lbnQuc3RvcCh0cnVlLCB0cnVlKVtvcHRpb25zLnNob3dNZXRob2RdKFxuICAgICAgICAgICAgICAgICAgICAgICAge2R1cmF0aW9uOiBvcHRpb25zLnNob3dEdXJhdGlvbiwgZWFzaW5nOiBvcHRpb25zLnNob3dFYXNpbmd9XG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gdXBkYXRlUHJvZ3Jlc3MoKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwZXJjZW50YWdlID0gKChwcm9ncmVzc0Jhci5oaWRlRXRhIC0gKG5ldyBEYXRlKCkuZ2V0VGltZSgpKSkgLyBwcm9ncmVzc0Jhci5tYXhIaWRlVGltZSkgKiAxMDA7XG4gICAgICAgICAgICAgICAgICAgICRwcm9ncmVzc0VsZW1lbnQud2lkdGgocGVyY2VudGFnZSArICclJyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW5jdGlvbiBnZXRPcHRpb25zKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAkLmV4dGVuZCh7fSwgZ2V0RGVmYXVsdHMoKSwgdG9hc3RyLm9wdGlvbnMpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW5jdGlvbiByZW1vdmVUb2FzdCgkdG9hc3RFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKCEkY29udGFpbmVyKSB7ICRjb250YWluZXIgPSB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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFDQSxpR0FNQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/toastr/toastr.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/webpack/buildin/amd-define.js":
-/*!*****************************************************!*\
-  !*** ../node_modules/webpack/buildin/amd-define.js ***!
-  \*****************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-eval("module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9hbWQtZGVmaW5lLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4uL25vZGVfbW9kdWxlcy93ZWJwYWNrL2J1aWxkaW4vYW1kLWRlZmluZS5qcz82N2FlIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24oKSB7XG5cdHRocm93IG5ldyBFcnJvcihcImRlZmluZSBjYW5ub3QgYmUgdXNlZCBpbmRpcmVjdFwiKTtcbn07XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/webpack/buildin/amd-define.js\n");
-
-/***/ }),
-
-/***/ "../node_modules/webpack/buildin/global.js":
-/*!*************************************************!*\
-  !*** ../node_modules/webpack/buildin/global.js ***!
-  \*************************************************/
-/*! no static exports found */
-/***/ (function(module, exports) {
-
-eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9nbG9iYWwuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9nbG9iYWwuanM/YTQyYiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZztcblxuLy8gVGhpcyB3b3JrcyBpbiBub24tc3RyaWN0IG1vZGVcbmcgPSAoZnVuY3Rpb24oKSB7XG5cdHJldHVybiB0aGlzO1xufSkoKTtcblxudHJ5IHtcblx0Ly8gVGhpcyB3b3JrcyBpZiBldmFsIGlzIGFsbG93ZWQgKHNlZSBDU1ApXG5cdGcgPSBnIHx8IG5ldyBGdW5jdGlvbihcInJldHVybiB0aGlzXCIpKCk7XG59IGNhdGNoIChlKSB7XG5cdC8vIFRoaXMgd29ya3MgaWYgdGhlIHdpbmRvdyByZWZlcmVuY2UgaXMgYXZhaWxhYmxlXG5cdGlmICh0eXBlb2Ygd2luZG93ID09PSBcIm9iamVjdFwiKSBnID0gd2luZG93O1xufVxuXG4vLyBnIGNhbiBzdGlsbCBiZSB1bmRlZmluZWQsIGJ1dCBub3RoaW5nIHRvIGRvIGFib3V0IGl0Li4uXG4vLyBXZSByZXR1cm4gdW5kZWZpbmVkLCBpbnN0ZWFkIG9mIG5vdGhpbmcgaGVyZSwgc28gaXQnc1xuLy8gZWFzaWVyIHRvIGhhbmRsZSB0aGlzIGNhc2UuIGlmKCFnbG9iYWwpIHsgLi4ufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGc7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/webpack/buildin/global.js\n");
-
-/***/ }),
-
-/***/ "./App/assets/js/components/_avatar.js":
-/*!*********************************************!*\
-  !*** ./App/assets/js/components/_avatar.js ***!
-  \*********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-eval("$(document).ready(function(){var fileInputCommonConfig={previewTemplates:{image:'<div class=\"file-preview-frame krajee-default kv-preview-thumb\" id=\"{previewId}\" data-fileindex=\"{fileindex}\" data-template=\"{template}\">\\n'+'   <div class=\"kv-file-content\" style=\"width: 100%;\">'+'       <img src=\"{data}\" class=\"kv-preview-data file-preview-image\" title=\"{caption}\" alt=\"{caption}\" '+'           style=\"height: auto; width: auto; max-width: 100%; max-height: 100%;\">\\n'+'   </div>\\n'+'</div>\\n'},layoutTemplates:{footer:''},showRemove:false,showUpload:false,showCancel:false,initialPreviewShowDelete:false,dropZoneEnabled:false,required:false,showClose:false,browseClass:'btn btn-default',browseLabel:'Browse',removeClass:'btn btn-default',uploadClass:'btn btn-default',allowedFileTypes:['image'],showUploadedThumbs:false,maxFileSize:10000,maxFilePreviewSize:10000};var $imageInput=$('.img-input');var userUploadUrl=$imageInput.data('url');var profilePreview=$imageInput.data('preview');fileInputCommonConfig.uploadUrl=userUploadUrl;fileInputCommonConfig.defaultPreviewContent='<div class=\"file-preview-frame krajee-default kv-preview-thumb\">\\n'+'   <div class=\"kv-file-content\" style=\"width: 100%;\">'+'       <img src=\"'+profilePreview+'\" class=\"kv-preview-data file-preview-image\"'+'           style=\"height: auto; width: auto; max-width: 100%; max-height: 100%;\">\\n'+'   </div>\\n'+'</div>\\n';$imageInput.fileinput(fileInputCommonConfig);$imageInput.on('fileuploaded',function(event,data,previewId,index){$(this).fileinput('reset');$('.file-preview-frame').find('img').attr('src',data.response.imageUrl)});$imageInput.on('change',function(){$('.img-input').fileinput('upload')})});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9BcHAvYXNzZXRzL2pzL2NvbXBvbmVudHMvX2F2YXRhci5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvQXBwL2Fzc2V0cy9qcy9jb21wb25lbnRzL19hdmF0YXIuanM/Yzk1MCJdLCJzb3VyY2VzQ29udGVudCI6WyIkKGRvY3VtZW50KS5yZWFkeShmdW5jdGlvbiAoKSB7XHJcbiAgICBsZXQgZmlsZUlucHV0Q29tbW9uQ29uZmlnID0ge1xyXG4gICAgICAgIHByZXZpZXdUZW1wbGF0ZXM6IHtcclxuICAgICAgICAgICAgaW1hZ2U6ICc8ZGl2IGNsYXNzPVwiZmlsZS1wcmV2aWV3LWZyYW1lIGtyYWplZS1kZWZhdWx0IGt2LXByZXZpZXctdGh1bWJcIiBpZD1cIntwcmV2aWV3SWR9XCIgZGF0YS1maWxlaW5kZXg9XCJ7ZmlsZWluZGV4fVwiIGRhdGEtdGVtcGxhdGU9XCJ7dGVtcGxhdGV9XCI+XFxuJyArXHJcbiAgICAgICAgICAgICAgICAnICAgPGRpdiBjbGFzcz1cImt2LWZpbGUtY29udGVudFwiIHN0eWxlPVwid2lkdGg6IDEwMCU7XCI+JyArXHJcbiAgICAgICAgICAgICAgICAnICAgICAgIDxpbWcgc3JjPVwie2RhdGF9XCIgY2xhc3M9XCJrdi1wcmV2aWV3LWRhdGEgZmlsZS1wcmV2aWV3LWltYWdlXCIgdGl0bGU9XCJ7Y2FwdGlvbn1cIiBhbHQ9XCJ7Y2FwdGlvbn1cIiAnICtcclxuICAgICAgICAgICAgICAgICcgICAgICAgICAgIHN0eWxlPVwiaGVpZ2h0OiBhdXRvOyB3aWR0aDogYXV0bzsgbWF4LXdpZHRoOiAxMDAlOyBtYXgtaGVpZ2h0OiAxMDAlO1w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WFnZUlucHV0Lm9uKCdjaGFuZ2UnLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgJCgnLmltZy1pbnB1dCcpLmZpbGVpbnB1dCgndXBsb2FkJyk7XHJcblxyXG4gICAgfSk7XHJcbn0pO1xyXG4iXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./App/assets/js/components/_avatar.js\n");
-
-/***/ }),
-
-/***/ "./App/assets/js/components/_contact.js":
-/*!**********************************************!*\
-  !*** ./App/assets/js/components/_contact.js ***!
-  \**********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-eval("$(document).ready(function(){$('.open-button').on('click',function(e){e.preventDefault();var container=$('#contact-form-container');$.ajax({type:'GET',url:'/contact/form'}).done(function(response){container.replaceWith(response);document.getElementById('contact-form-yb-frontend').style.display='block'}).fail(function(jqXHR){switch(jqXHR.status){default:window.toastr.error(translateText('Something went wrong! Please try again!'));break;}})});$('.cancel').on('click',function(){document.getElementById('contact-form-yb-frontend').style.display='none'});$('#send-expert-contact-form').on('click',function(e){e.preventDefault();var form=$('#contact_form');$.ajax({type:'POST',url:'/contact/save-contact-message',data:$(form).serialize()}).done(function(response){if(response.message.type==='success'){$('input[name=\"email\"]').val('');$('input[name=\"name\"]').val('');$('textarea[name=\"message\"]').val('');document.getElementById('contact-form-yb-frontend').style.display='none';window.toastr.success(translateText(response.message.text))}else{window.toastr.error(translateText(response.message.text))}}).fail(function(jqXHR){switch(jqXHR.status){case 422:var responseText=JSON.parse(translateText(jqXHR.responseText));window.toastr.error(responseText);break;case 401:var data=JSON.parse(translateText(jqXHR.responseText));redirectTo(data.redirect);break;default:window.toastr.error(translateText('Unexpected error. Please try again!'));break;}})})});function validateContactUsForm(){event.preventDefault();$('.contactUsFormErrors').hide();var submit=true;if(!$('.g-recaptcha')[0].dataset.sitekey){submit=false;$('#contactUsErrors').show();$('#recaptchaSiteKeyEmpty').show();return false}if($('#contact_form #name').val()==''){submit=false;$('#contactUsErrors').show();$('#contactUsEmptyName').show()}if($('#contact_form #email').val()==''){submit=false;$('#contactUsErrors').show();$('#contactUsEmptyEmail').show()}if($('#contact_form #message').val()==''){submit=false;$('#contactUsErrors').show();$('#contactUsEmptyText').show()}if(submit==true){grecaptcha.execute()}}window.validateContactUsForm=validateContactUsForm;function submitContactUsForm(){$('#contact_form').submit()}window.submitContactUsForm=submitContactUsForm;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9BcHAvYXNzZXRzL2pzL2NvbXBvbmVudHMvX2NvbnRhY3QuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL0FwcC9hc3NldHMvanMvY29tcG9uZW50cy9fY29udGFjdC5qcz85OTQ2Il0sInNvdXJjZXNDb250ZW50IjpbIiQoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uICgpIHtcclxuICAgICQoJy5vcGVuLWJ1dHRvbicpLm9uKCdjbGljaycsIGZ1bmN0aW9uIChlKSB7XHJcbiAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgIGxldCBjb250YWluZXIgPSAkKCcjY29udGFjdC1mb3JtLWNvbnRhaW5lcicpO1xyXG5cclxuICAgICAgICAkLmFqYXgoe1xyXG4gICAgICAgICAgICB0eXBlOiAnR0VUJyxcclxuICAgICAgICAgICAgdXJsOiAnL2NvbnRhY3QvZm9ybScsXHJcbiAgICAgICAgfSkuZG9uZShmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgY29udGFpbmVyLnJlcGxhY2VXaXRoKHJlc3BvbnNlKTtcclxuICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJjb250YWN0LWZvcm0teWItZnJvbnRlbmRcIikuc3R5bGUuZGlzcGxheSA9IFwiYmxvY2tcIjtcclxuICAgICAgICB9KS5mYWlsKGZ1bmN0aW9uIChqcVhIUikge1xyXG4gICAgICAgICAgICBzd2l0Y2ggKGpxWEhSLnN0YXR1cykge1xyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cudG9hc3RyLmVycm9yKHRyYW5zbGF0ZVRleHQoJ1NvbWV0aGluZyB3ZW50IHdyb25nISBQbGVhc2UgdHJ5IGFnYWluIScpKTtcclxuICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfSk7XHJcbiAgICAkKCcuY2FuY2VsJykub24oJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiY29udGFjdC1mb3JtLXliLWZyb250ZW5kXCIpLnN0eWxlLmRpc3BsYXkgPSBcIm5vbmVcIjtcclxuICAgIH0pO1xyXG5cclxuICAgICQoJyNzZW5kLWV4cGVydC1jb250YWN0LWZvcm0nKS5vbignY2xpY2snLCBmdW5jdGlvbiAoZSkge1xyXG4gICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICBsZXQgZm9ybSA9ICQoJyNjb250YWN0X2Zvcm0nKTtcclxuXHJcbiAgICAgICAgJC5hamF4KHtcclxuICAgICAgICAgICAgdHlwZTogXCJQT1NUXCIsXHJcbiAgICAgICAgICAgIHVybDogJy9jb250YWN0L3NhdmUtY29udGFjdC1tZXNzYWdlJyxcclxuICAgICAgICAgICAgZGF0YTogJChmb3JtKS5zZXJpYWxpemUoKVxyXG4gICAgICAgIH0pLmRvbmUoZnVuY3Rpb24gKHJlc3BvbnNlKSB7XHJcbiAgICAgICAgICAgIGlmIChyZXNwb25zZS5tZXNzYWdlLnR5cGUgPT09ICdzdWNjZXNzJykge1xyXG4gICAgICAgICAgICAgICAgJCgnaW5wdXRbbmFtZT1cImVtYWlsXCJdJykudmFsKCcnKTtcclxuICAgICAgICAgICAgICAgICQoJ2lucHV0W25hbWU9XCJuYW1lXCJdJykudmFsKCcnKTtcclxuICAgICAgICAgICAgICAgICQoJ3RleHRhcmVhW25hbWU9XCJtZXNzYWdlXCJdJykudmFsKCcnKTtcclxuICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiY29udGFjdC1mb3JtLXliLWZyb250ZW5kXCIpLnN0eWxlLmRpc3BsYXkgPSBcIm5vbmVcIjtcclxuICAgICAgICAgICAgICAgIHdpbmRvdy50b2FzdHIuc3VjY2Vzcyh0cmFuc2xhdGVUZXh0KHJlc3BvbnNlLm1lc3NhZ2UudGV4dCkpO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgd2luZG93LnRvYXN0ci5lcnJvcih0cmFuc2xhdGVUZXh0KHJlc3BvbnNlLm1lc3NhZ2UudGV4dCkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSkuZmFpbChmdW5jdGlvbiAoanFYSFIpIHtcclxuICAgICAgICAgICAgc3dpdGNoIChqcVhIUi5zdGF0dXMpIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgNDIyOlxyXG4gICAgICAgICAgICAgICAgICAgIGxldCByZXNwb25zZVRleHQgPSBKU09OLnBhcnNlKHRyYW5zbGF0ZVRleHQoanFYSFIucmVzcG9uc2VUZXh0KSk7XHJcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LnRvYXN0ci5lcnJvcihyZXNwb25zZVRleHQpO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG5cclxuICAgICAgICAgICAgICAgIGNhc2UgNDAxOlxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZSh0cmFuc2xhdGVUZXh0KGpxWEhSLnJlc3BvbnNlVGV4dCkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0VG8oZGF0YS5yZWRpcmVjdCk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcblxyXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcclxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cudG9hc3RyLmVycm9yKHRyYW5zbGF0ZVRleHQoXCJVbmV4cGVjdGVkIGVycm9yLiBQbGVhc2UgdHJ5IGFnYWluIVwiKSk7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH0pO1xyXG59KTtcclxuXHJcbmZ1bmN0aW9uIHZhbGlkYXRlQ29udGFjdFVzRm9ybSgpXHJcbntcclxuICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAkKCcuY29udGFjdFVzRm9ybUVycm9ycycpLmhpZGUoKTtcclxuICAgIHZhciBzdWJtaXQgPSB0cnVlO1xyXG4gICAgaWYgKCEkKCcuZy1yZWNhcHRjaGEnKVswXS5kYXRhc2V0LnNpdGVrZXkpIHtcclxuICAgICAgICBzdWJtaXQgPSBmYWxzZTtcclxuICAgICAgICAkKCcjY29udGFjdFVzRXJyb3JzJykuc2hvdygpO1xyXG4gICAgICAgICQoJyNyZWNhcHRjaGFTaXRlS2V5RW1wdHknKS5zaG93KCk7XHJcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xyXG4gICAgfVxyXG4gICAgaWYgKCQoJyNjb250YWN0X2Zvcm0gI25hbWUnKS52YWwoKSA9PSAnJykge1xyXG4gICAgICAgIHN1Ym1pdCA9IGZhbHNlO1xyXG4gICAgICAgICQoJyNjb250YWN0VXNFcnJvcnMnKS5zaG93KCk7XHJcbiAgICAgICAgJCgnI2NvbnRhY3RVc0VtcHR5TmFtZScpLnNob3coKTtcclxuICAgIH1cclxuICAgIGlmICgkKCcjY29udGFjdF9mb3JtICNlbWFpbCcpLnZhbCgpID09ICcnKSB7XHJcbiAgICAgICAgc3VibWl0ID0gZmFsc2U7XHJcbiAgICAgICAgJCgnI2NvbnRhY3RVc0Vycm9ycycpLnNob3coKTtcclxuICAgICAgICAkKCcjY29udGFjdFVzRW1wdHlFbWFpbCcpLnNob3coKTtcclxuICAgIH1cclxuICAgIGlmICgkKCcjY29udGFjdF9mb3JtICNtZXNzYWdlJykudmFsKCkgPT0gJycpIHtcclxuICAgICAgICBzdWJtaXQgPSBmYWxzZTtcclxuICAgICAgICAkKCcjY29udGFjdFVzRXJyb3JzJykuc2hvdygpO1xyXG4gICAgICAgICQoJyNjb250YWN0VXNFbXB0eVRleHQnKS5zaG93KCk7XHJcbiAgICB9XHJcbiAgICBpZiAoc3VibWl0ID09IHRydWUpIHtcclxuICAgICAgICBncmVjYXB0Y2hhLmV4ZWN1dGUoKTtcclxuICAgIH1cclxufVxyXG53aW5kb3cudmFsaWRhdGVDb250YWN0VXNGb3JtID0gdmFsaWRhdGVDb250YWN0VXNGb3JtO1xyXG5cclxuZnVuY3Rpb24gc3VibWl0Q29udGFjdFVzRm9ybSgpXHJcbntcclxuICAgICQoJyNjb250YWN0X2Zvcm0nKS5zdWJtaXQoKTtcclxufVxyXG53aW5kb3cuc3VibWl0Q29udGFjdFVzRm9ybSA9IHN1Ym1pdENvbnRhY3RVc0Zvcm07XHJcbiJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./App/assets/js/components/_contact.js\n");
-
-/***/ }),
-
-/***/ "./App/assets/js/components/_language.js":
-/*!***********************************************!*\
-  !*** ./App/assets/js/components/_language.js ***!
-  \***********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-eval("$(document).ready(function(){$(document).on('click','.language-container .language-active',function(){$('.language-list').slideToggle('fast')});$(document).on('click','.language-container .language',function(){var language=$(this);var languageKey=$(this).data('language-key');var langImageSrc=language.find('img').attr('src');$('.language-container .language-active').find('img').attr('src',langImageSrc);$('.language-list').slideToggle('fast');$('.language-list .language').removeClass('active');$.post('/language/change',{'languageKey':languageKey}).done(function(){// activate language in list\nlanguage.addClass('active');// reload page\nlocation.reload()})})});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9BcHAvYXNzZXRzL2pzL2NvbXBvbmVudHMvX2xhbmd1YWdlLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9BcHAvYXNzZXRzL2pzL2NvbXBvbmVudHMvX2xhbmd1YWdlLmpzPzg0MDgiXSwic291cmNlc0NvbnRlbnQiOlsiJChkb2N1bWVudCkucmVhZHkoZnVuY3Rpb24gKCkge1xyXG4gICAgJChkb2N1bWVudCkub24oJ2NsaWNrJywgJy5sYW5ndWFnZS1jb250YWluZXIgLmxhbmd1YWdlLWFjdGl2ZScsIGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAkKFwiLmxhbmd1YWdlLWxpc3RcIikuc2xpZGVUb2dnbGUoXCJmYXN0XCIpO1xyXG4gICAgfSk7XHJcblxyXG4gICAgJChkb2N1bWVudCkub24oJ2NsaWNrJywgJy5sYW5ndWFnZS1jb250YWluZXIgLmxhbmd1YWdlJywgZnVuY3Rpb24gKCkge1xyXG4gICAgICAgIGxldCBsYW5ndWFnZSA9ICQodGhpcyk7XHJcbiAgICAgICAgbGV0IGxhbmd1YWdlS2V5ID0gJCh0aGlzKS5kYXRhKCdsYW5ndWFnZS1rZXknKTtcclxuICAgICAgICBsZXQgbGFuZ0ltYWdlU3JjID0gbGFuZ3VhZ2UuZmluZCgnaW1nJykuYXR0cignc3JjJyk7XHJcblxyXG4gICAgICAgICQoJy5sYW5ndWFnZS1jb250YWluZXIgLmxhbmd1YWdlLWFjdGl2ZScpLmZpbmQoJ2ltZycpLmF0dHIoJ3NyYycsIGxhbmdJbWFnZVNyYyk7XHJcblxyXG4gICAgICAgICQoXCIubGFuZ3VhZ2UtbGlzdFwiKS5zbGlkZVRvZ2dsZShcImZhc3RcIik7XHJcbiAgICAgICAgJChcIi5sYW5ndWFnZS1saXN0IC5sYW5ndWFnZVwiKS5yZW1vdmVDbGFzcygnYWN0aXZlJyk7XHJcblxyXG4gICAgICAgICQucG9zdChcclxuICAgICAgICAgICAgJy9sYW5ndWFnZS9jaGFuZ2UnLFxyXG4gICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAnbGFuZ3VhZ2VLZXknOiBsYW5ndWFnZUtleVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgKVxyXG4gICAgICAgIC5kb25lKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgLy8gYWN0aXZhdGUgbGFuZ3VhZ2UgaW4gbGlzdFxyXG4gICAgICAgICAgICBsYW5ndWFnZS5hZGRDbGFzcygnYWN0aXZlJyk7XHJcblxyXG4gICAgICAgICAgICAvLyByZWxvYWQgcGFnZVxyXG4gICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTtcclxuICAgICAgICB9KTtcclxuICAgIH0pO1xyXG59KTtcclxuIl0sIm1hcHBpbmdzIjoiQUFBQTtBQXVCQTtBQUdBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./App/assets/js/components/_language.js\n");
-
-/***/ }),
-
-/***/ "./App/assets/js/components/_profile.js":
-/*!**********************************************!*\
-  !*** ./App/assets/js/components/_profile.js ***!
-  \**********************************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-eval("$(document).ready(function(){/* Search patterns */$('.collapse-menu').on('click',function(){$('.profile-action-menu').slideToggle()})});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9BcHAvYXNzZXRzL2pzL2NvbXBvbmVudHMvX3Byb2ZpbGUuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL0FwcC9hc3NldHMvanMvY29tcG9uZW50cy9fcHJvZmlsZS5qcz8zZDkyIl0sInNvdXJjZXNDb250ZW50IjpbIiQoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uICgpIHtcclxuICAgIC8qIFNlYXJjaCBwYXR0ZXJucyAqL1xyXG4gICAgJCgnLmNvbGxhcHNlLW1lbnUnKS5vbignY2xpY2snLCBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgJCgnLnByb2ZpbGUtYWN0aW9uLW1lbnUnKS5zbGlkZVRvZ2dsZSgpO1xyXG4gICAgfSk7XHJcbn0pOyJdLCJtYXBwaW5ncyI6IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./App/assets/js/components/_profile.js\n");
-
-/***/ }),
-
-/***/ "./App/assets/js/index.js":
-/*!********************************!*\
-  !*** ./App/assets/js/index.js ***!
-  \********************************/
-/*! no static exports found */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-eval("// Load jQuery and Bootstrap\ntry{window.$=window.jQuery=__webpack_require__(/*! jquery */ \"../node_modules/jquery/dist/jquery.js\");__webpack_require__(/*! bootstrap */ \"../node_modules/bootstrap/dist/js/bootstrap.js\");__webpack_require__(/*! bootstrap-fileinput */ \"../node_modules/bootstrap-fileinput/js/fileinput.js\");__webpack_require__(/*! bootstrap-slider */ \"../node_modules/bootstrap-slider/dist/bootstrap-slider.js\");__webpack_require__(/*! jquery-mousewheel */ \"../node_modules/jquery-mousewheel/jquery.mousewheel.js\");window.toastr=__webpack_require__(/*! toastr */ \"../node_modules/toastr/toastr.js\");window.translateText=function translateText(text){var translation=void 0;$.ajax({type:'post',url:'/language/translate-text',data:{'text':text},async:false}).done(function(response){translation=response['translation']}).fail(function(jqXHR){return text});return translation}}catch(e){}__webpack_require__(/*! ./components/_contact */ \"./App/assets/js/components/_contact.js\");__webpack_require__(/*! ./components/_language */ \"./App/assets/js/components/_language.js\");__webpack_require__(/*! ./components/_avatar */ \"./App/assets/js/components/_avatar.js\");__webpack_require__(/*! ./components/_profile */ \"./App/assets/js/components/_profile.js\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9BcHAvYXNzZXRzL2pzL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy9BcHAvYXNzZXRzL2pzL2luZGV4LmpzPzg3MGMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9hZCBqUXVlcnkgYW5kIEJvb3RzdHJhcFxudHJ5IHtcbiAgICB3aW5kb3cuJCA9IHdpbmRvdy5qUXVlcnkgPSByZXF1aXJlKCdqcXVlcnknKTtcbiAgICByZXF1aXJlKCdib290c3RyYXAnKTtcbiAgICByZXF1aXJlKCdib290c3RyYXAtZmlsZWlucHV0Jyk7XG4gICAgcmVxdWlyZSgnYm9vdHN0cmFwLXNsaWRlcicpO1xuICAgIHJlcXVpcmUoJ2pxdWVyeS1tb3VzZXdoZWVsJyk7XG5cbiAgICB3aW5kb3cudG9hc3RyID0gcmVxdWlyZSgndG9hc3RyJyk7XG5cbiAgICB3aW5kb3cudHJhbnNsYXRlVGV4dCA9IGZ1bmN0aW9uIHRyYW5zbGF0ZVRleHQodGV4dClcbiAgICB7XG4gICAgICAgIGxldCB0cmFuc2xhdGlvbjtcblxuICAgICAgICAkLmFqYXgoe1xuICAgICAgICAgICAgdHlwZTogJ3Bvc3QnLFxuICAgICAgICAgICAgdXJsOiAnL2xhbmd1YWdlL3RyYW5zbGF0ZS10ZXh0JyxcbiAgICAgICAgICAgIGRhdGE6ICB7XG4gICAgICAgICAgICAgICAgJ3RleHQnOiB0ZXh0XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYXN5bmM6IGZhbHNlLFxuICAgICAgICB9KS5kb25lKGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgICAgdHJhbnNsYXRpb24gPSByZXNwb25zZVsndHJhbnNsYXRpb24nXTtcbiAgICAgICAgfSkuZmFpbChmdW5jdGlvbiAoanFYSFIpIHtcbiAgICAgICAgICAgIHJldHVybiB0ZXh0O1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gdHJhbnNsYXRpb247XG4gICAgfTtcbn0gY2F0Y2ggKGUpIHtcbn1cblxucmVxdWlyZSgnLi9jb21wb25lbnRzL19jb250YWN0Jyk7XG5yZXF1aXJlKCcuL2NvbXBvbmVudHMvX2xhbmd1YWdlJyk7XG5yZXF1aXJlKCcuL2NvbXBvbmVudHMvX2F2YXRhcicpO1xucmVxdWlyZSgnLi9jb21wb25lbnRzL19wcm9maWxlJyk7XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./App/assets/js/index.js\n");
-
-/***/ })
-
-/******/ });
\ No newline at end of file
+!function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i(i.s=1)}([function(e,t,i){var n;
+/*!
+ * jQuery JavaScript Library v3.5.1
+ * https://jquery.com/
+ *
+ * Includes Sizzle.js
+ * https://sizzlejs.com/
+ *
+ * Copyright JS Foundation and other contributors
+ * Released under the MIT license
+ * https://jquery.org/license
+ *
+ * Date: 2020-05-04T22:49Z
+ */!function(t,i){"use strict";"object"==typeof e.exports?e.exports=t.document?i(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(t)}("undefined"!=typeof window?window:this,(function(i,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,u=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),g={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=function(e){return null!=e&&e===e.window},b=i.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,i){var n,r,o=(i=i||b).createElement("script");if(o.text=e,t)for(n in y)(r=t[n]||t.getAttribute&&t.getAttribute(n))&&o.setAttribute(n,r);i.head.appendChild(o).parentNode.removeChild(o)}function C(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[h.call(e)]||"object":typeof e}var x=function(e,t){return new x.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,i=C(e);return!v(e)&&!_(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}x.fn=x.prototype={jquery:"3.5.1",constructor:x,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,(function(t,i){return e.call(t,i,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(x.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:o.sort,splice:o.splice},x.extend=x.fn.extend=function(){var e,t,i,n,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||v(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=e[t],"__proto__"!==t&&s!==n&&(c&&n&&(x.isPlainObject(n)||(r=Array.isArray(n)))?(i=s[t],o=r&&!Array.isArray(i)?[]:r||x.isPlainObject(i)?i:{},r=!1,s[t]=x.extend(c,o,n)):void 0!==n&&(s[t]=n));return s},x.extend({expando:"jQuery"+("3.5.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!(!e||"[object Object]"!==h.call(e))&&(!(t=s(e))||"function"==typeof(i=f.call(t,"constructor")&&t.constructor)&&p.call(i)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,i){w(e,{nonce:t&&t.nonce},i)},each:function(e,t){var i,n=0;if(E(e))for(i=e.length;n<i&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},makeArray:function(e,t){var i=t||[];return null!=e&&(E(Object(e))?x.merge(i,"string"==typeof e?[e]:e):c.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:u.call(t,e,i)},merge:function(e,t){for(var i=+t.length,n=0,r=e.length;n<i;n++)e[r++]=t[n];return e.length=r,e},grep:function(e,t,i){for(var n=[],r=0,o=e.length,s=!i;r<o;r++)!t(e[r],r)!==s&&n.push(e[r]);return n},map:function(e,t,i){var n,r,o=0,s=[];if(E(e))for(n=e.length;o<n;o++)null!=(r=t(e[o],o,i))&&s.push(r);else for(o in e)null!=(r=t(e[o],o,i))&&s.push(r);return l(s)},guid:1,support:g}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=o[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var T=
+/*!
+ * Sizzle CSS Selector Engine v2.3.5
+ * https://sizzlejs.com/
+ *
+ * Copyright JS Foundation and other contributors
+ * Released under the MIT license
+ * https://js.foundation/
+ *
+ * Date: 2020-03-14
+ */
+function(e){var t,i,n,r,o,s,a,l,c,u,d,h,f,p,m,g,v,_,b,y="sizzle"+1*new Date,w=e.document,C=0,x=0,E=le(),T=le(),k=le(),S=le(),A=function(e,t){return e===t&&(d=!0),0},I={}.hasOwnProperty,D=[],P=D.pop,F=D.push,O=D.push,N=D.slice,L=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}"+j+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\["+j+"*("+R+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+j+"*\\]",U=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",$=new RegExp(j+"+","g"),H=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),B=new RegExp("^"+j+"*,"+j+"*"),q=new RegExp("^"+j+"*([>+~]|"+j+")"+j+"*"),W=new RegExp(j+"|>"),V=new RegExp(U),Z=new RegExp("^"+R+"$"),K={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+j+"?|\\\\([^\\r\\n\\f])","g"),ie=function(e,t){var i="0x"+e.slice(1)-65536;return t||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},ne=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},se=ye((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{O.apply(D=N.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(e){O={apply:D.length?function(e,t){F.apply(e,N.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}function ae(e,t,n,r){var o,a,c,u,d,p,v,_=t&&t.ownerDocument,w=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return n;if(!r&&(h(t),t=t||f,m)){if(11!==w&&(d=J.exec(e)))if(o=d[1]){if(9===w){if(!(c=t.getElementById(o)))return n;if(c.id===o)return n.push(c),n}else if(_&&(c=_.getElementById(o))&&b(t,c)&&c.id===o)return n.push(c),n}else{if(d[2])return O.apply(n,t.getElementsByTagName(e)),n;if((o=d[3])&&i.getElementsByClassName&&t.getElementsByClassName)return O.apply(n,t.getElementsByClassName(o)),n}if(i.qsa&&!S[e+" "]&&(!g||!g.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,_=t,1===w&&(W.test(e)||q.test(e))){for((_=ee.test(e)&&ve(t.parentNode)||t)===t&&i.scope||((u=t.getAttribute("id"))?u=u.replace(ne,re):t.setAttribute("id",u=y)),a=(p=s(e)).length;a--;)p[a]=(u?"#"+u:":scope")+" "+be(p[a]);v=p.join(",")}try{return O.apply(n,_.querySelectorAll(v)),n}catch(t){S(e,!0)}finally{u===y&&t.removeAttribute("id")}}}return l(e.replace(H,"$1"),t,n,r)}function le(){var e=[];return function t(i,r){return e.push(i+" ")>n.cacheLength&&delete t[e.shift()],t[i+" "]=r}}function ce(e){return e[y]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var i=e.split("|"),r=i.length;r--;)n.attrHandle[i[r]]=t}function he(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(i,n){for(var r,o=e([],i.length,t),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in i=ae.support={},o=ae.isXML=function(e){var t=e.namespaceURI,i=(e.ownerDocument||e).documentElement;return!Q.test(t||i&&i.nodeName||"HTML")},h=ae.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:w;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),w!=f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),i.scope=ue((function(e){return p.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),i.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),i.getElementsByTagName=ue((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),i.getElementsByClassName=G.test(f.getElementsByClassName),i.getById=ue((function(e){return p.appendChild(e).id=y,!f.getElementsByName||!f.getElementsByName(y).length})),i.getById?(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var i=t.getElementById(e);return i?[i]:[]}}):(n.filter.ID=function(e){var t=e.replace(te,ie);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var i,n,r,o=t.getElementById(e);if(o){if((i=o.getAttributeNode("id"))&&i.value===e)return[o];for(r=t.getElementsByName(e),n=0;o=r[n++];)if((i=o.getAttributeNode("id"))&&i.value===e)return[o]}return[]}}),n.find.TAG=i.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):i.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(i.qsa=G.test(f.querySelectorAll))&&(ue((function(e){var t;p.appendChild(e).innerHTML="<a id='"+y+"'></a><select id='"+y+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+j+"*(?:value|"+M+")"),e.querySelectorAll("[id~="+y+"-]").length||g.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+j+"*name"+j+"*="+j+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+y+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+j+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(i.matchesSelector=G.test(_=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ue((function(e){i.disconnectedMatch=_.call(e,"*"),_.call(e,"[s!='']:x"),v.push("!=",U)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=G.test(p.compareDocumentPosition),b=t||G.test(p.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!i.sortDetached&&t.compareDocumentPosition(e)===n?e==f||e.ownerDocument==w&&b(w,e)?-1:t==f||t.ownerDocument==w&&b(w,t)?1:u?L(u,e)-L(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return d=!0,0;var i,n=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e==f?-1:t==f?1:r?-1:o?1:u?L(u,e)-L(u,t):0;if(r===o)return he(e,t);for(i=e;i=i.parentNode;)s.unshift(i);for(i=t;i=i.parentNode;)a.unshift(i);for(;s[n]===a[n];)n++;return n?he(s[n],a[n]):s[n]==w?-1:a[n]==w?1:0},f):f},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),i.matchesSelector&&m&&!S[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var n=_.call(e,t);if(n||i.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){S(t,!0)}return ae(t,f,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),b(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var r=n.attrHandle[t.toLowerCase()],o=r&&I.call(n.attrHandle,t.toLowerCase())?r(e,t,!m):void 0;return void 0!==o?o:i.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(ne,re)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,n=[],r=0,o=0;if(d=!i.detectDuplicates,u=!i.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return u=null,e},r=ae.getText=function(e){var t,i="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)i+=r(t);return i},(n=ae.selectors={cacheLength:50,createPseudo:ce,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ie),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ie),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&V.test(i)&&(t=s(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ie).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&E(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,i){return function(n){var r=ae.attr(n,e);return null==r?"!="===t:!t||(r+="","="===t?r===i:"!="===t?r!==i:"^="===t?i&&0===r.indexOf(i):"*="===t?i&&r.indexOf(i)>-1:"$="===t?i&&r.slice(-i.length)===i:"~="===t?(" "+r.replace($," ")+" ").indexOf(i)>-1:"|="===t&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,i,n,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===n&&0===r?function(e){return!!e.parentNode}:function(t,i,l){var c,u,d,h,f,p,m=o!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),_=!l&&!a,b=!1;if(g){if(o){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?g.firstChild:g.lastChild],s&&_){for(b=(f=(c=(u=(d=(h=g)[y]||(h[y]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1])&&c[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[C,f,b];break}}else if(_&&(b=f=(c=(u=(d=(h=t)[y]||(h[y]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1]),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(_&&((u=(d=h[y]||(h[y]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[C,b]),h!==t)););return(b-=r)===n||b%n==0&&b/n>=0}}},PSEUDO:function(e,t){var i,r=n.pseudos[e]||n.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return r[y]?r(t):r.length>1?(i=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,i){for(var n,o=r(e,t),s=o.length;s--;)e[n=L(e,o[s])]=!(i[n]=o[s])})):function(e){return r(e,0,i)}):r}},pseudos:{not:ce((function(e){var t=[],i=[],n=a(e.replace(H,"$1"));return n[y]?ce((function(e,t,i,r){for(var o,s=n(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,r,o){return t[0]=e,n(t,null,o,i),t[0]=null,!i.pop()}})),has:ce((function(e){return function(t){return ae(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ie),function(t){return(t.textContent||r(t)).indexOf(e)>-1}})),lang:ce((function(e){return Z.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ie).toLowerCase(),function(t){var i;do{if(i=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,i){return[i<0?i+t:i]})),even:ge((function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e})),odd:ge((function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e})),lt:ge((function(e,t,i){for(var n=i<0?i+t:i>t?t:i;--n>=0;)e.push(n);return e})),gt:ge((function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e}))}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})n.pseudos[t]=pe(t);function _e(){}function be(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function ye(e,t,i){var n=t.dir,r=t.next,o=r||n,s=i&&"parentNode"===o,a=x++;return t.first?function(t,i,r){for(;t=t[n];)if(1===t.nodeType||s)return e(t,i,r);return!1}:function(t,i,l){var c,u,d,h=[C,a];if(l){for(;t=t[n];)if((1===t.nodeType||s)&&e(t,i,l))return!0}else for(;t=t[n];)if(1===t.nodeType||s)if(u=(d=t[y]||(t[y]={}))[t.uniqueID]||(d[t.uniqueID]={}),r&&r===t.nodeName.toLowerCase())t=t[n]||t;else{if((c=u[o])&&c[0]===C&&c[1]===a)return h[2]=c[2];if(u[o]=h,h[2]=e(t,i,l))return!0}return!1}}function we(e){return e.length>1?function(t,i,n){for(var r=e.length;r--;)if(!e[r](t,i,n))return!1;return!0}:e[0]}function Ce(e,t,i,n,r){for(var o,s=[],a=0,l=e.length,c=null!=t;a<l;a++)(o=e[a])&&(i&&!i(o,n,r)||(s.push(o),c&&t.push(a)));return s}function xe(e,t,i,n,r,o){return n&&!n[y]&&(n=xe(n)),r&&!r[y]&&(r=xe(r,o)),ce((function(o,s,a,l){var c,u,d,h=[],f=[],p=s.length,m=o||function(e,t,i){for(var n=0,r=t.length;n<r;n++)ae(e,t[n],i);return i}(t||"*",a.nodeType?[a]:a,[]),g=!e||!o&&t?m:Ce(m,h,e,a,l),v=i?r||(o?e:p||n)?[]:s:g;if(i&&i(g,v,a,l),n)for(c=Ce(v,f),n(c,[],a,l),u=c.length;u--;)(d=c[u])&&(v[f[u]]=!(g[f[u]]=d));if(o){if(r||e){if(r){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(g[u]=d);r(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&(c=r?L(o,d):h[u])>-1&&(o[c]=!(s[c]=d))}}else v=Ce(v===s?v.splice(p,v.length):v),r?r(null,s,v,l):O.apply(s,v)}))}function Ee(e){for(var t,i,r,o=e.length,s=n.relative[e[0].type],a=s||n.relative[" "],l=s?1:0,u=ye((function(e){return e===t}),a,!0),d=ye((function(e){return L(t,e)>-1}),a,!0),h=[function(e,i,n){var r=!s&&(n||i!==c)||((t=i).nodeType?u(e,i,n):d(e,i,n));return t=null,r}];l<o;l++)if(i=n.relative[e[l].type])h=[ye(we(h),i)];else{if((i=n.filter[e[l].type].apply(null,e[l].matches))[y]){for(r=++l;r<o&&!n.relative[e[r].type];r++);return xe(l>1&&we(h),l>1&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(H,"$1"),i,l<r&&Ee(e.slice(l,r)),r<o&&Ee(e=e.slice(r)),r<o&&be(e))}h.push(i)}return we(h)}return _e.prototype=n.filters=n.pseudos,n.setFilters=new _e,s=ae.tokenize=function(e,t){var i,r,o,s,a,l,c,u=T[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=n.preFilter;a;){for(s in i&&!(r=B.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=q.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(H," ")}),a=a.slice(i.length)),n.filter)!(r=K[s].exec(a))||c[s]&&!(r=c[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return t?a.length:a?ae.error(e):T(e,l).slice(0)},a=ae.compile=function(e,t){var i,r=[],o=[],a=k[e+" "];if(!a){for(t||(t=s(e)),i=t.length;i--;)(a=Ee(t[i]))[y]?r.push(a):o.push(a);(a=k(e,function(e,t){var i=t.length>0,r=e.length>0,o=function(o,s,a,l,u){var d,p,g,v=0,_="0",b=o&&[],y=[],w=c,x=o||r&&n.find.TAG("*",u),E=C+=null==w?1:Math.random()||.1,T=x.length;for(u&&(c=s==f||s||u);_!==T&&null!=(d=x[_]);_++){if(r&&d){for(p=0,s||d.ownerDocument==f||(h(d),a=!m);g=e[p++];)if(g(d,s||f,a)){l.push(d);break}u&&(C=E)}i&&((d=!g&&d)&&v--,o&&b.push(d))}if(v+=_,i&&_!==v){for(p=0;g=t[p++];)g(b,y,s,a);if(o){if(v>0)for(;_--;)b[_]||y[_]||(y[_]=P.call(l));y=Ce(y)}O.apply(l,y),u&&!o&&y.length>0&&v+t.length>1&&ae.uniqueSort(l)}return u&&(C=E,c=w),b};return i?ce(o):o}(o,r))).selector=e}return a},l=ae.select=function(e,t,i,r){var o,l,c,u,d,h="function"==typeof e&&e,f=!r&&s(e=h.selector||e);if(i=i||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&m&&n.relative[l[1].type]){if(!(t=(n.find.ID(c.matches[0].replace(te,ie),t)||[])[0]))return i;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=K.needsContext.test(e)?0:l.length;o--&&(c=l[o],!n.relative[u=c.type]);)if((d=n.find[u])&&(r=d(c.matches[0].replace(te,ie),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(o,1),!(e=r.length&&be(l)))return O.apply(i,r),i;break}}return(h||a(e,f))(r,t,!m,i,!t||ee.test(e)&&ve(t.parentNode)||t),i},i.sortStable=y.split("").sort(A).join("")===y,i.detectDuplicates=!!d,h(),i.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),i.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||de(M,(function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),ae}(i);x.find=T,x.expr=T.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=T.uniqueSort,x.text=T.getText,x.isXMLDoc=T.isXML,x.contains=T.contains,x.escapeSelector=T.escape;var k=function(e,t,i){for(var n=[],r=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&x(e).is(i))break;n.push(e)}return n},S=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},A=x.expr.match.needsContext;function I(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(e,t,i){return v(t)?x.grep(e,(function(e,n){return!!t.call(e,n,e)!==i})):t.nodeType?x.grep(e,(function(e){return e===t!==i})):"string"!=typeof t?x.grep(e,(function(e){return u.call(t,e)>-1!==i})):x.filter(t,e,i)}x.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?x.find.matchesSelector(n,e)?[n]:[]:x.find.matches(e,x.grep(t,(function(e){return 1===e.nodeType})))},x.fn.extend({find:function(e){var t,i,n=this.length,r=this;if("string"!=typeof e)return this.pushStack(x(e).filter((function(){for(t=0;t<n;t++)if(x.contains(r[t],this))return!0})));for(i=this.pushStack([]),t=0;t<n;t++)x.find(e,r[t],i);return n>1?x.uniqueSort(i):i},filter:function(e){return this.pushStack(P(this,e||[],!1))},not:function(e){return this.pushStack(P(this,e||[],!0))},is:function(e){return!!P(this,"string"==typeof e&&A.test(e)?x(e):e||[],!1).length}});var F,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(e,t,i){var n,r;if(!e)return this;if(i=i||F,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:O.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof x?t[0]:t,x.merge(this,x.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),D.test(n[1])&&x.isPlainObject(t))for(n in t)v(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return(r=b.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==i.ready?i.ready(e):e(x):x.makeArray(e,this)}).prototype=x.fn,F=x(b);var N=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function M(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}x.fn.extend({has:function(e){var t=x(e,this),i=t.length;return this.filter((function(){for(var e=0;e<i;e++)if(x.contains(this,t[e]))return!0}))},closest:function(e,t){var i,n=0,r=this.length,o=[],s="string"!=typeof e&&x(e);if(!A.test(e))for(;n<r;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&x.find.matchesSelector(i,e))){o.push(i);break}return this.pushStack(o.length>1?x.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(x(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,i){return k(e,"parentNode",i)},next:function(e){return M(e,"nextSibling")},prev:function(e){return M(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,i){return k(e,"nextSibling",i)},prevUntil:function(e,t,i){return k(e,"previousSibling",i)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(I(e,"template")&&(e=e.content||e),x.merge([],e.childNodes))}},(function(e,t){x.fn[e]=function(i,n){var r=x.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=x.filter(n,r)),this.length>1&&(L[e]||x.uniqueSort(r),N.test(e)&&r.reverse()),this.pushStack(r)}}));var j=/[^\x20\t\r\n\f]+/g;function R(e){return e}function z(e){throw e}function U(e,t,i,n){var r;try{e&&v(r=e.promise)?r.call(e).done(t).fail(i):e&&v(r=e.then)?r.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}x.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return x.each(e.match(j)||[],(function(e,i){t[i]=!0})),t}(e):x.extend({},e);var t,i,n,r,o=[],s=[],a=-1,l=function(){for(r=r||e.once,n=t=!0;s.length;a=-1)for(i=s.shift();++a<o.length;)!1===o[a].apply(i[0],i[1])&&e.stopOnFalse&&(a=o.length,i=!1);e.memory||(i=!1),t=!1,r&&(o=i?[]:"")},c={add:function(){return o&&(i&&!t&&(a=o.length-1,s.push(i)),function t(i){x.each(i,(function(i,n){v(n)?e.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==C(n)&&t(n)}))}(arguments),i&&!t&&l()),this},remove:function(){return x.each(arguments,(function(e,t){for(var i;(i=x.inArray(t,o,i))>-1;)o.splice(i,1),i<=a&&a--})),this},has:function(e){return e?x.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=i="",this},disabled:function(){return!o},lock:function(){return r=s=[],i||t||(o=i=""),this},locked:function(){return!!r},fireWith:function(e,i){return r||(i=[e,(i=i||[]).slice?i.slice():i],s.push(i),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},x.extend({Deferred:function(e){var t=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return x.Deferred((function(i){x.each(t,(function(t,n){var r=v(e[n[4]])&&e[n[4]];o[n[1]]((function(){var e=r&&r.apply(this,arguments);e&&v(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,r?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,r){var o=0;function s(e,t,n,r){return function(){var a=this,l=arguments,c=function(){var i,c;if(!(e<o)){if((i=n.apply(a,l))===t.promise())throw new TypeError("Thenable self-resolution");c=i&&("object"==typeof i||"function"==typeof i)&&i.then,v(c)?r?c.call(i,s(o,t,R,r),s(o,t,z,r)):(o++,c.call(i,s(o,t,R,r),s(o,t,z,r),s(o,t,R,t.notifyWith))):(n!==R&&(a=void 0,l=[i]),(r||t.resolveWith)(a,l))}},u=r?c:function(){try{c()}catch(i){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(i,u.stackTrace),e+1>=o&&(n!==z&&(a=void 0,l=[i]),t.rejectWith(a,l))}};e?u():(x.Deferred.getStackHook&&(u.stackTrace=x.Deferred.getStackHook()),i.setTimeout(u))}}return x.Deferred((function(i){t[0][3].add(s(0,i,v(r)?r:R,i.notifyWith)),t[1][3].add(s(0,i,v(e)?e:R)),t[2][3].add(s(0,i,v(n)?n:z))})).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},o={};return x.each(t,(function(e,i){var s=i[2],a=i[5];r[i[1]]=s.add,a&&s.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(i[3].fire),o[i[0]]=function(){return o[i[0]+"With"](this===o?void 0:this,arguments),this},o[i[0]+"With"]=s.fireWith})),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,i=t,n=Array(i),r=a.call(arguments),o=x.Deferred(),s=function(e){return function(i){n[e]=this,r[e]=arguments.length>1?a.call(arguments):i,--t||o.resolveWith(n,r)}};if(t<=1&&(U(e,o.done(s(i)).resolve,o.reject,!t),"pending"===o.state()||v(r[i]&&r[i].then)))return o.then();for(;i--;)U(r[i],s(i),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&$.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},x.readyException=function(e){i.setTimeout((function(){throw e}))};var H=x.Deferred();function B(){b.removeEventListener("DOMContentLoaded",B),i.removeEventListener("load",B),x.ready()}x.fn.ready=function(e){return H.then(e).catch((function(e){x.readyException(e)})),this},x.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==e&&--x.readyWait>0||H.resolveWith(b,[x]))}}),x.ready.then=H.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?i.setTimeout(x.ready):(b.addEventListener("DOMContentLoaded",B),i.addEventListener("load",B));var q=function(e,t,i,n,r,o,s){var a=0,l=e.length,c=null==i;if("object"===C(i))for(a in r=!0,i)q(e,t,a,i[a],!0,o,s);else if(void 0!==n&&(r=!0,v(n)||(s=!0),c&&(s?(t.call(e,n),t=null):(c=t,t=function(e,t,i){return c.call(x(e),i)})),t))for(;a<l;a++)t(e[a],i,s?n:n.call(e[a],a,t(e[a],i)));return r?e:c?t.call(e):l?t(e[0],i):o},W=/^-ms-/,V=/-([a-z])/g;function Z(e,t){return t.toUpperCase()}function K(e){return e.replace(W,"ms-").replace(V,Z)}var Q=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=x.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Q(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,r=this.cache(e);if("string"==typeof t)r[K(t)]=i;else for(n in t)r[K(n)]=t[n];return r},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][K(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){i=(t=Array.isArray(t)?t.map(K):(t=K(t))in n?[t]:t.match(j)||[]).length;for(;i--;)delete n[t[i]]}(void 0===t||x.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!x.isEmptyObject(t)}};var X=new Y,G=new Y,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:J.test(e)?JSON.parse(e):e)}(i)}catch(e){}G.set(e,t,i)}else i=void 0;return i}x.extend({hasData:function(e){return G.hasData(e)||X.hasData(e)},data:function(e,t,i){return G.access(e,t,i)},removeData:function(e,t){G.remove(e,t)},_data:function(e,t,i){return X.access(e,t,i)},_removeData:function(e,t){X.remove(e,t)}}),x.fn.extend({data:function(e,t){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(r=G.get(o),1===o.nodeType&&!X.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&0===(n=s[i].name).indexOf("data-")&&(n=K(n.slice(5)),te(o,n,r[n]));X.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof e?this.each((function(){G.set(this,e)})):q(this,(function(t){var i;if(o&&void 0===t)return void 0!==(i=G.get(o,e))||void 0!==(i=te(o,e))?i:void 0;this.each((function(){G.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){G.remove(this,e)}))}}),x.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=X.get(e,t),i&&(!n||Array.isArray(i)?n=X.access(e,t,x.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=x.queue(e,t),n=i.length,r=i.shift(),o=x._queueHooks(e,t);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===t&&i.unshift("inprogress"),delete o.stop,r.call(e,(function(){x.dequeue(e,t)}),o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return X.get(e,i)||X.access(e,i,{empty:x.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",i])}))})}}),x.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?x.queue(this[0],e):void 0===t?this:this.each((function(){var i=x.queue(this,e,t);x._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&x.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){x.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,r=x.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(i=X.get(o[s],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(t)}});var ie=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+ie+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],oe=b.documentElement,se=function(e){return x.contains(e.ownerDocument,e)},ae={composed:!0};oe.getRootNode&&(se=function(e){return x.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var le=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===x.css(e,"display")};function ce(e,t,i,n){var r,o,s=20,a=n?function(){return n.cur()}:function(){return x.css(e,t,"")},l=a(),c=i&&i[3]||(x.cssNumber[t]?"":"px"),u=e.nodeType&&(x.cssNumber[t]||"px"!==c&&+l)&&ne.exec(x.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)x.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u*=2,x.style(e,t,u+c),i=i||[]}return i&&(u=+u||+l||0,r=i[1]?u+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=u,n.end=r)),r}var ue={};function de(e){var t,i=e.ownerDocument,n=e.nodeName,r=ue[n];return r||(t=i.body.appendChild(i.createElement(n)),r=x.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),ue[n]=r,r)}function he(e,t){for(var i,n,r=[],o=0,s=e.length;o<s;o++)(n=e[o]).style&&(i=n.style.display,t?("none"===i&&(r[o]=X.get(n,"display")||null,r[o]||(n.style.display="")),""===n.style.display&&le(n)&&(r[o]=de(n))):"none"!==i&&(r[o]="none",X.set(n,"display",i)));for(o=0;o<s;o++)null!=r[o]&&(e[o].style.display=r[o]);return e}x.fn.extend({show:function(){return he(this,!0)},hide:function(){return he(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){le(this)?x(this).show():x(this).hide()}))}});var fe,pe,me=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ve=/^$|^module$|\/(?:java|ecma)script/i;fe=b.createDocumentFragment().appendChild(b.createElement("div")),(pe=b.createElement("input")).setAttribute("type","radio"),pe.setAttribute("checked","checked"),pe.setAttribute("name","t"),fe.appendChild(pe),g.checkClone=fe.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!fe.cloneNode(!0).lastChild.defaultValue,fe.innerHTML="<option></option>",g.option=!!fe.lastChild;var _e={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function be(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&I(e,t)?x.merge([e],i):i}function ye(e,t){for(var i=0,n=e.length;i<n;i++)X.set(e[i],"globalEval",!t||X.get(t[i],"globalEval"))}_e.tbody=_e.tfoot=_e.colgroup=_e.caption=_e.thead,_e.th=_e.td,g.option||(_e.optgroup=_e.option=[1,"<select multiple='multiple'>","</select>"]);var we=/<|&#?\w+;/;function Ce(e,t,i,n,r){for(var o,s,a,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((o=e[f])||0===o)if("object"===C(o))x.merge(h,o.nodeType?[o]:o);else if(we.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(ge.exec(o)||["",""])[1].toLowerCase(),l=_e[a]||_e._default,s.innerHTML=l[1]+x.htmlPrefilter(o)+l[2],u=l[0];u--;)s=s.lastChild;x.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(t.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(n&&x.inArray(o,n)>-1)r&&r.push(o);else if(c=se(o),s=be(d.appendChild(o),"script"),c&&ye(s),i)for(u=0;o=s[u++];)ve.test(o.type||"")&&i.push(o);return d}var xe=/^key/,Ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ae(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Ie(e,t,i,n,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof i&&(n=n||i,i=void 0),t)Ie(e,a,i,n,t[a],o);return e}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=Se;else if(!r)return e;return 1===o&&(s=r,(r=function(e){return x().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=x.guid++)),e.each((function(){x.event.add(this,t,r,n,i)}))}function De(e,t,i){i?(X.set(e,t,!1),x.event.add(e,t,{namespace:!1,handler:function(e){var n,r,o=X.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(x.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=a.call(arguments),X.set(this,t,o),n=i(this,t),this[t](),o!==(r=X.get(this,t))||n?X.set(this,t,!1):r={},o!==r)return e.stopImmediatePropagation(),e.preventDefault(),r.value}else o.length&&(X.set(this,t,{value:x.event.trigger(x.extend(o[0],x.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&x.event.add(e,t,ke)}x.event={global:{},add:function(e,t,i,n,r){var o,s,a,l,c,u,d,h,f,p,m,g=X.get(e);if(Q(e))for(i.handler&&(i=(o=i).handler,r=o.selector),r&&x.find.matchesSelector(oe,r),i.guid||(i.guid=x.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return void 0!==x&&x.event.triggered!==t.type?x.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(j)||[""]).length;c--;)f=m=(a=Te.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=x.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=x.event.special[f]||{},u=x.extend({type:f,origType:m,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&x.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,n,p,s)||e.addEventListener&&e.addEventListener(f,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=i.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),x.event.global[f]=!0)},remove:function(e,t,i,n,r){var o,s,a,l,c,u,d,h,f,p,m,g=X.hasData(e)&&X.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(j)||[""]).length;c--;)if(f=m=(a=Te.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=x.event.special[f]||{},h=l[f=(n?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&m!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,g.handle)||x.removeEvent(e,f,g.handle),delete l[f])}else for(f in l)x.event.remove(e,f+t[c],i,n,!0);x.isEmptyObject(l)&&X.remove(e,"handle events")}},dispatch:function(e){var t,i,n,r,o,s,a=new Array(arguments.length),l=x.event.fix(e),c=(X.get(this,"events")||Object.create(null))[l.type]||[],u=x.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(s=x.event.handlers.call(this,l,c),t=0;(r=s[t++])&&!l.isPropagationStopped();)for(l.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(n=((x.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a))&&!1===(l.result=n)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var i,n,r,o,s,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},i=0;i<l;i++)void 0===s[r=(n=t[i]).selector+" "]&&(s[r]=n.needsContext?x(r,this).index(c)>-1:x.find(r,this,null,[c]).length),s[r]&&o.push(n);o.length&&a.push({elem:c,handlers:o})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(x.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[x.expando]?e:new x.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return me.test(t.type)&&t.click&&I(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return me.test(t.type)&&t.click&&I(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return me.test(t.type)&&t.click&&I(t,"input")&&X.get(t,"click")||I(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},x.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},x.Event=function(e,t){if(!(this instanceof x.Event))return new x.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&x.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},x.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&xe.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ee.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},(function(e,t){x.event.special[e]={setup:function(){return De(this,e,Ae),!1},trigger:function(){return De(this,e),!0},delegateType:t}})),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===n||x.contains(n,r))||(e.type=o.origType,i=o.handler.apply(this,arguments),e.type=t),i}}})),x.fn.extend({on:function(e,t,i,n){return Ie(this,e,t,i,n)},one:function(e,t,i,n){return Ie(this,e,t,i,n,1)},off:function(e,t,i){var n,r;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,x(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=Se),this.each((function(){x.event.remove(this,e,i,t)}))}});var Pe=/<script|<style|<link/i,Fe=/checked\s*(?:[^=]|=\s*.checked.)/i,Oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ne(e,t){return I(e,"table")&&I(11!==t.nodeType?t:t.firstChild,"tr")&&x(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Me(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var i,n,r,o,s,a;if(1===t.nodeType){if(X.hasData(e)&&(a=X.get(e).events))for(r in X.remove(t,"handle events"),a)for(i=0,n=a[r].length;i<n;i++)x.event.add(t,r,a[r][i]);G.hasData(e)&&(o=G.access(e),s=x.extend({},o),G.set(t,s))}}function Re(e,t){var i=t.nodeName.toLowerCase();"input"===i&&me.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function ze(e,t,i,n){t=l(t);var r,o,s,a,c,u,d=0,h=e.length,f=h-1,p=t[0],m=v(p);if(m||h>1&&"string"==typeof p&&!g.checkClone&&Fe.test(p))return e.each((function(r){var o=e.eq(r);m&&(t[0]=p.call(this,r,o.html())),ze(o,t,i,n)}));if(h&&(o=(r=Ce(t,e[0].ownerDocument,!1,e,n)).firstChild,1===r.childNodes.length&&(r=o),o||n)){for(a=(s=x.map(be(r,"script"),Le)).length;d<h;d++)c=r,d!==f&&(c=x.clone(c,!0,!0),a&&x.merge(s,be(c,"script"))),i.call(e[d],c,d);if(a)for(u=s[s.length-1].ownerDocument,x.map(s,Me),d=0;d<a;d++)c=s[d],ve.test(c.type||"")&&!X.access(c,"globalEval")&&x.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?x._evalUrl&&!c.noModule&&x._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):w(c.textContent.replace(Oe,""),c,u))}return e}function Ue(e,t,i){for(var n,r=t?x.filter(t,e):e,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||x.cleanData(be(n)),n.parentNode&&(i&&se(n)&&ye(be(n,"script")),n.parentNode.removeChild(n));return e}x.extend({htmlPrefilter:function(e){return e},clone:function(e,t,i){var n,r,o,s,a=e.cloneNode(!0),l=se(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(s=be(a),n=0,r=(o=be(e)).length;n<r;n++)Re(o[n],s[n]);if(t)if(i)for(o=o||be(e),s=s||be(a),n=0,r=o.length;n<r;n++)je(o[n],s[n]);else je(e,a);return(s=be(a,"script")).length>0&&ye(s,!l&&be(e,"script")),a},cleanData:function(e){for(var t,i,n,r=x.event.special,o=0;void 0!==(i=e[o]);o++)if(Q(i)){if(t=i[X.expando]){if(t.events)for(n in t.events)r[n]?x.event.remove(i,n):x.removeEvent(i,n,t.handle);i[X.expando]=void 0}i[G.expando]&&(i[G.expando]=void 0)}}}),x.fn.extend({detach:function(e){return Ue(this,e,!0)},remove:function(e){return Ue(this,e)},text:function(e){return q(this,(function(e){return void 0===e?x.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return ze(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ne(this,e).appendChild(e)}))},prepend:function(){return ze(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ne(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(x.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return x.clone(this,e,t)}))},html:function(e){return q(this,(function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Pe.test(e)&&!_e[(ge.exec(e)||["",""])[1].toLowerCase()]){e=x.htmlPrefilter(e);try{for(;i<n;i++)1===(t=this[i]||{}).nodeType&&(x.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return ze(this,arguments,(function(t){var i=this.parentNode;x.inArray(this,e)<0&&(x.cleanData(be(this)),i&&i.replaceChild(t,this))}),e)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){x.fn[e]=function(e){for(var i,n=[],r=x(e),o=r.length-1,s=0;s<=o;s++)i=s===o?this:this.clone(!0),x(r[s])[t](i),c.apply(n,i.get());return this.pushStack(n)}}));var $e=new RegExp("^("+ie+")(?!px)[a-z%]+$","i"),He=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=i),t.getComputedStyle(e)},Be=function(e,t,i){var n,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in n=i.call(e),t)e.style[r]=o[r];return n},qe=new RegExp(re.join("|"),"i");function We(e,t,i){var n,r,o,s,a=e.style;return(i=i||He(e))&&(""!==(s=i.getPropertyValue(t)||i[t])||se(e)||(s=x.style(e,t)),!g.pixelBoxStyles()&&$e.test(s)&&qe.test(t)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function Ve(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",oe.appendChild(c).appendChild(u);var e=i.getComputedStyle(u);n="1%"!==e.top,l=12===t(e.marginLeft),u.style.right="60%",s=36===t(e.right),r=36===t(e.width),u.style.position="absolute",o=12===t(u.offsetWidth/3),oe.removeChild(c),u=null}}function t(e){return Math.round(parseFloat(e))}var n,r,o,s,a,l,c=b.createElement("div"),u=b.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===u.style.backgroundClip,x.extend(g,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",oe.appendChild(e).appendChild(t).appendChild(n),r=i.getComputedStyle(t),a=parseInt(r.height)>3,oe.removeChild(e)),a}}))}();var Ze=["Webkit","Moz","ms"],Ke=b.createElement("div").style,Qe={};function Ye(e){var t=x.cssProps[e]||Qe[e];return t||(e in Ke?e:Qe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),i=Ze.length;i--;)if((e=Ze[i]+t)in Ke)return e}(e)||e)}var Xe=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,i){var n=ne.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function it(e,t,i,n,r,o){var s="width"===t?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(l+=x.css(e,i+re[s],!0,r)),n?("content"===i&&(l-=x.css(e,"padding"+re[s],!0,r)),"margin"!==i&&(l-=x.css(e,"border"+re[s]+"Width",!0,r))):(l+=x.css(e,"padding"+re[s],!0,r),"padding"!==i?l+=x.css(e,"border"+re[s]+"Width",!0,r):a+=x.css(e,"border"+re[s]+"Width",!0,r));return!n&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l}function nt(e,t,i){var n=He(e),r=(!g.boxSizingReliable()||i)&&"border-box"===x.css(e,"boxSizing",!1,n),o=r,s=We(e,t,n),a="offset"+t[0].toUpperCase()+t.slice(1);if($e.test(s)){if(!i)return s;s="auto"}return(!g.boxSizingReliable()&&r||!g.reliableTrDimensions()&&I(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===x.css(e,"display",!1,n))&&e.getClientRects().length&&(r="border-box"===x.css(e,"boxSizing",!1,n),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+it(e,t,i||(r?"border":"content"),o,n,s)+"px"}function rt(e,t,i,n,r){return new rt.prototype.init(e,t,i,n,r)}x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=We(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=K(t),l=Ge.test(t),c=e.style;if(l||(t=Ye(a)),s=x.cssHooks[t]||x.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(e,!1,n))?r:c[t];"string"===(o=typeof i)&&(r=ne.exec(i))&&r[1]&&(i=ce(e,t,r),o="number"),null!=i&&i==i&&("number"!==o||l||(i+=r&&r[3]||(x.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==i||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(i=s.set(e,i,n))||(l?c.setProperty(t,i):c[t]=i))}},css:function(e,t,i,n){var r,o,s,a=K(t);return Ge.test(t)||(t=Ye(a)),(s=x.cssHooks[t]||x.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,i)),void 0===r&&(r=We(e,t,n)),"normal"===r&&t in et&&(r=et[t]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),x.each(["height","width"],(function(e,t){x.cssHooks[t]={get:function(e,i,n){if(i)return!Xe.test(x.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,n):Be(e,Je,(function(){return nt(e,t,n)}))},set:function(e,i,n){var r,o=He(e),s=!g.scrollboxSize()&&"absolute"===o.position,a=(s||n)&&"border-box"===x.css(e,"boxSizing",!1,o),l=n?it(e,t,n,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-it(e,t,"border",!1,o)-.5)),l&&(r=ne.exec(i))&&"px"!==(r[3]||"px")&&(e.style[t]=i,i=x.css(e,t)),tt(0,i,l)}}})),x.cssHooks.marginLeft=Ve(g.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),x.each({margin:"",padding:"",border:"Width"},(function(e,t){x.cssHooks[e+t]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[e+re[n]+t]=o[n]||o[n-2]||o[0];return r}},"margin"!==e&&(x.cssHooks[e+t].set=tt)})),x.fn.extend({css:function(e,t){return q(this,(function(e,t,i){var n,r,o={},s=0;if(Array.isArray(t)){for(n=He(e),r=t.length;s<r;s++)o[t[s]]=x.css(e,t[s],!1,n);return o}return void 0!==i?x.style(e,t,i):x.css(e,t)}),e,t,arguments.length>1)}}),x.Tween=rt,rt.prototype={constructor:rt,init:function(e,t,i,n,r,o){this.elem=e,this.prop=i,this.easing=r||x.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(x.cssNumber[i]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,i=rt.propHooks[this.prop];return this.options.duration?this.pos=t=x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):rt.propHooks._default.set(this),this}},rt.prototype.init.prototype=rt.prototype,rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=x.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):1!==e.elem.nodeType||!x.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:x.style(e.elem,e.prop,e.now+e.unit)}}},rt.propHooks.scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},x.fx=rt.prototype.init,x.fx.step={};var ot,st,at=/^(?:toggle|show|hide)$/,lt=/queueHooks$/;function ct(){st&&(!1===b.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(ct):i.setTimeout(ct,x.fx.interval),x.fx.tick())}function ut(){return i.setTimeout((function(){ot=void 0})),ot=Date.now()}function dt(e,t){var i,n=0,r={height:e};for(t=t?1:0;n<4;n+=2-t)r["margin"+(i=re[n])]=r["padding"+i]=e;return t&&(r.opacity=r.width=e),r}function ht(e,t,i){for(var n,r=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,s=r.length;o<s;o++)if(n=r[o].call(i,t,e))return n}function ft(e,t,i){var n,r,o=0,s=ft.prefilters.length,a=x.Deferred().always((function(){delete l.elem})),l=function(){if(r)return!1;for(var t=ot||ut(),i=Math.max(0,c.startTime+c.duration-t),n=1-(i/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(n);return a.notifyWith(e,[c,n,i]),n<1&&s?i:(s||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},i),originalProperties:t,originalOptions:i,startTime:ot||ut(),duration:i.duration,tweens:[],createTween:function(t,i){var n=x.Tween(e,c.opts,t,i,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(n),n},stop:function(t){var i=0,n=t?c.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)c.tweens[i].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(!function(e,t){var i,n,r,o,s;for(i in e)if(r=t[n=K(i)],o=e[i],Array.isArray(o)&&(r=o[1],o=e[i]=o[0]),i!==n&&(e[n]=o,delete e[i]),(s=x.cssHooks[n])&&"expand"in s)for(i in o=s.expand(o),delete e[n],o)i in e||(e[i]=o[i],t[i]=r);else t[n]=r}(u,c.opts.specialEasing);o<s;o++)if(n=ft.prefilters[o].call(c,e,u,c.opts))return v(n.stop)&&(x._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n;return x.map(u,ht,c),v(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),x.fx.timer(x.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}x.Animation=x.extend(ft,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return ce(i.elem,e,ne.exec(t),i),i}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(j);for(var i,n=0,r=e.length;n<r;n++)i=e[n],ft.tweeners[i]=ft.tweeners[i]||[],ft.tweeners[i].unshift(t)},prefilters:[function(e,t,i){var n,r,o,s,a,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,m=e.nodeType&&le(e),g=X.get(e,"fxshow");for(n in i.queue||(null==(s=x._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,h.always((function(){h.always((function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()}))}))),t)if(r=t[n],at.test(r)){if(delete t[n],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[n])continue;m=!0}f[n]=g&&g[n]||x.style(e,n)}if((l=!x.isEmptyObject(t))||!x.isEmptyObject(f))for(n in d&&1===e.nodeType&&(i.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=X.get(e,"display")),"none"===(u=x.css(e,"display"))&&(c?u=c:(he([e],!0),c=e.style.display||c,u=x.css(e,"display"),he([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===x.css(e,"float")&&(l||(h.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),i.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=i.overflow[0],p.overflowX=i.overflow[1],p.overflowY=i.overflow[2]}))),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=X.access(e,"fxshow",{display:c}),o&&(g.hidden=!m),m&&he([e],!0),h.done((function(){for(n in m||he([e]),X.remove(e,"fxshow"),f)x.style(e,n,f[n])}))),l=ht(m?g[n]:0,n,h),n in g||(g[n]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),x.speed=function(e,t,i){var n=e&&"object"==typeof e?x.extend({},e):{complete:i||!i&&t||v(e)&&e,duration:e,easing:i&&t||t&&!v(t)&&t};return x.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in x.fx.speeds?n.duration=x.fx.speeds[n.duration]:n.duration=x.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){v(n.old)&&n.old.call(this),n.queue&&x.dequeue(this,n.queue)},n},x.fn.extend({fadeTo:function(e,t,i,n){return this.filter(le).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var r=x.isEmptyObject(e),o=x.speed(t,i,n),s=function(){var t=ft(this,x.extend({},e),o);(r||X.get(this,"finish"))&&t.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,r=null!=e&&e+"queueHooks",o=x.timers,s=X.get(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&lt.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(i),t=!1,o.splice(r,1));!t&&i||x.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,i=X.get(this),n=i[e+"queue"],r=i[e+"queueHooks"],o=x.timers,s=n?n.length:0;for(i.finish=!0,x.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish}))}}),x.each(["toggle","show","hide"],(function(e,t){var i=x.fn[t];x.fn[t]=function(e,n,r){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(dt(t,!0),e,n,r)}})),x.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){x.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}})),x.timers=[],x.fx.tick=function(){var e,t=0,i=x.timers;for(ot=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||x.fx.stop(),ot=void 0},x.fx.timer=function(e){x.timers.push(e),x.fx.start()},x.fx.interval=13,x.fx.start=function(){st||(st=!0,ct())},x.fx.stop=function(){st=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(e,t){return e=x.fx&&x.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var r=i.setTimeout(t,e);n.stop=function(){i.clearTimeout(r)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",g.checkOn=""!==e.value,g.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",g.radioValue="t"===e.value}();var pt,mt=x.expr.attrHandle;x.fn.extend({attr:function(e,t){return q(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){x.removeAttr(this,e)}))}}),x.extend({attr:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?x.prop(e,t,i):(1===o&&x.isXMLDoc(e)||(r=x.attrHooks[t.toLowerCase()]||(x.expr.match.bool.test(t)?pt:void 0)),void 0!==i?null===i?void x.removeAttr(e,t):r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:(e.setAttribute(t,i+""),i):r&&"get"in r&&null!==(n=r.get(e,t))?n:null==(n=x.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&I(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,r=t&&t.match(j);if(r&&1===e.nodeType)for(;i=r[n++];)e.removeAttribute(i)}}),pt={set:function(e,t,i){return!1===t?x.removeAttr(e,i):e.setAttribute(i,i),i}},x.each(x.expr.match.bool.source.match(/\w+/g),(function(e,t){var i=mt[t]||x.find.attr;mt[t]=function(e,t,n){var r,o,s=t.toLowerCase();return n||(o=mt[s],mt[s]=r,r=null!=i(e,t,n)?s:null,mt[s]=o),r}}));var gt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function _t(e){return(e.match(j)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(j)||[]}x.fn.extend({prop:function(e,t){return q(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[x.propFix[e]||e]}))}}),x.extend({prop:function(e,t,i){var n,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&x.isXMLDoc(e)||(t=x.propFix[t]||t,r=x.propHooks[t]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(e,i,t))?n:e[t]=i:r&&"get"in r&&null!==(n=r.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){x.propFix[this.toLowerCase()]=this})),x.fn.extend({addClass:function(e){var t,i,n,r,o,s,a,l=0;if(v(e))return this.each((function(t){x(this).addClass(e.call(this,t,bt(this)))}));if((t=yt(e)).length)for(;i=this[l++];)if(r=bt(i),n=1===i.nodeType&&" "+_t(r)+" "){for(s=0;o=t[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r!==(a=_t(n))&&i.setAttribute("class",a)}return this},removeClass:function(e){var t,i,n,r,o,s,a,l=0;if(v(e))return this.each((function(t){x(this).removeClass(e.call(this,t,bt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;i=this[l++];)if(r=bt(i),n=1===i.nodeType&&" "+_t(r)+" "){for(s=0;o=t[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r!==(a=_t(n))&&i.setAttribute("class",a)}return this},toggleClass:function(e,t){var i=typeof e,n="string"===i||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):v(e)?this.each((function(i){x(this).toggleClass(e.call(this,i,bt(this),t),t)})):this.each((function(){var t,r,o,s;if(n)for(r=0,o=x(this),s=yt(e);t=s[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==i||((t=bt(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))}))},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+_t(bt(i))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;x.fn.extend({val:function(e){var t,i,n,r=this[0];return arguments.length?(n=v(e),this.each((function(i){var r;1===this.nodeType&&(null==(r=n?e.call(this,i,x(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=x.map(r,(function(e){return null==e?"":e+""}))),(t=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))}))):r?(t=x.valHooks[r.type]||x.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(wt,""):null==i?"":i:void 0}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:_t(x.text(e))}},select:{get:function(e){var t,i,n,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(n=o<0?l:s?o:0;n<l;n++)if(((i=r[n]).selected||n===o)&&!i.disabled&&(!i.parentNode.disabled||!I(i.parentNode,"optgroup"))){if(t=x(i).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var i,n,r=e.options,o=x.makeArray(t),s=r.length;s--;)((n=r[s]).selected=x.inArray(x.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(e.selectedIndex=-1),o}}}}),x.each(["radio","checkbox"],(function(){x.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=x.inArray(x(e).val(),t)>-1}},g.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),g.focusin="onfocusin"in i;var Ct=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};x.extend(x.event,{trigger:function(e,t,n,r){var o,s,a,l,c,u,d,h,p=[n||b],m=f.call(e,"type")?e.type:e,g=f.call(e,"namespace")?e.namespace.split("."):[];if(s=h=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Ct.test(m+x.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[x.expando]?e:new x.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:x.makeArray(t,[e]),d=x.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(n,t))){if(!r&&!d.noBubble&&!_(n)){for(l=d.delegateType||m,Ct.test(l+m)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(n.ownerDocument||b)&&p.push(a.defaultView||a.parentWindow||i)}for(o=0;(s=p[o++])&&!e.isPropagationStopped();)h=s,e.type=o>1?l:d.bindType||m,(u=(X.get(s,"events")||Object.create(null))[e.type]&&X.get(s,"handle"))&&u.apply(s,t),(u=c&&s[c])&&u.apply&&Q(s)&&(e.result=u.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!Q(n)||c&&v(n[m])&&!_(n)&&((a=n[c])&&(n[c]=null),x.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,xt),n[m](),e.isPropagationStopped()&&h.removeEventListener(m,xt),x.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(e,t,i){var n=x.extend(new x.Event,i,{type:e,isSimulated:!0});x.event.trigger(n,null,t)}}),x.fn.extend({trigger:function(e,t){return this.each((function(){x.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var i=this[0];if(i)return x.event.trigger(e,t,i,!0)}}),g.focusin||x.each({focus:"focusin",blur:"focusout"},(function(e,t){var i=function(e){x.event.simulate(t,e.target,x.event.fix(e))};x.event.special[t]={setup:function(){var n=this.ownerDocument||this.document||this,r=X.access(n,t);r||n.addEventListener(e,i,!0),X.access(n,t,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,r=X.access(n,t)-1;r?X.access(n,t,r):(n.removeEventListener(e,i,!0),X.remove(n,t))}}}));var Et=i.location,Tt={guid:Date.now()},kt=/\?/;x.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+e),t};var St=/\[\]$/,At=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function Pt(e,t,i,n){var r;if(Array.isArray(t))x.each(t,(function(t,r){i||St.test(e)?n(e,r):Pt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,i,n)}));else if(i||"object"!==C(t))n(e,t);else for(r in t)Pt(e+"["+r+"]",t[r],i,n)}x.param=function(e,t){var i,n=[],r=function(e,t){var i=v(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,(function(){r(this.name,this.value)}));else for(i in e)Pt(i,e[i],t,r);return n.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&Dt.test(this.nodeName)&&!It.test(e)&&(this.checked||!me.test(e))})).map((function(e,t){var i=x(this).val();return null==i?null:Array.isArray(i)?x.map(i,(function(e){return{name:t.name,value:e.replace(At,"\r\n")}})):{name:t.name,value:i.replace(At,"\r\n")}})).get()}});var Ft=/%20/g,Ot=/#.*$/,Nt=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,jt=/^\/\//,Rt={},zt={},Ut="*/".concat("*"),$t=b.createElement("a");function Ht(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,r=0,o=t.toLowerCase().match(j)||[];if(v(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function Bt(e,t,i,n){var r={},o=e===zt;function s(a){var l;return r[a]=!0,x.each(e[a]||[],(function(e,a){var c=a(t,i,n);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function qt(e,t){var i,n,r=x.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&x.extend(!0,e,n),e}$t.href=Et.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ut,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?qt(qt(e,x.ajaxSettings),t):qt(x.ajaxSettings,e)},ajaxPrefilter:Ht(Rt),ajaxTransport:Ht(zt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,o,s,a,l,c,u,d,h,f=x.ajaxSetup({},t),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?x(p):x.event,g=x.Deferred(),v=x.Callbacks("once memory"),_=f.statusCode||{},y={},w={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Lt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,y[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||C;return n&&n.abort(t),T(0,t),this}};if(g.promise(E),f.url=((e||f.url||Et.href)+"").replace(jt,Et.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(j)||[""],null==f.crossDomain){l=b.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=$t.protocol+"//"+$t.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Bt(Rt,f,t,E),c)return E;for(d in(u=x.event&&f.global)&&0==x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Mt.test(f.type),r=f.url.replace(Ot,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ft,"+")):(h=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(kt.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Nt,"$1"),h=(kt.test(r)?"&":"?")+"_="+Tt.guid+++h),f.url=r+h),f.ifModified&&(x.lastModified[r]&&E.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&E.setRequestHeader("If-None-Match",x.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&E.setRequestHeader("Content-Type",f.contentType),E.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ut+"; q=0.01":""):f.accepts["*"]),f.headers)E.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,E,f)||c))return E.abort();if(C="abort",v.add(f.complete),E.done(f.success),E.fail(f.error),n=Bt(zt,f,t,E)){if(E.readyState=1,u&&m.trigger("ajaxSend",[E,f]),c)return E;f.async&&f.timeout>0&&(a=i.setTimeout((function(){E.abort("timeout")}),f.timeout));try{c=!1,n.send(y,T)}catch(e){if(c)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,s,l){var d,h,b,y,w,C=t;c||(c=!0,a&&i.clearTimeout(a),n=void 0,o=l||"",E.readyState=e>0?4:0,d=e>=200&&e<300||304===e,s&&(y=function(e,t,i){for(var n,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),i[o]}(f,E,s)),!d&&x.inArray("script",f.dataTypes)>-1&&(f.converters["text script"]=function(){}),y=function(e,t,i,n){var r,o,s,a,l,c={},u=e.dataTypes.slice();if(u[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=u.shift();o;)if(e.responseFields[o]&&(i[e.responseFields[o]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=u.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,y,E,d),d?(f.ifModified&&((w=E.getResponseHeader("Last-Modified"))&&(x.lastModified[r]=w),(w=E.getResponseHeader("etag"))&&(x.etag[r]=w)),204===e||"HEAD"===f.type?C="nocontent":304===e?C="notmodified":(C=y.state,h=y.data,d=!(b=y.error))):(b=C,!e&&C||(C="error",e<0&&(e=0))),E.status=e,E.statusText=(t||C)+"",d?g.resolveWith(p,[h,C,E]):g.rejectWith(p,[E,C,b]),E.statusCode(_),_=void 0,u&&m.trigger(d?"ajaxSuccess":"ajaxError",[E,f,d?h:b]),v.fireWith(p,[E,C]),u&&(m.trigger("ajaxComplete",[E,f]),--x.active||x.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,i){return x.get(e,t,i,"json")},getScript:function(e,t){return x.get(e,void 0,t,"script")}}),x.each(["get","post"],(function(e,t){x[t]=function(e,i,n,r){return v(i)&&(r=r||n,n=i,i=void 0),x.ajax(x.extend({url:e,type:t,dataType:r,data:i,success:n},x.isPlainObject(e)&&e))}})),x.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),x._evalUrl=function(e,t,i){return x.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){x.globalEval(e,t,i)}})},x.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=x(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return v(e)?this.each((function(t){x(this).wrapInner(e.call(this,t))})):this.each((function(){var t=x(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)}))},wrap:function(e){var t=v(e);return this.each((function(i){x(this).wrapAll(t?e.call(this,i):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){x(this).replaceWith(this.childNodes)})),this}}),x.expr.pseudos.hidden=function(e){return!x.expr.pseudos.visible(e)},x.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Wt={0:200,1223:204},Vt=x.ajaxSettings.xhr();g.cors=!!Vt&&"withCredentials"in Vt,g.ajax=Vt=!!Vt,x.ajaxTransport((function(e){var t,n;if(g.cors||Vt&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Wt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),x.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),x.ajaxTransport("script",(function(e){var t,i;if(e.crossDomain||e.scriptAttrs)return{send:function(n,r){t=x("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&r("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){i&&i()}}}));var Zt,Kt=[],Qt=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||x.expando+"_"+Tt.guid++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",(function(e,t,n){var r,o,s,a=!1!==e.jsonp&&(Qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Qt,"$1"+r):!1!==e.jsonp&&(e.url+=(kt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||x.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=i[r],i[r]=function(){s=arguments},n.always((function(){void 0===o?x(i).removeProp(r):i[r]=o,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),s&&v(o)&&o(s[0]),s=o=void 0})),"script"})),g.createHTMLDocument=((Zt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Zt.childNodes.length),x.parseHTML=function(e,t,i){return"string"!=typeof e?[]:("boolean"==typeof t&&(i=t,t=!1),t||(g.createHTMLDocument?((n=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(n)):t=b),o=!i&&[],(r=D.exec(e))?[t.createElement(r[1])]:(r=Ce([e],t,o),o&&o.length&&x(o).remove(),x.merge([],r.childNodes)));var n,r,o},x.fn.load=function(e,t,i){var n,r,o,s=this,a=e.indexOf(" ");return a>-1&&(n=_t(e.slice(a)),e=e.slice(0,a)),v(t)?(i=t,t=void 0):t&&"object"==typeof t&&(r="POST"),s.length>0&&x.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(n?x("<div>").append(x.parseHTML(e)).find(n):e)})).always(i&&function(e,t){s.each((function(){i.apply(this,o||[e.responseText,t,e])}))}),this},x.expr.pseudos.animated=function(e){return x.grep(x.timers,(function(t){return e===t.elem})).length},x.offset={setOffset:function(e,t,i){var n,r,o,s,a,l,c=x.css(e,"position"),u=x(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=x.css(e,"top"),l=x.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(s=(n=u.position()).top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),v(t)&&(t=t.call(e,i,x.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+r),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),u.css(d))}},x.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){x.offset.setOffset(this,e,t)}));var t,i,n=this[0];return n?n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,i,n=this[0],r={top:0,left:0};if("fixed"===x.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===x.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&((r=x(e).offset()).top+=x.css(e,"borderTopWidth",!0),r.left+=x.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-x.css(n,"marginTop",!0),left:t.left-r.left-x.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===x.css(e,"position");)e=e.offsetParent;return e||oe}))}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var i="pageYOffset"===t;x.fn[e]=function(n){return q(this,(function(e,n,r){var o;if(_(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[n];o?o.scrollTo(i?o.pageXOffset:r,i?r:o.pageYOffset):e[n]=r}),e,n,arguments.length)}})),x.each(["top","left"],(function(e,t){x.cssHooks[t]=Ve(g.pixelPosition,(function(e,i){if(i)return i=We(e,t),$e.test(i)?x(e).position()[t]+"px":i}))})),x.each({Height:"height",Width:"width"},(function(e,t){x.each({padding:"inner"+e,content:t,"":"outer"+e},(function(i,n){x.fn[n]=function(r,o){var s=arguments.length&&(i||"boolean"!=typeof r),a=i||(!0===r||!0===o?"margin":"border");return q(this,(function(t,i,r){var o;return _(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?x.css(t,i,a):x.style(t,i,r,a)}),t,s?r:void 0,s)}}))})),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){x.fn[t]=function(e){return this.on(t,e)}})),x.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),x.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){x.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}));var Yt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;x.proxy=function(e,t){var i,n,r;if("string"==typeof t&&(i=e[t],t=e,e=i),v(e))return n=a.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(a.call(arguments)))}).guid=e.guid=e.guid||x.guid++,r},x.holdReady=function(e){e?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=I,x.isFunction=v,x.isWindow=_,x.camelCase=K,x.type=C,x.now=Date.now,x.isNumeric=function(e){var t=x.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},x.trim=function(e){return null==e?"":(e+"").replace(Yt,"")},void 0===(n=function(){return x}.apply(t,[]))||(e.exports=n);var Xt=i.jQuery,Gt=i.$;return x.noConflict=function(e){return i.$===x&&(i.$=Gt),e&&i.jQuery===x&&(i.jQuery=Xt),x},void 0===r&&(i.jQuery=i.$=x),x}))},function(e,t,i){"use strict";try{window.$=window.jQuery=i(0),i(2),i(5),i(6),i(7),window.toastr=i(8),window.translateText=function(e){var t=void 0;return $.ajax({type:"post",url:"/language/translate-text",data:{text:e},async:!1}).done((function(e){t=e.translation})).fail((function(t){return e})),t}}catch(e){}i(10),i(11),i(12),i(13)},function(e,t,i){
+/*!
+  * Bootstrap v4.4.1 (https://getbootstrap.com/)
+  * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+  */
+!function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){o(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function l(e){var i=this,n=!1;return t(this).one(c.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||c.triggerTransitionEnd(i)}),e),this}t=t&&t.hasOwnProperty("default")?t.default:t,i=i&&i.hasOwnProperty("default")?i.default:i;var c={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var i=e.getAttribute("href");t=i&&"#"!==i?i.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var i=t(e).css("transition-duration"),n=t(e).css("transition-delay"),r=parseFloat(i),o=parseFloat(n);return r||o?(i=i.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(i)+parseFloat(n))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var r=i[n],o=t[n],s=o&&c.isElement(o)?"element":(a=o,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(r).test(s))throw new Error(e.toUpperCase()+': Option "'+n+'" provided type "'+s+'" but expected type "'+r+'".')}var a},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?c.findShadowRoot(e.parentNode):null},jQueryDetection:function(){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};c.jQueryDetection(),t.fn.emulateTransitionEnd=l,t.event.special[c.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}};var u="alert",d=t.fn[u],h={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},f="alert",p="fade",m="show",g=function(){function e(e){this._element=e}var i=e.prototype;return i.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},i.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},i._getRootElement=function(e){var i=c.getSelectorFromElement(e),n=!1;return i&&(n=document.querySelector(i)),n||(n=t(e).closest("."+f)[0]),n},i._triggerCloseEvent=function(e){var i=t.Event(h.CLOSE);return t(e).trigger(i),i},i._removeElement=function(e){var i=this;if(t(e).removeClass(m),t(e).hasClass(p)){var n=c.getTransitionDurationFromElement(e);t(e).one(c.TRANSITION_END,(function(t){return i._destroyElement(e,t)})).emulateTransitionEnd(n)}else this._destroyElement(e)},i._destroyElement=function(e){t(e).detach().trigger(h.CLOSED).remove()},e._jQueryInterface=function(i){return this.each((function(){var n=t(this),r=n.data("bs.alert");r||(r=new e(this),n.data("bs.alert",r)),"close"===i&&r[i](this)}))},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),e}();t(document).on(h.CLICK_DATA_API,'[data-dismiss="alert"]',g._handleDismiss(new g)),t.fn[u]=g._jQueryInterface,t.fn[u].Constructor=g,t.fn[u].noConflict=function(){return t.fn[u]=d,g._jQueryInterface};var v=t.fn.button,_="active",b="btn",y="focus",w='[data-toggle^="button"]',C='[data-toggle="buttons"]',x='[data-toggle="button"]',E='[data-toggle="buttons"] .btn',T='input:not([type="hidden"])',k=".active",S=".btn",A={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api",LOAD_DATA_API:"load.bs.button.data-api"},I=function(){function e(e){this._element=e}var i=e.prototype;return i.toggle=function(){var e=!0,i=!0,n=t(this._element).closest(C)[0];if(n){var r=this._element.querySelector(T);if(r){if("radio"===r.type)if(r.checked&&this._element.classList.contains(_))e=!1;else{var o=n.querySelector(k);o&&t(o).removeClass(_)}else"checkbox"===r.type?"LABEL"===this._element.tagName&&r.checked===this._element.classList.contains(_)&&(e=!1):e=!1;e&&(r.checked=!this._element.classList.contains(_),t(r).trigger("change")),r.focus(),i=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(i&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(_)),e&&t(this._element).toggleClass(_))},i.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(i){return this.each((function(){var n=t(this).data("bs.button");n||(n=new e(this),t(this).data("bs.button",n)),"toggle"===i&&n[i]()}))},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),e}();t(document).on(A.CLICK_DATA_API,w,(function(e){var i=e.target;if(t(i).hasClass(b)||(i=t(i).closest(S)[0]),!i||i.hasAttribute("disabled")||i.classList.contains("disabled"))e.preventDefault();else{var n=i.querySelector(T);if(n&&(n.hasAttribute("disabled")||n.classList.contains("disabled")))return void e.preventDefault();I._jQueryInterface.call(t(i),"toggle")}})).on(A.FOCUS_BLUR_DATA_API,w,(function(e){var i=t(e.target).closest(S)[0];t(i).toggleClass(y,/^focus(in)?$/.test(e.type))})),t(window).on(A.LOAD_DATA_API,(function(){for(var e=[].slice.call(document.querySelectorAll(E)),t=0,i=e.length;t<i;t++){var n=e[t],r=n.querySelector(T);r.checked||r.hasAttribute("checked")?n.classList.add(_):n.classList.remove(_)}for(var o=0,s=(e=[].slice.call(document.querySelectorAll(x))).length;o<s;o++){var a=e[o];"true"===a.getAttribute("aria-pressed")?a.classList.add(_):a.classList.remove(_)}})),t.fn.button=I._jQueryInterface,t.fn.button.Constructor=I,t.fn.button.noConflict=function(){return t.fn.button=v,I._jQueryInterface};var D="carousel",P=".bs.carousel",F=t.fn[D],O={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},N={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},L="next",M="prev",j="left",R="right",z={SLIDE:"slide"+P,SLID:"slid"+P,KEYDOWN:"keydown"+P,MOUSEENTER:"mouseenter"+P,MOUSELEAVE:"mouseleave"+P,TOUCHSTART:"touchstart"+P,TOUCHMOVE:"touchmove"+P,TOUCHEND:"touchend"+P,POINTERDOWN:"pointerdown"+P,POINTERUP:"pointerup"+P,DRAG_START:"dragstart"+P,LOAD_DATA_API:"load"+P+".data-api",CLICK_DATA_API:"click"+P+".data-api"},U="carousel",$="active",H="slide",B="carousel-item-right",q="carousel-item-left",W="carousel-item-next",V="carousel-item-prev",Z="pointer-event",K=".active",Q=".active.carousel-item",Y=".carousel-item",X=".carousel-item img",G=".carousel-item-next, .carousel-item-prev",J=".carousel-indicators",ee="[data-slide], [data-slide-to]",te='[data-ride="carousel"]',ie={TOUCH:"touch",PEN:"pen"},ne=function(){function e(e,t){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._element=e,this._indicatorsElement=this._element.querySelector(J),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var i=e.prototype;return i.next=function(){this._isSliding||this._slide(L)},i.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},i.prev=function(){this._isSliding||this._slide(M)},i.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(G)&&(c.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},i.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},i.to=function(e){var i=this;this._activeElement=this._element.querySelector(Q);var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(z.SLID,(function(){return i.to(e)}));else{if(n===e)return this.pause(),void this.cycle();var r=e>n?L:M;this._slide(r,this._items[e])}},i.dispose=function(){t(this._element).off(P),t.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},i._getConfig=function(e){return e=a({},O,{},e),c.typeCheckConfig(D,e,N),e},i._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t>0&&this.prev(),t<0&&this.next()}},i._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(z.KEYDOWN,(function(t){return e._keydown(t)})),"hover"===this._config.pause&&t(this._element).on(z.MOUSEENTER,(function(t){return e.pause(t)})).on(z.MOUSELEAVE,(function(t){return e.cycle(t)})),this._config.touch&&this._addTouchEventListeners()},i._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var i=function(t){e._pointerEvent&&ie[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},n=function(t){e._pointerEvent&&ie[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),500+e._config.interval))};t(this._element.querySelectorAll(X)).on(z.DRAG_START,(function(e){return e.preventDefault()})),this._pointerEvent?(t(this._element).on(z.POINTERDOWN,(function(e){return i(e)})),t(this._element).on(z.POINTERUP,(function(e){return n(e)})),this._element.classList.add(Z)):(t(this._element).on(z.TOUCHSTART,(function(e){return i(e)})),t(this._element).on(z.TOUCHMOVE,(function(t){return function(t){t.originalEvent.touches&&t.originalEvent.touches.length>1?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX}(t)})),t(this._element).on(z.TOUCHEND,(function(e){return n(e)})))}},i._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next()}},i._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(Y)):[],this._items.indexOf(e)},i._getItemByDirection=function(e,t){var i=e===L,n=e===M,r=this._getItemIndex(t),o=this._items.length-1;if((n&&0===r||i&&r===o)&&!this._config.wrap)return t;var s=(r+(e===M?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},i._triggerSlideEvent=function(e,i){var n=this._getItemIndex(e),r=this._getItemIndex(this._element.querySelector(Q)),o=t.Event(z.SLIDE,{relatedTarget:e,direction:i,from:r,to:n});return t(this._element).trigger(o),o},i._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var i=[].slice.call(this._indicatorsElement.querySelectorAll(K));t(i).removeClass($);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass($)}},i._slide=function(e,i){var n,r,o,s=this,a=this._element.querySelector(Q),l=this._getItemIndex(a),u=i||a&&this._getItemByDirection(e,a),d=this._getItemIndex(u),h=Boolean(this._interval);if(e===L?(n=q,r=W,o=j):(n=B,r=V,o=R),u&&t(u).hasClass($))this._isSliding=!1;else if(!this._triggerSlideEvent(u,o).isDefaultPrevented()&&a&&u){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(u);var f=t.Event(z.SLID,{relatedTarget:u,direction:o,from:l,to:d});if(t(this._element).hasClass(H)){t(u).addClass(r),c.reflow(u),t(a).addClass(n),t(u).addClass(n);var p=parseInt(u.getAttribute("data-interval"),10);p?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=p):this._config.interval=this._config.defaultInterval||this._config.interval;var m=c.getTransitionDurationFromElement(a);t(a).one(c.TRANSITION_END,(function(){t(u).removeClass(n+" "+r).addClass($),t(a).removeClass($+" "+r+" "+n),s._isSliding=!1,setTimeout((function(){return t(s._element).trigger(f)}),0)})).emulateTransitionEnd(m)}else t(a).removeClass($),t(u).addClass($),this._isSliding=!1,t(this._element).trigger(f);h&&this.cycle()}},e._jQueryInterface=function(i){return this.each((function(){var n=t(this).data("bs.carousel"),r=a({},O,{},t(this).data());"object"==typeof i&&(r=a({},r,{},i));var o="string"==typeof i?i:r.slide;if(n||(n=new e(this,r),t(this).data("bs.carousel",n)),"number"==typeof i)n.to(i);else if("string"==typeof o){if(void 0===n[o])throw new TypeError('No method named "'+o+'"');n[o]()}else r.interval&&r.ride&&(n.pause(),n.cycle())}))},e._dataApiClickHandler=function(i){var n=c.getSelectorFromElement(this);if(n){var r=t(n)[0];if(r&&t(r).hasClass(U)){var o=a({},t(r).data(),{},t(this).data()),s=this.getAttribute("data-slide-to");s&&(o.interval=!1),e._jQueryInterface.call(t(r),o),s&&t(r).data("bs.carousel").to(s),i.preventDefault()}}},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return O}}]),e}();t(document).on(z.CLICK_DATA_API,ee,ne._dataApiClickHandler),t(window).on(z.LOAD_DATA_API,(function(){for(var e=[].slice.call(document.querySelectorAll(te)),i=0,n=e.length;i<n;i++){var r=t(e[i]);ne._jQueryInterface.call(r,r.data())}})),t.fn[D]=ne._jQueryInterface,t.fn[D].Constructor=ne,t.fn[D].noConflict=function(){return t.fn[D]=F,ne._jQueryInterface};var re="collapse",oe=t.fn[re],se={toggle:!0,parent:""},ae={toggle:"boolean",parent:"(string|element)"},le={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},ce="show",ue="collapse",de="collapsing",he="collapsed",fe="width",pe="height",me=".show, .collapsing",ge='[data-toggle="collapse"]',ve=function(){function e(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=[].slice.call(document.querySelectorAll(ge)),n=0,r=i.length;n<r;n++){var o=i[n],s=c.getSelectorFromElement(o),a=[].slice.call(document.querySelectorAll(s)).filter((function(t){return t===e}));null!==s&&a.length>0&&(this._selector=s,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var i=e.prototype;return i.toggle=function(){t(this._element).hasClass(ce)?this.hide():this.show()},i.show=function(){var i,n,r=this;if(!(this._isTransitioning||t(this._element).hasClass(ce)||(this._parent&&0===(i=[].slice.call(this._parent.querySelectorAll(me)).filter((function(e){return"string"==typeof r._config.parent?e.getAttribute("data-parent")===r._config.parent:e.classList.contains(ue)}))).length&&(i=null),i&&(n=t(i).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var o=t.Event(le.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){i&&(e._jQueryInterface.call(t(i).not(this._selector),"hide"),n||t(i).data("bs.collapse",null));var s=this._getDimension();t(this._element).removeClass(ue).addClass(de),this._element.style[s]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(he).attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(s[0].toUpperCase()+s.slice(1)),l=c.getTransitionDurationFromElement(this._element);t(this._element).one(c.TRANSITION_END,(function(){t(r._element).removeClass(de).addClass(ue).addClass(ce),r._element.style[s]="",r.setTransitioning(!1),t(r._element).trigger(le.SHOWN)})).emulateTransitionEnd(l),this._element.style[s]=this._element[a]+"px"}}},i.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(ce)){var i=t.Event(le.HIDE);if(t(this._element).trigger(i),!i.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",c.reflow(this._element),t(this._element).addClass(de).removeClass(ue).removeClass(ce);var r=this._triggerArray.length;if(r>0)for(var o=0;o<r;o++){var s=this._triggerArray[o],a=c.getSelectorFromElement(s);null!==a&&(t([].slice.call(document.querySelectorAll(a))).hasClass(ce)||t(s).addClass(he).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[n]="";var l=c.getTransitionDurationFromElement(this._element);t(this._element).one(c.TRANSITION_END,(function(){e.setTransitioning(!1),t(e._element).removeClass(de).addClass(ue).trigger(le.HIDDEN)})).emulateTransitionEnd(l)}}},i.setTransitioning=function(e){this._isTransitioning=e},i.dispose=function(){t.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},i._getConfig=function(e){return(e=a({},se,{},e)).toggle=Boolean(e.toggle),c.typeCheckConfig(re,e,ae),e},i._getDimension=function(){return t(this._element).hasClass(fe)?fe:pe},i._getParent=function(){var i,n=this;c.isElement(this._config.parent)?(i=this._config.parent,void 0!==this._config.parent.jquery&&(i=this._config.parent[0])):i=document.querySelector(this._config.parent);var r='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',o=[].slice.call(i.querySelectorAll(r));return t(o).each((function(t,i){n._addAriaAndCollapsedClass(e._getTargetFromElement(i),[i])})),i},i._addAriaAndCollapsedClass=function(e,i){var n=t(e).hasClass(ce);i.length&&t(i).toggleClass(he,!n).attr("aria-expanded",n)},e._getTargetFromElement=function(e){var t=c.getSelectorFromElement(e);return t?document.querySelector(t):null},e._jQueryInterface=function(i){return this.each((function(){var n=t(this),r=n.data("bs.collapse"),o=a({},se,{},n.data(),{},"object"==typeof i&&i?i:{});if(!r&&o.toggle&&/show|hide/.test(i)&&(o.toggle=!1),r||(r=new e(this,o),n.data("bs.collapse",r)),"string"==typeof i){if(void 0===r[i])throw new TypeError('No method named "'+i+'"');r[i]()}}))},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return se}}]),e}();t(document).on(le.CLICK_DATA_API,ge,(function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),n=c.getSelectorFromElement(this),r=[].slice.call(document.querySelectorAll(n));t(r).each((function(){var e=t(this),n=e.data("bs.collapse")?"toggle":i.data();ve._jQueryInterface.call(e,n)}))})),t.fn[re]=ve._jQueryInterface,t.fn[re].Constructor=ve,t.fn[re].noConflict=function(){return t.fn[re]=oe,ve._jQueryInterface};var _e="dropdown",be=t.fn[_e],ye=new RegExp("38|40|27"),we={HIDE:"hide.bs.dropdown",HIDDEN:"hidden.bs.dropdown",SHOW:"show.bs.dropdown",SHOWN:"shown.bs.dropdown",CLICK:"click.bs.dropdown",CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},Ce="disabled",xe="show",Ee="dropup",Te="dropright",ke="dropleft",Se="dropdown-menu-right",Ae="position-static",Ie='[data-toggle="dropdown"]',De=".dropdown form",Pe=".dropdown-menu",Fe=".navbar-nav",Oe=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Ne="top-start",Le="top-end",Me="bottom-start",je="bottom-end",Re="right-start",ze="left-start",Ue={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},$e={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},He=function(){function e(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var n=e.prototype;return n.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(Ce)){var i=t(this._menu).hasClass(xe);e._clearMenus(),i||this.show(!0)}},n.show=function(n){if(void 0===n&&(n=!1),!(this._element.disabled||t(this._element).hasClass(Ce)||t(this._menu).hasClass(xe))){var r={relatedTarget:this._element},o=t.Event(we.SHOW,r),s=e._getParentFromElement(this._element);if(t(s).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&n){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var a=this._element;"parent"===this._config.reference?a=s:c.isElement(this._config.reference)&&(a=this._config.reference,void 0!==this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&t(s).addClass(Ae),this._popper=new i(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(s).closest(Fe).length&&t(document.body).children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(xe),t(s).toggleClass(xe).trigger(t.Event(we.SHOWN,r))}}},n.hide=function(){if(!this._element.disabled&&!t(this._element).hasClass(Ce)&&t(this._menu).hasClass(xe)){var i={relatedTarget:this._element},n=t.Event(we.HIDE,i),r=e._getParentFromElement(this._element);t(r).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),t(this._menu).toggleClass(xe),t(r).toggleClass(xe).trigger(t.Event(we.HIDDEN,i)))}},n.dispose=function(){t.removeData(this._element,"bs.dropdown"),t(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},n.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},n._addEventListeners=function(){var e=this;t(this._element).on(we.CLICK,(function(t){t.preventDefault(),t.stopPropagation(),e.toggle()}))},n._getConfig=function(e){return e=a({},this.constructor.Default,{},t(this._element).data(),{},e),c.typeCheckConfig(_e,e,this.constructor.DefaultType),e},n._getMenuElement=function(){if(!this._menu){var t=e._getParentFromElement(this._element);t&&(this._menu=t.querySelector(Pe))}return this._menu},n._getPlacement=function(){var e=t(this._element.parentNode),i=Me;return e.hasClass(Ee)?(i=Ne,t(this._menu).hasClass(Se)&&(i=Le)):e.hasClass(Te)?i=Re:e.hasClass(ke)?i=ze:t(this._menu).hasClass(Se)&&(i=je),i},n._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},n._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=a({},t.offsets,{},e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},n._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(e.modifiers.applyStyle={enabled:!1}),a({},e,{},this._config.popperConfig)},e._jQueryInterface=function(i){return this.each((function(){var n=t(this).data("bs.dropdown");if(n||(n=new e(this,"object"==typeof i?i:null),t(this).data("bs.dropdown",n)),"string"==typeof i){if(void 0===n[i])throw new TypeError('No method named "'+i+'"');n[i]()}}))},e._clearMenus=function(i){if(!i||3!==i.which&&("keyup"!==i.type||9===i.which))for(var n=[].slice.call(document.querySelectorAll(Ie)),r=0,o=n.length;r<o;r++){var s=e._getParentFromElement(n[r]),a=t(n[r]).data("bs.dropdown"),l={relatedTarget:n[r]};if(i&&"click"===i.type&&(l.clickEvent=i),a){var c=a._menu;if(t(s).hasClass(xe)&&!(i&&("click"===i.type&&/input|textarea/i.test(i.target.tagName)||"keyup"===i.type&&9===i.which)&&t.contains(s,i.target))){var u=t.Event(we.HIDE,l);t(s).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),n[r].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),t(c).removeClass(xe),t(s).removeClass(xe).trigger(t.Event(we.HIDDEN,l)))}}}},e._getParentFromElement=function(e){var t,i=c.getSelectorFromElement(e);return i&&(t=document.querySelector(i)),t||e.parentNode},e._dataApiKeydownHandler=function(i){if(!(/input|textarea/i.test(i.target.tagName)?32===i.which||27!==i.which&&(40!==i.which&&38!==i.which||t(i.target).closest(Pe).length):!ye.test(i.which))&&(i.preventDefault(),i.stopPropagation(),!this.disabled&&!t(this).hasClass(Ce))){var n=e._getParentFromElement(this),r=t(n).hasClass(xe);if(r||27!==i.which)if(r&&(!r||27!==i.which&&32!==i.which)){var o=[].slice.call(n.querySelectorAll(Oe)).filter((function(e){return t(e).is(":visible")}));if(0!==o.length){var s=o.indexOf(i.target);38===i.which&&s>0&&s--,40===i.which&&s<o.length-1&&s++,s<0&&(s=0),o[s].focus()}}else{if(27===i.which){var a=n.querySelector(Ie);t(a).trigger("focus")}t(this).trigger("click")}}},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return Ue}},{key:"DefaultType",get:function(){return $e}}]),e}();t(document).on(we.KEYDOWN_DATA_API,Ie,He._dataApiKeydownHandler).on(we.KEYDOWN_DATA_API,Pe,He._dataApiKeydownHandler).on(we.CLICK_DATA_API+" "+we.KEYUP_DATA_API,He._clearMenus).on(we.CLICK_DATA_API,Ie,(function(e){e.preventDefault(),e.stopPropagation(),He._jQueryInterface.call(t(this),"toggle")})).on(we.CLICK_DATA_API,De,(function(e){e.stopPropagation()})),t.fn[_e]=He._jQueryInterface,t.fn[_e].Constructor=He,t.fn[_e].noConflict=function(){return t.fn[_e]=be,He._jQueryInterface};var Be=t.fn.modal,qe={backdrop:!0,keyboard:!0,focus:!0,show:!0},We={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Ve={HIDE:"hide.bs.modal",HIDE_PREVENTED:"hidePrevented.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},Ze="modal-dialog-scrollable",Ke="modal-scrollbar-measure",Qe="modal-backdrop",Ye="modal-open",Xe="fade",Ge="show",Je="modal-static",et=".modal-dialog",tt=".modal-body",it='[data-toggle="modal"]',nt='[data-dismiss="modal"]',rt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ot=".sticky-top",st=function(){function e(e,t){this._config=this._getConfig(t),this._element=e,this._dialog=e.querySelector(et),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var i=e.prototype;return i.toggle=function(e){return this._isShown?this.hide():this.show(e)},i.show=function(e){var i=this;if(!this._isShown&&!this._isTransitioning){t(this._element).hasClass(Xe)&&(this._isTransitioning=!0);var n=t.Event(Ve.SHOW,{relatedTarget:e});t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(Ve.CLICK_DISMISS,nt,(function(e){return i.hide(e)})),t(this._dialog).on(Ve.MOUSEDOWN_DISMISS,(function(){t(i._element).one(Ve.MOUSEUP_DISMISS,(function(e){t(e.target).is(i._element)&&(i._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return i._showElement(e)})))}},i.hide=function(e){var i=this;if(e&&e.preventDefault(),this._isShown&&!this._isTransitioning){var n=t.Event(Ve.HIDE);if(t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var r=t(this._element).hasClass(Xe);if(r&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(Ve.FOCUSIN),t(this._element).removeClass(Ge),t(this._element).off(Ve.CLICK_DISMISS),t(this._dialog).off(Ve.MOUSEDOWN_DISMISS),r){var o=c.getTransitionDurationFromElement(this._element);t(this._element).one(c.TRANSITION_END,(function(e){return i._hideModal(e)})).emulateTransitionEnd(o)}else this._hideModal()}}},i.dispose=function(){[window,this._element,this._dialog].forEach((function(e){return t(e).off(".bs.modal")})),t(document).off(Ve.FOCUSIN),t.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},i.handleUpdate=function(){this._adjustDialog()},i._getConfig=function(e){return e=a({},qe,{},e),c.typeCheckConfig("modal",e,We),e},i._triggerBackdropTransition=function(){var e=this;if("static"===this._config.backdrop){var i=t.Event(Ve.HIDE_PREVENTED);if(t(this._element).trigger(i),i.defaultPrevented)return;this._element.classList.add(Je);var n=c.getTransitionDurationFromElement(this._element);t(this._element).one(c.TRANSITION_END,(function(){e._element.classList.remove(Je)})).emulateTransitionEnd(n),this._element.focus()}else this.hide()},i._showElement=function(e){var i=this,n=t(this._element).hasClass(Xe),r=this._dialog?this._dialog.querySelector(tt):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),t(this._dialog).hasClass(Ze)&&r?r.scrollTop=0:this._element.scrollTop=0,n&&c.reflow(this._element),t(this._element).addClass(Ge),this._config.focus&&this._enforceFocus();var o=t.Event(Ve.SHOWN,{relatedTarget:e}),s=function(){i._config.focus&&i._element.focus(),i._isTransitioning=!1,t(i._element).trigger(o)};if(n){var a=c.getTransitionDurationFromElement(this._dialog);t(this._dialog).one(c.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},i._enforceFocus=function(){var e=this;t(document).off(Ve.FOCUSIN).on(Ve.FOCUSIN,(function(i){document!==i.target&&e._element!==i.target&&0===t(e._element).has(i.target).length&&e._element.focus()}))},i._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(Ve.KEYDOWN_DISMISS,(function(t){27===t.which&&e._triggerBackdropTransition()})):this._isShown||t(this._element).off(Ve.KEYDOWN_DISMISS)},i._setResizeEvent=function(){var e=this;this._isShown?t(window).on(Ve.RESIZE,(function(t){return e.handleUpdate(t)})):t(window).off(Ve.RESIZE)},i._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop((function(){t(document.body).removeClass(Ye),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(Ve.HIDDEN)}))},i._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},i._showBackdrop=function(e){var i=this,n=t(this._element).hasClass(Xe)?Xe:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=Qe,n&&this._backdrop.classList.add(n),t(this._backdrop).appendTo(document.body),t(this._element).on(Ve.CLICK_DISMISS,(function(e){i._ignoreBackdropClick?i._ignoreBackdropClick=!1:e.target===e.currentTarget&&i._triggerBackdropTransition()})),n&&c.reflow(this._backdrop),t(this._backdrop).addClass(Ge),!e)return;if(!n)return void e();var r=c.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(c.TRANSITION_END,e).emulateTransitionEnd(r)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(Ge);var o=function(){i._removeBackdrop(),e&&e()};if(t(this._element).hasClass(Xe)){var s=c.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(c.TRANSITION_END,o).emulateTransitionEnd(s)}else o()}else e&&e()},i._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},i._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},i._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=e.left+e.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},i._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){var i=[].slice.call(document.querySelectorAll(rt)),n=[].slice.call(document.querySelectorAll(ot));t(i).each((function(i,n){var r=n.style.paddingRight,o=t(n).css("padding-right");t(n).data("padding-right",r).css("padding-right",parseFloat(o)+e._scrollbarWidth+"px")})),t(n).each((function(i,n){var r=n.style.marginRight,o=t(n).css("margin-right");t(n).data("margin-right",r).css("margin-right",parseFloat(o)-e._scrollbarWidth+"px")}));var r=document.body.style.paddingRight,o=t(document.body).css("padding-right");t(document.body).data("padding-right",r).css("padding-right",parseFloat(o)+this._scrollbarWidth+"px")}t(document.body).addClass(Ye)},i._resetScrollbar=function(){var e=[].slice.call(document.querySelectorAll(rt));t(e).each((function(e,i){var n=t(i).data("padding-right");t(i).removeData("padding-right"),i.style.paddingRight=n||""}));var i=[].slice.call(document.querySelectorAll(""+ot));t(i).each((function(e,i){var n=t(i).data("margin-right");void 0!==n&&t(i).css("margin-right",n).removeData("margin-right")}));var n=t(document.body).data("padding-right");t(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},i._getScrollbarWidth=function(){var e=document.createElement("div");e.className=Ke,document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},e._jQueryInterface=function(i,n){return this.each((function(){var r=t(this).data("bs.modal"),o=a({},qe,{},t(this).data(),{},"object"==typeof i&&i?i:{});if(r||(r=new e(this,o),t(this).data("bs.modal",r)),"string"==typeof i){if(void 0===r[i])throw new TypeError('No method named "'+i+'"');r[i](n)}else o.show&&r.show(n)}))},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return qe}}]),e}();t(document).on(Ve.CLICK_DATA_API,it,(function(e){var i,n=this,r=c.getSelectorFromElement(this);r&&(i=document.querySelector(r));var o=t(i).data("bs.modal")?"toggle":a({},t(i).data(),{},t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var s=t(i).one(Ve.SHOW,(function(e){e.isDefaultPrevented()||s.one(Ve.HIDDEN,(function(){t(n).is(":visible")&&n.focus()}))}));st._jQueryInterface.call(t(i),o,this)})),t.fn.modal=st._jQueryInterface,t.fn.modal.Constructor=st,t.fn.modal.noConflict=function(){return t.fn.modal=Be,st._jQueryInterface};var at=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],lt={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ct=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,ut=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function dt(e,t,i){if(0===e.length)return e;if(i&&"function"==typeof i)return i(e);for(var n=(new window.DOMParser).parseFromString(e,"text/html"),r=Object.keys(t),o=[].slice.call(n.body.querySelectorAll("*")),s=function(e,i){var n=o[e],s=n.nodeName.toLowerCase();if(-1===r.indexOf(n.nodeName.toLowerCase()))return n.parentNode.removeChild(n),"continue";var a=[].slice.call(n.attributes),l=[].concat(t["*"]||[],t[s]||[]);a.forEach((function(e){(function(e,t){var i=e.nodeName.toLowerCase();if(-1!==t.indexOf(i))return-1===at.indexOf(i)||Boolean(e.nodeValue.match(ct)||e.nodeValue.match(ut));for(var n=t.filter((function(e){return e instanceof RegExp})),r=0,o=n.length;r<o;r++)if(i.match(n[r]))return!0;return!1})(e,l)||n.removeAttribute(e.nodeName)}))},a=0,l=o.length;a<l;a++)s(a);return n.body.innerHTML}var ht="tooltip",ft=t.fn[ht],pt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),mt=["sanitize","whiteList","sanitizeFn"],gt={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},vt={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},_t={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:lt,popperConfig:null},bt="show",yt="out",wt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Ct="fade",xt="show",Et=".tooltip-inner",Tt=".arrow",kt="hover",St="focus",At="click",It="manual",Dt=function(){function e(e,t){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var n=e.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(e){if(this._isEnabled)if(e){var i=this.constructor.DATA_KEY,n=t(e.currentTarget).data(i);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(t(this.getTipElement()).hasClass(xt))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var r=c.findShadowRoot(this.element),o=t.contains(null!==r?r:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!o)return;var s=this.getTipElement(),a=c.getUID(this.constructor.NAME);s.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(s).addClass(Ct);var l="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(l);this.addAttachmentClass(u);var d=this._getContainer();t(s).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(s).appendTo(d),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new i(this.element,s,this._getPopperConfig(u)),t(s).addClass(xt),"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);var h=function(){e.config.animation&&e._fixTransition();var i=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),i===yt&&e._leave(null,e)};if(t(this.tip).hasClass(Ct)){var f=c.getTransitionDurationFromElement(this.tip);t(this.tip).one(c.TRANSITION_END,h).emulateTransitionEnd(f)}else h()}},n.hide=function(e){var i=this,n=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE),o=function(){i._hoverState!==bt&&n.parentNode&&n.parentNode.removeChild(n),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),t(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),e&&e()};if(t(this.element).trigger(r),!r.isDefaultPrevented()){if(t(n).removeClass(xt),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger[At]=!1,this._activeTrigger[St]=!1,this._activeTrigger[kt]=!1,t(this.tip).hasClass(Ct)){var s=c.getTransitionDurationFromElement(n);t(n).one(c.TRANSITION_END,o).emulateTransitionEnd(s)}else o();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},n.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},n.setContent=function(){var e=this.getTipElement();this.setElementContent(t(e.querySelectorAll(Et)),this.getTitle()),t(e).removeClass(Ct+" "+xt)},n.setElementContent=function(e,i){"object"!=typeof i||!i.nodeType&&!i.jquery?this.config.html?(this.config.sanitize&&(i=dt(i,this.config.whiteList,this.config.sanitizeFn)),e.html(i)):e.text(i):this.config.html?t(i).parent().is(e)||e.empty().append(i):e.text(t(i).text())},n.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},n._getPopperConfig=function(e){var t=this;return a({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Tt},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},{},this.config.popperConfig)},n._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=a({},t.offsets,{},e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},n._getContainer=function(){return!1===this.config.container?document.body:c.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},n._getAttachment=function(e){return vt[e.toUpperCase()]},n._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach((function(i){if("click"===i)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,(function(t){return e.toggle(t)}));else if(i!==It){var n=i===kt?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=i===kt?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(n,e.config.selector,(function(t){return e._enter(t)})).on(r,e.config.selector,(function(t){return e._leave(t)}))}})),this._hideModalHandler=function(){e.element&&e.hide()},t(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(e,i){var n=this.constructor.DATA_KEY;(i=i||t(e.currentTarget).data(n))||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),e&&(i._activeTrigger["focusin"===e.type?St:kt]=!0),t(i.getTipElement()).hasClass(xt)||i._hoverState===bt?i._hoverState=bt:(clearTimeout(i._timeout),i._hoverState=bt,i.config.delay&&i.config.delay.show?i._timeout=setTimeout((function(){i._hoverState===bt&&i.show()}),i.config.delay.show):i.show())},n._leave=function(e,i){var n=this.constructor.DATA_KEY;(i=i||t(e.currentTarget).data(n))||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),e&&(i._activeTrigger["focusout"===e.type?St:kt]=!1),i._isWithActiveTrigger()||(clearTimeout(i._timeout),i._hoverState=yt,i.config.delay&&i.config.delay.hide?i._timeout=setTimeout((function(){i._hoverState===yt&&i.hide()}),i.config.delay.hide):i.hide())},n._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},n._getConfig=function(e){var i=t(this.element).data();return Object.keys(i).forEach((function(e){-1!==mt.indexOf(e)&&delete i[e]})),"number"==typeof(e=a({},this.constructor.Default,{},i,{},"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),c.typeCheckConfig(ht,e,this.constructor.DefaultType),e.sanitize&&(e.template=dt(e.template,e.whiteList,e.sanitizeFn)),e},n._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},n._cleanTipClass=function(){var e=t(this.getTipElement()),i=e.attr("class").match(pt);null!==i&&i.length&&e.removeClass(i.join(""))},n._handlePopperPlacementChange=function(e){var t=e.instance;this.tip=t.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},n._fixTransition=function(){var e=this.getTipElement(),i=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(Ct),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},e._jQueryInterface=function(i){return this.each((function(){var n=t(this).data("bs.tooltip"),r="object"==typeof i&&i;if((n||!/dispose|hide/.test(i))&&(n||(n=new e(this,r),t(this).data("bs.tooltip",n)),"string"==typeof i)){if(void 0===n[i])throw new TypeError('No method named "'+i+'"');n[i]()}}))},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return _t}},{key:"NAME",get:function(){return ht}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return wt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return gt}}]),e}();t.fn[ht]=Dt._jQueryInterface,t.fn[ht].Constructor=Dt,t.fn[ht].noConflict=function(){return t.fn[ht]=ft,Dt._jQueryInterface};var Pt="popover",Ft=t.fn[Pt],Ot=new RegExp("(^|\\s)bs-popover\\S+","g"),Nt=a({},Dt.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Lt=a({},Dt.DefaultType,{content:"(string|element|function)"}),Mt="fade",jt="show",Rt=".popover-header",zt=".popover-body",Ut={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},$t=function(e){var i,n;function o(){return e.apply(this,arguments)||this}n=e,(i=o).prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n;var s=o.prototype;return s.isWithContent=function(){return this.getTitle()||this._getContent()},s.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},s.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},s.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(Rt),this.getTitle());var i=this._getContent();"function"==typeof i&&(i=i.call(this.element)),this.setElementContent(e.find(zt),i),e.removeClass(Mt+" "+jt)},s._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},s._cleanTipClass=function(){var e=t(this.getTipElement()),i=e.attr("class").match(Ot);null!==i&&i.length>0&&e.removeClass(i.join(""))},o._jQueryInterface=function(e){return this.each((function(){var i=t(this).data("bs.popover"),n="object"==typeof e?e:null;if((i||!/dispose|hide/.test(e))&&(i||(i=new o(this,n),t(this).data("bs.popover",i)),"string"==typeof e)){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},r(o,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return Nt}},{key:"NAME",get:function(){return Pt}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Ut}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Lt}}]),o}(Dt);t.fn[Pt]=$t._jQueryInterface,t.fn[Pt].Constructor=$t,t.fn[Pt].noConflict=function(){return t.fn[Pt]=Ft,$t._jQueryInterface};var Ht="scrollspy",Bt=t.fn[Ht],qt={offset:10,method:"auto",target:""},Wt={offset:"number",method:"string",target:"(string|element)"},Vt={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},Zt="dropdown-item",Kt="active",Qt='[data-spy="scroll"]',Yt=".nav, .list-group",Xt=".nav-link",Gt=".nav-item",Jt=".list-group-item",ei=".dropdown",ti=".dropdown-item",ii=".dropdown-toggle",ni="offset",ri="position",oi=function(){function e(e,i){var n=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(i),this._selector=this._config.target+" "+Xt+","+this._config.target+" "+Jt+","+this._config.target+" "+ti,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(Vt.SCROLL,(function(e){return n._process(e)})),this.refresh(),this._process()}var i=e.prototype;return i.refresh=function(){var e=this,i=this._scrollElement===this._scrollElement.window?ni:ri,n="auto"===this._config.method?i:this._config.method,r=n===ri?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(e){var i,o=c.getSelectorFromElement(e);if(o&&(i=document.querySelector(o)),i){var s=i.getBoundingClientRect();if(s.width||s.height)return[t(i)[n]().top+r,o]}return null})).filter((function(e){return e})).sort((function(e,t){return e[0]-t[0]})).forEach((function(t){e._offsets.push(t[0]),e._targets.push(t[1])}))},i.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},i._getConfig=function(e){if("string"!=typeof(e=a({},qt,{},"object"==typeof e&&e?e:{})).target){var i=t(e.target).attr("id");i||(i=c.getUID(Ht),t(e.target).attr("id",i)),e.target="#"+i}return c.typeCheckConfig(Ht,e,Wt),e},i._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},i._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},i._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},i._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),i=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=i){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&e>=this._offsets[r]&&(void 0===this._offsets[r+1]||e<this._offsets[r+1])&&this._activate(this._targets[r])}},i._activate=function(e){this._activeTarget=e,this._clear();var i=this._selector.split(",").map((function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'})),n=t([].slice.call(document.querySelectorAll(i.join(","))));n.hasClass(Zt)?(n.closest(ei).find(ii).addClass(Kt),n.addClass(Kt)):(n.addClass(Kt),n.parents(Yt).prev(Xt+", "+Jt).addClass(Kt),n.parents(Yt).prev(Gt).children(Xt).addClass(Kt)),t(this._scrollElement).trigger(Vt.ACTIVATE,{relatedTarget:e})},i._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(e){return e.classList.contains(Kt)})).forEach((function(e){return e.classList.remove(Kt)}))},e._jQueryInterface=function(i){return this.each((function(){var n=t(this).data("bs.scrollspy");if(n||(n=new e(this,"object"==typeof i&&i),t(this).data("bs.scrollspy",n)),"string"==typeof i){if(void 0===n[i])throw new TypeError('No method named "'+i+'"');n[i]()}}))},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"Default",get:function(){return qt}}]),e}();t(window).on(Vt.LOAD_DATA_API,(function(){for(var e=[].slice.call(document.querySelectorAll(Qt)),i=e.length;i--;){var n=t(e[i]);oi._jQueryInterface.call(n,n.data())}})),t.fn[Ht]=oi._jQueryInterface,t.fn[Ht].Constructor=oi,t.fn[Ht].noConflict=function(){return t.fn[Ht]=Bt,oi._jQueryInterface};var si=t.fn.tab,ai={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},li="dropdown-menu",ci="active",ui="disabled",di="fade",hi="show",fi=".dropdown",pi=".nav, .list-group",mi=".active",gi="> li > .active",vi='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',_i=".dropdown-toggle",bi="> .dropdown-menu .active",yi=function(){function e(e){this._element=e}var i=e.prototype;return i.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(ci)||t(this._element).hasClass(ui))){var i,n,r=t(this._element).closest(pi)[0],o=c.getSelectorFromElement(this._element);if(r){var s="UL"===r.nodeName||"OL"===r.nodeName?gi:mi;n=(n=t.makeArray(t(r).find(s)))[n.length-1]}var a=t.Event(ai.HIDE,{relatedTarget:this._element}),l=t.Event(ai.SHOW,{relatedTarget:n});if(n&&t(n).trigger(a),t(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){o&&(i=document.querySelector(o)),this._activate(this._element,r);var u=function(){var i=t.Event(ai.HIDDEN,{relatedTarget:e._element}),r=t.Event(ai.SHOWN,{relatedTarget:n});t(n).trigger(i),t(e._element).trigger(r)};i?this._activate(i,i.parentNode,u):u()}}},i.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},i._activate=function(e,i,n){var r=this,o=(!i||"UL"!==i.nodeName&&"OL"!==i.nodeName?t(i).children(mi):t(i).find(gi))[0],s=n&&o&&t(o).hasClass(di),a=function(){return r._transitionComplete(e,o,n)};if(o&&s){var l=c.getTransitionDurationFromElement(o);t(o).removeClass(hi).one(c.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},i._transitionComplete=function(e,i,n){if(i){t(i).removeClass(ci);var r=t(i.parentNode).find(bi)[0];r&&t(r).removeClass(ci),"tab"===i.getAttribute("role")&&i.setAttribute("aria-selected",!1)}if(t(e).addClass(ci),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),c.reflow(e),e.classList.contains(di)&&e.classList.add(hi),e.parentNode&&t(e.parentNode).hasClass(li)){var o=t(e).closest(fi)[0];if(o){var s=[].slice.call(o.querySelectorAll(_i));t(s).addClass(ci)}e.setAttribute("aria-expanded",!0)}n&&n()},e._jQueryInterface=function(i){return this.each((function(){var n=t(this),r=n.data("bs.tab");if(r||(r=new e(this),n.data("bs.tab",r)),"string"==typeof i){if(void 0===r[i])throw new TypeError('No method named "'+i+'"');r[i]()}}))},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}}]),e}();t(document).on(ai.CLICK_DATA_API,vi,(function(e){e.preventDefault(),yi._jQueryInterface.call(t(this),"show")})),t.fn.tab=yi._jQueryInterface,t.fn.tab.Constructor=yi,t.fn.tab.noConflict=function(){return t.fn.tab=si,yi._jQueryInterface};var wi=t.fn.toast,Ci={CLICK_DISMISS:"click.dismiss.bs.toast",HIDE:"hide.bs.toast",HIDDEN:"hidden.bs.toast",SHOW:"show.bs.toast",SHOWN:"shown.bs.toast"},xi="fade",Ei="hide",Ti="show",ki="showing",Si={animation:"boolean",autohide:"boolean",delay:"number"},Ai={animation:!0,autohide:!0,delay:500},Ii='[data-dismiss="toast"]',Di=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var i=e.prototype;return i.show=function(){var e=this,i=t.Event(Ci.SHOW);if(t(this._element).trigger(i),!i.isDefaultPrevented()){this._config.animation&&this._element.classList.add(xi);var n=function(){e._element.classList.remove(ki),e._element.classList.add(Ti),t(e._element).trigger(Ci.SHOWN),e._config.autohide&&(e._timeout=setTimeout((function(){e.hide()}),e._config.delay))};if(this._element.classList.remove(Ei),c.reflow(this._element),this._element.classList.add(ki),this._config.animation){var r=c.getTransitionDurationFromElement(this._element);t(this._element).one(c.TRANSITION_END,n).emulateTransitionEnd(r)}else n()}},i.hide=function(){if(this._element.classList.contains(Ti)){var e=t.Event(Ci.HIDE);t(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},i.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(Ti)&&this._element.classList.remove(Ti),t(this._element).off(Ci.CLICK_DISMISS),t.removeData(this._element,"bs.toast"),this._element=null,this._config=null},i._getConfig=function(e){return e=a({},Ai,{},t(this._element).data(),{},"object"==typeof e&&e?e:{}),c.typeCheckConfig("toast",e,this.constructor.DefaultType),e},i._setListeners=function(){var e=this;t(this._element).on(Ci.CLICK_DISMISS,Ii,(function(){return e.hide()}))},i._close=function(){var e=this,i=function(){e._element.classList.add(Ei),t(e._element).trigger(Ci.HIDDEN)};if(this._element.classList.remove(Ti),this._config.animation){var n=c.getTransitionDurationFromElement(this._element);t(this._element).one(c.TRANSITION_END,i).emulateTransitionEnd(n)}else i()},e._jQueryInterface=function(i){return this.each((function(){var n=t(this),r=n.data("bs.toast");if(r||(r=new e(this,"object"==typeof i&&i),n.data("bs.toast",r)),"string"==typeof i){if(void 0===r[i])throw new TypeError('No method named "'+i+'"');r[i](this)}}))},r(e,null,[{key:"VERSION",get:function(){return"4.4.1"}},{key:"DefaultType",get:function(){return Si}},{key:"Default",get:function(){return Ai}}]),e}();t.fn.toast=Di._jQueryInterface,t.fn.toast.Constructor=Di,t.fn.toast.noConflict=function(){return t.fn.toast=wi,Di._jQueryInterface},e.Alert=g,e.Button=I,e.Carousel=ne,e.Collapse=ve,e.Dropdown=He,e.Modal=st,e.Popover=$t,e.Scrollspy=oi,e.Tab=yi,e.Toast=Di,e.Tooltip=Dt,e.Util=c,Object.defineProperty(e,"__esModule",{value:!0})}(t,i(0),i(3))},function(e,t,i){"use strict";i.r(t),function(e){
+/**!
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
+ * @version 1.16.1
+ * @license
+ * Copyright (c) 2016 Federico Zivolo and contributors
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+var i="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,n=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(i&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var r=i&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),n))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function s(e,t){if(1!==e.nodeType)return[];var i=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?i[t]:i}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=s(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(i+r+n)?e:l(a(e))}function c(e){return e&&e.referenceNode?e.referenceNode:e}var u=i&&!(!window.MSInputMethodContext||!document.documentMode),d=i&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?u:10===e?d:u||d}function f(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,i=e.offsetParent||null;i===t&&e.nextElementSibling;)i=(e=e.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===s(i,"position")?f(i):i:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function m(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var i=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?e:t,r=i?t:e,o=document.createRange();o.setStart(n,0),o.setEnd(r,0);var s,a,l=o.commonAncestorContainer;if(e!==l&&t!==l||n.contains(r))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&f(s.firstElementChild)!==s?f(l):l;var c=p(e);return c.host?m(c.host,t):m(e,p(t).host)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i="top"===t?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var r=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||r;return o[i]}return e[i]}function v(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=g(t,"top"),r=g(t,"left"),o=i?-1:1;return e.top+=n*o,e.bottom+=n*o,e.left+=r*o,e.right+=r*o,e}function _(e,t){var i="x"===t?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(e["border"+i+"Width"])+parseFloat(e["border"+n+"Width"])}function b(e,t,i,n){return Math.max(t["offset"+e],t["scroll"+e],i["client"+e],i["offset"+e],i["scroll"+e],h(10)?parseInt(i["offset"+e])+parseInt(n["margin"+("Height"===e?"Top":"Left")])+parseInt(n["margin"+("Height"===e?"Bottom":"Right")]):0)}function y(e){var t=e.body,i=e.documentElement,n=h(10)&&getComputedStyle(i);return{height:b("Height",t,i,n),width:b("Width",t,i,n)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},C=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),x=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e};function T(e){return E({},e,{right:e.left+e.width,bottom:e.top+e.height})}function k(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var i=g(e,"top"),n=g(e,"left");t.top+=i,t.left+=n,t.bottom+=i,t.right+=n}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?y(e.ownerDocument):{},a=o.width||e.clientWidth||r.width,l=o.height||e.clientHeight||r.height,c=e.offsetWidth-a,u=e.offsetHeight-l;if(c||u){var d=s(e);c-=_(d,"x"),u-=_(d,"y"),r.width-=c,r.height-=u}return T(r)}function S(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=h(10),r="HTML"===t.nodeName,o=k(e),a=k(t),c=l(e),u=s(t),d=parseFloat(u.borderTopWidth),f=parseFloat(u.borderLeftWidth);i&&r&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var p=T({top:o.top-a.top-d,left:o.left-a.left-f,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!n&&r){var m=parseFloat(u.marginTop),g=parseFloat(u.marginLeft);p.top-=d-m,p.bottom-=d-m,p.left-=f-g,p.right-=f-g,p.marginTop=m,p.marginLeft=g}return(n&&!i?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(p=v(p,t)),p}function A(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.ownerDocument.documentElement,n=S(e,i),r=Math.max(i.clientWidth,window.innerWidth||0),o=Math.max(i.clientHeight,window.innerHeight||0),s=t?0:g(i),a=t?0:g(i,"left"),l={top:s-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o};return T(l)}function I(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===s(e,"position"))return!0;var i=a(e);return!!i&&I(i)}function D(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===s(t,"transform");)t=t.parentElement;return t||document.documentElement}function P(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},s=r?D(e):m(e,c(t));if("viewport"===n)o=A(s,r);else{var u=void 0;"scrollParent"===n?"BODY"===(u=l(a(t))).nodeName&&(u=e.ownerDocument.documentElement):u="window"===n?e.ownerDocument.documentElement:n;var d=S(u,s,r);if("HTML"!==u.nodeName||I(s))o=d;else{var h=y(e.ownerDocument),f=h.height,p=h.width;o.top+=d.top-d.marginTop,o.bottom=f+d.top,o.left+=d.left-d.marginLeft,o.right=p+d.left}}var g="number"==typeof(i=i||0);return o.left+=g?i:i.left||0,o.top+=g?i:i.top||0,o.right-=g?i:i.right||0,o.bottom-=g?i:i.bottom||0,o}function F(e){return e.width*e.height}function O(e,t,i,n,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=P(i,n,o,r),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},l=Object.keys(a).map((function(e){return E({key:e},a[e],{area:F(a[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,n=e.height;return t>=i.clientWidth&&n>=i.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function N(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=n?D(t):m(t,c(i));return S(i,r,n)}function L(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),i=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),n=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+n,height:e.offsetHeight+i}}function M(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function j(e,t,i){i=i.split("-")[0];var n=L(e),r={width:n.width,height:n.height},o=-1!==["right","left"].indexOf(i),s=o?"top":"left",a=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return r[s]=t[s]+t[l]/2-n[l]/2,r[a]=i===a?t[a]-n[c]:t[M(a)],r}function R(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function z(e,t,i){return(void 0===i?e:e.slice(0,function(e,t,i){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===i}));var n=R(e,(function(e){return e[t]===i}));return e.indexOf(n)}(e,"name",i))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=e.function||e.fn;e.enabled&&o(i)&&(t.offsets.popper=T(t.offsets.popper),t.offsets.reference=T(t.offsets.reference),t=i(t,e))})),t}function U(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=N(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=O(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=j(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=z(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function $(e,t){return e.some((function(e){var i=e.name;return e.enabled&&i===t}))}function H(e){for(var t=[!1,"ms","Webkit","Moz","O"],i=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var r=t[n],o=r?""+r+i:e;if(void 0!==document.body.style[o])return o}return null}function B(){return this.state.isDestroyed=!0,$(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[H("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function q(e){var t=e.ownerDocument;return t?t.defaultView:window}function W(e,t,i,n){i.updateBound=n,q(e).addEventListener("resize",i.updateBound,{passive:!0});var r=l(e);return function e(t,i,n,r){var o="BODY"===t.nodeName,s=o?t.ownerDocument.defaultView:t;s.addEventListener(i,n,{passive:!0}),o||e(l(s.parentNode),i,n,r),r.push(s)}(r,"scroll",i.updateBound,i.scrollParents),i.scrollElement=r,i.eventsEnabled=!0,i}function V(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function Z(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,q(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function K(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Q(e,t){Object.keys(t).forEach((function(i){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&K(t[i])&&(n="px"),e.style[i]=t[i]+n}))}var Y=i&&/Firefox/i.test(navigator.userAgent);function X(e,t,i){var n=R(e,(function(e){return e.name===t})),r=!!n&&e.some((function(e){return e.name===i&&e.enabled&&e.order<n.order}));if(!r){var o="`"+t+"`",s="`"+i+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}var G=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],J=G.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=J.indexOf(e),n=J.slice(i+1).concat(J.slice(0,i));return t?n.reverse():n}var te="flip",ie="clockwise",ne="counterclockwise";function re(e,t,i,n){var r=[0,0],o=-1!==["right","left"].indexOf(n),s=e.split(/(\+|\-)/).map((function(e){return e.trim()})),a=s.indexOf(R(s,(function(e){return-1!==e.search(/,|\s/)})));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return(c=c.map((function(e,n){var r=(1===n?!o:o)?"height":"width",s=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,i,n){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],s=r[2];if(!o)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=i;break;case"%":case"%r":default:a=n}return T(a)[t]/100*o}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(e,r,t,i)}))}))).forEach((function(e,t){e.forEach((function(i,n){K(i)&&(r[t]+=i*("-"===e[n-1]?-1:1))}))})),r}var oe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,i=t.split("-")[0],n=t.split("-")[1];if(n){var r=e.offsets,o=r.reference,s=r.popper,a=-1!==["bottom","top"].indexOf(i),l=a?"left":"top",c=a?"width":"height",u={start:x({},l,o[l]),end:x({},l,o[l]+o[c]-s[c])};e.offsets.popper=E({},s,u[n])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var i=t.offset,n=e.placement,r=e.offsets,o=r.popper,s=r.reference,a=n.split("-")[0],l=void 0;return l=K(+i)?[+i,0]:re(i,o,s,a),"left"===a?(o.top+=l[0],o.left-=l[1]):"right"===a?(o.top+=l[0],o.left+=l[1]):"top"===a?(o.left+=l[0],o.top-=l[1]):"bottom"===a&&(o.left+=l[0],o.top+=l[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var i=t.boundariesElement||f(e.instance.popper);e.instance.reference===i&&(i=f(i));var n=H("transform"),r=e.instance.popper.style,o=r.top,s=r.left,a=r[n];r.top="",r.left="",r[n]="";var l=P(e.instance.popper,e.instance.reference,t.padding,i,e.positionFixed);r.top=o,r.left=s,r[n]=a,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var i=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(i=Math.max(u[e],l[e])),x({},e,i)},secondary:function(e){var i="right"===e?"left":"top",n=u[i];return u[e]>l[e]&&!t.escapeWithReference&&(n=Math.min(u[i],l[e]-("right"===e?u.width:u.height))),x({},i,n)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=E({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,i=t.popper,n=t.reference,r=e.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(r),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return i[a]<o(n[l])&&(e.offsets.popper[l]=o(n[l])-i[c]),i[l]>o(n[a])&&(e.offsets.popper[l]=o(n[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var i;if(!X(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=e.offsets,a=o.popper,l=o.reference,c=-1!==["left","right"].indexOf(r),u=c?"height":"width",d=c?"Top":"Left",h=d.toLowerCase(),f=c?"left":"top",p=c?"bottom":"right",m=L(n)[u];l[p]-m<a[h]&&(e.offsets.popper[h]-=a[h]-(l[p]-m)),l[h]+m>a[p]&&(e.offsets.popper[h]+=l[h]+m-a[p]),e.offsets.popper=T(e.offsets.popper);var g=l[h]+l[u]/2-m/2,v=s(e.instance.popper),_=parseFloat(v["margin"+d]),b=parseFloat(v["border"+d+"Width"]),y=g-e.offsets.popper[h]-_-b;return y=Math.max(Math.min(a[u]-m,y),0),e.arrowElement=n,e.offsets.arrow=(x(i={},h,Math.round(y)),x(i,f,""),i),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if($(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var i=P(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],r=M(n),o=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case te:s=[n,r];break;case ie:s=ee(n);break;case ne:s=ee(n,!0);break;default:s=t.behavior}return s.forEach((function(a,l){if(n!==a||s.length===l+1)return e;n=e.placement.split("-")[0],r=M(n);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,h="left"===n&&d(c.right)>d(u.left)||"right"===n&&d(c.left)<d(u.right)||"top"===n&&d(c.bottom)>d(u.top)||"bottom"===n&&d(c.top)<d(u.bottom),f=d(c.left)<d(i.left),p=d(c.right)>d(i.right),m=d(c.top)<d(i.top),g=d(c.bottom)>d(i.bottom),v="left"===n&&f||"right"===n&&p||"top"===n&&m||"bottom"===n&&g,_=-1!==["top","bottom"].indexOf(n),b=!!t.flipVariations&&(_&&"start"===o&&f||_&&"end"===o&&p||!_&&"start"===o&&m||!_&&"end"===o&&g),y=!!t.flipVariationsByContent&&(_&&"start"===o&&p||_&&"end"===o&&f||!_&&"start"===o&&g||!_&&"end"===o&&m),w=b||y;(h||v||w)&&(e.flipped=!0,(h||v)&&(n=s[l+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=n+(o?"-"+o:""),e.offsets.popper=E({},e.offsets.popper,j(e.instance.popper,e.offsets.reference,e.placement)),e=z(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,i=t.split("-")[0],n=e.offsets,r=n.popper,o=n.reference,s=-1!==["left","right"].indexOf(i),a=-1===["top","left"].indexOf(i);return r[s?"left":"top"]=o[i]-(a?r[s?"width":"height"]:0),e.placement=M(t),e.offsets.popper=T(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!X(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,i=R(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var i=t.x,n=t.y,r=e.offsets.popper,o=R(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:t.gpuAcceleration,a=f(e.instance.popper),l=k(a),c={position:r.position},u=function(e,t){var i=e.offsets,n=i.popper,r=i.reference,o=Math.round,s=Math.floor,a=function(e){return e},l=o(r.width),c=o(n.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),h=t?u||d||l%2==c%2?o:s:a,f=t?o:a;return{left:h(l%2==1&&c%2==1&&!d&&t?n.left-1:n.left),top:f(n.top),bottom:f(n.bottom),right:h(n.right)}}(e,window.devicePixelRatio<2||!Y),d="bottom"===i?"top":"bottom",h="right"===n?"left":"right",p=H("transform"),m=void 0,g=void 0;if(g="bottom"===d?"HTML"===a.nodeName?-a.clientHeight+u.bottom:-l.height+u.bottom:u.top,m="right"===h?"HTML"===a.nodeName?-a.clientWidth+u.right:-l.width+u.right:u.left,s&&p)c[p]="translate3d("+m+"px, "+g+"px, 0)",c[d]=0,c[h]=0,c.willChange="transform";else{var v="bottom"===d?-1:1,_="right"===h?-1:1;c[d]=g*v,c[h]=m*_,c.willChange=d+", "+h}var b={"x-placement":e.placement};return e.attributes=E({},b,e.attributes),e.styles=E({},c,e.styles),e.arrowStyles=E({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,i;return Q(e.instance.popper,e.styles),t=e.instance.popper,i=e.attributes,Object.keys(i).forEach((function(e){!1!==i[e]?t.setAttribute(e,i[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&Q(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,i,n,r){var o=N(r,t,e,i.positionFixed),s=O(i.placement,o,t,e,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",s),Q(t,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},se=function(){function e(t,i){var n=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=r(this.update.bind(this)),this.options=E({},e.Defaults,s),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(E({},e.Defaults.modifiers,s.modifiers)).forEach((function(t){n.options.modifiers[t]=E({},e.Defaults.modifiers[t]||{},s.modifiers?s.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return E({name:e},n.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&o(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)})),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return C(e,[{key:"update",value:function(){return U.call(this)}},{key:"destroy",value:function(){return B.call(this)}},{key:"enableEventListeners",value:function(){return V.call(this)}},{key:"disableEventListeners",value:function(){return Z.call(this)}}]),e}();se.Utils=("undefined"!=typeof window?window:e).PopperUtils,se.placements=G,se.Defaults=oe,t.default=se}.call(this,i(4))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){var n,r,o;
+/*!
+ * bootstrap-fileinput v5.0.8
+ * http://plugins.krajee.com/file-input
+ *
+ * Author: Kartik Visweswaran
+ * Copyright: 2014 - 2019, Kartik Visweswaran, Krajee.com
+ *
+ * Licensed under the BSD-3-Clause
+ * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
+ */!function(s){"use strict";r=[i(0)],void 0===(o="function"==typeof(n=function(e){var t,i;e.fn.fileinputLocales={},e.fn.fileinputThemes={},String.prototype.setTokens=function(e){var t,i,n=this.toString();for(t in e)e.hasOwnProperty(t)&&(i=new RegExp("{"+t+"}","g"),n=n.replace(i,e[t]));return n},t={FRAMES:".kv-preview-thumb",SORT_CSS:"file-sortable",INIT_FLAG:"init-",OBJECT_PARAMS:'<param name="controller" value="true" />\n<param name="allowFullScreen" value="true" />\n<param name="allowScriptAccess" value="always" />\n<param name="autoPlay" value="false" />\n<param name="autoStart" value="false" />\n<param name="quality" value="high" />\n',DEFAULT_PREVIEW:'<div class="file-preview-other">\n<span class="{previewFileIconClass}">{previewFileIcon}</span>\n</div>',MODAL_ID:"kvFileinputModal",MODAL_EVENTS:["show","shown","hide","hidden","loaded"],logMessages:{ajaxError:"{status}: {error}. Error Details: {text}.",badDroppedFiles:"Error scanning dropped files!",badExifParser:"Error loading the piexif.js library. {details}",badInputType:'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.',exifWarning:'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded the "piexif.js" library correctly on your page before the "fileinput.js" script.',invalidChunkSize:'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.',invalidThumb:'Invalid thumb frame with id: "{id}".',noResumableSupport:"The browser does not support resumable or chunk uploads.",noUploadUrl:'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.',retryStatus:"Retrying upload for chunk # {chunk} for {filename}... retry # {retry}."},objUrl:window.URL||window.webkitURL,now:function(){return new Date},round:function(e){return e=parseFloat(e),isNaN(e)?0:Math.floor(Math.round(e))},getFileRelativePath:function(e){return String(e.relativePath||e.webkitRelativePath||t.getFileName(e)||null)},getFileId:function(e,i){var n=t.getFileRelativePath(e);return"function"==typeof i?i(e):e&&n?e.size+"_"+n.replace(/\s/gim,"_"):null},getFrameSelector:function(e,t){return'[id="'+e+'"]'+(t=t||"")},getZoomSelector:function(e,t){return'[id="zoom-'+e+'"]'+(t=t||"")},getFrameElement:function(e,i,n){return e.find(t.getFrameSelector(i,n))},getZoomElement:function(e,i,n){return e.find(t.getZoomSelector(i,n))},getElapsed:function(t){var i=t,n="",r={},o={year:31536e3,month:2592e3,week:604800,day:86400,hour:3600,minute:60,second:1};return Object.keys(o).forEach((function(e){r[e]=Math.floor(i/o[e]),i-=r[e]*o[e]})),e.each(r,(function(e,t){t>0&&(n+=(n?" ":"")+t+e.substring(0,1))})),n},debounce:function(e,t){var i;return function(){var n=arguments,r=this;clearTimeout(i),i=setTimeout((function(){e.apply(r,n)}),t)}},stopEvent:function(e){e.stopPropagation(),e.preventDefault()},getFileName:function(e){return e&&(e.fileName||e.name)||""},createObjectURL:function(e){return t.objUrl&&t.objUrl.createObjectURL&&e?t.objUrl.createObjectURL(e):""},revokeObjectURL:function(e){t.objUrl&&t.objUrl.revokeObjectURL&&e&&t.objUrl.revokeObjectURL(e)},compare:function(e,t,i){return void 0!==e&&(i?e===t:e.match(t))},isIE:function(e){var t,i;return"Microsoft Internet Explorer"===navigator.appName&&(10===e?new RegExp("msie\\s"+e,"i").test(navigator.userAgent):((t=document.createElement("div")).innerHTML="\x3c!--[if IE "+e+"]> <i></i> <![endif]--\x3e",i=t.getElementsByTagName("i").length,document.body.appendChild(t),t.parentNode.removeChild(t),i))},canAssignFilesToInput:function(){var e=document.createElement("input");try{return e.type="file",e.files=null,!0}catch(e){return!1}},getDragDropFolders:function(e){var t,i,n=e?e.length:0,r=0;if(n>0&&e[0].webkitGetAsEntry())for(t=0;t<n;t++)(i=e[t].webkitGetAsEntry())&&i.isDirectory&&r++;return r},initModal:function(t){var i=e("body");i.length&&t.appendTo(i)},isFunction:function(e){return"function"==typeof e},isEmpty:function(i,n){return null==i||!t.isFunction(i)&&(0===i.length||n&&""===e.trim(i))},isArray:function(e){return Array.isArray(e)||"[object Array]"===Object.prototype.toString.call(e)},ifSet:function(e,t,i){return i=i||"",t&&"object"==typeof t&&e in t?t[e]:i},cleanArray:function(e){return e instanceof Array||(e=[]),e.filter((function(e){return null!=e}))},spliceArray:function(t,i,n){var r,o,s=0,a=[];if(!(t instanceof Array))return[];for(o=e.extend(!0,[],t),n&&o.reverse(),r=0;r<o.length;r++)r!==i&&(a[s]=o[r],s++);return n&&a.reverse(),a},getNum:function(e,t){return t=t||0,"number"==typeof e?e:("string"==typeof e&&(e=parseFloat(e)),isNaN(e)?t:e)},hasFileAPISupport:function(){return!(!window.File||!window.FileReader)},hasDragDropSupport:function(){var e=document.createElement("div");return!t.isIE(9)&&(void 0!==e.draggable||void 0!==e.ondragstart&&void 0!==e.ondrop)},hasFileUploadSupport:function(){return t.hasFileAPISupport()&&window.FormData},hasBlobSupport:function(){try{return!!window.Blob&&Boolean(new Blob)}catch(e){return!1}},hasArrayBufferViewSupport:function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(e){return!1}},hasResumableUploadSupport:function(){return t.hasFileUploadSupport()&&t.hasBlobSupport()&&t.hasArrayBufferViewSupport()&&(!!Blob.prototype.webkitSlice||!!Blob.prototype.mozSlice||!!Blob.prototype.slice||!1)},dataURI2Blob:function(e){var i,n,r,o,s,a,l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,c=t.hasBlobSupport();if(!((c||l)&&window.atob&&window.ArrayBuffer&&window.Uint8Array))return null;for(i=e.split(",")[0].indexOf("base64")>=0?atob(e.split(",")[1]):decodeURIComponent(e.split(",")[1]),n=new ArrayBuffer(i.length),r=new Uint8Array(n),o=0;o<i.length;o+=1)r[o]=i.charCodeAt(o);return s=e.split(",")[0].split(":")[1].split(";")[0],c?new Blob([t.hasArrayBufferViewSupport()?r:n],{type:s}):((a=new l).append(n),a.getBlob(s))},arrayBuffer2String:function(e){if(window.TextDecoder)return new TextDecoder("utf-8").decode(e);var t,i,n,r,o=Array.prototype.slice.apply(new Uint8Array(e)),s="",a=0;for(t=o.length;a<t;)switch((i=o[a++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(i);break;case 12:case 13:n=o[a++],s+=String.fromCharCode((31&i)<<6|63&n);break;case 14:n=o[a++],r=o[a++],s+=String.fromCharCode((15&i)<<12|(63&n)<<6|(63&r)<<0)}return s},isHtml:function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=t.childNodes,n=i.length;n--;)if(1===i[n].nodeType)return!0;return!1},isSvg:function(e){return e.match(/^\s*<\?xml/i)&&(e.match(/<!DOCTYPE svg/i)||e.match(/<svg/i))},getMimeType:function(e,t,i){switch(e){case"ffd8ffe0":case"ffd8ffe1":case"ffd8ffe2":return"image/jpeg";case"89504E47":return"image/png";case"47494638":return"image/gif";case"49492a00":return"image/tiff";case"52494646":return"image/webp";case"66747970":return"video/3gp";case"4f676753":return"video/ogg";case"1a45dfa3":return"video/mkv";case"000001ba":case"000001b3":return"video/mpeg";case"3026b275":return"video/wmv";case"25504446":return"application/pdf";case"25215053":return"application/ps";case"504b0304":case"504b0506":case"504b0508":return"application/zip";case"377abcaf":return"application/7z";case"75737461":return"application/tar";case"7801730d":return"application/dmg";default:switch(e.substring(0,6)){case"435753":return"application/x-shockwave-flash";case"494433":return"audio/mp3";case"425a68":return"application/bzip";default:switch(e.substring(0,4)){case"424d":return"image/bmp";case"fffb":return"audio/mp3";case"4d5a":return"application/exe";case"1f9d":case"1fa0":return"application/zip";case"1f8b":return"application/gzip";default:return t&&!t.match(/[^\u0000-\u007f]/)?"application/text-plain":i}}}},addCss:function(e,t){e.removeClass(t).addClass(t)},getElement:function(i,n,r){return t.isEmpty(i)||t.isEmpty(i[n])?r:e(i[n])},uniqId:function(){return Math.round((new Date).getTime())+"_"+Math.round(100*Math.random())},htmlEncode:function(e,t){return void 0===e?t||null:e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")},replaceTags:function(t,i){var n=t;return i?(e.each(i,(function(e,t){"function"==typeof t&&(t=t()),n=n.split(e).join(t)})),n):n},cleanMemory:function(e){var i=e.is("img")?e.attr("src"):e.find("source").attr("src");t.revokeObjectURL(i)},findFileName:function(e){var t=e.lastIndexOf("/");return-1===t&&(t=e.lastIndexOf("\\")),e.split(e.substring(t,t+1)).pop()},checkFullScreen:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},toggleFullScreen:function(e){var i=document,n=i.documentElement;n&&e&&!t.checkFullScreen()?n.requestFullscreen?n.requestFullscreen():n.msRequestFullscreen?n.msRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen&&n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):i.exitFullscreen?i.exitFullscreen():i.msExitFullscreen?i.msExitFullscreen():i.mozCancelFullScreen?i.mozCancelFullScreen():i.webkitExitFullscreen&&i.webkitExitFullscreen()},moveArray:function(t,i,n,r){var o=e.extend(!0,[],t);if(r&&o.reverse(),n>=o.length)for(var s=n-o.length;1+s--;)o.push(void 0);return o.splice(n,0,o.splice(i,1)[0]),r&&o.reverse(),o},cleanZoomCache:function(e){var t=e.closest(".kv-zoom-cache-theme");t.length||(t=e.closest(".kv-zoom-cache")),t.remove()},closeButton:function(e){return'<button type="button" class="'+(e=e?"close "+e:"close")+'" aria-label="Close">\n  <span aria-hidden="true">&times;</span>\n</button>'},getRotation:function(e){switch(e){case 2:return"rotateY(180deg)";case 3:return"rotate(180deg)";case 4:return"rotate(180deg) rotateY(180deg)";case 5:return"rotate(270deg) rotateY(180deg)";case 6:return"rotate(90deg)";case 7:return"rotate(90deg) rotateY(180deg)";case 8:return"rotate(270deg)";default:return""}},setTransform:function(e,t){e&&(e.style.transform=t,e.style.webkitTransform=t,e.style["-moz-transform"]=t,e.style["-ms-transform"]=t,e.style["-o-transform"]=t)}},(i=function(i,n){this.$element=e(i),this.$parent=this.$element.parent(),this._validate()&&(this.isPreviewable=t.hasFileAPISupport(),this.isIE9=t.isIE(9),this.isIE10=t.isIE(10),(this.isPreviewable||this.isIE9)&&(this._init(n),this._listen()),this.$element.removeClass("file-loading"))}).prototype={constructor:i,_cleanup:function(){this.reader=null,this.clearFileStack(),this.fileBatchCompleted=!0,this.isError=!1,this.cancelling=!1,this.paused=!1,this.lastProgress=0,this._initAjax()},_initAjax:function(){this.ajaxQueue=[],this.ajaxRequests=[],this.ajaxQueueIntervalId=null,this.ajaxCurrentThreads=0,this.ajaxAborted=!1},_init:function(i,n){var r,o,s,a,l=this,c=l.$element;l.options=i,e.each(i,(function(e,i){switch(e){case"minFileCount":case"maxFileCount":case"maxTotalFileCount":case"minFileSize":case"maxFileSize":case"maxFilePreviewSize":case"resizeImageQuality":case"resizeIfSizeMoreThan":case"progressUploadThreshold":case"initialPreviewCount":case"zoomModalHeight":case"minImageHeight":case"maxImageHeight":case"minImageWidth":case"maxImageWidth":l[e]=t.getNum(i);break;default:l[e]=i}})),l.maxTotalFileCount>0&&l.maxTotalFileCount<l.maxFileCount&&(l.maxTotalFileCount=l.maxFileCount),l.rtl&&(a=l.previewZoomButtonIcons.prev,l.previewZoomButtonIcons.prev=l.previewZoomButtonIcons.next,l.previewZoomButtonIcons.next=a),!isNaN(l.maxAjaxThreads)&&l.maxAjaxThreads<l.resumableUploadOptions.maxThreads&&(l.resumableUploadOptions.maxThreads=l.maxAjaxThreads),l._initFileManager(),"function"==typeof l.autoOrientImage&&(l.autoOrientImage=l.autoOrientImage()),"function"==typeof l.autoOrientImageInitial&&(l.autoOrientImageInitial=l.autoOrientImageInitial()),n||l._cleanup(),l.duplicateErrors=[],l.$form=c.closest("form"),l._initTemplateDefaults(),l.uploadFileAttr=t.isEmpty(c.attr("name"))?"file_data":c.attr("name"),s=l._getLayoutTemplate("progress"),l.progressTemplate=s.replace("{class}",l.progressClass),l.progressInfoTemplate=s.replace("{class}",l.progressInfoClass),l.progressPauseTemplate=s.replace("{class}",l.progressPauseClass),l.progressCompleteTemplate=s.replace("{class}",l.progressCompleteClass),l.progressErrorTemplate=s.replace("{class}",l.progressErrorClass),l.isDisabled=c.attr("disabled")||c.attr("readonly"),l.isDisabled&&c.attr("disabled",!0),l.isClickable=l.browseOnZoneClick&&l.showPreview&&(l.dropZoneEnabled||!t.isEmpty(l.defaultPreviewContent)),l.isAjaxUpload=t.hasFileUploadSupport()&&!t.isEmpty(l.uploadUrl),l.dropZoneEnabled=t.hasDragDropSupport()&&l.dropZoneEnabled,l.isAjaxUpload||(l.dropZoneEnabled=l.dropZoneEnabled&&t.canAssignFilesToInput()),l.slug="function"==typeof i.slugCallback?i.slugCallback:l._slugDefault,l.mainTemplate=l.showCaption?l._getLayoutTemplate("main1"):l._getLayoutTemplate("main2"),l.captionTemplate=l._getLayoutTemplate("caption"),l.previewGenericTemplate=l._getPreviewTemplate("generic"),!l.imageCanvas&&l.resizeImage&&(l.maxImageWidth||l.maxImageHeight)&&(l.imageCanvas=document.createElement("canvas"),l.imageCanvasContext=l.imageCanvas.getContext("2d")),t.isEmpty(c.attr("id"))&&c.attr("id",t.uniqId()),l.namespace=".fileinput_"+c.attr("id").replace(/-/g,"_"),void 0===l.$container?l.$container=l._createContainer():l._refreshContainer(),o=l.$container,l.$dropZone=o.find(".file-drop-zone"),l.$progress=o.find(".kv-upload-progress"),l.$btnUpload=o.find(".fileinput-upload"),l.$captionContainer=t.getElement(i,"elCaptionContainer",o.find(".file-caption")),l.$caption=t.getElement(i,"elCaptionText",o.find(".file-caption-name")),t.isEmpty(l.msgPlaceholder)||(r=c.attr("multiple")?l.filePlural:l.fileSingle,l.$caption.attr("placeholder",l.msgPlaceholder.replace("{files}",r))),l.$captionIcon=l.$captionContainer.find(".file-caption-icon"),l.$previewContainer=t.getElement(i,"elPreviewContainer",o.find(".file-preview")),l.$preview=t.getElement(i,"elPreviewImage",o.find(".file-preview-thumbnails")),l.$previewStatus=t.getElement(i,"elPreviewStatus",o.find(".file-preview-status")),l.$errorContainer=t.getElement(i,"elErrorContainer",l.$previewContainer.find(".kv-fileinput-error")),l._validateDisabled(),t.isEmpty(l.msgErrorClass)||t.addCss(l.$errorContainer,l.msgErrorClass),n?l._errorsExist()||l.$errorContainer.hide():(l.$errorContainer.hide(),l.previewInitId="thumb-"+c.attr("id"),l._initPreviewCache(),l._initPreview(!0),l._initPreviewActions(),l.$parent.hasClass("file-loading")&&(l.$container.insertBefore(l.$parent),l.$parent.remove())),l._setFileDropZoneTitle(),c.attr("disabled")&&l.disable(),l._initZoom(),l.hideThumbnailContent&&t.addCss(l.$preview,"hide-content")},_initFileManager:function(){var i=this;i.fileManager={stack:{},processed:[],errors:[],loadedImages:{},totalImages:0,totalFiles:null,totalSize:null,uploadedSize:0,stats:{},initStats:function(e){var n={started:t.now().getTime()};e?i.fileManager.stats[e]=n:i.fileManager.stats=n},getUploadStats:function(e,n,r){var o=i.fileManager,s=e&&o.stats[e]&&o.stats[e].started||null;s||(s=t.now().getTime());var a=(t.now().getTime()-s)/1e3,l=a?n/a:0,c={fileId:e,started:s,elapsed:a,loaded:n,total:r,bps:l,bitrate:i._getSize(l,["B/s","KB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"]),pendingBytes:r-n};return e?o.stats[e]=c:o.stats=c,c},exists:function(t){return-1!==e.inArray(t,i.fileManager.getIdList())},count:function(){return i.fileManager.getIdList().length},total:function(){var e=i.fileManager;return e.totalFiles||(e.totalFiles=e.count()),e.totalFiles},getTotalSize:function(){var t=i.fileManager;return t.totalSize||(t.totalSize=0,e.each(i.fileManager.stack,(function(e,i){var n=parseFloat(i.size);t.totalSize+=isNaN(n)?0:n}))),t.totalSize},add:function(e,n){n||(n=i.fileManager.getId(e)),n&&(i.fileManager.stack[n]={file:e,name:t.getFileName(e),relativePath:t.getFileRelativePath(e),size:e.size,nameFmt:i._getFileName(e,""),sizeFmt:i._getSize(e.size)})},remove:function(e){var t=e.attr("data-fileid");t&&i.fileManager.removeFile(t)},removeFile:function(e){delete i.fileManager.stack[e],delete i.fileManager.loadedImages[e]},move:function(t,n){var r={},o=i.fileManager.stack;(t||n)&&t!==n&&(e.each(o,(function(e,i){e!==t&&(r[e]=i),e===n&&(r[t]=o[t])})),i.fileManager.stack=r)},list:function(){var t=[];return e.each(i.fileManager.stack,(function(e,i){i&&i.file&&t.push(i.file)})),t},isPending:function(t){return-1===e.inArray(t,i.fileManager.processed)&&i.fileManager.exists(t)},isProcessed:function(){var t=!0,n=i.fileManager;return e.each(n.stack,(function(e){n.isPending(e)&&(t=!1)})),t},clear:function(){var e=i.fileManager;e.totalFiles=null,e.totalSize=null,e.uploadedSize=0,e.stack={},e.errors=[],e.processed=[],e.stats={},e.clearImages()},clearImages:function(){i.fileManager.loadedImages={},i.fileManager.totalImages=0},addImage:function(e,t){i.fileManager.loadedImages[e]=t},removeImage:function(e){delete i.fileManager.loadedImages[e]},getImageIdList:function(){return Object.keys(i.fileManager.loadedImages)},getImageCount:function(){return i.fileManager.getImageIdList().length},getId:function(e){return i._getFileId(e)},getIndex:function(e){return i.fileManager.getIdList().indexOf(e)},getThumb:function(t){var n=null;return i._getThumbs().each((function(){var i=e(this);i.attr("data-fileid")===t&&(n=i)})),n},getThumbIndex:function(e){var t=e.attr("data-fileid");return i.fileManager.getIndex(t)},getIdList:function(){return Object.keys(i.fileManager.stack)},getFile:function(e){return i.fileManager.stack[e]||null},getFileName:function(e,t){var n=i.fileManager.getFile(e);return n?t?n.nameFmt||"":n.name||"":""},getFirstFile:function(){var e=i.fileManager.getIdList(),t=e&&e.length?e[0]:null;return i.fileManager.getFile(t)},setFile:function(e,t){i.fileManager.getFile(e)?i.fileManager.stack[e].file=t:i.fileManager.add(t,e)},setProcessed:function(e){i.fileManager.processed.push(e)},getProgress:function(){var e=i.fileManager.total(),t=i.fileManager.processed.length;return e?Math.ceil(t/e*100):0},setProgress:function(e,t){var n=i.fileManager.getFile(e);!isNaN(t)&&n&&(n.progress=t)}}},_setUploadData:function(i,n){var r=this;e.each(n,(function(e,n){var o=r.uploadParamNames[e]||e;t.isArray(n)?i.append(o,n[0],n[1]):i.append(o,n)}))},_initResumableUpload:function(){var i=this,n=i.resumableUploadOptions,r=t.logMessages;if(i.enableResumableUpload)if(!1!==n.fallback&&"function"!=typeof n.fallback&&(n.fallback=function(e){e._log(r.noResumableSupport),e.enableResumableUpload=!1}),t.hasResumableUploadSupport()||!1===n.fallback){if(!i.uploadUrl&&i.enableResumableUpload)return i._log(r.noUploadUrl),void(i.enableResumableUpload=!1);if(n.chunkSize=parseFloat(n.chunkSize),n.chunkSize<=0||isNaN(n.chunkSize))return i._log(r.invalidChunkSize,{chunkSize:n.chunkSize}),void(i.enableResumableUpload=!1);i.resumableManager={init:function(e,t,n){var r=i.resumableManager,o=i.fileManager;r.currThreads=0,r.logs=[],r.stack=[],r.error="",r.chunkIntervalId=null,r.id=e,r.file=t.file,r.fileName=t.name,r.fileIndex=n,r.completed=!1,r.testing=!1,r.lastProgress=0,i.showPreview&&(r.$thumb=o.getThumb(e)||null,r.$progress=r.$btnDelete=null,r.$thumb&&r.$thumb.length&&(r.$progress=r.$thumb.find(".file-thumb-progress"),r.$btnDelete=r.$thumb.find(".kv-file-remove"))),r.chunkSize=1024*i.resumableUploadOptions.chunkSize,r.chunkCount=r.getTotalChunks()},logAjaxError:function(e,t,n){i.resumableUploadOptions.showErrorLog&&i._log(r.ajaxError,{status:e.status,error:n,text:e.responseText||""})},reset:function(){i.resumableManager.processed={}},setProcessed:function(e){var t,n=i.resumableManager,r=i.fileManager,o=n.id,s=n.$thumb,a=n.$progress,l=s&&s.length,c={id:l?s.attr("id"):"",index:r.getIndex(o),fileId:o};n.completed=!0,n.lastProgress=0,r.uploadedSize+=n.file.size,l&&s.removeClass("file-uploading"),"success"===e?(i.showPreview&&(i._setProgress(101,a),i._setThumbStatus(s,"Success"),i._initUploadSuccess(n.processed[o].data,s)),i.fileManager.removeFile(o),delete n.processed[o],i._raise("fileuploaded",[c.id,c.index,c.fileId]),r.isProcessed()&&i._setProgress(101)):(i.showPreview&&(i._setThumbStatus(s,"Error"),i._setPreviewError(s,!0),i._setProgress(101,a,i.msgProgressError),i._setProgress(101,i.$progress,i.msgProgressError),i.cancelling=!0),i.$errorContainer.find('li[data-file-id="'+c.fileId+'"]').length||(t=i.msgResumableUploadRetriesExceeded.setTokens({file:n.fileName,max:i.resumableUploadOptions.maxRetries,error:n.error}),i._showFileError(t,c))),r.isProcessed()&&n.reset()},check:function(){var t=i.resumableManager,n=!0;e.each(t.logs,(function(e,t){if(!t)return n=!1,!1})),n&&(clearInterval(t.chunkIntervalId),t.setProcessed("success"))},processedResumables:function(){var e,t=i.resumableManager.logs,n=0;if(!t||!t.length)return 0;for(e=0;e<t.length;e++)!0===t[e]&&n++;return n},getUploadedSize:function(){var e=i.resumableManager,t=e.processedResumables()*e.chunkSize;return t>e.file.size?e.file.size:t},getTotalChunks:function(){var e=i.resumableManager,t=parseFloat(e.chunkSize);return!isNaN(t)&&t>0?Math.ceil(e.file.size/t):0},getProgress:function(){var e=i.resumableManager,t=e.processedResumables(),n=e.chunkCount;return 0===n?0:Math.ceil(t/n*100)},checkAborted:function(e){(i.paused||i.cancelling)&&(clearInterval(e),i.unlock())},upload:function(){var e,n=i.resumableManager,r=i.fileManager,o=r.getIdList(),s="new";e=setInterval((function(){var a;if(n.checkAborted(e),"new"===s&&(i.lock(),s="processing",a=o.shift(),r.initStats(a),r.stack[a]&&(n.init(a,r.stack[a],r.getIndex(a)),n.testUpload(),n.uploadResumable())),!r.isPending(a)&&n.completed&&(s="new"),r.isProcessed()){var l=i.$preview.find(".file-preview-initial");l.length&&(t.addCss(l,t.SORT_CSS),i._initSortable()),clearInterval(e),i._clearFileInput(),i.unlock(),setTimeout((function(){var e=i.previewCache.data;e&&(i.initialPreview=e.content,i.initialPreviewConfig=e.config,i.initialPreviewThumbTags=e.tags),i._raise("filebatchuploadcomplete",[i.initialPreview,i.initialPreviewConfig,i.initialPreviewThumbTags,i._getExtraData()])}),i.processDelay)}}),i.processDelay)},uploadResumable:function(){var e,t=i.resumableManager,n=t.chunkCount;for(e=0;e<n;e++)t.logs[e]=!(!t.processed[t.id]||!t.processed[t.id][e]);for(e=0;e<n;e++)t.pushAjax(e,0);t.chunkIntervalId=setInterval(t.loopAjax,i.queueDelay)},testUpload:function(){var n,r,o,s,a,l,c,u=i.resumableManager,d=i.resumableUploadOptions,h=i.fileManager,f=u.id;d.testUrl?(u.testing=!0,n=new FormData,r=h.stack[f],i._setUploadData(n,{fileId:f,fileName:r.fileName,fileSize:r.size,fileRelativePath:r.relativePath,chunkSize:u.chunkSize,chunkCount:u.chunkCount}),o=function(e){c=i._getOutData(n,e),i._raise("filetestbeforesend",[f,h,u,c])},s=function(r,o,s){c=i._getOutData(n,s,r);var a=i.uploadParamNames.chunksUploaded||"chunksUploaded",l=[f,h,u,c];r[a]&&t.isArray(r[a])?(u.processed[f]||(u.processed[f]={}),e.each(r[a],(function(e,t){u.logs[t]=!0,u.processed[f][t]=!0})),u.processed[f].data=r,i._raise("filetestsuccess",l)):i._raise("filetesterror",l),u.testing=!1},a=function(e,t,r){c=i._getOutData(n,e),i._raise("filetestajaxerror",[f,h,u,c]),u.logAjaxError(e,t,r),u.testing=!1},l=function(){i._raise("filetestcomplete",[f,h,u,i._getOutData(n)]),u.testing=!1},i._ajaxSubmit(o,s,l,a,n,f,u.fileIndex,d.testUrl)):u.testing=!1},pushAjax:function(e,t){i.resumableManager.stack.push([e,t])},sendAjax:function(e,n){var o,s=i.fileManager,a=i.resumableManager,l=i.resumableUploadOptions,c=a.chunkSize,u=a.id,d=a.file,h=a.$thumb,f=a.$btnDelete;if(!a.processed[u]||!a.processed[u][e])if(a.currThreads++,n>l.maxRetries)a.setProcessed("error");else{var p,m,g,v,_,b,y=d[d.slice?"slice":d.mozSlice?"mozSlice":d.webkitSlice?"webkitSlice":"slice"](c*e,c*(e+1));p=new FormData,o=s.stack[u],i._setUploadData(p,{chunkCount:a.chunkCount,chunkIndex:e,chunkSize:c,chunkSizeStart:c*e,fileBlob:[y,a.fileName],fileId:u,fileName:a.fileName,fileRelativePath:o.relativePath,fileSize:d.size,retryCount:n}),a.$progress&&a.$progress.length&&a.$progress.show(),g=function(r){m=i._getOutData(p,r),i.showPreview&&(h.hasClass("file-preview-success")||(i._setThumbStatus(h,"Loading"),t.addCss(h,"file-uploading")),f.attr("disabled",!0)),i._raise("filechunkbeforesend",[u,e,n,s,a,m])},v=function(t,o,l){m=i._getOutData(p,l,t);var c=i.uploadParamNames.chunkIndex||"chunkIndex",d=i.resumableUploadOptions,h=[u,e,n,s,a,m];a.currThreads--,t.error?(d.showErrorLog&&i._log(r.retryStatus,{retry:n+1,filename:a.fileName,chunk:e}),a.pushAjax(e,n+1),a.error=t.error,i._raise("filechunkerror",h)):(a.logs[t[c]]=!0,a.processed[u]||(a.processed[u]={}),a.processed[u][t[c]]=!0,a.processed[u].data=t,i._raise("filechunksuccess",h),a.check())},_=function(t,r,o){m=i._getOutData(p,t),a.currThreads--,a.error=o,a.logAjaxError(t,r,o),i._raise("filechunkajaxerror",[u,e,n,s,a,m]),a.pushAjax(e,n+1)},b=function(){i._raise("filechunkcomplete",[u,e,n,s,a,i._getOutData(p)])},i._ajaxSubmit(g,v,b,_,p,u,a.fileIndex)}},loopAjax:function(){var e=i.resumableManager;if(e.currThreads<i.resumableUploadOptions.maxThreads&&!e.testing){var t,n=e.stack.shift();void 0!==n&&(t=n[0],e.processed[e.id]&&e.processed[e.id][t]?e.processedResumables()>=e.getTotalChunks()&&(e.setProcessed("success"),clearInterval(e.chunkIntervalId)):e.sendAjax(t,n[1]))}}},i.resumableManager.reset()}else n.fallback(i)},_initTemplateDefaults:function(){var i,n,r,o,s,a,l,c,u,d,h=this;i=t.closeButton("fileinput-remove"),n='<div id="'+t.MODAL_ID+'" class="file-zoom-dialog modal fade" tabindex="-1" aria-labelledby="'+t.MODAL_ID+'Label"></div>',r='<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-fileid="{fileid}" data-template="{template}"',u=" {style}",o='<video class="kv-preview-data file-preview-video" controls'+u+'>\n<source src="{data}" type="{type}">\n'+t.DEFAULT_PREVIEW+"\n</video>\n",s='\x3c!--suppress ALL --\x3e<audio class="kv-preview-data file-preview-audio" controls'+u+'>\n<source src="{data}" type="{type}">\n'+t.DEFAULT_PREVIEW+"\n</audio>\n",l='<embed class="kv-preview-data file-preview-pdf" src="{data}" type="application/pdf"'+u+">\n",a='<object class="kv-preview-data file-preview-object file-object {typeCss}" data="{data}" type="{type}"'+u+'>\n<param name="movie" value="{caption}" />\n'+t.OBJECT_PARAMS+" "+t.DEFAULT_PREVIEW+"\n</object>\n",c='<div class="kv-preview-data file-preview-other-frame"'+u+">\n"+t.DEFAULT_PREVIEW+"\n</div>\n",d={width:"100%",height:"100%","min-height":"480px"},h._isPdfRendered()&&(l=h.pdfRendererTemplate.replace("{renderer}",h._encodeURI(h.pdfRendererUrl))),h.defaults={layoutTemplates:{main1:'{preview}\n<div class="kv-upload-progress kv-hidden"></div><div class="clearfix"></div>\n<div class="input-group {class}">\n  {caption}\n<div class="input-group-btn input-group-append">\n      {remove}\n      {cancel}\n      {pause}\n      {upload}\n      {browse}\n    </div>\n</div>',main2:'{preview}\n<div class="kv-upload-progress kv-hidden"></div>\n<div class="clearfix"></div>\n{remove}\n{cancel}\n{upload}\n{browse}\n',preview:'<div class="file-preview {class}">\n  {close}  <div class="{dropClass} clearfix">\n    <div class="file-preview-thumbnails clearfix">\n    </div>\n    <div class="file-preview-status text-center text-success"></div>\n    <div class="kv-fileinput-error"></div>\n  </div>\n</div>',close:i,fileIcon:'<i class="glyphicon glyphicon-file"></i>',caption:'<div class="file-caption form-control {class}" tabindex="500">\n  <span class="file-caption-icon"></span>\n  <input class="file-caption-name" onkeydown="return false;" onpaste="return false;">\n</div>',modalMain:n,modal:'<div class="modal-dialog modal-lg{rtl}" role="document">\n  <div class="modal-content">\n    <div class="modal-header">\n      <h5 class="modal-title">{heading}</h5>\n      <span class="kv-zoom-title"></span>\n      <div class="kv-zoom-actions">{toggleheader}{fullscreen}{borderless}{close}</div>\n    </div>\n    <div class="modal-body">\n      <div class="floating-buttons"></div>\n      <div class="kv-zoom-body file-zoom-content {zoomFrameClass}"></div>\n{prev} {next}\n    </div>\n  </div>\n</div>\n',progress:'<div class="progress">\n    <div class="{class}" role="progressbar" aria-valuenow="{percent}" aria-valuemin="0" aria-valuemax="100" style="width:{percent}%;">\n        {status}\n     </div>\n</div>{stats}',stats:'<div class="text-info file-upload-stats"><span class="pending-time">{pendingTime}</span> <span class="upload-speed">{uploadSpeed}</span></div>',size:" <samp>({sizeText})</samp>",footer:'<div class="file-thumbnail-footer">\n    <div class="file-footer-caption" title="{caption}">\n        <div class="file-caption-info">{caption}</div>\n        <div class="file-size-info">{size}</div>\n    </div>\n    {progress}\n{indicator}\n{actions}\n</div>',indicator:'<div class="file-upload-indicator" title="{indicatorTitle}">{indicator}</div>',actions:'<div class="file-actions">\n    <div class="file-footer-buttons">\n        {download} {upload} {delete} {zoom} {other}    </div>\n</div>\n{drag}\n<div class="clearfix"></div>',actionDelete:'<button type="button" class="kv-file-remove {removeClass}" title="{removeTitle}" {dataUrl}{dataKey}>{removeIcon}</button>\n',actionUpload:'<button type="button" class="kv-file-upload {uploadClass}" title="{uploadTitle}">{uploadIcon}</button>',actionDownload:'<a class="kv-file-download {downloadClass}" title="{downloadTitle}" href="{downloadUrl}" download="{caption}" target="_blank">{downloadIcon}</a>',actionZoom:'<button type="button" class="kv-file-zoom {zoomClass}" title="{zoomTitle}">{zoomIcon}</button>',actionDrag:'<span class="file-drag-handle {dragClass}" title="{dragTitle}">{dragIcon}</span>',btnDefault:'<button type="{type}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</button>',btnLink:'<a href="{href}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</a>',btnBrowse:'<div tabindex="500" class="{css}" {status}>{icon} {label}</div>',zoomCache:'<div class="kv-zoom-cache" style="display:none">{zoomContent}</div>'},previewMarkupTags:{tagBefore1:'<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-fileid="{fileid}" data-template="{template}"><div class="kv-file-content">\n',tagBefore2:'<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-fileid="{fileid}" data-template="{template}" title="{caption}"><div class="kv-file-content">\n',tagAfter:"</div>{footer}\n</div>\n"},previewContentTemplates:{generic:"{content}\n",html:'<div class="kv-preview-data file-preview-html" title="{caption}" {style}>{data}</div>\n',image:'<img src="{data}" class="file-preview-image kv-preview-data" title="{title}" alt="{alt}" {style}>\n',text:'<textarea class="kv-preview-data file-preview-text" title="{caption}" readonly {style}>{data}</textarea>\n',office:'<iframe class="kv-preview-data file-preview-office" src="https://view.officeapps.live.com/op/embed.aspx?src={data}" {style}></iframe>',gdocs:'<iframe class="kv-preview-data file-preview-gdocs" src="https://docs.google.com/gview?url={data}&embedded=true" {style}></iframe>',video:o,audio:s,flash:'<embed class="kv-preview-data file-preview-flash" src="{data}" type="application/x-shockwave-flash" {style}>\n',object:a,pdf:l,other:c},allowedPreviewTypes:["image","html","text","video","audio","flash","pdf","object"],previewTemplates:{},previewSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"213px",height:"160px"},text:{width:"213px",height:"160px"},office:{width:"213px",height:"160px"},gdocs:{width:"213px",height:"160px"},video:{width:"213px",height:"160px"},audio:{width:"100%",height:"30px"},flash:{width:"213px",height:"160px"},object:{width:"213px",height:"160px"},pdf:{width:"100%",height:"160px",position:"relative"},other:{width:"213px",height:"160px"}},previewSettingsSmall:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:{width:"100%",height:"160px"},text:{width:"100%",height:"160px"},office:{width:"100%",height:"160px"},gdocs:{width:"100%",height:"160px"},video:{width:"100%",height:"auto"},audio:{width:"100%",height:"30px"},flash:{width:"100%",height:"auto"},object:{width:"100%",height:"auto"},pdf:{width:"100%",height:"160px"},other:{width:"100%",height:"160px"}},previewZoomSettings:{image:{width:"auto",height:"auto","max-width":"100%","max-height":"100%"},html:d,text:d,office:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},gdocs:{width:"100%",height:"100%","max-width":"100%","min-height":"480px"},video:{width:"auto",height:"100%","max-width":"100%"},audio:{width:"100%",height:"30px"},flash:{width:"auto",height:"480px"},object:{width:"auto",height:"100%","max-width":"100%","min-height":"480px"},pdf:d,other:{width:"auto",height:"100%","min-height":"480px"}},mimeTypeAliases:{"video/quicktime":"video/mp4"},fileTypeSettings:{image:function(e,i){return t.compare(e,"image.*")&&!t.compare(e,/(tiff?|wmf)$/i)||t.compare(i,/\.(gif|png|jpe?g)$/i)},html:function(e,i){return t.compare(e,"text/html")||t.compare(i,/\.(htm|html)$/i)},office:function(e,i){return t.compare(e,/(word|excel|powerpoint|office)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?)$/i)},gdocs:function(e,i){return t.compare(e,/(word|excel|powerpoint|office|iwork-pages|tiff?)$/i)||t.compare(i,/\.(docx?|xlsx?|pptx?|pps|potx?|rtf|ods|odt|pages|ai|dxf|ttf|tiff?|wmf|e?ps)$/i)},text:function(e,i){return t.compare(e,"text.*")||t.compare(i,/\.(xml|javascript)$/i)||t.compare(i,/\.(txt|md|csv|nfo|ini|json|php|js|css)$/i)},video:function(e,i){return t.compare(e,"video.*")&&(t.compare(e,/(ogg|mp4|mp?g|mov|webm|3gp)$/i)||t.compare(i,/\.(og?|mp4|webm|mp?g|mov|3gp)$/i))},audio:function(e,i){return t.compare(e,"audio.*")&&(t.compare(i,/(ogg|mp3|mp?g|wav)$/i)||t.compare(i,/\.(og?|mp3|mp?g|wav)$/i))},flash:function(e,i){return t.compare(e,"application/x-shockwave-flash",!0)||t.compare(i,/\.(swf)$/i)},pdf:function(e,i){return t.compare(e,"application/pdf",!0)||t.compare(i,/\.(pdf)$/i)},object:function(){return!0},other:function(){return!0}},fileActionSettings:{showRemove:!0,showUpload:!0,showDownload:!0,showZoom:!0,showDrag:!0,removeIcon:'<i class="glyphicon glyphicon-trash"></i>',removeClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",removeErrorClass:"btn btn-sm btn-kv btn-danger",removeTitle:"Remove file",uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',uploadClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",uploadTitle:"Upload file",uploadRetryIcon:'<i class="glyphicon glyphicon-repeat"></i>',uploadRetryTitle:"Retry upload",downloadIcon:'<i class="glyphicon glyphicon-download"></i>',downloadClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",downloadTitle:"Download file",zoomIcon:'<i class="glyphicon glyphicon-zoom-in"></i>',zoomClass:"btn btn-sm btn-kv btn-default btn-outline-secondary",zoomTitle:"View Details",dragIcon:'<i class="glyphicon glyphicon-move"></i>',dragClass:"text-info",dragTitle:"Move / Rearrange",dragSettings:{},indicatorNew:'<i class="glyphicon glyphicon-plus-sign text-warning"></i>',indicatorSuccess:'<i class="glyphicon glyphicon-ok-sign text-success"></i>',indicatorError:'<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',indicatorLoading:'<i class="glyphicon glyphicon-hourglass text-muted"></i>',indicatorPaused:'<i class="glyphicon glyphicon-pause text-primary"></i>',indicatorNewTitle:"Not uploaded yet",indicatorSuccessTitle:"Uploaded",indicatorErrorTitle:"Upload Error",indicatorLoadingTitle:"Uploading ...",indicatorPausedTitle:"Upload Paused"}},e.each(h.defaults,(function(t,i){"allowedPreviewTypes"!==t?h[t]=e.extend(!0,{},i,h[t]):void 0===h.allowedPreviewTypes&&(h.allowedPreviewTypes=i)})),h._initPreviewTemplates()},_initPreviewTemplates:function(){var i,n=this,r=n.previewMarkupTags,o=r.tagAfter;e.each(n.previewContentTemplates,(function(e,s){t.isEmpty(n.previewTemplates[e])&&(i=r.tagBefore2,"generic"!==e&&"image"!==e&&"html"!==e&&"text"!==e||(i=r.tagBefore1),n._isPdfRendered()&&"pdf"===e&&(i=i.replace("kv-file-content","kv-file-content kv-pdf-rendered")),n.previewTemplates[e]=i+s+o)}))},_initPreviewCache:function(){var i=this;i.previewCache={data:{},init:function(){var e=i.initialPreview;e.length>0&&!t.isArray(e)&&(e=e.split(i.initialPreviewDelimiter)),i.previewCache.data={content:e,config:i.initialPreviewConfig,tags:i.initialPreviewThumbTags}},count:function(e){return i.previewCache.data&&i.previewCache.data.content?e?i.previewCache.data.content.filter((function(e){return null!==e})).length:i.previewCache.data.content.length:0},get:function(n,r){var o,s,a,l,c,u,d,h=t.INIT_FLAG+n,f=i.previewCache.data,p=f.config[n],m=f.content[n],g=t.ifSet("previewAsData",p,i.initialPreviewAsData),v=p?{title:p.title||null,alt:p.alt||null}:{title:null,alt:null},_=function(e,n,r,o,s,a,l,c){var u=" file-preview-initial "+t.SORT_CSS+(l?" "+l:""),d=i.previewInitId+"-"+a,h=p&&p.fileId||d;return i._generatePreviewTemplate(e,n,r,o,d,h,!1,null,u,s,a,c,v,p&&p.zoomData||n)};return m&&m.length?(r=void 0===r||r,a=t.ifSet("type",p,i.initialPreviewFileType||"generic"),c=t.ifSet("filename",p,t.ifSet("caption",p)),u=t.ifSet("filetype",p,a),l=i.previewCache.footer(n,r,p&&p.size||null),d=t.ifSet("frameClass",p),o=g?_(a,m,c,u,l,h,d):_("generic",m,c,u,l,h,d,a).setTokens({content:f.content[n]}),f.tags.length&&f.tags[n]&&(o=t.replaceTags(o,f.tags[n])),t.isEmpty(p)||t.isEmpty(p.frameAttr)||((s=e(document.createElement("div")).html(o)).find(".file-preview-initial").attr(p.frameAttr),o=s.html(),s.remove()),o):""},clean:function(e){e.content=t.cleanArray(e.content),e.config=t.cleanArray(e.config),e.tags=t.cleanArray(e.tags),i.previewCache.data=e},add:function(e,n,r,o){var s,a=i.previewCache.data;return e&&e.length?(s=e.length-1,t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),o&&a.content&&a.content.length?(s=a.content.push(e[0])-1,a.config[s]=n,a.tags[s]=r):(a.content=e,a.config=n,a.tags=r),i.previewCache.clean(a),s):0},set:function(e,n,r,o){var s,a=i.previewCache.data;if(e&&e.length&&(t.isArray(e)||(e=e.split(i.initialPreviewDelimiter)),e.filter((function(e){return null!==e})).length)){if(void 0===a.content&&(a.content=[]),void 0===a.config&&(a.config=[]),void 0===a.tags&&(a.tags=[]),o){for(s=0;s<e.length;s++)e[s]&&a.content.push(e[s]);for(s=0;s<n.length;s++)n[s]&&a.config.push(n[s]);for(s=0;s<r.length;s++)r[s]&&a.tags.push(r[s])}else a.content=e,a.config=n,a.tags=r;i.previewCache.clean(a)}},unset:function(n){var r=i.previewCache.count(),o=i.reversePreviewOrder;if(r){if(1===r)return i.previewCache.data.content=[],i.previewCache.data.config=[],i.previewCache.data.tags=[],i.initialPreview=[],i.initialPreviewConfig=[],void(i.initialPreviewThumbTags=[]);i.previewCache.data.content=t.spliceArray(i.previewCache.data.content,n,o),i.previewCache.data.config=t.spliceArray(i.previewCache.data.config,n,o),i.previewCache.data.tags=t.spliceArray(i.previewCache.data.tags,n,o);var s=e.extend(!0,{},i.previewCache.data);i.previewCache.clean(s)}},out:function(){var e,t,n="",r=i.previewCache.count();if(0===r)return{content:"",caption:""};for(e=0;e<r;e++)t=i.previewCache.get(e),n=i.reversePreviewOrder?t+n:n+t;return{content:n,caption:i._getMsgSelected(r)}},footer:function(e,n,r){var o=i.previewCache.data||{};if(t.isEmpty(o.content))return"";(t.isEmpty(o.config)||t.isEmpty(o.config[e]))&&(o.config[e]={}),n=void 0===n||n;var s,a=o.config[e],l=t.ifSet("caption",a),c=t.ifSet("width",a,"auto"),u=t.ifSet("url",a,!1),d=t.ifSet("key",a,null),h=t.ifSet("fileId",a,null),f=i.fileActionSettings,p=i.initialPreviewShowDelete||!1,m=i.initialPreviewDownloadUrl?i.initialPreviewDownloadUrl+"?key="+d+(h?"&fileId="+h:""):"",g=a.downloadUrl||m,v=a.filename||a.caption||"",_=!!g,b=t.ifSet("showRemove",a,p),y=t.ifSet("showDownload",a,t.ifSet("showDownload",f,_)),w=t.ifSet("showZoom",a,t.ifSet("showZoom",f,!0)),C=t.ifSet("showDrag",a,t.ifSet("showDrag",f,!0)),x=!1===u&&n;return y=y&&!1!==a.downloadUrl&&!!g,s=i._renderFileActions(a,!1,y,b,w,C,x,u,d,!0,g,v),i._getLayoutTemplate("footer").setTokens({progress:i._renderThumbProgress(),actions:s,caption:l,size:i._getSize(r),width:c,indicator:""})}},i.previewCache.init()},_isPdfRendered:function(){var e=this.usePdfRenderer;return("function"==typeof e?e():!!e)&&this.pdfRendererUrl},_handler:function(e,t,i){var n=this.namespace,r=t.split(" ").join(n+" ")+n;e&&e.length&&e.off(r).on(r,i)},_encodeURI:function(e){return this.encodeUrl?encodeURI(e):e},_log:function(e,t){var i=this.$element.attr("id");this.showConsoleLogs&&(i&&(e='"'+i+'": '+e),e="bootstrap-fileinput: "+e,"object"==typeof t&&(e=e.setTokens(t)),window.console&&void 0!==window.console.log?window.console.log(e):window.alert(e))},_validate:function(){var e="file"===this.$element.attr("type");return e||this._log(t.logMessages.badInputType),e},_errorsExist:function(){var t;return!!this.$errorContainer.find("li").length||((t=e(document.createElement("div")).html(this.$errorContainer.html())).find(".kv-error-close").remove(),t.find("ul").remove(),!!e.trim(t.text()).length)},_errorHandler:function(e,t){var i=this,n=e.target.error,r=function(e){i._showError(e.replace("{name}",t))};n.code===n.NOT_FOUND_ERR?r(i.msgFileNotFound):n.code===n.SECURITY_ERR?r(i.msgFileSecured):n.code===n.NOT_READABLE_ERR?r(i.msgFileNotReadable):n.code===n.ABORT_ERR?r(i.msgFilePreviewAborted):r(i.msgFilePreviewError)},_addError:function(e){var t=this,i=t.$errorContainer;e&&i.length&&(i.html(t.errorCloseButton+e),t._handler(i.find(".kv-error-close"),"click",(function(){setTimeout((function(){t.showPreview&&!t.getFrames().length&&t.clear(),i.fadeOut("slow")}),t.processDelay)})))},_setValidationError:function(e){e=(e?e+" ":"")+"has-error",this.$container.removeClass(e).addClass("has-error"),t.addCss(this.$captionContainer,"is-invalid")},_resetErrors:function(e){var t=this.$errorContainer;this.isError=!1,this.$container.removeClass("has-error"),this.$captionContainer.removeClass("is-invalid"),t.html(""),e?t.fadeOut("slow"):t.hide()},_showFolderError:function(e){var t,i=this.$errorContainer;e&&(this.isAjaxUpload||this._clearFileInput(),t=this.msgFoldersNotAllowed.replace("{n}",e),this._addError(t),this._setValidationError(),i.fadeIn(this.fadeDelay),this._raise("filefoldererror",[e,t]))},_showFileError:function(e,t,i){var n=this.$errorContainer,r=i||"fileuploaderror",o=t&&t.fileId||"",s=t&&t.id?'<li data-thumb-id="'+t.id+'" data-file-id="'+o+'">'+e+"</li>":"<li>"+e+"</li>";return 0===n.find("ul").length?this._addError("<ul>"+s+"</ul>"):n.find("ul").append(s),n.fadeIn(this.fadeDelay),this._raise(r,[t,e]),this._setValidationError("file-input-new"),!0},_showError:function(e,t,i){var n=this.$errorContainer,r=i||"fileerror";return(t=t||{}).reader=this.reader,this._addError(e),n.fadeIn(this.fadeDelay),this._raise(r,[t,e]),this.isAjaxUpload||this._clearFileInput(),this._setValidationError("file-input-new"),this.$btnUpload.attr("disabled",!0),!0},_noFilesError:function(e){var t=this.minFileCount>1?this.filePlural:this.fileSingle,i=this.msgFilesTooLess.replace("{n}",this.minFileCount).replace("{files}",t),n=this.$errorContainer;i="<li>"+i+"</li>",0===n.find("ul").length?this._addError("<ul>"+i+"</ul>"):n.find("ul").append(i),this.isError=!0,this._updateFileDetails(0),n.fadeIn(this.fadeDelay),this._raise("fileerror",[e,i]),this._clearFileInput(),this._setValidationError()},_parseError:function(t,i,n,r){var o,s=e.trim(n+""),a=void 0!==i.responseJSON&&void 0!==i.responseJSON.error?i.responseJSON.error:i.responseText;return this.cancelling&&this.msgUploadAborted&&(s=this.msgUploadAborted),this.showAjaxErrorDetails&&a&&(o=(a=e.trim(a.replace(/\n\s*\n/g,"\n"))).length?"<pre>"+a+"</pre>":"",s+=s?o:a),s||(s=this.msgAjaxError.replace("{operation}",t)),this.cancelling=!1,r?"<b>"+r+": </b>"+s:s},_parseFileType:function(e,i){var n,r,o,s=this.allowedPreviewTypes||[];if("application/text-plain"===e)return"text";for(o=0;o<s.length;o++)if(r=s[o],n=(0,this.fileTypeSettings[r])(e,i)?r:"",!t.isEmpty(n))return n;return"other"},_getPreviewIcon:function(t){var i,n=this,r=null;return t&&t.indexOf(".")>-1&&(i=t.split(".").pop(),n.previewFileIconSettings&&(r=n.previewFileIconSettings[i]||n.previewFileIconSettings[i.toLowerCase()]||null),n.previewFileExtSettings&&e.each(n.previewFileExtSettings,(function(e,t){n.previewFileIconSettings[e]&&t(i)&&(r=n.previewFileIconSettings[e])}))),r||n.previewFileIcon},_parseFilePreviewIcon:function(e,t){var i=this._getPreviewIcon(t),n=e;return n.indexOf("{previewFileIcon}")>-1&&(n=n.setTokens({previewFileIconClass:this.previewFileIconClass,previewFileIcon:i})),n},_raise:function(t,i){var n=e.Event(t);if(void 0!==i?this.$element.trigger(n,i):this.$element.trigger(n),n.isDefaultPrevented()||!1===n.result)return!1;switch(t){case"filebatchuploadcomplete":case"filebatchuploadsuccess":case"fileuploaded":case"fileclear":case"filecleared":case"filereset":case"fileerror":case"filefoldererror":case"fileuploaderror":case"filebatchuploaderror":case"filedeleteerror":case"filecustomerror":case"filesuccessremove":break;default:this.ajaxAborted||(this.ajaxAborted=n.result)}return!0},_listenFullScreen:function(e){var t,i,n=this.$modal;n&&n.length&&(t=n&&n.find(".btn-fullscreen"),i=n&&n.find(".btn-borderless"),t.length&&i.length&&(t.removeClass("active").attr("aria-pressed","false"),i.removeClass("active").attr("aria-pressed","false"),e?t.addClass("active").attr("aria-pressed","true"):i.addClass("active").attr("aria-pressed","true"),n.hasClass("file-zoom-fullscreen")||e?this._maximizeZoomDialog():i.removeClass("active").attr("aria-pressed","false")))},_listen:function(){var i=this,n=i.$element,r=i.$form,o=i.$container;i._handler(n,"click",(function(e){n.hasClass("file-no-browse")&&(n.data("zoneClicked")?n.data("zoneClicked",!1):e.preventDefault())})),i._handler(n,"change",e.proxy(i._change,i)),i.showBrowse&&i._handler(i.$btnFile,"click",e.proxy(i._browse,i)),i._handler(o.find(".fileinput-remove:not([disabled])"),"click",e.proxy(i.clear,i)),i._handler(o.find(".fileinput-cancel"),"click",e.proxy(i.cancel,i)),i._handler(o.find(".fileinput-pause"),"click",e.proxy(i.pause,i)),i._initDragDrop(),i._handler(r,"reset",e.proxy(i.clear,i)),i.isAjaxUpload||i._handler(r,"submit",e.proxy(i._submitForm,i)),i._handler(i.$container.find(".fileinput-upload"),"click",e.proxy(i._uploadClick,i)),i._handler(e(window),"resize",(function(){i._listenFullScreen(screen.width===window.innerWidth&&screen.height===window.innerHeight)})),i._handler(e(document),"webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange",(function(){i._listenFullScreen(t.checkFullScreen())})),i._autoFitContent(),i._initClickable(),i._refreshPreview()},_autoFitContent:function(){var t,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=this,r=i<400?n.previewSettingsSmall||n.defaults.previewSettingsSmall:n.previewSettings||n.defaults.previewSettings;e.each(r,(function(e,i){t=".file-preview-frame .file-preview-"+e,n.$preview.find(t+".kv-preview-data,"+t+" .kv-preview-data").css(i)}))},_scanDroppedItems:function(e,i,n){n=n||"";var r,o,s,a=this,l=function(e){a._log(t.logMessages.badDroppedFiles),a._log(e)};e.isFile?e.file((function(e){i.push(e)}),l):e.isDirectory&&(o=e.createReader(),(s=function(){o.readEntries((function(t){if(t&&t.length>0){for(r=0;r<t.length;r++)a._scanDroppedItems(t[r],i,n+e.name+"/");s()}return null}),l)})())},_initDragDrop:function(){var t=this.$dropZone;this.dropZoneEnabled&&this.showPreview&&(this._handler(t,"dragenter dragover",e.proxy(this._zoneDragEnter,this)),this._handler(t,"dragleave",e.proxy(this._zoneDragLeave,this)),this._handler(t,"drop",e.proxy(this._zoneDrop,this)),this._handler(e(document),"dragenter dragover drop",this._zoneDragDropInit))},_zoneDragDropInit:function(e){e.stopPropagation(),e.preventDefault()},_zoneDragEnter:function(i){var n=i.originalEvent.dataTransfer,r=e.inArray("Files",n.types)>-1;if(this._zoneDragDropInit(i),this.isDisabled||!r)return i.originalEvent.dataTransfer.effectAllowed="none",void(i.originalEvent.dataTransfer.dropEffect="none");this._raise("fileDragEnter",{sourceEvent:i,files:n.types.Files})&&t.addCss(this.$dropZone,"file-highlighted")},_zoneDragLeave:function(e){this._zoneDragDropInit(e),this.isDisabled||this._raise("fileDragLeave",{sourceEvent:e})&&this.$dropZone.removeClass("file-highlighted")},_zoneDrop:function(e){var i,n=this,r=n.$element,o=e.originalEvent.dataTransfer,s=o.files,a=o.items,l=t.getDragDropFolders(a),c=function(){n.isAjaxUpload?n._change(e,s):(n.changeTriggered=!0,r.get(0).files=s,setTimeout((function(){n.changeTriggered=!1,r.trigger("change"+n.namespace)}),n.processDelay)),n.$dropZone.removeClass("file-highlighted")};if(e.preventDefault(),!n.isDisabled&&!t.isEmpty(s)&&n._raise("fileDragDrop",{sourceEvent:e,files:s}))if(l>0){if(!n.isAjaxUpload)return void n._showFolderError(l);for(s=[],i=0;i<a.length;i++){var u=a[i].webkitGetAsEntry();u&&n._scanDroppedItems(u,s)}setTimeout((function(){c()}),500)}else c()},_uploadClick:function(e){var i,n=this.$container.find(".fileinput-upload"),r=!n.hasClass("disabled")&&t.isEmpty(n.attr("disabled"));e&&e.isDefaultPrevented()||(this.isAjaxUpload?(e.preventDefault(),r&&this.upload()):r&&"submit"!==n.attr("type")&&((i=n.closest("form")).length&&i.trigger("submit"),e.preventDefault()))},_submitForm:function(){return this._isFileSelectionValid()&&!this._abort({})},_clearPreview:function(){var i=this;(i.showUploadedThumbs?i.getFrames(":not(.file-preview-success)"):i.getFrames()).each((function(){var n=e(this),r=n.attr("id"),o=i._getZoom(r);n.remove(),t.cleanZoomCache(o)})),i.getFrames().length&&i.showPreview||i._resetUpload(),i._validateDefaultPreview()},_initSortable:function(){var i,n=this,r=n.$preview,o="."+t.SORT_CSS,s=n.reversePreviewOrder;window.KvSortable&&0!==r.find(o).length&&(i={handle:".drag-handle-init",dataIdAttr:"data-preview-id",scroll:!1,draggable:o,onSort:function(i){var r=i.oldIndex,o=i.newIndex,a=0;n.initialPreview=t.moveArray(n.initialPreview,r,o,s),n.initialPreviewConfig=t.moveArray(n.initialPreviewConfig,r,o,s),n.previewCache.init(),n.getFrames(".file-preview-initial").each((function(){e(this).attr("data-fileindex",t.INIT_FLAG+a),a++})),n._raise("filesorted",{previewId:e(i.item).attr("id"),oldIndex:r,newIndex:o,stack:n.initialPreviewConfig})}},r.data("kvsortable")&&r.kvsortable("destroy"),e.extend(!0,i,n.fileActionSettings.dragSettings),r.kvsortable(i))},_setPreviewContent:function(e){this.$preview.html(e),this._autoFitContent()},_initPreviewImageOrientations:function(){var t=this,i=0;t.autoOrientImageInitial&&t.getFrames(".file-preview-initial").each((function(){var n,r,o,s=e(this),a=t.initialPreviewConfig[i];a&&a.exif&&a.exif.Orientation&&(o=s.attr("id"),n=s.find(">.kv-file-content img"),r=t._getZoom(o," >.kv-file-content img"),t.setImageOrientation(n,r,a.exif.Orientation,s)),i++}))},_initPreview:function(e){var i,n=this.initialCaption||"";if(!this.previewCache.count(!0))return this._clearPreview(),void(e?this._setCaption(n):this._initCaption());i=this.previewCache.out(),n=e&&this.initialCaption?this.initialCaption:i.caption,this._setPreviewContent(i.content),this._setInitThumbAttr(),this._setCaption(n),this._initSortable(),t.isEmpty(i.content)||this.$container.removeClass("file-input-new"),this._initPreviewImageOrientations()},_getZoomButton:function(e){var t=this.previewZoomButtonIcons[e],i=this.previewZoomButtonClasses[e],n=' title="'+(this.previewZoomButtonTitles[e]||"")+'" '+("close"===e?' data-dismiss="modal" aria-hidden="true"':"");return"fullscreen"!==e&&"borderless"!==e&&"toggleheader"!==e||(n+=' data-toggle="button" aria-pressed="false" autocomplete="off"'),'<button type="button" class="'+i+" btn-"+e+'"'+n+">"+t+"</button>"},_getModalContent:function(){return this._getLayoutTemplate("modal").setTokens({rtl:this.rtl?" kv-rtl":"",zoomFrameClass:this.frameClass,heading:this.msgZoomModalHeading,prev:this._getZoomButton("prev"),next:this._getZoomButton("next"),toggleheader:this._getZoomButton("toggleheader"),fullscreen:this._getZoomButton("fullscreen"),borderless:this._getZoomButton("borderless"),close:this._getZoomButton("close")})},_listenModalEvent:function(e){var i=this,n=i.$modal;n.on(e+".bs.modal",(function(r){var o=n.find(".btn-fullscreen"),s=n.find(".btn-borderless");i._raise("filezoom"+e,function(e){return{sourceEvent:e,previewId:n.data("previewId"),modal:n}}(r)),"shown"===e&&(s.removeClass("active").attr("aria-pressed","false"),o.removeClass("active").attr("aria-pressed","false"),n.hasClass("file-zoom-fullscreen")&&(i._maximizeZoomDialog(),t.checkFullScreen()?o.addClass("active").attr("aria-pressed","true"):s.addClass("active").attr("aria-pressed","true")))}))},_initZoom:function(){var i,n=this,r=n._getLayoutTemplate("modalMain"),o="#"+t.MODAL_ID;n.showPreview&&(n.$modal=e(o),n.$modal&&n.$modal.length||(i=e(document.createElement("div")).html(r).insertAfter(n.$container),n.$modal=e(o).insertBefore(i),i.remove()),t.initModal(n.$modal),n.$modal.html(n._getModalContent()),e.each(t.MODAL_EVENTS,(function(e,t){n._listenModalEvent(t)})))},_initZoomButtons:function(){var t,i,n=this.$modal.data("previewId")||"",r=this.getFrames().toArray(),o=r.length,s=this.$modal.find(".btn-prev"),a=this.$modal.find(".btn-next");if(r.length<2)return s.hide(),void a.hide();s.show(),a.show(),o&&(t=e(r[0]),i=e(r[o-1]),s.removeAttr("disabled"),a.removeAttr("disabled"),t.length&&t.attr("id")===n&&s.attr("disabled",!0),i.length&&i.attr("id")===n&&a.attr("disabled",!0))},_maximizeZoomDialog:function(){var t=this.$modal,i=t.find(".modal-header:visible"),n=t.find(".modal-footer:visible"),r=t.find(".modal-body"),o=e(window).height();t.addClass("file-zoom-fullscreen"),i&&i.length&&(o-=i.outerHeight(!0)),n&&n.length&&(o-=n.outerHeight(!0)),r&&r.length&&(o-=r.outerHeight(!0)-r.height()),t.find(".kv-zoom-body").height(o)},_resizeZoomDialog:function(e){var i=this.$modal,n=i.find(".btn-fullscreen"),r=i.find(".btn-borderless");if(i.hasClass("file-zoom-fullscreen"))t.toggleFullScreen(!1),e?n.hasClass("active")||(i.removeClass("file-zoom-fullscreen"),this._resizeZoomDialog(!0),r.hasClass("active")&&r.removeClass("active").attr("aria-pressed","false")):n.hasClass("active")?n.removeClass("active").attr("aria-pressed","false"):(i.removeClass("file-zoom-fullscreen"),this.$modal.find(".kv-zoom-body").css("height",this.zoomModalHeight));else{if(!e)return void this._maximizeZoomDialog();t.toggleFullScreen(!0)}i.focus()},_setZoomContent:function(i,n){var r,o,s,a,l,c,u,d,h=this,f=i.attr("id"),p=h._getZoom(f),m=h.$modal,g=m.find(".btn-fullscreen"),v=m.find(".btn-borderless"),_=m.find(".btn-toggleheader");o=p.attr("data-template")||"generic",s=(r=p.find(".kv-file-content")).length?r.html():"",a=(i.data("caption")||"")+" "+(i.data("size")||""),m.find(".kv-zoom-title").attr("title",e("<div/>").html(a).text()).html(a),l=m.find(".kv-zoom-body"),m.removeClass("kv-single-content"),n?(d=l.addClass("file-thumb-loading").clone().insertAfter(l),l.html(s).hide(),d.fadeOut("fast",(function(){l.fadeIn("fast",(function(){l.removeClass("file-thumb-loading")})),d.remove()}))):l.html(s),(u=h.previewZoomSettings[o])&&(c=l.find(".kv-preview-data"),t.addCss(c,"file-zoom-detail"),e.each(u,(function(e,t){c.css(e,t),(c.attr("width")&&"width"===e||c.attr("height")&&"height"===e)&&c.removeAttr(e)}))),m.data("previewId",f),h._handler(m.find(".btn-prev"),"click",(function(){h._zoomSlideShow("prev",f)})),h._handler(m.find(".btn-next"),"click",(function(){h._zoomSlideShow("next",f)})),h._handler(g,"click",(function(){h._resizeZoomDialog(!0)})),h._handler(v,"click",(function(){h._resizeZoomDialog(!1)})),h._handler(_,"click",(function(){var e,t=m.find(".modal-header"),i=m.find(".modal-body .floating-buttons"),n=t.find(".kv-zoom-actions"),r=function(e){var i=h.$modal.find(".kv-zoom-body"),n=h.zoomModalHeight;m.hasClass("file-zoom-fullscreen")&&(n=i.outerHeight(!0),e||(n-=t.outerHeight(!0))),i.css("height",e?n+e:n)};t.is(":visible")?(e=t.outerHeight(!0),t.slideUp("slow",(function(){n.find(".btn").appendTo(i),r(e)}))):(i.find(".btn").appendTo(n),t.slideDown("slow",(function(){r()}))),m.focus()})),h._handler(m,"keydown",(function(t){var i=t.which||t.keyCode,n=e(this).find(".btn-prev"),r=e(this).find(".btn-next"),o=e(this).data("previewId"),s=h.rtl?39:37,a=h.rtl?37:39;i===s&&n.length&&!n.attr("disabled")&&h._zoomSlideShow("prev",o),i===a&&r.length&&!r.attr("disabled")&&h._zoomSlideShow("next",o)}))},_zoomPreview:function(e){var i,n=this.$modal;if(!e.length)throw"Cannot zoom to detailed preview!";t.initModal(n),n.html(this._getModalContent()),i=e.closest(t.FRAMES),this._setZoomContent(i),n.modal("show"),this._initZoomButtons()},_zoomSlideShow:function(t,i){var n,r,o,s,a=this.$modal.find(".kv-zoom-actions .btn-"+t),l=this.getFrames().toArray(),c=[],u=l.length;if(!a.attr("disabled")){for(r=0;r<u;r++)(o=e(l[r]))&&o.length&&o.find(".kv-file-zoom:visible").length&&c.push(l[r]);for(u=c.length,r=0;r<u;r++)if(e(c[r]).attr("id")===i){s="prev"===t?r-1:r+1;break}s<0||s>=u||!c[s]||((n=e(c[s])).length&&this._setZoomContent(n,!0),this._initZoomButtons(),this._raise("filezoom"+t,{previewId:i,modal:this.$modal}))}},_initZoomButton:function(){var t=this;t.$preview.find(".kv-file-zoom").each((function(){var i=e(this);t._handler(i,"click",(function(){t._zoomPreview(i)}))}))},_inputFileCount:function(){return this.$element.get(0).files.length},_refreshPreview:function(){var t;(this._inputFileCount()||this.isAjaxUpload)&&this.showPreview&&this.isPreviewable&&(this.isAjaxUpload&&this.fileManager.count()>0?(t=e.extend(!0,{},this.fileManager.stack),this.fileManager.clear(),this._clearFileInput()):t=this.$element.get(0).files,t&&t.length&&(this.readFiles(t),this._setFileDropZoneTitle()))},_clearObjects:function(t){t.find("video audio").each((function(){this.pause(),e(this).remove()})),t.find("img object div").each((function(){e(this).remove()}))},_clearFileInput:function(){var t,i,n,r=this.$element;this._inputFileCount()&&(t=r.closest("form"),i=e(document.createElement("form")),n=e(document.createElement("div")),r.before(n),t.length?t.after(i):n.after(i),i.append(r).trigger("reset"),n.before(r).remove(),i.remove())},_resetUpload:function(){this.uploadCache=[],this.$btnUpload.removeAttr("disabled"),this._setProgress(0),this._hideProgress(),this._resetErrors(!1),this._initAjax(),this.fileManager.clearImages(),this._resetCanvas(),this.overwriteInitial&&(this.initialPreview=[],this.initialPreviewConfig=[],this.initialPreviewThumbTags=[],this.previewCache.data={content:[],config:[],tags:[]})},_resetCanvas:function(){this.canvas&&this.imageCanvasContext&&this.imageCanvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)},_hasInitialPreview:function(){return!this.overwriteInitial&&this.previewCache.count(!0)},_resetPreview:function(){var e,t;this.previewCache.count(!0)?(e=this.previewCache.out(),this._setPreviewContent(e.content),this._setInitThumbAttr(),t=this.initialCaption?this.initialCaption:e.caption,this._setCaption(t)):(this._clearPreview(),this._initCaption()),this.showPreview&&(this._initZoom(),this._initSortable())},_clearDefaultPreview:function(){this.$preview.find(".file-default-preview").remove()},_validateDefaultPreview:function(){this.showPreview&&!t.isEmpty(this.defaultPreviewContent)&&(this._setPreviewContent('<div class="file-default-preview">'+this.defaultPreviewContent+"</div>"),this.$container.removeClass("file-input-new"),this._initClickable())},_resetPreviewThumbs:function(e){var t;if(e)return this._clearPreview(),void this.clearFileStack();this._hasInitialPreview()?(t=this.previewCache.out(),this._setPreviewContent(t.content),this._setInitThumbAttr(),this._setCaption(t.caption),this._initPreviewActions()):this._clearPreview()},_getLayoutTemplate:function(e){var i=this.layoutTemplates[e];return t.isEmpty(this.customLayoutTags)?i:t.replaceTags(i,this.customLayoutTags)},_getPreviewTemplate:function(e){var i=this.previewTemplates,n=i[e]||i.other;return t.isEmpty(this.customPreviewTags)?n:t.replaceTags(n,this.customPreviewTags)},_getOutData:function(e,t,i,n){return t=t||{},i=i||{},{formdata:e,files:n=n||this.fileManager.list(),filenames:this.filenames,filescount:this.getFilesCount(),extra:this._getExtraData(),response:i,reader:this.reader,jqXHR:t}},_getMsgSelected:function(e){var t=1===e?this.fileSingle:this.filePlural;return e>0?this.msgSelected.replace("{n}",e).replace("{files}",t):this.msgNoFilesSelected},_getFrame:function(e,i){var n=t.getFrameElement(this.$preview,e);return!this.showPreview||i||n.length||this._log(t.logMessages.invalidThumb,{id:e}),n},_getZoom:function(e,i){var n=t.getZoomElement(this.$preview,e,i);return this.showPreview&&!n.length&&this._log(t.logMessages.invalidThumb,{id:e}),n},_getThumbs:function(e){return e=e||"",this.getFrames(":not(.file-preview-initial)"+e)},_getThumbId:function(e){return this.previewInitId+"-"+e},_getExtraData:function(e,t){var i=this.uploadExtraData;return"function"==typeof this.uploadExtraData&&(i=this.uploadExtraData(e,t)),i},_initXhr:function(e,i,n){var r=this,o=r.fileManager,s=function(e){var s=0,a=e.total,l=e.loaded||e.position,c=o.getUploadStats(i,l,a);e.lengthComputable&&!r.enableResumableUpload&&(s=t.round(l/a*100)),i?r._setFileUploadStats(i,s,n,c):r._setProgress(s,null,null,r._getStats(c)),r._raise("fileajaxprogress",[c])};return e.upload&&(r.progressDelay&&(s=t.debounce(s,r.progressDelay)),e.upload.addEventListener("progress",s,!1)),e},_initAjaxSettings:function(){this._ajaxSettings=e.extend(!0,{},this.ajaxSettings),this._ajaxDeleteSettings=e.extend(!0,{},this.ajaxDeleteSettings)},_mergeAjaxCallback:function(e,t,i){var n,r=this._ajaxSettings,o=this.mergeAjaxCallbacks;"delete"===i&&(r=this._ajaxDeleteSettings,o=this.mergeAjaxDeleteCallbacks),n=r[e],r[e]=o&&"function"==typeof n?"before"===o?function(){n.apply(this,arguments),t.apply(this,arguments)}:function(){t.apply(this,arguments),n.apply(this,arguments)}:t},_ajaxSubmit:function(t,i,n,r,o,s,a,l){var c,u,d,h,f=this;f._raise("filepreajax",[o,s,a])&&(o.append("initialPreview",JSON.stringify(f.initialPreview)),o.append("initialPreviewConfig",JSON.stringify(f.initialPreviewConfig)),o.append("initialPreviewThumbTags",JSON.stringify(f.initialPreviewThumbTags)),f._initAjaxSettings(),f._mergeAjaxCallback("beforeSend",t),f._mergeAjaxCallback("success",i),f._mergeAjaxCallback("complete",n),f._mergeAjaxCallback("error",r),"function"==typeof(l=l||f.uploadUrlThumb||f.uploadUrl)&&(l=l()),"object"==typeof(d=f._getExtraData(s,a)||{})&&e.each(d,(function(e,t){o.append(e,t)})),u={xhr:function(){var t=e.ajaxSettings.xhr();return f._initXhr(t,s,f.fileManager.count())},url:f._encodeURI(l),type:"POST",dataType:"json",data:o,cache:!1,processData:!1,contentType:!1},c=e.extend(!0,{},u,f._ajaxSettings),f.ajaxQueue.push(c),h=function(){var t,i;f.ajaxCurrentThreads<f.maxAjaxThreads&&void 0!==(t=f.ajaxQueue.shift())&&(f.ajaxCurrentThreads++,i=e.ajax(t).done((function(){clearInterval(f.ajaxQueueIntervalId),f.ajaxCurrentThreads--})),f.ajaxRequests.push(i))},f.ajaxQueueIntervalId=setInterval(h,f.queueDelay))},_mergeArray:function(e,i){var n=t.cleanArray(this[e]),r=t.cleanArray(i);this[e]=n.concat(r)},_initUploadSuccess:function(i,n,r){var o,s,a,l,c,u,d,h,f,p,m=this;m.showPreview&&"object"==typeof i&&!e.isEmptyObject(i)?(void 0!==i.initialPreview&&i.initialPreview.length>0&&(m.hasInitData=!0,u=i.initialPreview||[],d=i.initialPreviewConfig||[],h=i.initialPreviewThumbTags||[],o=void 0===i.append||i.append,u.length>0&&!t.isArray(u)&&(u=u.split(m.initialPreviewDelimiter)),u.length&&(m._mergeArray("initialPreview",u),m._mergeArray("initialPreviewConfig",d),m._mergeArray("initialPreviewThumbTags",h)),void 0!==n?r?(f=n.attr("id"),null!==(p=m._getUploadCacheIndex(f))&&(m.uploadCache[p]={id:f,content:u[0],config:d[0]||[],tags:h[0]||[],append:o})):(a=m.previewCache.add(u[0],d[0],h[0],o),s=m.previewCache.get(a,!1),(c=(l=e(document.createElement("div")).html(s).hide().insertAfter(n)).find(".kv-zoom-cache"))&&c.length&&c.insertAfter(n),n.fadeOut("slow",(function(){var e=l.find(".file-preview-frame");e&&e.length&&e.insertBefore(n).fadeIn("slow").css("display:inline-block"),m._initPreviewActions(),m._clearFileInput(),t.cleanZoomCache(m._getZoom(n.attr("id"))),n.remove(),l.remove(),m._initSortable()}))):(m.previewCache.set(u,d,h,o),m._initPreview(),m._initPreviewActions())),m._resetCaption()):m._resetCaption()},_getUploadCacheIndex:function(e){var t,i=this.uploadCache.length;for(t=0;t<i;t++)if(this.uploadCache[t].id===e)return t;return null},_initSuccessThumbs:function(){var i=this;i.showPreview&&i._getThumbs(t.FRAMES+".file-preview-success").each((function(){var n=e(this),r=n.find(".kv-file-remove");r.removeAttr("disabled"),i._handler(r,"click",(function(){var e=n.attr("id"),r=i._raise("filesuccessremove",[e,n.attr("data-fileindex")]);t.cleanMemory(n),!1!==r&&n.fadeOut("slow",(function(){t.cleanZoomCache(i._getZoom(e)),n.remove(),i.getFrames().length||i.reset()}))}))}))},_updateInitialPreview:function(){var t=this,i=t.uploadCache;t.showPreview&&(e.each(i,(function(e,i){t.previewCache.add(i.content,i.config,i.tags,i.append)})),t.hasInitData&&(t._initPreview(),t._initPreviewActions()))},_uploadSingle:function(i,n,r){var o,s,a,l,c,u,d,h,f,p,m,g,v,_=this,b=_.fileManager,y=b.count(),w=new FormData,C=_._getThumbId(n),x=y>0||!e.isEmptyObject(_.uploadExtraData),E=_.ajaxOperations.uploadThumb,T=b.getFile(n),k={id:C,index:i,fileId:n},S=_.fileManager.getFileName(n,!0);_.enableResumableUpload||(_.showPreview&&(s=_.fileManager.getThumb(n),d=s.find(".file-thumb-progress"),l=s.find(".kv-file-upload"),c=s.find(".kv-file-remove"),d.show()),0===y||!x||_.showPreview&&l&&l.hasClass("disabled")||_._abort(k)||(v=function(){u?b.errors.push(n):b.removeFile(n),b.setProcessed(n),b.isProcessed()&&(_.fileBatchCompleted=!0)},a=function(){var e;_.fileBatchCompleted&&setTimeout((function(){var i=0===b.count(),n=b.errors.length;_._updateInitialPreview(),_.unlock(i),i&&_._clearFileInput(),e=_.$preview.find(".file-preview-initial"),_.uploadAsync&&e.length&&(t.addCss(e,t.SORT_CSS),_._initSortable()),_._raise("filebatchuploadcomplete",[b.stack,_._getExtraData()]),_.retryErrorUploads&&0!==n||b.clear(),_._setProgress(101),_.ajaxAborted=!1}),_.processDelay)},h=function(a){o=_._getOutData(w,a),b.initStats(n),_.fileBatchCompleted=!1,r||(_.ajaxAborted=!1),_.showPreview&&(s.hasClass("file-preview-success")||(_._setThumbStatus(s,"Loading"),t.addCss(s,"file-uploading")),l.attr("disabled",!0),c.attr("disabled",!0)),r||_.lock(),-1!==b.errors.indexOf(n)&&delete b.errors[n],_._raise("filepreupload",[o,C,i]),e.extend(!0,k,o),_._abort(k)&&(a.abort(),r||(_._setThumbStatus(s,"New"),s.removeClass("file-uploading"),l.removeAttr("disabled"),c.removeAttr("disabled"),_.unlock()),_._setProgressCancelled())},p=function(a,c,h){var p=_.showPreview&&s.attr("id")?s.attr("id"):C;o=_._getOutData(w,h,a),e.extend(!0,k,o),setTimeout((function(){t.isEmpty(a)||t.isEmpty(a.error)?(_.showPreview&&(_._setThumbStatus(s,"Success"),l.hide(),_._initUploadSuccess(a,s,r),_._setProgress(101,d)),_._raise("fileuploaded",[o,p,i]),r?v():_.fileManager.remove(s)):(u=!0,f=_._parseError(E,h,_.msgUploadError,_.fileManager.getFileName(n)),_._showFileError(f,k),_._setPreviewError(s,!0),_.retryErrorUploads||l.hide(),r&&v(),_._setProgress(101,_._getFrame(p).find(".file-thumb-progress"),_.msgUploadError))}),_.processDelay)},m=function(){setTimeout((function(){_.showPreview&&(l.removeAttr("disabled"),c.removeAttr("disabled"),s.removeClass("file-uploading")),r?a():(_.unlock(!1),_._clearFileInput()),_._initSuccessThumbs()}),_.processDelay)},g=function(t,i,o){f=_._parseError(E,t,o,_.fileManager.getFileName(n)),u=!0,setTimeout((function(){var i;r&&v(),_.fileManager.setProgress(n,100),_._setPreviewError(s,!0),_.retryErrorUploads||l.hide(),e.extend(!0,k,_._getOutData(w,t)),_._setProgress(101,_.$progress,_.msgAjaxProgressError.replace("{operation}",E)),i=_.showPreview&&s?s.find(".file-thumb-progress"):"",_._setProgress(101,i,_.msgUploadError),_._showFileError(f,k)}),_.processDelay)},w.append(_.uploadFileAttr,T.file,S),_._setUploadData(w,{fileId:n}),_._ajaxSubmit(h,p,m,g,w,n,i)))},_uploadBatch:function(){var i,n,r,o,s,a,l=this,c=l.fileManager,u=c.total(),d=u>0||!e.isEmptyObject(l.uploadExtraData),h=new FormData,f=l.ajaxOperations.uploadBatch;if(0!==u&&d&&!l._abort({})){a=function(){l.fileManager.clear(),l._clearFileInput()},i=function(i){l.lock(),c.initStats();var n=l._getOutData(h,i);l.ajaxAborted=!1,l.showPreview&&l._getThumbs().each((function(){var i=e(this),n=i.find(".kv-file-upload"),r=i.find(".kv-file-remove");i.hasClass("file-preview-success")||(l._setThumbStatus(i,"Loading"),t.addCss(i,"file-uploading")),n.attr("disabled",!0),r.attr("disabled",!0)})),l._raise("filebatchpreupload",[n]),l._abort(n)&&(i.abort(),l._getThumbs().each((function(){var t=e(this),i=t.find(".kv-file-upload"),n=t.find(".kv-file-remove");t.hasClass("file-preview-loading")&&(l._setThumbStatus(t,"New"),t.removeClass("file-uploading")),i.removeAttr("disabled"),n.removeAttr("disabled")})),l._setProgressCancelled())},n=function(i,n,r){var o=l._getOutData(h,r,i),c=0,u=l._getThumbs(":not(.file-preview-success)"),d=t.isEmpty(i)||t.isEmpty(i.errorkeys)?[]:i.errorkeys;t.isEmpty(i)||t.isEmpty(i.error)?(l._raise("filebatchuploadsuccess",[o]),a(),l.showPreview?(u.each((function(){var t=e(this);l._setThumbStatus(t,"Success"),t.removeClass("file-uploading"),t.find(".kv-file-upload").hide().removeAttr("disabled")})),l._initUploadSuccess(i)):l.reset(),l._setProgress(101)):(l.showPreview&&(u.each((function(){var t=e(this);t.removeClass("file-uploading"),t.find(".kv-file-upload").removeAttr("disabled"),t.find(".kv-file-remove").removeAttr("disabled"),0===d.length||-1!==e.inArray(c,d)?(l._setPreviewError(t,!0),l.retryErrorUploads||(t.find(".kv-file-upload").hide(),l.fileManager.remove(t))):(t.find(".kv-file-upload").hide(),l._setThumbStatus(t,"Success"),l.fileManager.remove(t)),t.hasClass("file-preview-error")&&!l.retryErrorUploads||c++})),l._initUploadSuccess(i)),s=l._parseError(f,r,l.msgUploadError),l._showFileError(s,o,"filebatchuploaderror"),l._setProgress(101,l.$progress,l.msgUploadError))},o=function(){l.unlock(),l._initSuccessThumbs(),l._clearFileInput(),l._raise("filebatchuploadcomplete",[l.fileManager.stack,l._getExtraData()])},r=function(t,i,n){var r=l._getOutData(h,t);s=l._parseError(f,t,n),l._showFileError(s,r,"filebatchuploaderror"),l.uploadFileCount=u-1,l.showPreview&&(l._getThumbs().each((function(){var t=e(this);t.removeClass("file-uploading"),l.fileManager.getFile(t.attr("data-fileid"))&&l._setPreviewError(t)})),l._getThumbs().removeClass("file-uploading"),l._getThumbs(" .kv-file-upload").removeAttr("disabled"),l._getThumbs(" .kv-file-delete").removeAttr("disabled"),l._setProgress(101,l.$progress,l.msgAjaxProgressError.replace("{operation}",f)))};var p=0;e.each(l.fileManager.stack,(function(e,i){t.isEmpty(i.file)||h.append(l.uploadFileAttr,i.file,i.nameFmt||"untitled_"+p),p++})),l._ajaxSubmit(i,n,o,r,h)}},_uploadExtraOnly:function(){var e,i,n,r,o,s=this,a={},l=new FormData,c=s.ajaxOperations.uploadExtra;s._abort(a)||(e=function(e){s.lock();var t=s._getOutData(l,e);s._raise("filebatchpreupload",[t]),s._setProgress(50),a.data=t,a.xhr=e,s._abort(a)&&(e.abort(),s._setProgressCancelled())},i=function(e,i,n){var r=s._getOutData(l,n,e);t.isEmpty(e)||t.isEmpty(e.error)?(s._raise("filebatchuploadsuccess",[r]),s._clearFileInput(),s._initUploadSuccess(e),s._setProgress(101)):(o=s._parseError(c,n,s.msgUploadError),s._showFileError(o,r,"filebatchuploaderror"))},n=function(){s.unlock(),s._clearFileInput(),s._raise("filebatchuploadcomplete",[s.fileManager.stack,s._getExtraData()])},r=function(e,t,i){var n=s._getOutData(l,e);o=s._parseError(c,e,i),a.data=n,s._showFileError(o,n,"filebatchuploaderror"),s._setProgress(101,s.$progress,s.msgAjaxProgressError.replace("{operation}",c))},s._ajaxSubmit(e,i,n,r,l))},_deleteFileIndex:function(i){var n=i.attr("data-fileindex"),r=this.reversePreviewOrder;n.substring(0,5)===t.INIT_FLAG&&(n=parseInt(n.replace(t.INIT_FLAG,"")),this.initialPreview=t.spliceArray(this.initialPreview,n,r),this.initialPreviewConfig=t.spliceArray(this.initialPreviewConfig,n,r),this.initialPreviewThumbTags=t.spliceArray(this.initialPreviewThumbTags,n,r),this.getFrames().each((function(){var i=e(this),r=i.attr("data-fileindex");r.substring(0,5)===t.INIT_FLAG&&(r=parseInt(r.replace(t.INIT_FLAG,"")))>n&&(r--,i.attr("data-fileindex",t.INIT_FLAG+r))})))},_resetCaption:function(){var e=this;setTimeout((function(){var t,i,n,r=e.previewCache.count(!0),o=e.fileManager.count(),s=e.showPreview&&e.getFrames(":not(.file-preview-success):not(.file-preview-error)").length;0!==o||0!==r||s?(t=(i=r+o)>1?e._getMsgSelected(i):(n=e.fileManager.getFirstFile())?n.nameFmt:"_",e._setCaption(t)):e.reset()}),e.processDelay)},_initFileActions:function(){var i=this;i.showPreview&&(i._initZoomButton(),i.getFrames(" .kv-file-remove").each((function(){var n,r=e(this),o=r.closest(t.FRAMES),s=o.attr("id"),a=o.attr("data-fileindex");i._handler(r,"click",(function(){if(!1===i._raise("filepreremove",[s,a])||!i._validateMinCount())return!1;n=o.hasClass("file-preview-error"),t.cleanMemory(o),o.fadeOut("slow",(function(){t.cleanZoomCache(i._getZoom(s)),i.fileManager.remove(o),i._clearObjects(o),o.remove(),s&&n&&i.$errorContainer.find('li[data-thumb-id="'+s+'"]').fadeOut("fast",(function(){e(this).remove(),i._errorsExist()||i._resetErrors()})),i._clearFileInput(),i._resetCaption(),i._raise("fileremoved",[s,a])}))}))})),i.getFrames(" .kv-file-upload").each((function(){var n=e(this);i._handler(n,"click",(function(){var e=n.closest(t.FRAMES),r=e.attr("data-fileid");i._hideProgress(),e.hasClass("file-preview-error")&&!i.retryErrorUploads||i._uploadSingle(i.fileManager.getIndex(r),r,!1)}))})))},_initPreviewActions:function(){var i=this,n=i.$preview,r=i.deleteExtraData||{},o=t.FRAMES+" .kv-file-remove",s=i.fileActionSettings,a=s.removeClass,l=s.removeErrorClass,c=function(){var e=i.isAjaxUpload?i.previewCache.count(!0):i._inputFileCount();i.getFrames().length||e||(i._setCaption(""),i.reset(),i.initialCaption="")};i._initZoomButton(),n.find(o).each((function(){var n,o,s,u,d=e(this),h=d.data("url")||i.deleteUrl,f=d.data("key"),p=i.ajaxOperations.deleteThumb;if(!t.isEmpty(h)&&void 0!==f){"function"==typeof h&&(h=h());var m,g,v,_,b,y=d.closest(t.FRAMES),w=i.previewCache.data,C=y.attr("data-fileindex");C=parseInt(C.replace(t.INIT_FLAG,"")),v=t.isEmpty(w.config)&&t.isEmpty(w.config[C])?null:w.config[C],b=t.isEmpty(v)||t.isEmpty(v.extra)?r:v.extra,_=v.filename||v.caption||"","function"==typeof b&&(b=b()),g={id:d.attr("id"),key:f,extra:b},o=function(e){i.ajaxAborted=!1,i._raise("filepredelete",[f,e,b]),i._abort()?e.abort():(d.removeClass(l),t.addCss(y,"file-uploading"),t.addCss(d,"disabled "+a))},s=function(e,r,o){var s,u;if(!t.isEmpty(e)&&!t.isEmpty(e.error))return g.jqXHR=o,g.response=e,n=i._parseError(p,o,i.msgDeleteError,_),i._showFileError(n,g,"filedeleteerror"),y.removeClass("file-uploading"),d.removeClass("disabled "+a).addClass(l),void c();y.removeClass("file-uploading").addClass("file-deleted"),y.fadeOut("slow",(function(){C=parseInt(y.attr("data-fileindex").replace(t.INIT_FLAG,"")),i.previewCache.unset(C),i._deleteFileIndex(y),s=i.previewCache.count(!0),u=s>0?i._getMsgSelected(s):"",i._setCaption(u),i._raise("filedeleted",[f,o,b]),t.cleanZoomCache(i._getZoom(y.attr("id"))),i._clearObjects(y),y.remove(),c()}))},u=function(e,t,n){var r=i._parseError(p,e,n,_);g.jqXHR=e,g.response={},i._showFileError(r,g,"filedeleteerror"),y.removeClass("file-uploading"),d.removeClass("disabled "+a).addClass(l),c()},i._initAjaxSettings(),i._mergeAjaxCallback("beforeSend",o,"delete"),i._mergeAjaxCallback("success",s,"delete"),i._mergeAjaxCallback("error",u,"delete"),m=e.extend(!0,{},{url:i._encodeURI(h),type:"POST",dataType:"json",data:e.extend(!0,{},{key:f},b)},i._ajaxDeleteSettings),i._handler(d,"click",(function(){if(!i._validateMinCount())return!1;i.ajaxAborted=!1,i._raise("filebeforedelete",[f,b]),i.ajaxAborted instanceof Promise?i.ajaxAborted.then((function(t){t||e.ajax(m)})):i.ajaxAborted||e.ajax(m)}))}}))},_hideFileIcon:function(){this.overwriteInitial&&this.$captionContainer.removeClass("icon-visible")},_showFileIcon:function(){t.addCss(this.$captionContainer,"icon-visible")},_getSize:function(t,i){var n,r,o=parseFloat(t),s=this.fileSizeGetter;return e.isNumeric(t)&&e.isNumeric(o)?("function"==typeof s?r=s(o):0===o?r="0.00 B":(n=Math.floor(Math.log(o)/Math.log(1024)),i||(i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"]),r=1*(o/Math.pow(1024,n)).toFixed(2)+" "+i[n]),this._getLayoutTemplate("size").replace("{sizeText}",r)):""},_getFileType:function(e){return this.mimeTypeAliases[e]||e},_generatePreviewTemplate:function(i,n,r,o,s,a,l,c,u,d,h,f,p,m){var g,v,_=this,b=_.slug(r),y="",w="",C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,x=b,E=b,T="type-default",k=d||_._renderFileFooter(i,b,c,"auto",l),S=_.preferIconicPreview,A=_.preferIconicZoomPreview,I=S?"other":i;return(g=C<400?_.previewSettingsSmall[I]||_.defaults.previewSettingsSmall[I]:_.previewSettings[I]||_.defaults.previewSettings[I])&&e.each(g,(function(e,t){w+=e+":"+t+";"})),v=function(n,l,c,d){var m=c?"zoom-"+s:s,g=_._getPreviewTemplate(n),v=(u||"")+" "+d;return _.frameClass&&(v=_.frameClass+" "+v),c&&(v=v.replace(" "+t.SORT_CSS,"")),g=_._parseFilePreviewIcon(g,r),"text"===n&&(l=t.htmlEncode(l)),"object"!==i||o||e.each(_.defaults.fileTypeSettings,(function(e,t){"object"!==e&&"other"!==e&&t(r,o)&&(T="type-"+e)})),t.isEmpty(p)||(void 0!==p.title&&null!==p.title&&(x=p.title),void 0!==p.alt&&null!==p.alt&&(x=p.alt)),g.setTokens({previewId:m,caption:b,title:x,alt:E,frameClass:v,type:_._getFileType(o),fileindex:h,fileid:a||"",typeCss:T,footer:k,data:l,template:f||i,style:w?'style="'+w+'"':""})},h=h||s.slice(s.lastIndexOf("-")+1),_.fileActionSettings.showZoom&&(y=v(A?"other":i,m||n,!0,"kv-zoom-thumb")),y="\n"+_._getLayoutTemplate("zoomCache").replace("{zoomContent}",y),"function"==typeof _.sanitizeZoomCache&&(y=_.sanitizeZoomCache(y)),v(S?"other":i,n,!1,"kv-preview-thumb")+y},_addToPreview:function(e,t){return this.reversePreviewOrder?e.prepend(t):e.append(t)},_previewDefault:function(e,i){var n=this.$preview;if(this.showPreview){var r,o=t.getFileName(e),s=e?e.type:"",a=e.size||0,l=this._getFileName(e,""),c=!0===i&&!this.isAjaxUpload,u=t.createObjectURL(e),d=this.fileManager.getId(e),h=this._getThumbId(d);this._clearDefaultPreview(),r=this._generatePreviewTemplate("other",u,o,s,h,d,c,a),this._addToPreview(n,r),this._setThumbAttr(h,l,a),!0===i&&this.isAjaxUpload&&this._setThumbStatus(this._getFrame(h),"Error")}},_previewFile:function(e,i,n,r,o){if(this.showPreview){var s,a=t.getFileName(i),l=o.type,c=o.name,u=this._parseFileType(l,a),d=this.$preview,h=i.size||0,f="text"===u||"html"===u||"image"===u?n.target.result:r,p=this.fileManager.getId(i),m=this._getThumbId(p);"html"===u&&this.purifyHtml&&window.DOMPurify&&(f=window.DOMPurify.sanitize(f)),s=this._generatePreviewTemplate(u,f,a,l,m,p,!1,h),this._clearDefaultPreview(),this._addToPreview(d,s);var g=this._getFrame(m);this._validateImageOrientation(g.find("img"),i,m,p,c,l,h,f),this._setThumbAttr(m,c,h),this._initSortable()}},_setThumbAttr:function(e,t,i){var n=this._getFrame(e);n.length&&(i=i&&i>0?this._getSize(i):"",n.data({caption:t,size:i}))},_setInitThumbAttr:function(){var e,i,n,r,o=this.previewCache.data,s=this.previewCache.count(!0);if(0!==s)for(var a=0;a<s;a++)e=o.config[a],r=this.previewInitId+"-"+t.INIT_FLAG+a,i=t.ifSet("caption",e,t.ifSet("filename",e)),n=t.ifSet("size",e),this._setThumbAttr(r,i,n)},_slugDefault:function(e){return t.isEmpty(e,!0)?"":String(e).replace(/[\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g,"_")},_updateFileDetails:function(e,i){var n,r,o,s,a=this.$element,l=t.isIE(9)&&t.findFileName(a.val())||a[0].files[0]&&a[0].files[0].name;n=!l&&this.fileManager.count()>0?this.fileManager.getFirstFile().nameFmt:l?this.slug(l):"_",r=this.isAjaxUpload?this.fileManager.count():e,s=this.previewCache.count(!0)+r,o=1===r?n:this._getMsgSelected(s),this.isError?(this.$previewContainer.removeClass("file-thumb-loading"),this.$previewStatus.html(""),this.$captionContainer.removeClass("icon-visible")):this._showFileIcon(),this._setCaption(o,this.isError),this.$container.removeClass("file-input-new file-input-ajax-new"),i||this._raise("fileselect",[e,n]),this.previewCache.count(!0)&&this._initPreviewActions()},_setThumbStatus:function(e,t){if(this.showPreview){var i="indicator"+t,n=i+"Title",r="file-preview-"+t.toLowerCase(),o=e.find(".file-upload-indicator"),s=this.fileActionSettings;e.removeClass("file-preview-success file-preview-error file-preview-paused file-preview-loading"),"Success"===t&&e.find(".file-drag-handle").remove(),o.html(s[i]),o.attr("title",s[n]),e.addClass(r),"Error"!==t||this.retryErrorUploads||e.find(".kv-file-upload").attr("disabled",!0)}},_setProgressCancelled:function(){this._setProgress(101,this.$progress,this.msgCancelled)},_setProgress:function(e,i,n,r){if((i=i||this.$progress).length){var o,s=Math.min(e,100),a=this.progressUploadThreshold,l=e<=100?this.progressTemplate:this.progressCompleteTemplate,c=s<100?this.progressTemplate:n?this.paused?this.progressPauseTemplate:this.progressErrorTemplate:l;e>=100&&(r=""),t.isEmpty(c)||(r=r||"",o=(o=a&&s>a&&e<=100?c.setTokens({percent:a,status:this.msgUploadThreshold}):c.setTokens({percent:s,status:e>100?this.msgUploadEnd:s+"%"})).setTokens({stats:r}),i.html(o),n&&i.find('[role="progressbar"]').html(n))}},_setFileDropZoneTitle:function(){var e,i=this.$container.find(".file-drop-zone"),n=this.dropZoneTitle;this.isClickable&&(e=t.isEmpty(this.$element.attr("multiple"))?this.fileSingle:this.filePlural,n+=this.dropZoneClickTitle.replace("{files}",e)),i.find("."+this.dropZoneTitleClass).remove(),!this.showPreview||0===i.length||this.fileManager.count()>0||!this.dropZoneEnabled||!this.isAjaxUpload&&this.$element.files||(0===i.find(t.FRAMES).length&&t.isEmpty(this.defaultPreviewContent)&&i.prepend('<div class="'+this.dropZoneTitleClass+'">'+n+"</div>"),this.$container.removeClass("file-input-new"),t.addCss(this.$container,"file-input-ajax-new"))},_getStats:function(e){var i,n;return this.showUploadStats&&e&&e.bitrate?(n=this._getLayoutTemplate("stats"),i=e.elapsed&&e.bps?this.msgPendingTime.setTokens({time:t.getElapsed(Math.ceil(e.pendingBytes/e.bps))}):this.msgCalculatingTime,n.setTokens({uploadSpeed:e.bitrate,pendingTime:i})):""},_setResumableProgress:function(e,t,i){var n=this.resumableManager,r=i?n:this,o=i?i.find(".file-thumb-progress"):null;0===r.lastProgress&&(r.lastProgress=e),e<r.lastProgress&&(e=r.lastProgress),this._setProgress(e,o,null,this._getStats(t)),r.lastProgress=e},_toggleResumableProgress:function(e,t){var i=this.$progress;i&&i.length&&i.html(e.setTokens({percent:101,status:t,stats:""}))},_setFileUploadStats:function(i,n,r,o){var s=this.$progress;if(this.showPreview||s&&s.length){var a,l=this.fileManager,c=l.getThumb(i),u=this.resumableManager,d=0,h=l.getTotalSize(),f=e.extend(!0,{},o);if(this.enableResumableUpload){var p,m=o.loaded,g=u.getUploadedSize(),v=u.file.size;m+=g,p=l.uploadedSize+m,n=t.round(100*m/v),o.pendingBytes=v-g,this._setResumableProgress(n,o,c),a=Math.floor(100*p/h),f.pendingBytes=h-p,this._setResumableProgress(a,f)}else l.setProgress(i,n),s=c&&c.length?c.find(".file-thumb-progress"):null,this._setProgress(n,s,null,this._getStats(o)),e.each(l.stats,(function(e,t){d+=t.loaded})),f.pendingBytes=h-d,a=t.round(d/h*100),this._setProgress(a,null,null,this._getStats(f))}},_validateMinCount:function(){var e=this.isAjaxUpload?this.fileManager.count():this._inputFileCount();return!(this.validateInitialCount&&this.minFileCount>0&&this._getFileCount(e-1)<this.minFileCount)||(this._noFilesError({}),!1)},_getFileCount:function(e,t){return void 0===t&&(t=this.validateInitialCount&&!this.overwriteInitial),t&&(e+=this.previewCache.count(!0)),e},_getFileId:function(e){return t.getFileId(e,this.generateFileId)},_getFileName:function(e,i){var n=t.getFileName(e);return n?this.slug(n):i},_getFileNames:function(e){return this.filenames.filter((function(t){return e?void 0!==t:null!=t}))},_setPreviewError:function(e,t){var i=this.removeFromPreviewOnError&&!this.retryErrorUploads;t&&!i||this.fileManager.remove(e),this.showPreview&&(i?e.remove():(this._setThumbStatus(e,"Error"),this._refreshUploadButton(e)))},_refreshUploadButton:function(e){var t=e.find(".kv-file-upload"),i=this.fileActionSettings,n=i.uploadIcon,r=i.uploadTitle;t.length&&(this.retryErrorUploads&&(n=i.uploadRetryIcon,r=i.uploadRetryTitle),t.attr("title",r).html(n))},_checkDimensions:function(e,i,n,r,o,s,a){var l,c,u,d=this[("Small"===i?"min":"max")+"Image"+s];!t.isEmpty(d)&&n.length&&(u=n[0],c="Width"===s?u.naturalWidth||u.width:u.naturalHeight||u.height,("Small"===i?c>=d:c<=d)||(l=this["msgImage"+s+i].setTokens({name:o,size:d}),this._showFileError(l,a),this._setPreviewError(r)))},_getExifObj:function(e){var i=null,n=t.logMessages.exifWarning;if("data:image/jpeg;base64,"===e.slice(0,23)||"data:image/jpg;base64,"===e.slice(0,22)){try{i=window.piexif?window.piexif.load(e):null}catch(e){i=null,n=e&&e.message||""}return i||this._log(t.logMessages.badExifParser,{details:n}),i}i=null},setImageOrientation:function(i,n,r,o){var s,a,l,c=this,u=!i||!i.length,d=!n||!n.length,h=!1,f=u&&o&&"image"===o.attr("data-template");u&&d||(l="load.fileinputimageorient",f?(i=n,n=null,i.css(c.previewSettings.image),a=e(document.createElement("div")).appendTo(o.find(".kv-file-content")),s=e(document.createElement("span")).insertBefore(i),i.css("visibility","hidden").removeClass("file-zoom-detail").appendTo(a)):h=!i.is(":visible"),i.off(l).on(l,(function(){h&&(c.$preview.removeClass("hide-content"),o.find(".kv-file-content").css("visibility","hidden"));var e=i.get(0),l=n&&n.length?n.get(0):null,u=e.offsetHeight,d=e.offsetWidth,p=t.getRotation(r);if(h&&(o.find(".kv-file-content").css("visibility","visible"),c.$preview.addClass("hide-content")),i.data("orientation",r),l&&n.data("orientation",r),r<5)return t.setTransform(e,p),void t.setTransform(l,p);var m=Math.atan(d/u),g=Math.sqrt(Math.pow(u,2)+Math.pow(d,2)),v=g?u/Math.cos(Math.PI/2+m)/g:1,_=" scale("+Math.abs(v)+")";t.setTransform(e,p+_),t.setTransform(l,p+_),f&&(i.css("visibility","visible").insertAfter(s).addClass("file-zoom-detail"),s.remove(),a.remove())})))},_validateImageOrientation:function(i,n,r,o,s,a,l,c){var u,d,h=this.autoOrientImage,f=t.getZoomSelector(r," img");(d=(u=h?this._getExifObj(c):null)?u["0th"][piexif.ImageIFD.Orientation]:null)?(this.setImageOrientation(i,e(f),d,this._getFrame(r)),this._raise("fileimageoriented",{$img:i,file:n}),this._validateImage(r,o,s,a,l,c,u)):this._validateImage(r,o,s,a,l,c,u)},_validateImage:function(t,i,n,r,o,s,a){var l,c,u,d=this,h=d.$preview,f=d._getFrame(t),p=f.attr("data-fileindex"),m=f.find("img");n=n||"Untitled",m.one("load",(function(){c=f.width(),u=h.width(),c>u&&m.css("width","100%"),l={ind:p,id:t,fileId:i},d._checkDimensions(p,"Small",m,f,n,"Width",l),d._checkDimensions(p,"Small",m,f,n,"Height",l),d.resizeImage||(d._checkDimensions(p,"Large",m,f,n,"Width",l),d._checkDimensions(p,"Large",m,f,n,"Height",l)),d._raise("fileimageloaded",[t]),d.fileManager.addImage(i,{ind:p,img:m,thumb:f,pid:t,typ:r,siz:o,validated:!1,imgData:s,exifObj:a}),f.data("exif",a),d._validateAllImages()})).one("error",(function(){d._raise("fileimageloaderror",[t])})).each((function(){this.complete?e(this).trigger("load"):this.error&&e(this).trigger("error")}))},_validateAllImages:function(){var t,i=this,n={val:0},r=i.fileManager.getImageCount(),o=i.resizeIfSizeMoreThan;r===i.fileManager.totalImages&&(i._raise("fileimagesloaded"),i.resizeImage&&e.each(i.fileManager.loadedImages,(function(e,s){s.validated||((t=s.siz)&&t>1e3*o&&i._getResizedImage(e,s,n,r),s.validated=!0)})))},_getResizedImage:function(i,n,r,o){var s,a,l,c,u,d,h,f,p,m=this,g=e(n.img)[0],v=g.naturalWidth,_=g.naturalHeight,b=1,y=m.maxImageWidth||v,w=m.maxImageHeight||_,C=!(!v||!_),x=m.imageCanvas,E=m.imageCanvasContext,T=n.typ,k=n.pid,S=n.ind,A=n.thumb,I=n.exifObj;if(u=function(e,t,i){m.isAjaxUpload?m._showFileError(e,t,i):m._showError(e,t,i),m._setPreviewError(A)},f={id:k,index:S,fileId:i},p=[i,k,S],(h=m.fileManager.getFile(i))&&C&&!(v<=y&&_<=w)||(C&&h&&m._raise("fileimageresized",p),r.val++,r.val===o&&m._raise("fileimagesresized"),C)){T=T||m.resizeDefaultImageType,a=v>y,l=_>w,b="width"===m.resizePreference?a?y/v:l?w/_:1:l?w/_:a?y/v:1,m._resetCanvas(),v*=b,_*=b,x.width=v,x.height=_;try{E.drawImage(g,0,0,v,_),c=x.toDataURL(T,m.resizeQuality),I&&(d=window.piexif.dump(I),c=window.piexif.insert(d,c)),s=t.dataURI2Blob(c),m.fileManager.setFile(i,s),m._raise("fileimageresized",p),r.val++,r.val===o&&m._raise("fileimagesresized",[void 0,void 0]),s instanceof Blob||u(m.msgImageResizeError,f,"fileimageresizeerror")}catch(e){r.val++,r.val===o&&m._raise("fileimagesresized",[void 0,void 0]),u(m.msgImageResizeException.replace("{errors}",e.message),f,"fileimageresizeexception")}}else u(m.msgImageResizeError,f,"fileimageresizeerror")},_showProgress:function(){this.$progress&&this.$progress.length&&this.$progress.show()},_hideProgress:function(){this.$progress&&this.$progress.length&&this.$progress.hide()},_initBrowse:function(e){var i=this.$element;this.showBrowse?this.$btnFile=e.find(".btn-file").append(i):(i.appendTo(e).attr("tabindex",-1),t.addCss(i,"file-no-browse"))},_initClickable:function(){var i,n,r=this;r.isClickable&&(i=r.$dropZone,r.isAjaxUpload||(n=r.$preview.find(".file-default-preview")).length&&(i=n),t.addCss(i,"clickable"),i.attr("tabindex",-1),r._handler(i,"click",(function(t){var n=e(t.target);e(r.elErrorContainer+":visible").length||n.parents(".file-preview-thumbnails").length&&!n.parents(".file-default-preview").length||(r.$element.data("zoneClicked",!0).trigger("click"),i.blur())})))},_initCaption:function(){var e=this.initialCaption||"";return this.overwriteInitial||t.isEmpty(e)?(this.$caption.val(""),!1):(this._setCaption(e),!0)},_setCaption:function(i,n){var r,o,s,a,l,c;if(this.$caption.length){if(this.$captionContainer.removeClass("icon-visible"),n)r=e("<div>"+this.msgValidationError+"</div>").text(),(a=this.fileManager.count())?(c=this.fileManager.getFirstFile(),l=1===a&&c?c.nameFmt:this._getMsgSelected(a)):l=this._getMsgSelected(this.msgNo),o=t.isEmpty(i)?l:i,s='<span class="'+this.msgValidationErrorClass+'">'+this.msgValidationErrorIcon+"</span>";else{if(t.isEmpty(i))return;o=r=e("<div>"+i+"</div>").text(),s=this._getLayoutTemplate("fileIcon")}this.$captionContainer.addClass("icon-visible"),this.$caption.attr("title",r).val(o),this.$captionIcon.html(s)}},_createContainer:function(){var t={class:"file-input file-input-new"+(this.rtl?" kv-rtl":"")},i=e(document.createElement("div")).attr(t).html(this._renderMain());return i.insertBefore(this.$element),this._initBrowse(i),this.theme&&i.addClass("theme-"+this.theme),i},_refreshContainer:function(){var e=this.$container;this.$element.insertAfter(e),e.html(this._renderMain()),this._initBrowse(e),this._validateDisabled()},_validateDisabled:function(){this.$caption.attr({readonly:this.isDisabled})},_renderMain:function(){var e=this.dropZoneEnabled?" file-drop-zone":"file-drop-disabled",t=this.showClose?this._getLayoutTemplate("close"):"",i=this.showPreview?this._getLayoutTemplate("preview").setTokens({class:this.previewClass,dropClass:e}):"",n=this.isDisabled?this.captionClass+" file-caption-disabled":this.captionClass,r=this.captionTemplate.setTokens({class:n+" kv-fileinput-caption"});return this.mainTemplate.setTokens({class:this.mainClass+(!this.showBrowse&&this.showCaption?" no-browse":""),preview:i,close:t,caption:r,upload:this._renderButton("upload"),remove:this._renderButton("remove"),cancel:this._renderButton("cancel"),pause:this._renderButton("pause"),browse:this._renderButton("browse")})},_renderButton:function(e){var i=this._getLayoutTemplate("btnDefault"),n=this[e+"Class"],r=this[e+"Title"],o=this[e+"Icon"],s=this[e+"Label"],a=this.isDisabled?" disabled":"",l="button";switch(e){case"remove":if(!this.showRemove)return"";break;case"cancel":if(!this.showCancel)return"";n+=" kv-hidden";break;case"pause":if(!this.showPause)return"";n+=" kv-hidden";break;case"upload":if(!this.showUpload)return"";this.isAjaxUpload&&!this.isDisabled?i=this._getLayoutTemplate("btnLink").replace("{href}",this.uploadUrl):l="submit";break;case"browse":if(!this.showBrowse)return"";i=this._getLayoutTemplate("btnBrowse");break;default:return""}return n+="browse"===e?" btn-file":" fileinput-"+e+" fileinput-"+e+"-button",t.isEmpty(s)||(s=' <span class="'+this.buttonLabelClass+'">'+s+"</span>"),i.setTokens({type:l,css:n,title:r,status:a,icon:o,label:s})},_renderThumbProgress:function(){return'<div class="file-thumb-progress kv-hidden">'+this.progressInfoTemplate.setTokens({percent:101,status:this.msgUploadBegin,stats:""})+"</div>"},_renderFileFooter:function(e,i,n,r,o){var s,a,l=this.fileActionSettings,c=l.showRemove,u=l.showDrag,d=l.showUpload,h=l.showZoom,f=this._getLayoutTemplate("footer"),p=this._getLayoutTemplate("indicator"),m=o?l.indicatorError:l.indicatorNew,g=o?l.indicatorErrorTitle:l.indicatorNewTitle,v=p.setTokens({indicator:m,indicatorTitle:g});return a={type:e,caption:i,size:n=this._getSize(n),width:r,progress:"",indicator:v},this.isAjaxUpload?(a.progress=this._renderThumbProgress(),a.actions=this._renderFileActions(a,d,!1,c,h,u,!1,!1,!1)):a.actions=this._renderFileActions(a,!1,!1,!1,h,u,!1,!1,!1),s=f.setTokens(a),s=t.replaceTags(s,this.previewThumbTags)},_renderFileActions:function(e,t,i,n,r,o,s,a,l,c,u,d){if(!e.type&&c&&(e.type="image"),this.enableResumableUpload?t=!1:"function"==typeof t&&(t=t(e)),"function"==typeof i&&(i=i(e)),"function"==typeof n&&(n=n(e)),"function"==typeof r&&(r=r(e)),"function"==typeof o&&(o=o(e)),!(t||i||n||r||o))return"";var h,f=!1===a?"":' data-url="'+a+'"',p="",m="",g=!1===l?"":' data-key="'+l+'"',v="",_="",b="",y=this._getLayoutTemplate("actions"),w=this.fileActionSettings,C=this.otherActionButtons.setTokens({dataKey:g,key:l}),x=s?w.removeClass+" disabled":w.removeClass;return n&&(v=this._getLayoutTemplate("actionDelete").setTokens({removeClass:x,removeIcon:w.removeIcon,removeTitle:w.removeTitle,dataUrl:f,dataKey:g,key:l})),t&&(_=this._getLayoutTemplate("actionUpload").setTokens({uploadClass:w.uploadClass,uploadIcon:w.uploadIcon,uploadTitle:w.uploadTitle})),i&&(b=(b=this._getLayoutTemplate("actionDownload").setTokens({downloadClass:w.downloadClass,downloadIcon:w.downloadIcon,downloadTitle:w.downloadTitle,downloadUrl:u||this.initialPreviewDownloadUrl})).setTokens({filename:d,key:l})),r&&(p=this._getLayoutTemplate("actionZoom").setTokens({zoomClass:w.zoomClass,zoomIcon:w.zoomIcon,zoomTitle:w.zoomTitle})),o&&c&&(h="drag-handle-init "+w.dragClass,m=this._getLayoutTemplate("actionDrag").setTokens({dragClass:h,dragTitle:w.dragTitle,dragIcon:w.dragIcon})),y.setTokens({delete:v,upload:_,download:b,zoom:p,drag:m,other:C})},_browse:function(e){e&&e.isDefaultPrevented()||!this._raise("filebrowse")||(this.isError&&!this.isAjaxUpload&&this.clear(),this.focusCaptionOnBrowse&&this.$captionContainer.focus())},_change:function(i){var n=this;if(!n.changeTriggered){var r,o,s,a,l=n.$element,c=arguments.length>1,u=n.isAjaxUpload,d=c?arguments[1]:l.get(0).files,h=n.fileManager.count(),f=t.isEmpty(l.attr("multiple")),p=!u&&f?1:n.maxFileCount,m=n.maxTotalFileCount,g=m>0&&m>p,v=f&&h>0,_=function(t,i,r,o){var s=e.extend(!0,{},n._getOutData(null,{},{},d),{id:r,index:o}),a={id:r,index:o,file:i,files:d};return u?n._showFileError(t,s):n._showError(t,a)},b=function(e,t,i){var r=i?n.msgTotalFilesTooMany:n.msgFilesTooMany;r=r.replace("{m}",t).replace("{n}",e),n.isError=_(r,null,null,null),n.$captionContainer.removeClass("icon-visible"),n._setCaption("",!0),n.$container.removeClass("file-input-new file-input-ajax-new")};if(n.reader=null,n._resetUpload(),n._hideFileIcon(),n.dropZoneEnabled&&n.$container.find(".file-drop-zone ."+n.dropZoneTitleClass).remove(),u||(d=i.target&&void 0===i.target.files?i.target.value?[{name:i.target.value.replace(/^.+\\/,"")}]:[]:i.target.files||{}),r=d,t.isEmpty(r)||0===r.length)return u||n.clear(),void n._raise("fileselectnone");if(n._resetErrors(),a=r.length,s=u?n.fileManager.count()+a:a,o=n._getFileCount(s,!g&&void 0),p>0&&o>p){if(!n.autoReplace||a>p)return void b(n.autoReplace&&a>p?a:o,p);o>p&&n._resetPreviewThumbs(u)}else{if(g&&(o=n._getFileCount(s,!0),m>0&&o>m)){if(!n.autoReplace||a>p)return void b(n.autoReplace&&a>m?a:o,m,!0);o>p&&n._resetPreviewThumbs(u)}!u||v?(n._resetPreviewThumbs(!1),v&&n.clearFileStack()):!u||0!==h||n.previewCache.count(!0)&&!n.overwriteInitial||n._resetPreviewThumbs(!0)}n.readFiles(r)}},_abort:function(t){var i;return this.ajaxAborted&&"object"==typeof this.ajaxAborted&&void 0!==this.ajaxAborted.message?((i=e.extend(!0,{},this._getOutData(null),t)).abortData=this.ajaxAborted.data||{},i.abortMessage=this.ajaxAborted.message,this._setProgress(101,this.$progress,this.msgCancelled),this._showFileError(this.ajaxAborted.message,i,"filecustomerror"),this.cancel(),!0):!!this.ajaxAborted},_resetFileStack:function(){var t=this,i=0;t._getThumbs().each((function(){var n=e(this),r=n.attr("data-fileindex"),o=n.attr("id");"-1"!==r&&-1!==r&&(t.fileManager.getFile(n.attr("data-fileid"))?n.attr({"data-fileindex":"-1"}):(n.attr({"data-fileindex":i}),i++),t._getZoom(o).attr({"data-fileindex":n.attr("data-fileindex")}))}))},_isFileSelectionValid:function(e){return e=e||0,this.required&&!this.getFilesCount()?(this.$errorContainer.html(""),this._showFileError(this.msgFileRequired),!1):!(this.minFileCount>0&&this._getFileCount(e)<this.minFileCount)||(this._noFilesError({}),!1)},_canPreview:function(e){if(!(e&&this.showPreview&&this.$preview&&this.$preview.length))return!1;var i,n,r,o=e.name||"",s=e.type||"",a=(e.size||0)/1e3,l=this._parseFileType(s,o),c=this.allowedPreviewTypes,u=this.allowedPreviewMimeTypes,d=this.allowedPreviewExtensions||[],h=this.disabledPreviewTypes,f=this.disabledPreviewMimeTypes,p=this.disabledPreviewExtensions||[],m=this.maxFilePreviewSize&&parseFloat(this.maxFilePreviewSize)||0,g=new RegExp("\\.("+d.join("|")+")$","i"),v=new RegExp("\\.("+p.join("|")+")$","i");return i=!c||-1!==c.indexOf(l),n=!u||-1!==u.indexOf(s),r=!d.length||t.compare(o,g),!(h&&-1!==h.indexOf(l)||f&&-1!==f.indexOf(s)||p.length&&t.compare(o,v)||m&&!isNaN(m)&&a>m)&&(i||n||r)},addToStack:function(e,t){this.fileManager.add(e,t)},clearFileStack:function(){return this.fileManager.clear(),this._initResumableUpload(),this.enableResumableUpload?(null===this.showPause&&(this.showPause=!0),null===this.showCancel&&(this.showCancel=!1)):(this.showPause=!1,null===this.showCancel&&(this.showCancel=!0)),this.$element},getFileStack:function(){return this.fileManager.stack},getFileList:function(){return this.fileManager.list()},getFilesCount:function(e){var t=this.isAjaxUpload?this.fileManager.count():this._inputFileCount();return e&&(t+=this.previewCache.count(!0)),this._getFileCount(t)},readFiles:function(i){this.reader=new FileReader;var n,r=this,o=r.$element,s=r.reader,a=r.$previewContainer,l=r.$previewStatus,c=r.msgLoading,u=r.msgProgress,d=r.previewInitId,h=i.length,f=r.fileTypeSettings,p=r.allowedFileTypes,m=p?p.length:0,g=r.allowedFileExtensions,v=t.isEmpty(g)?"":g.join(", "),_=function(t,o,s,a,l,c){var u,d=e.extend(!0,{},r._getOutData(null,{},{},i),{id:s,index:a,fileId:l}),f={id:s,index:a,fileId:l,file:o,files:i};(c=c||r.removeFromPreviewOnError)||r._previewDefault(o,!0),u=r._getFrame(s,!0),r.isAjaxUpload?setTimeout((function(){n(a+1)}),r.processDelay):(r.unlock(),h=0),c&&u.length?u.remove():(r._initFileActions(),u.find(".kv-file-upload").remove()),r.isError=r.isAjaxUpload?r._showFileError(t,d):r._showError(t,f),r._updateFileDetails(h)};r.fileManager.clearImages(),e.each(i,(function(e,t){var i=r.fileTypeSettings.image;i&&i(t.type)&&r.fileManager.totalImages++})),(n=function(b){var y,w=r.$errorContainer,C=r.fileManager;if(t.isEmpty(o.attr("multiple"))&&(h=1),b>=h)return r.unlock(),r.duplicateErrors.length&&(y="<li>"+r.duplicateErrors.join("</li><li>")+"</li>",0===w.find("ul").length?w.html(r.errorCloseButton+"<ul>"+y+"</ul>"):w.find("ul").append(y),w.fadeIn(r.fadeDelay),r._handler(w.find(".kv-error-close"),"click",(function(){w.fadeOut(r.fadeDelay)})),r.duplicateErrors=[]),r.isAjaxUpload?(r._raise("filebatchselected",[C.stack]),0!==C.count()||r.isError||r.reset()):r._raise("filebatchselected",[i]),a.removeClass("file-thumb-loading"),void l.html("");r.lock(!0);var x,E,T,k,S,A,I,D,P,F,O,N,L,M,j=i[b],R=d+"-"+r._getFileId(j),z=f.text,U=f.image,$=f.html,H=r._getFileName(j,""),B=(j&&j.size||0)/1e3,q="",W=t.createObjectURL(j),V=0,Z="",K=0,Q=function(){var e=u.setTokens({index:b+1,files:h,percent:50,name:H});setTimeout((function(){l.html(e),r._updateFileDetails(h),n(b+1)}),r.processDelay),r._raise("fileloaded",[j,R,b,s])&&r.isAjaxUpload&&C.add(j)};if(j){if(D=C.getId(j),m>0)for(E=0;E<m;E++)A=p[E],I=r.msgFileTypes[A]||A,Z+=0===E?I:", "+I;if(!1!==H){if(0===H.length)return T=r.msgInvalidFileName.replace("{name}",t.htmlEncode(t.getFileName(j),"[unknown]")),void _(T,j,R,b,D);if(t.isEmpty(g)||(q=new RegExp("\\.("+g.join("|")+")$","i")),x=B.toFixed(2),r.isAjaxUpload&&C.exists(D)||r._getFrame(R,!0).length){var Y={id:R,index:b,fileId:D,file:j,files:i};return T=r.msgDuplicateFile.setTokens({name:H,size:x}),void(r.isAjaxUpload?setTimeout((function(){r.duplicateErrors.push(T),r._raise("fileduplicateerror",[j,D,H,x,R,b]),n(b+1),r._updateFileDetails(h)}),r.processDelay):(r._showError(T,Y),r.unlock(),h=0,r._clearFileInput(),r.reset(),r._updateFileDetails(h)))}if(r.maxFileSize>0&&B>r.maxFileSize)return T=r.msgSizeTooLarge.setTokens({name:H,size:x,maxSize:r.maxFileSize}),void _(T,j,R,b,D);if(null!==r.minFileSize&&B<=t.getNum(r.minFileSize))return T=r.msgSizeTooSmall.setTokens({name:H,size:x,minSize:r.minFileSize}),void _(T,j,R,b,D);if(!t.isEmpty(p)&&t.isArray(p)){for(E=0;E<p.length;E+=1)k=p[E],V+=(F=f[k])&&"function"==typeof F&&F(j.type,t.getFileName(j))?1:0;if(0===V)return T=r.msgInvalidFileType.setTokens({name:H,types:Z}),void _(T,j,R,b,D)}if(0===V&&!t.isEmpty(g)&&t.isArray(g)&&!t.isEmpty(q)&&(S=t.compare(H,q),0===(V+=t.isEmpty(S)?0:S.length)))return T=r.msgInvalidFileExtension.setTokens({name:H,extensions:v}),void _(T,j,R,b,D);if(!r._canPreview(j))return P=r.isAjaxUpload&&r._raise("filebeforeload",[j,b,s]),r.isAjaxUpload&&P&&C.add(j),r.showPreview&&P&&(a.addClass("file-thumb-loading"),r._previewDefault(j),r._initFileActions()),void setTimeout((function(){P&&r._updateFileDetails(h),n(b+1),r._raise("fileloaded",[j,R,b])}),10);O=z(j.type,H),N=$(j.type,H),L=U(j.type,H),l.html(c.replace("{index}",b+1).replace("{files}",h)),a.addClass("file-thumb-loading"),s.onerror=function(e){r._errorHandler(e,H)},s.onload=function(i){var n,o,a,l,c,u,d,h,p=[];if(o={name:H,type:j.type},e.each(f,(function(e,t){"object"!==e&&"other"!==e&&"function"==typeof t&&t(j.type,H)&&K++})),0===K){for(a=new Uint8Array(i.target.result),E=0;E<a.length;E++)l=a[E].toString(16),p.push(l);if(n=p.join("").toLowerCase().substring(0,8),u=t.getMimeType(n,"",""),t.isEmpty(u)&&(c=t.arrayBuffer2String(s.result),u=t.isSvg(c)?"image/svg+xml":t.getMimeType(n,c,j.type)),o={name:H,type:u},O=z(u,""),N=$(u,""),L=U(u,""),(M=O||N)||L)return d=M,(h=new FileReader).onerror=function(e){r._errorHandler(e,H)},h.onload=function(e){r.isAjaxUpload&&!r._raise("filebeforeload",[j,b,s])||(r._previewFile(b,j,e,W,o),r._initFileActions(),Q())},void(d?h.readAsText(j,r.textEncoding):h.readAsDataURL(j))}r.isAjaxUpload&&!r._raise("filebeforeload",[j,b,s])||(r._previewFile(b,j,i,W,o),r._initFileActions(),Q())},s.onprogress=function(e){if(e.lengthComputable){var t=e.loaded/e.total*100,i=Math.ceil(t);T=u.setTokens({index:b+1,files:h,percent:i,name:H}),setTimeout((function(){l.html(T)}),r.processDelay)}},O||N?s.readAsText(j,r.textEncoding):L?s.readAsDataURL(j):s.readAsArrayBuffer(j)}else n(b+1)}})(0),r._updateFileDetails(h,!0)},lock:function(e){var t=this.$container;return this._resetErrors(),this.disable(),!e&&this.showCancel&&t.find(".fileinput-cancel").show(),!e&&this.showPause&&t.find(".fileinput-pause").show(),this._raise("filelock",[this.fileManager.stack,this._getExtraData()]),this.$element},unlock:function(e){var t=this.$container;return void 0===e&&(e=!0),this.enable(),t.removeClass("is-locked"),this.showCancel&&t.find(".fileinput-cancel").hide(),this.showPause&&t.find(".fileinput-pause").hide(),e&&this._resetFileStack(),this._raise("fileunlock",[this.fileManager.stack,this._getExtraData()]),this.$element},resume:function(){var e=!1,t=this.resumableManager;return this.enableResumableUpload?(this.paused?this._toggleResumableProgress(this.progressPauseTemplate,this.msgUploadResume):e=!0,this.paused=!1,e&&this._toggleResumableProgress(this.progressInfoTemplate,this.msgUploadBegin),setTimeout((function(){t.upload()}),this.processDelay),this.$element):this.$element},pause:function(){var t,i=this,n=i.resumableManager,r=i.ajaxRequests,o=r.length,s=n.getProgress(),a=i.fileActionSettings;if(!i.enableResumableUpload)return i.$element;if(n.chunkIntervalId&&clearInterval(n.chunkIntervalId),i.ajaxQueueIntervalId&&clearInterval(i.ajaxQueueIntervalId),i._raise("fileuploadpaused",[i.fileManager,n]),o>0)for(t=0;t<o;t+=1)i.paused=!0,r[t].abort();return i.showPreview&&i._getThumbs().each((function(){var t,n=e(this),r=n.attr("data-fileid"),o=i._getLayoutTemplate("stats"),l=n.find(".file-upload-indicator");n.removeClass("file-uploading"),l.attr("title")===a.indicatorLoadingTitle&&(i._setThumbStatus(n,"Paused"),t=o.setTokens({pendingTime:i.msgPaused,uploadSpeed:""}),i.paused=!0,i._setProgress(s,n.find(".file-thumb-progress"),s+"%",t)),i.fileManager.getFile(r)||n.find(".kv-file-remove").removeClass("disabled").removeAttr("disabled")})),i._setProgress(101,i.$progress,i.msgPaused),i.$element},cancel:function(){var t,i=this,n=i.ajaxRequests,r=i.resumableManager,o=n.length;if(i.enableResumableUpload&&r.chunkIntervalId?(clearInterval(r.chunkIntervalId),r.reset(),i._raise("fileuploadcancelled",[i.fileManager,r])):i._raise("fileuploadcancelled",[i.fileManager]),i.ajaxQueueIntervalId&&clearInterval(i.ajaxQueueIntervalId),i._initAjax(),o>0)for(t=0;t<o;t+=1)i.cancelling=!0,n[t].abort();return i._getThumbs().each((function(){var t=e(this),n=t.attr("data-fileid"),r=t.find(".file-thumb-progress");t.removeClass("file-uploading"),i._setProgress(0,r),r.hide(),i.fileManager.getFile(n)||(t.find(".kv-file-upload").removeClass("disabled").removeAttr("disabled"),t.find(".kv-file-remove").removeClass("disabled").removeAttr("disabled")),i.unlock()})),setTimeout((function(){i._setProgressCancelled()}),i.processDelay),i.$element},clear:function(){var i,n=this;if(n._raise("fileclear"))return n.$btnUpload.removeAttr("disabled"),n._getThumbs().find("video,audio,img").each((function(){t.cleanMemory(e(this))})),n._clearFileInput(),n._resetUpload(),n.clearFileStack(),n._resetErrors(!0),n._hasInitialPreview()?(n._showFileIcon(),n._resetPreview(),n._initPreviewActions(),n.$container.removeClass("file-input-new")):(n._getThumbs().each((function(){n._clearObjects(e(this))})),n.isAjaxUpload&&(n.previewCache.data={}),n.$preview.html(""),i=!n.overwriteInitial&&n.initialCaption.length>0?n.initialCaption:"",n.$caption.attr("title","").val(i),t.addCss(n.$container,"file-input-new"),n._validateDefaultPreview()),0===n.$container.find(t.FRAMES).length&&(n._initCaption()||n.$captionContainer.removeClass("icon-visible")),n._hideFileIcon(),n.focusCaptionOnClear&&n.$captionContainer.focus(),n._setFileDropZoneTitle(),n._raise("filecleared"),n.$element},reset:function(){if(this._raise("filereset"))return this.lastProgress=0,this._resetPreview(),this.$container.find(".fileinput-filename").text(""),t.addCss(this.$container,"file-input-new"),this.getFrames().length&&this.$container.removeClass("file-input-new"),this.clearFileStack(),this._setFileDropZoneTitle(),this.$element},disable:function(){var e=this.$container;return this.isDisabled=!0,this._raise("filedisabled"),this.$element.attr("disabled","disabled"),e.addClass("is-locked"),t.addCss(e.find(".btn-file"),"disabled"),e.find(".kv-fileinput-caption").addClass("file-caption-disabled"),e.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").attr("disabled",!0),this._initDragDrop(),this.$element},enable:function(){var e=this.$container;return this.isDisabled=!1,this._raise("fileenabled"),this.$element.removeAttr("disabled"),e.removeClass("is-locked"),e.find(".kv-fileinput-caption").removeClass("file-caption-disabled"),e.find(".fileinput-remove, .fileinput-upload, .file-preview-frame button").removeAttr("disabled"),e.find(".btn-file").removeClass("disabled"),this._initDragDrop(),this.$element},upload:function(){var i,n,r=this,o=r.fileManager,s=o.count(),a=!e.isEmptyObject(r._getExtraData());if(r.isAjaxUpload&&!r.isDisabled&&r._isFileSelectionValid(s)){if(r.lastProgress=0,r._resetUpload(),0!==s||a)return r.cancelling=!1,r._showProgress(),r.lock(),0===s&&a?(r._setProgress(2),void r._uploadExtraOnly()):r.enableResumableUpload?r.resume():((r.uploadAsync||r.enableResumableUpload)&&(n=r._getOutData(null),r._raise("filebatchpreupload",[n]),r.fileBatchCompleted=!1,r.uploadCache=[],e.each(r.getFileStack(),(function(e){var t=r._getThumbId(e);r.uploadCache.push({id:t,content:null,config:null,tags:null,append:!0})})),r.$preview.find(".file-preview-initial").removeClass(t.SORT_CSS),r._initSortable()),r._setProgress(2),r.hasInitData=!1,r.uploadAsync?(i=0,void e.each(o.stack,(function(e){r._uploadSingle(i,e,!0),i++}))):(r._uploadBatch(),r.$element));r._showFileError(r.msgUploadEmpty)}},destroy:function(){var t=this.$form,i=this.$container,n=this.$element,r=this.namespace;return e(document).off(r),e(window).off(r),t&&t.length&&t.off(r),this.isAjaxUpload&&this._clearFileInput(),this._cleanup(),this._initPreviewCache(),n.insertBefore(i).off(r).removeData(),i.off().remove(),n},refresh:function(i){var n=this.$element;return i="object"!=typeof i||t.isEmpty(i)?this.options:e.extend(!0,{},this.options,i),this._init(i,!0),this._listen(),n},zoom:function(e){var i=this._getFrame(e),n=this.$modal;i&&(t.initModal(n),n.html(this._getModalContent()),this._setZoomContent(i),n.modal("show"),this._initZoomButtons())},getExif:function(e){var t=this._getFrame(e);return t&&t.data("exif")||null},getFrames:function(i){var n;return i=i||"",n=this.$preview.find(t.FRAMES+i),this.reversePreviewOrder&&(n=e(n.get().reverse())),n},getPreview:function(){return{content:this.initialPreview,config:this.initialPreviewConfig,tags:this.initialPreviewThumbTags}}},e.fn.fileinput=function(n){if(t.hasFileAPISupport()||t.isIE(9)){var r=Array.apply(null,arguments),o=[];switch(r.shift(),this.each((function(){var s,a=e(this),l=a.data("fileinput"),c="object"==typeof n&&n,u=c.theme||a.data("theme"),d={},h={},f=c.language||a.data("language")||e.fn.fileinput.defaults.language||"en";l||(u&&(h=e.fn.fileinputThemes[u]||{}),"en"===f||t.isEmpty(e.fn.fileinputLocales[f])||(d=e.fn.fileinputLocales[f]||{}),s=e.extend(!0,{},e.fn.fileinput.defaults,h,e.fn.fileinputLocales.en,d,c,a.data()),l=new i(this,s),a.data("fileinput",l)),"string"==typeof n&&o.push(l[n].apply(l,r))})),o.length){case 0:return this;case 1:return o[0];default:return o}}},e.fn.fileinput.defaults={language:"en",showCaption:!0,showBrowse:!0,showPreview:!0,showRemove:!0,showUpload:!0,showUploadStats:!0,showCancel:null,showPause:null,showClose:!0,showUploadedThumbs:!0,showConsoleLogs:!0,browseOnZoneClick:!1,autoReplace:!1,autoOrientImage:function(){var e=window.navigator.userAgent,t=!!e.match(/WebKit/i);return!(!!e.match(/iP(od|ad|hone)/i)&&t&&!e.match(/CriOS/i))},autoOrientImageInitial:!0,required:!1,rtl:!1,hideThumbnailContent:!1,encodeUrl:!0,focusCaptionOnBrowse:!0,focusCaptionOnClear:!0,generateFileId:null,previewClass:"",captionClass:"",frameClass:"krajee-default",mainClass:"file-caption-main",mainTemplate:null,purifyHtml:!0,fileSizeGetter:null,initialCaption:"",initialPreview:[],initialPreviewDelimiter:"*$$*",initialPreviewAsData:!1,initialPreviewFileType:"image",initialPreviewConfig:[],initialPreviewThumbTags:[],previewThumbTags:{},initialPreviewShowDelete:!0,initialPreviewDownloadUrl:"",removeFromPreviewOnError:!1,deleteUrl:"",deleteExtraData:{},overwriteInitial:!0,sanitizeZoomCache:function(t){var i=e(document.createElement("div")).append(t);return i.find("input,select,.file-thumbnail-footer").remove(),i.html()},previewZoomButtonIcons:{prev:'<i class="glyphicon glyphicon-triangle-left"></i>',next:'<i class="glyphicon glyphicon-triangle-right"></i>',toggleheader:'<i class="glyphicon glyphicon-resize-vertical"></i>',fullscreen:'<i class="glyphicon glyphicon-fullscreen"></i>',borderless:'<i class="glyphicon glyphicon-resize-full"></i>',close:'<i class="glyphicon glyphicon-remove"></i>'},previewZoomButtonClasses:{prev:"btn btn-navigate",next:"btn btn-navigate",toggleheader:"btn btn-sm btn-kv btn-default btn-outline-secondary",fullscreen:"btn btn-sm btn-kv btn-default btn-outline-secondary",borderless:"btn btn-sm btn-kv btn-default btn-outline-secondary",close:"btn btn-sm btn-kv btn-default btn-outline-secondary"},previewTemplates:{},previewContentTemplates:{},preferIconicPreview:!1,preferIconicZoomPreview:!1,allowedFileTypes:null,allowedFileExtensions:null,allowedPreviewTypes:void 0,allowedPreviewMimeTypes:null,allowedPreviewExtensions:null,disabledPreviewTypes:void 0,disabledPreviewExtensions:["msi","exe","com","zip","rar","app","vb","scr"],disabledPreviewMimeTypes:null,defaultPreviewContent:null,customLayoutTags:{},customPreviewTags:{},previewFileIcon:'<i class="glyphicon glyphicon-file"></i>',previewFileIconClass:"file-other-icon",previewFileIconSettings:{},previewFileExtSettings:{},buttonLabelClass:"hidden-xs",browseIcon:'<i class="glyphicon glyphicon-folder-open"></i>&nbsp;',browseClass:"btn btn-primary",removeIcon:'<i class="glyphicon glyphicon-trash"></i>',removeClass:"btn btn-default btn-secondary",cancelIcon:'<i class="glyphicon glyphicon-ban-circle"></i>',cancelClass:"btn btn-default btn-secondary",pauseIcon:'<i class="glyphicon glyphicon-pause"></i>',pauseClass:"btn btn-default btn-secondary",uploadIcon:'<i class="glyphicon glyphicon-upload"></i>',uploadClass:"btn btn-default btn-secondary",uploadUrl:null,uploadUrlThumb:null,uploadAsync:!0,uploadParamNames:{chunkCount:"chunkCount",chunkIndex:"chunkIndex",chunkSize:"chunkSize",chunkSizeStart:"chunkSizeStart",chunksUploaded:"chunksUploaded",fileBlob:"fileBlob",fileId:"fileId",fileName:"fileName",fileRelativePath:"fileRelativePath",fileSize:"fileSize",retryCount:"retryCount"},maxAjaxThreads:5,fadeDelay:800,processDelay:100,queueDelay:10,progressDelay:0,enableResumableUpload:!1,resumableUploadOptions:{fallback:null,testUrl:null,chunkSize:2048,maxThreads:4,maxRetries:3,showErrorLog:!0},uploadExtraData:{},zoomModalHeight:480,minImageWidth:null,minImageHeight:null,maxImageWidth:null,maxImageHeight:null,resizeImage:!1,resizePreference:"width",resizeQuality:.92,resizeDefaultImageType:"image/jpeg",resizeIfSizeMoreThan:0,minFileSize:0,maxFileSize:0,maxFilePreviewSize:25600,minFileCount:0,maxFileCount:0,maxTotalFileCount:0,validateInitialCount:!1,msgValidationErrorClass:"text-danger",msgValidationErrorIcon:'<i class="glyphicon glyphicon-exclamation-sign"></i> ',msgErrorClass:"file-error-message",progressThumbClass:"progress-bar progress-bar-striped active",progressClass:"progress-bar bg-success progress-bar-success progress-bar-striped active",progressInfoClass:"progress-bar bg-info progress-bar-info progress-bar-striped active",progressCompleteClass:"progress-bar bg-success progress-bar-success",progressPauseClass:"progress-bar bg-primary progress-bar-primary progress-bar-striped active",progressErrorClass:"progress-bar bg-danger progress-bar-danger",progressUploadThreshold:99,previewFileType:"image",elCaptionContainer:null,elCaptionText:null,elPreviewContainer:null,elPreviewImage:null,elPreviewStatus:null,elErrorContainer:null,errorCloseButton:t.closeButton("kv-error-close"),slugCallback:null,dropZoneEnabled:!0,dropZoneTitleClass:"file-drop-zone-title",fileActionSettings:{},otherActionButtons:"",textEncoding:"UTF-8",ajaxSettings:{},ajaxDeleteSettings:{},showAjaxErrorDetails:!0,mergeAjaxCallbacks:!1,mergeAjaxDeleteCallbacks:!1,retryErrorUploads:!0,reversePreviewOrder:!1,usePdfRenderer:function(){var e=!!window.MSInputMethodContext&&!!document.documentMode;return!!navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/i)||e},pdfRendererUrl:"",pdfRendererTemplate:'<iframe class="kv-preview-data file-preview-pdf" src="{renderer}?file={data}" {style}></iframe>'},e.fn.fileinputLocales.en={fileSingle:"file",filePlural:"files",browseLabel:"Browse &hellip;",removeLabel:"Remove",removeTitle:"Clear all unprocessed files",cancelLabel:"Cancel",cancelTitle:"Abort ongoing upload",pauseLabel:"Pause",pauseTitle:"Pause ongoing upload",uploadLabel:"Upload",uploadTitle:"Upload selected files",msgNo:"No",msgNoFilesSelected:"No files selected",msgCancelled:"Cancelled",msgPaused:"Paused",msgPlaceholder:"Select {files}...",msgZoomModalHeading:"Detailed Preview",msgFileRequired:"You must select a file to upload.",msgSizeTooSmall:'File "{name}" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',msgSizeTooLarge:'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',msgFilesTooLess:"You must select at least <b>{n}</b> {files} to upload.",msgFilesTooMany:"Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.",msgTotalFilesTooMany:"You can upload a maximum of <b>{m}</b> files (<b>{n}</b> files detected).",msgFileNotFound:'File "{name}" not found!',msgFileSecured:'Security restrictions prevent reading the file "{name}".',msgFileNotReadable:'File "{name}" is not readable.',msgFilePreviewAborted:'File preview aborted for "{name}".',msgFilePreviewError:'An error occurred while reading the file "{name}".',msgInvalidFileName:'Invalid or unsupported characters in file name "{name}".',msgInvalidFileType:'Invalid type for file "{name}". Only "{types}" files are supported.',msgInvalidFileExtension:'Invalid extension for file "{name}". Only "{extensions}" files are supported.',msgFileTypes:{image:"image",html:"HTML",text:"text",video:"video",audio:"audio",flash:"flash",pdf:"PDF",object:"object"},msgUploadAborted:"The file upload was aborted",msgUploadThreshold:"Processing...",msgUploadBegin:"Initializing...",msgUploadEnd:"Done",msgUploadResume:"Resuming upload...",msgUploadEmpty:"No valid data available for upload.",msgUploadError:"Upload Error",msgDeleteError:"Delete Error",msgProgressError:"Error",msgValidationError:"Validation Error",msgLoading:"Loading file {index} of {files} &hellip;",msgProgress:"Loading file {index} of {files} - {name} - {percent}% completed.",msgSelected:"{n} {files} selected",msgFoldersNotAllowed:"Drag & drop files only! {n} folder(s) dropped were skipped.",msgImageWidthSmall:'Width of image file "{name}" must be at least {size} px.',msgImageHeightSmall:'Height of image file "{name}" must be at least {size} px.',msgImageWidthLarge:'Width of image file "{name}" cannot exceed {size} px.',msgImageHeightLarge:'Height of image file "{name}" cannot exceed {size} px.',msgImageResizeError:"Could not get the image dimensions to resize.",msgImageResizeException:"Error while resizing the image.<pre>{errors}</pre>",msgAjaxError:"Something went wrong with the {operation} operation. Please try again later!",msgAjaxProgressError:"{operation} failed",msgDuplicateFile:'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.',msgResumableUploadRetriesExceeded:"Upload aborted beyond <b>{max}</b> retries for file <b>{file}</b>! Error Details: <pre>{error}</pre>",msgPendingTime:"{time} remaining",msgCalculatingTime:"calculating time remaining",ajaxOperations:{deleteThumb:"file delete",uploadThumb:"file upload",uploadBatch:"batch file upload",uploadExtra:"form data upload"},dropZoneTitle:"Drag & drop files here &hellip;",dropZoneClickTitle:"<br>(or click to select {files})",previewZoomButtonTitles:{prev:"View previous file",next:"View next file",toggleheader:"Toggle header",fullscreen:"Toggle full screen",borderless:"Toggle borderless mode",close:"Close detailed preview"}},e.fn.fileinput.Constructor=i,e(document).ready((function(){var t=e("input.file[type=file]");t.length&&t.fileinput()}))})?n.apply(t,r):n)||(e.exports=o)}()},function(e,t,i){"use strict";var n,r,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a="object"===("undefined"==typeof window?"undefined":s(window));
+/*! =======================================================
+                      VERSION  10.6.2              
+========================================================= */r=[i(0)],void 0===(o="function"==typeof(n=function(e){var t;return a&&!window.console&&(window.console={}),a&&!window.console.log&&(window.console.log=function(){}),a&&!window.console.warn&&(window.console.warn=function(){}),function(e){var t=Array.prototype.slice;function i(){}!function(e){if(e){var n="undefined"==typeof console?i:function(e){console.error(e)};e.bridget=function(i,r){!function(t){t.prototype.option||(t.prototype.option=function(t){e.isPlainObject(t)&&(this.options=e.extend(!0,this.options,t))})}(r),function(i,r){e.fn[i]=function(o){if("string"==typeof o){for(var s=t.call(arguments,1),a=0,l=this.length;a<l;a++){var c=this[a],u=e.data(c,i);if(u)if(e.isFunction(u[o])&&"_"!==o.charAt(0)){var d=u[o].apply(u,s);if(void 0!==d&&d!==u)return d}else n("no such method '"+o+"' for "+i+" instance");else n("cannot call methods on "+i+" prior to initialization; attempted to call '"+o+"'")}return this}var h=this.map((function(){var t=e.data(this,i);return t?(t.option(o),t._init()):(t=new r(this,o),e.data(this,i,t)),e(this)}));return 1===h.length?h[0]:h}}(i,r)},e.bridget}}(e)}(e),function(e){var i=void 0,n=function(e){return"Invalid input value '"+e+"' passed in"},r={linear:{getValue:function(e,t){return e<t.min?t.min:e>t.max?t.max:e},toValue:function(e){var t=e/100*(this.options.max-this.options.min),i=!0;if(this.options.ticks_positions.length>0){for(var n,o,s,a=0,l=1;l<this.options.ticks_positions.length;l++)if(e<=this.options.ticks_positions[l]){n=this.options.ticks[l-1],s=this.options.ticks_positions[l-1],o=this.options.ticks[l],a=this.options.ticks_positions[l];break}t=n+(e-s)/(a-s)*(o-n),i=!1}var c=(i?this.options.min:0)+Math.round(t/this.options.step)*this.options.step;return r.linear.getValue(c,this.options)},toPercentage:function(e){if(this.options.max===this.options.min)return 0;if(this.options.ticks_positions.length>0){for(var t,i,n,r=0,o=0;o<this.options.ticks.length;o++)if(e<=this.options.ticks[o]){t=o>0?this.options.ticks[o-1]:0,n=o>0?this.options.ticks_positions[o-1]:0,i=this.options.ticks[o],r=this.options.ticks_positions[o];break}if(o>0)return n+(e-t)/(i-t)*(r-n)}return 100*(e-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(e){var t=1-this.options.min,i=Math.log(this.options.min+t),n=Math.log(this.options.max+t),o=Math.exp(i+(n-i)*e/100)-t;return Math.round(o)===n?n:(o=this.options.min+Math.round((o-this.options.min)/this.options.step)*this.options.step,r.linear.getValue(o,this.options))},toPercentage:function(e){if(this.options.max===this.options.min)return 0;var t=1-this.options.min,i=Math.log(this.options.max+t),n=Math.log(this.options.min+t);return 100*(Math.log(e+t)-n)/(i-n)}}};function o(t,i){this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1,tickIndex:null},this.ticksCallbackMap={},this.handleCallbackMap={},"string"==typeof t?this.element=document.querySelector(t):t instanceof HTMLElement&&(this.element=t),i=i||{};for(var n=Object.keys(this.defaultOptions),o=i.hasOwnProperty("min"),s=i.hasOwnProperty("max"),a=0;a<n.length;a++){var l=n[a],c=i[l];c=null!==(c=void 0!==c?c:d(this.element,l))?c:this.defaultOptions[l],this.options||(this.options={}),this.options[l]=c}if(this.ticksAreValid=Array.isArray(this.options.ticks)&&this.options.ticks.length>0,this.ticksAreValid||(this.options.lock_to_ticks=!1),"auto"===this.options.rtl){var u=window.getComputedStyle(this.element);this.options.rtl=null!=u?"rtl"===u.direction:"rtl"===this.element.style.direction}function d(e,t){var i="data-slider-"+t.replace(/_/g,"-"),n=e.getAttribute(i);try{return JSON.parse(n)}catch(e){return n}}"vertical"!==this.options.orientation||"top"!==this.options.tooltip_position&&"bottom"!==this.options.tooltip_position?"horizontal"!==this.options.orientation||"left"!==this.options.tooltip_position&&"right"!==this.options.tooltip_position||(this.options.tooltip_position="top"):this.options.rtl?this.options.tooltip_position="left":this.options.tooltip_position="right";var h,f,p,m,g,v=this.element.style.width,_=!1,b=this.element.parentNode;if(this.sliderElem)_=!0;else{this.sliderElem=document.createElement("div"),this.sliderElem.className="slider";var y=document.createElement("div");y.className="slider-track",(f=document.createElement("div")).className="slider-track-low",(h=document.createElement("div")).className="slider-selection",(p=document.createElement("div")).className="slider-track-high",(m=document.createElement("div")).className="slider-handle min-slider-handle",m.setAttribute("role","slider"),m.setAttribute("aria-valuemin",this.options.min),m.setAttribute("aria-valuemax",this.options.max),(g=document.createElement("div")).className="slider-handle max-slider-handle",g.setAttribute("role","slider"),g.setAttribute("aria-valuemin",this.options.min),g.setAttribute("aria-valuemax",this.options.max),y.appendChild(f),y.appendChild(h),y.appendChild(p),this.rangeHighlightElements=[];var w=this.options.rangeHighlights;if(Array.isArray(w)&&w.length>0)for(var C=0;C<w.length;C++){var x=document.createElement("div"),E=w[C].class||"";x.className="slider-rangeHighlight slider-selection "+E,this.rangeHighlightElements.push(x),y.appendChild(x)}var T=Array.isArray(this.options.labelledby);if(T&&this.options.labelledby[0]&&m.setAttribute("aria-labelledby",this.options.labelledby[0]),T&&this.options.labelledby[1]&&g.setAttribute("aria-labelledby",this.options.labelledby[1]),!T&&this.options.labelledby&&(m.setAttribute("aria-labelledby",this.options.labelledby),g.setAttribute("aria-labelledby",this.options.labelledby)),this.ticks=[],Array.isArray(this.options.ticks)&&this.options.ticks.length>0){for(this.ticksContainer=document.createElement("div"),this.ticksContainer.className="slider-tick-container",a=0;a<this.options.ticks.length;a++){var k=document.createElement("div");if(k.className="slider-tick",this.options.ticks_tooltip){var S=this._addTickListener(),A=S.addMouseEnter(this,k,a),I=S.addMouseLeave(this,k);this.ticksCallbackMap[a]={mouseEnter:A,mouseLeave:I}}this.ticks.push(k),this.ticksContainer.appendChild(k)}h.className+=" tick-slider-selection"}if(this.tickLabels=[],Array.isArray(this.options.ticks_labels)&&this.options.ticks_labels.length>0)for(this.tickLabelContainer=document.createElement("div"),this.tickLabelContainer.className="slider-tick-label-container",a=0;a<this.options.ticks_labels.length;a++){var D=document.createElement("div"),P=0===this.options.ticks_positions.length,F=this.options.reversed&&P?this.options.ticks_labels.length-(a+1):a;D.className="slider-tick-label",D.innerHTML=this.options.ticks_labels[F],this.tickLabels.push(D),this.tickLabelContainer.appendChild(D)}var O=function(e){var t=document.createElement("div");t.className="tooltip-arrow";var i=document.createElement("div");i.className="tooltip-inner",e.appendChild(t),e.appendChild(i)},N=document.createElement("div");N.className="tooltip tooltip-main",N.setAttribute("role","presentation"),O(N);var L=document.createElement("div");L.className="tooltip tooltip-min",L.setAttribute("role","presentation"),O(L);var M=document.createElement("div");M.className="tooltip tooltip-max",M.setAttribute("role","presentation"),O(M),this.sliderElem.appendChild(y),this.sliderElem.appendChild(N),this.sliderElem.appendChild(L),this.sliderElem.appendChild(M),this.tickLabelContainer&&this.sliderElem.appendChild(this.tickLabelContainer),this.ticksContainer&&this.sliderElem.appendChild(this.ticksContainer),this.sliderElem.appendChild(m),this.sliderElem.appendChild(g),b.insertBefore(this.sliderElem,this.element),this.element.style.display="none"}if(e&&(this.$element=e(this.element),this.$sliderElem=e(this.sliderElem)),this.eventToCallbackMap={},this.sliderElem.id=this.options.id,this.touchCapable="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,this.touchX=0,this.touchY=0,this.tooltip=this.sliderElem.querySelector(".tooltip-main"),this.tooltipInner=this.tooltip.querySelector(".tooltip-inner"),this.tooltip_min=this.sliderElem.querySelector(".tooltip-min"),this.tooltipInner_min=this.tooltip_min.querySelector(".tooltip-inner"),this.tooltip_max=this.sliderElem.querySelector(".tooltip-max"),this.tooltipInner_max=this.tooltip_max.querySelector(".tooltip-inner"),r[this.options.scale]&&(this.options.scale=r[this.options.scale]),!0===_&&(this._removeClass(this.sliderElem,"slider-horizontal"),this._removeClass(this.sliderElem,"slider-vertical"),this._removeClass(this.sliderElem,"slider-rtl"),this._removeClass(this.tooltip,"hide"),this._removeClass(this.tooltip_min,"hide"),this._removeClass(this.tooltip_max,"hide"),["left","right","top","width","height"].forEach((function(e){this._removeProperty(this.trackLow,e),this._removeProperty(this.trackSelection,e),this._removeProperty(this.trackHigh,e)}),this),[this.handle1,this.handle2].forEach((function(e){this._removeProperty(e,"left"),this._removeProperty(e,"right"),this._removeProperty(e,"top")}),this),[this.tooltip,this.tooltip_min,this.tooltip_max].forEach((function(e){this._removeProperty(e,"left"),this._removeProperty(e,"right"),this._removeProperty(e,"top"),this._removeClass(e,"right"),this._removeClass(e,"left"),this._removeClass(e,"top")}),this)),"vertical"===this.options.orientation?(this._addClass(this.sliderElem,"slider-vertical"),this.stylePos="top",this.mousePos="pageY",this.sizePos="offsetHeight"):(this._addClass(this.sliderElem,"slider-horizontal"),this.sliderElem.style.width=v,this.options.orientation="horizontal",this.options.rtl?this.stylePos="right":this.stylePos="left",this.mousePos="clientX",this.sizePos="offsetWidth"),this.options.rtl&&this._addClass(this.sliderElem,"slider-rtl"),this._setTooltipPosition(),Array.isArray(this.options.ticks)&&this.options.ticks.length>0&&(s||(this.options.max=Math.max.apply(Math,this.options.ticks)),o||(this.options.min=Math.min.apply(Math,this.options.ticks))),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=f||this.trackLow,this.trackSelection=h||this.trackSelection,this.trackHigh=p||this.trackHigh,"none"===this.options.selection?(this._addClass(this.trackLow,"hide"),this._addClass(this.trackSelection,"hide"),this._addClass(this.trackHigh,"hide")):"after"!==this.options.selection&&"before"!==this.options.selection||(this._removeClass(this.trackLow,"hide"),this._removeClass(this.trackSelection,"hide"),this._removeClass(this.trackHigh,"hide")),this.handle1=m||this.handle1,this.handle2=g||this.handle2,!0===_)for(this._removeClass(this.handle1,"round triangle"),this._removeClass(this.handle2,"round triangle hide"),a=0;a<this.ticks.length;a++)this._removeClass(this.ticks[a],"round triangle hide");if(-1!==["round","triangle","custom"].indexOf(this.options.handle))for(this._addClass(this.handle1,this.options.handle),this._addClass(this.handle2,this.options.handle),a=0;a<this.ticks.length;a++)this._addClass(this.ticks[a],this.options.handle);if(this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this.setValue(this._state.value),this.handle1Keydown=this._keydown.bind(this,0),this.handle1.addEventListener("keydown",this.handle1Keydown,!1),this.handle2Keydown=this._keydown.bind(this,1),this.handle2.addEventListener("keydown",this.handle2Keydown,!1),this.mousedown=this._mousedown.bind(this),this.touchstart=this._touchstart.bind(this),this.touchmove=this._touchmove.bind(this),this.touchCapable&&(this.sliderElem.addEventListener("touchstart",this.touchstart,!1),this.sliderElem.addEventListener("touchmove",this.touchmove,!1)),this.sliderElem.addEventListener("mousedown",this.mousedown,!1),this.resize=this._resize.bind(this),window.addEventListener("resize",this.resize,!1),"hide"===this.options.tooltip)this._addClass(this.tooltip,"hide"),this._addClass(this.tooltip_min,"hide"),this._addClass(this.tooltip_max,"hide");else if("always"===this.options.tooltip)this._showTooltip(),this._alwaysShowTooltip=!0;else{if(this.showTooltip=this._showTooltip.bind(this),this.hideTooltip=this._hideTooltip.bind(this),this.options.ticks_tooltip){var j=this._addTickListener(),R=j.addMouseEnter(this,this.handle1),z=j.addMouseLeave(this,this.handle1);this.handleCallbackMap.handle1={mouseEnter:R,mouseLeave:z},R=j.addMouseEnter(this,this.handle2),z=j.addMouseLeave(this,this.handle2),this.handleCallbackMap.handle2={mouseEnter:R,mouseLeave:z}}else this.sliderElem.addEventListener("mouseenter",this.showTooltip,!1),this.sliderElem.addEventListener("mouseleave",this.hideTooltip,!1),this.touchCapable&&(this.sliderElem.addEventListener("touchstart",this.showTooltip,!1),this.sliderElem.addEventListener("touchmove",this.showTooltip,!1),this.sliderElem.addEventListener("touchend",this.hideTooltip,!1));this.handle1.addEventListener("focus",this.showTooltip,!1),this.handle1.addEventListener("blur",this.hideTooltip,!1),this.handle2.addEventListener("focus",this.showTooltip,!1),this.handle2.addEventListener("blur",this.hideTooltip,!1),this.touchCapable&&(this.handle1.addEventListener("touchstart",this.showTooltip,!1),this.handle1.addEventListener("touchmove",this.showTooltip,!1),this.handle1.addEventListener("touchend",this.hideTooltip,!1),this.handle2.addEventListener("touchstart",this.showTooltip,!1),this.handle2.addEventListener("touchmove",this.showTooltip,!1),this.handle2.addEventListener("touchend",this.hideTooltip,!1))}this.options.enabled?this.enable():this.disable()}(t=function(e,t){return o.call(this,e,t),this}).prototype={_init:function(){},constructor:t,defaultOptions:{id:"",min:0,max:10,step:1,precision:0,orientation:"horizontal",value:5,range:!1,selection:"before",tooltip:"show",tooltip_split:!1,lock_to_ticks:!1,handle:"round",reversed:!1,rtl:"auto",enabled:!0,formatter:function(e){return Array.isArray(e)?e[0]+" : "+e[1]:e},natural_arrow_keys:!1,ticks:[],ticks_positions:[],ticks_labels:[],ticks_snap_bounds:0,ticks_tooltip:!1,scale:"linear",focus:!1,tooltip_position:null,labelledby:null,rangeHighlights:[]},getElement:function(){return this.sliderElem},getValue:function(){return this.options.range?this._state.value:this._state.value[0]},setValue:function(e,t,i){e||(e=0);var n=this.getValue();this._state.value=this._validateInputValue(e);var r=this._applyPrecision.bind(this);this.options.range?(this._state.value[0]=r(this._state.value[0]),this._state.value[1]=r(this._state.value[1]),this.ticksAreValid&&this.options.lock_to_ticks&&(this._state.value[0]=this.options.ticks[this._getClosestTickIndex(this._state.value[0])],this._state.value[1]=this.options.ticks[this._getClosestTickIndex(this._state.value[1])]),this._state.value[0]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[0])),this._state.value[1]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[1]))):(this._state.value=r(this._state.value),this.ticksAreValid&&this.options.lock_to_ticks&&(this._state.value=this.options.ticks[this._getClosestTickIndex(this._state.value)]),this._state.value=[Math.max(this.options.min,Math.min(this.options.max,this._state.value))],this._addClass(this.handle2,"hide"),"after"===this.options.selection?this._state.value[1]=this.options.max:this._state.value[1]=this.options.min),this._setTickIndex(),this.options.max>this.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var o=this.options.range?this._state.value:this._state.value[0];return this._setDataVal(o),!0===t&&this._trigger("slide",o),(Array.isArray(o)?n[0]!==o[0]||n[1]!==o[1]:n!==o)&&!0===i&&this._trigger("change",{oldValue:n,newValue:o}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display="",this._cleanUpEventCallbacksMap(),this.element.removeAttribute("data"),e&&(this._unbindJQueryEventHandlers(),"slider"===i&&this.$element.removeData(i),this.$element.removeData("bootstrapSlider"))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute("tabindex"),this.handle2.removeAttribute("tabindex"),this._addClass(this.sliderElem,"slider-disabled"),this._trigger("slideDisabled"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute("tabindex",0),this.handle2.setAttribute("tabindex",0),this._removeClass(this.sliderElem,"slider-disabled"),this._trigger("slideEnabled"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(e,t){return this._bindNonQueryEventHandler(e,t),this},off:function(t,i){e?(this.$element.off(t,i),this.$sliderElem.off(t,i)):this._unbindNonQueryEventHandler(t,i)},getAttribute:function(e){return e?this.options[e]:this.options},setAttribute:function(e,t){return this.options[e]=t,this},refresh:function(t){var n=this.getValue();return this._removeSliderEventHandlers(),o.call(this,this.element,this.options),t&&!0===t.useCurrentValue&&this.setValue(n),e&&("slider"===i?(e.data(this.element,"slider",this),e.data(this.element,"bootstrapSlider",this)):e.data(this.element,"bootstrapSlider",this)),this},relayout:function(){return this._resize(),this},_removeTooltipListener:function(e,t){this.handle1.removeEventListener(e,t,!1),this.handle2.removeEventListener(e,t,!1)},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener("keydown",this.handle1Keydown,!1),this.handle2.removeEventListener("keydown",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var e=this.ticksContainer.getElementsByClassName("slider-tick"),t=0;t<e.length;t++)e[t].removeEventListener("mouseenter",this.ticksCallbackMap[t].mouseEnter,!1),e[t].removeEventListener("mouseleave",this.ticksCallbackMap[t].mouseLeave,!1);this.handleCallbackMap.handle1&&this.handleCallbackMap.handle2&&(this.handle1.removeEventListener("mouseenter",this.handleCallbackMap.handle1.mouseEnter,!1),this.handle2.removeEventListener("mouseenter",this.handleCallbackMap.handle2.mouseEnter,!1),this.handle1.removeEventListener("mouseleave",this.handleCallbackMap.handle1.mouseLeave,!1),this.handle2.removeEventListener("mouseleave",this.handleCallbackMap.handle2.mouseLeave,!1))}this.handleCallbackMap=null,this.ticksCallbackMap=null,this.showTooltip&&this._removeTooltipListener("focus",this.showTooltip),this.hideTooltip&&this._removeTooltipListener("blur",this.hideTooltip),this.showTooltip&&this.sliderElem.removeEventListener("mouseenter",this.showTooltip,!1),this.hideTooltip&&this.sliderElem.removeEventListener("mouseleave",this.hideTooltip,!1),this.sliderElem.removeEventListener("mousedown",this.mousedown,!1),this.touchCapable&&(this.showTooltip&&(this.handle1.removeEventListener("touchstart",this.showTooltip,!1),this.handle1.removeEventListener("touchmove",this.showTooltip,!1),this.handle2.removeEventListener("touchstart",this.showTooltip,!1),this.handle2.removeEventListener("touchmove",this.showTooltip,!1)),this.hideTooltip&&(this.handle1.removeEventListener("touchend",this.hideTooltip,!1),this.handle2.removeEventListener("touchend",this.hideTooltip,!1)),this.showTooltip&&(this.sliderElem.removeEventListener("touchstart",this.showTooltip,!1),this.sliderElem.removeEventListener("touchmove",this.showTooltip,!1)),this.hideTooltip&&this.sliderElem.removeEventListener("touchend",this.hideTooltip,!1),this.sliderElem.removeEventListener("touchstart",this.touchstart,!1),this.sliderElem.removeEventListener("touchmove",this.touchmove,!1)),window.removeEventListener("resize",this.resize,!1)},_bindNonQueryEventHandler:function(e,t){void 0===this.eventToCallbackMap[e]&&(this.eventToCallbackMap[e]=[]),this.eventToCallbackMap[e].push(t)},_unbindNonQueryEventHandler:function(e,t){var i=this.eventToCallbackMap[e];if(void 0!==i)for(var n=0;n<i.length;n++)if(i[n]===t){i.splice(n,1);break}},_cleanUpEventCallbacksMap:function(){for(var e=Object.keys(this.eventToCallbackMap),t=0;t<e.length;t++){var i=e[t];delete this.eventToCallbackMap[i]}},_showTooltip:function(){!1===this.options.tooltip_split?(this._addClass(this.tooltip,"in"),this.tooltip_min.style.display="none",this.tooltip_max.style.display="none"):(this._addClass(this.tooltip_min,"in"),this._addClass(this.tooltip_max,"in"),this.tooltip.style.display="none"),this._state.over=!0},_hideTooltip:function(){!1===this._state.inDrag&&!0!==this._alwaysShowTooltip&&(this._removeClass(this.tooltip,"in"),this._removeClass(this.tooltip_min,"in"),this._removeClass(this.tooltip_max,"in")),this._state.over=!1},_setToolTipOnMouseOver:function(e){var t=this,i=this.options.formatter(e?e.value[0]:this._state.value[0]),n=r(e||this._state,this.options.reversed);function r(e,i){return i?[100-e.percentage[0],t.options.range?100-e.percentage[1]:e.percentage[1]]:[e.percentage[0],e.percentage[1]]}this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=n[0]+"%"},_copyState:function(){return{value:[this._state.value[0],this._state.value[1]],enabled:this._state.enabled,offset:this._state.offset,size:this._state.size,percentage:[this._state.percentage[0],this._state.percentage[1],this._state.percentage[2]],inDrag:this._state.inDrag,over:this._state.over,dragged:this._state.dragged,keyCtrl:this._state.keyCtrl}},_addTickListener:function(){return{addMouseEnter:function(e,t,i){var n=function(){var n=e._copyState(),r=t===e.handle1?n.value[0]:n.value[1],o=void 0;void 0!==i?(r=e.options.ticks[i],o=e.options.ticks_positions.length>0&&e.options.ticks_positions[i]||e._toPercentage(e.options.ticks[i])):o=e._toPercentage(r),n.value[0]=r,n.percentage[0]=o,e._setToolTipOnMouseOver(n),e._showTooltip()};return t.addEventListener("mouseenter",n,!1),n},addMouseLeave:function(e,t){var i=function(){e._hideTooltip()};return t.addEventListener("mouseleave",i,!1),i}}},_layout:function(){var e,t,i;if(e=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=e[0]+"%",this.handle1.setAttribute("aria-valuenow",this._state.value[0]),t=this.options.formatter(this._state.value[0]),isNaN(t)?this.handle1.setAttribute("aria-valuetext",t):this.handle1.removeAttribute("aria-valuetext"),this.handle2.style[this.stylePos]=e[1]+"%",this.handle2.setAttribute("aria-valuenow",this._state.value[1]),t=this.options.formatter(this._state.value[1]),isNaN(t)?this.handle2.setAttribute("aria-valuetext",t):this.handle2.removeAttribute("aria-valuetext"),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var n=0;n<this.options.rangeHighlights.length;n++){var r=this._toPercentage(this.options.rangeHighlights[n].start),o=this._toPercentage(this.options.rangeHighlights[n].end);if(this.options.reversed){var s=100-o;o=100-r,r=s}var a=this._createHighlightRange(r,o);a?"vertical"===this.options.orientation?(this.rangeHighlightElements[n].style.top=a.start+"%",this.rangeHighlightElements[n].style.height=a.size+"%"):(this.options.rtl?this.rangeHighlightElements[n].style.right=a.start+"%":this.rangeHighlightElements[n].style.left=a.start+"%",this.rangeHighlightElements[n].style.width=a.size+"%"):this.rangeHighlightElements[n].style.display="none"}if(Array.isArray(this.options.ticks)&&this.options.ticks.length>0){var l,c="vertical"===this.options.orientation?"height":"width";l="vertical"===this.options.orientation?"marginTop":this.options.rtl?"marginRight":"marginLeft";var u=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var d=0;if(0===this.options.ticks_positions.length)"vertical"!==this.options.orientation&&(this.tickLabelContainer.style[l]=-u/2+"px"),d=this.tickLabelContainer.offsetHeight;else for(h=0;h<this.tickLabelContainer.childNodes.length;h++)this.tickLabelContainer.childNodes[h].offsetHeight>d&&(d=this.tickLabelContainer.childNodes[h].offsetHeight);"horizontal"===this.options.orientation&&(this.sliderElem.style.marginBottom=d+"px")}for(var h=0;h<this.options.ticks.length;h++){var f=this.options.ticks_positions[h]||this._toPercentage(this.options.ticks[h]);this.options.reversed&&(f=100-f),this.ticks[h].style[this.stylePos]=f+"%",this._removeClass(this.ticks[h],"in-selection"),this.options.range?f>=e[0]&&f<=e[1]&&this._addClass(this.ticks[h],"in-selection"):("after"===this.options.selection&&f>=e[0]||"before"===this.options.selection&&f<=e[0])&&this._addClass(this.ticks[h],"in-selection"),this.tickLabels[h]&&(this.tickLabels[h].style[c]=u+"px","vertical"!==this.options.orientation&&void 0!==this.options.ticks_positions[h]?(this.tickLabels[h].style.position="absolute",this.tickLabels[h].style[this.stylePos]=f+"%",this.tickLabels[h].style[l]=-u/2+"px"):"vertical"===this.options.orientation&&(this.options.rtl?this.tickLabels[h].style.marginRight=this.sliderElem.offsetWidth+"px":this.tickLabels[h].style.marginLeft=this.sliderElem.offsetWidth+"px",this.tickLabelContainer.style[l]=this.sliderElem.offsetWidth/2*-1+"px"),this._removeClass(this.tickLabels[h],"label-in-selection label-is-selection"),this.options.range?f>=e[0]&&f<=e[1]&&(this._addClass(this.tickLabels[h],"label-in-selection"),(f===e[0]||e[1])&&this._addClass(this.tickLabels[h],"label-is-selection")):(("after"===this.options.selection&&f>=e[0]||"before"===this.options.selection&&f<=e[0])&&this._addClass(this.tickLabels[h],"label-in-selection"),f===e[0]&&this._addClass(this.tickLabels[h],"label-is-selection")))}}if(this.options.range){i=this.options.formatter(this._state.value),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=(e[1]+e[0])/2+"%";var p=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,p);var m=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,m),this.tooltip_min.style[this.stylePos]=e[0]+"%",this.tooltip_max.style[this.stylePos]=e[1]+"%"}else i=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,i),this.tooltip.style[this.stylePos]=e[0]+"%";if("vertical"===this.options.orientation)this.trackLow.style.top="0",this.trackLow.style.height=Math.min(e[0],e[1])+"%",this.trackSelection.style.top=Math.min(e[0],e[1])+"%",this.trackSelection.style.height=Math.abs(e[0]-e[1])+"%",this.trackHigh.style.bottom="0",this.trackHigh.style.height=100-Math.min(e[0],e[1])-Math.abs(e[0]-e[1])+"%";else{"right"===this.stylePos?this.trackLow.style.right="0":this.trackLow.style.left="0",this.trackLow.style.width=Math.min(e[0],e[1])+"%","right"===this.stylePos?this.trackSelection.style.right=Math.min(e[0],e[1])+"%":this.trackSelection.style.left=Math.min(e[0],e[1])+"%",this.trackSelection.style.width=Math.abs(e[0]-e[1])+"%","right"===this.stylePos?this.trackHigh.style.left="0":this.trackHigh.style.right="0",this.trackHigh.style.width=100-Math.min(e[0],e[1])-Math.abs(e[0]-e[1])+"%";var g=this.tooltip_min.getBoundingClientRect(),v=this.tooltip_max.getBoundingClientRect();"bottom"===this.options.tooltip_position?g.right>v.left?(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top="",this.tooltip_max.style.bottom="22px"):(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=""):g.right>v.left?(this._removeClass(this.tooltip_max,"top"),this._addClass(this.tooltip_max,"bottom"),this.tooltip_max.style.top="18px"):(this._removeClass(this.tooltip_max,"bottom"),this._addClass(this.tooltip_max,"top"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(e,t){return this._isHighlightRange(e,t)?e>t?{start:t,size:e-t}:{start:e,size:t-e}:null},_isHighlightRange:function(e,t){return 0<=e&&e<=100&&0<=t&&t<=100},_resize:function(e){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(e,t){e.style.removeProperty?e.style.removeProperty(t):e.style.removeAttribute(t)},_mousedown:function(e){if(!this._state.enabled)return!1;e.preventDefault&&e.preventDefault(),this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var t=this._getPercentage(e);if(this.options.range){var i=Math.abs(this._state.percentage[0]-t),n=Math.abs(this._state.percentage[1]-t);this._state.dragged=i<n?0:1,this._adjustPercentageForRangeSliders(t)}else this._state.dragged=0;this._state.percentage[this._state.dragged]=t,this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),this.mousemove&&document.removeEventListener("mousemove",this.mousemove,!1),this.mouseup&&document.removeEventListener("mouseup",this.mouseup,!1),this.mousemove=this._mousemove.bind(this),this.mouseup=this._mouseup.bind(this),this.touchCapable&&(document.addEventListener("touchmove",this.mousemove,!1),document.addEventListener("touchend",this.mouseup,!1)),document.addEventListener("mousemove",this.mousemove,!1),document.addEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!0;var r=this._calculateValue();return this._trigger("slideStart",r),this.setValue(r,!1,!0),e.returnValue=!1,this.options.focus&&this._triggerFocusOnHandle(this._state.dragged),!0},_touchstart:function(e){this._mousedown(e)},_triggerFocusOnHandle:function(e){0===e&&this.handle1.focus(),1===e&&this.handle2.focus()},_keydown:function(e,t){if(!this._state.enabled)return!1;var i;switch(t.keyCode){case 37:case 40:i=-1;break;case 39:case 38:i=1}if(i){if(this.options.natural_arrow_keys){var n="horizontal"===this.options.orientation,r="vertical"===this.options.orientation,o=this.options.rtl,s=this.options.reversed;n?o?s||(i=-i):s&&(i=-i):r&&(s||(i=-i))}var a;if(this.ticksAreValid&&this.options.lock_to_ticks){var l=void 0;-1===(l=this.options.ticks.indexOf(this._state.value[e]))&&(l=0,window.console.warn("(lock_to_ticks) _keydown: index should not be -1")),l+=i,l=Math.max(0,Math.min(this.options.ticks.length-1,l)),a=this.options.ticks[l]}else a=this._state.value[e]+i*this.options.step;var c=this._toPercentage(a);if(this._state.keyCtrl=e,this.options.range){this._adjustPercentageForRangeSliders(c);var u=this._state.keyCtrl?this._state.value[0]:a,d=this._state.keyCtrl?a:this._state.value[1];a=[Math.max(this.options.min,Math.min(this.options.max,u)),Math.max(this.options.min,Math.min(this.options.max,d))]}else a=Math.max(this.options.min,Math.min(this.options.max,a));return this._trigger("slideStart",a),this.setValue(a,!0,!0),this._trigger("slideStop",a),this._pauseEvent(t),delete this._state.keyCtrl,!1}},_pauseEvent:function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1},_mousemove:function(e){if(!this._state.enabled)return!1;var t=this._getPercentage(e);this._adjustPercentageForRangeSliders(t),this._state.percentage[this._state.dragged]=t;var i=this._calculateValue(!0);return this.setValue(i,!0,!0),!1},_touchmove:function(e){void 0!==e.changedTouches&&e.preventDefault&&e.preventDefault()},_adjustPercentageForRangeSliders:function(e){if(this.options.range){var t=this._getNumDigitsAfterDecimalPlace(e);t=t?t-1:0;var i=this._applyToFixedAndParseFloat(e,t);0===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[1],t)<i?(this._state.percentage[0]=this._state.percentage[1],this._state.dragged=1):1===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[0],t)>i?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._toPercentage(this._state.value[1])<e?(this._state.percentage[0]=this._state.percentage[1],this._state.keyCtrl=1,this.handle2.focus()):1===this._state.keyCtrl&&this._toPercentage(this._state.value[0])>e&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(e){if(!this._state.enabled)return!1;var t=this._getPercentage(e);this._adjustPercentageForRangeSliders(t),this._state.percentage[this._state.dragged]=t,this.touchCapable&&(document.removeEventListener("touchmove",this.mousemove,!1),document.removeEventListener("touchend",this.mouseup,!1)),document.removeEventListener("mousemove",this.mousemove,!1),document.removeEventListener("mouseup",this.mouseup,!1),this._state.inDrag=!1,!1===this._state.over&&this._hideTooltip();var i=this._calculateValue(!0);return this.setValue(i,!1,!0),this._trigger("slideStop",i),this._state.dragged=null,!1},_setValues:function(e,t){var i=0===e?0:100;this._state.percentage[e]!==i&&(t.data[e]=this._toValue(this._state.percentage[e]),t.data[e]=this._applyPrecision(t.data[e]))},_calculateValue:function(e){var t={};return this.options.range?(t.data=[this.options.min,this.options.max],this._setValues(0,t),this._setValues(1,t),e&&(t.data[0]=this._snapToClosestTick(t.data[0]),t.data[1]=this._snapToClosestTick(t.data[1]))):(t.data=this._toValue(this._state.percentage[0]),t.data=parseFloat(t.data),t.data=this._applyPrecision(t.data),e&&(t.data=this._snapToClosestTick(t.data))),t.data},_snapToClosestTick:function(e){for(var t=[e,1/0],i=0;i<this.options.ticks.length;i++){var n=Math.abs(this.options.ticks[i]-e);n<=t[1]&&(t=[this.options.ticks[i],n])}return t[1]<=this.options.ticks_snap_bounds?t[0]:e},_applyPrecision:function(e){var t=this.options.precision||this._getNumDigitsAfterDecimalPlace(this.options.step);return this._applyToFixedAndParseFloat(e,t)},_getNumDigitsAfterDecimalPlace:function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},_applyToFixedAndParseFloat:function(e,t){var i=e.toFixed(t);return parseFloat(i)},_getPercentage:function(e){!this.touchCapable||"touchstart"!==e.type&&"touchmove"!==e.type&&"touchend"!==e.type||(e=e.changedTouches[0]);var t=e[this.mousePos]-this._state.offset[this.stylePos];"right"===this.stylePos&&(t=-t);var i=t/this._state.size*100;return i=Math.round(i/this._state.percentage[2])*this._state.percentage[2],this.options.reversed&&(i=100-i),Math.max(0,Math.min(100,i))},_validateInputValue:function(e){if(isNaN(+e)){if(Array.isArray(e))return this._validateArray(e),e;throw new Error(n(e))}return+e},_validateArray:function(e){for(var t=0;t<e.length;t++){var i=e[t];if("number"!=typeof i)throw new Error(n(i))}},_setDataVal:function(e){this.element.setAttribute("data-value",e),this.element.setAttribute("value",e),this.element.value=e},_trigger:function(t,i){i=i||0===i?i:void 0;var n=this.eventToCallbackMap[t];if(n&&n.length)for(var r=0;r<n.length;r++)(0,n[r])(i);e&&this._triggerJQueryEvent(t,i)},_triggerJQueryEvent:function(e,t){var i={type:e,value:t};this.$element.trigger(i),this.$sliderElem.trigger(i)},_unbindJQueryEventHandlers:function(){this.$element.off(),this.$sliderElem.off()},_setText:function(e,t){void 0!==e.textContent?e.textContent=t:void 0!==e.innerText&&(e.innerText=t)},_removeClass:function(e,t){for(var i=t.split(" "),n=e.className,r=0;r<i.length;r++){var o=i[r],s=new RegExp("(?:\\s|^)"+o+"(?:\\s|$)");n=n.replace(s," ")}e.className=n.trim()},_addClass:function(e,t){for(var i=t.split(" "),n=e.className,r=0;r<i.length;r++){var o=i[r];new RegExp("(?:\\s|^)"+o+"(?:\\s|$)").test(n)||(n+=" "+o)}e.className=n.trim()},_offsetLeft:function(e){return e.getBoundingClientRect().left},_offsetRight:function(e){return e.getBoundingClientRect().right},_offsetTop:function(e){for(var t=e.offsetTop;(e=e.offsetParent)&&!isNaN(e.offsetTop);)t+=e.offsetTop,"BODY"!==e.tagName&&(t-=e.scrollTop);return t},_offset:function(e){return{left:this._offsetLeft(e),right:this._offsetRight(e),top:this._offsetTop(e)}},_css:function(t,i,n){if(e)e.style(t,i,n);else{var r=i.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}));t.style[r]=n}},_toValue:function(e){return this.options.scale.toValue.apply(this,[e])},_toPercentage:function(e){return this.options.scale.toPercentage.apply(this,[e])},_setTooltipPosition:function(){var e=[this.tooltip,this.tooltip_min,this.tooltip_max];if("vertical"===this.options.orientation){var t,i="left"===(t=this.options.tooltip_position?this.options.tooltip_position:this.options.rtl?"left":"right")?"right":"left";e.forEach(function(e){this._addClass(e,t),e.style[i]="100%"}.bind(this))}else"bottom"===this.options.tooltip_position?e.forEach(function(e){this._addClass(e,"bottom"),e.style.top="22px"}.bind(this)):e.forEach(function(e){this._addClass(e,"top"),e.style.top=-this.tooltip.outerHeight-14+"px"}.bind(this))},_getClosestTickIndex:function(e){for(var t=Math.abs(e-this.options.ticks[0]),i=0,n=0;n<this.options.ticks.length;++n){var r=Math.abs(e-this.options.ticks[n]);r<t&&(t=r,i=n)}return i},_setTickIndex:function(){this.ticksAreValid&&(this._state.tickIndex=[this.options.ticks.indexOf(this._state.value[0]),this.options.ticks.indexOf(this._state.value[1])])}},e&&e.fn&&(e.fn.slider?(a&&window.console.warn("bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead."),i="bootstrapSlider"):(e.bridget("slider",t),i="slider"),e.bridget("bootstrapSlider",t),e((function(){e("input[data-provide=slider]")[i]()})))}(e),t})?n.apply(t,r):n)||(e.exports=o)},function(e,t,i){var n,r,o;
+/*!
+ * jQuery Mousewheel 3.1.13
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ */r=[i(0)],void 0===(o="function"==typeof(n=function(e){var t,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(e.event.fixHooks)for(var s=n.length;s;)e.event.fixHooks[n[--s]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],l,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),n=i["offsetParent"in e.fn?"offsetParent":"parent"]();return n.length||(n=e("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(n){var r=n||window.event,s=o.call(arguments,1),l=0,d=0,h=0,f=0,p=0,m=0;if((n=e.event.fix(r)).type="mousewheel","detail"in r&&(h=-1*r.detail),"wheelDelta"in r&&(h=r.wheelDelta),"wheelDeltaY"in r&&(h=r.wheelDeltaY),"wheelDeltaX"in r&&(d=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(d=-1*h,h=0),l=0===h?d:h,"deltaY"in r&&(l=h=-1*r.deltaY),"deltaX"in r&&(d=r.deltaX,0===h&&(l=-1*d)),0!==h||0!==d){if(1===r.deltaMode){var g=e.data(this,"mousewheel-line-height");l*=g,h*=g,d*=g}else if(2===r.deltaMode){var v=e.data(this,"mousewheel-page-height");l*=v,h*=v,d*=v}if(f=Math.max(Math.abs(h),Math.abs(d)),(!i||f<i)&&(i=f,u(r,f)&&(i/=40)),u(r,f)&&(l/=40,d/=40,h/=40),l=Math[l>=1?"floor":"ceil"](l/i),d=Math[d>=1?"floor":"ceil"](d/i),h=Math[h>=1?"floor":"ceil"](h/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var _=this.getBoundingClientRect();p=n.clientX-_.left,m=n.clientY-_.top}return n.deltaX=d,n.deltaY=h,n.deltaFactor=i,n.offsetX=p,n.offsetY=m,n.deltaMode=0,s.unshift(n,l,d,h),t&&clearTimeout(t),t=setTimeout(c,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function c(){i=null}function u(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})?n.apply(t,r):n)||(e.exports=o)},function(e,t,i){var n,r;i(9),n=[i(0)],void 0===(r=function(e){return function(){var t,i,n,r=0,o="error",s="info",a="success",l="warning",c={clear:function(i,n){var r=p();t||u(r),d(i,r,n)||function(i){for(var n=t.children(),r=n.length-1;r>=0;r--)d(e(n[r]),i)}(r)},remove:function(i){var n=p();t||u(n),i&&0===e(":focus",i).length?m(i):t.children().length&&t.remove()},error:function(e,t,i){return f({type:o,iconClass:p().iconClasses.error,message:e,optionsOverride:i,title:t})},getContainer:u,info:function(e,t,i){return f({type:s,iconClass:p().iconClasses.info,message:e,optionsOverride:i,title:t})},options:{},subscribe:function(e){i=e},success:function(e,t,i){return f({type:a,iconClass:p().iconClasses.success,message:e,optionsOverride:i,title:t})},version:"2.1.4",warning:function(e,t,i){return f({type:l,iconClass:p().iconClasses.warning,message:e,optionsOverride:i,title:t})}};return c;function u(i,n){return i||(i=p()),(t=e("#"+i.containerId)).length||n&&(t=function(i){return(t=e("<div/>").attr("id",i.containerId).addClass(i.positionClass)).appendTo(e(i.target)),t}(i)),t}function d(t,i,n){var r=!(!n||!n.force)&&n.force;return!(!t||!r&&0!==e(":focus",t).length||(t[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){m(t)}}),0))}function h(e){i&&i(e)}function f(i){var o=p(),s=i.iconClass||o.iconClass;if(void 0!==i.optionsOverride&&(o=e.extend(o,i.optionsOverride),s=i.optionsOverride.iconClass||s),!function(e,t){if(e.preventDuplicates){if(t.message===n)return!0;n=t.message}return!1}(o,i)){r++,t=u(o,!0);var a=null,l=e("<div/>"),c=e("<div/>"),d=e("<div/>"),f=e("<div/>"),g=e(o.closeHtml),v={intervalId:null,hideEta:null,maxHideTime:null},_={toastId:r,state:"visible",startTime:new Date,options:o,map:i};return i.iconClass&&l.addClass(o.toastClass).addClass(s),function(){if(i.title){var e=i.title;o.escapeHtml&&(e=b(i.title)),c.append(e).addClass(o.titleClass),l.append(c)}}(),function(){if(i.message){var e=i.message;o.escapeHtml&&(e=b(i.message)),d.append(e).addClass(o.messageClass),l.append(d)}}(),o.closeButton&&(g.addClass(o.closeClass).attr("role","button"),l.prepend(g)),o.progressBar&&(f.addClass(o.progressClass),l.prepend(f)),o.rtl&&l.addClass("rtl"),o.newestOnTop?t.prepend(l):t.append(l),function(){var e="";switch(i.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}l.attr("aria-live",e)}(),l.hide(),l[o.showMethod]({duration:o.showDuration,easing:o.showEasing,complete:o.onShown}),o.timeOut>0&&(a=setTimeout(y,o.timeOut),v.maxHideTime=parseFloat(o.timeOut),v.hideEta=(new Date).getTime()+v.maxHideTime,o.progressBar&&(v.intervalId=setInterval(x,10))),o.closeOnHover&&l.hover(C,w),!o.onclick&&o.tapToDismiss&&l.click(y),o.closeButton&&g&&g.click((function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&!0!==e.cancelBubble&&(e.cancelBubble=!0),o.onCloseClick&&o.onCloseClick(e),y(!0)})),o.onclick&&l.click((function(e){o.onclick(e),y()})),h(_),o.debug&&console&&console.log(_),l}function b(e){return null==e&&(e=""),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function y(t){var i=t&&!1!==o.closeMethod?o.closeMethod:o.hideMethod,n=t&&!1!==o.closeDuration?o.closeDuration:o.hideDuration,r=t&&!1!==o.closeEasing?o.closeEasing:o.hideEasing;if(!e(":focus",l).length||t)return clearTimeout(v.intervalId),l[i]({duration:n,easing:r,complete:function(){m(l),clearTimeout(a),o.onHidden&&"hidden"!==_.state&&o.onHidden(),_.state="hidden",_.endTime=new Date,h(_)}})}function w(){(o.timeOut>0||o.extendedTimeOut>0)&&(a=setTimeout(y,o.extendedTimeOut),v.maxHideTime=parseFloat(o.extendedTimeOut),v.hideEta=(new Date).getTime()+v.maxHideTime)}function C(){clearTimeout(a),v.hideEta=0,l.stop(!0,!0)[o.showMethod]({duration:o.showDuration,easing:o.showEasing})}function x(){var e=(v.hideEta-(new Date).getTime())/v.maxHideTime*100;f.width(e+"%")}}function p(){return e.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},c.options)}function m(e){t||(t=u()),e.is(":visible")||(e.remove(),e=null,0===t.children().length&&(t.remove(),n=void 0))}}()}.apply(t,n))||(e.exports=r)},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,i){"use strict";$(document).ready((function(){$(".open-button").on("click",(function(e){e.preventDefault();var t=$("#contact-form-container");$.ajax({type:"GET",url:"/contact/form"}).done((function(e){t.replaceWith(e),document.getElementById("contact-form-yb-frontend").style.display="block"})).fail((function(e){e.status,window.toastr.error(translateText("Something went wrong! Please try again!"))}))})),$(".cancel").on("click",(function(){document.getElementById("contact-form-yb-frontend").style.display="none"})),$("#send-expert-contact-form").on("click",(function(e){e.preventDefault();var t=$("#contact_form");$.ajax({type:"POST",url:"/contact/save-contact-message",data:$(t).serialize()}).done((function(e){"success"===e.message.type?($('input[name="email"]').val(""),$('input[name="name"]').val(""),$('textarea[name="message"]').val(""),document.getElementById("contact-form-yb-frontend").style.display="none",window.toastr.success(translateText(e.message.text))):window.toastr.error(translateText(e.message.text))})).fail((function(e){switch(e.status){case 422:var t=JSON.parse(translateText(e.responseText));window.toastr.error(t);break;case 401:var i=JSON.parse(translateText(e.responseText));redirectTo(i.redirect);break;default:window.toastr.error(translateText("Unexpected error. Please try again!"))}}))}))})),window.validateContactUsForm=function(){event.preventDefault(),$(".contactUsFormErrors").hide();var e=!0;if(!$(".g-recaptcha")[0].dataset.sitekey)return e=!1,$("#contactUsErrors").show(),$("#recaptchaSiteKeyEmpty").show(),!1;""==$("#contact_form #name").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyName").show()),""==$("#contact_form #email").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyEmail").show()),""==$("#contact_form #message").val()&&(e=!1,$("#contactUsErrors").show(),$("#contactUsEmptyText").show()),1==e&&grecaptcha.execute()},window.submitContactUsForm=function(){$("#contact_form").submit()}},function(e,t,i){"use strict";$(document).ready((function(){$(document).on("click",".language-container .language-active",(function(){$(".language-list").slideToggle("fast")})),$(document).on("click",".language-container .language",(function(){var e=$(this),t=$(this).data("language-key"),i=e.find("img").attr("src");$(".language-container .language-active").find("img").attr("src",i),$(".language-list").slideToggle("fast"),$(".language-list .language").removeClass("active"),$.post("/language/change",{languageKey:t}).done((function(){e.addClass("active"),location.reload()}))}))}))},function(e,t,i){"use strict";$(document).ready((function(){var e={previewTemplates:{image:'<div class="file-preview-frame krajee-default kv-preview-thumb" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}">\n   <div class="kv-file-content" style="width: 100%;">       <img src="{data}" class="kv-preview-data file-preview-image" title="{caption}" alt="{caption}"            style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n   </div>\n</div>\n'},layoutTemplates:{footer:""},showRemove:!1,showUpload:!1,showCancel:!1,initialPreviewShowDelete:!1,dropZoneEnabled:!1,required:!1,showClose:!1,browseClass:"btn btn-default",browseLabel:"Browse",removeClass:"btn btn-default",uploadClass:"btn btn-default",allowedFileTypes:["image"],showUploadedThumbs:!1,maxFileSize:1e4,maxFilePreviewSize:1e4},t=$(".img-input"),i=t.data("url"),n=t.data("preview");e.uploadUrl=i,e.defaultPreviewContent='<div class="file-preview-frame krajee-default kv-preview-thumb">\n   <div class="kv-file-content" style="width: 100%;">       <img src="'+n+'" class="kv-preview-data file-preview-image"           style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n   </div>\n</div>\n',t.fileinput(e),t.on("fileuploaded",(function(e,t,i,n){$(this).fileinput("reset"),$(".file-preview-frame").find("img").attr("src",t.response.imageUrl)})),t.on("change",(function(){$(".img-input").fileinput("upload")}))}))},function(e,t,i){"use strict";$(document).ready((function(){$(".collapse-menu").on("click",(function(){$(".profile-action-menu").slideToggle()}))}))}]);
\ No newline at end of file
diff --git a/src/App/assets/scss/components/_profile.scss b/src/App/assets/scss/components/_profile.scss
index cfc35330..20a653f2 100644
--- a/src/App/assets/scss/components/_profile.scss
+++ b/src/App/assets/scss/components/_profile.scss
@@ -124,6 +124,16 @@
   }
 }
 
+.remember-me-checkbox {
+  input {
+    display: block;
+    float: left;
+    margin: 4px 6px 10px 0;
+    width: auto;
+    height: auto;
+  }
+}
+
 @media (max-width: 767px) {
   .my-profile {
     .profile-actions {
diff --git a/src/User/src/Form/LoginForm.php b/src/User/src/Form/LoginForm.php
index 67601bfd..cd9d8cf0 100644
--- a/src/User/src/Form/LoginForm.php
+++ b/src/User/src/Form/LoginForm.php
@@ -61,6 +61,20 @@ public function init()
             'type' => Password::class
         ]);
 
+        $this->add([
+            'name' => 'rememberMe',
+            'type' => 'checkbox',
+            'attributes' => [
+                'class' => 'tooltips',
+                'data-toggle' => 'tooltip',
+                'title' => 'Remember me',
+            ],
+            'options' => [
+                'label' => 'I want to delete account',
+                'use_hidden_element' => true,
+            ]
+        ]);
+
         $this->add([
             'name' => 'submit',
             'attributes' => [
diff --git a/src/User/templates/user/login.html.twig b/src/User/templates/user/login.html.twig
index 1f65ed37..4dd40502 100644
--- a/src/User/templates/user/login.html.twig
+++ b/src/User/templates/user/login.html.twig
@@ -28,6 +28,12 @@
                     {% set dummy = password.setAttribute('placeholder', elementTranslatePlaceholder) %}
                     {{ formElement(password) }}
 
+                    <div class="checkbox remember-me-checkbox">
+                        {% set rememberMe = form.get('rememberMe') %}
+                        {{ formElement(rememberMe) }}
+                        <p>Remember me</p>
+                    </div>
+
                     {% set submit = form.get('submit') %}
                     {% set submitValue = submit.getValue|trans|raw %}
                     {% set dummy = submit.setAttribute('value', submitValue) %}
