diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 9dd276b6..49ef787f 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -26,6 +26,13 @@ jobs: - name: Checkout source uses: actions/checkout@v2 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: yarn + - run: yarn install --frozen-lockfile + - name: Install Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index 2e78cd95..1934e6e8 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -28,6 +28,13 @@ jobs: - name: Checkout source uses: actions/checkout@v2 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: yarn + - run: yarn install --frozen-lockfile + - name: Install Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: diff --git a/.gitignore b/.gitignore index 4e9135c6..6fa0a309 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ db/cms_fixtures/test-site/ .idea /node_modules +/app/assets/builds/* +!/app/assets/builds/.keep \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 269c0093..d309a328 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,9 +21,8 @@ Fork the project. Optionally, create a branch you want to work on. ### 3. Hack away - Create a few small pull requests instead of a humoungous one. I can merge small stuff faster. -- When adding new code just make sure it follows the same slyle as the existing code. +- When adding new code just make sure it follows the same style as the existing code. - Avoid adding 3rd party dependencies if you can. -- If you make any changes to JS/CSS files, don't forget to build them (yarn build && yarn build:css) before committing. - Tests please, but nothing complicated. UnitTest / Fixtures all the way. Make sure all tests pass. - Run `bundle exec rubocop` and fix any issues raised. diff --git a/app/assets/builds/.keep b/app/assets/builds/.keep new file mode 100644 index 00000000..e69de29b diff --git a/app/assets/builds/comfy/admin/cms/application.css b/app/assets/builds/comfy/admin/cms/application.css deleted file mode 100644 index 99b8abca..00000000 --- a/app/assets/builds/comfy/admin/cms/application.css +++ /dev/null @@ -1,12162 +0,0 @@ -@charset "UTF-8"; -/*! - * Bootstrap v4.3.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 { - 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; - text-decoration: underline dotted; - cursor: help; - border-bottom: 0; - 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: rgb(0, 86.1, 178.5); - text-decoration: underline; -} - -a:not([href]):not([tabindex]) { - color: inherit; - text-decoration: none; -} -a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { - color: inherit; - text-decoration: none; -} -a:not([href]):not([tabindex]):focus { - outline: 0; -} - -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-break: 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 { - width: 100%; - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} - -.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%; -} - -.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%; - } - .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%; - } - .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%; - } - .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%; - } - .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: rgb(183.6, 218.04, 255); -} -.table-primary th, -.table-primary td, -.table-primary thead th, -.table-primary tbody + tbody { - border-color: rgb(122.4, 186.36, 255); -} - -.table-hover .table-primary:hover { - background-color: rgb(158.1, 204.84, 255); -} -.table-hover .table-primary:hover > td, -.table-hover .table-primary:hover > th { - background-color: rgb(158.1, 204.84, 255); -} - -.table-secondary, -.table-secondary > th, -.table-secondary > td { - background-color: rgb(213.84, 216.36, 218.6); -} -.table-secondary th, -.table-secondary td, -.table-secondary thead th, -.table-secondary tbody + tbody { - border-color: rgb(178.56, 183.24, 187.4); -} - -.table-hover .table-secondary:hover { - background-color: rgb(200.3075090253, 203.6560288809, 206.6324909747); -} -.table-hover .table-secondary:hover > td, -.table-hover .table-secondary:hover > th { - background-color: rgb(200.3075090253, 203.6560288809, 206.6324909747); -} - -.table-success, -.table-success > th, -.table-success > td { - background-color: rgb(194.8, 230.36, 202.92); -} -.table-success th, -.table-success td, -.table-success thead th, -.table-success tbody + tbody { - border-color: rgb(143.2, 209.24, 158.28); -} - -.table-hover .table-success:hover { - background-color: rgb(176.7059405941, 222.9540594059, 187.2665346535); -} -.table-hover .table-success:hover > td, -.table-hover .table-success:hover > th { - background-color: rgb(176.7059405941, 222.9540594059, 187.2665346535); -} - -.table-info, -.table-info > th, -.table-info > td { - background-color: rgb(190.04, 228.96, 235.12); -} -.table-info th, -.table-info td, -.table-info thead th, -.table-info tbody + tbody { - border-color: rgb(134.36, 206.64, 218.08); -} - -.table-hover .table-info:hover { - background-color: rgb(170.5152475248, 221.1332673267, 229.1447524752); -} -.table-hover .table-info:hover > td, -.table-hover .table-info:hover > th { - background-color: rgb(170.5152475248, 221.1332673267, 229.1447524752); -} - -.table-warning, -.table-warning > th, -.table-warning > td { - background-color: rgb(255, 237.64, 185.56); -} -.table-warning th, -.table-warning td, -.table-warning thead th, -.table-warning tbody + tbody { - border-color: rgb(255, 222.76, 126.04); -} - -.table-hover .table-warning:hover { - background-color: rgb(255, 231.265, 160.06); -} -.table-hover .table-warning:hover > td, -.table-hover .table-warning:hover > th { - background-color: rgb(255, 231.265, 160.06); -} - -.table-danger, -.table-danger > th, -.table-danger > td { - background-color: rgb(245.2, 198.44, 202.92); -} -.table-danger th, -.table-danger td, -.table-danger thead th, -.table-danger tbody + tbody { - border-color: rgb(236.8, 149.96, 158.28); -} - -.table-hover .table-danger:hover { - background-color: rgb(241.4341772152, 176.7058227848, 182.9073417722); -} -.table-hover .table-danger:hover > td, -.table-hover .table-danger:hover > th { - background-color: rgb(241.4341772152, 176.7058227848, 182.9073417722); -} - -.table-light, -.table-light > th, -.table-light > td { - background-color: rgb(253.04, 253.32, 253.6); -} -.table-light th, -.table-light td, -.table-light thead th, -.table-light tbody + tbody { - border-color: rgb(251.36, 251.88, 252.4); -} - -.table-hover .table-light:hover { - background-color: rgb(238.165, 240.57, 242.975); -} -.table-hover .table-light:hover > td, -.table-hover .table-light:hover > th { - background-color: rgb(238.165, 240.57, 242.975); -} - -.table-dark, -.table-dark > th, -.table-dark > td { - background-color: rgb(198.16, 199.84, 201.52); -} -.table-dark th, -.table-dark td, -.table-dark thead th, -.table-dark tbody + tbody { - border-color: rgb(149.44, 152.56, 155.68); -} - -.table-hover .table-dark:hover { - background-color: rgb(185.0216751269, 187.09, 189.1583248731); -} -.table-hover .table-dark:hover > td, -.table-hover .table-dark:hover > th { - background-color: rgb(185.0216751269, 187.09, 189.1583248731); -} - -.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: rgb(69.1465517241, 77.125, 85.1034482759); -} -.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: rgb(69.1465517241, 77.125, 85.1034482759); -} -.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:focus { - color: #495057; - background-color: #fff; - border-color: rgb(127.5, 189, 255); - outline: 0; - box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); -} -.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-top: 0.375rem; - padding-bottom: 0.375rem; - margin-bottom: 0; - 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 { - 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 .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' 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: center right calc(0.375em + 0.1875rem); - 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 .form-control:valid ~ .valid-feedback, -.was-validated .form-control:valid ~ .valid-tooltip, .form-control.is-valid ~ .valid-feedback, -.form-control.is-valid ~ .valid-tooltip { - display: block; -} - -.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((1em + 0.75rem) * 3 / 4 + 1.75rem); - background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' 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' 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 .custom-select:valid ~ .valid-feedback, -.was-validated .custom-select:valid ~ .valid-tooltip, .custom-select.is-valid ~ .valid-feedback, -.custom-select.is-valid ~ .valid-tooltip { - display: block; -} - -.was-validated .form-control-file:valid ~ .valid-feedback, -.was-validated .form-control-file:valid ~ .valid-tooltip, .form-control-file.is-valid ~ .valid-feedback, -.form-control-file.is-valid ~ .valid-tooltip { - display: block; -} - -.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 ~ .valid-feedback, -.was-validated .custom-control-input:valid ~ .valid-tooltip, .custom-control-input.is-valid ~ .valid-feedback, -.custom-control-input.is-valid ~ .valid-tooltip { - display: block; -} -.was-validated .custom-control-input:valid:checked ~ .custom-control-label::before, .custom-control-input.is-valid:checked ~ .custom-control-label::before { - border-color: rgb(51.6956521739, 206.3043478261, 87); - background-color: rgb(51.6956521739, 206.3043478261, 87); -} -.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 ~ .valid-feedback, -.was-validated .custom-file-input:valid ~ .valid-tooltip, .custom-file-input.is-valid ~ .valid-feedback, -.custom-file-input.is-valid ~ .valid-tooltip { - display: block; -} -.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 .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' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"); - background-repeat: no-repeat; - background-position: center right calc(0.375em + 0.1875rem); - 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 .form-control:invalid ~ .invalid-feedback, -.was-validated .form-control:invalid ~ .invalid-tooltip, .form-control.is-invalid ~ .invalid-feedback, -.form-control.is-invalid ~ .invalid-tooltip { - display: block; -} - -.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((1em + 0.75rem) * 3 / 4 + 1.75rem); - background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' 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' fill='%23dc3545' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23dc3545' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%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 .custom-select:invalid ~ .invalid-feedback, -.was-validated .custom-select:invalid ~ .invalid-tooltip, .custom-select.is-invalid ~ .invalid-feedback, -.custom-select.is-invalid ~ .invalid-tooltip { - display: block; -} - -.was-validated .form-control-file:invalid ~ .invalid-feedback, -.was-validated .form-control-file:invalid ~ .invalid-tooltip, .form-control-file.is-invalid ~ .invalid-feedback, -.form-control-file.is-invalid ~ .invalid-tooltip { - display: block; -} - -.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 ~ .invalid-feedback, -.was-validated .custom-control-input:invalid ~ .invalid-tooltip, .custom-control-input.is-invalid ~ .invalid-feedback, -.custom-control-input.is-invalid ~ .invalid-tooltip { - display: block; -} -.was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before, .custom-control-input.is-invalid:checked ~ .custom-control-label::before { - border-color: rgb(227.5316455696, 96.4683544304, 109.0253164557); - background-color: rgb(227.5316455696, 96.4683544304, 109.0253164557); -} -.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 ~ .invalid-feedback, -.was-validated .custom-file-input:invalid ~ .invalid-tooltip, .custom-file-input.is-invalid ~ .invalid-feedback, -.custom-file-input.is-invalid ~ .invalid-tooltip { - display: block; -} -.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; - 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: rgb(0, 104.55, 216.75); - border-color: rgb(0, 98.4, 204); -} -.btn-primary:focus, .btn-primary.focus { - box-shadow: 0 0 0 0.2rem rgba(38.25, 142.8, 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: rgb(0, 98.4, 204); - border-color: rgb(0, 92.25, 191.25); -} -.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.25, 142.8, 255, 0.5); -} - -.btn-secondary { - color: #fff; - background-color: #6c757d; - border-color: #6c757d; -} -.btn-secondary:hover { - color: #fff; - background-color: rgb(90.2703862661, 97.7929184549, 104.4796137339); - border-color: rgb(84.3605150215, 91.3905579399, 97.6394849785); -} -.btn-secondary:focus, .btn-secondary.focus { - box-shadow: 0 0 0 0.2rem rgba(130.05, 137.7, 144.5, 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: rgb(84.3605150215, 91.3905579399, 97.6394849785); - border-color: rgb(78.4506437768, 84.9881974249, 90.7993562232); -} -.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.05, 137.7, 144.5, 0.5); -} - -.btn-success { - color: #fff; - background-color: #28a745; - border-color: #28a745; -} -.btn-success:hover { - color: #fff; - background-color: rgb(32.6086956522, 136.1413043478, 56.25); - border-color: rgb(30.1449275362, 125.8550724638, 52); -} -.btn-success:focus, .btn-success.focus { - box-shadow: 0 0 0 0.2rem rgba(72.25, 180.2, 96.9, 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: rgb(30.1449275362, 125.8550724638, 52); - border-color: rgb(27.6811594203, 115.5688405797, 47.75); -} -.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.25, 180.2, 96.9, 0.5); -} - -.btn-info { - color: #fff; - background-color: #17a2b8; - border-color: #17a2b8; -} -.btn-info:hover { - color: #fff; - background-color: rgb(18.75, 132.0652173913, 150); - border-color: rgb(17.3333333333, 122.0869565217, 138.6666666667); -} -.btn-info:focus, .btn-info.focus { - box-shadow: 0 0 0 0.2rem rgba(57.8, 175.95, 194.65, 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: rgb(17.3333333333, 122.0869565217, 138.6666666667); - border-color: rgb(15.9166666667, 112.1086956522, 127.3333333333); -} -.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(57.8, 175.95, 194.65, 0.5); -} - -.btn-warning { - color: #212529; - background-color: #ffc107; - border-color: #ffc107; -} -.btn-warning:hover { - color: #212529; - background-color: rgb(223.75, 167.8125, 0); - border-color: rgb(211, 158.25, 0); -} -.btn-warning:focus, .btn-warning.focus { - box-shadow: 0 0 0 0.2rem rgba(221.7, 169.6, 12.1, 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: rgb(211, 158.25, 0); - border-color: rgb(198.25, 148.6875, 0); -} -.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(221.7, 169.6, 12.1, 0.5); -} - -.btn-danger { - color: #fff; - background-color: #dc3545; - border-color: #dc3545; -} -.btn-danger:hover { - color: #fff; - background-color: rgb(200.082278481, 34.667721519, 50.5158227848); - border-color: rgb(189.2151898734, 32.7848101266, 47.7721518987); -} -.btn-danger:focus, .btn-danger.focus { - box-shadow: 0 0 0 0.2rem rgba(225.25, 83.3, 96.9, 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: rgb(189.2151898734, 32.7848101266, 47.7721518987); - border-color: rgb(178.3481012658, 30.9018987342, 45.0284810127); -} -.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.25, 83.3, 96.9, 0.5); -} - -.btn-light { - color: #212529; - background-color: #f8f9fa; - border-color: #f8f9fa; -} -.btn-light:hover { - color: #212529; - background-color: rgb(225.6875, 229.875, 234.0625); - border-color: rgb(218.25, 223.5, 228.75); -} -.btn-light:focus, .btn-light.focus { - box-shadow: 0 0 0 0.2rem rgba(215.75, 217.2, 218.65, 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: rgb(218.25, 223.5, 228.75); - border-color: rgb(210.8125, 217.125, 223.4375); -} -.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(215.75, 217.2, 218.65, 0.5); -} - -.btn-dark { - color: #fff; - background-color: #343a40; - border-color: #343a40; -} -.btn-dark:hover { - color: #fff; - background-color: rgb(34.8534482759, 38.875, 42.8965517241); - border-color: rgb(29.1379310345, 32.5, 35.8620689655); -} -.btn-dark:focus, .btn-dark.focus { - box-shadow: 0 0 0 0.2rem rgba(82.45, 87.55, 92.65, 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: rgb(29.1379310345, 32.5, 35.8620689655); - border-color: rgb(23.4224137931, 26.125, 28.8275862069); -} -.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.45, 87.55, 92.65, 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: rgb(0, 86.1, 178.5); - 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: rgb(21.6283783784, 24.25, 26.8716216216); - 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 auto; - width: 1%; - 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; - z-index: -1; - 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: rgb(127.5, 189, 255); -} -.custom-control-input:not(:disabled):active ~ .custom-control-label::before { - color: #fff; - background-color: rgb(178.5, 215.4, 255); - border-color: rgb(178.5, 215.4, 255); -} -.custom-control-input:disabled ~ .custom-control-label { - color: #6c757d; -} -.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' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 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' 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' 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: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' 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; - background-color: #fff; - border: 1px solid #ced4da; - border-radius: 0.25rem; - appearance: none; -} -.custom-select:focus { - border-color: rgb(127.5, 189, 255); - 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-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: rgb(127.5, 189, 255); - box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); -} -.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: calc(1rem + 0.4rem); - padding: 0; - background-color: transparent; - 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; - 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::-webkit-slider-thumb { - transition: none; - } -} -.custom-range::-webkit-slider-thumb:active { - background-color: rgb(178.5, 215.4, 255); -} -.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; - 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::-moz-range-thumb { - transition: none; - } -} -.custom-range::-moz-range-thumb:active { - background-color: rgb(178.5, 215.4, 255); -} -.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; - 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 { - transition: none; - } -} -.custom-range::-ms-thumb:active { - background-color: rgb(178.5, 215.4, 255); -} -.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 { - 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 { - 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 { - 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 { - 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 { - 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 { - 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 { - 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 { - 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 { - 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 { - 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 { - 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 viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' 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 viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' 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; - 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 { - width: 100%; - border-radius: calc(0.25rem - 1px); -} - -.card-img-top { - width: 100%; - border-top-left-radius: calc(0.25rem - 1px); - border-top-right-radius: calc(0.25rem - 1px); -} - -.card-img-bottom { - width: 100%; - border-bottom-right-radius: calc(0.25rem - 1px); - border-bottom-left-radius: calc(0.25rem - 1px); -} - -.card-deck { - display: flex; - flex-direction: column; -} -.card-deck .card { - margin-bottom: 15px; -} -@media (min-width: 576px) { - .card-deck { - flex-flow: row wrap; - margin-right: -15px; - margin-left: -15px; - } - .card-deck .card { - display: flex; - flex: 1 0 0%; - flex-direction: column; - margin-right: 15px; - margin-bottom: 0; - margin-left: 15px; - } -} - -.card-group { - display: flex; - flex-direction: column; -} -.card-group > .card { - margin-bottom: 15px; -} -@media (min-width: 576px) { - .card-group { - 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 { - column-count: 3; - column-gap: 1.25rem; - orphans: 1; - widows: 1; - } - .card-columns .card { - display: inline-block; - width: 100%; - } -} - -.accordion > .card { - overflow: hidden; -} -.accordion > .card:not(:first-of-type) .card-header:first-child { - border-radius: 0; -} -.accordion > .card:not(:first-of-type):not(:last-of-type) { - border-bottom: 0; - border-radius: 0; -} -.accordion > .card:first-of-type { - border-bottom: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.accordion > .card:last-of-type { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.accordion > .card .card-header { - 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: rgb(0, 86.1, 178.5); - text-decoration: none; - background-color: #e9ecef; - border-color: #dee2e6; -} -.page-link:focus { - z-index: 2; - 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: 1; - 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: rgb(0, 98.4, 204); -} -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: rgb(84.3605150215, 91.3905579399, 97.6394849785); -} -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: rgb(30.1449275362, 125.8550724638, 52); -} -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: rgb(17.3333333333, 122.0869565217, 138.6666666667); -} -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: rgb(211, 158.25, 0); -} -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: rgb(189.2151898734, 32.7848101266, 47.7721518987); -} -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: rgb(218.25, 223.5, 228.75); -} -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: rgb(29.1379310345, 32.5, 35.8620689655); -} -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: rgb(0, 63.96, 132.6); - background-color: rgb(204, 228.6, 255); - border-color: rgb(183.6, 218.04, 255); -} -.alert-primary hr { - border-top-color: rgb(158.1, 204.84, 255); -} -.alert-primary .alert-link { - color: rgb(0, 39.36, 81.6); -} - -.alert-secondary { - color: rgb(56.16, 60.84, 65); - background-color: rgb(225.6, 227.4, 229); - border-color: rgb(213.84, 216.36, 218.6); -} -.alert-secondary hr { - border-top-color: rgb(200.3075090253, 203.6560288809, 206.6324909747); -} -.alert-secondary .alert-link { - color: rgb(32.5205150215, 35.2305579399, 37.6394849785); -} - -.alert-success { - color: rgb(20.8, 86.84, 35.88); - background-color: rgb(212, 237.4, 217.8); - border-color: rgb(194.8, 230.36, 202.92); -} -.alert-success hr { - border-top-color: rgb(176.7059405941, 222.9540594059, 187.2665346535); -} -.alert-success .alert-link { - color: rgb(10.9449275362, 45.6950724638, 18.88); -} - -.alert-info { - color: rgb(11.96, 84.24, 95.68); - background-color: rgb(208.6, 236.4, 240.8); - border-color: rgb(190.04, 228.96, 235.12); -} -.alert-info hr { - border-top-color: rgb(170.5152475248, 221.1332673267, 229.1447524752); -} -.alert-info .alert-link { - color: rgb(6.2933333333, 44.3269565217, 50.3466666667); -} - -.alert-warning { - color: rgb(132.6, 100.36, 3.64); - background-color: rgb(255, 242.6, 205.4); - border-color: rgb(255, 237.64, 185.56); -} -.alert-warning hr { - border-top-color: rgb(255, 231.265, 160.06); -} -.alert-warning .alert-link { - color: rgb(82.9625954198, 62.7912977099, 2.2774045802); -} - -.alert-danger { - color: rgb(114.4, 27.56, 35.88); - background-color: rgb(248, 214.6, 217.8); - border-color: rgb(245.2, 198.44, 202.92); -} -.alert-danger hr { - border-top-color: rgb(241.4341772152, 176.7058227848, 182.9073417722); -} -.alert-danger .alert-link { - color: rgb(73.3010989011, 17.6589010989, 22.9898901099); -} - -.alert-light { - color: rgb(128.96, 129.48, 130); - background-color: rgb(253.6, 253.8, 254); - border-color: rgb(253.04, 253.32, 253.6); -} -.alert-light hr { - border-top-color: rgb(238.165, 240.57, 242.975); -} -.alert-light .alert-link { - color: rgb(103.5492351816, 103.98, 104.4107648184); -} - -.alert-dark { - color: rgb(27.04, 30.16, 33.28); - background-color: rgb(214.4, 215.6, 216.8); - border-color: rgb(198.16, 199.84, 201.52); -} -.alert-dark hr { - border-top-color: rgb(185.0216751269, 187.09, 189.1583248731); -} -.alert-dark .alert-link { - color: rgb(4.1779310345, 4.66, 5.1420689655); -} - -@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; - 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 { - animation: progress-bar-stripes 1s linear infinite; -} -@media (prefers-reduced-motion: reduce) { - .progress-bar-animated { - 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; - margin-bottom: -1px; - 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 { - margin-bottom: 0; - 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-horizontal { - flex-direction: row; -} -.list-group-horizontal .list-group-item { - margin-right: -1px; - margin-bottom: 0; -} -.list-group-horizontal .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; -} -.list-group-horizontal .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; -} - -@media (min-width: 576px) { - .list-group-horizontal-sm { - flex-direction: row; - } - .list-group-horizontal-sm .list-group-item { - margin-right: -1px; - margin-bottom: 0; - } - .list-group-horizontal-sm .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-sm .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } -} -@media (min-width: 768px) { - .list-group-horizontal-md { - flex-direction: row; - } - .list-group-horizontal-md .list-group-item { - margin-right: -1px; - margin-bottom: 0; - } - .list-group-horizontal-md .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-md .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } -} -@media (min-width: 992px) { - .list-group-horizontal-lg { - flex-direction: row; - } - .list-group-horizontal-lg .list-group-item { - margin-right: -1px; - margin-bottom: 0; - } - .list-group-horizontal-lg .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-lg .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } -} -@media (min-width: 1200px) { - .list-group-horizontal-xl { - flex-direction: row; - } - .list-group-horizontal-xl .list-group-item { - margin-right: -1px; - margin-bottom: 0; - } - .list-group-horizontal-xl .list-group-item:first-child { - border-top-left-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - border-top-right-radius: 0; - } - .list-group-horizontal-xl .list-group-item:last-child { - margin-right: 0; - border-top-right-radius: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0; - } -} -.list-group-flush .list-group-item { - border-right: 0; - border-left: 0; - border-radius: 0; -} -.list-group-flush .list-group-item:last-child { - margin-bottom: -1px; -} -.list-group-flush:first-child .list-group-item:first-child { - border-top: 0; -} -.list-group-flush:last-child .list-group-item:last-child { - margin-bottom: 0; - border-bottom: 0; -} - -.list-group-item-primary { - color: rgb(0, 63.96, 132.6); - background-color: rgb(183.6, 218.04, 255); -} -.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus { - color: rgb(0, 63.96, 132.6); - background-color: rgb(158.1, 204.84, 255); -} -.list-group-item-primary.list-group-item-action.active { - color: #fff; - background-color: rgb(0, 63.96, 132.6); - border-color: rgb(0, 63.96, 132.6); -} - -.list-group-item-secondary { - color: rgb(56.16, 60.84, 65); - background-color: rgb(213.84, 216.36, 218.6); -} -.list-group-item-secondary.list-group-item-action:hover, .list-group-item-secondary.list-group-item-action:focus { - color: rgb(56.16, 60.84, 65); - background-color: rgb(200.3075090253, 203.6560288809, 206.6324909747); -} -.list-group-item-secondary.list-group-item-action.active { - color: #fff; - background-color: rgb(56.16, 60.84, 65); - border-color: rgb(56.16, 60.84, 65); -} - -.list-group-item-success { - color: rgb(20.8, 86.84, 35.88); - background-color: rgb(194.8, 230.36, 202.92); -} -.list-group-item-success.list-group-item-action:hover, .list-group-item-success.list-group-item-action:focus { - color: rgb(20.8, 86.84, 35.88); - background-color: rgb(176.7059405941, 222.9540594059, 187.2665346535); -} -.list-group-item-success.list-group-item-action.active { - color: #fff; - background-color: rgb(20.8, 86.84, 35.88); - border-color: rgb(20.8, 86.84, 35.88); -} - -.list-group-item-info { - color: rgb(11.96, 84.24, 95.68); - background-color: rgb(190.04, 228.96, 235.12); -} -.list-group-item-info.list-group-item-action:hover, .list-group-item-info.list-group-item-action:focus { - color: rgb(11.96, 84.24, 95.68); - background-color: rgb(170.5152475248, 221.1332673267, 229.1447524752); -} -.list-group-item-info.list-group-item-action.active { - color: #fff; - background-color: rgb(11.96, 84.24, 95.68); - border-color: rgb(11.96, 84.24, 95.68); -} - -.list-group-item-warning { - color: rgb(132.6, 100.36, 3.64); - background-color: rgb(255, 237.64, 185.56); -} -.list-group-item-warning.list-group-item-action:hover, .list-group-item-warning.list-group-item-action:focus { - color: rgb(132.6, 100.36, 3.64); - background-color: rgb(255, 231.265, 160.06); -} -.list-group-item-warning.list-group-item-action.active { - color: #fff; - background-color: rgb(132.6, 100.36, 3.64); - border-color: rgb(132.6, 100.36, 3.64); -} - -.list-group-item-danger { - color: rgb(114.4, 27.56, 35.88); - background-color: rgb(245.2, 198.44, 202.92); -} -.list-group-item-danger.list-group-item-action:hover, .list-group-item-danger.list-group-item-action:focus { - color: rgb(114.4, 27.56, 35.88); - background-color: rgb(241.4341772152, 176.7058227848, 182.9073417722); -} -.list-group-item-danger.list-group-item-action.active { - color: #fff; - background-color: rgb(114.4, 27.56, 35.88); - border-color: rgb(114.4, 27.56, 35.88); -} - -.list-group-item-light { - color: rgb(128.96, 129.48, 130); - background-color: rgb(253.04, 253.32, 253.6); -} -.list-group-item-light.list-group-item-action:hover, .list-group-item-light.list-group-item-action:focus { - color: rgb(128.96, 129.48, 130); - background-color: rgb(238.165, 240.57, 242.975); -} -.list-group-item-light.list-group-item-action.active { - color: #fff; - background-color: rgb(128.96, 129.48, 130); - border-color: rgb(128.96, 129.48, 130); -} - -.list-group-item-dark { - color: rgb(27.04, 30.16, 33.28); - background-color: rgb(198.16, 199.84, 201.52); -} -.list-group-item-dark.list-group-item-action:hover, .list-group-item-dark.list-group-item-action:focus { - color: rgb(27.04, 30.16, 33.28); - background-color: rgb(185.0216751269, 187.09, 189.1583248731); -} -.list-group-item-dark.list-group-item-action.active { - color: #fff; - background-color: rgb(27.04, 30.16, 33.28); - border-color: rgb(27.04, 30.16, 33.28); -} - -.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; - 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); - 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-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: 0.3rem; - border-top-right-radius: 0.3rem; -} -.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; - align-items: center; - justify-content: flex-end; - padding: 1rem; - border-top: 1px solid #dee2e6; - border-bottom-right-radius: 0.3rem; - border-bottom-left-radius: 0.3rem; -} -.modal-footer > :not(:first-child) { - margin-left: 0.25rem; -} -.modal-footer > :not(:last-child) { - margin-right: 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) * -1); -} -.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) * -1); - 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) * -1); -} -.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 rgb(247.35, 247.35, 247.35); -} - -.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) * -1); - 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: rgb(247.35, 247.35, 247.35); - border-bottom: 1px solid rgb(234.6, 234.6, 234.6); - 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%; - 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: 0s 0.6s opacity; -} -@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' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%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' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-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; -} - -@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%; - animation: spinner-border 0.75s linear infinite; -} - -.spinner-border-sm { - width: 1rem; - height: 1rem; - border-width: 0.2em; -} - -@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; - 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: rgb(0, 98.4, 204) !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: rgb(84.3605150215, 91.3905579399, 97.6394849785) !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: rgb(30.1449275362, 125.8550724638, 52) !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: rgb(17.3333333333, 122.0869565217, 138.6666666667) !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: rgb(211, 158.25, 0) !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: rgb(189.2151898734, 32.7848101266, 47.7721518987) !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: rgb(218.25, 223.5, 228.75) !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: rgb(29.1379310345, 32.5, 35.8620689655) !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: 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: sticky) { - .sticky-top { - position: sticky; - top: 0; - z-index: 1020; - } -} - -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - 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: rgb(0, 86.1, 178.5) !important; -} - -.text-secondary { - color: #6c757d !important; -} - -a.text-secondary:hover, a.text-secondary:focus { - color: rgb(72.5407725322, 78.5858369099, 83.9592274678) !important; -} - -.text-success { - color: #28a745 !important; -} - -a.text-success:hover, a.text-success:focus { - color: rgb(25.2173913043, 105.2826086957, 43.5) !important; -} - -.text-info { - color: #17a2b8 !important; -} - -a.text-info:hover, a.text-info:focus { - color: rgb(14.5, 102.1304347826, 116) !important; -} - -.text-warning { - color: #ffc107 !important; -} - -a.text-warning:hover, a.text-warning:focus { - color: rgb(185.5, 139.125, 0) !important; -} - -.text-danger { - color: #dc3545 !important; -} - -a.text-danger:hover, a.text-danger:focus { - color: rgb(167.4810126582, 29.0189873418, 42.2848101266) !important; -} - -.text-light { - color: #f8f9fa !important; -} - -a.text-light:hover, a.text-light:focus { - color: rgb(203.375, 210.75, 218.125) !important; -} - -.text-dark { - color: #343a40 !important; -} - -a.text-dark:hover, a.text-dark:focus { - color: rgb(17.7068965517, 19.75, 21.7931034483) !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; - } -} -/* BASICS */ -.CodeMirror { - /* Set height, width, borders, and global font properties here */ - font-family: monospace; - height: 300px; - color: black; - direction: ltr; -} - -/* PADDING */ -.CodeMirror-lines { - padding: 4px 0; /* Vertical padding around content */ -} - -.CodeMirror pre { - padding: 0 4px; /* Horizontal padding of content */ -} - -.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { - background-color: white; /* The little square between H and V scrollbars */ -} - -/* GUTTER */ -.CodeMirror-gutters { - border-right: 1px solid #ddd; - background-color: #f7f7f7; - white-space: nowrap; -} - -.CodeMirror-linenumber { - padding: 0 3px 0 5px; - min-width: 20px; - text-align: right; - color: #999; - white-space: nowrap; -} - -.CodeMirror-guttermarker { - color: black; -} - -.CodeMirror-guttermarker-subtle { - color: #999; -} - -/* CURSOR */ -.CodeMirror-cursor { - border-left: 1px solid black; - border-right: none; - width: 0; -} - -/* Shown when moving in bi-directional text */ -.CodeMirror div.CodeMirror-secondarycursor { - border-left: 1px solid silver; -} - -.cm-fat-cursor .CodeMirror-cursor { - width: auto; - border: 0 !important; - background: #7e7; -} - -.cm-fat-cursor div.CodeMirror-cursors { - z-index: 1; -} - -.cm-fat-cursor-mark { - background-color: rgba(20, 255, 20, 0.5); - -webkit-animation: blink 1.06s steps(1) infinite; - -moz-animation: blink 1.06s steps(1) infinite; - animation: blink 1.06s steps(1) infinite; -} - -.cm-animate-fat-cursor { - width: auto; - border: 0; - -webkit-animation: blink 1.06s steps(1) infinite; - -moz-animation: blink 1.06s steps(1) infinite; - animation: blink 1.06s steps(1) infinite; - background-color: #7e7; -} - -@-moz-keyframes blink { - 50% { - background-color: transparent; - } -} -@-webkit-keyframes blink { - 50% { - background-color: transparent; - } -} -@keyframes blink { - 50% { - background-color: transparent; - } -} -/* Can style cursor different in overwrite (non-insert) mode */ -.cm-tab { - display: inline-block; - text-decoration: inherit; -} - -.CodeMirror-rulers { - position: absolute; - left: 0; - right: 0; - top: -50px; - bottom: -20px; - overflow: hidden; -} - -.CodeMirror-ruler { - border-left: 1px solid #ccc; - top: 0; - bottom: 0; - position: absolute; -} - -/* DEFAULT THEME */ -.cm-s-default .cm-header { - color: blue; -} - -.cm-s-default .cm-quote { - color: #090; -} - -.cm-negative { - color: #d44; -} - -.cm-positive { - color: #292; -} - -.cm-header, .cm-strong { - font-weight: bold; -} - -.cm-em { - font-style: italic; -} - -.cm-link { - text-decoration: underline; -} - -.cm-strikethrough { - text-decoration: line-through; -} - -.cm-s-default .cm-keyword { - color: #708; -} - -.cm-s-default .cm-atom { - color: #219; -} - -.cm-s-default .cm-number { - color: #164; -} - -.cm-s-default .cm-def { - color: #00f; -} - -.cm-s-default .cm-variable-2 { - color: #05a; -} - -.cm-s-default .cm-variable-3, .cm-s-default .cm-type { - color: #085; -} - -.cm-s-default .cm-comment { - color: #a50; -} - -.cm-s-default .cm-string { - color: #a11; -} - -.cm-s-default .cm-string-2 { - color: #f50; -} - -.cm-s-default .cm-meta { - color: #555; -} - -.cm-s-default .cm-qualifier { - color: #555; -} - -.cm-s-default .cm-builtin { - color: #30a; -} - -.cm-s-default .cm-bracket { - color: #997; -} - -.cm-s-default .cm-tag { - color: #170; -} - -.cm-s-default .cm-attribute { - color: #00c; -} - -.cm-s-default .cm-hr { - color: #999; -} - -.cm-s-default .cm-link { - color: #00c; -} - -.cm-s-default .cm-error { - color: #f00; -} - -.cm-invalidchar { - color: #f00; -} - -.CodeMirror-composing { - border-bottom: 2px solid; -} - -/* Default styles for common addons */ -div.CodeMirror span.CodeMirror-matchingbracket { - color: #0b0; -} - -div.CodeMirror span.CodeMirror-nonmatchingbracket { - color: #a22; -} - -.CodeMirror-matchingtag { - background: rgba(255, 150, 0, 0.3); -} - -.CodeMirror-activeline-background { - background: #e8f2ff; -} - -/* STOP */ -/* The rest of this file contains styles related to the mechanics of - the editor. You probably shouldn't touch them. */ -.CodeMirror { - position: relative; - overflow: hidden; - background: white; -} - -.CodeMirror-scroll { - overflow: scroll !important; /* Things will break if this is overridden */ - /* 30px is the magic margin used to hide the element's real scrollbars */ - /* See overflow: hidden in .CodeMirror */ - margin-bottom: -30px; - margin-right: -30px; - padding-bottom: 30px; - height: 100%; - outline: none; /* Prevent dragging from highlighting the element */ - position: relative; -} - -.CodeMirror-sizer { - position: relative; - border-right: 30px solid transparent; -} - -/* The fake, visible scrollbars. Used to force redraw during scrolling - before actual scrolling happens, thus preventing shaking and - flickering artifacts. */ -.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { - position: absolute; - z-index: 6; - display: none; -} - -.CodeMirror-vscrollbar { - right: 0; - top: 0; - overflow-x: hidden; - overflow-y: scroll; -} - -.CodeMirror-hscrollbar { - bottom: 0; - left: 0; - overflow-y: hidden; - overflow-x: scroll; -} - -.CodeMirror-scrollbar-filler { - right: 0; - bottom: 0; -} - -.CodeMirror-gutter-filler { - left: 0; - bottom: 0; -} - -.CodeMirror-gutters { - position: absolute; - left: 0; - top: 0; - min-height: 100%; - z-index: 3; -} - -.CodeMirror-gutter { - white-space: normal; - height: 100%; - display: inline-block; - vertical-align: top; - margin-bottom: -30px; -} - -.CodeMirror-gutter-wrapper { - position: absolute; - z-index: 4; - background: none !important; - border: none !important; -} - -.CodeMirror-gutter-background { - position: absolute; - top: 0; - bottom: 0; - z-index: 4; -} - -.CodeMirror-gutter-elt { - position: absolute; - cursor: default; - z-index: 4; -} - -.CodeMirror-gutter-wrapper ::selection { - background-color: transparent; -} - -.CodeMirror-gutter-wrapper ::-moz-selection { - background-color: transparent; -} - -.CodeMirror-lines { - cursor: text; - min-height: 1px; /* prevents collapsing before first draw */ -} - -.CodeMirror pre { - /* Reset some styles that the rest of the page might have set */ - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; - border-width: 0; - background: transparent; - font-family: inherit; - font-size: inherit; - margin: 0; - white-space: pre; - word-wrap: normal; - line-height: inherit; - color: inherit; - z-index: 2; - position: relative; - overflow: visible; - -webkit-tap-highlight-color: transparent; - -webkit-font-variant-ligatures: contextual; - font-variant-ligatures: contextual; -} - -.CodeMirror-wrap pre { - word-wrap: break-word; - white-space: pre-wrap; - word-break: normal; -} - -.CodeMirror-linebackground { - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - z-index: 0; -} - -.CodeMirror-linewidget { - position: relative; - z-index: 2; - overflow: auto; -} - -.CodeMirror-rtl pre { - direction: rtl; -} - -.CodeMirror-code { - outline: none; -} - -/* Force content-box sizing for the elements where we expect it */ -.CodeMirror-scroll, -.CodeMirror-sizer, -.CodeMirror-gutter, -.CodeMirror-gutters, -.CodeMirror-linenumber { - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -.CodeMirror-measure { - position: absolute; - width: 100%; - height: 0; - overflow: hidden; - visibility: hidden; -} - -.CodeMirror-cursor { - position: absolute; - pointer-events: none; -} - -.CodeMirror-measure pre { - position: static; -} - -div.CodeMirror-cursors { - visibility: hidden; - position: relative; - z-index: 3; -} - -div.CodeMirror-dragcursors { - visibility: visible; -} - -.CodeMirror-focused div.CodeMirror-cursors { - visibility: visible; -} - -.CodeMirror-selected { - background: #d9d9d9; -} - -.CodeMirror-focused .CodeMirror-selected { - background: #d7d4f0; -} - -.CodeMirror-crosshair { - cursor: crosshair; -} - -.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { - background: #d7d4f0; -} - -.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { - background: #d7d4f0; -} - -.cm-searching { - background-color: #ffa; - background-color: rgba(255, 255, 0, 0.4); -} - -/* Used to force a border model for a node */ -.cm-force-border { - padding-right: 0.1px; -} - -@media print { - /* Hide the cursor when printing */ - .CodeMirror div.CodeMirror-cursors { - visibility: hidden; - } -} -/* See issue #2901 */ -.cm-tab-wrap-hack:after { - content: ""; -} - -/* Help users use markselection to safely style text background */ -span.CodeMirror-selectedtext { - background: none; -} - -/*! - * Font Awesome Free 5.0.1 by @fontawesome - http://fontawesome.com - * License - http://fontawesome.com/license (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - */ -svg:not(:root).svg-inline--fa { - overflow: visible; -} - -.svg-inline--fa { - display: inline-block; - font-size: inherit; - height: 1em; - overflow: visible; - vertical-align: -0.125em; -} - -.svg-inline--fa.fa-lg { - vertical-align: -0.225em; -} - -.svg-inline--fa.fa-w-1 { - width: 0.0625em; -} - -.svg-inline--fa.fa-w-2 { - width: 0.125em; -} - -.svg-inline--fa.fa-w-3 { - width: 0.1875em; -} - -.svg-inline--fa.fa-w-4 { - width: 0.25em; -} - -.svg-inline--fa.fa-w-5 { - width: 0.3125em; -} - -.svg-inline--fa.fa-w-6 { - width: 0.375em; -} - -.svg-inline--fa.fa-w-7 { - width: 0.4375em; -} - -.svg-inline--fa.fa-w-8 { - width: 0.5em; -} - -.svg-inline--fa.fa-w-9 { - width: 0.5625em; -} - -.svg-inline--fa.fa-w-10 { - width: 0.625em; -} - -.svg-inline--fa.fa-w-11 { - width: 0.6875em; -} - -.svg-inline--fa.fa-w-12 { - width: 0.75em; -} - -.svg-inline--fa.fa-w-13 { - width: 0.8125em; -} - -.svg-inline--fa.fa-w-14 { - width: 0.875em; -} - -.svg-inline--fa.fa-w-15 { - width: 0.9375em; -} - -.svg-inline--fa.fa-w-16 { - width: 1em; -} - -.svg-inline--fa.fa-w-17 { - width: 1.0625em; -} - -.svg-inline--fa.fa-w-18 { - width: 1.125em; -} - -.svg-inline--fa.fa-w-19 { - width: 1.1875em; -} - -.svg-inline--fa.fa-w-20 { - width: 1.25em; -} - -.svg-inline--fa.fa-pull-left { - margin-right: 0.3em; - width: auto; -} - -.svg-inline--fa.fa-pull-right { - margin-left: 0.3em; - width: auto; -} - -.svg-inline--fa.fa-border { - height: 1.5em; -} - -.svg-inline--fa.fa-li { - width: 2em; -} - -.svg-inline--fa.fa-fw { - width: 1.25em; -} - -.fa-layers svg.svg-inline--fa { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; -} - -.fa-layers { - display: inline-block; - height: 1em; - position: relative; - text-align: center; - vertical-align: -12.5%; - width: 1em; -} - -.fa-layers svg.svg-inline--fa { - -webkit-transform-origin: center center; - transform-origin: center center; -} - -.fa-layers-text, .fa-layers-counter { - display: inline-block; - position: absolute; - text-align: center; -} - -.fa-layers-text { - left: 50%; - top: 50%; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - -webkit-transform-origin: center center; - transform-origin: center center; -} - -.fa-layers-counter { - background-color: #ff253a; - border-radius: 1em; - color: #fff; - height: 1.5em; - line-height: 1; - max-width: 5em; - min-width: 1.5em; - overflow: hidden; - padding: 0.25em; - right: 0; - text-overflow: ellipsis; - top: 0; - -webkit-transform: scale(0.25); - transform: scale(0.25); - -webkit-transform-origin: top right; - transform-origin: top right; -} - -.fa-layers-bottom-right { - bottom: 0; - right: 0; - top: auto; - -webkit-transform: scale(0.25); - transform: scale(0.25); - -webkit-transform-origin: bottom right; - transform-origin: bottom right; -} - -.fa-layers-bottom-left { - bottom: 0; - left: 0; - right: auto; - top: auto; - -webkit-transform: scale(0.25); - transform: scale(0.25); - -webkit-transform-origin: bottom left; - transform-origin: bottom left; -} - -.fa-layers-top-right { - right: 0; - top: 0; - -webkit-transform: scale(0.25); - transform: scale(0.25); - -webkit-transform-origin: top right; - transform-origin: top right; -} - -.fa-layers-top-left { - left: 0; - right: auto; - top: 0; - -webkit-transform: scale(0.25); - transform: scale(0.25); - -webkit-transform-origin: top left; - transform-origin: top left; -} - -.fa-lg { - font-size: 1.33333em; - line-height: 0.75em; - vertical-align: -0.0667em; -} - -.fa-xs { - font-size: 0.75em; -} - -.fa-sm { - font-size: 0.875em; -} - -.fa-1x { - font-size: 1em; -} - -.fa-2x { - font-size: 2em; -} - -.fa-3x { - font-size: 3em; -} - -.fa-4x { - font-size: 4em; -} - -.fa-5x { - font-size: 5em; -} - -.fa-6x { - font-size: 6em; -} - -.fa-7x { - font-size: 7em; -} - -.fa-8x { - font-size: 8em; -} - -.fa-9x { - font-size: 9em; -} - -.fa-10x { - font-size: 10em; -} - -.fa-fw { - text-align: center; - width: 1.25em; -} - -.fa-ul { - list-style-type: none; - margin-left: 2.5em; - padding-left: 0; -} - -.fa-ul > li { - position: relative; -} - -.fa-li { - left: -2em; - position: absolute; - text-align: center; - width: 2em; - line-height: inherit; -} - -.fa-border { - border: solid 0.08em #eee; - border-radius: 0.1em; - padding: 0.2em 0.25em 0.15em; -} - -.fa-pull-left { - float: left; -} - -.fa-pull-right { - float: right; -} - -.fa.fa-pull-left, -.fas.fa-pull-left, -.far.fa-pull-left, -.fal.fa-pull-left, -.fab.fa-pull-left { - margin-right: 0.3em; -} - -.fa.fa-pull-right, -.fas.fa-pull-right, -.far.fa-pull-right, -.fal.fa-pull-right, -.fab.fa-pull-right { - margin-left: 0.3em; -} - -.fa-spin { - -webkit-animation: fa-spin 2s infinite linear; - animation: fa-spin 2s infinite linear; -} - -.fa-pulse { - -webkit-animation: fa-spin 1s infinite steps(8); - animation: fa-spin 1s infinite steps(8); -} - -@-webkit-keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.fa-rotate-90 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.fa-rotate-180 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; - -webkit-transform: rotate(180deg); - transform: rotate(180deg); -} - -.fa-rotate-270 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; - -webkit-transform: rotate(270deg); - transform: rotate(270deg); -} - -.fa-flip-horizontal { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; - -webkit-transform: scale(-1, 1); - transform: scale(-1, 1); -} - -.fa-flip-vertical { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; - -webkit-transform: scale(1, -1); - transform: scale(1, -1); -} - -.fa-flip-horizontal.fa-flip-vertical { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; - -webkit-transform: scale(-1, -1); - transform: scale(-1, -1); -} - -:root .fa-rotate-90, -:root .fa-rotate-180, -:root .fa-rotate-270, -:root .fa-flip-horizontal, -:root .fa-flip-vertical { - -webkit-filter: none; - filter: none; -} - -.fa-stack { - display: inline-block; - height: 2em; - position: relative; - width: 2em; -} - -.fa-stack-1x, -.fa-stack-2x { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; -} - -.svg-inline--fa.fa-stack-1x { - height: 1em; - width: 1em; -} - -.svg-inline--fa.fa-stack-2x { - height: 2em; - width: 2em; -} - -.fa-inverse { - color: #fff; -} - -.sr-only { - border: 0; - clip: rect(0, 0, 0, 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} - -.sr-only-focusable:active, .sr-only-focusable:focus { - clip: auto; - height: auto; - margin: 0; - overflow: visible; - position: static; - width: auto; -} - -/* - Icon font -*/ -@font-face { - font-family: "RedactorFont"; - src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMggi/NUAAAC8AAAAYGNtYXAaVcx2AAABHAAAAExnYXNwAAAAEAAAAWgAAAAIZ2x5Zm8dIFkAAAFwAAATSGhlYWQACVb9AAAUuAAAADZoaGVhA+ECBQAAFPAAAAAkaG10eEEBA94AABUUAAAAkGxvY2FVlFE8AAAVpAAAAEptYXhwAC8AkgAAFfAAAAAgbmFtZRHEcG0AABYQAAABZnBvc3QAAwAAAAAXeAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmHwHg/+D/4AHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADgAAAAKAAgAAgACAAEAIOYf//3//wAAAAAAIOYA//3//wAB/+MaBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAwAAACUCAAGSAAQACQANAAA3EQURBQEFEQURATUXBwACAP4AAdv+SgG2/tySkiUBbgH+lAEBSgH+3AEBJv7/3G9sAAAGAAAASQIAAW4ABAAJAA4AEwAYAB0AABMhFSE1FSEVITUVIRUhNSczFSM1FTMVIzUVMxUjNZIBbv6SAW7+kgFu/pKSSUlJSUlJAW5JSW5JSW5JSdxJSW5JSW5JSQAAAAACAAAAJQH3AZIAFgAuAAAlLgMnBzIuAic+AyMXNh4CByUnMg4CBx4DIxcnHgMXNi4CBwH3Dik/XUABAR04Vjg+WDUYAQFNeEcZEv7MAQENHDMlHzIfEQEBASZUTDYHCSBIZj4lGCQaEARqFi5HLzJFKhJqDC1RZSzVPQoWIxkbJBQID0wCCQ4VDxo4KA8PAAACAG4AJQGSAZIABAAzAAA3IQchJzceAzMyPgI3PgMnNyMXDgMHDgMjIi4CJy4DNycjBx4DF24BJQH+3QFABRIUGg0QGBUQCAYKBgQBAUABAQEEBAQCCAgKBQYJCQcEAgUCAwEBPwEBAwcJCEkkJD8HCgYEBAYKBwcRFRkPtcMGCQkHAwMFAwEBAwUDAwcJCQbDtQ8ZFREHAAUAAP//AgABtwAGAA4AFgBHAF8AAAEzFTMVIzUfAQc1IzUzNS8BNxUzFSMVFx4DFRwBDgEHDgMHMh4CFx4DHwEjJzwBJjQjLgMrARUjNTMyHgIXBzMyPgI3PgM1NC4CJy4DKwEVAUkjS24mkZFvb96RkW9vDAMFAwECAwICBQUGBAECAgIBAQICAgEbIBMBAQIEBQUCCh0qCAwKCQM3DgMFBQMCAQIBAQEBAgECAwQGAw4BtpYgtv9cXEolSUhcXEklSlUDCAoNBwQJBwcCAwUDAgEBAQIBAQMEBANCLgEBAQIGBwYCSLYBAwUDRAECAgECBAQGAwQFBQQBAgIBATIAAAAAAwBtAAABkgGTAAMADAARAAAlIzcXBzM3MxczAyMDFyEVITUBI0YjI7ZKF2MXSmVbZQEBJP7c5nh4eUlJASb+2iRJSQAKAAAAJQIAAZIABAAJAA4AEwAYAB0AIgAnACwAMQAANxEFEQU3FzUHFTU3NScVJwcVFzUVJxU3NRUHFRc1NxUXNQclBxUXNRUnFTc1FQcVFzUAAgD+ALeSkpKSJW1tbW1tbSWSkgEkbW1tbW1tJQFuAf6UASUBSgFIbQFIAUq4AUgBSm8BSgFIbQFIAUrbSAFKAQEBSAFKbwFKAUhtAUgBSgAAAAIACQAlAgABkgAWAC4AACUOAxU1DgMHJj4CFzU0HgIXBT4DNxU1FD4CNy4DNRUmDgIXAgA5VTkcQVxAKA8RGEh3Thc2Vz/+PAY3S1UlECAxICYyHQw9Z0chCt8wRi8VAWsFDxsjGS1kUiwLaQETKUYxYBAUDwgDTRABCRMlGhoiFwkBPhAQJzkZAAAAAgBJAEkBtwFuAEcAjwAAAQ4DFRQeAhceAxc+Azc+AzU0LgInLgMHJg4CBwYiBiYHNAYmIicwLgE0NTQ+Ajc+Azc1DgMHJw4DFRQeAhceAxc+Azc+AzU0LgInLgMHJg4CBwYiBiYVJgYmIjUiJjQmNTQ+Ajc+Azc1DgMHATkJDQkEAwYKBgcOEBAJCA4NDAUGCAUDAwQHBQUKCgwGBQoICAMBAgIBAQEBAQEBAQMGCgYGDxITCxMhHBYJzQkNCQQDBwkHBg4QEQgIDg0MBgUIBQMCBQcFBAoLDAYFCQkIAwECAgEBAQEBAQEBAwcJBgcPERQLEyEcFwkBIgwYHBsQCxgUEgcICwgDAQECBggGBQ0MDwYIDA0KBgUIBAQBAQICBQECAgEBAQECAQQCBQEKEhQRCggQDAwDFwgQFBQNAQwYHBsQCxgUEgcICwgDAQECBggGBQ0MDwYIDA0KBgUIBAQBAQICBQECAgEBAQECAQQCBQEKEhQRCggQDAwDFwgQFBQNAAT//wBJAgABbgAEAAkADgASAAATIRUhNRchFSE1FSEVITUHNQcXAAIA/gC3AUn+twFJ/rclk5MBbklJbklJbklJSbdcWwAAAAUAAABJAgABbgAEAAkADgAaAG0AABMhFSE1FSEVITUVIRUhNSczNSM1IwcVNxUjFRc+Azc+Azc0PgE0NTQuAicuAyMiBioBByIOAiMVPgM3Mj4BMjM6AR4BFx4CFBUcAQYUBw4DBw4DDwEVMzUjPgM3MZIBbv6SAW7+kgFu/pKNRBgUFhYYIAUHBQMBAgICAQEBAQEDBAICBgcHBQEEAwQCAgMEBAICBAQDAgIDAwMCAgMDAwEBAgEBAQEBAgICAQQGCQULRC0BAwQEAgFuSUluSUluSUlrFF0GFAZJFJEFBwYEAQIDBAMBAgMDAwIDBwUFAgIEAgEBAQEBAhUBAgIBAQEBAQIBAQIDBAIBAgMCAQICAwMCAQUHCQYNExQBBAMFAgADAAAASQIAAW4ALAAxAGwAACUiLgInNTMeAzMyPgI1NC4CIyIOAgcjNT4DMzIeAhUUDgIjJzMVIzUnIg4CByMVDgMVFB4CFxUzHgMzMj4CNzMVDgMjIi4CNTQ+AjMyHgIXFSMuAyMBbgoUEhEIHgUKCwsGEyEZDg4ZIRMGCwsKBR4IERIUCh41KBcXKDUet5KSJQYLCwoFHgQHBQICBQcEHgUKCwsGBgsLCgUeCBESFAoeNSgXFyg1HgoUEhEIHgUKCwsGSQMGBwU0AgQDAQ0XHhESHhcNAQMEAjQFBwYDFyg1Hx41KBe3SUkvAQMEAhgFCw0OBwcNDQsGFwIEAwEBAwQCNAUHBgMXKDUeHzUoFwMGBwU0AgQDAQAAAAEAAAC3AgABAAAEAAATIRUhNQACAP4AAQBJSQABAJIASQGSAZIADAAAAQ8CFzcHNxc3DwEXAQcpQQvBC0ApQAvBC0EBWdYBOAE6AdgBOgE4AQAAAAQAAABJAgABbgAEAAkADgASAAATIRUhNRchFSE1FSEVITUHNRcHAAIA/gC3AUn+twFJ/re3k5MBbklJbklJbklJSbdcWwAAAAMAAAAlAgABkgAEAAkAEgAANxEFEQUBBREFEQc/ARcVJTU3FwACAP4AAdv+SgG2tiQwPv6Sbm4lAW4B/pQBAUoB/twBASa4AV5eSgFIk5MABAAlAAAB2wG3AAMAGgAeADUAAAEVJzMHHgIGDwEOAS4BJy4BNDY/AT4BHgEXARcnFTceATI2PwE+AS4BJy4CBg8BDgEeARcB29vbKgMDAQICcwIGBgYCAwMBAnQCBQYGAv5029sqAwYGBQJzAgEBAgMCBgYGAnICAgEDAgG33NwrAgYGBgJzAgEBAgMDBQYGAnMCAQECA/51AdvaKgMDAQJzAgUGBgMCAwECAnMCBQYGAgAABAAA/9sCAAHbAAMAGgAeADUAACU1Fwc3LgI2PwE+AR4BFx4BFAYPAQ4BIiYnBycXNQcuASIGDwEOAR4BFx4CNj8BPgEuAScBJdvbKgMDAQICcwIGBgYCAwMBAnQCBQYGAnTb2yoDBgYFAnMCAQECAwIGBgYCcgICAQMC/9zbASwCBgYGAnICAgEDAgMGBgUCcwIBAwN1AdzbKgMDAQJzAgUGBgMCAwECAnICBgYGAgABAG4AJQFuAZIAEgAAJREjESM1Ii4CNTQ+AjsBESMBSSRKFigeEREeKBaTJSUBSf63khEeKBcWKB4R/pMAAAAAAwAlAAEB3AG2AAoAVwB4AAAlMwcnMzUjNxcjFQcOAwcOAyMiLgInLgM1ND4CNz4DOwE1NC4CJy4DIyIOAgcOAwc1PgM3PgIyMzIeAhceAx0BIzU1IyIOAgcOAxUUHgIXHgMzMj4CNz4DPQEBkkpcXEpKXFxK6wIGBgcEAwgICQUIDw4LBQUHBQIDBQkGBQ8SFAwlAQMDAgMFBwgFBAoJCQQFCQkJBQQJCQkEBQkKCQUNFRENBQUIBQI0FQgMCggDAwUDAQECAwICBQUHAwUJCQcCAwUCApKRkZORkZMHBAYFBQECAwIBAgUHBQULDQ8JCRANCwQFBgUCCQMGBQQCAgICAQEBAgEBAwQFAy8CAwMCAQEBAQIFCAUGDhIXDXgYSwECAwICBgYIBQQGBgUCAgMCAQIEBgQECgsOBwQAAAAEACUASgHbAW4AAwAMAC0AegAANyM3FwczNzMXMwMjAyUVFA4CBw4DIyIuAicuAzU0PgI3PgM7ATcuAyMqAQ4BBw4DBxU+Azc+AzMyHgIXHgMdASMiDgIHDgMVFB4CFx4DMzI+Ajc+AzcVMzU0LgInrjUbGok4EUsSOE1ETQF/AQMFAwMHCQoFBAYGBQIDAwIBAgMEAwMJCw0IFiIFDhIWDQYKCgoFBAoJCgQFCgoJBQUJCgoFBAkHBgIDAwMBJg0WEw8GBgkGAwIFCAUFDA4QCQUJCQgEBAcHBgI3AgUIBsV1dXZHRwEf/uFlBAcOCwsEBAYEAwICAwICBQYHAwUJBwUCAgMCAWIFCAYCAQEBAQMCBAIwAwUEAwIBAgEBAQIDAQIEBgYDCQMEBwQFCw4QCgkPDgsFBQcFAgEBAwICBQUHAxh7DhcTDwUAAAIASQBJAbcBkwAEAIEAABMhFSE1Fx4DFx4DFRQOAgcOAyMiLgInLgMnFR4DFx4DMzI+Ajc+AzU0LgInLgMvAS4DJy4DNTQ+Ajc+AzMyHgIXHgMXNS4DJy4DIyIOAgcOAxUUHgIXHgMfAUkBbv6SvwQIBgYCAgMDAQIDBQQDCAkLBgYNDAwGBg0NDQYGCwwNBgYNDAwHDxoXEggHCwgDAgUHBAUMDxIKHAcNCQcDAgMDAQIDBQMDCAkKBgYLCgsGBQsLCgYGCwwLBgYLDAsGDBcUEQcICwcDAgQHBAUMERUNIAEAJSUxAgMFBAMDBgYHAwUICAYDAgQDAQECAwMCBQcIBEEDBAUDAgECAQEDBgkGBQ8SFQwJEA8NBgYKCggDCwIFBQQDAgUFBgMFBwcFAwIDAwEBAgMCAgQGBgM9AgUDBAEBAgEBAwcJBgYPERMLCA8ODAQFCgoJBQsAAAQAAABJAgABbgAEAAkADgATAAA/ARcHJxc3FwcnJScHFzcXJwcXNwAltiO4AbYluCMB/yO4JbYBuCO2Jdsdkh6TAZQekhwBHZIekwGUHpIcAAAAAAUAAP/bAgAB2wAEAAkADgATABgAABcRIREhASERIREHITUhFRUhNSEVFSE1IRUAAgD+AAHb/koBtkn+3AEk/twBJP7cASQlAgD+AAHc/kkBt5JJSW5JSW5JSQAAAwCTAEkBbQGSABcALwBbAAA3Mh4CFx4DFwYUDgEHDgMrATczNzIeAhceAhQXBhQOAQcOAysBNzMDMzI+Ajc+Ayc2LgInLgMnPgM3PgMnNi4CJy4DKwED+AcNCQkDBAMEAQEBBAQEAgkKDQcqASgBBQsIBwIDAwQBAQQCBAEICAsFKgEoZGQRGRgRCAYLBgQBAQMEBwQGCg8OCggMDQgFAwcDAwEBBAYLBgcQFBcOZAHeAQMEAwMICQwHBgsJCAIDBAMBYYECAgMDAgYHCQUFCQcGAgIEAgFN/uoDBQgGBQ4RFQsKEQ8NBgUJBgQBAQMFBwUECwwOCAsSDw0FBggFAv63AAADACUAAAHbAbcABAANABEAADcRIREhEyMDMzczFzMDBxcjNyUBtv5K/URMOBBLETdLIho0GgABt/5JAW7+20hIASU1eHgAAAACAEIAHwG8AZkAIQBLAAAlBycOAS4BJwcXBw4BIiYvAS4BNDY/AT4BMhYfAR4BFAYHJy4BIgYPAQ4BFBYXHgE+AT8BLgMnLgI2PwE+AhYXBxc3PgE0JicBvJQEBQsMCwYhHg8PJygnDw8PDw8P1w8nKCcPDw8QEA8lCxscHAvFCwwLCgsbHRsLJwMFBgUCCgwDBQhSBg8QEgl+JoYLCwoL9pQEAQECAwMgHg8PDw8PDxAmKCcP1w8QEA8PDycoJw9+CwoLC8YLGx0bCwoLAQsLJgIDBAUCChcXFQhSBgYBBAV9JYYLHBwbCwAAAAMAAABJAgABbgAEAAkADgAAEyEVITUXIRUhNRczFSM1AAIA/gCSAW7+kpPb2wFuSUluSUluSUkAAwAAAEkCAAFuAAQACQAOAAATIRUhNRUhFSE1FTMVIzUAAgD+AAFt/pPc3AFuSUluSUluSUkAAAADAAAASQIAAW4ABAAJAA4AABMhFSE1FSEVITUVIRUhNQAB//4BAf/+AQIA/gABbklJbklJbklJAAMAAABJAgABbgAEAAkADgAAEyEHIScHIRchNxchByEnbgElAf7dAW0B/wH9/wFtASUB/t0BAW5JSW5JSW5JSQAGAAAAJwIAAZUACAANABQAGAAdACEAADc1IxEhFTMRIQEhFSE1FyMVIRUhNQcjNxcXITUhFScXIzdJSQG3Sf5JAUn+kwFtSiX+twFu27hcXG3+2wElKSlJICdJASVK/twBSdzcSbcl3EltbSUlJW5JSQAAAAEAAAABAADCHXSvXw889QALAgAAAAAAz3WLJQAAAADPdYsl////2wIAAdsAAAAIAAIAAAAAAAAAAQAAAeD/4AAAAgD//wAAAgAAAQAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAABAAAAAgAAAAIAAAACAAAAAgAAbgIAAAACAABtAgAAAAIAAAkCAABJAgD//wIAAAACAAAAAgAAAAIAAJICAAAAAgAAAAIAACUCAAAAAgAAbgIAACUCAAAlAgAASQIAAAACAAAAAgAAkwIAACUCAABCAgAAAAIAAAACAAAAAgAAAAIAAAAAAAAAAAoAFAAeAEAAcAC4AQQBhgGoAfoCQAMCAyYDuARGBFQEcASUBLwFFgVuBY4GLgbUB4IHrAfaCFwIgAj2CRIJLglKCWoJpAAAAAEAAAAkAJAACgAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAYAAAAAQAAAAAAAgAOAGoAAQAAAAAAAwAYAC4AAQAAAAAABAAYAHgAAQAAAAAABQAWABgAAQAAAAAABgAMAEYAAQAAAAAACgAoAJAAAwABBAkAAQAYAAAAAwABBAkAAgAOAGoAAwABBAkAAwAYAC4AAwABBAkABAAYAHgAAwABBAkABQAWABgAAwABBAkABgAYAFIAAwABBAkACgAoAJAAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0UmVkYWN0b3JGb250AFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0AFIAZQBnAHUAbABhAHIAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("truetype"), url(data:application/font-woff;charset=utf-8;base64,d09GRk9UVE8AABIoAAoAAAAAEeAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAA9AAADgEAAA4Bg0Rie09TLzIAAA74AAAAYAAAAGAIIvzVY21hcAAAD1gAAABMAAAATBpVzHZnYXNwAAAPpAAAAAgAAAAIAAAAEGhlYWQAAA+sAAAANgAAADYACVb9aGhlYQAAD+QAAAAkAAAAJAPhAgVobXR4AAAQCAAAAJAAAACQQQED3m1heHAAABCYAAAABgAAAAYAJFAAbmFtZQAAEKAAAAFmAAABZhHEcG1wb3N0AAASCAAAACAAAAAgAAMAAAEABAQAAQEBDVJlZGFjdG9yRm9udAABAgABADr4HAL4GwP4GAQeCgAZU/+Lix4KABlT/4uLDAeKZviU+HQFHQAAAT8PHQAAAUQRHQAAAAkdAAAN+BIAJQEBDRkbHSAlKi80OT5DSE1SV1xhZmtwdXp/hImOk5idoqessba7wFJlZGFjdG9yRm9udFJlZGFjdG9yRm9udHUwdTF1MjB1RTYwMHVFNjAxdUU2MDJ1RTYwM3VFNjA0dUU2MDV1RTYwNnVFNjA3dUU2MDh1RTYwOXVFNjBBdUU2MEJ1RTYwQ3VFNjBEdUU2MEV1RTYwRnVFNjEwdUU2MTF1RTYxMnVFNjEzdUU2MTR1RTYxNXVFNjE2dUU2MTd1RTYxOHVFNjE5dUU2MUF1RTYxQnVFNjFDdUU2MUR1RTYxRXVFNjFGAAACAYkAIgAkAgABAAQABwAKAA0AQQCYAPEBSQH6Ai8CxwMhA98EGwTXBYEFkQW0BfEGLwagBxEHOgf0CLUJaQmsCfwKhAq5C0QLdAuiC9AMAQxo/JQO/JQO/JQO+5QOi7AVi/gB+JSLi/wB/JSLBfhv990V/EqLi/u5+EqLi/e5Bfu4+5QVi/dv9yb7Avsm+wEFDvcm+AIV+AKLi0L8AouL1AWL+wIV+AKLi0L8AouL1AWL+wIV+AKLi0L8AouL1AX7JvdwFdSLi0JCi4vUBYv7AhXUi4tCQouL1AWL+wIV1IuLQkKLi9QFDviLsBVky0yq+0KWCIshBYuLQMb7LPcT9z33GsW4i4sIiyEF92Wr9wT7QV77Cgj7yfdpFYvIBYuLb3ImSOFBtnqLiwiLfIvXBe6F9yJ7nGSl0PsO6Ps2YwgO9wLUFfe4i4tn+7iLi68FysoVnHmngrGLsounlJydnJ2Up4uyCIv3SUyLi/tXBYt8hoCDg4ODgId8i32Lf4+Dk4OTh5aLmgiL91dLi4v7SQWLZJRvnXkIDvfd+EoVrouL+yrWi4tr+wKLi/dKBbH7kxX3JS/7JS+L1fsDi4uw9wOLi9QF+3LTFfsl5/cl54tC9wOLi2b7A4uLQQWXNhWTg499i3iLf4mBhoSGg4SHgYmOio6KjYiNiI6GjoQIpklri3i5BYuMio2KjYaZhZKEiwiBi4tDbouL90q1iwWfi5mHk4MIVEcVmYsFk4uRjY+Pjo+NkYuUi5SJkoiOh4+FjYOLCH2Li1kFDve393oVRYuu9wyu+wwF+0r7DRXVi6LU7ouiQtWLJve6MIsm+7oFjGcV97iLi0L7uIuL1AUOi7AVi/gB+JSLi/wB/JSLBfdLrxX3JouL1Psmi4tCBYv3AhX3JouL1Psmi4tCBWb3SxX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBbD3cBWLQvcmi4vU+yaLBfe4ixX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBYv7AhX7AYuLQvcBi4vUBQ74lPdzFfss+xNAUIuLCIv1BftCgExsZEte9wr3BPdB92VrCIv1BYuLxV73PfsaCPxYLBWcsvcim+6RCIs/i5oFi4u2nOHVJs5vpIuLCItOBfs2s/sOLqVGCA73zfe2FXNsgGiLY4tpk3Ccd513n4Gji6CLnJKZmpqakpyLn4uehZt+mH+ZfJJ7i32LgIeChQiIiYmKiYuKi4mMioyKjoqPi5GLpJOknKOco6KcqJYIi6EFWXhlcnRrCPthixV0bH9oi2OLaZNwnXecd6CBoougi5ySmpqZmpKci5+LnoWbfph/mX2Seot+i3+IgoQIiImJioqLiYuKjIqMiY6Kj4uRi6SUpJujnKOinKmWCIuhBVh4ZnJzawgOi/gCFfiUi4tC/JSLi9QF90v7AhX33YuLQvvdi4vUBYv7AhX33YuLQvvdi4vUBWZCFYv3S/snL/cnMAUO9yb4AhX4AouLQvwCi4vUBYv7AhX4AouLQvwCi4vUBYv7AhX4AouLQvwCi4vUBfsh9hXPi4ufc4uL6HeLdYWLd6GRi0Jzi4t3Bav7JRWXl5KTjY6PkI2PjY+Mj4yPi5CLlIiThJCFkYKOf4uHi4aKhoqGioaKhokIi3YFkI6QjZCNkIyPjI+LkIuPio6IjoiMh4uGi4iLiImIiYeJh4eHiIiDgX18CIB+i3jPi4ufXosFjo+QkJGRCIuLBQ74AtQVcItyk3aYCIu/qYsFmIWZh5uLvYu0sIu5i7pisFmLe4t9h36FCG2Li78FoJikk6aL3IvMSYs6iztKSTqLCPtL90sV9yaLi0L7JouL1AVmuhV8i3yHfoUIbYuLcwWAfYR6i3iLeZJ5ln0Ii3SpiwWYhZqHmoubi5mPmJEIqYuLVwV2fnKDcIs6i0rNi9uL3MzN3Iumi6SDoH4Ii1dtiwV+kX2Pe4sIDov3lBX4lIuLQvyUi4vUBQ73m/ftFWL7a0qLgFL3VYuWxEuLtPdry4uWxPtVi4BSzIsFDov4AhX4lIuLQvyUi4vUBfdL+wIV992Li0L73YuL1AWL+wIV992Li0L73YuL1AX7S0IVi/dL9ycv+ycwBQ6LsBWL+AH4lIuL/AH8lIsF+G/33RX8SouL+7n4SouL97kF+0r7SxWvi7vqySyLQvwCi4vU9wL3JvcC+yYFDvhv+EsVi/tw+2/3cPdviwVhYBWShIyChoUI+wf7BwWFhoKMhJKEkoqUkJEI9wj3BwWQkJWKkYQI/CD8HxX3b4r7b/dvi/tuBbW1FZKElYqQkAj3B/cHBZCQipWEkoSRgo2FhQj7BvsHBYWGjYGRhQgO97n3kxWL93D3b/tv+2+KBbW3FYSSipSQkQj3B/cGBZGRlIqShJKEjIGGhgj7CPsHBYaGgYyFkgj7CPsJFftvjPdv+3CL928FYWEVhJKBjIaGCPsH+wcFhoaMgZKEkoSUipGRCPcG9wYFkZGJlIWSCA733bAVi/fdZ4uL+91Bi4v3JgVPi1q8i8iLx7y8x4sI9yeLi/wBZosFDvgm9yYV1Ysv+yUv9yXVi4v3J0GL5/cl5/slQYuL+ycF+3+EFYWCgoSBhoGGgIh/i3WLeZF+mH6XhZ2Looujkp2blpqXopGriwiwi4uUBYuUiJKFj4SQgo1/i3+Lf4l/iH+If4V+hAiLugWWkJeOl46XjZiMmIusi6KEmH6ZfZFyi2gIi/sMV4uLowWL1hV2iwV3i32IhIaDhoeCi36LgY6EkIWQhpOIlIuZi5aQkpaTlo+ai58Ii48FDvdC91kVVoum9wml+wkF+x37ChXDi5zS1oudRMOLPvezR4s++7MF+BPwFYuHBYt3h3uDgIOAf4V9i4GLg46GkYWRiJOLlIuYj5WTkJSQmY6giwihiwWt7RV9mXOSaYt8i36Kfol/iH6Hf4YIi1sFmJOYkJiPl46YjZmLl4uViJGHkoaOhIuCCIuCZYsFaYtyhXt/e3+DeItyi3SReZl+mH6ehaOLmIuXjZWQlpCTk5KUCItzwouL9w8Fi6+EpX2ZCA7U95QV+AKLi2b8AouLsAX3U1oVloeUhZGEkYSOgouCi36GgYKEgoR/iHuLe4t6jnuRepB6lHqXCItKBZqEm4Wch5yIm4mci7OLqZOfm5+alKOLq4ujhZ9/mn6bd5dwlAhvlgV3kX6ShZGFkIiTi5OLl4+UlJGTkZeOm4uai5mImoaZhpqEmYIIi8gFfJF8kHuPfI58jXuLaYtxg3h6d3uCdItui3WQeZd+l32hf61+CKuABQ6L928Vr6n3S/snZ277S/cmBYuLFfdL9yevbvtL+ydnqAX4lIsVZ6n7S/snr273S/cmBYuLFftL9ydnbvdL+yevqAUOi2YVi/iU+JSLi/yU/JSLBfhv+HAV/EqLi/xL+EqLi/hLBUL7JhX7uIuL1Pe4i4tCBYv7AhX7uIuL1Pe4i4tCBYv7AhX7uIuL1Pe4i4tCBQ73jPdyFZ6LmYiUg5ODj36LeYt6h3+DhIOEfYd3iwhii4vstIsFi/cVFZuLloiShJKFjoKLfYt+iIGEhYSFgIh7iwhii4vYtIsFJvuqFfCLBbWLqJKemp2ZlKKLqoulhZ9/mn+ZeZRzjZ+NmpKVl5aXkJuLoIungqB5mHqZcJJoiwgmi4v73QUOsIsVi/hL+EqLi/xL/EqLBfeR+AIVR4s/+7nDi5vT1oucQ8KLQPe5BWlWFaX7DFeLpfcMBQ74UPeKFfso+yiHjwV9h3uNfJMIamupbXx8BWJiSYtitAh8mgVitIvNtLQI92v3awW0tM2LtGIImnwFtGKLSWJiCGb3EhVuqFyKbm4I+1n7WgVtbotcp26ob7qLqKkIsrEFg4+EkIWScKaGsJ+gCN3dBZuapIyifwj7EvsRsWb3GvcaBaiojLpuqAgOi/gCFfiUi4tC/JSLi9QF9yb7AhX4AouLQvwCi4vUBfcn+wIV92+Li0L7b4uL1AUOi/gCFfiUi4tC/JSLi9QFi/sCFfgBi4tC/AGLi9QFi/sCFfdwi4tC+3CLi9QFDov4AhX4k4uLQvyTi4vUBYv7AhX4k4uLQvyTi4vUBYv7AhX4lIuLQvyUi4vUBQ73AvgCFfe4i4tC+7iLi9QF+wL7AhX4lIuLQvyUi4vUBfcC+wIV97iLi0L7uIuL1AUO1LIVi9RCi4v3ufhLi4tB1IuL+7j8S4sF99333RX8AYuL+3D4AYuL93AF1UIVZouL+0v73YuLZvgCi4v3cAX7b0IV+0yL5/cB5/sBBfcBZhX7uYuLsPe5i4tmBWL3AhW0QkKLq9QFDviUFPiUFYsMCgAAAAADAgABkAAFAAABTAFmAAAARwFMAWYAAAD1ABkAhAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAEAAAOYfAeD/4P/gAeAAIAAAAAEAAAAAAAAAAAAAACAAAAAAAAIAAAADAAAAFAADAAEAAAAUAAQAOAAAAAoACAACAAIAAQAg5h///f//AAAAAAAg5gD//f//AAH/4xoEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAQAAhlBJsl8PPPUACwIAAAAAAM91iyUAAAAAz3WLJf///9sCAAHbAAAACAACAAAAAAAAAAEAAAHg/+AAAAIA//8AAAIAAAEAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAQAAAAIAAAACAAAAAgAAAAIAAG4CAAAAAgAAbQIAAAACAAAJAgAASQIA//8CAAAAAgAAAAIAAAACAACSAgAAAAIAAAACAAAlAgAAAAIAAG4CAAAlAgAAJQIAAEkCAAAAAgAAAAIAAJMCAAAlAgAAQgIAAAACAAAAAgAAAAIAAAACAAAAAABQAAAkAAAAAAAOAK4AAQAAAAAAAQAYAAAAAQAAAAAAAgAOAGoAAQAAAAAAAwAYAC4AAQAAAAAABAAYAHgAAQAAAAAABQAWABgAAQAAAAAABgAMAEYAAQAAAAAACgAoAJAAAwABBAkAAQAYAAAAAwABBAkAAgAOAGoAAwABBAkAAwAYAC4AAwABBAkABAAYAHgAAwABBAkABQAWABgAAwABBAkABgAYAFIAAwABBAkACgAoAJAAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwAFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0UmVkYWN0b3JGb250AFIAZQBkAGEAYwB0AG8AcgBGAG8AbgB0AFIAZQBnAHUAbABhAHIAUgBlAGQAYQBjAHQAbwByAEYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("woff"); - font-weight: normal; - font-style: normal; -} -/* - Box -*/ -.redactor-box { - position: relative; - overflow: visible; - margin-bottom: 24px; -} - -.redactor-box textarea { - display: block; - position: relative; - margin: 0; - padding: 0; - width: 100%; - overflow: auto; - outline: none; - border: none; - background-color: #111; - box-shadow: none; - color: #ccc; - font-size: 13px; - font-family: Menlo, Monaco, monospace, sans-serif !important; - resize: none; -} - -.redactor-box textarea:focus { - outline: none; -} - -.redactor-editor, -.redactor-box { - background: #fff; -} - -/* - Z-index setup -*/ -.redactor-editor, -.redactor-box, -.redactor-box textarea { - z-index: auto; -} - -.redactor-box-fullscreen { - z-index: 1051; -} - -.redactor-toolbar { - z-index: 100; -} - -.redactor-dropdown { - z-index: 1052; -} - -#redactor-modal-overlay, -#redactor-modal-box, -#redactor-modal { - z-index: 1053; -} - -/* - Fullscreen -*/ -body .redactor-box-fullscreen { - position: fixed; - top: 0; - left: 0; - width: 100%; -} - -/* - Utils -*/ -.redactor-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; -} - -/* - Editor -*/ -.redactor-editor { - position: relative; - overflow: auto; - margin: 0 !important; - padding: 20px; - min-height: 80px; - outline: none; - white-space: normal; - border: 1px solid #eee; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; - font-size: 14px; - line-height: 1.6em; -} - -.redactor-editor:focus { - outline: none; -} - -.toolbar-fixed-box + .redactor-editor { - padding-top: 32px !important; -} - -/* - Placeholder -*/ -.redactor-placeholder:after { - position: absolute; - top: 20px; - left: 20px; - content: attr(placeholder); - display: block; - /* For Firefox */ - color: #999 !important; - font-weight: normal !important; -} - -/* - Toolbar -*/ -.redactor-toolbar { - position: relative; - top: 0; - left: 0; - margin: 0 !important; - padding: 0 !important; - list-style: none !important; - font-size: 14px !important; - line-height: 1 !important; - background: #fff; - border: none; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); -} - -.redactor-toolbar:after { - content: ""; - display: table; - clear: both; -} - -.redactor-toolbar.redactor-toolbar-overflow { - overflow-y: auto; - height: 29px; - white-space: nowrap; -} - -.redactor-toolbar.redactor-toolbar-external { - z-index: 999; - box-shadow: none; - border: 1px solid rgba(0, 0, 0, 0.1); -} - -.redactor-toolbar li { - vertical-align: top; - display: inline-block; - margin: 0 !important; - padding: 0 !important; - outline: none; - list-style: none !important; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -.redactor-toolbar li a { - display: block; - color: #333; - text-align: center; - padding: 9px 10px; - outline: none; - border: none; - text-decoration: none; - cursor: pointer; - zoom: 1; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -.redactor-toolbar li a:hover { - outline: none; - background-color: #1f78d8; - color: #fff; -} - -.redactor-toolbar li a:hover i:before { - color: #fff; -} - -.redactor-toolbar li a:active, -.redactor-toolbar li a.redactor-act { - outline: none; - background-color: #ccc; - color: #444; -} - -.redactor-toolbar li a.redactor-btn-image { - width: 14px; - height: 14px; - background-position: center center; - background-repeat: no-repeat; -} - -.redactor-toolbar li a.fa-redactor-btn { - display: inline-block; - padding: 9px 10px 8px 10px; - line-height: 1; -} - -.redactor-toolbar li a.redactor-button-disabled { - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; -} - -.redactor-toolbar li a.redactor-button-disabled:hover { - color: #333; - outline: none; - background-color: transparent !important; - cursor: default; -} - -.redactor-toolbar li a.redactor-button-focus { - color: #fff; - background: #000; -} - -/* - CodeMirror -*/ -.redactor-box .CodeMirror { - display: none; -} - -/* - Icons -*/ -.re-icon { - font-family: "RedactorFont"; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.re-icon i:before { - position: relative; - font-size: 14px; -} - -.re-video:before { - content: "\e600"; -} - -.re-unorderedlist:before { - content: "\e601"; -} - -.re-undo:before { - content: "\e602"; -} - -.re-underline:before { - content: "\e603"; -} - -.re-textdirection:before { - content: "\e604"; -} - -.re-fontcolor:before { - content: "\e605"; -} - -.re-table:before { - content: "\e606"; -} - -.re-redo:before { - content: "\e607"; -} - -.re-quote:before { - content: "\e608"; -} - -.re-outdent:before { - content: "\e609"; -} - -.re-orderedlist:before { - content: "\e60a"; -} - -.re-link:before { - content: "\e60b"; -} - -.re-horizontalrule:before { - content: "\e60c"; -} - -.re-italic:before { - content: "\e60d"; -} - -.re-indent:before { - content: "\e60e"; -} - -.re-image:before { - content: "\e60f"; -} - -.re-fullscreen:before { - content: "\e610"; -} - -.re-normalscreen:before { - content: "\e611"; -} - -.re-formatting:before { - content: "\e612"; -} - -.re-fontsize:before { - content: "\e613"; -} - -.re-fontfamily:before { - content: "\e614"; -} - -.re-deleted:before { - content: "\e615"; -} - -.re-html:before { - content: "\e616"; -} - -.re-clips:before { - content: "\e617"; -} - -.re-bold:before { - content: "\e618"; -} - -.re-backcolor:before { - content: "\e619"; -} - -.re-file:before { - content: "\e61a"; -} - -.re-alignright:before { - content: "\e61b"; -} - -.re-alignment:before, -.re-alignleft:before { - content: "\e61c"; -} - -.re-alignjustify:before { - content: "\e61d"; -} - -.re-aligncenter:before { - content: "\e61e"; -} - -.re-gallery:before { - content: "\e61f"; -} - -/* - Toolbar tooltip -*/ -.redactor-toolbar-tooltip { - position: absolute; - z-index: 1054; - text-align: center; - top: 0; - left: 0; - background: #000; - color: #fff; - padding: 5px 8px; - line-height: 1; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; - font-size: 12px; - border-radius: 2px; -} - -/* - Dropdown -*/ -.redactor-dropdown { - position: absolute; - top: 28px; - left: 0; - padding: 0; - min-width: 220px; - max-height: 254px; - overflow: auto; - background-color: #fff; - box-shadow: 0 1px 7px rgba(0, 0, 0, 0.25); - font-size: 14px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; - line-height: 1.6em; -} - -.redactor-dropdown a { - display: block; - padding: 10px 15px; - color: #000; - text-decoration: none; - border-bottom: 1px solid rgba(0, 0, 0, 0.07); -} - -.redactor-dropdown a:last-child { - border-bottom: none; -} - -.redactor-dropdown a:hover { - background-color: #1f78d8; - color: #fff !important; - text-decoration: none; -} - -.redactor-dropdown a.selected { - background-color: #000; - color: #fff; -} - -.redactor-dropdown a.redactor-dropdown-link-inactive, -.redactor-dropdown a.redactor-dropdown-link-inactive:hover { - background: none; - cursor: default; - color: #000 !important; - filter: alpha(opacity=40); - -moz-opacity: 0.4; - opacity: 0.4; -} - -.redactor-dropdown a.redactor-dropdown-link-selected { - color: #fff; - background: #000; -} - -/* - IMAGE BOX -*/ -#redactor-image-box { - position: relative; - max-width: 100%; - display: inline-block; - line-height: 0; - outline: 1px dashed rgba(0, 0, 0, 0.6); -} - -#redactor-image-editter { - position: absolute; - z-index: 5; - top: 50%; - left: 50%; - margin-top: -11px; - margin-left: -18px; - line-height: 1; - background-color: #000; - color: #fff; - font-size: 11px; - padding: 7px 10px; - cursor: pointer; -} - -#redactor-image-resizer { - position: absolute; - z-index: 2; - line-height: 1; - cursor: nw-resize; - bottom: -4px; - right: -5px; - border: 1px solid #fff; - background-color: #000; - width: 8px; - height: 8px; -} - -/* - LINK TOOLTIP -*/ -.redactor-link-tooltip { - position: absolute; - z-index: 99; - padding: 10px; - line-height: 1; - display: inline-block; - background-color: #000; - color: #555 !important; -} - -.redactor-link-tooltip, -.redactor-link-tooltip a { - font-size: 12px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; -} - -.redactor-link-tooltip a { - color: #ccc; - margin: 0 5px; - text-decoration: none; -} - -.redactor-link-tooltip a:hover { - color: #fff; -} - -/* - DROPAREA -*/ -#redactor-droparea { - position: relative; - overflow: hidden; - padding: 140px 20px; - border: 3px dashed rgba(0, 0, 0, 0.1); -} - -#redactor-droparea.drag-hover { - background: rgba(200, 222, 250, 0.75); -} - -#redactor-droparea.drag-drop { - background: rgba(250, 248, 200, 0.5); -} - -#redactor-droparea-placeholder { - text-align: center; - font-size: 12px; - color: rgba(0, 0, 0, 0.7); -} - -/* - PROGRESS -*/ -#redactor-progress { - position: fixed; - top: 0; - left: 0; - width: 100%; - z-index: 1000000; - height: 10px; -} - -#redactor-progress span { - display: block; - width: 100%; - height: 100%; - background-color: #3d58a8; - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent); - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; - background-size: 40px 40px; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-o-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -/* - MODAL -*/ -#redactor-modal-overlay { - position: fixed; - top: 0; - left: 0; - margin: auto; - overflow: auto; - width: 100%; - height: 100%; - background-color: #000 !important; - filter: alpha(opacity=30); - -moz-opacity: 0.3; - opacity: 0.3; -} - -#redactor-modal-box { - position: fixed; - top: 0; - left: 0; - bottom: 0; - right: 0; - overflow-x: hidden; - overflow-y: auto; -} - -#redactor-modal { - outline: 0; - position: relative; - margin: auto; - margin-bottom: 20px; - padding: 0; - background: #fff; - color: #000; - font-size: 14px !important; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; - box-shadow: 0 1px 70px rgba(0, 0, 0, 0.5); -} - -#redactor-modal header { - padding: 30px 40px 5px 40px; - font-size: 18px; - font-weight: bold; -} - -#redactor-modal section { - padding: 30px 40px 50px 40px; -} - -#redactor-modal label { - display: block; - float: none !important; - margin: 15px 0 3px 0 !important; - padding: 0; -} - -#redactor-modal input[type=radio], -#redactor-modal input[type=checkbox] { - position: relative; - top: -1px; -} - -#redactor-modal select { - width: 100%; -} - -#redactor-modal input[type=text], -#redactor-modal input[type=password], -#redactor-modal input[type=email], -#redactor-modal input[type=url], -#redactor-modal textarea { - position: relative; - z-index: 2; - margin: 0; - padding: 5px 4px; - height: 28px; - border: 1px solid #ccc; - border-radius: 1px; - background-color: white; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset; - color: #333; - width: 100%; - font-size: 14px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; - -moz-transition: border 0.3s ease-in; - transition: border 0.3s ease-in; -} - -#redactor-modal input[type=text]:focus, -#redactor-modal input[type=password]:focus, -#redactor-modal input[type=email]:focus, -#redactor-modal input[type=url]:focus, -#redactor-modal textarea:focus { - outline: none; - border-color: #5ca9e4; - box-shadow: 0 0 0 2px rgba(70, 161, 231, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; -} - -#redactor-modal input[type=text].redactor-input-error, -#redactor-modal input[type=password].redactor-input-error, -#redactor-modal input[type=email].redactor-input-error, -#redactor-modal input[type=url].redactor-input-error, -#redactor-modal textarea.redactor-input-error { - border-color: #e82f2f; - box-shadow: 0 0 0 2px rgba(232, 47, 47, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2) inset; -} - -#redactor-modal textarea { - display: block; - margin-top: 4px; - line-height: 1.4em; -} - -/* - Tabs in Modal -*/ -#redactor-modal-tabber { - margin-bottom: 15px; - font-size: 12px; -} - -#redactor-modal-tabber a { - border: 1px solid #ddd; - line-height: 1; - padding: 8px 15px; - margin-right: -1px; - text-decoration: none; - color: #000; -} - -#redactor-modal-tabber a:hover { - background-color: #1f78d8; - border-color: #1f78d8; - color: #fff; -} - -#redactor-modal-tabber a.active { - cursor: default; - background-color: #ddd; - border-color: #ddd; - color: rgba(0, 0, 0, 0.6); -} - -/* - List in Modal -*/ -#redactor-modal #redactor-modal-list { - margin-left: 0; - padding-left: 0; - list-style: none; - max-height: 250px; - overflow-x: auto; -} - -#redactor-modal #redactor-modal-list li { - border-bottom: 1px solid #ddd; -} - -#redactor-modal #redactor-modal-list li:last-child { - border-bottom: none; -} - -#redactor-modal #redactor-modal-list a { - padding: 10px 5px; - color: #000; - text-decoration: none; - font-size: 13px; - display: block; - position: relative; -} - -#redactor-modal #redactor-modal-list a:hover { - background-color: #eee; -} - -#redactor-modal-close { - position: absolute; - top: 10px; - right: 10px; - width: 30px; - height: 30px; - text-align: right; - color: #bbb; - font-size: 30px; - font-weight: 300; - cursor: pointer; - -webkit-appearance: none; - padding: 0; - border: 0; - background: 0; - outline: none; -} - -#redactor-modal-close:hover { - color: #000; -} - -#redactor-modal footer button { - position: relative; - width: 100%; - padding: 14px 16px; - margin: 0; - outline: none; - border: none; - background-color: #ddd; - color: #000; - text-align: center; - text-decoration: none; - font-weight: normal; - font-size: 12px; - font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important; - line-height: 1; - cursor: pointer; -} - -#redactor-modal footer button:hover { - color: #777; - background: none; - background: #bbb; - text-decoration: none; -} - -#redactor-modal footer button.redactor-modal-delete-btn { - background: none; - color: #fff; - background-color: #b52525; -} - -#redactor-modal footer button.redactor-modal-delete-btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #881b1b; -} - -#redactor-modal footer button.redactor-modal-action-btn { - background: none; - color: #fff; - background-color: #2461b5; -} - -#redactor-modal footer button.redactor-modal-action-btn:hover { - color: rgba(255, 255, 255, 0.6); - background-color: #1a4580; -} - -/* - ############################################## - - DROPDOWN FORMATTING - - ############################################## -*/ -.redactor-dropdown .redactor-formatting-blockquote { - color: rgba(0, 0, 0, 0.4); - font-style: italic; -} - -.redactor-dropdown .redactor-formatting-pre { - font-family: monospace, sans-serif; -} - -.redactor-dropdown .redactor-formatting-h1 { - font-size: 36px; - line-height: 36px; - font-weight: bold; -} - -.redactor-dropdown .redactor-formatting-h2 { - font-size: 24px; - line-height: 36px; - font-weight: bold; -} - -.redactor-dropdown .redactor-formatting-h3 { - font-size: 21px; - line-height: 30px; - font-weight: bold; -} - -.redactor-dropdown .redactor-formatting-h4 { - font-size: 18px; - line-height: 26px; - font-weight: bold; -} - -.redactor-dropdown .redactor-formatting-h5 { - font-size: 16px; - line-height: 23px; - font-weight: bold; -} - -/* - ############################################## - - CONTENT STYLES - - ############################################## -*/ -.redactor-editor code, -.redactor-editor pre { - font-family: Menlo, Monaco, monospace, sans-serif !important; - cursor: text; -} - -.redactor-editor div, -.redactor-editor p, -.redactor-editor ul, -.redactor-editor ol, -.redactor-editor table, -.redactor-editor dl, -.redactor-editor blockquote, -.redactor-editor pre { - font-size: 14px; - line-height: 1.6em; -} - -.redactor-editor a { - color: #15c; - text-decoration: underline; -} - -.redactor-editor object, -.redactor-editor embed, -.redactor-editor video, -.redactor-editor img { - max-width: 100%; - width: auto; -} - -.redactor-editor video, -.redactor-editor img { - height: auto; -} - -.redactor-editor div, -.redactor-editor p, -.redactor-editor ul, -.redactor-editor ol, -.redactor-editor table, -.redactor-editor dl, -.redactor-editor figure, -.redactor-editor blockquote, -.redactor-editor pre { - margin: 0; - margin-bottom: 15px; - border: none; - background: none; - box-shadow: none; -} - -.redactor-editor iframe, -.redactor-editor object, -.redactor-editor hr { - margin-bottom: 15px; -} - -.redactor-editor blockquote { - margin-left: 1.6em !important; - padding: 0; - text-align: left; - color: #777; - font-style: italic; -} - -.redactor-editor blockquote:before, -.redactor-editor blockquote:after { - content: ""; -} - -.redactor-editor ul, -.redactor-editor ol { - padding-left: 2em; -} - -.redactor-editor ul ul, -.redactor-editor ol ol, -.redactor-editor ul ol, -.redactor-editor ol ul { - margin: 2px; - padding: 0; - padding-left: 2em; - border: none; -} - -.redactor-editor ol ol li { - list-style-type: lower-alpha; -} - -.redactor-editor ol ol ol li { - list-style-type: lower-roman; -} - -.redactor-editor dl dt { - font-weight: bold; -} - -.redactor-editor dd { - margin-left: 1em; -} - -.redactor-editor table { - border-collapse: collapse; - font-size: 1em; - width: 100%; -} - -.redactor-editor table td, -.redactor-editor table th { - padding: 5px; - border: 1px solid #ddd; - vertical-align: top; -} - -.redactor-editor table thead td, -.redactor-editor table th { - font-weight: bold; - border-bottom-color: #888; -} - -.redactor-editor code { - background-color: #d8d7d7; -} - -.redactor-editor pre { - padding: 1em; - border: 1px solid #ddd; - border-radius: 3px; - background: #f8f8f8; - font-size: 90%; -} - -.redactor-editor hr { - display: block; - height: 1px; - border: 0; - border-top: 1px solid #ccc; -} - -.redactor-editor h1, -.redactor-editor h2, -.redactor-editor h3, -.redactor-editor h4, -.redactor-editor h5, -.redactor-editor h6 { - font-weight: bold; - color: #000; - padding: 0; - background: none; - text-rendering: optimizeLegibility; - margin: 0 0 0.5em 0; -} - -.redactor-editor h1, -.redactor-editor h2, -.redactor-editor h3, -.redactor-editor h4 { - line-height: 1.3; -} - -.redactor-editor h1 { - font-size: 36px; -} - -.redactor-editor h2 { - font-size: 24px; - margin-bottom: 0.7em; -} - -.redactor-editor h3 { - font-size: 21px; -} - -.redactor-editor h4 { - font-size: 18px; -} - -.redactor-editor h5 { - font-size: 16px; -} - -.redactor-editor h6 { - font-size: 12px; - text-transform: uppercase; -} - -.flatpickr-calendar { - background: transparent; - overflow: hidden; - max-height: 0; - opacity: 0; - visibility: hidden; - text-align: center; - padding: 0; - -webkit-animation: none; - animation: none; - direction: ltr; - border: 0; - font-size: 14px; - line-height: 24px; - border-radius: 5px; - position: absolute; - width: 307.875px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - -ms-touch-action: manipulation; - touch-action: manipulation; - background: #fff; - -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08); - box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08); -} - -.flatpickr-calendar.open, .flatpickr-calendar.inline { - opacity: 1; - visibility: visible; - overflow: visible; - max-height: 640px; -} - -.flatpickr-calendar.open { - display: inline-block; - z-index: 99999; -} - -.flatpickr-calendar.animate.open { - -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-calendar.inline { - display: block; - position: relative; - top: 2px; -} - -.flatpickr-calendar.static { - position: absolute; - top: calc(100% + 2px); -} - -.flatpickr-calendar.static.open { - z-index: 999; - display: block; -} - -.flatpickr-calendar.hasWeeks { - width: auto; -} - -.flatpickr-calendar .hasWeeks .dayContainer, .flatpickr-calendar .hasTime .dayContainer { - border-bottom: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.flatpickr-calendar .hasWeeks .dayContainer { - border-left: 0; -} - -.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time { - height: 40px; - border-top: 1px solid #e6e6e6; -} - -.flatpickr-calendar.noCalendar.hasTime .flatpickr-time { - height: auto; -} - -.flatpickr-calendar:before, .flatpickr-calendar:after { - position: absolute; - display: block; - pointer-events: none; - border: solid transparent; - content: ""; - height: 0; - width: 0; - left: 22px; -} - -.flatpickr-calendar.rightMost:before, .flatpickr-calendar.rightMost:after { - left: auto; - right: 22px; -} - -.flatpickr-calendar:before { - border-width: 5px; - margin: 0 -5px; -} - -.flatpickr-calendar:after { - border-width: 4px; - margin: 0 -4px; -} - -.flatpickr-calendar.arrowTop:before, .flatpickr-calendar.arrowTop:after { - bottom: 100%; -} - -.flatpickr-calendar.arrowTop:before { - border-bottom-color: #e6e6e6; -} - -.flatpickr-calendar.arrowTop:after { - border-bottom-color: #fff; -} - -.flatpickr-calendar.arrowBottom:before, .flatpickr-calendar.arrowBottom:after { - top: 100%; -} - -.flatpickr-calendar.arrowBottom:before { - border-top-color: #e6e6e6; -} - -.flatpickr-calendar.arrowBottom:after { - border-top-color: #fff; -} - -.flatpickr-calendar:focus { - outline: 0; -} - -.flatpickr-wrapper { - position: relative; - display: inline-block; -} - -.flatpickr-month { - background: transparent; - color: rgba(0, 0, 0, 0.9); - fill: rgba(0, 0, 0, 0.9); - height: 28px; - line-height: 1; - text-align: center; - position: relative; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - overflow: hidden; -} - -.flatpickr-prev-month, .flatpickr-next-month { - text-decoration: none; - cursor: pointer; - position: absolute; - top: 0; - line-height: 16px; - height: 28px; - padding: 10px calc(3.57% - 1.5px); - z-index: 3; -} - -.flatpickr-prev-month i, .flatpickr-next-month i { - position: relative; -} - -.flatpickr-prev-month.flatpickr-prev-month, .flatpickr-next-month.flatpickr-prev-month { /* -/*rtl:begin:ignore*/ - left: 0; /* -/*rtl:end:ignore*/ -} /* -/*rtl:begin:ignore*/ -/* - /*rtl:end:ignore*/ -.flatpickr-prev-month.flatpickr-next-month, .flatpickr-next-month.flatpickr-next-month { /* -/*rtl:begin:ignore*/ - right: 0; /* -/*rtl:end:ignore*/ -} /* -/*rtl:begin:ignore*/ -/* - /*rtl:end:ignore*/ -.flatpickr-prev-month:hover, .flatpickr-next-month:hover { - color: #959ea9; -} - -.flatpickr-prev-month:hover svg, .flatpickr-next-month:hover svg { - fill: #f64747; -} - -.flatpickr-prev-month svg, .flatpickr-next-month svg { - width: 14px; -} - -.flatpickr-prev-month svg path, .flatpickr-next-month svg path { - -webkit-transition: fill 0.1s; - transition: fill 0.1s; - fill: inherit; -} - -.numInputWrapper { - position: relative; - height: auto; -} - -.numInputWrapper input, .numInputWrapper span { - display: inline-block; -} - -.numInputWrapper input { - width: 100%; -} - -.numInputWrapper span { - position: absolute; - right: 0; - width: 14px; - padding: 0 4px 0 2px; - height: 50%; - line-height: 50%; - opacity: 0; - cursor: pointer; - border: 1px solid rgba(57, 57, 57, 0.05); - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.numInputWrapper span:hover { - background: rgba(0, 0, 0, 0.1); -} - -.numInputWrapper span:active { - background: rgba(0, 0, 0, 0.2); -} - -.numInputWrapper span:after { - display: block; - content: ""; - position: absolute; - top: 33%; -} - -.numInputWrapper span.arrowUp { - top: 0; - border-bottom: 0; -} - -.numInputWrapper span.arrowUp:after { - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-bottom: 4px solid rgba(57, 57, 57, 0.6); -} - -.numInputWrapper span.arrowDown { - top: 50%; -} - -.numInputWrapper span.arrowDown:after { - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-top: 4px solid rgba(57, 57, 57, 0.6); -} - -.numInputWrapper span svg { - width: inherit; - height: auto; -} - -.numInputWrapper span svg path { - fill: rgba(0, 0, 0, 0.5); -} - -.numInputWrapper:hover { - background: rgba(0, 0, 0, 0.05); -} - -.numInputWrapper:hover span { - opacity: 1; -} - -.flatpickr-current-month { - font-size: 135%; - line-height: inherit; - font-weight: 300; - color: inherit; - position: absolute; - width: 75%; - left: 12.5%; - padding: 6.16px 0 0 0; - line-height: 1; - height: 28px; - display: inline-block; - text-align: center; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); -} - -.flatpickr-current-month.slideLeft { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - -webkit-animation: fpFadeOut 400ms ease, fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeOut 400ms ease, fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-current-month.slideLeftNew { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - -webkit-animation: fpFadeIn 400ms ease, fpSlideLeftNew 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeIn 400ms ease, fpSlideLeftNew 400ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-current-month.slideRight { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - -webkit-animation: fpFadeOut 400ms ease, fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeOut 400ms ease, fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-current-month.slideRightNew { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - -webkit-animation: fpFadeIn 400ms ease, fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeIn 400ms ease, fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-current-month span.cur-month { - font-family: inherit; - font-weight: 700; - color: inherit; - display: inline-block; - margin-left: 0.5ch; - padding: 0; -} - -.flatpickr-current-month span.cur-month:hover { - background: rgba(0, 0, 0, 0.05); -} - -.flatpickr-current-month .numInputWrapper { - width: 6ch; - width: 7ch\0 ; - display: inline-block; -} - -.flatpickr-current-month .numInputWrapper span.arrowUp:after { - border-bottom-color: rgba(0, 0, 0, 0.9); -} - -.flatpickr-current-month .numInputWrapper span.arrowDown:after { - border-top-color: rgba(0, 0, 0, 0.9); -} - -.flatpickr-current-month input.cur-year { - background: transparent; - -webkit-box-sizing: border-box; - box-sizing: border-box; - color: inherit; - cursor: default; - padding: 0 0 0 0.5ch; - margin: 0; - display: inline-block; - font-size: inherit; - font-family: inherit; - font-weight: 300; - line-height: inherit; - height: initial; - border: 0; - border-radius: 0; - vertical-align: initial; -} - -.flatpickr-current-month input.cur-year:focus { - outline: 0; -} - -.flatpickr-current-month input.cur-year[disabled], .flatpickr-current-month input.cur-year[disabled]:hover { - font-size: 100%; - color: rgba(0, 0, 0, 0.5); - background: transparent; - pointer-events: none; -} - -.flatpickr-weekdays { - background: transparent; - text-align: center; - overflow: hidden; - width: 100%; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -webkit-align-items: center; - -ms-flex-align: center; - align-items: center; - height: 28px; -} - -span.flatpickr-weekday { - cursor: default; - font-size: 90%; - background: transparent; - color: rgba(0, 0, 0, 0.54); - line-height: 1; - margin: 0; - text-align: center; - display: block; - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - font-weight: bolder; -} - -.dayContainer, .flatpickr-weeks { - padding: 1px 0 0 0; -} - -.flatpickr-days { - position: relative; - overflow: hidden; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - width: 307.875px; -} - -.flatpickr-days:focus { - outline: 0; -} - -.dayContainer { - padding: 0; - outline: 0; - text-align: left; - width: 307.875px; - min-width: 307.875px; - max-width: 307.875px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - display: inline-block; - display: -ms-flexbox; - display: -webkit-box; - display: -webkit-flex; - display: flex; - -webkit-flex-wrap: wrap; - flex-wrap: wrap; - -ms-flex-wrap: wrap; - -ms-flex-pack: justify; - -webkit-justify-content: space-around; - justify-content: space-around; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - opacity: 1; -} - -.flatpickr-calendar.animate .dayContainer.slideLeft { - -webkit-animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-calendar.animate .dayContainer.slideLeft, .flatpickr-calendar.animate .dayContainer.slideLeftNew { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); -} - -.flatpickr-calendar.animate .dayContainer.slideLeftNew { - -webkit-animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideLeft 400ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-calendar.animate .dayContainer.slideRight { - -webkit-animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeOut 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRight 400ms cubic-bezier(0.23, 1, 0.32, 1); - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); -} - -.flatpickr-calendar.animate .dayContainer.slideRightNew { - -webkit-animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); - animation: fpFadeIn 400ms cubic-bezier(0.23, 1, 0.32, 1), fpSlideRightNew 400ms cubic-bezier(0.23, 1, 0.32, 1); -} - -.flatpickr-day { - background: none; - border: 1px solid transparent; - border-radius: 150px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - color: #393939; - cursor: pointer; - font-weight: 400; - width: 14.2857143%; - -webkit-flex-basis: 14.2857143%; - -ms-flex-preferred-size: 14.2857143%; - flex-basis: 14.2857143%; - max-width: 39px; - height: 39px; - line-height: 39px; - margin: 0; - display: inline-block; - position: relative; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - text-align: center; -} - -.flatpickr-day.inRange, .flatpickr-day.prevMonthDay.inRange, .flatpickr-day.nextMonthDay.inRange, .flatpickr-day.today.inRange, .flatpickr-day.prevMonthDay.today.inRange, .flatpickr-day.nextMonthDay.today.inRange, .flatpickr-day:hover, .flatpickr-day.prevMonthDay:hover, .flatpickr-day.nextMonthDay:hover, .flatpickr-day:focus, .flatpickr-day.prevMonthDay:focus, .flatpickr-day.nextMonthDay:focus { - cursor: pointer; - outline: 0; - background: #e6e6e6; - border-color: #e6e6e6; -} - -.flatpickr-day.today { - border-color: #959ea9; -} - -.flatpickr-day.today:hover, .flatpickr-day.today:focus { - border-color: #959ea9; - background: #959ea9; - color: #fff; -} - -.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay { - background: #569ff7; - -webkit-box-shadow: none; - box-shadow: none; - color: #fff; - border-color: #569ff7; -} - -.flatpickr-day.selected.startRange, .flatpickr-day.startRange.startRange, .flatpickr-day.endRange.startRange { - border-radius: 50px 0 0 50px; -} - -.flatpickr-day.selected.endRange, .flatpickr-day.startRange.endRange, .flatpickr-day.endRange.endRange { - border-radius: 0 50px 50px 0; -} - -.flatpickr-day.selected.startRange + .endRange, .flatpickr-day.startRange.startRange + .endRange, .flatpickr-day.endRange.startRange + .endRange { - -webkit-box-shadow: -10px 0 0 #569ff7; - box-shadow: -10px 0 0 #569ff7; -} - -.flatpickr-day.selected.startRange.endRange, .flatpickr-day.startRange.startRange.endRange, .flatpickr-day.endRange.startRange.endRange { - border-radius: 50px; -} - -.flatpickr-day.inRange { - border-radius: 0; - -webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6; - box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6; -} - -.flatpickr-day.disabled, .flatpickr-day.disabled:hover { - pointer-events: none; -} - -.flatpickr-day.disabled, .flatpickr-day.disabled:hover, .flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay, .flatpickr-day.notAllowed, .flatpickr-day.notAllowed.prevMonthDay, .flatpickr-day.notAllowed.nextMonthDay { - color: rgba(57, 57, 57, 0.3); - background: transparent; - border-color: transparent; - cursor: default; -} - -.flatpickr-day.week.selected { - border-radius: 0; - -webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7; - box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7; -} - -.rangeMode .flatpickr-day { - margin-top: 1px; -} - -.flatpickr-weekwrapper { - display: inline-block; - float: left; -} - -.flatpickr-weekwrapper .flatpickr-weeks { - padding: 0 12px; - -webkit-box-shadow: 1px 0 0 #e6e6e6; - box-shadow: 1px 0 0 #e6e6e6; -} - -.flatpickr-weekwrapper .flatpickr-weekday { - float: none; - width: 100%; - line-height: 28px; -} - -.flatpickr-weekwrapper span.flatpickr-day { - display: block; - width: 100%; - max-width: none; -} - -.flatpickr-innerContainer { - display: block; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-sizing: border-box; - box-sizing: border-box; - overflow: hidden; -} - -.flatpickr-rContainer { - display: inline-block; - padding: 0; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.flatpickr-time { - text-align: center; - outline: 0; - display: block; - height: 0; - line-height: 40px; - max-height: 40px; - -webkit-box-sizing: border-box; - box-sizing: border-box; - overflow: hidden; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; -} - -.flatpickr-time:after { - content: ""; - display: table; - clear: both; -} - -.flatpickr-time .numInputWrapper { - -webkit-box-flex: 1; - -webkit-flex: 1; - -ms-flex: 1; - flex: 1; - width: 40%; - height: 40px; - float: left; -} - -.flatpickr-time .numInputWrapper span.arrowUp:after { - border-bottom-color: #393939; -} - -.flatpickr-time .numInputWrapper span.arrowDown:after { - border-top-color: #393939; -} - -.flatpickr-time.hasSeconds .numInputWrapper { - width: 26%; -} - -.flatpickr-time.time24hr .numInputWrapper { - width: 49%; -} - -.flatpickr-time input { - background: transparent; - -webkit-box-shadow: none; - box-shadow: none; - border: 0; - border-radius: 0; - text-align: center; - margin: 0; - padding: 0; - height: inherit; - line-height: inherit; - cursor: pointer; - color: #393939; - font-size: 14px; - position: relative; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} - -.flatpickr-time input.flatpickr-hour { - font-weight: bold; -} - -.flatpickr-time input.flatpickr-minute, .flatpickr-time input.flatpickr-second { - font-weight: 400; -} - -.flatpickr-time input:focus { - outline: 0; - border: 0; -} - -.flatpickr-time .flatpickr-time-separator, .flatpickr-time .flatpickr-am-pm { - height: inherit; - display: inline-block; - float: left; - line-height: inherit; - color: #393939; - font-weight: bold; - width: 2%; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-align-self: center; - -ms-flex-item-align: center; - align-self: center; -} - -.flatpickr-time .flatpickr-am-pm { - outline: 0; - width: 18%; - cursor: pointer; - text-align: center; - font-weight: 400; -} - -.flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time .flatpickr-am-pm:focus { - background: #f0f0f0; -} - -.flatpickr-input[readonly] { - cursor: pointer; -} - -@-webkit-keyframes fpFadeInDown { - from { - opacity: 0; - -webkit-transform: translate3d(0, -20px, 0); - transform: translate3d(0, -20px, 0); - } - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@keyframes fpFadeInDown { - from { - opacity: 0; - -webkit-transform: translate3d(0, -20px, 0); - transform: translate3d(0, -20px, 0); - } - to { - opacity: 1; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@-webkit-keyframes fpSlideLeft { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - to { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } -} -@keyframes fpSlideLeft { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - to { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } -} -@-webkit-keyframes fpSlideLeftNew { - from { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@keyframes fpSlideLeftNew { - from { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@-webkit-keyframes fpSlideRight { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - to { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } -} -@keyframes fpSlideRight { - from { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } - to { - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); - } -} -@-webkit-keyframes fpSlideRightNew { - from { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@keyframes fpSlideRightNew { - from { - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); - } - to { - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); - } -} -@-webkit-keyframes fpFadeOut { - from { - opacity: 1; - } - to { - opacity: 0; - } -} -@keyframes fpFadeOut { - from { - opacity: 1; - } - to { - opacity: 0; - } -} -@-webkit-keyframes fpFadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -@keyframes fpFadeIn { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -body#comfy .CodeMirror { - min-height: 160px; - height: auto; - border: 1px solid #ccc; - border-radius: 3px; - padding: 6px; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - transition: border linear 0.2s, box-shadow linear 0.2s; -} -body#comfy .CodeMirror .CodeMirror-scroll { - min-height: 160px; -} -body#comfy .CodeMirror-focused { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - outline: "thin dotted "; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -} - -.redactor-box { - margin-bottom: 0px; -} -.redactor-box textarea, .redactor-box .redactor-editor { - resize: vertical; -} - -#redactor-modal header.ui-draggable-handle { - padding: 20px; -} -#redactor-modal #redactor-modal-body section { - padding: 0 20px 20px 20px; -} -#redactor-modal #redactor-modal-body section #redactor-droparea-placeholder input[type=file] { - display: inline; -} -#redactor-modal #redactor-modal-body section #redactor-image-manager-box img { - margin: 0 5px 5px 0; - opacity: 0.75; -} -#redactor-modal #redactor-modal-body section #redactor-image-manager-box img:hover { - opacity: 1; -} - -body#comfy .comfy-admin-partial { - background-color: #e9ecef; - color: #000; - font-size: 9px; - line-height: 11px; - padding: 5px; - background-image: linear-gradient(-45deg, rgba(0, 0, 0, 0.05) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.05) 75%, transparent 75%, transparent); - background-size: 50px 50px; - overflow: hidden; - width: 100%; -} -body#comfy .alert { - border-radius: 0; - margin: 0 -15px 1rem -15px; - text-align: center; -} -body#comfy .fragment-attachments { - padding: 5px 0; -} -body#comfy .fragment-attachments .fragment-attachment input[type=checkbox] { - display: none; -} -body#comfy .fragment-attachments .fragment-attachment input[type=checkbox] + label { - margin-bottom: 0; - color: #ced4da; -} -body#comfy .fragment-attachments .fragment-attachment input[type=checkbox]:checked + label { - background-color: #dc3545; - color: #fff; -} -body#comfy #cms-left { - position: fixed; - top: 0; - bottom: 0; - left: 0; - z-index: 1001; - padding: 0; -} -body#comfy #cms-left button.navbar-toggler { - color: #fff; -} -body#comfy #cms-left nav.navbar { - padding: 1rem; -} -body#comfy #cms-left nav.navbar ul.nav { - width: 100%; -} -body#comfy #cms-left nav.navbar ul.nav li { - position: relative; - width: 100%; -} -body#comfy #cms-left nav.navbar ul.nav li a { - color: #adb5bd; -} -body#comfy #cms-left nav.navbar ul.nav li a:hover, body#comfy #cms-left nav.navbar ul.nav li a.active { - color: #fff; - background-color: #495057; -} -body#comfy #cms-left nav.navbar ul.nav li a.cms-files-open-modal { - height: 26px; - width: 26px; - line-height: 26px; - position: absolute; - text-align: center; - right: 0; - top: 7px; - border-radius: 0.25rem; -} -body#comfy #cms-left .left-footer { - padding: 5px; - position: absolute; - width: 100%; - text-align: center; - bottom: 0; - font-size: 12px; - color: #fff; -} -body#comfy #cms-left .left-footer a { - color: #adb5bd; -} -@media (max-width: 992px) { - body#comfy #cms-left { - right: 0; - bottom: auto; - } - body#comfy #cms-left nav.navbar { - padding: 0.5rem; - } - body#comfy #cms-left .left-footer { - display: none; - } -} -body#comfy #cms-right { - background-color: #f8f9fa; - position: fixed; - top: 0; - bottom: 0; - right: 0; - z-index: 999; - padding: 0; -} -@media (max-width: 992px) { - body#comfy #cms-right { - position: relative; - padding-bottom: 3.5rem; - } -} -body#comfy #cms-right .box { - padding: 1rem; - margin-bottom: 1rem; - background-color: #fff; - border: 1px solid #e9ecef; -} -body#comfy #cms-right .box.translations a.translation { - color: #000; -} -body#comfy #cms-right .box.translations a.draft { - color: #6c757d; -} -body#comfy #cms-right .box.categories-widget .editable { - display: none; -} -body#comfy #cms-right .box.categories-widget .categories .category, body#comfy #cms-right .box.categories-widget form#new-category, body#comfy #cms-right .box.categories-widget form.edit-category { - margin-bottom: 0.25rem; -} -body#comfy #cms-main { - padding-bottom: 3.5rem; -} -@media (max-width: 992px) { - body#comfy #cms-main { - padding-top: 3rem; - padding-bottom: 0; - } -} -body#comfy #cms-main .page-header { - margin: 1rem 0; - border-bottom: 1px solid #dee2e6; -} -body#comfy #cms-main .form-actions { - padding: 0.5rem; - position: fixed; - bottom: 0; - left: 0; - right: 0; - z-index: 1000; - border-top: 1px solid #e9ecef; -} -body#comfy #cms-main ul.list { - padding: 0; -} -body#comfy #cms-main ul.list:not(.sortable-active) > li > .row:hover, body#comfy #cms-main ul.list li.sortable-ghost > .row, body#comfy #cms-main ul.list li.sortable-chosen > .row { - background-color: #fff; -} -body#comfy #cms-main ul.list:not(.sortable-active) > li > .row > .item > .item-controls .dragger:hover, body#comfy #cms-main ul.list li.sortable-ghost > .row > .item > .item-controls > .dragger, body#comfy #cms-main ul.list li.sortable-chosen > .row > .item > .item-controls > .dragger, body#comfy #cms-main ul.list li .row .item .item-controls .toggle:hover { - color: #343a40; -} -body#comfy #cms-main ul.list li { - list-style: none; -} -body#comfy #cms-main ul.list li ul { - padding-left: 0; -} -body#comfy #cms-main ul.list li .row { - background-color: #f8f9fa; - margin-bottom: 5px; - padding: 5px 0; -} -body#comfy #cms-main ul.list li .row .item { - display: flex; -} -body#comfy #cms-main ul.list li .row .item .item-controls { - padding: 2px 0; -} -body#comfy #cms-main ul.list li .row .item .item-controls .dragger, body#comfy #cms-main ul.list li .row .item .item-controls .toggle { - margin-right: 15px; - display: block; - color: #adb5bd; -} -body#comfy #cms-main ul.list li .row .item .item-controls .dragger { - cursor: move; -} -body#comfy #cms-main ul.list li .row .item .item-controls .toggle .collapse { - display: none; -} -body#comfy #cms-main ul.list li .row .item .item-controls .toggle .expand { - display: inline; -} -body#comfy #cms-main ul.list li .row .item .item-controls .toggle.open .collapse { - display: inline; -} -body#comfy #cms-main ul.list li .row .item .item-controls .toggle.open .expand { - display: none; -} -body#comfy #cms-main ul.list li .row .item .item-content .item-title a { - font-size: 1.2rem; - color: #000; -} -body#comfy #cms-main ul.list li .row .item .item-content .item-title a.draft { - color: #6c757d; -} -body#comfy #cms-main ul.list li .row .item .item-content .item-meta { - font-size: 0.75rem; -} -body#comfy #cms-main ul.list li .row .btn-group { - background-color: #fff; -} -body#comfy.c-comfy-admin-cms-pages #form-fragments ul.nav-tabs, body#comfy.c-comfy-admin-cms-translations #form-fragments ul.nav-tabs { - margin-bottom: 1rem; -} -body#comfy.c-comfy-admin-cms-pages #form-fragments label.renderable-false, body#comfy.c-comfy-admin-cms-translations #form-fragments label.renderable-false { - color: #6c757d; -} -body#comfy .cms-files-modal { - z-index: 99999; -} -body#comfy .cms-files-modal .modal-dialog { - max-width: 900px; -} -body#comfy .cms-files-modal .modal-content { - max-height: calc(100vh - 60px); -} -body#comfy .cms-files-modal .modal-body { - overflow-y: auto; -} -body#comfy[class*=c-comfy-admin-cms-revisions-] .label, body#comfy[class*=c-comfy-admin-blog-revisions-] .label { - padding: 15px 0; - font-weight: bold; -} -body#comfy[class*=c-comfy-admin-cms-revisions-] .revision, body#comfy[class*=c-comfy-admin-blog-revisions-] .revision { - margin-bottom: 5px; -} -body#comfy[class*=c-comfy-admin-cms-revisions-] .revision .content, body#comfy[class*=c-comfy-admin-blog-revisions-] .revision .content { - padding: 15px 0; -} -body#comfy[class*=c-comfy-admin-cms-revisions-] .revision .content ins, body#comfy[class*=c-comfy-admin-cms-revisions-] .revision .content del, body#comfy[class*=c-comfy-admin-blog-revisions-] .revision .content ins, body#comfy[class*=c-comfy-admin-blog-revisions-] .revision .content del { - display: inline; -} -body#comfy[class*=c-comfy-admin-cms-revisions-] .revision .content ins, body#comfy[class*=c-comfy-admin-blog-revisions-] .revision .content ins { - background-color: #c6ffc6; - text-decoration: none; -} -body#comfy[class*=c-comfy-admin-cms-revisions-] .revision .content del, body#comfy[class*=c-comfy-admin-blog-revisions-] .revision .content del { - background-color: #ffc6c6; -} - -#cms-uploader ul.list .file-path { - border: 0; - color: #adb5bd; - background: inherit; - white-space: nowrap; - user-select: all; -} -#cms-uploader ul.list .progress { - width: 100%; - height: 25px; -} -#cms-uploader form .file-image img { - width: 100%; -} -#cms-uploader .cms-uploader-drag-drop-target-active { - position: fixed !important; - z-index: 9999; - top: 0; - left: 0; - width: 100%; - height: 100%; - border: dotted #ccc 1px; - background-color: rgba(255, 255, 255, 0.7); -} diff --git a/app/assets/builds/comfy/admin/cms/application.js b/app/assets/builds/comfy/admin/cms/application.js deleted file mode 100644 index 0eaf683a..00000000 --- a/app/assets/builds/comfy/admin/cms/application.js +++ /dev/null @@ -1,49765 +0,0 @@ -(() => { - var __create = Object.create; - var __defProp = Object.defineProperty; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __getProtoOf = Object.getPrototypeOf; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; - }; - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod - )); - - // node_modules/jquery/dist/jquery.js - var require_jquery = __commonJS({ - "node_modules/jquery/dist/jquery.js"(exports, module) { - (function(global2, factory) { - "use strict"; - if (typeof module === "object" && typeof module.exports === "object") { - module.exports = global2.document ? factory(global2, true) : function(w) { - if (!w.document) { - throw new Error("jQuery requires a window with a document"); - } - return factory(w); - }; - } else { - factory(global2); - } - })(typeof window !== "undefined" ? window : exports, function(window2, noGlobal) { - "use strict"; - var arr = []; - var getProto = Object.getPrototypeOf; - var slice = arr.slice; - var flat = arr.flat ? function(array) { - return arr.flat.call(array); - } : function(array) { - return arr.concat.apply([], array); - }; - var push = arr.push; - var indexOf = arr.indexOf; - var class2type = {}; - var toString = class2type.toString; - var hasOwn = class2type.hasOwnProperty; - var fnToString = hasOwn.toString; - var ObjectFunctionString = fnToString.call(Object); - var support = {}; - var isFunction2 = function isFunction3(obj) { - return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function"; - }; - var isWindow = function isWindow2(obj) { - return obj != null && obj === obj.window; - }; - var document2 = window2.document; - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - function DOMEval(code, node, doc) { - doc = doc || document2; - var i, val, script = doc.createElement("script"); - script.text = code; - if (node) { - for (i in preservedScriptAttributes) { - val = node[i] || node.getAttribute && node.getAttribute(i); - if (val) { - script.setAttribute(i, val); - } - } - } - doc.head.appendChild(script).parentNode.removeChild(script); - } - function toType2(obj) { - if (obj == null) { - return obj + ""; - } - return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj; - } - var version2 = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery12 = function(selector, context) { - return new jQuery12.fn.init(selector, context); - }; - jQuery12.fn = jQuery12.prototype = { - // The current version of jQuery being used - jquery: version2, - constructor: jQuery12, - // The default length of a jQuery object is 0 - length: 0, - toArray: function() { - return slice.call(this); - }, - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function(num) { - if (num == null) { - return slice.call(this); - } - return num < 0 ? this[num + this.length] : this[num]; - }, - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function(elems) { - var ret = jQuery12.merge(this.constructor(), elems); - ret.prevObject = this; - return ret; - }, - // Execute a callback for every element in the matched set. - each: function(callback) { - return jQuery12.each(this, callback); - }, - map: function(callback) { - return this.pushStack(jQuery12.map(this, function(elem, i) { - return callback.call(elem, i, elem); - })); - }, - slice: function() { - return this.pushStack(slice.apply(this, arguments)); - }, - first: function() { - return this.eq(0); - }, - last: function() { - return this.eq(-1); - }, - even: function() { - return this.pushStack(jQuery12.grep(this, function(_elem, i) { - return (i + 1) % 2; - })); - }, - odd: function() { - return this.pushStack(jQuery12.grep(this, function(_elem, i) { - return i % 2; - })); - }, - eq: function(i) { - var len = this.length, j = +i + (i < 0 ? len : 0); - return this.pushStack(j >= 0 && j < len ? [this[j]] : []); - }, - end: function() { - return this.prevObject || this.constructor(); - }, - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push, - sort: arr.sort, - splice: arr.splice - }; - jQuery12.extend = jQuery12.fn.extend = function() { - var options, name2, src, copy, copyIsArray, clone2, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; - if (typeof target === "boolean") { - deep = target; - target = arguments[i] || {}; - i++; - } - if (typeof target !== "object" && !isFunction2(target)) { - target = {}; - } - if (i === length) { - target = this; - i--; - } - for (; i < length; i++) { - if ((options = arguments[i]) != null) { - for (name2 in options) { - copy = options[name2]; - if (name2 === "__proto__" || target === copy) { - continue; - } - if (deep && copy && (jQuery12.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) { - src = target[name2]; - if (copyIsArray && !Array.isArray(src)) { - clone2 = []; - } else if (!copyIsArray && !jQuery12.isPlainObject(src)) { - clone2 = {}; - } else { - clone2 = src; - } - copyIsArray = false; - target[name2] = jQuery12.extend(deep, clone2, copy); - } else if (copy !== void 0) { - target[name2] = copy; - } - } - } - } - return target; - }; - jQuery12.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + (version2 + Math.random()).replace(/\D/g, ""), - // Assume jQuery is ready without the ready module - isReady: true, - error: function(msg) { - throw new Error(msg); - }, - noop: function() { - }, - isPlainObject: function(obj) { - var proto, Ctor; - if (!obj || toString.call(obj) !== "[object Object]") { - return false; - } - proto = getProto(obj); - if (!proto) { - return true; - } - Ctor = hasOwn.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString; - }, - isEmptyObject: function(obj) { - var name2; - for (name2 in obj) { - return false; - } - return true; - }, - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function(code, options, doc) { - DOMEval(code, { nonce: options && options.nonce }, doc); - }, - each: function(obj, callback) { - var length, i = 0; - if (isArrayLike(obj)) { - length = obj.length; - for (; i < length; i++) { - if (callback.call(obj[i], i, obj[i]) === false) { - break; - } - } - } else { - for (i in obj) { - if (callback.call(obj[i], i, obj[i]) === false) { - break; - } - } - } - return obj; - }, - // Retrieve the text value of an array of DOM nodes - text: function(elem) { - var node, ret = "", i = 0, nodeType = elem.nodeType; - if (!nodeType) { - while (node = elem[i++]) { - ret += jQuery12.text(node); - } - } - if (nodeType === 1 || nodeType === 11) { - return elem.textContent; - } - if (nodeType === 9) { - return elem.documentElement.textContent; - } - if (nodeType === 3 || nodeType === 4) { - return elem.nodeValue; - } - return ret; - }, - // results is for internal usage only - makeArray: function(arr2, results) { - var ret = results || []; - if (arr2 != null) { - if (isArrayLike(Object(arr2))) { - jQuery12.merge( - ret, - typeof arr2 === "string" ? [arr2] : arr2 - ); - } else { - push.call(ret, arr2); - } - } - return ret; - }, - inArray: function(elem, arr2, i) { - return arr2 == null ? -1 : indexOf.call(arr2, elem, i); - }, - isXMLDoc: function(elem) { - var namespace = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement; - return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML"); - }, - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function(first, second) { - var len = +second.length, j = 0, i = first.length; - for (; j < len; j++) { - first[i++] = second[j]; - } - first.length = i; - return first; - }, - grep: function(elems, callback, invert) { - var callbackInverse, matches3 = [], i = 0, length = elems.length, callbackExpect = !invert; - for (; i < length; i++) { - callbackInverse = !callback(elems[i], i); - if (callbackInverse !== callbackExpect) { - matches3.push(elems[i]); - } - } - return matches3; - }, - // arg is for internal usage only - map: function(elems, callback, arg) { - var length, value, i = 0, ret = []; - if (isArrayLike(elems)) { - length = elems.length; - for (; i < length; i++) { - value = callback(elems[i], i, arg); - if (value != null) { - ret.push(value); - } - } - } else { - for (i in elems) { - value = callback(elems[i], i, arg); - if (value != null) { - ret.push(value); - } - } - } - return flat(ret); - }, - // A global GUID counter for objects - guid: 1, - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support - }); - if (typeof Symbol === "function") { - jQuery12.fn[Symbol.iterator] = arr[Symbol.iterator]; - } - jQuery12.each( - "Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), - function(_i, name2) { - class2type["[object " + name2 + "]"] = name2.toLowerCase(); - } - ); - function isArrayLike(obj) { - var length = !!obj && "length" in obj && obj.length, type = toType2(obj); - if (isFunction2(obj) || isWindow(obj)) { - return false; - } - return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj; - } - function nodeName(elem, name2) { - return elem.nodeName && elem.nodeName.toLowerCase() === name2.toLowerCase(); - } - var pop = arr.pop; - var sort2 = arr.sort; - var splice = arr.splice; - var whitespace = "[\\x20\\t\\r\\n\\f]"; - var rtrimCSS = new RegExp( - "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", - "g" - ); - jQuery12.contains = function(a, b) { - var bup = b && b.parentNode; - return a === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+ - // IE doesn't have `contains` on SVG. - (a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16)); - }; - var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; - function fcssescape(ch, asCodePoint) { - if (asCodePoint) { - if (ch === "\0") { - return "\uFFFD"; - } - return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " "; - } - return "\\" + ch; - } - jQuery12.escapeSelector = function(sel) { - return (sel + "").replace(rcssescape, fcssescape); - }; - var preferredDoc = document2, pushNative = push; - (function() { - var i, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches3, expando2 = jQuery12.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) { - if (a === b) { - hasDuplicate = true; - } - return 0; - }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - `*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(` + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = { - ID: new RegExp("^#(" + identifier + ")"), - CLASS: new RegExp("^\\.(" + identifier + ")"), - TAG: new RegExp("^(" + identifier + "|[*])"), - ATTR: new RegExp("^" + attributes), - PSEUDO: new RegExp("^" + pseudos), - CHILD: new RegExp( - "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", - "i" - ), - bool: new RegExp("^(?:" + booleans + ")$", "i"), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i") - }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape2, nonHex) { - var high = "0x" + escape2.slice(1) - 65536; - if (nonHex) { - return nonHex; - } - return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320); - }, unloadHandler = function() { - setDocument(); - }, inDisabledFieldset = addCombinator( - function(elem) { - return elem.disabled === true && nodeName(elem, "fieldset"); - }, - { dir: "parentNode", next: "legend" } - ); - function safeActiveElement() { - try { - return document3.activeElement; - } catch (err) { - } - } - try { - push2.apply( - arr = slice.call(preferredDoc.childNodes), - preferredDoc.childNodes - ); - arr[preferredDoc.childNodes.length].nodeType; - } catch (e) { - push2 = { - apply: function(target, els) { - pushNative.apply(target, slice.call(els)); - }, - call: function(target) { - pushNative.apply(target, slice.call(arguments, 1)); - } - }; - } - function find3(selector, context, results, seed) { - var m2, i2, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9; - results = results || []; - if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) { - return results; - } - if (!seed) { - setDocument(context); - context = context || document3; - if (documentIsHTML) { - if (nodeType !== 11 && (match = rquickExpr2.exec(selector))) { - if (m2 = match[1]) { - if (nodeType === 9) { - if (elem = context.getElementById(m2)) { - if (elem.id === m2) { - push2.call(results, elem); - return results; - } - } else { - return results; - } - } else { - if (newContext && (elem = newContext.getElementById(m2)) && find3.contains(context, elem) && elem.id === m2) { - push2.call(results, elem); - return results; - } - } - } else if (match[2]) { - push2.apply(results, context.getElementsByTagName(selector)); - return results; - } else if ((m2 = match[3]) && context.getElementsByClassName) { - push2.apply(results, context.getElementsByClassName(m2)); - return results; - } - } - if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) { - newSelector = selector; - newContext = context; - if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) { - newContext = rsibling.test(selector) && testContext(context.parentNode) || context; - if (newContext != context || !support.scope) { - if (nid = context.getAttribute("id")) { - nid = jQuery12.escapeSelector(nid); - } else { - context.setAttribute("id", nid = expando2); - } - } - groups = tokenize(selector); - i2 = groups.length; - while (i2--) { - groups[i2] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i2]); - } - newSelector = groups.join(","); - } - try { - push2.apply( - results, - newContext.querySelectorAll(newSelector) - ); - return results; - } catch (qsaError) { - nonnativeSelectorCache(selector, true); - } finally { - if (nid === expando2) { - context.removeAttribute("id"); - } - } - } - } - } - return select(selector.replace(rtrimCSS, "$1"), context, results, seed); - } - function createCache() { - var keys = []; - function cache(key, value) { - if (keys.push(key + " ") > Expr.cacheLength) { - delete cache[keys.shift()]; - } - return cache[key + " "] = value; - } - return cache; - } - function markFunction(fn) { - fn[expando2] = true; - return fn; - } - function assert(fn) { - var el = document3.createElement("fieldset"); - try { - return !!fn(el); - } catch (e) { - return false; - } finally { - if (el.parentNode) { - el.parentNode.removeChild(el); - } - el = null; - } - } - function createInputPseudo(type) { - return function(elem) { - return nodeName(elem, "input") && elem.type === type; - }; - } - function createButtonPseudo(type) { - return function(elem) { - return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type; - }; - } - function createDisabledPseudo(disabled) { - return function(elem) { - if ("form" in elem) { - if (elem.parentNode && elem.disabled === false) { - if ("label" in elem) { - if ("label" in elem.parentNode) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - return elem.isDisabled === disabled || // Where there is no isDisabled, check manually - elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled; - } - return elem.disabled === disabled; - } else if ("label" in elem) { - return elem.disabled === disabled; - } - return false; - }; - } - function createPositionalPseudo(fn) { - return markFunction(function(argument) { - argument = +argument; - return markFunction(function(seed, matches4) { - var j, matchIndexes = fn([], seed.length, argument), i2 = matchIndexes.length; - while (i2--) { - if (seed[j = matchIndexes[i2]]) { - seed[j] = !(matches4[j] = seed[j]); - } - } - }); - }); - } - function testContext(context) { - return context && typeof context.getElementsByTagName !== "undefined" && context; - } - function setDocument(node) { - var subWindow, doc = node ? node.ownerDocument || node : preferredDoc; - if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) { - return document3; - } - document3 = doc; - documentElement2 = document3.documentElement; - documentIsHTML = !jQuery12.isXMLDoc(document3); - matches3 = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector; - if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) { - subWindow.addEventListener("unload", unloadHandler); - } - support.getById = assert(function(el) { - documentElement2.appendChild(el).id = jQuery12.expando; - return !document3.getElementsByName || !document3.getElementsByName(jQuery12.expando).length; - }); - support.disconnectedMatch = assert(function(el) { - return matches3.call(el, "*"); - }); - support.scope = assert(function() { - return document3.querySelectorAll(":scope"); - }); - support.cssHas = assert(function() { - try { - document3.querySelector(":has(*,:jqfake)"); - return false; - } catch (e) { - return true; - } - }); - if (support.getById) { - Expr.filter.ID = function(id) { - var attrId = id.replace(runescape, funescape); - return function(elem) { - return elem.getAttribute("id") === attrId; - }; - }; - Expr.find.ID = function(id, context) { - if (typeof context.getElementById !== "undefined" && documentIsHTML) { - var elem = context.getElementById(id); - return elem ? [elem] : []; - } - }; - } else { - Expr.filter.ID = function(id) { - var attrId = id.replace(runescape, funescape); - return function(elem) { - var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - return node2 && node2.value === attrId; - }; - }; - Expr.find.ID = function(id, context) { - if (typeof context.getElementById !== "undefined" && documentIsHTML) { - var node2, i2, elems, elem = context.getElementById(id); - if (elem) { - node2 = elem.getAttributeNode("id"); - if (node2 && node2.value === id) { - return [elem]; - } - elems = context.getElementsByName(id); - i2 = 0; - while (elem = elems[i2++]) { - node2 = elem.getAttributeNode("id"); - if (node2 && node2.value === id) { - return [elem]; - } - } - } - return []; - } - }; - } - Expr.find.TAG = function(tag, context) { - if (typeof context.getElementsByTagName !== "undefined") { - return context.getElementsByTagName(tag); - } else { - return context.querySelectorAll(tag); - } - }; - Expr.find.CLASS = function(className, context) { - if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) { - return context.getElementsByClassName(className); - } - }; - rbuggyQSA = []; - assert(function(el) { - var input; - documentElement2.appendChild(el).innerHTML = ""; - if (!el.querySelectorAll("[selected]").length) { - rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")"); - } - if (!el.querySelectorAll("[id~=" + expando2 + "-]").length) { - rbuggyQSA.push("~="); - } - if (!el.querySelectorAll("a#" + expando2 + "+*").length) { - rbuggyQSA.push(".#.+[+~]"); - } - if (!el.querySelectorAll(":checked").length) { - rbuggyQSA.push(":checked"); - } - input = document3.createElement("input"); - input.setAttribute("type", "hidden"); - el.appendChild(input).setAttribute("name", "D"); - documentElement2.appendChild(el).disabled = true; - if (el.querySelectorAll(":disabled").length !== 2) { - rbuggyQSA.push(":enabled", ":disabled"); - } - input = document3.createElement("input"); - input.setAttribute("name", ""); - el.appendChild(input); - if (!el.querySelectorAll("[name='']").length) { - rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + `*(?:''|"")`); - } - }); - if (!support.cssHas) { - rbuggyQSA.push(":has"); - } - rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|")); - sortOrder = function(a, b) { - if (a === b) { - hasDuplicate = true; - return 0; - } - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if (compare) { - return compare; - } - compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : ( - // Otherwise we know they are disconnected - 1 - ); - if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) { - if (a === document3 || a.ownerDocument == preferredDoc && find3.contains(preferredDoc, a)) { - return -1; - } - if (b === document3 || b.ownerDocument == preferredDoc && find3.contains(preferredDoc, b)) { - return 1; - } - return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0; - } - return compare & 4 ? -1 : 1; - }; - return document3; - } - find3.matches = function(expr, elements) { - return find3(expr, null, null, elements); - }; - find3.matchesSelector = function(elem, expr) { - setDocument(elem); - if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) { - try { - var ret = matches3.call(elem, expr); - if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11) { - return ret; - } - } catch (e) { - nonnativeSelectorCache(expr, true); - } - } - return find3(expr, document3, null, [elem]).length > 0; - }; - find3.contains = function(context, elem) { - if ((context.ownerDocument || context) != document3) { - setDocument(context); - } - return jQuery12.contains(context, elem); - }; - find3.attr = function(elem, name2) { - if ((elem.ownerDocument || elem) != document3) { - setDocument(elem); - } - var fn = Expr.attrHandle[name2.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name2.toLowerCase()) ? fn(elem, name2, !documentIsHTML) : void 0; - if (val !== void 0) { - return val; - } - return elem.getAttribute(name2); - }; - find3.error = function(msg) { - throw new Error("Syntax error, unrecognized expression: " + msg); - }; - jQuery12.uniqueSort = function(results) { - var elem, duplicates = [], j = 0, i2 = 0; - hasDuplicate = !support.sortStable; - sortInput = !support.sortStable && slice.call(results, 0); - sort2.call(results, sortOrder); - if (hasDuplicate) { - while (elem = results[i2++]) { - if (elem === results[i2]) { - j = duplicates.push(i2); - } - } - while (j--) { - splice.call(results, duplicates[j], 1); - } - } - sortInput = null; - return results; - }; - jQuery12.fn.uniqueSort = function() { - return this.pushStack(jQuery12.uniqueSort(slice.apply(this))); - }; - Expr = jQuery12.expr = { - // Can be adjusted by the user - cacheLength: 50, - createPseudo: markFunction, - match: matchExpr, - attrHandle: {}, - find: {}, - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - preFilter: { - ATTR: function(match) { - match[1] = match[1].replace(runescape, funescape); - match[3] = (match[3] || match[4] || match[5] || "").replace(runescape, funescape); - if (match[2] === "~=") { - match[3] = " " + match[3] + " "; - } - return match.slice(0, 4); - }, - CHILD: function(match) { - match[1] = match[1].toLowerCase(); - if (match[1].slice(0, 3) === "nth") { - if (!match[3]) { - find3.error(match[0]); - } - match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === "even" || match[3] === "odd")); - match[5] = +(match[7] + match[8] || match[3] === "odd"); - } else if (match[3]) { - find3.error(match[0]); - } - return match; - }, - PSEUDO: function(match) { - var excess, unquoted = !match[6] && match[2]; - if (matchExpr.CHILD.test(match[0])) { - return null; - } - if (match[3]) { - match[2] = match[4] || match[5] || ""; - } else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively) - (excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis - (excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) { - match[0] = match[0].slice(0, excess); - match[2] = unquoted.slice(0, excess); - } - return match.slice(0, 3); - } - }, - filter: { - TAG: function(nodeNameSelector) { - var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase(); - return nodeNameSelector === "*" ? function() { - return true; - } : function(elem) { - return nodeName(elem, expectedNodeName); - }; - }, - CLASS: function(className) { - var pattern = classCache[className + " "]; - return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) { - return pattern.test( - typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" - ); - }); - }, - ATTR: function(name2, operator, check) { - return function(elem) { - var result = find3.attr(elem, name2); - if (result == null) { - return operator === "!="; - } - if (!operator) { - return true; - } - result += ""; - if (operator === "=") { - return result === check; - } - if (operator === "!=") { - return result !== check; - } - if (operator === "^=") { - return check && result.indexOf(check) === 0; - } - if (operator === "*=") { - return check && result.indexOf(check) > -1; - } - if (operator === "$=") { - return check && result.slice(-check.length) === check; - } - if (operator === "~=") { - return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1; - } - if (operator === "|=") { - return result === check || result.slice(0, check.length + 1) === check + "-"; - } - return false; - }; - }, - CHILD: function(type, what, _argument, first, last) { - var simple = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type"; - return first === 1 && last === 0 ? ( - // Shortcut for :nth-*(n) - function(elem) { - return !!elem.parentNode; - } - ) : function(elem, _context, xml) { - var cache, outerCache, node, nodeIndex, start2, dir2 = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name2 = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; - if (parent) { - if (simple) { - while (dir2) { - node = elem; - while (node = node[dir2]) { - if (ofType ? nodeName(node, name2) : node.nodeType === 1) { - return false; - } - } - start2 = dir2 = type === "only" && !start2 && "nextSibling"; - } - return true; - } - start2 = [forward ? parent.firstChild : parent.lastChild]; - if (forward && useCache) { - outerCache = parent[expando2] || (parent[expando2] = {}); - cache = outerCache[type] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = nodeIndex && cache[2]; - node = nodeIndex && parent.childNodes[nodeIndex]; - while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start2.pop()) { - if (node.nodeType === 1 && ++diff && node === elem) { - outerCache[type] = [dirruns, nodeIndex, diff]; - break; - } - } - } else { - if (useCache) { - outerCache = elem[expando2] || (elem[expando2] = {}); - cache = outerCache[type] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = nodeIndex; - } - if (diff === false) { - while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start2.pop()) { - if ((ofType ? nodeName(node, name2) : node.nodeType === 1) && ++diff) { - if (useCache) { - outerCache = node[expando2] || (node[expando2] = {}); - outerCache[type] = [dirruns, diff]; - } - if (node === elem) { - break; - } - } - } - } - } - diff -= last; - return diff === first || diff % first === 0 && diff / first >= 0; - } - }; - }, - PSEUDO: function(pseudo, argument) { - var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find3.error("unsupported pseudo: " + pseudo); - if (fn[expando2]) { - return fn(argument); - } - if (fn.length > 1) { - args = [pseudo, pseudo, "", argument]; - return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches4) { - var idx, matched = fn(seed, argument), i2 = matched.length; - while (i2--) { - idx = indexOf.call(seed, matched[i2]); - seed[idx] = !(matches4[idx] = matched[i2]); - } - }) : function(elem) { - return fn(elem, 0, args); - }; - } - return fn; - } - }, - pseudos: { - // Potentially complex pseudos - not: markFunction(function(selector) { - var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1")); - return matcher[expando2] ? markFunction(function(seed, matches4, _context, xml) { - var elem, unmatched = matcher(seed, null, xml, []), i2 = seed.length; - while (i2--) { - if (elem = unmatched[i2]) { - seed[i2] = !(matches4[i2] = elem); - } - } - }) : function(elem, _context, xml) { - input[0] = elem; - matcher(input, null, xml, results); - input[0] = null; - return !results.pop(); - }; - }), - has: markFunction(function(selector) { - return function(elem) { - return find3(selector, elem).length > 0; - }; - }), - contains: markFunction(function(text) { - text = text.replace(runescape, funescape); - return function(elem) { - return (elem.textContent || jQuery12.text(elem)).indexOf(text) > -1; - }; - }), - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // https://www.w3.org/TR/selectors/#lang-pseudo - lang: markFunction(function(lang) { - if (!ridentifier.test(lang || "")) { - find3.error("unsupported lang: " + lang); - } - lang = lang.replace(runescape, funescape).toLowerCase(); - return function(elem) { - var elemLang; - do { - if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) { - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf(lang + "-") === 0; - } - } while ((elem = elem.parentNode) && elem.nodeType === 1); - return false; - }; - }), - // Miscellaneous - target: function(elem) { - var hash = window2.location && window2.location.hash; - return hash && hash.slice(1) === elem.id; - }, - root: function(elem) { - return elem === documentElement2; - }, - focus: function(elem) { - return elem === safeActiveElement() && document3.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex); - }, - // Boolean properties - enabled: createDisabledPseudo(false), - disabled: createDisabledPseudo(true), - checked: function(elem) { - return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected; - }, - selected: function(elem) { - if (elem.parentNode) { - elem.parentNode.selectedIndex; - } - return elem.selected === true; - }, - // Contents - empty: function(elem) { - for (elem = elem.firstChild; elem; elem = elem.nextSibling) { - if (elem.nodeType < 6) { - return false; - } - } - return true; - }, - parent: function(elem) { - return !Expr.pseudos.empty(elem); - }, - // Element/input types - header: function(elem) { - return rheader.test(elem.nodeName); - }, - input: function(elem) { - return rinputs.test(elem.nodeName); - }, - button: function(elem) { - return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button"); - }, - text: function(elem) { - var attr; - return nodeName(elem, "input") && elem.type === "text" && // Support: IE <10 only - // New HTML5 attribute values (e.g., "search") appear - // with elem.type === "text" - ((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text"); - }, - // Position-in-collection - first: createPositionalPseudo(function() { - return [0]; - }), - last: createPositionalPseudo(function(_matchIndexes, length) { - return [length - 1]; - }), - eq: createPositionalPseudo(function(_matchIndexes, length, argument) { - return [argument < 0 ? argument + length : argument]; - }), - even: createPositionalPseudo(function(matchIndexes, length) { - var i2 = 0; - for (; i2 < length; i2 += 2) { - matchIndexes.push(i2); - } - return matchIndexes; - }), - odd: createPositionalPseudo(function(matchIndexes, length) { - var i2 = 1; - for (; i2 < length; i2 += 2) { - matchIndexes.push(i2); - } - return matchIndexes; - }), - lt: createPositionalPseudo(function(matchIndexes, length, argument) { - var i2; - if (argument < 0) { - i2 = argument + length; - } else if (argument > length) { - i2 = length; - } else { - i2 = argument; - } - for (; --i2 >= 0; ) { - matchIndexes.push(i2); - } - return matchIndexes; - }), - gt: createPositionalPseudo(function(matchIndexes, length, argument) { - var i2 = argument < 0 ? argument + length : argument; - for (; ++i2 < length; ) { - matchIndexes.push(i2); - } - return matchIndexes; - }) - } - }; - Expr.pseudos.nth = Expr.pseudos.eq; - for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) { - Expr.pseudos[i] = createInputPseudo(i); - } - for (i in { submit: true, reset: true }) { - Expr.pseudos[i] = createButtonPseudo(i); - } - function setFilters() { - } - setFilters.prototype = Expr.filters = Expr.pseudos; - Expr.setFilters = new setFilters(); - function tokenize(selector, parseOnly) { - var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "]; - if (cached) { - return parseOnly ? 0 : cached.slice(0); - } - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - while (soFar) { - if (!matched || (match = rcomma.exec(soFar))) { - if (match) { - soFar = soFar.slice(match[0].length) || soFar; - } - groups.push(tokens = []); - } - matched = false; - if (match = rleadingCombinator.exec(soFar)) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace(rtrimCSS, " ") - }); - soFar = soFar.slice(matched.length); - } - for (type in Expr.filter) { - if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) { - matched = match.shift(); - tokens.push({ - value: matched, - type, - matches: match - }); - soFar = soFar.slice(matched.length); - } - } - if (!matched) { - break; - } - } - if (parseOnly) { - return soFar.length; - } - return soFar ? find3.error(selector) : ( - // Cache the tokens - tokenCache(selector, groups).slice(0) - ); - } - function toSelector(tokens) { - var i2 = 0, len = tokens.length, selector = ""; - for (; i2 < len; i2++) { - selector += tokens[i2].value; - } - return selector; - } - function addCombinator(matcher, combinator, base) { - var dir2 = combinator.dir, skip = combinator.next, key = skip || dir2, checkNonElements = base && key === "parentNode", doneName = done++; - return combinator.first ? ( - // Check against closest ancestor/preceding element - function(elem, context, xml) { - while (elem = elem[dir2]) { - if (elem.nodeType === 1 || checkNonElements) { - return matcher(elem, context, xml); - } - } - return false; - } - ) : ( - // Check against all ancestor/preceding elements - function(elem, context, xml) { - var oldCache, outerCache, newCache = [dirruns, doneName]; - if (xml) { - while (elem = elem[dir2]) { - if (elem.nodeType === 1 || checkNonElements) { - if (matcher(elem, context, xml)) { - return true; - } - } - } - } else { - while (elem = elem[dir2]) { - if (elem.nodeType === 1 || checkNonElements) { - outerCache = elem[expando2] || (elem[expando2] = {}); - if (skip && nodeName(elem, skip)) { - elem = elem[dir2] || elem; - } else if ((oldCache = outerCache[key]) && oldCache[0] === dirruns && oldCache[1] === doneName) { - return newCache[2] = oldCache[2]; - } else { - outerCache[key] = newCache; - if (newCache[2] = matcher(elem, context, xml)) { - return true; - } - } - } - } - } - return false; - } - ); - } - function elementMatcher(matchers) { - return matchers.length > 1 ? function(elem, context, xml) { - var i2 = matchers.length; - while (i2--) { - if (!matchers[i2](elem, context, xml)) { - return false; - } - } - return true; - } : matchers[0]; - } - function multipleContexts(selector, contexts, results) { - var i2 = 0, len = contexts.length; - for (; i2 < len; i2++) { - find3(selector, contexts[i2], results); - } - return results; - } - function condense(unmatched, map, filter, context, xml) { - var elem, newUnmatched = [], i2 = 0, len = unmatched.length, mapped = map != null; - for (; i2 < len; i2++) { - if (elem = unmatched[i2]) { - if (!filter || filter(elem, context, xml)) { - newUnmatched.push(elem); - if (mapped) { - map.push(i2); - } - } - } - } - return newUnmatched; - } - function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) { - if (postFilter && !postFilter[expando2]) { - postFilter = setMatcher(postFilter); - } - if (postFinder && !postFinder[expando2]) { - postFinder = setMatcher(postFinder, postSelector); - } - return markFunction(function(seed, results, context, xml) { - var temp, i2, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [context] : context, - [] - ), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems; - if (matcher) { - matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? ( - // ...intermediate processing is necessary - [] - ) : ( - // ...otherwise use results directly - results - ); - matcher(matcherIn, matcherOut, context, xml); - } else { - matcherOut = matcherIn; - } - if (postFilter) { - temp = condense(matcherOut, postMap); - postFilter(temp, [], context, xml); - i2 = temp.length; - while (i2--) { - if (elem = temp[i2]) { - matcherOut[postMap[i2]] = !(matcherIn[postMap[i2]] = elem); - } - } - } - if (seed) { - if (postFinder || preFilter) { - if (postFinder) { - temp = []; - i2 = matcherOut.length; - while (i2--) { - if (elem = matcherOut[i2]) { - temp.push(matcherIn[i2] = elem); - } - } - postFinder(null, matcherOut = [], temp, xml); - } - i2 = matcherOut.length; - while (i2--) { - if ((elem = matcherOut[i2]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i2]) > -1) { - seed[temp] = !(results[temp] = elem); - } - } - } - } else { - matcherOut = condense( - matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut - ); - if (postFinder) { - postFinder(null, results, matcherOut, xml); - } else { - push2.apply(results, matcherOut); - } - } - }); - } - function matcherFromTokens(tokens) { - var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i2 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) { - return elem === checkContext; - }, implicitRelative, true), matchAnyContext = addCombinator(function(elem) { - return indexOf.call(checkContext, elem) > -1; - }, implicitRelative, true), matchers = [function(elem, context, xml) { - var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml)); - checkContext = null; - return ret; - }]; - for (; i2 < len; i2++) { - if (matcher = Expr.relative[tokens[i2].type]) { - matchers = [addCombinator(elementMatcher(matchers), matcher)]; - } else { - matcher = Expr.filter[tokens[i2].type].apply(null, tokens[i2].matches); - if (matcher[expando2]) { - j = ++i2; - for (; j < len; j++) { - if (Expr.relative[tokens[j].type]) { - break; - } - } - return setMatcher( - i2 > 1 && elementMatcher(matchers), - i2 > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice(0, i2 - 1).concat({ value: tokens[i2 - 2].type === " " ? "*" : "" }) - ).replace(rtrimCSS, "$1"), - matcher, - i2 < j && matcherFromTokens(tokens.slice(i2, j)), - j < len && matcherFromTokens(tokens = tokens.slice(j)), - j < len && toSelector(tokens) - ); - } - matchers.push(matcher); - } - } - return elementMatcher(matchers); - } - function matcherFromGroupMatchers(elementMatchers, setMatchers) { - var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) { - var elem, j, matcher, matchedCount = 0, i2 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length; - if (outermost) { - outermostContext = context == document3 || context || outermost; - } - for (; i2 !== len && (elem = elems[i2]) != null; i2++) { - if (byElement && elem) { - j = 0; - if (!context && elem.ownerDocument != document3) { - setDocument(elem); - xml = !documentIsHTML; - } - while (matcher = elementMatchers[j++]) { - if (matcher(elem, context || document3, xml)) { - push2.call(results, elem); - break; - } - } - if (outermost) { - dirruns = dirrunsUnique; - } - } - if (bySet) { - if (elem = !matcher && elem) { - matchedCount--; - } - if (seed) { - unmatched.push(elem); - } - } - } - matchedCount += i2; - if (bySet && i2 !== matchedCount) { - j = 0; - while (matcher = setMatchers[j++]) { - matcher(unmatched, setMatched, context, xml); - } - if (seed) { - if (matchedCount > 0) { - while (i2--) { - if (!(unmatched[i2] || setMatched[i2])) { - setMatched[i2] = pop.call(results); - } - } - } - setMatched = condense(setMatched); - } - push2.apply(results, setMatched); - if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) { - jQuery12.uniqueSort(results); - } - } - if (outermost) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - return unmatched; - }; - return bySet ? markFunction(superMatcher) : superMatcher; - } - function compile(selector, match) { - var i2, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "]; - if (!cached) { - if (!match) { - match = tokenize(selector); - } - i2 = match.length; - while (i2--) { - cached = matcherFromTokens(match[i2]); - if (cached[expando2]) { - setMatchers.push(cached); - } else { - elementMatchers.push(cached); - } - } - cached = compilerCache( - selector, - matcherFromGroupMatchers(elementMatchers, setMatchers) - ); - cached.selector = selector; - } - return cached; - } - function select(selector, context, results, seed) { - var i2, tokens, token, type, find4, compiled = typeof selector === "function" && selector, match = !seed && tokenize(selector = compiled.selector || selector); - results = results || []; - if (match.length === 1) { - tokens = match[0] = match[0].slice(0); - if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) { - context = (Expr.find.ID( - token.matches[0].replace(runescape, funescape), - context - ) || [])[0]; - if (!context) { - return results; - } else if (compiled) { - context = context.parentNode; - } - selector = selector.slice(tokens.shift().value.length); - } - i2 = matchExpr.needsContext.test(selector) ? 0 : tokens.length; - while (i2--) { - token = tokens[i2]; - if (Expr.relative[type = token.type]) { - break; - } - if (find4 = Expr.find[type]) { - if (seed = find4( - token.matches[0].replace(runescape, funescape), - rsibling.test(tokens[0].type) && testContext(context.parentNode) || context - )) { - tokens.splice(i2, 1); - selector = seed.length && toSelector(tokens); - if (!selector) { - push2.apply(results, seed); - return results; - } - break; - } - } - } - } - (compiled || compile(selector, match))( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test(selector) && testContext(context.parentNode) || context - ); - return results; - } - support.sortStable = expando2.split("").sort(sortOrder).join("") === expando2; - setDocument(); - support.sortDetached = assert(function(el) { - return el.compareDocumentPosition(document3.createElement("fieldset")) & 1; - }); - jQuery12.find = find3; - jQuery12.expr[":"] = jQuery12.expr.pseudos; - jQuery12.unique = jQuery12.uniqueSort; - find3.compile = compile; - find3.select = select; - find3.setDocument = setDocument; - find3.tokenize = tokenize; - find3.escape = jQuery12.escapeSelector; - find3.getText = jQuery12.text; - find3.isXML = jQuery12.isXMLDoc; - find3.selectors = jQuery12.expr; - find3.support = jQuery12.support; - find3.uniqueSort = jQuery12.uniqueSort; - })(); - var dir = function(elem, dir2, until) { - var matched = [], truncate = until !== void 0; - while ((elem = elem[dir2]) && elem.nodeType !== 9) { - if (elem.nodeType === 1) { - if (truncate && jQuery12(elem).is(until)) { - break; - } - matched.push(elem); - } - } - return matched; - }; - var siblings = function(n, elem) { - var matched = []; - for (; n; n = n.nextSibling) { - if (n.nodeType === 1 && n !== elem) { - matched.push(n); - } - } - return matched; - }; - var rneedsContext = jQuery12.expr.match.needsContext; - var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; - function winnow(elements, qualifier, not) { - if (isFunction2(qualifier)) { - return jQuery12.grep(elements, function(elem, i) { - return !!qualifier.call(elem, i, elem) !== not; - }); - } - if (qualifier.nodeType) { - return jQuery12.grep(elements, function(elem) { - return elem === qualifier !== not; - }); - } - if (typeof qualifier !== "string") { - return jQuery12.grep(elements, function(elem) { - return indexOf.call(qualifier, elem) > -1 !== not; - }); - } - return jQuery12.filter(qualifier, elements, not); - } - jQuery12.filter = function(expr, elems, not) { - var elem = elems[0]; - if (not) { - expr = ":not(" + expr + ")"; - } - if (elems.length === 1 && elem.nodeType === 1) { - return jQuery12.find.matchesSelector(elem, expr) ? [elem] : []; - } - return jQuery12.find.matches(expr, jQuery12.grep(elems, function(elem2) { - return elem2.nodeType === 1; - })); - }; - jQuery12.fn.extend({ - find: function(selector) { - var i, ret, len = this.length, self2 = this; - if (typeof selector !== "string") { - return this.pushStack(jQuery12(selector).filter(function() { - for (i = 0; i < len; i++) { - if (jQuery12.contains(self2[i], this)) { - return true; - } - } - })); - } - ret = this.pushStack([]); - for (i = 0; i < len; i++) { - jQuery12.find(selector, self2[i], ret); - } - return len > 1 ? jQuery12.uniqueSort(ret) : ret; - }, - filter: function(selector) { - return this.pushStack(winnow(this, selector || [], false)); - }, - not: function(selector) { - return this.pushStack(winnow(this, selector || [], true)); - }, - is: function(selector) { - return !!winnow( - this, - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test(selector) ? jQuery12(selector) : selector || [], - false - ).length; - } - }); - var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery12.fn.init = function(selector, context, root) { - var match, elem; - if (!selector) { - return this; - } - root = root || rootjQuery; - if (typeof selector === "string") { - if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) { - match = [null, selector, null]; - } else { - match = rquickExpr.exec(selector); - } - if (match && (match[1] || !context)) { - if (match[1]) { - context = context instanceof jQuery12 ? context[0] : context; - jQuery12.merge(this, jQuery12.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document2, - true - )); - if (rsingleTag.test(match[1]) && jQuery12.isPlainObject(context)) { - for (match in context) { - if (isFunction2(this[match])) { - this[match](context[match]); - } else { - this.attr(match, context[match]); - } - } - } - return this; - } else { - elem = document2.getElementById(match[2]); - if (elem) { - this[0] = elem; - this.length = 1; - } - return this; - } - } else if (!context || context.jquery) { - return (context || root).find(selector); - } else { - return this.constructor(context).find(selector); - } - } else if (selector.nodeType) { - this[0] = selector; - this.length = 1; - return this; - } else if (isFunction2(selector)) { - return root.ready !== void 0 ? root.ready(selector) : ( - // Execute immediately if ready is not present - selector(jQuery12) - ); - } - return jQuery12.makeArray(selector, this); - }; - init.prototype = jQuery12.fn; - rootjQuery = jQuery12(document2); - var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - jQuery12.fn.extend({ - has: function(target) { - var targets = jQuery12(target, this), l = targets.length; - return this.filter(function() { - var i = 0; - for (; i < l; i++) { - if (jQuery12.contains(this, targets[i])) { - return true; - } - } - }); - }, - closest: function(selectors, context) { - var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery12(selectors); - if (!rneedsContext.test(selectors)) { - for (; i < l; i++) { - for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { - if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : ( - // Don't pass non-elements to jQuery#find - cur.nodeType === 1 && jQuery12.find.matchesSelector(cur, selectors) - ))) { - matched.push(cur); - break; - } - } - } - } - return this.pushStack(matched.length > 1 ? jQuery12.uniqueSort(matched) : matched); - }, - // Determine the position of an element within the set - index: function(elem) { - if (!elem) { - return this[0] && this[0].parentNode ? this.first().prevAll().length : -1; - } - if (typeof elem === "string") { - return indexOf.call(jQuery12(elem), this[0]); - } - return indexOf.call( - this, - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem - ); - }, - add: function(selector, context) { - return this.pushStack( - jQuery12.uniqueSort( - jQuery12.merge(this.get(), jQuery12(selector, context)) - ) - ); - }, - addBack: function(selector) { - return this.add( - selector == null ? this.prevObject : this.prevObject.filter(selector) - ); - } - }); - function sibling(cur, dir2) { - while ((cur = cur[dir2]) && cur.nodeType !== 1) { - } - return cur; - } - jQuery12.each({ - parent: function(elem) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function(elem) { - return dir(elem, "parentNode"); - }, - parentsUntil: function(elem, _i, until) { - return dir(elem, "parentNode", until); - }, - next: function(elem) { - return sibling(elem, "nextSibling"); - }, - prev: function(elem) { - return sibling(elem, "previousSibling"); - }, - nextAll: function(elem) { - return dir(elem, "nextSibling"); - }, - prevAll: function(elem) { - return dir(elem, "previousSibling"); - }, - nextUntil: function(elem, _i, until) { - return dir(elem, "nextSibling", until); - }, - prevUntil: function(elem, _i, until) { - return dir(elem, "previousSibling", until); - }, - siblings: function(elem) { - return siblings((elem.parentNode || {}).firstChild, elem); - }, - children: function(elem) { - return siblings(elem.firstChild); - }, - contents: function(elem) { - if (elem.contentDocument != null && // Support: IE 11+ - // elements with no `data` attribute has an object - // `contentDocument` with a `null` prototype. - getProto(elem.contentDocument)) { - return elem.contentDocument; - } - if (nodeName(elem, "template")) { - elem = elem.content || elem; - } - return jQuery12.merge([], elem.childNodes); - } - }, function(name2, fn) { - jQuery12.fn[name2] = function(until, selector) { - var matched = jQuery12.map(this, fn, until); - if (name2.slice(-5) !== "Until") { - selector = until; - } - if (selector && typeof selector === "string") { - matched = jQuery12.filter(selector, matched); - } - if (this.length > 1) { - if (!guaranteedUnique[name2]) { - jQuery12.uniqueSort(matched); - } - if (rparentsprev.test(name2)) { - matched.reverse(); - } - } - return this.pushStack(matched); - }; - }); - var rnothtmlwhite = /[^\x20\t\r\n\f]+/g; - function createOptions(options) { - var object = {}; - jQuery12.each(options.match(rnothtmlwhite) || [], function(_, flag) { - object[flag] = true; - }); - return object; - } - jQuery12.Callbacks = function(options) { - options = typeof options === "string" ? createOptions(options) : jQuery12.extend({}, options); - var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire2 = function() { - locked = locked || options.once; - fired = firing = true; - for (; queue.length; firingIndex = -1) { - memory = queue.shift(); - while (++firingIndex < list.length) { - if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) { - firingIndex = list.length; - memory = false; - } - } - } - if (!options.memory) { - memory = false; - } - firing = false; - if (locked) { - if (memory) { - list = []; - } else { - list = ""; - } - } - }, self2 = { - // Add a callback or a collection of callbacks to the list - add: function() { - if (list) { - if (memory && !firing) { - firingIndex = list.length - 1; - queue.push(memory); - } - (function add(args) { - jQuery12.each(args, function(_, arg) { - if (isFunction2(arg)) { - if (!options.unique || !self2.has(arg)) { - list.push(arg); - } - } else if (arg && arg.length && toType2(arg) !== "string") { - add(arg); - } - }); - })(arguments); - if (memory && !firing) { - fire2(); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - jQuery12.each(arguments, function(_, arg) { - var index2; - while ((index2 = jQuery12.inArray(arg, list, index2)) > -1) { - list.splice(index2, 1); - if (index2 <= firingIndex) { - firingIndex--; - } - } - }); - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function(fn) { - return fn ? jQuery12.inArray(fn, list) > -1 : list.length > 0; - }, - // Remove all callbacks from the list - empty: function() { - if (list) { - list = []; - } - return this; - }, - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if (!memory && !firing) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - // Call all callbacks with the given context and arguments - fireWith: function(context, args) { - if (!locked) { - args = args || []; - args = [context, args.slice ? args.slice() : args]; - queue.push(args); - if (!firing) { - fire2(); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self2.fireWith(this, arguments); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - return self2; - }; - function Identity(v) { - return v; - } - function Thrower(ex) { - throw ex; - } - function adoptValue(value, resolve, reject, noValue) { - var method; - try { - if (value && isFunction2(method = value.promise)) { - method.call(value).done(resolve).fail(reject); - } else if (value && isFunction2(method = value.then)) { - method.call(value, resolve, reject); - } else { - resolve.apply(void 0, [value].slice(noValue)); - } - } catch (value2) { - reject.apply(void 0, [value2]); - } - } - jQuery12.extend({ - Deferred: function(func) { - var tuples = [ - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ - "notify", - "progress", - jQuery12.Callbacks("memory"), - jQuery12.Callbacks("memory"), - 2 - ], - [ - "resolve", - "done", - jQuery12.Callbacks("once memory"), - jQuery12.Callbacks("once memory"), - 0, - "resolved" - ], - [ - "reject", - "fail", - jQuery12.Callbacks("once memory"), - jQuery12.Callbacks("once memory"), - 1, - "rejected" - ] - ], state = "pending", promise = { - state: function() { - return state; - }, - always: function() { - deferred.done(arguments).fail(arguments); - return this; - }, - "catch": function(fn) { - return promise.then(null, fn); - }, - // Keep pipe for back-compat - pipe: function() { - var fns = arguments; - return jQuery12.Deferred(function(newDefer) { - jQuery12.each(tuples, function(_i, tuple) { - var fn = isFunction2(fns[tuple[4]]) && fns[tuple[4]]; - deferred[tuple[1]](function() { - var returned = fn && fn.apply(this, arguments); - if (returned && isFunction2(returned.promise)) { - returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject); - } else { - newDefer[tuple[0] + "With"]( - this, - fn ? [returned] : arguments - ); - } - }); - }); - fns = null; - }).promise(); - }, - then: function(onFulfilled, onRejected, onProgress) { - var maxDepth = 0; - function resolve(depth, deferred2, handler, special) { - return function() { - var that = this, args = arguments, mightThrow = function() { - var returned, then; - if (depth < maxDepth) { - return; - } - returned = handler.apply(that, args); - if (returned === deferred2.promise()) { - throw new TypeError("Thenable self-resolution"); - } - then = returned && // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - (typeof returned === "object" || typeof returned === "function") && returned.then; - if (isFunction2(then)) { - if (special) { - then.call( - returned, - resolve(maxDepth, deferred2, Identity, special), - resolve(maxDepth, deferred2, Thrower, special) - ); - } else { - maxDepth++; - then.call( - returned, - resolve(maxDepth, deferred2, Identity, special), - resolve(maxDepth, deferred2, Thrower, special), - resolve( - maxDepth, - deferred2, - Identity, - deferred2.notifyWith - ) - ); - } - } else { - if (handler !== Identity) { - that = void 0; - args = [returned]; - } - (special || deferred2.resolveWith)(that, args); - } - }, process = special ? mightThrow : function() { - try { - mightThrow(); - } catch (e) { - if (jQuery12.Deferred.exceptionHook) { - jQuery12.Deferred.exceptionHook( - e, - process.error - ); - } - if (depth + 1 >= maxDepth) { - if (handler !== Thrower) { - that = void 0; - args = [e]; - } - deferred2.rejectWith(that, args); - } - } - }; - if (depth) { - process(); - } else { - if (jQuery12.Deferred.getErrorHook) { - process.error = jQuery12.Deferred.getErrorHook(); - } else if (jQuery12.Deferred.getStackHook) { - process.error = jQuery12.Deferred.getStackHook(); - } - window2.setTimeout(process); - } - }; - } - return jQuery12.Deferred(function(newDefer) { - tuples[0][3].add( - resolve( - 0, - newDefer, - isFunction2(onProgress) ? onProgress : Identity, - newDefer.notifyWith - ) - ); - tuples[1][3].add( - resolve( - 0, - newDefer, - isFunction2(onFulfilled) ? onFulfilled : Identity - ) - ); - tuples[2][3].add( - resolve( - 0, - newDefer, - isFunction2(onRejected) ? onRejected : Thrower - ) - ); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function(obj) { - return obj != null ? jQuery12.extend(obj, promise) : promise; - } - }, deferred = {}; - jQuery12.each(tuples, function(i, tuple) { - var list = tuple[2], stateString = tuple[5]; - promise[tuple[1]] = list.add; - if (stateString) { - list.add( - function() { - state = stateString; - }, - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[3 - i][2].disable, - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[3 - i][3].disable, - // progress_callbacks.lock - tuples[0][2].lock, - // progress_handlers.lock - tuples[0][3].lock - ); - } - list.add(tuple[3].fire); - deferred[tuple[0]] = function() { - deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments); - return this; - }; - deferred[tuple[0] + "With"] = list.fireWith; - }); - promise.promise(deferred); - if (func) { - func.call(deferred, deferred); - } - return deferred; - }, - // Deferred helper - when: function(singleValue) { - var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery12.Deferred(), updateFunc = function(i2) { - return function(value) { - resolveContexts[i2] = this; - resolveValues[i2] = arguments.length > 1 ? slice.call(arguments) : value; - if (!--remaining) { - primary.resolveWith(resolveContexts, resolveValues); - } - }; - }; - if (remaining <= 1) { - adoptValue( - singleValue, - primary.done(updateFunc(i)).resolve, - primary.reject, - !remaining - ); - if (primary.state() === "pending" || isFunction2(resolveValues[i] && resolveValues[i].then)) { - return primary.then(); - } - } - while (i--) { - adoptValue(resolveValues[i], updateFunc(i), primary.reject); - } - return primary.promise(); - } - }); - var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - jQuery12.Deferred.exceptionHook = function(error, asyncError) { - if (window2.console && window2.console.warn && error && rerrorNames.test(error.name)) { - window2.console.warn( - "jQuery.Deferred exception: " + error.message, - error.stack, - asyncError - ); - } - }; - jQuery12.readyException = function(error) { - window2.setTimeout(function() { - throw error; - }); - }; - var readyList = jQuery12.Deferred(); - jQuery12.fn.ready = function(fn) { - readyList.then(fn).catch(function(error) { - jQuery12.readyException(error); - }); - return this; - }; - jQuery12.extend({ - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - // A counter to track how many items to wait for before - // the ready event fires. See trac-6781 - readyWait: 1, - // Handle when the DOM is ready - ready: function(wait) { - if (wait === true ? --jQuery12.readyWait : jQuery12.isReady) { - return; - } - jQuery12.isReady = true; - if (wait !== true && --jQuery12.readyWait > 0) { - return; - } - readyList.resolveWith(document2, [jQuery12]); - } - }); - jQuery12.ready.then = readyList.then; - function completed() { - document2.removeEventListener("DOMContentLoaded", completed); - window2.removeEventListener("load", completed); - jQuery12.ready(); - } - if (document2.readyState === "complete" || document2.readyState !== "loading" && !document2.documentElement.doScroll) { - window2.setTimeout(jQuery12.ready); - } else { - document2.addEventListener("DOMContentLoaded", completed); - window2.addEventListener("load", completed); - } - var access = function(elems, fn, key, value, chainable, emptyGet, raw) { - var i = 0, len = elems.length, bulk = key == null; - if (toType2(key) === "object") { - chainable = true; - for (i in key) { - access(elems, fn, i, key[i], true, emptyGet, raw); - } - } else if (value !== void 0) { - chainable = true; - if (!isFunction2(value)) { - raw = true; - } - if (bulk) { - if (raw) { - fn.call(elems, value); - fn = null; - } else { - bulk = fn; - fn = function(elem, _key, value2) { - return bulk.call(jQuery12(elem), value2); - }; - } - } - if (fn) { - for (; i < len; i++) { - fn( - elems[i], - key, - raw ? value : value.call(elems[i], i, fn(elems[i], key)) - ); - } - } - } - if (chainable) { - return elems; - } - if (bulk) { - return fn.call(elems); - } - return len ? fn(elems[0], key) : emptyGet; - }; - var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; - function fcamelCase(_all, letter) { - return letter.toUpperCase(); - } - function camelCase(string) { - return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase); - } - var acceptData = function(owner) { - return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType; - }; - function Data() { - this.expando = jQuery12.expando + Data.uid++; - } - Data.uid = 1; - Data.prototype = { - cache: function(owner) { - var value = owner[this.expando]; - if (!value) { - value = {}; - if (acceptData(owner)) { - if (owner.nodeType) { - owner[this.expando] = value; - } else { - Object.defineProperty(owner, this.expando, { - value, - configurable: true - }); - } - } - } - return value; - }, - set: function(owner, data, value) { - var prop, cache = this.cache(owner); - if (typeof data === "string") { - cache[camelCase(data)] = value; - } else { - for (prop in data) { - cache[camelCase(prop)] = data[prop]; - } - } - return cache; - }, - get: function(owner, key) { - return key === void 0 ? this.cache(owner) : ( - // Always use camelCase key (gh-2257) - owner[this.expando] && owner[this.expando][camelCase(key)] - ); - }, - access: function(owner, key, value) { - if (key === void 0 || key && typeof key === "string" && value === void 0) { - return this.get(owner, key); - } - this.set(owner, key, value); - return value !== void 0 ? value : key; - }, - remove: function(owner, key) { - var i, cache = owner[this.expando]; - if (cache === void 0) { - return; - } - if (key !== void 0) { - if (Array.isArray(key)) { - key = key.map(camelCase); - } else { - key = camelCase(key); - key = key in cache ? [key] : key.match(rnothtmlwhite) || []; - } - i = key.length; - while (i--) { - delete cache[key[i]]; - } - } - if (key === void 0 || jQuery12.isEmptyObject(cache)) { - if (owner.nodeType) { - owner[this.expando] = void 0; - } else { - delete owner[this.expando]; - } - } - }, - hasData: function(owner) { - var cache = owner[this.expando]; - return cache !== void 0 && !jQuery12.isEmptyObject(cache); - } - }; - var dataPriv = new Data(); - var dataUser = new Data(); - var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; - function getData2(data) { - if (data === "true") { - return true; - } - if (data === "false") { - return false; - } - if (data === "null") { - return null; - } - if (data === +data + "") { - return +data; - } - if (rbrace.test(data)) { - return JSON.parse(data); - } - return data; - } - function dataAttr(elem, key, data) { - var name2; - if (data === void 0 && elem.nodeType === 1) { - name2 = "data-" + key.replace(rmultiDash, "-$&").toLowerCase(); - data = elem.getAttribute(name2); - if (typeof data === "string") { - try { - data = getData2(data); - } catch (e) { - } - dataUser.set(elem, key, data); - } else { - data = void 0; - } - } - return data; - } - jQuery12.extend({ - hasData: function(elem) { - return dataUser.hasData(elem) || dataPriv.hasData(elem); - }, - data: function(elem, name2, data) { - return dataUser.access(elem, name2, data); - }, - removeData: function(elem, name2) { - dataUser.remove(elem, name2); - }, - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function(elem, name2, data) { - return dataPriv.access(elem, name2, data); - }, - _removeData: function(elem, name2) { - dataPriv.remove(elem, name2); - } - }); - jQuery12.fn.extend({ - data: function(key, value) { - var i, name2, data, elem = this[0], attrs = elem && elem.attributes; - if (key === void 0) { - if (this.length) { - data = dataUser.get(elem); - if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) { - i = attrs.length; - while (i--) { - if (attrs[i]) { - name2 = attrs[i].name; - if (name2.indexOf("data-") === 0) { - name2 = camelCase(name2.slice(5)); - dataAttr(elem, name2, data[name2]); - } - } - } - dataPriv.set(elem, "hasDataAttrs", true); - } - } - return data; - } - if (typeof key === "object") { - return this.each(function() { - dataUser.set(this, key); - }); - } - return access(this, function(value2) { - var data2; - if (elem && value2 === void 0) { - data2 = dataUser.get(elem, key); - if (data2 !== void 0) { - return data2; - } - data2 = dataAttr(elem, key); - if (data2 !== void 0) { - return data2; - } - return; - } - this.each(function() { - dataUser.set(this, key, value2); - }); - }, null, value, arguments.length > 1, null, true); - }, - removeData: function(key) { - return this.each(function() { - dataUser.remove(this, key); - }); - } - }); - jQuery12.extend({ - queue: function(elem, type, data) { - var queue; - if (elem) { - type = (type || "fx") + "queue"; - queue = dataPriv.get(elem, type); - if (data) { - if (!queue || Array.isArray(data)) { - queue = dataPriv.access(elem, type, jQuery12.makeArray(data)); - } else { - queue.push(data); - } - } - return queue || []; - } - }, - dequeue: function(elem, type) { - type = type || "fx"; - var queue = jQuery12.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery12._queueHooks(elem, type), next = function() { - jQuery12.dequeue(elem, type); - }; - if (fn === "inprogress") { - fn = queue.shift(); - startLength--; - } - if (fn) { - if (type === "fx") { - queue.unshift("inprogress"); - } - delete hooks.stop; - fn.call(elem, next, hooks); - } - if (!startLength && hooks) { - hooks.empty.fire(); - } - }, - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function(elem, type) { - var key = type + "queueHooks"; - return dataPriv.get(elem, key) || dataPriv.access(elem, key, { - empty: jQuery12.Callbacks("once memory").add(function() { - dataPriv.remove(elem, [type + "queue", key]); - }) - }); - } - }); - jQuery12.fn.extend({ - queue: function(type, data) { - var setter = 2; - if (typeof type !== "string") { - data = type; - type = "fx"; - setter--; - } - if (arguments.length < setter) { - return jQuery12.queue(this[0], type); - } - return data === void 0 ? this : this.each(function() { - var queue = jQuery12.queue(this, type, data); - jQuery12._queueHooks(this, type); - if (type === "fx" && queue[0] !== "inprogress") { - jQuery12.dequeue(this, type); - } - }); - }, - dequeue: function(type) { - return this.each(function() { - jQuery12.dequeue(this, type); - }); - }, - clearQueue: function(type) { - return this.queue(type || "fx", []); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function(type, obj) { - var tmp, count = 1, defer = jQuery12.Deferred(), elements = this, i = this.length, resolve = function() { - if (!--count) { - defer.resolveWith(elements, [elements]); - } - }; - if (typeof type !== "string") { - obj = type; - type = void 0; - } - type = type || "fx"; - while (i--) { - tmp = dataPriv.get(elements[i], type + "queueHooks"); - if (tmp && tmp.empty) { - count++; - tmp.empty.add(resolve); - } - } - resolve(); - return defer.promise(obj); - } - }); - var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source; - var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i"); - var cssExpand = ["Top", "Right", "Bottom", "Left"]; - var documentElement = document2.documentElement; - var isAttached = function(elem) { - return jQuery12.contains(elem.ownerDocument, elem); - }, composed = { composed: true }; - if (documentElement.getRootNode) { - isAttached = function(elem) { - return jQuery12.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument; - }; - } - var isHiddenWithinTree = function(elem, el) { - elem = el || elem; - return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached(elem) && jQuery12.css(elem, "display") === "none"; - }; - function adjustCSS(elem, prop, valueParts, tween) { - var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { - return tween.cur(); - } : function() { - return jQuery12.css(elem, prop, ""); - }, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery12.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery12.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery12.css(elem, prop)); - if (initialInUnit && initialInUnit[3] !== unit) { - initial = initial / 2; - unit = unit || initialInUnit[3]; - initialInUnit = +initial || 1; - while (maxIterations--) { - jQuery12.style(elem, prop, initialInUnit + unit); - if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - } - initialInUnit = initialInUnit * 2; - jQuery12.style(elem, prop, initialInUnit + unit); - valueParts = valueParts || []; - } - if (valueParts) { - initialInUnit = +initialInUnit || +initial || 0; - adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2]; - if (tween) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; - } - var defaultDisplayMap = {}; - function getDefaultDisplay(elem) { - var temp, doc = elem.ownerDocument, nodeName2 = elem.nodeName, display = defaultDisplayMap[nodeName2]; - if (display) { - return display; - } - temp = doc.body.appendChild(doc.createElement(nodeName2)); - display = jQuery12.css(temp, "display"); - temp.parentNode.removeChild(temp); - if (display === "none") { - display = "block"; - } - defaultDisplayMap[nodeName2] = display; - return display; - } - function showHide(elements, show) { - var display, elem, values = [], index2 = 0, length = elements.length; - for (; index2 < length; index2++) { - elem = elements[index2]; - if (!elem.style) { - continue; - } - display = elem.style.display; - if (show) { - if (display === "none") { - values[index2] = dataPriv.get(elem, "display") || null; - if (!values[index2]) { - elem.style.display = ""; - } - } - if (elem.style.display === "" && isHiddenWithinTree(elem)) { - values[index2] = getDefaultDisplay(elem); - } - } else { - if (display !== "none") { - values[index2] = "none"; - dataPriv.set(elem, "display", display); - } - } - } - for (index2 = 0; index2 < length; index2++) { - if (values[index2] != null) { - elements[index2].style.display = values[index2]; - } - } - return elements; - } - jQuery12.fn.extend({ - show: function() { - return showHide(this, true); - }, - hide: function() { - return showHide(this); - }, - toggle: function(state) { - if (typeof state === "boolean") { - return state ? this.show() : this.hide(); - } - return this.each(function() { - if (isHiddenWithinTree(this)) { - jQuery12(this).show(); - } else { - jQuery12(this).hide(); - } - }); - } - }); - var rcheckableType = /^(?:checkbox|radio)$/i; - var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i; - var rscriptType = /^$|^module$|\/(?:java|ecma)script/i; - (function() { - var fragment = document2.createDocumentFragment(), div = fragment.appendChild(document2.createElement("div")), input = document2.createElement("input"); - input.setAttribute("type", "radio"); - input.setAttribute("checked", "checked"); - input.setAttribute("name", "t"); - div.appendChild(input); - support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked; - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue; - div.innerHTML = ""; - support.option = !!div.lastChild; - })(); - var wrapMap = { - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [1, "", "
"], - col: [2, "", "
"], - tr: [2, "", "
"], - td: [3, "", "
"], - _default: [0, "", ""] - }; - wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; - wrapMap.th = wrapMap.td; - if (!support.option) { - wrapMap.optgroup = wrapMap.option = [1, ""]; - } - function getAll(context, tag) { - var ret; - if (typeof context.getElementsByTagName !== "undefined") { - ret = context.getElementsByTagName(tag || "*"); - } else if (typeof context.querySelectorAll !== "undefined") { - ret = context.querySelectorAll(tag || "*"); - } else { - ret = []; - } - if (tag === void 0 || tag && nodeName(context, tag)) { - return jQuery12.merge([context], ret); - } - return ret; - } - function setGlobalEval(elems, refElements) { - var i = 0, l = elems.length; - for (; i < l; i++) { - dataPriv.set( - elems[i], - "globalEval", - !refElements || dataPriv.get(refElements[i], "globalEval") - ); - } - } - var rhtml = /<|&#?\w+;/; - function buildFragment(elems, context, scripts, selection, ignored) { - var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; - for (; i < l; i++) { - elem = elems[i]; - if (elem || elem === 0) { - if (toType2(elem) === "object") { - jQuery12.merge(nodes, elem.nodeType ? [elem] : elem); - } else if (!rhtml.test(elem)) { - nodes.push(context.createTextNode(elem)); - } else { - tmp = tmp || fragment.appendChild(context.createElement("div")); - tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase(); - wrap = wrapMap[tag] || wrapMap._default; - tmp.innerHTML = wrap[1] + jQuery12.htmlPrefilter(elem) + wrap[2]; - j = wrap[0]; - while (j--) { - tmp = tmp.lastChild; - } - jQuery12.merge(nodes, tmp.childNodes); - tmp = fragment.firstChild; - tmp.textContent = ""; - } - } - } - fragment.textContent = ""; - i = 0; - while (elem = nodes[i++]) { - if (selection && jQuery12.inArray(elem, selection) > -1) { - if (ignored) { - ignored.push(elem); - } - continue; - } - attached = isAttached(elem); - tmp = getAll(fragment.appendChild(elem), "script"); - if (attached) { - setGlobalEval(tmp); - } - if (scripts) { - j = 0; - while (elem = tmp[j++]) { - if (rscriptType.test(elem.type || "")) { - scripts.push(elem); - } - } - } - } - return fragment; - } - var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - function returnTrue() { - return true; - } - function returnFalse() { - return false; - } - function on2(elem, types, selector, data, fn, one) { - var origFn, type; - if (typeof types === "object") { - if (typeof selector !== "string") { - data = data || selector; - selector = void 0; - } - for (type in types) { - on2(elem, type, selector, data, types[type], one); - } - return elem; - } - if (data == null && fn == null) { - fn = selector; - data = selector = void 0; - } else if (fn == null) { - if (typeof selector === "string") { - fn = data; - data = void 0; - } else { - fn = data; - data = selector; - selector = void 0; - } - } - if (fn === false) { - fn = returnFalse; - } else if (!fn) { - return elem; - } - if (one === 1) { - origFn = fn; - fn = function(event) { - jQuery12().off(event); - return origFn.apply(this, arguments); - }; - fn.guid = origFn.guid || (origFn.guid = jQuery12.guid++); - } - return elem.each(function() { - jQuery12.event.add(this, types, fn, data, selector); - }); - } - jQuery12.event = { - global: {}, - add: function(elem, types, handler, data, selector) { - var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem); - if (!acceptData(elem)) { - return; - } - if (handler.handler) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - if (selector) { - jQuery12.find.matchesSelector(documentElement, selector); - } - if (!handler.guid) { - handler.guid = jQuery12.guid++; - } - if (!(events = elemData.events)) { - events = elemData.events = /* @__PURE__ */ Object.create(null); - } - if (!(eventHandle = elemData.handle)) { - eventHandle = elemData.handle = function(e) { - return typeof jQuery12 !== "undefined" && jQuery12.event.triggered !== e.type ? jQuery12.event.dispatch.apply(elem, arguments) : void 0; - }; - } - types = (types || "").match(rnothtmlwhite) || [""]; - t = types.length; - while (t--) { - tmp = rtypenamespace.exec(types[t]) || []; - type = origType = tmp[1]; - namespaces = (tmp[2] || "").split(".").sort(); - if (!type) { - continue; - } - special = jQuery12.event.special[type] || {}; - type = (selector ? special.delegateType : special.bindType) || type; - special = jQuery12.event.special[type] || {}; - handleObj = jQuery12.extend({ - type, - origType, - data, - handler, - guid: handler.guid, - selector, - needsContext: selector && jQuery12.expr.match.needsContext.test(selector), - namespace: namespaces.join(".") - }, handleObjIn); - if (!(handlers = events[type])) { - handlers = events[type] = []; - handlers.delegateCount = 0; - if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) { - if (elem.addEventListener) { - elem.addEventListener(type, eventHandle); - } - } - } - if (special.add) { - special.add.call(elem, handleObj); - if (!handleObj.handler.guid) { - handleObj.handler.guid = handler.guid; - } - } - if (selector) { - handlers.splice(handlers.delegateCount++, 0, handleObj); - } else { - handlers.push(handleObj); - } - jQuery12.event.global[type] = true; - } - }, - // Detach an event or set of events from an element - remove: function(elem, types, handler, selector, mappedTypes) { - var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem); - if (!elemData || !(events = elemData.events)) { - return; - } - types = (types || "").match(rnothtmlwhite) || [""]; - t = types.length; - while (t--) { - tmp = rtypenamespace.exec(types[t]) || []; - type = origType = tmp[1]; - namespaces = (tmp[2] || "").split(".").sort(); - if (!type) { - for (type in events) { - jQuery12.event.remove(elem, type + types[t], handler, selector, true); - } - continue; - } - special = jQuery12.event.special[type] || {}; - type = (selector ? special.delegateType : special.bindType) || type; - handlers = events[type] || []; - tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)"); - origCount = j = handlers.length; - while (j--) { - handleObj = handlers[j]; - if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) { - handlers.splice(j, 1); - if (handleObj.selector) { - handlers.delegateCount--; - } - if (special.remove) { - special.remove.call(elem, handleObj); - } - } - } - if (origCount && !handlers.length) { - if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) { - jQuery12.removeEvent(elem, type, elemData.handle); - } - delete events[type]; - } - } - if (jQuery12.isEmptyObject(events)) { - dataPriv.remove(elem, "handle events"); - } - }, - dispatch: function(nativeEvent) { - var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery12.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event.type] || [], special = jQuery12.event.special[event.type] || {}; - args[0] = event; - for (i = 1; i < arguments.length; i++) { - args[i] = arguments[i]; - } - event.delegateTarget = this; - if (special.preDispatch && special.preDispatch.call(this, event) === false) { - return; - } - handlerQueue = jQuery12.event.handlers.call(this, event, handlers); - i = 0; - while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { - event.currentTarget = matched.elem; - j = 0; - while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) { - if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) { - event.handleObj = handleObj; - event.data = handleObj.data; - ret = ((jQuery12.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args); - if (ret !== void 0) { - if ((event.result = ret) === false) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - if (special.postDispatch) { - special.postDispatch.call(this, event); - } - return event.result; - }, - handlers: function(event, handlers) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; - if (delegateCount && // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !(event.type === "click" && event.button >= 1)) { - for (; cur !== this; cur = cur.parentNode || this) { - if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) { - matchedHandlers = []; - matchedSelectors = {}; - for (i = 0; i < delegateCount; i++) { - handleObj = handlers[i]; - sel = handleObj.selector + " "; - if (matchedSelectors[sel] === void 0) { - matchedSelectors[sel] = handleObj.needsContext ? jQuery12(sel, this).index(cur) > -1 : jQuery12.find(sel, this, null, [cur]).length; - } - if (matchedSelectors[sel]) { - matchedHandlers.push(handleObj); - } - } - if (matchedHandlers.length) { - handlerQueue.push({ elem: cur, handlers: matchedHandlers }); - } - } - } - } - cur = this; - if (delegateCount < handlers.length) { - handlerQueue.push({ elem: cur, handlers: handlers.slice(delegateCount) }); - } - return handlerQueue; - }, - addProp: function(name2, hook) { - Object.defineProperty(jQuery12.Event.prototype, name2, { - enumerable: true, - configurable: true, - get: isFunction2(hook) ? function() { - if (this.originalEvent) { - return hook(this.originalEvent); - } - } : function() { - if (this.originalEvent) { - return this.originalEvent[name2]; - } - }, - set: function(value) { - Object.defineProperty(this, name2, { - enumerable: true, - configurable: true, - writable: true, - value - }); - } - }); - }, - fix: function(originalEvent) { - return originalEvent[jQuery12.expando] ? originalEvent : new jQuery12.Event(originalEvent); - }, - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - // Utilize native event to ensure correct state for checkable inputs - setup: function(data) { - var el = this || data; - if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) { - leverageNative(el, "click", true); - } - return false; - }, - trigger: function(data) { - var el = this || data; - if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) { - leverageNative(el, "click"); - } - return true; - }, - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function(event) { - var target = event.target; - return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a"); - } - }, - beforeunload: { - postDispatch: function(event) { - if (event.result !== void 0 && event.originalEvent) { - event.originalEvent.returnValue = event.result; - } - } - } - } - }; - function leverageNative(el, type, isSetup) { - if (!isSetup) { - if (dataPriv.get(el, type) === void 0) { - jQuery12.event.add(el, type, returnTrue); - } - return; - } - dataPriv.set(el, type, false); - jQuery12.event.add(el, type, { - namespace: false, - handler: function(event) { - var result, saved = dataPriv.get(this, type); - if (event.isTrigger & 1 && this[type]) { - if (!saved) { - saved = slice.call(arguments); - dataPriv.set(this, type, saved); - this[type](); - result = dataPriv.get(this, type); - dataPriv.set(this, type, false); - if (saved !== result) { - event.stopImmediatePropagation(); - event.preventDefault(); - return result; - } - } else if ((jQuery12.event.special[type] || {}).delegateType) { - event.stopPropagation(); - } - } else if (saved) { - dataPriv.set(this, type, jQuery12.event.trigger( - saved[0], - saved.slice(1), - this - )); - event.stopPropagation(); - event.isImmediatePropagationStopped = returnTrue; - } - } - }); - } - jQuery12.removeEvent = function(elem, type, handle) { - if (elem.removeEventListener) { - elem.removeEventListener(type, handle); - } - }; - jQuery12.Event = function(src, props) { - if (!(this instanceof jQuery12.Event)) { - return new jQuery12.Event(src, props); - } - if (src && src.type) { - this.originalEvent = src; - this.type = src.type; - this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === void 0 && // Support: Android <=2.3 only - src.returnValue === false ? returnTrue : returnFalse; - this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target; - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - } else { - this.type = src; - } - if (props) { - jQuery12.extend(this, props); - } - this.timeStamp = src && src.timeStamp || Date.now(); - this[jQuery12.expando] = true; - }; - jQuery12.Event.prototype = { - constructor: jQuery12.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - preventDefault: function() { - var e = this.originalEvent; - this.isDefaultPrevented = returnTrue; - if (e && !this.isSimulated) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - this.isPropagationStopped = returnTrue; - if (e && !this.isSimulated) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - this.isImmediatePropagationStopped = returnTrue; - if (e && !this.isSimulated) { - e.stopImmediatePropagation(); - } - this.stopPropagation(); - } - }; - jQuery12.each({ - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - which: true - }, jQuery12.event.addProp); - jQuery12.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) { - function focusMappedHandler(nativeEvent) { - if (document2.documentMode) { - var handle = dataPriv.get(this, "handle"), event = jQuery12.event.fix(nativeEvent); - event.type = nativeEvent.type === "focusin" ? "focus" : "blur"; - event.isSimulated = true; - handle(nativeEvent); - if (event.target === event.currentTarget) { - handle(event); - } - } else { - jQuery12.event.simulate( - delegateType, - nativeEvent.target, - jQuery12.event.fix(nativeEvent) - ); - } - } - jQuery12.event.special[type] = { - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - var attaches; - leverageNative(this, type, true); - if (document2.documentMode) { - attaches = dataPriv.get(this, delegateType); - if (!attaches) { - this.addEventListener(delegateType, focusMappedHandler); - } - dataPriv.set(this, delegateType, (attaches || 0) + 1); - } else { - return false; - } - }, - trigger: function() { - leverageNative(this, type); - return true; - }, - teardown: function() { - var attaches; - if (document2.documentMode) { - attaches = dataPriv.get(this, delegateType) - 1; - if (!attaches) { - this.removeEventListener(delegateType, focusMappedHandler); - dataPriv.remove(this, delegateType); - } else { - dataPriv.set(this, delegateType, attaches); - } - } else { - return false; - } - }, - // Suppress native focus or blur if we're currently inside - // a leveraged native-event stack - _default: function(event) { - return dataPriv.get(event.target, type); - }, - delegateType - }; - jQuery12.event.special[delegateType] = { - setup: function() { - var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType); - if (!attaches) { - if (document2.documentMode) { - this.addEventListener(delegateType, focusMappedHandler); - } else { - doc.addEventListener(type, focusMappedHandler, true); - } - } - dataPriv.set(dataHolder, delegateType, (attaches || 0) + 1); - }, - teardown: function() { - var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType) - 1; - if (!attaches) { - if (document2.documentMode) { - this.removeEventListener(delegateType, focusMappedHandler); - } else { - doc.removeEventListener(type, focusMappedHandler, true); - } - dataPriv.remove(dataHolder, delegateType); - } else { - dataPriv.set(dataHolder, delegateType, attaches); - } - } - }; - }); - jQuery12.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" - }, function(orig, fix) { - jQuery12.event.special[orig] = { - delegateType: fix, - bindType: fix, - handle: function(event) { - var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; - if (!related || related !== target && !jQuery12.contains(target, related)) { - event.type = handleObj.origType; - ret = handleObj.handler.apply(this, arguments); - event.type = fix; - } - return ret; - } - }; - }); - jQuery12.fn.extend({ - on: function(types, selector, data, fn) { - return on2(this, types, selector, data, fn); - }, - one: function(types, selector, data, fn) { - return on2(this, types, selector, data, fn, 1); - }, - off: function(types, selector, fn) { - var handleObj, type; - if (types && types.preventDefault && types.handleObj) { - handleObj = types.handleObj; - jQuery12(types.delegateTarget).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if (typeof types === "object") { - for (type in types) { - this.off(type, selector, types[type]); - } - return this; - } - if (selector === false || typeof selector === "function") { - fn = selector; - selector = void 0; - } - if (fn === false) { - fn = returnFalse; - } - return this.each(function() { - jQuery12.event.remove(this, types, fn, selector); - }); - } - }); - var rnoInnerhtml = /\s*$/g; - function manipulationTarget(elem, content) { - if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) { - return jQuery12(elem).children("tbody")[0] || elem; - } - return elem; - } - function disableScript(elem) { - elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; - return elem; - } - function restoreScript(elem) { - if ((elem.type || "").slice(0, 5) === "true/") { - elem.type = elem.type.slice(5); - } else { - elem.removeAttribute("type"); - } - return elem; - } - function cloneCopyEvent(src, dest) { - var i, l, type, pdataOld, udataOld, udataCur, events; - if (dest.nodeType !== 1) { - return; - } - if (dataPriv.hasData(src)) { - pdataOld = dataPriv.get(src); - events = pdataOld.events; - if (events) { - dataPriv.remove(dest, "handle events"); - for (type in events) { - for (i = 0, l = events[type].length; i < l; i++) { - jQuery12.event.add(dest, type, events[type][i]); - } - } - } - } - if (dataUser.hasData(src)) { - udataOld = dataUser.access(src); - udataCur = jQuery12.extend({}, udataOld); - dataUser.set(dest, udataCur); - } - } - function fixInput(src, dest) { - var nodeName2 = dest.nodeName.toLowerCase(); - if (nodeName2 === "input" && rcheckableType.test(src.type)) { - dest.checked = src.checked; - } else if (nodeName2 === "input" || nodeName2 === "textarea") { - dest.defaultValue = src.defaultValue; - } - } - function domManip(collection, args, callback, ignored) { - args = flat(args); - var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[0], valueIsFunction = isFunction2(value); - if (valueIsFunction || l > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) { - return collection.each(function(index2) { - var self2 = collection.eq(index2); - if (valueIsFunction) { - args[0] = value.call(this, index2, self2.html()); - } - domManip(self2, args, callback, ignored); - }); - } - if (l) { - fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored); - first = fragment.firstChild; - if (fragment.childNodes.length === 1) { - fragment = first; - } - if (first || ignored) { - scripts = jQuery12.map(getAll(fragment, "script"), disableScript); - hasScripts = scripts.length; - for (; i < l; i++) { - node = fragment; - if (i !== iNoClone) { - node = jQuery12.clone(node, true, true); - if (hasScripts) { - jQuery12.merge(scripts, getAll(node, "script")); - } - } - callback.call(collection[i], node, i); - } - if (hasScripts) { - doc = scripts[scripts.length - 1].ownerDocument; - jQuery12.map(scripts, restoreScript); - for (i = 0; i < hasScripts; i++) { - node = scripts[i]; - if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery12.contains(doc, node)) { - if (node.src && (node.type || "").toLowerCase() !== "module") { - if (jQuery12._evalUrl && !node.noModule) { - jQuery12._evalUrl(node.src, { - nonce: node.nonce || node.getAttribute("nonce") - }, doc); - } - } else { - DOMEval(node.textContent.replace(rcleanScript, ""), node, doc); - } - } - } - } - } - } - return collection; - } - function remove(elem, selector, keepData) { - var node, nodes = selector ? jQuery12.filter(selector, elem) : elem, i = 0; - for (; (node = nodes[i]) != null; i++) { - if (!keepData && node.nodeType === 1) { - jQuery12.cleanData(getAll(node)); - } - if (node.parentNode) { - if (keepData && isAttached(node)) { - setGlobalEval(getAll(node, "script")); - } - node.parentNode.removeChild(node); - } - } - return elem; - } - jQuery12.extend({ - htmlPrefilter: function(html) { - return html; - }, - clone: function(elem, dataAndEvents, deepDataAndEvents) { - var i, l, srcElements, destElements, clone2 = elem.cloneNode(true), inPage = isAttached(elem); - if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery12.isXMLDoc(elem)) { - destElements = getAll(clone2); - srcElements = getAll(elem); - for (i = 0, l = srcElements.length; i < l; i++) { - fixInput(srcElements[i], destElements[i]); - } - } - if (dataAndEvents) { - if (deepDataAndEvents) { - srcElements = srcElements || getAll(elem); - destElements = destElements || getAll(clone2); - for (i = 0, l = srcElements.length; i < l; i++) { - cloneCopyEvent(srcElements[i], destElements[i]); - } - } else { - cloneCopyEvent(elem, clone2); - } - } - destElements = getAll(clone2, "script"); - if (destElements.length > 0) { - setGlobalEval(destElements, !inPage && getAll(elem, "script")); - } - return clone2; - }, - cleanData: function(elems) { - var data, elem, type, special = jQuery12.event.special, i = 0; - for (; (elem = elems[i]) !== void 0; i++) { - if (acceptData(elem)) { - if (data = elem[dataPriv.expando]) { - if (data.events) { - for (type in data.events) { - if (special[type]) { - jQuery12.event.remove(elem, type); - } else { - jQuery12.removeEvent(elem, type, data.handle); - } - } - } - elem[dataPriv.expando] = void 0; - } - if (elem[dataUser.expando]) { - elem[dataUser.expando] = void 0; - } - } - } - } - }); - jQuery12.fn.extend({ - detach: function(selector) { - return remove(this, selector, true); - }, - remove: function(selector) { - return remove(this, selector); - }, - text: function(value) { - return access(this, function(value2) { - return value2 === void 0 ? jQuery12.text(this) : this.empty().each(function() { - if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { - this.textContent = value2; - } - }); - }, null, value, arguments.length); - }, - append: function() { - return domManip(this, arguments, function(elem) { - if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { - var target = manipulationTarget(this, elem); - target.appendChild(elem); - } - }); - }, - prepend: function() { - return domManip(this, arguments, function(elem) { - if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) { - var target = manipulationTarget(this, elem); - target.insertBefore(elem, target.firstChild); - } - }); - }, - before: function() { - return domManip(this, arguments, function(elem) { - if (this.parentNode) { - this.parentNode.insertBefore(elem, this); - } - }); - }, - after: function() { - return domManip(this, arguments, function(elem) { - if (this.parentNode) { - this.parentNode.insertBefore(elem, this.nextSibling); - } - }); - }, - empty: function() { - var elem, i = 0; - for (; (elem = this[i]) != null; i++) { - if (elem.nodeType === 1) { - jQuery12.cleanData(getAll(elem, false)); - elem.textContent = ""; - } - } - return this; - }, - clone: function(dataAndEvents, deepDataAndEvents) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - return this.map(function() { - return jQuery12.clone(this, dataAndEvents, deepDataAndEvents); - }); - }, - html: function(value) { - return access(this, function(value2) { - var elem = this[0] || {}, i = 0, l = this.length; - if (value2 === void 0 && elem.nodeType === 1) { - return elem.innerHTML; - } - if (typeof value2 === "string" && !rnoInnerhtml.test(value2) && !wrapMap[(rtagName.exec(value2) || ["", ""])[1].toLowerCase()]) { - value2 = jQuery12.htmlPrefilter(value2); - try { - for (; i < l; i++) { - elem = this[i] || {}; - if (elem.nodeType === 1) { - jQuery12.cleanData(getAll(elem, false)); - elem.innerHTML = value2; - } - } - elem = 0; - } catch (e) { - } - } - if (elem) { - this.empty().append(value2); - } - }, null, value, arguments.length); - }, - replaceWith: function() { - var ignored = []; - return domManip(this, arguments, function(elem) { - var parent = this.parentNode; - if (jQuery12.inArray(this, ignored) < 0) { - jQuery12.cleanData(getAll(this)); - if (parent) { - parent.replaceChild(elem, this); - } - } - }, ignored); - } - }); - jQuery12.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" - }, function(name2, original) { - jQuery12.fn[name2] = function(selector) { - var elems, ret = [], insert = jQuery12(selector), last = insert.length - 1, i = 0; - for (; i <= last; i++) { - elems = i === last ? this : this.clone(true); - jQuery12(insert[i])[original](elems); - push.apply(ret, elems.get()); - } - return this.pushStack(ret); - }; - }); - var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i"); - var rcustomProp = /^--/; - var getStyles = function(elem) { - var view = elem.ownerDocument.defaultView; - if (!view || !view.opener) { - view = window2; - } - return view.getComputedStyle(elem); - }; - var swap = function(elem, options, callback) { - var ret, name2, old = {}; - for (name2 in options) { - old[name2] = elem.style[name2]; - elem.style[name2] = options[name2]; - } - ret = callback.call(elem); - for (name2 in options) { - elem.style[name2] = old[name2]; - } - return ret; - }; - var rboxStyle = new RegExp(cssExpand.join("|"), "i"); - (function() { - function computeStyleTests() { - if (!div) { - return; - } - container.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0"; - div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%"; - documentElement.appendChild(container).appendChild(div); - var divStyle = window2.getComputedStyle(div); - pixelPositionVal = divStyle.top !== "1%"; - reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12; - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36; - boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36; - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12; - documentElement.removeChild(container); - div = null; - } - function roundPixelMeasures(measure) { - return Math.round(parseFloat(measure)); - } - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document2.createElement("div"), div = document2.createElement("div"); - if (!div.style) { - return; - } - div.style.backgroundClip = "content-box"; - div.cloneNode(true).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - jQuery12.extend(support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - }, - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - // - // Support: Firefox 70+ - // Only Firefox includes border widths - // in computed dimensions. (gh-4529) - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if (reliableTrDimensionsVal == null) { - table = document2.createElement("table"); - tr = document2.createElement("tr"); - trChild = document2.createElement("div"); - table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; - tr.style.cssText = "box-sizing:content-box;border:1px solid"; - tr.style.height = "1px"; - trChild.style.height = "9px"; - trChild.style.display = "block"; - documentElement.appendChild(table).appendChild(tr).appendChild(trChild); - trStyle = window2.getComputedStyle(tr); - reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight; - documentElement.removeChild(table); - } - return reliableTrDimensionsVal; - } - }); - })(); - function curCSS(elem, name2, computed) { - var width2, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test(name2), style = elem.style; - computed = computed || getStyles(elem); - if (computed) { - ret = computed.getPropertyValue(name2) || computed[name2]; - if (isCustomProp && ret) { - ret = ret.replace(rtrimCSS, "$1") || void 0; - } - if (ret === "" && !isAttached(elem)) { - ret = jQuery12.style(elem, name2); - } - if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name2)) { - width2 = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - style.width = width2; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - return ret !== void 0 ? ( - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" - ) : ret; - } - function addGetHookIf(conditionFn, hookFn) { - return { - get: function() { - if (conditionFn()) { - delete this.get; - return; - } - return (this.get = hookFn).apply(this, arguments); - } - }; - } - var cssPrefixes = ["Webkit", "Moz", "ms"], emptyStyle = document2.createElement("div").style, vendorProps = {}; - function vendorPropName(name2) { - var capName = name2[0].toUpperCase() + name2.slice(1), i = cssPrefixes.length; - while (i--) { - name2 = cssPrefixes[i] + capName; - if (name2 in emptyStyle) { - return name2; - } - } - } - function finalPropName(name2) { - var final = jQuery12.cssProps[name2] || vendorProps[name2]; - if (final) { - return final; - } - if (name2 in emptyStyle) { - return name2; - } - return vendorProps[name2] = vendorPropName(name2) || name2; - } - var rdisplayswap = /^(none|table(?!-c[ea]).+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - function setPositiveNumber(_elem, value, subtract) { - var matches3 = rcssNum.exec(value); - return matches3 ? ( - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max(0, matches3[2] - (subtract || 0)) + (matches3[3] || "px") - ) : value; - } - function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) { - var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0, marginDelta = 0; - if (box === (isBorderBox ? "border" : "content")) { - return 0; - } - for (; i < 4; i += 2) { - if (box === "margin") { - marginDelta += jQuery12.css(elem, box + cssExpand[i], true, styles); - } - if (!isBorderBox) { - delta += jQuery12.css(elem, "padding" + cssExpand[i], true, styles); - if (box !== "padding") { - delta += jQuery12.css(elem, "border" + cssExpand[i] + "Width", true, styles); - } else { - extra += jQuery12.css(elem, "border" + cssExpand[i] + "Width", true, styles); - } - } else { - if (box === "content") { - delta -= jQuery12.css(elem, "padding" + cssExpand[i], true, styles); - } - if (box !== "margin") { - delta -= jQuery12.css(elem, "border" + cssExpand[i] + "Width", true, styles); - } - } - } - if (!isBorderBox && computedVal >= 0) { - delta += Math.max(0, Math.ceil( - elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5 - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - )) || 0; - } - return delta + marginDelta; - } - function getWidthOrHeight(elem, dimension, extra) { - var styles = getStyles(elem), boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery12.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1); - if (rnumnonpx.test(val)) { - if (!extra) { - return val; - } - val = "auto"; - } - if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName(elem, "tr") || // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat(val) && jQuery12.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected - elem.getClientRects().length) { - isBorderBox = jQuery12.css(elem, "boxSizing", false, styles) === "border-box"; - valueIsBorderBox = offsetProp in elem; - if (valueIsBorderBox) { - val = elem[offsetProp]; - } - } - val = parseFloat(val) || 0; - return val + boxModelAdjustment( - elem, - dimension, - extra || (isBorderBox ? "border" : "content"), - valueIsBorderBox, - styles, - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) + "px"; - } - jQuery12.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function(elem, computed) { - if (computed) { - var ret = curCSS(elem, "opacity"); - return ret === "" ? "1" : ret; - } - } - } - }, - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - animationIterationCount: true, - aspectRatio: true, - borderImageSlice: true, - columnCount: true, - flexGrow: true, - flexShrink: true, - fontWeight: true, - gridArea: true, - gridColumn: true, - gridColumnEnd: true, - gridColumnStart: true, - gridRow: true, - gridRowEnd: true, - gridRowStart: true, - lineHeight: true, - opacity: true, - order: true, - orphans: true, - scale: true, - widows: true, - zIndex: true, - zoom: true, - // SVG-related - fillOpacity: true, - floodOpacity: true, - stopOpacity: true, - strokeMiterlimit: true, - strokeOpacity: true - }, - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - // Get and set the style property on a DOM Node - style: function(elem, name2, value, extra) { - if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { - return; - } - var ret, type, hooks, origName = camelCase(name2), isCustomProp = rcustomProp.test(name2), style = elem.style; - if (!isCustomProp) { - name2 = finalPropName(origName); - } - hooks = jQuery12.cssHooks[name2] || jQuery12.cssHooks[origName]; - if (value !== void 0) { - type = typeof value; - if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) { - value = adjustCSS(elem, name2, ret); - type = "number"; - } - if (value == null || value !== value) { - return; - } - if (type === "number" && !isCustomProp) { - value += ret && ret[3] || (jQuery12.cssNumber[origName] ? "" : "px"); - } - if (!support.clearCloneStyle && value === "" && name2.indexOf("background") === 0) { - style[name2] = "inherit"; - } - if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== void 0) { - if (isCustomProp) { - style.setProperty(name2, value); - } else { - style[name2] = value; - } - } - } else { - if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== void 0) { - return ret; - } - return style[name2]; - } - }, - css: function(elem, name2, extra, styles) { - var val, num, hooks, origName = camelCase(name2), isCustomProp = rcustomProp.test(name2); - if (!isCustomProp) { - name2 = finalPropName(origName); - } - hooks = jQuery12.cssHooks[name2] || jQuery12.cssHooks[origName]; - if (hooks && "get" in hooks) { - val = hooks.get(elem, true, extra); - } - if (val === void 0) { - val = curCSS(elem, name2, styles); - } - if (val === "normal" && name2 in cssNormalTransform) { - val = cssNormalTransform[name2]; - } - if (extra === "" || extra) { - num = parseFloat(val); - return extra === true || isFinite(num) ? num || 0 : val; - } - return val; - } - }); - jQuery12.each(["height", "width"], function(_i, dimension) { - jQuery12.cssHooks[dimension] = { - get: function(elem, computed, extra) { - if (computed) { - return rdisplayswap.test(jQuery12.css(elem, "display")) && // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - (!elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function() { - return getWidthOrHeight(elem, dimension, extra); - }) : getWidthOrHeight(elem, dimension, extra); - } - }, - set: function(elem, value, extra) { - var matches3, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery12.css(elem, "boxSizing", false, styles) === "border-box", subtract = extra ? boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : 0; - if (isBorderBox && scrollboxSizeBuggy) { - subtract -= Math.ceil( - elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5 - ); - } - if (subtract && (matches3 = rcssNum.exec(value)) && (matches3[3] || "px") !== "px") { - elem.style[dimension] = value; - value = jQuery12.css(elem, dimension); - } - return setPositiveNumber(elem, value, subtract); - } - }; - }); - jQuery12.cssHooks.marginLeft = addGetHookIf( - support.reliableMarginLeft, - function(elem, computed) { - if (computed) { - return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - })) + "px"; - } - } - ); - jQuery12.each({ - margin: "", - padding: "", - border: "Width" - }, function(prefix, suffix) { - jQuery12.cssHooks[prefix + suffix] = { - expand: function(value) { - var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value]; - for (; i < 4; i++) { - expanded[prefix + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0]; - } - return expanded; - } - }; - if (prefix !== "margin") { - jQuery12.cssHooks[prefix + suffix].set = setPositiveNumber; - } - }); - jQuery12.fn.extend({ - css: function(name2, value) { - return access(this, function(elem, name3, value2) { - var styles, len, map = {}, i = 0; - if (Array.isArray(name3)) { - styles = getStyles(elem); - len = name3.length; - for (; i < len; i++) { - map[name3[i]] = jQuery12.css(elem, name3[i], false, styles); - } - return map; - } - return value2 !== void 0 ? jQuery12.style(elem, name3, value2) : jQuery12.css(elem, name3); - }, name2, value, arguments.length > 1); - } - }); - function Tween(elem, options, prop, end, easing) { - return new Tween.prototype.init(elem, options, prop, end, easing); - } - jQuery12.Tween = Tween; - Tween.prototype = { - constructor: Tween, - init: function(elem, options, prop, end, easing, unit) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery12.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || (jQuery12.cssNumber[prop] ? "" : "px"); - }, - cur: function() { - var hooks = Tween.propHooks[this.prop]; - return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this); - }, - run: function(percent) { - var eased, hooks = Tween.propHooks[this.prop]; - if (this.options.duration) { - this.pos = eased = jQuery12.easing[this.easing]( - percent, - this.options.duration * percent, - 0, - 1, - this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = (this.end - this.start) * eased + this.start; - if (this.options.step) { - this.options.step.call(this.elem, this.now, this); - } - if (hooks && hooks.set) { - hooks.set(this); - } else { - Tween.propHooks._default.set(this); - } - return this; - } - }; - Tween.prototype.init.prototype = Tween.prototype; - Tween.propHooks = { - _default: { - get: function(tween) { - var result; - if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) { - return tween.elem[tween.prop]; - } - result = jQuery12.css(tween.elem, tween.prop, ""); - return !result || result === "auto" ? 0 : result; - }, - set: function(tween) { - if (jQuery12.fx.step[tween.prop]) { - jQuery12.fx.step[tween.prop](tween); - } else if (tween.elem.nodeType === 1 && (jQuery12.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) { - jQuery12.style(tween.elem, tween.prop, tween.now + tween.unit); - } else { - tween.elem[tween.prop] = tween.now; - } - } - } - }; - Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function(tween) { - if (tween.elem.nodeType && tween.elem.parentNode) { - tween.elem[tween.prop] = tween.now; - } - } - }; - jQuery12.easing = { - linear: function(p) { - return p; - }, - swing: function(p) { - return 0.5 - Math.cos(p * Math.PI) / 2; - }, - _default: "swing" - }; - jQuery12.fx = Tween.prototype.init; - jQuery12.fx.step = {}; - var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; - function schedule() { - if (inProgress) { - if (document2.hidden === false && window2.requestAnimationFrame) { - window2.requestAnimationFrame(schedule); - } else { - window2.setTimeout(schedule, jQuery12.fx.interval); - } - jQuery12.fx.tick(); - } - } - function createFxNow() { - window2.setTimeout(function() { - fxNow = void 0; - }); - return fxNow = Date.now(); - } - function genFx(type, includeWidth) { - var which, i = 0, attrs = { height: type }; - includeWidth = includeWidth ? 1 : 0; - for (; i < 4; i += 2 - includeWidth) { - which = cssExpand[i]; - attrs["margin" + which] = attrs["padding" + which] = type; - } - if (includeWidth) { - attrs.opacity = attrs.width = type; - } - return attrs; - } - function createTween(value, prop, animation) { - var tween, collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), index2 = 0, length = collection.length; - for (; index2 < length; index2++) { - if (tween = collection[index2].call(animation, prop, value)) { - return tween; - } - } - } - function defaultPrefilter(elem, props, opts) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow"); - if (!opts.queue) { - hooks = jQuery12._queueHooks(elem, "fx"); - if (hooks.unqueued == null) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if (!hooks.unqueued) { - oldfire(); - } - }; - } - hooks.unqueued++; - anim.always(function() { - anim.always(function() { - hooks.unqueued--; - if (!jQuery12.queue(elem, "fx").length) { - hooks.empty.fire(); - } - }); - }); - } - for (prop in props) { - value = props[prop]; - if (rfxtypes.test(value)) { - delete props[prop]; - toggle = toggle || value === "toggle"; - if (value === (hidden ? "hide" : "show")) { - if (value === "show" && dataShow && dataShow[prop] !== void 0) { - hidden = true; - } else { - continue; - } - } - orig[prop] = dataShow && dataShow[prop] || jQuery12.style(elem, prop); - } - } - propTween = !jQuery12.isEmptyObject(props); - if (!propTween && jQuery12.isEmptyObject(orig)) { - return; - } - if (isBox && elem.nodeType === 1) { - opts.overflow = [style.overflow, style.overflowX, style.overflowY]; - restoreDisplay = dataShow && dataShow.display; - if (restoreDisplay == null) { - restoreDisplay = dataPriv.get(elem, "display"); - } - display = jQuery12.css(elem, "display"); - if (display === "none") { - if (restoreDisplay) { - display = restoreDisplay; - } else { - showHide([elem], true); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery12.css(elem, "display"); - showHide([elem]); - } - } - if (display === "inline" || display === "inline-block" && restoreDisplay != null) { - if (jQuery12.css(elem, "float") === "none") { - if (!propTween) { - anim.done(function() { - style.display = restoreDisplay; - }); - if (restoreDisplay == null) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - if (opts.overflow) { - style.overflow = "hidden"; - anim.always(function() { - style.overflow = opts.overflow[0]; - style.overflowX = opts.overflow[1]; - style.overflowY = opts.overflow[2]; - }); - } - propTween = false; - for (prop in orig) { - if (!propTween) { - if (dataShow) { - if ("hidden" in dataShow) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access(elem, "fxshow", { display: restoreDisplay }); - } - if (toggle) { - dataShow.hidden = !hidden; - } - if (hidden) { - showHide([elem], true); - } - anim.done(function() { - if (!hidden) { - showHide([elem]); - } - dataPriv.remove(elem, "fxshow"); - for (prop in orig) { - jQuery12.style(elem, prop, orig[prop]); - } - }); - } - propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim); - if (!(prop in dataShow)) { - dataShow[prop] = propTween.start; - if (hidden) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } - } - function propFilter(props, specialEasing) { - var index2, name2, easing, value, hooks; - for (index2 in props) { - name2 = camelCase(index2); - easing = specialEasing[name2]; - value = props[index2]; - if (Array.isArray(value)) { - easing = value[1]; - value = props[index2] = value[0]; - } - if (index2 !== name2) { - props[name2] = value; - delete props[index2]; - } - hooks = jQuery12.cssHooks[name2]; - if (hooks && "expand" in hooks) { - value = hooks.expand(value); - delete props[name2]; - for (index2 in value) { - if (!(index2 in props)) { - props[index2] = value[index2]; - specialEasing[index2] = easing; - } - } - } else { - specialEasing[name2] = easing; - } - } - } - function Animation(elem, properties, options) { - var result, stopped, index2 = 0, length = Animation.prefilters.length, deferred = jQuery12.Deferred().always(function() { - delete tick.elem; - }), tick = function() { - if (stopped) { - return false; - } - var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), temp = remaining / animation.duration || 0, percent = 1 - temp, index3 = 0, length2 = animation.tweens.length; - for (; index3 < length2; index3++) { - animation.tweens[index3].run(percent); - } - deferred.notifyWith(elem, [animation, percent, remaining]); - if (percent < 1 && length2) { - return remaining; - } - if (!length2) { - deferred.notifyWith(elem, [animation, 1, 0]); - } - deferred.resolveWith(elem, [animation]); - return false; - }, animation = deferred.promise({ - elem, - props: jQuery12.extend({}, properties), - opts: jQuery12.extend(true, { - specialEasing: {}, - easing: jQuery12.easing._default - }, options), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function(prop, end) { - var tween = jQuery12.Tween( - elem, - animation.opts, - prop, - end, - animation.opts.specialEasing[prop] || animation.opts.easing - ); - animation.tweens.push(tween); - return tween; - }, - stop: function(gotoEnd) { - var index3 = 0, length2 = gotoEnd ? animation.tweens.length : 0; - if (stopped) { - return this; - } - stopped = true; - for (; index3 < length2; index3++) { - animation.tweens[index3].run(1); - } - if (gotoEnd) { - deferred.notifyWith(elem, [animation, 1, 0]); - deferred.resolveWith(elem, [animation, gotoEnd]); - } else { - deferred.rejectWith(elem, [animation, gotoEnd]); - } - return this; - } - }), props = animation.props; - propFilter(props, animation.opts.specialEasing); - for (; index2 < length; index2++) { - result = Animation.prefilters[index2].call(animation, elem, props, animation.opts); - if (result) { - if (isFunction2(result.stop)) { - jQuery12._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result); - } - return result; - } - } - jQuery12.map(props, createTween, animation); - if (isFunction2(animation.opts.start)) { - animation.opts.start.call(elem, animation); - } - animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always); - jQuery12.fx.timer( - jQuery12.extend(tick, { - elem, - anim: animation, - queue: animation.opts.queue - }) - ); - return animation; - } - jQuery12.Animation = jQuery12.extend(Animation, { - tweeners: { - "*": [function(prop, value) { - var tween = this.createTween(prop, value); - adjustCSS(tween.elem, prop, rcssNum.exec(value), tween); - return tween; - }] - }, - tweener: function(props, callback) { - if (isFunction2(props)) { - callback = props; - props = ["*"]; - } else { - props = props.match(rnothtmlwhite); - } - var prop, index2 = 0, length = props.length; - for (; index2 < length; index2++) { - prop = props[index2]; - Animation.tweeners[prop] = Animation.tweeners[prop] || []; - Animation.tweeners[prop].unshift(callback); - } - }, - prefilters: [defaultPrefilter], - prefilter: function(callback, prepend) { - if (prepend) { - Animation.prefilters.unshift(callback); - } else { - Animation.prefilters.push(callback); - } - } - }); - jQuery12.speed = function(speed, easing, fn) { - var opt = speed && typeof speed === "object" ? jQuery12.extend({}, speed) : { - complete: fn || !fn && easing || isFunction2(speed) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction2(easing) && easing - }; - if (jQuery12.fx.off) { - opt.duration = 0; - } else { - if (typeof opt.duration !== "number") { - if (opt.duration in jQuery12.fx.speeds) { - opt.duration = jQuery12.fx.speeds[opt.duration]; - } else { - opt.duration = jQuery12.fx.speeds._default; - } - } - } - if (opt.queue == null || opt.queue === true) { - opt.queue = "fx"; - } - opt.old = opt.complete; - opt.complete = function() { - if (isFunction2(opt.old)) { - opt.old.call(this); - } - if (opt.queue) { - jQuery12.dequeue(this, opt.queue); - } - }; - return opt; - }; - jQuery12.fn.extend({ - fadeTo: function(speed, to, easing, callback) { - return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback); - }, - animate: function(prop, speed, easing, callback) { - var empty = jQuery12.isEmptyObject(prop), optall = jQuery12.speed(speed, easing, callback), doAnimation = function() { - var anim = Animation(this, jQuery12.extend({}, prop), optall); - if (empty || dataPriv.get(this, "finish")) { - anim.stop(true); - } - }; - doAnimation.finish = doAnimation; - return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation); - }, - stop: function(type, clearQueue, gotoEnd) { - var stopQueue = function(hooks) { - var stop = hooks.stop; - delete hooks.stop; - stop(gotoEnd); - }; - if (typeof type !== "string") { - gotoEnd = clearQueue; - clearQueue = type; - type = void 0; - } - if (clearQueue) { - this.queue(type || "fx", []); - } - return this.each(function() { - var dequeue = true, index2 = type != null && type + "queueHooks", timers = jQuery12.timers, data = dataPriv.get(this); - if (index2) { - if (data[index2] && data[index2].stop) { - stopQueue(data[index2]); - } - } else { - for (index2 in data) { - if (data[index2] && data[index2].stop && rrun.test(index2)) { - stopQueue(data[index2]); - } - } - } - for (index2 = timers.length; index2--; ) { - if (timers[index2].elem === this && (type == null || timers[index2].queue === type)) { - timers[index2].anim.stop(gotoEnd); - dequeue = false; - timers.splice(index2, 1); - } - } - if (dequeue || !gotoEnd) { - jQuery12.dequeue(this, type); - } - }); - }, - finish: function(type) { - if (type !== false) { - type = type || "fx"; - } - return this.each(function() { - var index2, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery12.timers, length = queue ? queue.length : 0; - data.finish = true; - jQuery12.queue(this, type, []); - if (hooks && hooks.stop) { - hooks.stop.call(this, true); - } - for (index2 = timers.length; index2--; ) { - if (timers[index2].elem === this && timers[index2].queue === type) { - timers[index2].anim.stop(true); - timers.splice(index2, 1); - } - } - for (index2 = 0; index2 < length; index2++) { - if (queue[index2] && queue[index2].finish) { - queue[index2].finish.call(this); - } - } - delete data.finish; - }); - } - }); - jQuery12.each(["toggle", "show", "hide"], function(_i, name2) { - var cssFn = jQuery12.fn[name2]; - jQuery12.fn[name2] = function(speed, easing, callback) { - return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name2, true), speed, easing, callback); - }; - }); - jQuery12.each({ - slideDown: genFx("show"), - slideUp: genFx("hide"), - slideToggle: genFx("toggle"), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } - }, function(name2, props) { - jQuery12.fn[name2] = function(speed, easing, callback) { - return this.animate(props, speed, easing, callback); - }; - }); - jQuery12.timers = []; - jQuery12.fx.tick = function() { - var timer, i = 0, timers = jQuery12.timers; - fxNow = Date.now(); - for (; i < timers.length; i++) { - timer = timers[i]; - if (!timer() && timers[i] === timer) { - timers.splice(i--, 1); - } - } - if (!timers.length) { - jQuery12.fx.stop(); - } - fxNow = void 0; - }; - jQuery12.fx.timer = function(timer) { - jQuery12.timers.push(timer); - jQuery12.fx.start(); - }; - jQuery12.fx.interval = 13; - jQuery12.fx.start = function() { - if (inProgress) { - return; - } - inProgress = true; - schedule(); - }; - jQuery12.fx.stop = function() { - inProgress = null; - }; - jQuery12.fx.speeds = { - slow: 600, - fast: 200, - // Default speed - _default: 400 - }; - jQuery12.fn.delay = function(time, type) { - time = jQuery12.fx ? jQuery12.fx.speeds[time] || time : time; - type = type || "fx"; - return this.queue(type, function(next, hooks) { - var timeout = window2.setTimeout(next, time); - hooks.stop = function() { - window2.clearTimeout(timeout); - }; - }); - }; - (function() { - var input = document2.createElement("input"), select = document2.createElement("select"), opt = select.appendChild(document2.createElement("option")); - input.type = "checkbox"; - support.checkOn = input.value !== ""; - support.optSelected = opt.selected; - input = document2.createElement("input"); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; - })(); - var boolHook, attrHandle = jQuery12.expr.attrHandle; - jQuery12.fn.extend({ - attr: function(name2, value) { - return access(this, jQuery12.attr, name2, value, arguments.length > 1); - }, - removeAttr: function(name2) { - return this.each(function() { - jQuery12.removeAttr(this, name2); - }); - } - }); - jQuery12.extend({ - attr: function(elem, name2, value) { - var ret, hooks, nType = elem.nodeType; - if (nType === 3 || nType === 8 || nType === 2) { - return; - } - if (typeof elem.getAttribute === "undefined") { - return jQuery12.prop(elem, name2, value); - } - if (nType !== 1 || !jQuery12.isXMLDoc(elem)) { - hooks = jQuery12.attrHooks[name2.toLowerCase()] || (jQuery12.expr.match.bool.test(name2) ? boolHook : void 0); - } - if (value !== void 0) { - if (value === null) { - jQuery12.removeAttr(elem, name2); - return; - } - if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name2)) !== void 0) { - return ret; - } - elem.setAttribute(name2, value + ""); - return value; - } - if (hooks && "get" in hooks && (ret = hooks.get(elem, name2)) !== null) { - return ret; - } - ret = jQuery12.find.attr(elem, name2); - return ret == null ? void 0 : ret; - }, - attrHooks: { - type: { - set: function(elem, value) { - if (!support.radioValue && value === "radio" && nodeName(elem, "input")) { - var val = elem.value; - elem.setAttribute("type", value); - if (val) { - elem.value = val; - } - return value; - } - } - } - }, - removeAttr: function(elem, value) { - var name2, i = 0, attrNames = value && value.match(rnothtmlwhite); - if (attrNames && elem.nodeType === 1) { - while (name2 = attrNames[i++]) { - elem.removeAttribute(name2); - } - } - } - }); - boolHook = { - set: function(elem, value, name2) { - if (value === false) { - jQuery12.removeAttr(elem, name2); - } else { - elem.setAttribute(name2, name2); - } - return name2; - } - }; - jQuery12.each(jQuery12.expr.match.bool.source.match(/\w+/g), function(_i, name2) { - var getter = attrHandle[name2] || jQuery12.find.attr; - attrHandle[name2] = function(elem, name3, isXML) { - var ret, handle, lowercaseName = name3.toLowerCase(); - if (!isXML) { - handle = attrHandle[lowercaseName]; - attrHandle[lowercaseName] = ret; - ret = getter(elem, name3, isXML) != null ? lowercaseName : null; - attrHandle[lowercaseName] = handle; - } - return ret; - }; - }); - var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; - jQuery12.fn.extend({ - prop: function(name2, value) { - return access(this, jQuery12.prop, name2, value, arguments.length > 1); - }, - removeProp: function(name2) { - return this.each(function() { - delete this[jQuery12.propFix[name2] || name2]; - }); - } - }); - jQuery12.extend({ - prop: function(elem, name2, value) { - var ret, hooks, nType = elem.nodeType; - if (nType === 3 || nType === 8 || nType === 2) { - return; - } - if (nType !== 1 || !jQuery12.isXMLDoc(elem)) { - name2 = jQuery12.propFix[name2] || name2; - hooks = jQuery12.propHooks[name2]; - } - if (value !== void 0) { - if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name2)) !== void 0) { - return ret; - } - return elem[name2] = value; - } - if (hooks && "get" in hooks && (ret = hooks.get(elem, name2)) !== null) { - return ret; - } - return elem[name2]; - }, - propHooks: { - tabIndex: { - get: function(elem) { - var tabindex = jQuery12.find.attr(elem, "tabindex"); - if (tabindex) { - return parseInt(tabindex, 10); - } - if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) { - return 0; - } - return -1; - } - } - }, - propFix: { - "for": "htmlFor", - "class": "className" - } - }); - if (!support.optSelected) { - jQuery12.propHooks.selected = { - get: function(elem) { - var parent = elem.parentNode; - if (parent && parent.parentNode) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function(elem) { - var parent = elem.parentNode; - if (parent) { - parent.selectedIndex; - if (parent.parentNode) { - parent.parentNode.selectedIndex; - } - } - } - }; - } - jQuery12.each([ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" - ], function() { - jQuery12.propFix[this.toLowerCase()] = this; - }); - function stripAndCollapse(value) { - var tokens = value.match(rnothtmlwhite) || []; - return tokens.join(" "); - } - function getClass(elem) { - return elem.getAttribute && elem.getAttribute("class") || ""; - } - function classesToArray(value) { - if (Array.isArray(value)) { - return value; - } - if (typeof value === "string") { - return value.match(rnothtmlwhite) || []; - } - return []; - } - jQuery12.fn.extend({ - addClass: function(value) { - var classNames, cur, curValue, className, i, finalValue; - if (isFunction2(value)) { - return this.each(function(j) { - jQuery12(this).addClass(value.call(this, j, getClass(this))); - }); - } - classNames = classesToArray(value); - if (classNames.length) { - return this.each(function() { - curValue = getClass(this); - cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; - if (cur) { - for (i = 0; i < classNames.length; i++) { - className = classNames[i]; - if (cur.indexOf(" " + className + " ") < 0) { - cur += className + " "; - } - } - finalValue = stripAndCollapse(cur); - if (curValue !== finalValue) { - this.setAttribute("class", finalValue); - } - } - }); - } - return this; - }, - removeClass: function(value) { - var classNames, cur, curValue, className, i, finalValue; - if (isFunction2(value)) { - return this.each(function(j) { - jQuery12(this).removeClass(value.call(this, j, getClass(this))); - }); - } - if (!arguments.length) { - return this.attr("class", ""); - } - classNames = classesToArray(value); - if (classNames.length) { - return this.each(function() { - curValue = getClass(this); - cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " "; - if (cur) { - for (i = 0; i < classNames.length; i++) { - className = classNames[i]; - while (cur.indexOf(" " + className + " ") > -1) { - cur = cur.replace(" " + className + " ", " "); - } - } - finalValue = stripAndCollapse(cur); - if (curValue !== finalValue) { - this.setAttribute("class", finalValue); - } - } - }); - } - return this; - }, - toggleClass: function(value, stateVal) { - var classNames, className, i, self2, type = typeof value, isValidValue = type === "string" || Array.isArray(value); - if (isFunction2(value)) { - return this.each(function(i2) { - jQuery12(this).toggleClass( - value.call(this, i2, getClass(this), stateVal), - stateVal - ); - }); - } - if (typeof stateVal === "boolean" && isValidValue) { - return stateVal ? this.addClass(value) : this.removeClass(value); - } - classNames = classesToArray(value); - return this.each(function() { - if (isValidValue) { - self2 = jQuery12(this); - for (i = 0; i < classNames.length; i++) { - className = classNames[i]; - if (self2.hasClass(className)) { - self2.removeClass(className); - } else { - self2.addClass(className); - } - } - } else if (value === void 0 || type === "boolean") { - className = getClass(this); - if (className) { - dataPriv.set(this, "__className__", className); - } - if (this.setAttribute) { - this.setAttribute( - "class", - className || value === false ? "" : dataPriv.get(this, "__className__") || "" - ); - } - } - }); - }, - hasClass: function(selector) { - var className, elem, i = 0; - className = " " + selector + " "; - while (elem = this[i++]) { - if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) { - return true; - } - } - return false; - } - }); - var rreturn = /\r/g; - jQuery12.fn.extend({ - val: function(value) { - var hooks, ret, valueIsFunction, elem = this[0]; - if (!arguments.length) { - if (elem) { - hooks = jQuery12.valHooks[elem.type] || jQuery12.valHooks[elem.nodeName.toLowerCase()]; - if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) { - return ret; - } - ret = elem.value; - if (typeof ret === "string") { - return ret.replace(rreturn, ""); - } - return ret == null ? "" : ret; - } - return; - } - valueIsFunction = isFunction2(value); - return this.each(function(i) { - var val; - if (this.nodeType !== 1) { - return; - } - if (valueIsFunction) { - val = value.call(this, i, jQuery12(this).val()); - } else { - val = value; - } - if (val == null) { - val = ""; - } else if (typeof val === "number") { - val += ""; - } else if (Array.isArray(val)) { - val = jQuery12.map(val, function(value2) { - return value2 == null ? "" : value2 + ""; - }); - } - hooks = jQuery12.valHooks[this.type] || jQuery12.valHooks[this.nodeName.toLowerCase()]; - if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) { - this.value = val; - } - }); - } - }); - jQuery12.extend({ - valHooks: { - option: { - get: function(elem) { - var val = jQuery12.find.attr(elem, "value"); - return val != null ? val : ( - // Support: IE <=10 - 11 only - // option.text throws exceptions (trac-14686, trac-14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse(jQuery12.text(elem)) - ); - } - }, - select: { - get: function(elem) { - var value, option2, i, options = elem.options, index2 = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index2 + 1 : options.length; - if (index2 < 0) { - i = max; - } else { - i = one ? index2 : 0; - } - for (; i < max; i++) { - option2 = options[i]; - if ((option2.selected || i === index2) && // Don't return options that are disabled or in a disabled optgroup - !option2.disabled && (!option2.parentNode.disabled || !nodeName(option2.parentNode, "optgroup"))) { - value = jQuery12(option2).val(); - if (one) { - return value; - } - values.push(value); - } - } - return values; - }, - set: function(elem, value) { - var optionSet, option2, options = elem.options, values = jQuery12.makeArray(value), i = options.length; - while (i--) { - option2 = options[i]; - if (option2.selected = jQuery12.inArray(jQuery12.valHooks.option.get(option2), values) > -1) { - optionSet = true; - } - } - if (!optionSet) { - elem.selectedIndex = -1; - } - return values; - } - } - } - }); - jQuery12.each(["radio", "checkbox"], function() { - jQuery12.valHooks[this] = { - set: function(elem, value) { - if (Array.isArray(value)) { - return elem.checked = jQuery12.inArray(jQuery12(elem).val(), value) > -1; - } - } - }; - if (!support.checkOn) { - jQuery12.valHooks[this].get = function(elem) { - return elem.getAttribute("value") === null ? "on" : elem.value; - }; - } - }); - var location2 = window2.location; - var nonce2 = { guid: Date.now() }; - var rquery = /\?/; - jQuery12.parseXML = function(data) { - var xml, parserErrorElem; - if (!data || typeof data !== "string") { - return null; - } - try { - xml = new window2.DOMParser().parseFromString(data, "text/xml"); - } catch (e) { - } - parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0]; - if (!xml || parserErrorElem) { - jQuery12.error("Invalid XML: " + (parserErrorElem ? jQuery12.map(parserErrorElem.childNodes, function(el) { - return el.textContent; - }).join("\n") : data)); - } - return xml; - }; - var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) { - e.stopPropagation(); - }; - jQuery12.extend(jQuery12.event, { - trigger: function(event, data, elem, onlyHandlers) { - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document2], type = hasOwn.call(event, "type") ? event.type : event, namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : []; - cur = lastElement = tmp = elem = elem || document2; - if (elem.nodeType === 3 || elem.nodeType === 8) { - return; - } - if (rfocusMorph.test(type + jQuery12.event.triggered)) { - return; - } - if (type.indexOf(".") > -1) { - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - event = event[jQuery12.expando] ? event : new jQuery12.Event(type, typeof event === "object" && event); - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null; - event.result = void 0; - if (!event.target) { - event.target = elem; - } - data = data == null ? [event] : jQuery12.makeArray(data, [event]); - special = jQuery12.event.special[type] || {}; - if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) { - return; - } - if (!onlyHandlers && !special.noBubble && !isWindow(elem)) { - bubbleType = special.delegateType || type; - if (!rfocusMorph.test(bubbleType + type)) { - cur = cur.parentNode; - } - for (; cur; cur = cur.parentNode) { - eventPath.push(cur); - tmp = cur; - } - if (tmp === (elem.ownerDocument || document2)) { - eventPath.push(tmp.defaultView || tmp.parentWindow || window2); - } - } - i = 0; - while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { - lastElement = cur; - event.type = i > 1 ? bubbleType : special.bindType || type; - handle = (dataPriv.get(cur, "events") || /* @__PURE__ */ Object.create(null))[event.type] && dataPriv.get(cur, "handle"); - if (handle) { - handle.apply(cur, data); - } - handle = ontype && cur[ontype]; - if (handle && handle.apply && acceptData(cur)) { - event.result = handle.apply(cur, data); - if (event.result === false) { - event.preventDefault(); - } - } - } - event.type = type; - if (!onlyHandlers && !event.isDefaultPrevented()) { - if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) { - if (ontype && isFunction2(elem[type]) && !isWindow(elem)) { - tmp = elem[ontype]; - if (tmp) { - elem[ontype] = null; - } - jQuery12.event.triggered = type; - if (event.isPropagationStopped()) { - lastElement.addEventListener(type, stopPropagationCallback); - } - elem[type](); - if (event.isPropagationStopped()) { - lastElement.removeEventListener(type, stopPropagationCallback); - } - jQuery12.event.triggered = void 0; - if (tmp) { - elem[ontype] = tmp; - } - } - } - } - return event.result; - }, - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function(type, elem, event) { - var e = jQuery12.extend( - new jQuery12.Event(), - event, - { - type, - isSimulated: true - } - ); - jQuery12.event.trigger(e, null, elem); - } - }); - jQuery12.fn.extend({ - trigger: function(type, data) { - return this.each(function() { - jQuery12.event.trigger(type, data, this); - }); - }, - triggerHandler: function(type, data) { - var elem = this[0]; - if (elem) { - return jQuery12.event.trigger(type, data, elem, true); - } - } - }); - var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; - function buildParams(prefix, obj, traditional, add) { - var name2; - if (Array.isArray(obj)) { - jQuery12.each(obj, function(i, v) { - if (traditional || rbracket.test(prefix)) { - add(prefix, v); - } else { - buildParams( - prefix + "[" + (typeof v === "object" && v != null ? i : "") + "]", - v, - traditional, - add - ); - } - }); - } else if (!traditional && toType2(obj) === "object") { - for (name2 in obj) { - buildParams(prefix + "[" + name2 + "]", obj[name2], traditional, add); - } - } else { - add(prefix, obj); - } - } - jQuery12.param = function(a, traditional) { - var prefix, s = [], add = function(key, valueOrFunction) { - var value = isFunction2(valueOrFunction) ? valueOrFunction() : valueOrFunction; - s[s.length] = encodeURIComponent(key) + "=" + encodeURIComponent(value == null ? "" : value); - }; - if (a == null) { - return ""; - } - if (Array.isArray(a) || a.jquery && !jQuery12.isPlainObject(a)) { - jQuery12.each(a, function() { - add(this.name, this.value); - }); - } else { - for (prefix in a) { - buildParams(prefix, a[prefix], traditional, add); - } - } - return s.join("&"); - }; - jQuery12.fn.extend({ - serialize: function() { - return jQuery12.param(this.serializeArray()); - }, - serializeArray: function() { - return this.map(function() { - var elements = jQuery12.prop(this, "elements"); - return elements ? jQuery12.makeArray(elements) : this; - }).filter(function() { - var type = this.type; - return this.name && !jQuery12(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type)); - }).map(function(_i, elem) { - var val = jQuery12(this).val(); - if (val == null) { - return null; - } - if (Array.isArray(val)) { - return jQuery12.map(val, function(val2) { - return { name: elem.name, value: val2.replace(rCRLF, "\r\n") }; - }); - } - return { name: elem.name, value: val.replace(rCRLF, "\r\n") }; - }).get(); - } - }); - var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, prefilters = {}, transports = {}, allTypes = "*/".concat("*"), originAnchor = document2.createElement("a"); - originAnchor.href = location2.href; - function addToPrefiltersOrTransports(structure) { - return function(dataTypeExpression, func) { - if (typeof dataTypeExpression !== "string") { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || []; - if (isFunction2(func)) { - while (dataType = dataTypes[i++]) { - if (dataType[0] === "+") { - dataType = dataType.slice(1) || "*"; - (structure[dataType] = structure[dataType] || []).unshift(func); - } else { - (structure[dataType] = structure[dataType] || []).push(func); - } - } - } - }; - } - function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) { - var inspected = {}, seekingTransport = structure === transports; - function inspect(dataType) { - var selected; - inspected[dataType] = true; - jQuery12.each(structure[dataType] || [], function(_, prefilterOrFactory) { - var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR); - if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) { - options.dataTypes.unshift(dataTypeOrTransport); - inspect(dataTypeOrTransport); - return false; - } else if (seekingTransport) { - return !(selected = dataTypeOrTransport); - } - }); - return selected; - } - return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*"); - } - function ajaxExtend(target, src) { - var key, deep, flatOptions = jQuery12.ajaxSettings.flatOptions || {}; - for (key in src) { - if (src[key] !== void 0) { - (flatOptions[key] ? target : deep || (deep = {}))[key] = src[key]; - } - } - if (deep) { - jQuery12.extend(true, target, deep); - } - return target; - } - function ajaxHandleResponses(s, jqXHR, responses) { - var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; - while (dataTypes[0] === "*") { - dataTypes.shift(); - if (ct === void 0) { - ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); - } - } - if (ct) { - for (type in contents) { - if (contents[type] && contents[type].test(ct)) { - dataTypes.unshift(type); - break; - } - } - } - if (dataTypes[0] in responses) { - finalDataType = dataTypes[0]; - } else { - for (type in responses) { - if (!dataTypes[0] || s.converters[type + " " + dataTypes[0]]) { - finalDataType = type; - break; - } - if (!firstDataType) { - firstDataType = type; - } - } - finalDataType = finalDataType || firstDataType; - } - if (finalDataType) { - if (finalDataType !== dataTypes[0]) { - dataTypes.unshift(finalDataType); - } - return responses[finalDataType]; - } - } - function ajaxConvert(s, response, jqXHR, isSuccess) { - var conv2, current, conv, tmp, prev, converters = {}, dataTypes = s.dataTypes.slice(); - if (dataTypes[1]) { - for (conv in s.converters) { - converters[conv.toLowerCase()] = s.converters[conv]; - } - } - current = dataTypes.shift(); - while (current) { - if (s.responseFields[current]) { - jqXHR[s.responseFields[current]] = response; - } - if (!prev && isSuccess && s.dataFilter) { - response = s.dataFilter(response, s.dataType); - } - prev = current; - current = dataTypes.shift(); - if (current) { - if (current === "*") { - current = prev; - } else if (prev !== "*" && prev !== current) { - conv = converters[prev + " " + current] || converters["* " + current]; - if (!conv) { - for (conv2 in converters) { - tmp = conv2.split(" "); - if (tmp[1] === current) { - conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]]; - if (conv) { - if (conv === true) { - conv = converters[conv2]; - } else if (converters[conv2] !== true) { - current = tmp[0]; - dataTypes.unshift(tmp[1]); - } - break; - } - } - } - } - if (conv !== true) { - if (conv && s.throws) { - response = conv(response); - } else { - try { - response = conv(response); - } catch (e) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - return { state: "success", data: response }; - } - jQuery12.extend({ - // Counter for holding the number of active queries - active: 0, - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - ajaxSettings: { - url: location2.href, - type: "GET", - isLocal: rlocalProtocol.test(location2.protocol), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - accepts: { - "*": allTypes, - 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" - }, - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - // Convert anything to text - "* text": String, - // Text to html (true = no transformation) - "text html": true, - // Evaluate text as a json expression - "text json": JSON.parse, - // Parse text as xml - "text xml": jQuery12.parseXML - }, - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function(target, settings) { - return settings ? ( - // Building a settings object - ajaxExtend(ajaxExtend(target, jQuery12.ajaxSettings), settings) - ) : ( - // Extending ajaxSettings - ajaxExtend(jQuery12.ajaxSettings, target) - ); - }, - ajaxPrefilter: addToPrefiltersOrTransports(prefilters), - ajaxTransport: addToPrefiltersOrTransports(transports), - // Main method - ajax: function(url, options) { - if (typeof url === "object") { - options = url; - url = void 0; - } - options = options || {}; - var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed2, fireGlobals, i, uncached, s = jQuery12.ajaxSetup({}, options), callbackContext = s.context || s, globalEventContext = s.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery12(callbackContext) : jQuery12.event, deferred = jQuery12.Deferred(), completeDeferred = jQuery12.Callbacks("once memory"), statusCode = s.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = { - readyState: 0, - // Builds headers hashtable if needed - getResponseHeader: function(key) { - var match; - if (completed2) { - if (!responseHeaders) { - responseHeaders = {}; - while (match = rheaders.exec(responseHeadersString)) { - responseHeaders[match[1].toLowerCase() + " "] = (responseHeaders[match[1].toLowerCase() + " "] || []).concat(match[2]); - } - } - match = responseHeaders[key.toLowerCase() + " "]; - } - return match == null ? null : match.join(", "); - }, - // Raw string - getAllResponseHeaders: function() { - return completed2 ? responseHeadersString : null; - }, - // Caches the header - setRequestHeader: function(name2, value) { - if (completed2 == null) { - name2 = requestHeadersNames[name2.toLowerCase()] = requestHeadersNames[name2.toLowerCase()] || name2; - requestHeaders[name2] = value; - } - return this; - }, - // Overrides response content-type header - overrideMimeType: function(type) { - if (completed2 == null) { - s.mimeType = type; - } - return this; - }, - // Status-dependent callbacks - statusCode: function(map) { - var code; - if (map) { - if (completed2) { - jqXHR.always(map[jqXHR.status]); - } else { - for (code in map) { - statusCode[code] = [statusCode[code], map[code]]; - } - } - } - return this; - }, - // Cancel the request - abort: function(statusText) { - var finalText = statusText || strAbort; - if (transport) { - transport.abort(finalText); - } - done(0, finalText); - return this; - } - }; - deferred.promise(jqXHR); - s.url = ((url || s.url || location2.href) + "").replace(rprotocol, location2.protocol + "//"); - s.type = options.method || options.type || s.method || s.type; - s.dataTypes = (s.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""]; - if (s.crossDomain == null) { - urlAnchor = document2.createElement("a"); - try { - urlAnchor.href = s.url; - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; - } catch (e) { - s.crossDomain = true; - } - } - if (s.data && s.processData && typeof s.data !== "string") { - s.data = jQuery12.param(s.data, s.traditional); - } - inspectPrefiltersOrTransports(prefilters, s, options, jqXHR); - if (completed2) { - return jqXHR; - } - fireGlobals = jQuery12.event && s.global; - if (fireGlobals && jQuery12.active++ === 0) { - jQuery12.event.trigger("ajaxStart"); - } - s.type = s.type.toUpperCase(); - s.hasContent = !rnoContent.test(s.type); - cacheURL = s.url.replace(rhash, ""); - if (!s.hasContent) { - uncached = s.url.slice(cacheURL.length); - if (s.data && (s.processData || typeof s.data === "string")) { - cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s.data; - delete s.data; - } - if (s.cache === false) { - cacheURL = cacheURL.replace(rantiCache, "$1"); - uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce2.guid++ + uncached; - } - s.url = cacheURL + uncached; - } else if (s.data && s.processData && (s.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) { - s.data = s.data.replace(r20, "+"); - } - if (s.ifModified) { - if (jQuery12.lastModified[cacheURL]) { - jqXHR.setRequestHeader("If-Modified-Since", jQuery12.lastModified[cacheURL]); - } - if (jQuery12.etag[cacheURL]) { - jqXHR.setRequestHeader("If-None-Match", jQuery12.etag[cacheURL]); - } - } - if (s.data && s.hasContent && s.contentType !== false || options.contentType) { - jqXHR.setRequestHeader("Content-Type", s.contentType); - } - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[0] && s.accepts[s.dataTypes[0]] ? s.accepts[s.dataTypes[0]] + (s.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s.accepts["*"] - ); - for (i in s.headers) { - jqXHR.setRequestHeader(i, s.headers[i]); - } - if (s.beforeSend && (s.beforeSend.call(callbackContext, jqXHR, s) === false || completed2)) { - return jqXHR.abort(); - } - strAbort = "abort"; - completeDeferred.add(s.complete); - jqXHR.done(s.success); - jqXHR.fail(s.error); - transport = inspectPrefiltersOrTransports(transports, s, options, jqXHR); - if (!transport) { - done(-1, "No Transport"); - } else { - jqXHR.readyState = 1; - if (fireGlobals) { - globalEventContext.trigger("ajaxSend", [jqXHR, s]); - } - if (completed2) { - return jqXHR; - } - if (s.async && s.timeout > 0) { - timeoutTimer = window2.setTimeout(function() { - jqXHR.abort("timeout"); - }, s.timeout); - } - try { - completed2 = false; - transport.send(requestHeaders, done); - } catch (e) { - if (completed2) { - throw e; - } - done(-1, e); - } - } - function done(status, nativeStatusText, responses, headers) { - var isSuccess, success, error, response, modified, statusText = nativeStatusText; - if (completed2) { - return; - } - completed2 = true; - if (timeoutTimer) { - window2.clearTimeout(timeoutTimer); - } - transport = void 0; - responseHeadersString = headers || ""; - jqXHR.readyState = status > 0 ? 4 : 0; - isSuccess = status >= 200 && status < 300 || status === 304; - if (responses) { - response = ajaxHandleResponses(s, jqXHR, responses); - } - if (!isSuccess && jQuery12.inArray("script", s.dataTypes) > -1 && jQuery12.inArray("json", s.dataTypes) < 0) { - s.converters["text script"] = function() { - }; - } - response = ajaxConvert(s, response, jqXHR, isSuccess); - if (isSuccess) { - if (s.ifModified) { - modified = jqXHR.getResponseHeader("Last-Modified"); - if (modified) { - jQuery12.lastModified[cacheURL] = modified; - } - modified = jqXHR.getResponseHeader("etag"); - if (modified) { - jQuery12.etag[cacheURL] = modified; - } - } - if (status === 204 || s.type === "HEAD") { - statusText = "nocontent"; - } else if (status === 304) { - statusText = "notmodified"; - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - error = statusText; - if (status || !statusText) { - statusText = "error"; - if (status < 0) { - status = 0; - } - } - } - jqXHR.status = status; - jqXHR.statusText = (nativeStatusText || statusText) + ""; - if (isSuccess) { - deferred.resolveWith(callbackContext, [success, statusText, jqXHR]); - } else { - deferred.rejectWith(callbackContext, [jqXHR, statusText, error]); - } - jqXHR.statusCode(statusCode); - statusCode = void 0; - if (fireGlobals) { - globalEventContext.trigger( - isSuccess ? "ajaxSuccess" : "ajaxError", - [jqXHR, s, isSuccess ? success : error] - ); - } - completeDeferred.fireWith(callbackContext, [jqXHR, statusText]); - if (fireGlobals) { - globalEventContext.trigger("ajaxComplete", [jqXHR, s]); - if (!--jQuery12.active) { - jQuery12.event.trigger("ajaxStop"); - } - } - } - return jqXHR; - }, - getJSON: function(url, data, callback) { - return jQuery12.get(url, data, callback, "json"); - }, - getScript: function(url, callback) { - return jQuery12.get(url, void 0, callback, "script"); - } - }); - jQuery12.each(["get", "post"], function(_i, method) { - jQuery12[method] = function(url, data, callback, type) { - if (isFunction2(data)) { - type = type || callback; - callback = data; - data = void 0; - } - return jQuery12.ajax(jQuery12.extend({ - url, - type: method, - dataType: type, - data, - success: callback - }, jQuery12.isPlainObject(url) && url)); - }; - }); - jQuery12.ajaxPrefilter(function(s) { - var i; - for (i in s.headers) { - if (i.toLowerCase() === "content-type") { - s.contentType = s.headers[i] || ""; - } - } - }); - jQuery12._evalUrl = function(url, options, doc) { - return jQuery12.ajax({ - url, - // Make this explicit, since user can override this through ajaxSetup (trac-11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() { - } - }, - dataFilter: function(response) { - jQuery12.globalEval(response, options, doc); - } - }); - }; - jQuery12.fn.extend({ - wrapAll: function(html) { - var wrap; - if (this[0]) { - if (isFunction2(html)) { - html = html.call(this[0]); - } - wrap = jQuery12(html, this[0].ownerDocument).eq(0).clone(true); - if (this[0].parentNode) { - wrap.insertBefore(this[0]); - } - wrap.map(function() { - var elem = this; - while (elem.firstElementChild) { - elem = elem.firstElementChild; - } - return elem; - }).append(this); - } - return this; - }, - wrapInner: function(html) { - if (isFunction2(html)) { - return this.each(function(i) { - jQuery12(this).wrapInner(html.call(this, i)); - }); - } - return this.each(function() { - var self2 = jQuery12(this), contents = self2.contents(); - if (contents.length) { - contents.wrapAll(html); - } else { - self2.append(html); - } - }); - }, - wrap: function(html) { - var htmlIsFunction = isFunction2(html); - return this.each(function(i) { - jQuery12(this).wrapAll(htmlIsFunction ? html.call(this, i) : html); - }); - }, - unwrap: function(selector) { - this.parent(selector).not("body").each(function() { - jQuery12(this).replaceWith(this.childNodes); - }); - return this; - } - }); - jQuery12.expr.pseudos.hidden = function(elem) { - return !jQuery12.expr.pseudos.visible(elem); - }; - jQuery12.expr.pseudos.visible = function(elem) { - return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length); - }; - jQuery12.ajaxSettings.xhr = function() { - try { - return new window2.XMLHttpRequest(); - } catch (e) { - } - }; - var xhrSuccessStatus = { - // File protocol always yields status code 0, assume 200 - 0: 200, - // Support: IE <=9 only - // trac-1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, xhrSupported = jQuery12.ajaxSettings.xhr(); - support.cors = !!xhrSupported && "withCredentials" in xhrSupported; - support.ajax = xhrSupported = !!xhrSupported; - jQuery12.ajaxTransport(function(options) { - var callback, errorCallback; - if (support.cors || xhrSupported && !options.crossDomain) { - return { - send: function(headers, complete) { - var i, xhr = options.xhr(); - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - if (options.xhrFields) { - for (i in options.xhrFields) { - xhr[i] = options.xhrFields[i]; - } - } - if (options.mimeType && xhr.overrideMimeType) { - xhr.overrideMimeType(options.mimeType); - } - if (!options.crossDomain && !headers["X-Requested-With"]) { - headers["X-Requested-With"] = "XMLHttpRequest"; - } - for (i in headers) { - xhr.setRequestHeader(i, headers[i]); - } - callback = function(type) { - return function() { - if (callback) { - callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null; - if (type === "abort") { - xhr.abort(); - } else if (type === "error") { - if (typeof xhr.status !== "number") { - complete(0, "error"); - } else { - complete( - // File: protocol always yields status 0; see trac-8605, trac-14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[xhr.status] || xhr.status, - xhr.statusText, - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - (xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback("error"); - if (xhr.onabort !== void 0) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - if (xhr.readyState === 4) { - window2.setTimeout(function() { - if (callback) { - errorCallback(); - } - }); - } - }; - } - callback = callback("abort"); - try { - xhr.send(options.hasContent && options.data || null); - } catch (e) { - if (callback) { - throw e; - } - } - }, - abort: function() { - if (callback) { - callback(); - } - } - }; - } - }); - jQuery12.ajaxPrefilter(function(s) { - if (s.crossDomain) { - s.contents.script = false; - } - }); - jQuery12.ajaxSetup({ - accepts: { - script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function(text) { - jQuery12.globalEval(text); - return text; - } - } - }); - jQuery12.ajaxPrefilter("script", function(s) { - if (s.cache === void 0) { - s.cache = false; - } - if (s.crossDomain) { - s.type = "GET"; - } - }); - jQuery12.ajaxTransport("script", function(s) { - if (s.crossDomain || s.scriptAttrs) { - var script, callback; - return { - send: function(_, complete) { - script = jQuery12("\n\t*/\n\tvar dispatches = [\n\t\t/**\n\t\tDispatched when runtime is connected and file-picker is ready to be used.\n\n\t\t@event ready\n\t\t@param {Object} event\n\t\t*/\n\t\t'ready',\n\n\t\t/**\n\t\tDispatched right after [ready](#event_ready) event, and whenever [refresh()](#method_refresh) is invoked.\n\t\tCheck [corresponding documentation entry](#method_refresh) for more info.\n\n\t\t@event refresh\n\t\t@param {Object} event\n\t\t*/\n\n\t\t/**\n\t\tDispatched when selection of files in the dialog is complete.\n\n\t\t@event change\n\t\t@param {Object} event\n\t\t*/\n\t\t'change',\n\n\t\t'cancel', // TODO: might be useful\n\n\t\t/**\n\t\tDispatched when mouse cursor enters file-picker area. Can be used to style element\n\t\taccordingly.\n\n\t\t@event mouseenter\n\t\t@param {Object} event\n\t\t*/\n\t\t'mouseenter',\n\n\t\t/**\n\t\tDispatched when mouse cursor leaves file-picker area. Can be used to style element\n\t\taccordingly.\n\n\t\t@event mouseleave\n\t\t@param {Object} event\n\t\t*/\n\t\t'mouseleave',\n\n\t\t/**\n\t\tDispatched when functional mouse button is pressed on top of file-picker area.\n\n\t\t@event mousedown\n\t\t@param {Object} event\n\t\t*/\n\t\t'mousedown',\n\n\t\t/**\n\t\tDispatched when functional mouse button is released on top of file-picker area.\n\n\t\t@event mouseup\n\t\t@param {Object} event\n\t\t*/\n\t\t'mouseup'\n\t];\n\n\tfunction FileInput(options) {\n\t\tif (MXI_DEBUG) {\n\t\t\tEnv.log(\"Instantiating FileInput...\");\n\t\t}\n\n\t\tvar container, browseButton, defaults;\n\n\t\t// if flat argument passed it should be browse_button id\n\t\tif (Basic.inArray(Basic.typeOf(options), ['string', 'node']) !== -1) {\n\t\t\toptions = { browse_button : options };\n\t\t}\n\n\t\t// this will help us to find proper default container\n\t\tbrowseButton = Dom.get(options.browse_button);\n\t\tif (!browseButton) {\n\t\t\t// browse button is required\n\t\t\tthrow new x.DOMException(x.DOMException.NOT_FOUND_ERR);\n\t\t}\n\n\t\t// figure out the options\n\t\tdefaults = {\n\t\t\taccept: [{\n\t\t\t\ttitle: I18n.translate('All Files'),\n\t\t\t\textensions: '*'\n\t\t\t}],\n\t\t\tmultiple: false,\n\t\t\trequired_caps: false,\n\t\t\tcontainer: browseButton.parentNode || document.body\n\t\t};\n\n\t\toptions = Basic.extend({}, defaults, options);\n\n\t\t// convert to object representation\n\t\tif (typeof(options.required_caps) === 'string') {\n\t\t\toptions.required_caps = Runtime.parseCaps(options.required_caps);\n\t\t}\n\n\t\t// normalize accept option (could be list of mime types or array of title/extensions pairs)\n\t\tif (typeof(options.accept) === 'string') {\n\t\t\toptions.accept = Mime.mimes2extList(options.accept);\n\t\t}\n\n\t\tcontainer = Dom.get(options.container);\n\t\t// make sure we have container\n\t\tif (!container) {\n\t\t\tcontainer = document.body;\n\t\t}\n\n\t\t// make container relative, if it's not\n\t\tif (Dom.getStyle(container, 'position') === 'static') {\n\t\t\tcontainer.style.position = 'relative';\n\t\t}\n\n\t\tcontainer = browseButton = null; // IE\n\n\t\tRuntimeClient.call(this);\n\n\t\tBasic.extend(this, {\n\t\t\t/**\n\t\t\tUnique id of the component\n\n\t\t\t@property uid\n\t\t\t@protected\n\t\t\t@readOnly\n\t\t\t@type {String}\n\t\t\t@default UID\n\t\t\t*/\n\t\t\tuid: Basic.guid('uid_'),\n\n\t\t\t/**\n\t\t\tUnique id of the connected runtime, if any.\n\n\t\t\t@property ruid\n\t\t\t@protected\n\t\t\t@type {String}\n\t\t\t*/\n\t\t\truid: null,\n\n\t\t\t/**\n\t\t\tUnique id of the runtime container. Useful to get hold of it for various manipulations.\n\n\t\t\t@property shimid\n\t\t\t@protected\n\t\t\t@type {String}\n\t\t\t*/\n\t\t\tshimid: null,\n\n\t\t\t/**\n\t\t\tArray of selected moxie.file.File objects\n\n\t\t\t@property files\n\t\t\t@type {Array}\n\t\t\t@default null\n\t\t\t*/\n\t\t\tfiles: null,\n\n\t\t\t/**\n\t\t\tInitializes the file-picker, connects it to runtime and dispatches event ready when done.\n\n\t\t\t@method init\n\t\t\t*/\n\t\t\tinit: function() {\n\t\t\t\tvar self = this;\n\n\t\t\t\tself.bind('RuntimeInit', function(e, runtime) {\n\t\t\t\t\tself.ruid = runtime.uid;\n\t\t\t\t\tself.shimid = runtime.shimid;\n\n\t\t\t\t\tself.bind(\"Ready\", function() {\n\t\t\t\t\t\tself.trigger(\"Refresh\");\n\t\t\t\t\t}, 999);\n\n\t\t\t\t\t// re-position and resize shim container\n\t\t\t\t\tself.bind('Refresh', function() {\n\t\t\t\t\t\tvar pos, size, browseButton, shimContainer, zIndex;\n\n\t\t\t\t\t\tbrowseButton = Dom.get(options.browse_button);\n\t\t\t\t\t\tshimContainer = Dom.get(runtime.shimid); // do not use runtime.getShimContainer(), since it will create container if it doesn't exist\n\n\t\t\t\t\t\tif (browseButton) {\n\t\t\t\t\t\t\tpos = Dom.getPos(browseButton, Dom.get(options.container));\n\t\t\t\t\t\t\tsize = Dom.getSize(browseButton);\n\t\t\t\t\t\t\tzIndex = parseInt(Dom.getStyle(browseButton, 'z-index'), 10) || 0;\n\n\t\t\t\t\t\t\tif (shimContainer) {\n\t\t\t\t\t\t\t\tBasic.extend(shimContainer.style, {\n\t\t\t\t\t\t\t\t\ttop: pos.y + 'px',\n\t\t\t\t\t\t\t\t\tleft: pos.x + 'px',\n\t\t\t\t\t\t\t\t\twidth: size.w + 'px',\n\t\t\t\t\t\t\t\t\theight: size.h + 'px',\n\t\t\t\t\t\t\t\t\tzIndex: zIndex + 1\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\tshimContainer = browseButton = null;\n\t\t\t\t\t});\n\n\t\t\t\t\truntime.exec.call(self, 'FileInput', 'init', options);\n\t\t\t\t});\n\n\t\t\t\t// runtime needs: options.required_features, options.runtime_order and options.container\n\t\t\t\tself.connectRuntime(Basic.extend({}, options, {\n\t\t\t\t\trequired_caps: {\n\t\t\t\t\t\tselect_file: true\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t},\n\n\n\t\t\t/**\n\t\t\t * Get current option value by its name\n\t\t\t *\n\t\t\t * @method getOption\n\t\t\t * @param name\n\t\t\t * @return {Mixed}\n\t\t\t */\n\t\t\tgetOption: function(name) {\n\t\t\t\treturn options[name];\n\t\t\t},\n\n\n\t\t\t/**\n\t\t\t * Sets a new value for the option specified by name\n\t\t\t *\n\t\t\t * @method setOption\n\t\t\t * @param name\n\t\t\t * @param value\n\t\t\t */\n\t\t\tsetOption: function(name, value) {\n\t\t\t\tif (!options.hasOwnProperty(name)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar oldValue = options[name];\n\n\t\t\t\tswitch (name) {\n\t\t\t\t\tcase 'accept':\n\t\t\t\t\t\tif (typeof(value) === 'string') {\n\t\t\t\t\t\t\tvalue = Mime.mimes2extList(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'container':\n\t\t\t\t\tcase 'required_caps':\n\t\t\t\t\t\tthrow new x.FileException(x.FileException.NO_MODIFICATION_ALLOWED_ERR);\n\t\t\t\t}\n\n\t\t\t\toptions[name] = value;\n\t\t\t\tthis.exec('FileInput', 'setOption', name, value);\n\n\t\t\t\tthis.trigger('OptionChanged', name, value, oldValue);\n\t\t\t},\n\n\t\t\t/**\n\t\t\tDisables file-picker element, so that it doesn't react to mouse clicks.\n\n\t\t\t@method disable\n\t\t\t@param {Boolean} [state=true] Disable component if - true, enable if - false\n\t\t\t*/\n\t\t\tdisable: function(state) {\n\t\t\t\tvar runtime = this.getRuntime();\n\t\t\t\tif (runtime) {\n\t\t\t\t\tthis.exec('FileInput', 'disable', Basic.typeOf(state) === 'undefined' ? true : state);\n\t\t\t\t}\n\t\t\t},\n\n\n\t\t\t/**\n\t\t\tReposition and resize dialog trigger to match the position and size of browse_button element.\n\n\t\t\t@method refresh\n\t\t\t*/\n\t\t\trefresh: function() {\n\t\t\t\tthis.trigger(\"Refresh\");\n\t\t\t},\n\n\n\t\t\t/**\n\t\t\tDestroy component.\n\n\t\t\t@method destroy\n\t\t\t*/\n\t\t\tdestroy: function() {\n\t\t\t\tvar runtime = this.getRuntime();\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.exec.call(this, 'FileInput', 'destroy');\n\t\t\t\t\tthis.disconnectRuntime();\n\t\t\t\t}\n\n\t\t\t\tif (Basic.typeOf(this.files) === 'array') {\n\t\t\t\t\t// no sense in leaving associated files behind\n\t\t\t\t\tBasic.each(this.files, function(file) {\n\t\t\t\t\t\tfile.destroy();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tthis.files = null;\n\n\t\t\t\tthis.unbindAll();\n\t\t\t}\n\t\t});\n\n\t\tthis.handleEventProps(dispatches);\n\t}\n\n\tFileInput.prototype = EventTarget.instance;\n\n\treturn FileInput;\n});\n\n// Included from: src/javascript/file/File.js\n\n/**\n * File.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine('moxie/file/File', [\n\t'moxie/core/utils/Basic',\n\t'moxie/core/utils/Mime',\n\t'moxie/file/Blob'\n], function(Basic, Mime, Blob) {\n\t/**\n\t@class moxie/file/File\n\t@extends Blob\n\t@constructor\n\t@param {String} ruid Unique id of the runtime, to which this blob belongs to\n\t@param {Object} file Object \"Native\" file object, as it is represented in the runtime\n\t*/\n\tfunction File(ruid, file) {\n\t\tif (!file) { // avoid extra errors in case we overlooked something\n\t\t\tfile = {};\n\t\t}\n\n\t\tBlob.apply(this, arguments);\n\n\t\tif (!this.type) {\n\t\t\tthis.type = Mime.getFileMime(file.name);\n\t\t}\n\n\t\t// sanitize file name or generate new one\n\t\tvar name;\n\t\tif (file.name) {\n\t\t\tname = file.name.replace(/\\\\/g, '/');\n\t\t\tname = name.substr(name.lastIndexOf('/') + 1);\n\t\t} else if (this.type) {\n\t\t\tvar prefix = this.type.split('/')[0];\n\t\t\tname = Basic.guid((prefix !== '' ? prefix : 'file') + '_');\n\t\t\t\n\t\t\tif (Mime.extensions[this.type]) {\n\t\t\t\tname += '.' + Mime.extensions[this.type][0]; // append proper extension if possible\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tBasic.extend(this, {\n\t\t\t/**\n\t\t\tFile name\n\n\t\t\t@property name\n\t\t\t@type {String}\n\t\t\t@default UID\n\t\t\t*/\n\t\t\tname: name || Basic.guid('file_'),\n\n\t\t\t/**\n\t\t\tRelative path to the file inside a directory\n\n\t\t\t@property relativePath\n\t\t\t@type {String}\n\t\t\t@default ''\n\t\t\t*/\n\t\t\trelativePath: '',\n\t\t\t\n\t\t\t/**\n\t\t\tDate of last modification\n\n\t\t\t@property lastModifiedDate\n\t\t\t@type {String}\n\t\t\t@default now\n\t\t\t*/\n\t\t\tlastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString() // Thu Aug 23 2012 19:40:00 GMT+0400 (GET)\n\t\t});\n\t}\n\n\tFile.prototype = Blob.prototype;\n\n\treturn File;\n});\n\n// Included from: src/javascript/file/FileDrop.js\n\n/**\n * FileDrop.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine('moxie/file/FileDrop', [\n\t'moxie/core/I18n',\n\t'moxie/core/utils/Dom',\n\t'moxie/core/Exceptions',\n\t'moxie/core/utils/Basic',\n\t'moxie/core/utils/Env',\n\t'moxie/file/File',\n\t'moxie/runtime/RuntimeClient',\n\t'moxie/core/EventTarget',\n\t'moxie/core/utils/Mime'\n], function(I18n, Dom, x, Basic, Env, File, RuntimeClient, EventTarget, Mime) {\n\t/**\n\tTurn arbitrary DOM element to a drop zone accepting files. Converts selected files to _File_ objects, to be used \n\tin conjunction with _Image_, preloaded in memory with _FileReader_ or uploaded to a server through \n\t_XMLHttpRequest_.\n\n\t@example\n\t\t
\n\t\t\tDrop files here\n\t\t
\n\t\t
\n\t\t
\n\n\t\t\n\n\t@class moxie/file/FileDrop\n\t@constructor\n\t@extends EventTarget\n\t@uses RuntimeClient\n\t@param {Object|String} options If options has typeof string, argument is considered as options.drop_zone\n\t\t@param {String|DOMElement} options.drop_zone DOM Element to turn into a drop zone\n\t\t@param {Array} [options.accept] Array of mime types to accept. By default accepts all\n\t\t@param {Object|String} [options.required_caps] Set of required capabilities, that chosen runtime must support\n\t*/\n\tvar dispatches = [\n\t\t/**\n\t\tDispatched when runtime is connected and drop zone is ready to accept files.\n\n\t\t@event ready\n\t\t@param {Object} event\n\t\t*/\n\t\t'ready', \n\n\t\t/**\n\t\tDispatched when dragging cursor enters the drop zone.\n\n\t\t@event dragenter\n\t\t@param {Object} event\n\t\t*/\n\t\t'dragenter',\n\n\t\t/**\n\t\tDispatched when dragging cursor leaves the drop zone.\n\n\t\t@event dragleave\n\t\t@param {Object} event\n\t\t*/\n\t\t'dragleave', \n\n\t\t/**\n\t\tDispatched when file is dropped onto the drop zone.\n\n\t\t@event drop\n\t\t@param {Object} event\n\t\t*/\n\t\t'drop', \n\n\t\t/**\n\t\tDispatched if error occurs.\n\n\t\t@event error\n\t\t@param {Object} event\n\t\t*/\n\t\t'error'\n\t];\n\n\tfunction FileDrop(options) {\n\t\tif (MXI_DEBUG) {\n\t\t\tEnv.log(\"Instantiating FileDrop...\");\t\n\t\t}\n\n\t\tvar self = this, defaults;\n\n\t\t// if flat argument passed it should be drop_zone id\n\t\tif (typeof(options) === 'string') {\n\t\t\toptions = { drop_zone : options };\n\t\t}\n\n\t\t// figure out the options\n\t\tdefaults = {\n\t\t\taccept: [{\n\t\t\t\ttitle: I18n.translate('All Files'),\n\t\t\t\textensions: '*'\n\t\t\t}],\n\t\t\trequired_caps: {\n\t\t\t\tdrag_and_drop: true\n\t\t\t}\n\t\t};\n\t\t\n\t\toptions = typeof(options) === 'object' ? Basic.extend({}, defaults, options) : defaults;\n\n\t\t// this will help us to find proper default container\n\t\toptions.container = Dom.get(options.drop_zone) || document.body;\n\n\t\t// make container relative, if it is not\n\t\tif (Dom.getStyle(options.container, 'position') === 'static') {\n\t\t\toptions.container.style.position = 'relative';\n\t\t}\n\t\t\t\t\t\n\t\t// normalize accept option (could be list of mime types or array of title/extensions pairs)\n\t\tif (typeof(options.accept) === 'string') {\n\t\t\toptions.accept = Mime.mimes2extList(options.accept);\n\t\t}\n\n\t\tRuntimeClient.call(self);\n\n\t\tBasic.extend(self, {\n\t\t\tuid: Basic.guid('uid_'),\n\n\t\t\truid: null,\n\n\t\t\tfiles: null,\n\n\t\t\tinit: function() {\t\t\n\t\t\t\tself.bind('RuntimeInit', function(e, runtime) {\n\t\t\t\t\tself.ruid = runtime.uid;\n\t\t\t\t\truntime.exec.call(self, 'FileDrop', 'init', options);\n\t\t\t\t\tself.dispatchEvent('ready');\n\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t// runtime needs: options.required_features, options.runtime_order and options.container\n\t\t\t\tself.connectRuntime(options); // throws RuntimeError\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tvar runtime = this.getRuntime();\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.exec.call(this, 'FileDrop', 'destroy');\n\t\t\t\t\tthis.disconnectRuntime();\n\t\t\t\t}\n\t\t\t\tthis.files = null;\n\t\t\t\t\n\t\t\t\tthis.unbindAll();\n\t\t\t}\n\t\t});\n\n\t\tthis.handleEventProps(dispatches);\n\t}\n\n\tFileDrop.prototype = EventTarget.instance;\n\n\treturn FileDrop;\n});\n\n// Included from: src/javascript/file/FileReader.js\n\n/**\n * FileReader.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine('moxie/file/FileReader', [\n\t'moxie/core/utils/Basic',\n\t'moxie/core/utils/Encode',\n\t'moxie/core/Exceptions',\n\t'moxie/core/EventTarget',\n\t'moxie/file/Blob',\n\t'moxie/runtime/RuntimeClient'\n], function(Basic, Encode, x, EventTarget, Blob, RuntimeClient) {\n\t/**\n\tUtility for preloading o.Blob/o.File objects in memory. By design closely follows [W3C FileReader](http://www.w3.org/TR/FileAPI/#dfn-filereader)\n\tinterface. Where possible uses native FileReader, where - not falls back to shims.\n\n\t@class moxie/file/FileReader\n\t@constructor FileReader\n\t@extends EventTarget\n\t@uses RuntimeClient\n\t*/\n\tvar dispatches = [\n\n\t\t/** \n\t\tDispatched when the read starts.\n\n\t\t@event loadstart\n\t\t@param {Object} event\n\t\t*/\n\t\t'loadstart', \n\n\t\t/** \n\t\tDispatched while reading (and decoding) blob, and reporting partial Blob data (progess.loaded/progress.total).\n\n\t\t@event progress\n\t\t@param {Object} event\n\t\t*/\n\t\t'progress', \n\n\t\t/** \n\t\tDispatched when the read has successfully completed.\n\n\t\t@event load\n\t\t@param {Object} event\n\t\t*/\n\t\t'load', \n\n\t\t/** \n\t\tDispatched when the read has been aborted. For instance, by invoking the abort() method.\n\n\t\t@event abort\n\t\t@param {Object} event\n\t\t*/\n\t\t'abort', \n\n\t\t/** \n\t\tDispatched when the read has failed.\n\n\t\t@event error\n\t\t@param {Object} event\n\t\t*/\n\t\t'error', \n\n\t\t/** \n\t\tDispatched when the request has completed (either in success or failure).\n\n\t\t@event loadend\n\t\t@param {Object} event\n\t\t*/\n\t\t'loadend'\n\t];\n\t\n\tfunction FileReader() {\n\n\t\tRuntimeClient.call(this);\n\n\t\tBasic.extend(this, {\n\t\t\t/**\n\t\t\tUID of the component instance.\n\n\t\t\t@property uid\n\t\t\t@type {String}\n\t\t\t*/\n\t\t\tuid: Basic.guid('uid_'),\n\n\t\t\t/**\n\t\t\tContains current state of FileReader object. Can take values of FileReader.EMPTY, FileReader.LOADING\n\t\t\tand FileReader.DONE.\n\n\t\t\t@property readyState\n\t\t\t@type {Number}\n\t\t\t@default FileReader.EMPTY\n\t\t\t*/\n\t\t\treadyState: FileReader.EMPTY,\n\t\t\t\n\t\t\t/**\n\t\t\tResult of the successful read operation.\n\n\t\t\t@property result\n\t\t\t@type {String}\n\t\t\t*/\n\t\t\tresult: null,\n\t\t\t\n\t\t\t/**\n\t\t\tStores the error of failed asynchronous read operation.\n\n\t\t\t@property error\n\t\t\t@type {DOMError}\n\t\t\t*/\n\t\t\terror: null,\n\t\t\t\n\t\t\t/**\n\t\t\tInitiates reading of File/Blob object contents to binary string.\n\n\t\t\t@method readAsBinaryString\n\t\t\t@param {Blob|File} blob Object to preload\n\t\t\t*/\n\t\t\treadAsBinaryString: function(blob) {\n\t\t\t\t_read.call(this, 'readAsBinaryString', blob);\n\t\t\t},\n\t\t\t\n\t\t\t/**\n\t\t\tInitiates reading of File/Blob object contents to dataURL string.\n\n\t\t\t@method readAsDataURL\n\t\t\t@param {Blob|File} blob Object to preload\n\t\t\t*/\n\t\t\treadAsDataURL: function(blob) {\n\t\t\t\t_read.call(this, 'readAsDataURL', blob);\n\t\t\t},\n\t\t\t\n\t\t\t/**\n\t\t\tInitiates reading of File/Blob object contents to string.\n\n\t\t\t@method readAsText\n\t\t\t@param {Blob|File} blob Object to preload\n\t\t\t*/\n\t\t\treadAsText: function(blob) {\n\t\t\t\t_read.call(this, 'readAsText', blob);\n\t\t\t},\n\t\t\t\n\t\t\t/**\n\t\t\tAborts preloading process.\n\n\t\t\t@method abort\n\t\t\t*/\n\t\t\tabort: function() {\n\t\t\t\tthis.result = null;\n\t\t\t\t\n\t\t\t\tif (Basic.inArray(this.readyState, [FileReader.EMPTY, FileReader.DONE]) !== -1) {\n\t\t\t\t\treturn;\n\t\t\t\t} else if (this.readyState === FileReader.LOADING) {\n\t\t\t\t\tthis.readyState = FileReader.DONE;\n\t\t\t\t}\n\n\t\t\t\tthis.exec('FileReader', 'abort');\n\t\t\t\t\n\t\t\t\tthis.trigger('abort');\n\t\t\t\tthis.trigger('loadend');\n\t\t\t},\n\n\t\t\t/**\n\t\t\tDestroy component and release resources.\n\n\t\t\t@method destroy\n\t\t\t*/\n\t\t\tdestroy: function() {\n\t\t\t\tthis.abort();\n\t\t\t\tthis.exec('FileReader', 'destroy');\n\t\t\t\tthis.disconnectRuntime();\n\t\t\t\tthis.unbindAll();\n\t\t\t}\n\t\t});\n\n\t\t// uid must already be assigned\n\t\tthis.handleEventProps(dispatches);\n\n\t\tthis.bind('Error', function(e, err) {\n\t\t\tthis.readyState = FileReader.DONE;\n\t\t\tthis.error = err;\n\t\t}, 999);\n\t\t\n\t\tthis.bind('Load', function(e) {\n\t\t\tthis.readyState = FileReader.DONE;\n\t\t}, 999);\n\n\t\t\n\t\tfunction _read(op, blob) {\n\t\t\tvar self = this;\t\t\t\n\n\t\t\tthis.trigger('loadstart');\n\n\t\t\tif (this.readyState === FileReader.LOADING) {\n\t\t\t\tthis.trigger('error', new x.DOMException(x.DOMException.INVALID_STATE_ERR));\n\t\t\t\tthis.trigger('loadend');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if source is not o.Blob/o.File\n\t\t\tif (!(blob instanceof Blob)) {\n\t\t\t\tthis.trigger('error', new x.DOMException(x.DOMException.NOT_FOUND_ERR));\n\t\t\t\tthis.trigger('loadend');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.result = null;\n\t\t\tthis.readyState = FileReader.LOADING;\n\t\t\t\n\t\t\tif (blob.isDetached()) {\n\t\t\t\tvar src = blob.getSource();\n\t\t\t\tswitch (op) {\n\t\t\t\t\tcase 'readAsText':\n\t\t\t\t\tcase 'readAsBinaryString':\n\t\t\t\t\t\tthis.result = src;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'readAsDataURL':\n\t\t\t\t\t\tthis.result = 'data:' + blob.type + ';base64,' + Encode.btoa(src);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tthis.readyState = FileReader.DONE;\n\t\t\t\tthis.trigger('load');\n\t\t\t\tthis.trigger('loadend');\n\t\t\t} else {\n\t\t\t\tthis.connectRuntime(blob.ruid);\n\t\t\t\tthis.exec('FileReader', 'read', op, blob);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\tInitial FileReader state\n\n\t@property EMPTY\n\t@type {Number}\n\t@final\n\t@static\n\t@default 0\n\t*/\n\tFileReader.EMPTY = 0;\n\n\t/**\n\tFileReader switches to this state when it is preloading the source\n\n\t@property LOADING\n\t@type {Number}\n\t@final\n\t@static\n\t@default 1\n\t*/\n\tFileReader.LOADING = 1;\n\n\t/**\n\tPreloading is complete, this is a final state\n\n\t@property DONE\n\t@type {Number}\n\t@final\n\t@static\n\t@default 2\n\t*/\n\tFileReader.DONE = 2;\n\n\tFileReader.prototype = EventTarget.instance;\n\n\treturn FileReader;\n});\n\n// Included from: src/javascript/core/utils/Url.js\n\n/**\n * Url.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/core/utils/Url\n@public\n@static\n*/\n\ndefine('moxie/core/utils/Url', [\n\t'moxie/core/utils/Basic'\n], function(Basic) {\n\t/**\n\tParse url into separate components and fill in absent parts with parts from current url,\n\tbased on https://raw.github.com/kvz/phpjs/master/functions/url/parse_url.js\n\n\t@method parseUrl\n\t@static\n\t@param {String} url Url to parse (defaults to empty string if undefined)\n\t@return {Object} Hash containing extracted uri components\n\t*/\n\tvar parseUrl = function(url, currentUrl) {\n\t\tvar key = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment']\n\t\t, i = key.length\n\t\t, ports = {\n\t\t\thttp: 80,\n\t\t\thttps: 443\n\t\t}\n\t\t, uri = {}\n\t\t, regex = /^(?:([^:\\/?#]+):)?(?:\\/\\/()(?:(?:()(?:([^:@\\/]*):?([^:@\\/]*))?@)?(\\[[\\da-fA-F:]+\\]|[^:\\/?#]*)(?::(\\d*))?))?()(?:(()(?:(?:[^?#\\/]*\\/)*)()(?:[^?#]*))(?:\\\\?([^#]*))?(?:#(.*))?)/\n\t\t, m = regex.exec(url || '')\n\t\t, isRelative\n\t\t, isSchemeLess = /^\\/\\/\\w/.test(url)\n\t\t;\n\n\t\tswitch (Basic.typeOf(currentUrl)) {\n\t\t\tcase 'undefined':\n\t\t\t\tcurrentUrl = parseUrl(document.location.href, false);\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\t\tcurrentUrl = parseUrl(currentUrl, false);\n\t\t\t\tbreak;\n\t\t}\n\n\t\twhile (i--) {\n\t\t\tif (m[i]) {\n\t\t\t\turi[key[i]] = m[i];\n\t\t\t}\n\t\t}\n\n\t\tisRelative = !isSchemeLess && !uri.scheme;\n\n\t\tif (isSchemeLess || isRelative) {\n\t\t\turi.scheme = currentUrl.scheme;\n\t\t}\n\n\t\t// when url is relative, we set the origin and the path ourselves\n\t\tif (isRelative) {\n\t\t\turi.host = currentUrl.host;\n\t\t\turi.port = currentUrl.port;\n\n\t\t\tvar path = '';\n\t\t\t// for urls without trailing slash we need to figure out the path\n\t\t\tif (/^[^\\/]/.test(uri.path)) {\n\t\t\t\tpath = currentUrl.path;\n\t\t\t\t// if path ends with a filename, strip it\n\t\t\t\tif (/\\/[^\\/]*\\.[^\\/]*$/.test(path)) {\n\t\t\t\t\tpath = path.replace(/\\/[^\\/]+$/, '/');\n\t\t\t\t} else {\n\t\t\t\t\t// avoid double slash at the end (see #127)\n\t\t\t\t\tpath = path.replace(/\\/?$/, '/');\n\t\t\t\t}\n\t\t\t}\n\t\t\turi.path = path + (uri.path || ''); // site may reside at domain.com or domain.com/subdir\n\t\t}\n\n\t\tif (!uri.port) {\n\t\t\turi.port = ports[uri.scheme] || 80;\n\t\t}\n\n\t\turi.port = parseInt(uri.port, 10);\n\n\t\tif (!uri.path) {\n\t\t\turi.path = \"/\";\n\t\t}\n\n\t\tdelete uri.source;\n\n\t\treturn uri;\n\t};\n\n\t/**\n\tResolve url - among other things will turn relative url to absolute\n\n\t@method resolveUrl\n\t@static\n\t@param {String|Object} url Either absolute or relative, or a result of parseUrl call\n\t@return {String} Resolved, absolute url\n\t*/\n\tvar resolveUrl = function(url) {\n\t\tvar ports = { // we ignore default ports\n\t\t\thttp: 80,\n\t\t\thttps: 443\n\t\t}\n\t\t, urlp = typeof(url) === 'object' ? url : parseUrl(url);\n\t\t;\n\n\t\treturn urlp.scheme + '://' + urlp.host + (urlp.port !== ports[urlp.scheme] ? ':' + urlp.port : '') + urlp.path + (urlp.query ? urlp.query : '');\n\t};\n\n\t/**\n\tCheck if specified url has the same origin as the current document\n\n\t@method hasSameOrigin\n\t@static\n\t@param {String|Object} url\n\t@return {Boolean}\n\t*/\n\tvar hasSameOrigin = function(url) {\n\t\tfunction origin(url) {\n\t\t\treturn [url.scheme, url.host, url.port].join('/');\n\t\t}\n\n\t\tif (typeof url === 'string') {\n\t\t\turl = parseUrl(url);\n\t\t}\n\n\t\treturn origin(parseUrl()) === origin(url);\n\t};\n\n\treturn {\n\t\tparseUrl: parseUrl,\n\t\tresolveUrl: resolveUrl,\n\t\thasSameOrigin: hasSameOrigin\n\t};\n});\n\n// Included from: src/javascript/runtime/RuntimeTarget.js\n\n/**\n * RuntimeTarget.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine('moxie/runtime/RuntimeTarget', [\n\t'moxie/core/utils/Basic',\n\t'moxie/runtime/RuntimeClient',\n\t\"moxie/core/EventTarget\"\n], function(Basic, RuntimeClient, EventTarget) {\n\t/**\n\tInstance of this class can be used as a target for the events dispatched by shims,\n\twhen allowing them onto components is for either reason inappropriate\n\n\t@class moxie/runtime/RuntimeTarget\n\t@constructor\n\t@protected\n\t@extends EventTarget\n\t*/\n\tfunction RuntimeTarget() {\n\t\tthis.uid = Basic.guid('uid_');\n\t\t\n\t\tRuntimeClient.call(this);\n\n\t\tthis.destroy = function() {\n\t\t\tthis.disconnectRuntime();\n\t\t\tthis.unbindAll();\n\t\t};\n\t}\n\n\tRuntimeTarget.prototype = EventTarget.instance;\n\n\treturn RuntimeTarget;\n});\n\n// Included from: src/javascript/file/FileReaderSync.js\n\n/**\n * FileReaderSync.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine('moxie/file/FileReaderSync', [\n\t'moxie/core/utils/Basic',\n\t'moxie/runtime/RuntimeClient',\n\t'moxie/core/utils/Encode'\n], function(Basic, RuntimeClient, Encode) {\n\t/**\n\tSynchronous FileReader implementation. Something like this is available in WebWorkers environment, here\n\tit can be used to read only preloaded blobs/files and only below certain size (not yet sure what that'd be,\n\tbut probably < 1mb). Not meant to be used directly by user.\n\n\t@class moxie/file/FileReaderSync\n\t@private\n\t@constructor\n\t*/\n\treturn function() {\n\t\tRuntimeClient.call(this);\n\n\t\tBasic.extend(this, {\n\t\t\tuid: Basic.guid('uid_'),\n\n\t\t\treadAsBinaryString: function(blob) {\n\t\t\t\treturn _read.call(this, 'readAsBinaryString', blob);\n\t\t\t},\n\t\t\t\n\t\t\treadAsDataURL: function(blob) {\n\t\t\t\treturn _read.call(this, 'readAsDataURL', blob);\n\t\t\t},\n\t\t\t\n\t\t\t/*readAsArrayBuffer: function(blob) {\n\t\t\t\treturn _read.call(this, 'readAsArrayBuffer', blob);\n\t\t\t},*/\n\t\t\t\n\t\t\treadAsText: function(blob) {\n\t\t\t\treturn _read.call(this, 'readAsText', blob);\n\t\t\t}\n\t\t});\n\n\t\tfunction _read(op, blob) {\n\t\t\tif (blob.isDetached()) {\n\t\t\t\tvar src = blob.getSource();\n\t\t\t\tswitch (op) {\n\t\t\t\t\tcase 'readAsBinaryString':\n\t\t\t\t\t\treturn src;\n\t\t\t\t\tcase 'readAsDataURL':\n\t\t\t\t\t\treturn 'data:' + blob.type + ';base64,' + Encode.btoa(src);\n\t\t\t\t\tcase 'readAsText':\n\t\t\t\t\t\tvar txt = '';\n\t\t\t\t\t\tfor (var i = 0, length = src.length; i < length; i++) {\n\t\t\t\t\t\t\ttxt += String.fromCharCode(src[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn txt;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar result = this.connectRuntime(blob.ruid).exec.call(this, 'FileReaderSync', 'read', op, blob);\n\t\t\t\tthis.disconnectRuntime();\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t};\n});\n\n// Included from: src/javascript/xhr/FormData.js\n\n/**\n * FormData.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine(\"moxie/xhr/FormData\", [\n\t\"moxie/core/Exceptions\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/file/Blob\"\n], function(x, Basic, Blob) {\n\t/**\n\tFormData\n\n\t@class moxie/xhr/FormData\n\t@constructor\n\t*/\n\tfunction FormData() {\n\t\tvar _blob, _fields = [];\n\n\t\tBasic.extend(this, {\n\t\t\t/**\n\t\t\tAppend another key-value pair to the FormData object\n\n\t\t\t@method append\n\t\t\t@param {String} name Name for the new field\n\t\t\t@param {String|Blob|Array|Object} value Value for the field\n\t\t\t*/\n\t\t\tappend: function(name, value) {\n\t\t\t\tvar self = this, valueType = Basic.typeOf(value);\n\n\t\t\t\t// according to specs value might be either Blob or String\n\t\t\t\tif (value instanceof Blob) {\n\t\t\t\t\t_blob = {\n\t\t\t\t\t\tname: name,\n\t\t\t\t\t\tvalue: value // unfortunately we can only send single Blob in one FormData\n\t\t\t\t\t};\n\t\t\t\t} else if ('array' === valueType) {\n\t\t\t\t\tname += '[]';\n\n\t\t\t\t\tBasic.each(value, function(value) {\n\t\t\t\t\t\tself.append(name, value);\n\t\t\t\t\t});\n\t\t\t\t} else if ('object' === valueType) {\n\t\t\t\t\tBasic.each(value, function(value, key) {\n\t\t\t\t\t\tself.append(name + '[' + key + ']', value);\n\t\t\t\t\t});\n\t\t\t\t} else if ('null' === valueType || 'undefined' === valueType || 'number' === valueType && isNaN(value)) {\n\t\t\t\t\tself.append(name, \"false\");\n\t\t\t\t} else {\n\t\t\t\t\t_fields.push({\n\t\t\t\t\t\tname: name,\n\t\t\t\t\t\tvalue: value.toString()\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\tChecks if FormData contains Blob.\n\n\t\t\t@method hasBlob\n\t\t\t@return {Boolean}\n\t\t\t*/\n\t\t\thasBlob: function() {\n\t\t\t\treturn !!this.getBlob();\n\t\t\t},\n\n\t\t\t/**\n\t\t\tRetrieves blob.\n\n\t\t\t@method getBlob\n\t\t\t@return {Object} Either Blob if found or null\n\t\t\t*/\n\t\t\tgetBlob: function() {\n\t\t\t\treturn _blob && _blob.value || null;\n\t\t\t},\n\n\t\t\t/**\n\t\t\tRetrieves blob field name.\n\n\t\t\t@method getBlobName\n\t\t\t@return {String} Either Blob field name or null\n\t\t\t*/\n\t\t\tgetBlobName: function() {\n\t\t\t\treturn _blob && _blob.name || null;\n\t\t\t},\n\n\t\t\t/**\n\t\t\tLoop over the fields in FormData and invoke the callback for each of them.\n\n\t\t\t@method each\n\t\t\t@param {Function} cb Callback to call for each field\n\t\t\t*/\n\t\t\teach: function(cb) {\n\t\t\t\tBasic.each(_fields, function(field) {\n\t\t\t\t\tcb(field.value, field.name);\n\t\t\t\t});\n\n\t\t\t\tif (_blob) {\n\t\t\t\t\tcb(_blob.value, _blob.name);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\t_blob = null;\n\t\t\t\t_fields = [];\n\t\t\t}\n\t\t});\n\t}\n\n\treturn FormData;\n});\n\n// Included from: src/javascript/xhr/XMLHttpRequest.js\n\n/**\n * XMLHttpRequest.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine(\"moxie/xhr/XMLHttpRequest\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/core/EventTarget\",\n\t\"moxie/core/utils/Encode\",\n\t\"moxie/core/utils/Url\",\n\t\"moxie/runtime/Runtime\",\n\t\"moxie/runtime/RuntimeTarget\",\n\t\"moxie/file/Blob\",\n\t\"moxie/file/FileReaderSync\",\n\t\"moxie/xhr/FormData\",\n\t\"moxie/core/utils/Env\",\n\t\"moxie/core/utils/Mime\"\n], function(Basic, x, EventTarget, Encode, Url, Runtime, RuntimeTarget, Blob, FileReaderSync, FormData, Env, Mime) {\n\n\tvar httpCode = {\n\t\t100: 'Continue',\n\t\t101: 'Switching Protocols',\n\t\t102: 'Processing',\n\n\t\t200: 'OK',\n\t\t201: 'Created',\n\t\t202: 'Accepted',\n\t\t203: 'Non-Authoritative Information',\n\t\t204: 'No Content',\n\t\t205: 'Reset Content',\n\t\t206: 'Partial Content',\n\t\t207: 'Multi-Status',\n\t\t226: 'IM Used',\n\n\t\t300: 'Multiple Choices',\n\t\t301: 'Moved Permanently',\n\t\t302: 'Found',\n\t\t303: 'See Other',\n\t\t304: 'Not Modified',\n\t\t305: 'Use Proxy',\n\t\t306: 'Reserved',\n\t\t307: 'Temporary Redirect',\n\n\t\t400: 'Bad Request',\n\t\t401: 'Unauthorized',\n\t\t402: 'Payment Required',\n\t\t403: 'Forbidden',\n\t\t404: 'Not Found',\n\t\t405: 'Method Not Allowed',\n\t\t406: 'Not Acceptable',\n\t\t407: 'Proxy Authentication Required',\n\t\t408: 'Request Timeout',\n\t\t409: 'Conflict',\n\t\t410: 'Gone',\n\t\t411: 'Length Required',\n\t\t412: 'Precondition Failed',\n\t\t413: 'Request Entity Too Large',\n\t\t414: 'Request-URI Too Long',\n\t\t415: 'Unsupported Media Type',\n\t\t416: 'Requested Range Not Satisfiable',\n\t\t417: 'Expectation Failed',\n\t\t422: 'Unprocessable Entity',\n\t\t423: 'Locked',\n\t\t424: 'Failed Dependency',\n\t\t426: 'Upgrade Required',\n\n\t\t500: 'Internal Server Error',\n\t\t501: 'Not Implemented',\n\t\t502: 'Bad Gateway',\n\t\t503: 'Service Unavailable',\n\t\t504: 'Gateway Timeout',\n\t\t505: 'HTTP Version Not Supported',\n\t\t506: 'Variant Also Negotiates',\n\t\t507: 'Insufficient Storage',\n\t\t510: 'Not Extended'\n\t};\n\n\tfunction XMLHttpRequestUpload() {\n\t\tthis.uid = Basic.guid('uid_');\n\t}\n\n\tXMLHttpRequestUpload.prototype = EventTarget.instance;\n\n\t/**\n\tImplementation of XMLHttpRequest\n\n\t@class moxie/xhr/XMLHttpRequest\n\t@constructor\n\t@uses RuntimeClient\n\t@extends EventTarget\n\t*/\n\tvar dispatches = [\n\t\t'loadstart',\n\n\t\t'progress',\n\n\t\t'abort',\n\n\t\t'error',\n\n\t\t'load',\n\n\t\t'timeout',\n\n\t\t'loadend'\n\n\t\t// readystatechange (for historical reasons)\n\t];\n\n\tvar NATIVE = 1, RUNTIME = 2;\n\n\tfunction XMLHttpRequest() {\n\t\tvar self = this,\n\t\t\t// this (together with _p() @see below) is here to gracefully upgrade to setter/getter syntax where possible\n\t\t\tprops = {\n\t\t\t\t/**\n\t\t\t\tThe amount of milliseconds a request can take before being terminated. Initially zero. Zero means there is no timeout.\n\n\t\t\t\t@property timeout\n\t\t\t\t@type Number\n\t\t\t\t@default 0\n\t\t\t\t*/\n\t\t\t\ttimeout: 0,\n\n\t\t\t\t/**\n\t\t\t\tCurrent state, can take following values:\n\t\t\t\tUNSENT (numeric value 0)\n\t\t\t\tThe object has been constructed.\n\n\t\t\t\tOPENED (numeric value 1)\n\t\t\t\tThe open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using the send() method.\n\n\t\t\t\tHEADERS_RECEIVED (numeric value 2)\n\t\t\t\tAll redirects (if any) have been followed and all HTTP headers of the final response have been received. Several response members of the object are now available.\n\n\t\t\t\tLOADING (numeric value 3)\n\t\t\t\tThe response entity body is being received.\n\n\t\t\t\tDONE (numeric value 4)\n\n\t\t\t\t@property readyState\n\t\t\t\t@type Number\n\t\t\t\t@default 0 (UNSENT)\n\t\t\t\t*/\n\t\t\t\treadyState: XMLHttpRequest.UNSENT,\n\n\t\t\t\t/**\n\t\t\t\tTrue when user credentials are to be included in a cross-origin request. False when they are to be excluded\n\t\t\t\tin a cross-origin request and when cookies are to be ignored in its response. Initially false.\n\n\t\t\t\t@property withCredentials\n\t\t\t\t@type Boolean\n\t\t\t\t@default false\n\t\t\t\t*/\n\t\t\t\twithCredentials: false,\n\n\t\t\t\t/**\n\t\t\t\tReturns the HTTP status code.\n\n\t\t\t\t@property status\n\t\t\t\t@type Number\n\t\t\t\t@default 0\n\t\t\t\t*/\n\t\t\t\tstatus: 0,\n\n\t\t\t\t/**\n\t\t\t\tReturns the HTTP status text.\n\n\t\t\t\t@property statusText\n\t\t\t\t@type String\n\t\t\t\t*/\n\t\t\t\tstatusText: \"\",\n\n\t\t\t\t/**\n\t\t\t\tReturns the response type. Can be set to change the response type. Values are:\n\t\t\t\tthe empty string (default), \"arraybuffer\", \"blob\", \"document\", \"json\", and \"text\".\n\n\t\t\t\t@property responseType\n\t\t\t\t@type String\n\t\t\t\t*/\n\t\t\t\tresponseType: \"\",\n\n\t\t\t\t/**\n\t\t\t\tReturns the document response entity body.\n\n\t\t\t\tThrows an \"InvalidStateError\" exception if responseType is not the empty string or \"document\".\n\n\t\t\t\t@property responseXML\n\t\t\t\t@type Document\n\t\t\t\t*/\n\t\t\t\tresponseXML: null,\n\n\t\t\t\t/**\n\t\t\t\tReturns the text response entity body.\n\n\t\t\t\tThrows an \"InvalidStateError\" exception if responseType is not the empty string or \"text\".\n\n\t\t\t\t@property responseText\n\t\t\t\t@type String\n\t\t\t\t*/\n\t\t\t\tresponseText: null,\n\n\t\t\t\t/**\n\t\t\t\tReturns the response entity body (http://www.w3.org/TR/XMLHttpRequest/#response-entity-body).\n\t\t\t\tCan become: ArrayBuffer, Blob, Document, JSON, Text\n\n\t\t\t\t@property response\n\t\t\t\t@type Mixed\n\t\t\t\t*/\n\t\t\t\tresponse: null\n\t\t\t},\n\n\t\t\t_async = true,\n\t\t\t_url,\n\t\t\t_method,\n\t\t\t_headers = {},\n\t\t\t_user,\n\t\t\t_password,\n\t\t\t_encoding = null,\n\t\t\t_mimeType = null,\n\n\t\t\t// flags\n\t\t\t_sync_flag = false,\n\t\t\t_send_flag = false,\n\t\t\t_upload_events_flag = false,\n\t\t\t_upload_complete_flag = false,\n\t\t\t_error_flag = false,\n\t\t\t_same_origin_flag = false,\n\n\t\t\t// times\n\t\t\t_start_time,\n\t\t\t_timeoutset_time,\n\n\t\t\t_finalMime = null,\n\t\t\t_finalCharset = null,\n\n\t\t\t_options = {},\n\t\t\t_xhr,\n\t\t\t_responseHeaders = '',\n\t\t\t_responseHeadersBag\n\t\t\t;\n\n\n\t\tBasic.extend(this, props, {\n\t\t\t/**\n\t\t\tUnique id of the component\n\n\t\t\t@property uid\n\t\t\t@type String\n\t\t\t*/\n\t\t\tuid: Basic.guid('uid_'),\n\n\t\t\t/**\n\t\t\tTarget for Upload events\n\n\t\t\t@property upload\n\t\t\t@type XMLHttpRequestUpload\n\t\t\t*/\n\t\t\tupload: new XMLHttpRequestUpload(),\n\n\n\t\t\t/**\n\t\t\tSets the request method, request URL, synchronous flag, request username, and request password.\n\n\t\t\tThrows a \"SyntaxError\" exception if one of the following is true:\n\n\t\t\tmethod is not a valid HTTP method.\n\t\t\turl cannot be resolved.\n\t\t\turl contains the \"user:password\" format in the userinfo production.\n\t\t\tThrows a \"SecurityError\" exception if method is a case-insensitive match for CONNECT, TRACE or TRACK.\n\n\t\t\tThrows an \"InvalidAccessError\" exception if one of the following is true:\n\n\t\t\tEither user or password is passed as argument and the origin of url does not match the XMLHttpRequest origin.\n\t\t\tThere is an associated XMLHttpRequest document and either the timeout attribute is not zero,\n\t\t\tthe withCredentials attribute is true, or the responseType attribute is not the empty string.\n\n\n\t\t\t@method open\n\t\t\t@param {String} method HTTP method to use on request\n\t\t\t@param {String} url URL to request\n\t\t\t@param {Boolean} [async=true] If false request will be done in synchronous manner. Asynchronous by default.\n\t\t\t@param {String} [user] Username to use in HTTP authentication process on server-side\n\t\t\t@param {String} [password] Password to use in HTTP authentication process on server-side\n\t\t\t*/\n\t\t\topen: function(method, url, async, user, password) {\n\t\t\t\tvar urlp;\n\n\t\t\t\t// first two arguments are required\n\t\t\t\tif (!method || !url) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.SYNTAX_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 2 - check if any code point in method is higher than U+00FF or after deflating method it does not match the method\n\t\t\t\tif (/[\\u0100-\\uffff]/.test(method) || Encode.utf8_encode(method) !== method) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.SYNTAX_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 3\n\t\t\t\tif (!!~Basic.inArray(method.toUpperCase(), ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'TRACE', 'TRACK'])) {\n\t\t\t\t\t_method = method.toUpperCase();\n\t\t\t\t}\n\n\n\t\t\t\t// 4 - allowing these methods poses a security risk\n\t\t\t\tif (!!~Basic.inArray(_method, ['CONNECT', 'TRACE', 'TRACK'])) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.SECURITY_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 5\n\t\t\t\turl = Encode.utf8_encode(url);\n\n\t\t\t\t// 6 - Resolve url relative to the XMLHttpRequest base URL. If the algorithm returns an error, throw a \"SyntaxError\".\n\t\t\t\turlp = Url.parseUrl(url);\n\n\t\t\t\t_same_origin_flag = Url.hasSameOrigin(urlp);\n\n\t\t\t\t// 7 - manually build up absolute url\n\t\t\t\t_url = Url.resolveUrl(url);\n\n\t\t\t\t// 9-10, 12-13\n\t\t\t\tif ((user || password) && !_same_origin_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);\n\t\t\t\t}\n\n\t\t\t\t_user = user || urlp.user;\n\t\t\t\t_password = password || urlp.pass;\n\n\t\t\t\t// 11\n\t\t\t\t_async = async || true;\n\n\t\t\t\tif (_async === false && (_p('timeout') || _p('withCredentials') || _p('responseType') !== \"\")) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 14 - terminate abort()\n\n\t\t\t\t// 15 - terminate send()\n\n\t\t\t\t// 18\n\t\t\t\t_sync_flag = !_async;\n\t\t\t\t_send_flag = false;\n\t\t\t\t_headers = {};\n\t\t\t\t_reset.call(this);\n\n\t\t\t\t// 19\n\t\t\t\t_p('readyState', XMLHttpRequest.OPENED);\n\n\t\t\t\t// 20\n\t\t\t\tthis.dispatchEvent('readystatechange');\n\t\t\t},\n\n\t\t\t/**\n\t\t\tAppends an header to the list of author request headers, or if header is already\n\t\t\tin the list of author request headers, combines its value with value.\n\n\t\t\tThrows an \"InvalidStateError\" exception if the state is not OPENED or if the send() flag is set.\n\t\t\tThrows a \"SyntaxError\" exception if header is not a valid HTTP header field name or if value\n\t\t\tis not a valid HTTP header field value.\n\n\t\t\t@method setRequestHeader\n\t\t\t@param {String} header\n\t\t\t@param {String|Number} value\n\t\t\t*/\n\t\t\tsetRequestHeader: function(header, value) {\n\t\t\t\tvar uaHeaders = [ // these headers are controlled by the user agent\n\t\t\t\t\t\t\"accept-charset\",\n\t\t\t\t\t\t\"accept-encoding\",\n\t\t\t\t\t\t\"access-control-request-headers\",\n\t\t\t\t\t\t\"access-control-request-method\",\n\t\t\t\t\t\t\"connection\",\n\t\t\t\t\t\t\"content-length\",\n\t\t\t\t\t\t\"cookie\",\n\t\t\t\t\t\t\"cookie2\",\n\t\t\t\t\t\t\"content-transfer-encoding\",\n\t\t\t\t\t\t\"date\",\n\t\t\t\t\t\t\"expect\",\n\t\t\t\t\t\t\"host\",\n\t\t\t\t\t\t\"keep-alive\",\n\t\t\t\t\t\t\"origin\",\n\t\t\t\t\t\t\"referer\",\n\t\t\t\t\t\t\"te\",\n\t\t\t\t\t\t\"trailer\",\n\t\t\t\t\t\t\"transfer-encoding\",\n\t\t\t\t\t\t\"upgrade\",\n\t\t\t\t\t\t\"user-agent\",\n\t\t\t\t\t\t\"via\"\n\t\t\t\t\t];\n\n\t\t\t\t// 1-2\n\t\t\t\tif (_p('readyState') !== XMLHttpRequest.OPENED || _send_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 3\n\t\t\t\tif (/[\\u0100-\\uffff]/.test(header) || Encode.utf8_encode(header) !== header) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.SYNTAX_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 4\n\t\t\t\t/* this step is seemingly bypassed in browsers, probably to allow various unicode characters in header values\n\t\t\t\tif (/[\\u0100-\\uffff]/.test(value) || Encode.utf8_encode(value) !== value) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.SYNTAX_ERR);\n\t\t\t\t}*/\n\n\t\t\t\theader = Basic.trim(header).toLowerCase();\n\n\t\t\t\t// setting of proxy-* and sec-* headers is prohibited by spec\n\t\t\t\tif (!!~Basic.inArray(header, uaHeaders) || /^(proxy\\-|sec\\-)/.test(header)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// camelize\n\t\t\t\t// browsers lowercase header names (at least for custom ones)\n\t\t\t\t// header = header.replace(/\\b\\w/g, function($1) { return $1.toUpperCase(); });\n\n\t\t\t\tif (!_headers[header]) {\n\t\t\t\t\t_headers[header] = value;\n\t\t\t\t} else {\n\t\t\t\t\t// http://tools.ietf.org/html/rfc2616#section-4.2 (last paragraph)\n\t\t\t\t\t_headers[header] += ', ' + value;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Test if the specified header is already set on this request.\n\t\t\t * Returns a header value or boolean false if it's not yet set.\n\t\t\t *\n\t\t\t * @method hasRequestHeader\n\t\t\t * @param {String} header Name of the header to test\n\t\t\t * @return {Boolean|String}\n\t\t\t */\n\t\t\thasRequestHeader: function(header) {\n\t\t\t\treturn header && _headers[header.toLowerCase()] || false;\n\t\t\t},\n\n\t\t\t/**\n\t\t\tReturns all headers from the response, with the exception of those whose field name is Set-Cookie or Set-Cookie2.\n\n\t\t\t@method getAllResponseHeaders\n\t\t\t@return {String} reponse headers or empty string\n\t\t\t*/\n\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\treturn _responseHeaders || '';\n\t\t\t},\n\n\t\t\t/**\n\t\t\tReturns the header field value from the response of which the field name matches header,\n\t\t\tunless the field name is Set-Cookie or Set-Cookie2.\n\n\t\t\t@method getResponseHeader\n\t\t\t@param {String} header\n\t\t\t@return {String} value(s) for the specified header or null\n\t\t\t*/\n\t\t\tgetResponseHeader: function(header) {\n\t\t\t\theader = header.toLowerCase();\n\n\t\t\t\tif (_error_flag || !!~Basic.inArray(header, ['set-cookie', 'set-cookie2'])) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif (_responseHeaders && _responseHeaders !== '') {\n\t\t\t\t\t// if we didn't parse response headers until now, do it and keep for later\n\t\t\t\t\tif (!_responseHeadersBag) {\n\t\t\t\t\t\t_responseHeadersBag = {};\n\t\t\t\t\t\tBasic.each(_responseHeaders.split(/\\r\\n/), function(line) {\n\t\t\t\t\t\t\tvar pair = line.split(/:\\s+/);\n\t\t\t\t\t\t\tif (pair.length === 2) { // last line might be empty, omit\n\t\t\t\t\t\t\t\tpair[0] = Basic.trim(pair[0]); // just in case\n\t\t\t\t\t\t\t\t_responseHeadersBag[pair[0].toLowerCase()] = { // simply to retain header name in original form\n\t\t\t\t\t\t\t\t\theader: pair[0],\n\t\t\t\t\t\t\t\t\tvalue: Basic.trim(pair[1])\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\tif (_responseHeadersBag.hasOwnProperty(header)) {\n\t\t\t\t\t\treturn _responseHeadersBag[header].header + ': ' + _responseHeadersBag[header].value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\n\t\t\t/**\n\t\t\tSets the Content-Type header for the response to mime.\n\t\t\tThrows an \"InvalidStateError\" exception if the state is LOADING or DONE.\n\t\t\tThrows a \"SyntaxError\" exception if mime is not a valid media type.\n\n\t\t\t@method overrideMimeType\n\t\t\t@param String mime Mime type to set\n\t\t\t*/\n\t\t\toverrideMimeType: function(mime) {\n\t\t\t\tvar matches, charset;\n\n\t\t\t\t// 1\n\t\t\t\tif (!!~Basic.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 2\n\t\t\t\tmime = Basic.trim(mime.toLowerCase());\n\n\t\t\t\tif (/;/.test(mime) && (matches = mime.match(/^([^;]+)(?:;\\scharset\\=)?(.*)$/))) {\n\t\t\t\t\tmime = matches[1];\n\t\t\t\t\tif (matches[2]) {\n\t\t\t\t\t\tcharset = matches[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!Mime.mimes[mime]) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.SYNTAX_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 3-4\n\t\t\t\t_finalMime = mime;\n\t\t\t\t_finalCharset = charset;\n\t\t\t},\n\n\t\t\t/**\n\t\t\tInitiates the request. The optional argument provides the request entity body.\n\t\t\tThe argument is ignored if request method is GET or HEAD.\n\n\t\t\tThrows an \"InvalidStateError\" exception if the state is not OPENED or if the send() flag is set.\n\n\t\t\t@method send\n\t\t\t@param {Blob|Document|String|FormData} [data] Request entity body\n\t\t\t@param {Object} [options] Set of requirements and pre-requisities for runtime initialization\n\t\t\t*/\n\t\t\tsend: function(data, options) {\n\t\t\t\tif (Basic.typeOf(options) === 'string') {\n\t\t\t\t\t_options = { ruid: options };\n\t\t\t\t} else if (!options) {\n\t\t\t\t\t_options = {};\n\t\t\t\t} else {\n\t\t\t\t\t_options = options;\n\t\t\t\t}\n\n\t\t\t\t// 1-2\n\t\t\t\tif (this.readyState !== XMLHttpRequest.OPENED || _send_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 3\n\t\t\t\t// sending Blob\n\t\t\t\tif (data instanceof Blob) {\n\t\t\t\t\t_options.ruid = data.ruid;\n\t\t\t\t\t_mimeType = data.type || 'application/octet-stream';\n\t\t\t\t}\n\n\t\t\t\t// FormData\n\t\t\t\telse if (data instanceof FormData) {\n\t\t\t\t\tif (data.hasBlob()) {\n\t\t\t\t\t\tvar blob = data.getBlob();\n\t\t\t\t\t\t_options.ruid = blob.ruid;\n\t\t\t\t\t\t_mimeType = blob.type || 'application/octet-stream';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// DOMString\n\t\t\t\telse if (typeof data === 'string') {\n\t\t\t\t\t_encoding = 'UTF-8';\n\t\t\t\t\t_mimeType = 'text/plain;charset=UTF-8';\n\n\t\t\t\t\t// data should be converted to Unicode and encoded as UTF-8\n\t\t\t\t\tdata = Encode.utf8_encode(data);\n\t\t\t\t}\n\n\t\t\t\t// if withCredentials not set, but requested, set it automatically\n\t\t\t\tif (!this.withCredentials) {\n\t\t\t\t\tthis.withCredentials = (_options.required_caps && _options.required_caps.send_browser_cookies) && !_same_origin_flag;\n\t\t\t\t}\n\n\t\t\t\t// 4 - storage mutex\n\t\t\t\t// 5\n\t\t\t\t_upload_events_flag = (!_sync_flag && this.upload.hasEventListener()); // DSAP\n\t\t\t\t// 6\n\t\t\t\t_error_flag = false;\n\t\t\t\t// 7\n\t\t\t\t_upload_complete_flag = !data;\n\t\t\t\t// 8 - Asynchronous steps\n\t\t\t\tif (!_sync_flag) {\n\t\t\t\t\t// 8.1\n\t\t\t\t\t_send_flag = true;\n\t\t\t\t\t// 8.2\n\t\t\t\t\t// this.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr\n\t\t\t\t\t// 8.3\n\t\t\t\t\t//if (!_upload_complete_flag) {\n\t\t\t\t\t\t// this.upload.dispatchEvent('loadstart');\t// will be dispatched either by native or runtime xhr\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t\t// 8.5 - Return the send() method call, but continue running the steps in this algorithm.\n\t\t\t\t_doXHR.call(this, data);\n\t\t\t},\n\n\t\t\t/**\n\t\t\tCancels any network activity.\n\n\t\t\t@method abort\n\t\t\t*/\n\t\t\tabort: function() {\n\t\t\t\t_error_flag = true;\n\t\t\t\t_sync_flag = false;\n\n\t\t\t\tif (!~Basic.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED, XMLHttpRequest.DONE])) {\n\t\t\t\t\t_p('readyState', XMLHttpRequest.DONE);\n\t\t\t\t\t_send_flag = false;\n\n\t\t\t\t\tif (_xhr) {\n\t\t\t\t\t\t_xhr.getRuntime().exec.call(_xhr, 'XMLHttpRequest', 'abort', _upload_complete_flag);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t\t}\n\n\t\t\t\t\t_upload_complete_flag = true;\n\t\t\t\t} else {\n\t\t\t\t\t_p('readyState', XMLHttpRequest.UNSENT);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tif (_xhr) {\n\t\t\t\t\tif (Basic.typeOf(_xhr.destroy) === 'function') {\n\t\t\t\t\t\t_xhr.destroy();\n\t\t\t\t\t}\n\t\t\t\t\t_xhr = null;\n\t\t\t\t}\n\n\t\t\t\tthis.unbindAll();\n\n\t\t\t\tif (this.upload) {\n\t\t\t\t\tthis.upload.unbindAll();\n\t\t\t\t\tthis.upload = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.handleEventProps(dispatches.concat(['readystatechange'])); // for historical reasons\n\t\tthis.upload.handleEventProps(dispatches);\n\n\t\t/* this is nice, but maybe too lengthy\n\n\t\t// if supported by JS version, set getters/setters for specific properties\n\t\to.defineProperty(this, 'readyState', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\treturn _p('readyState');\n\t\t\t}\n\t\t});\n\n\t\to.defineProperty(this, 'timeout', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\treturn _p('timeout');\n\t\t\t},\n\n\t\t\tset: function(value) {\n\n\t\t\t\tif (_sync_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);\n\t\t\t\t}\n\n\t\t\t\t// timeout still should be measured relative to the start time of request\n\t\t\t\t_timeoutset_time = (new Date).getTime();\n\n\t\t\t\t_p('timeout', value);\n\t\t\t}\n\t\t});\n\n\t\t// the withCredentials attribute has no effect when fetching same-origin resources\n\t\to.defineProperty(this, 'withCredentials', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\treturn _p('withCredentials');\n\t\t\t},\n\n\t\t\tset: function(value) {\n\t\t\t\t// 1-2\n\t\t\t\tif (!~o.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED]) || _send_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 3-4\n\t\t\t\tif (_anonymous_flag || _sync_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 5\n\t\t\t\t_p('withCredentials', value);\n\t\t\t}\n\t\t});\n\n\t\to.defineProperty(this, 'status', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\treturn _p('status');\n\t\t\t}\n\t\t});\n\n\t\to.defineProperty(this, 'statusText', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\treturn _p('statusText');\n\t\t\t}\n\t\t});\n\n\t\to.defineProperty(this, 'responseType', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\treturn _p('responseType');\n\t\t\t},\n\n\t\t\tset: function(value) {\n\t\t\t\t// 1\n\t\t\t\tif (!!~o.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 2\n\t\t\t\tif (_sync_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_ACCESS_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 3\n\t\t\t\t_p('responseType', value.toLowerCase());\n\t\t\t}\n\t\t});\n\n\t\to.defineProperty(this, 'responseText', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\t// 1\n\t\t\t\tif (!~o.inArray(_p('responseType'), ['', 'text'])) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 2-3\n\t\t\t\tif (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\treturn _p('responseText');\n\t\t\t}\n\t\t});\n\n\t\to.defineProperty(this, 'responseXML', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\t// 1\n\t\t\t\tif (!~o.inArray(_p('responseType'), ['', 'document'])) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\t// 2-3\n\t\t\t\tif (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\n\t\t\t\treturn _p('responseXML');\n\t\t\t}\n\t\t});\n\n\t\to.defineProperty(this, 'response', {\n\t\t\tconfigurable: false,\n\n\t\t\tget: function() {\n\t\t\t\tif (!!~o.inArray(_p('responseType'), ['', 'text'])) {\n\t\t\t\t\tif (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) {\n\t\t\t\t\t\treturn '';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn _p('response');\n\t\t\t}\n\t\t});\n\n\t\t*/\n\n\t\tfunction _p(prop, value) {\n\t\t\tif (!props.hasOwnProperty(prop)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (arguments.length === 1) { // get\n\t\t\t\treturn Env.can('define_property') ? props[prop] : self[prop];\n\t\t\t} else { // set\n\t\t\t\tif (Env.can('define_property')) {\n\t\t\t\t\tprops[prop] = value;\n\t\t\t\t} else {\n\t\t\t\t\tself[prop] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\tfunction _toASCII(str, AllowUnassigned, UseSTD3ASCIIRules) {\n\t\t\t// TODO: http://tools.ietf.org/html/rfc3490#section-4.1\n\t\t\treturn str.toLowerCase();\n\t\t}\n\t\t*/\n\n\n\t\tfunction _doXHR(data) {\n\t\t\tvar self = this;\n\n\t\t\t_start_time = new Date().getTime();\n\n\t\t\t_xhr = new RuntimeTarget();\n\n\t\t\tfunction loadEnd() {\n\t\t\t\tif (_xhr) { // it could have been destroyed by now\n\t\t\t\t\t_xhr.destroy();\n\t\t\t\t\t_xhr = null;\n\t\t\t\t}\n\t\t\t\tself.dispatchEvent('loadend');\n\t\t\t\tself = null;\n\t\t\t}\n\n\t\t\tfunction exec(runtime) {\n\t\t\t\t_xhr.bind('LoadStart', function(e) {\n\t\t\t\t\t_p('readyState', XMLHttpRequest.LOADING);\n\t\t\t\t\tself.dispatchEvent('readystatechange');\n\n\t\t\t\t\tself.dispatchEvent(e);\n\n\t\t\t\t\tif (_upload_events_flag) {\n\t\t\t\t\t\tself.upload.dispatchEvent(e);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t_xhr.bind('Progress', function(e) {\n\t\t\t\t\tif (_p('readyState') !== XMLHttpRequest.LOADING) {\n\t\t\t\t\t\t_p('readyState', XMLHttpRequest.LOADING); // LoadStart unreliable (in Flash for example)\n\t\t\t\t\t\tself.dispatchEvent('readystatechange');\n\t\t\t\t\t}\n\t\t\t\t\tself.dispatchEvent(e);\n\t\t\t\t});\n\n\t\t\t\t_xhr.bind('UploadProgress', function(e) {\n\t\t\t\t\tif (_upload_events_flag) {\n\t\t\t\t\t\tself.upload.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'progress',\n\t\t\t\t\t\t\tlengthComputable: false,\n\t\t\t\t\t\t\ttotal: e.total,\n\t\t\t\t\t\t\tloaded: e.loaded\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t_xhr.bind('Load', function(e) {\n\t\t\t\t\t_p('readyState', XMLHttpRequest.DONE);\n\t\t\t\t\t_p('status', Number(runtime.exec.call(_xhr, 'XMLHttpRequest', 'getStatus') || 0));\n\t\t\t\t\t_p('statusText', httpCode[_p('status')] || \"\");\n\n\t\t\t\t\t_p('response', runtime.exec.call(_xhr, 'XMLHttpRequest', 'getResponse', _p('responseType')));\n\n\t\t\t\t\tif (!!~Basic.inArray(_p('responseType'), ['text', ''])) {\n\t\t\t\t\t\t_p('responseText', _p('response'));\n\t\t\t\t\t} else if (_p('responseType') === 'document') {\n\t\t\t\t\t\t_p('responseXML', _p('response'));\n\t\t\t\t\t}\n\n\t\t\t\t\t_responseHeaders = runtime.exec.call(_xhr, 'XMLHttpRequest', 'getAllResponseHeaders');\n\n\t\t\t\t\tself.dispatchEvent('readystatechange');\n\n\t\t\t\t\tif (_p('status') > 0) { // status 0 usually means that server is unreachable\n\t\t\t\t\t\tif (_upload_events_flag) {\n\t\t\t\t\t\t\tself.upload.dispatchEvent(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tself.dispatchEvent(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_error_flag = true;\n\t\t\t\t\t\tself.dispatchEvent('error');\n\t\t\t\t\t}\n\t\t\t\t\tloadEnd();\n\t\t\t\t});\n\n\t\t\t\t_xhr.bind('Abort', function(e) {\n\t\t\t\t\tself.dispatchEvent(e);\n\t\t\t\t\tloadEnd();\n\t\t\t\t});\n\n\t\t\t\t_xhr.bind('Error', function(e) {\n\t\t\t\t\t_error_flag = true;\n\t\t\t\t\t_p('readyState', XMLHttpRequest.DONE);\n\t\t\t\t\tself.dispatchEvent('readystatechange');\n\t\t\t\t\t_upload_complete_flag = true;\n\t\t\t\t\tself.dispatchEvent(e);\n\t\t\t\t\tloadEnd();\n\t\t\t\t});\n\n\t\t\t\truntime.exec.call(_xhr, 'XMLHttpRequest', 'send', {\n\t\t\t\t\turl: _url,\n\t\t\t\t\tmethod: _method,\n\t\t\t\t\tasync: _async,\n\t\t\t\t\tuser: _user,\n\t\t\t\t\tpassword: _password,\n\t\t\t\t\theaders: _headers,\n\t\t\t\t\tmimeType: _mimeType,\n\t\t\t\t\tencoding: _encoding,\n\t\t\t\t\tresponseType: self.responseType,\n\t\t\t\t\twithCredentials: self.withCredentials,\n\t\t\t\t\toptions: _options\n\t\t\t\t}, data);\n\t\t\t}\n\n\t\t\t// clarify our requirements\n\t\t\tif (typeof(_options.required_caps) === 'string') {\n\t\t\t\t_options.required_caps = Runtime.parseCaps(_options.required_caps);\n\t\t\t}\n\n\t\t\t_options.required_caps = Basic.extend({}, _options.required_caps, {\n\t\t\t\treturn_response_type: self.responseType\n\t\t\t});\n\n\t\t\tif (data instanceof FormData) {\n\t\t\t\t_options.required_caps.send_multipart = true;\n\t\t\t}\n\n\t\t\tif (!Basic.isEmptyObj(_headers)) {\n\t\t\t\t_options.required_caps.send_custom_headers = true;\n\t\t\t}\n\n\t\t\tif (!_same_origin_flag) {\n\t\t\t\t_options.required_caps.do_cors = true;\n\t\t\t}\n\n\n\t\t\tif (_options.ruid) { // we do not need to wait if we can connect directly\n\t\t\t\texec(_xhr.connectRuntime(_options));\n\t\t\t} else {\n\t\t\t\t_xhr.bind('RuntimeInit', function(e, runtime) {\n\t\t\t\t\texec(runtime);\n\t\t\t\t});\n\t\t\t\t_xhr.bind('RuntimeError', function(e, err) {\n\t\t\t\t\tself.dispatchEvent('RuntimeError', err);\n\t\t\t\t});\n\t\t\t\t_xhr.connectRuntime(_options);\n\t\t\t}\n\t\t}\n\n\n\t\tfunction _reset() {\n\t\t\t_p('responseText', \"\");\n\t\t\t_p('responseXML', null);\n\t\t\t_p('response', null);\n\t\t\t_p('status', 0);\n\t\t\t_p('statusText', \"\");\n\t\t\t_start_time = _timeoutset_time = null;\n\t\t}\n\t}\n\n\tXMLHttpRequest.UNSENT = 0;\n\tXMLHttpRequest.OPENED = 1;\n\tXMLHttpRequest.HEADERS_RECEIVED = 2;\n\tXMLHttpRequest.LOADING = 3;\n\tXMLHttpRequest.DONE = 4;\n\n\tXMLHttpRequest.prototype = EventTarget.instance;\n\n\treturn XMLHttpRequest;\n});\n\n// Included from: src/javascript/runtime/Transporter.js\n\n/**\n * Transporter.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine(\"moxie/runtime/Transporter\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Encode\",\n\t\"moxie/runtime/RuntimeClient\",\n\t\"moxie/core/EventTarget\"\n], function(Basic, Encode, RuntimeClient, EventTarget) {\n\n\t/**\n\t@class moxie/runtime/Transporter\n\t@private\n\t@constructor\n\t*/\n\tfunction Transporter() {\n\t\tvar mod, _runtime, _data, _size, _pos, _chunk_size;\n\n\t\tRuntimeClient.call(this);\n\n\t\tBasic.extend(this, {\n\t\t\tuid: Basic.guid('uid_'),\n\n\t\t\tstate: Transporter.IDLE,\n\n\t\t\tresult: null,\n\n\t\t\ttransport: function(data, type, options) {\n\t\t\t\tvar self = this;\n\n\t\t\t\toptions = Basic.extend({\n\t\t\t\t\tchunk_size: 204798\n\t\t\t\t}, options);\n\n\t\t\t\t// should divide by three, base64 requires this\n\t\t\t\tif ((mod = options.chunk_size % 3)) {\n\t\t\t\t\toptions.chunk_size += 3 - mod;\n\t\t\t\t}\n\n\t\t\t\t_chunk_size = options.chunk_size;\n\n\t\t\t\t_reset.call(this);\n\t\t\t\t_data = data;\n\t\t\t\t_size = data.length;\n\n\t\t\t\tif (Basic.typeOf(options) === 'string' || options.ruid) {\n\t\t\t\t\t_run.call(self, type, this.connectRuntime(options));\n\t\t\t\t} else {\n\t\t\t\t\t// we require this to run only once\n\t\t\t\t\tvar cb = function(e, runtime) {\n\t\t\t\t\t\tself.unbind(\"RuntimeInit\", cb);\n\t\t\t\t\t\t_run.call(self, type, runtime);\n\t\t\t\t\t};\n\t\t\t\t\tthis.bind(\"RuntimeInit\", cb);\n\t\t\t\t\tthis.connectRuntime(options);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tvar self = this;\n\n\t\t\t\tself.state = Transporter.IDLE;\n\t\t\t\tif (_runtime) {\n\t\t\t\t\t_runtime.exec.call(self, 'Transporter', 'clear');\n\t\t\t\t\tself.trigger(\"TransportingAborted\");\n\t\t\t\t}\n\n\t\t\t\t_reset.call(self);\n\t\t\t},\n\n\n\t\t\tdestroy: function() {\n\t\t\t\tthis.unbindAll();\n\t\t\t\t_runtime = null;\n\t\t\t\tthis.disconnectRuntime();\n\t\t\t\t_reset.call(this);\n\t\t\t}\n\t\t});\n\n\t\tfunction _reset() {\n\t\t\t_size = _pos = 0;\n\t\t\t_data = this.result = null;\n\t\t}\n\n\t\tfunction _run(type, runtime) {\n\t\t\tvar self = this;\n\n\t\t\t_runtime = runtime;\n\n\t\t\t//self.unbind(\"RuntimeInit\");\n\n\t\t\tself.bind(\"TransportingProgress\", function(e) {\n\t\t\t\t_pos = e.loaded;\n\n\t\t\t\tif (_pos < _size && Basic.inArray(self.state, [Transporter.IDLE, Transporter.DONE]) === -1) {\n\t\t\t\t\t_transport.call(self);\n\t\t\t\t}\n\t\t\t}, 999);\n\n\t\t\tself.bind(\"TransportingComplete\", function() {\n\t\t\t\t_pos = _size;\n\t\t\t\tself.state = Transporter.DONE;\n\t\t\t\t_data = null; // clean a bit\n\t\t\t\tself.result = _runtime.exec.call(self, 'Transporter', 'getAsBlob', type || '');\n\t\t\t}, 999);\n\n\t\t\tself.state = Transporter.BUSY;\n\t\t\tself.trigger(\"TransportingStarted\");\n\t\t\t_transport.call(self);\n\t\t}\n\n\t\tfunction _transport() {\n\t\t\tvar self = this,\n\t\t\t\tchunk,\n\t\t\t\tbytesLeft = _size - _pos;\n\n\t\t\tif (_chunk_size > bytesLeft) {\n\t\t\t\t_chunk_size = bytesLeft;\n\t\t\t}\n\n\t\t\tchunk = Encode.btoa(_data.substr(_pos, _chunk_size));\n\t\t\t_runtime.exec.call(self, 'Transporter', 'receive', chunk, _size);\n\t\t}\n\t}\n\n\tTransporter.IDLE = 0;\n\tTransporter.BUSY = 1;\n\tTransporter.DONE = 2;\n\n\tTransporter.prototype = EventTarget.instance;\n\n\treturn Transporter;\n});\n\n// Included from: src/javascript/image/Image.js\n\n/**\n * Image.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\ndefine(\"moxie/image/Image\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/file/FileReaderSync\",\n\t\"moxie/xhr/XMLHttpRequest\",\n\t\"moxie/runtime/Runtime\",\n\t\"moxie/runtime/RuntimeClient\",\n\t\"moxie/runtime/Transporter\",\n\t\"moxie/core/utils/Env\",\n\t\"moxie/core/EventTarget\",\n\t\"moxie/file/Blob\",\n\t\"moxie/file/File\",\n\t\"moxie/core/utils/Encode\"\n], function(Basic, Dom, x, FileReaderSync, XMLHttpRequest, Runtime, RuntimeClient, Transporter, Env, EventTarget, Blob, File, Encode) {\n\t/**\n\tImage preloading and manipulation utility. Additionally it provides access to image meta info (Exif, GPS) and raw binary data.\n\n\t@class moxie/image/Image\n\t@constructor\n\t@extends EventTarget\n\t*/\n\tvar dispatches = [\n\t\t'progress',\n\n\t\t/**\n\t\tDispatched when loading is complete.\n\n\t\t@event load\n\t\t@param {Object} event\n\t\t*/\n\t\t'load',\n\n\t\t'error',\n\n\t\t/**\n\t\tDispatched when resize operation is complete.\n\n\t\t@event resize\n\t\t@param {Object} event\n\t\t*/\n\t\t'resize',\n\n\t\t/**\n\t\tDispatched when visual representation of the image is successfully embedded\n\t\tinto the corresponsing container.\n\n\t\t@event embedded\n\t\t@param {Object} event\n\t\t*/\n\t\t'embedded'\n\t];\n\n\tfunction Image() {\n\n\t\tRuntimeClient.call(this);\n\n\t\tBasic.extend(this, {\n\t\t\t/**\n\t\t\tUnique id of the component\n\n\t\t\t@property uid\n\t\t\t@type {String}\n\t\t\t*/\n\t\t\tuid: Basic.guid('uid_'),\n\n\t\t\t/**\n\t\t\tUnique id of the connected runtime, if any.\n\n\t\t\t@property ruid\n\t\t\t@type {String}\n\t\t\t*/\n\t\t\truid: null,\n\n\t\t\t/**\n\t\t\tName of the file, that was used to create an image, if available. If not equals to empty string.\n\n\t\t\t@property name\n\t\t\t@type {String}\n\t\t\t@default \"\"\n\t\t\t*/\n\t\t\tname: \"\",\n\n\t\t\t/**\n\t\t\tSize of the image in bytes. Actual value is set only after image is preloaded.\n\n\t\t\t@property size\n\t\t\t@type {Number}\n\t\t\t@default 0\n\t\t\t*/\n\t\t\tsize: 0,\n\n\t\t\t/**\n\t\t\tWidth of the image. Actual value is set only after image is preloaded.\n\n\t\t\t@property width\n\t\t\t@type {Number}\n\t\t\t@default 0\n\t\t\t*/\n\t\t\twidth: 0,\n\n\t\t\t/**\n\t\t\tHeight of the image. Actual value is set only after image is preloaded.\n\n\t\t\t@property height\n\t\t\t@type {Number}\n\t\t\t@default 0\n\t\t\t*/\n\t\t\theight: 0,\n\n\t\t\t/**\n\t\t\tMime type of the image. Currently only image/jpeg and image/png are supported. Actual value is set only after image is preloaded.\n\n\t\t\t@property type\n\t\t\t@type {String}\n\t\t\t@default \"\"\n\t\t\t*/\n\t\t\ttype: \"\",\n\n\t\t\t/**\n\t\t\tHolds meta info (Exif, GPS). Is populated only for image/jpeg. Actual value is set only after image is preloaded.\n\n\t\t\t@property meta\n\t\t\t@type {Object}\n\t\t\t@default {}\n\t\t\t*/\n\t\t\tmeta: {},\n\n\t\t\t/**\n\t\t\tAlias for load method, that takes another moxie.image.Image object as a source (see load).\n\n\t\t\t@method clone\n\t\t\t@param {Image} src Source for the image\n\t\t\t@param {Boolean} [exact=false] Whether to activate in-depth clone mode\n\t\t\t*/\n\t\t\tclone: function() {\n\t\t\t\tthis.load.apply(this, arguments);\n\t\t\t},\n\n\t\t\t/**\n\t\t\tLoads image from various sources. Currently the source for new image can be: moxie.image.Image,\n\t\t\tmoxie.file.Blob/moxie.file.File, native Blob/File, dataUrl or URL. Depending on the type of the\n\t\t\tsource, arguments - differ. When source is URL, Image will be downloaded from remote destination\n\t\t\tand loaded in memory.\n\n\t\t\t@example\n\t\t\t\tvar img = new moxie.image.Image();\n\t\t\t\timg.onload = function() {\n\t\t\t\t\tvar blob = img.getAsBlob();\n\n\t\t\t\t\tvar formData = new moxie.xhr.FormData();\n\t\t\t\t\tformData.append('file', blob);\n\n\t\t\t\t\tvar xhr = new moxie.xhr.XMLHttpRequest();\n\t\t\t\t\txhr.onload = function() {\n\t\t\t\t\t\t// upload complete\n\t\t\t\t\t};\n\t\t\t\t\txhr.open('post', 'upload.php');\n\t\t\t\t\txhr.send(formData);\n\t\t\t\t};\n\t\t\t\timg.load(\"http://www.moxiecode.com/images/mox-logo.jpg\"); // notice file extension (.jpg)\n\n\n\t\t\t@method load\n\t\t\t@param {Image|Blob|File|String} src Source for the image\n\t\t\t@param {Boolean|Object} [mixed]\n\t\t\t*/\n\t\t\tload: function() {\n\t\t\t\t_load.apply(this, arguments);\n\t\t\t},\n\n\n\t\t\t/**\n\t\t\tResizes the image to fit the specified width/height. If crop is specified, image will also be\n\t\t\tcropped to the exact dimensions.\n\n\t\t\t@method resize\n\t\t\t@since 3.0\n\t\t\t@param {Object} options\n\t\t\t\t@param {Number} options.width Resulting width\n\t\t\t\t@param {Number} [options.height=width] Resulting height (optional, if not supplied will default to width)\n\t\t\t\t@param {String} [options.type='image/jpeg'] MIME type of the resulting image\n\t\t\t\t@param {Number} [options.quality=90] In the case of JPEG, controls the quality of resulting image\n\t\t\t\t@param {Boolean} [options.crop='cc'] If not falsy, image will be cropped, by default from center\n\t\t\t\t@param {Boolean} [options.fit=true] Whether to upscale the image to fit the exact dimensions\n\t\t\t\t@param {Boolean} [options.preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize)\n\t\t\t\t@param {String} [options.resample='default'] Resampling algorithm to use during resize\n\t\t\t\t@param {Boolean} [options.multipass=true] Whether to scale the image in steps (results in better quality)\n\t\t\t*/\n\t\t\tresize: function(options) {\n\t\t\t\tvar self = this;\n\t\t\t\tvar orientation;\n\t\t\t\tvar scale;\n\n\t\t\t\tvar srcRect = {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0,\n\t\t\t\t\twidth: self.width,\n\t\t\t\t\theight: self.height\n\t\t\t\t};\n\n\t\t\t\tvar opts = Basic.extendIf({\n\t\t\t\t\twidth: self.width,\n\t\t\t\t\theight: self.height,\n\t\t\t\t\ttype: self.type || 'image/jpeg',\n\t\t\t\t\tquality: 90,\n\t\t\t\t\tcrop: false,\n\t\t\t\t\tfit: true,\n\t\t\t\t\tpreserveHeaders: true,\n\t\t\t\t\tresample: 'default',\n\t\t\t\t\tmultipass: true\n\t\t\t\t}, options);\n\n\t\t\t\ttry {\n\t\t\t\t\tif (!self.size) { // only preloaded image objects can be used as source\n\t\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t\t}\n\n\t\t\t\t\t// no way to reliably intercept the crash due to high resolution, so we simply avoid it\n\t\t\t\t\tif (self.width > Image.MAX_RESIZE_WIDTH || self.height > Image.MAX_RESIZE_HEIGHT) {\n\t\t\t\t\t\tthrow new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR);\n\t\t\t\t\t}\n\n\t\t\t\t\t// take into account orientation tag\n\t\t\t\t\torientation = (self.meta && self.meta.tiff && self.meta.tiff.Orientation) || 1;\n\n\t\t\t\t\tif (Basic.inArray(orientation, [5,6,7,8]) !== -1) { // values that require 90 degree rotation\n\t\t\t\t\t\tvar tmp = opts.width;\n\t\t\t\t\t\topts.width = opts.height;\n\t\t\t\t\t\topts.height = tmp;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (opts.crop) {\n\t\t\t\t\t\tscale = Math.max(opts.width/self.width, opts.height/self.height);\n\n\t\t\t\t\t\tif (options.fit) {\n\t\t\t\t\t\t\t// first scale it up or down to fit the original image\n\t\t\t\t\t\t\tsrcRect.width = Math.min(Math.ceil(opts.width/scale), self.width);\n\t\t\t\t\t\t\tsrcRect.height = Math.min(Math.ceil(opts.height/scale), self.height);\n\n\t\t\t\t\t\t\t// recalculate the scale for adapted dimensions\n\t\t\t\t\t\t\tscale = opts.width/srcRect.width;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsrcRect.width = Math.min(opts.width, self.width);\n\t\t\t\t\t\t\tsrcRect.height = Math.min(opts.height, self.height);\n\n\t\t\t\t\t\t\t// now we do not need to scale it any further\n\t\t\t\t\t\t\tscale = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof(opts.crop) === 'boolean') {\n\t\t\t\t\t\t\topts.crop = 'cc';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (opts.crop.toLowerCase().replace(/_/, '-')) {\n\t\t\t\t\t\t\tcase 'rb':\n\t\t\t\t\t\t\tcase 'right-bottom':\n\t\t\t\t\t\t\t\tsrcRect.x = self.width - srcRect.width;\n\t\t\t\t\t\t\t\tsrcRect.y = self.height - srcRect.height;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'cb':\n\t\t\t\t\t\t\tcase 'center-bottom':\n\t\t\t\t\t\t\t\tsrcRect.x = Math.floor((self.width - srcRect.width) / 2);\n\t\t\t\t\t\t\t\tsrcRect.y = self.height - srcRect.height;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'lb':\n\t\t\t\t\t\t\tcase 'left-bottom':\n\t\t\t\t\t\t\t\tsrcRect.x = 0;\n\t\t\t\t\t\t\t\tsrcRect.y = self.height - srcRect.height;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'lt':\n\t\t\t\t\t\t\tcase 'left-top':\n\t\t\t\t\t\t\t\tsrcRect.x = 0;\n\t\t\t\t\t\t\t\tsrcRect.y = 0;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'ct':\n\t\t\t\t\t\t\tcase 'center-top':\n\t\t\t\t\t\t\t\tsrcRect.x = Math.floor((self.width - srcRect.width) / 2);\n\t\t\t\t\t\t\t\tsrcRect.y = 0;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'rt':\n\t\t\t\t\t\t\tcase 'right-top':\n\t\t\t\t\t\t\t\tsrcRect.x = self.width - srcRect.width;\n\t\t\t\t\t\t\t\tsrcRect.y = 0;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'rc':\n\t\t\t\t\t\t\tcase 'right-center':\n\t\t\t\t\t\t\tcase 'right-middle':\n\t\t\t\t\t\t\t\tsrcRect.x = self.width - srcRect.width;\n\t\t\t\t\t\t\t\tsrcRect.y = Math.floor((self.height - srcRect.height) / 2);\n\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\tcase 'lc':\n\t\t\t\t\t\t\tcase 'left-center':\n\t\t\t\t\t\t\tcase 'left-middle':\n\t\t\t\t\t\t\t\tsrcRect.x = 0;\n\t\t\t\t\t\t\t\tsrcRect.y = Math.floor((self.height - srcRect.height) / 2);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 'cc':\n\t\t\t\t\t\t\tcase 'center-center':\n\t\t\t\t\t\t\tcase 'center-middle':\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tsrcRect.x = Math.floor((self.width - srcRect.width) / 2);\n\t\t\t\t\t\t\t\tsrcRect.y = Math.floor((self.height - srcRect.height) / 2);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// original image might be smaller than requested crop, so - avoid negative values\n\t\t\t\t\t\tsrcRect.x = Math.max(srcRect.x, 0);\n\t\t\t\t\t\tsrcRect.y = Math.max(srcRect.y, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tscale = Math.min(opts.width/self.width, opts.height/self.height);\n\n\t\t\t\t\t\t// do not upscale if we were asked to not fit it\n\t\t\t\t\t\tif (scale > 1 && !opts.fit) {\n\t\t\t\t\t\t\tscale = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.exec('Image', 'resize', srcRect, scale, opts);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\t// for now simply trigger error event\n\t\t\t\t\tself.trigger('error', ex.code);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\tDownsizes the image to fit the specified width/height. If crop is supplied, image will be cropped to exact dimensions.\n\n\t\t\t@method downsize\n\t\t\t@deprecated use resize()\n\t\t\t*/\n\t\t\tdownsize: function(options) {\n\t\t\t\tvar defaults = {\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\theight: this.height,\n\t\t\t\t\ttype: this.type || 'image/jpeg',\n\t\t\t\t\tquality: 90,\n\t\t\t\t\tcrop: false,\n\t\t\t\t\tfit: false,\n\t\t\t\t\tpreserveHeaders: true,\n\t\t\t\t\tresample: 'default'\n\t\t\t\t}, opts;\n\n\t\t\t\tif (typeof(options) === 'object') {\n\t\t\t\t\topts = Basic.extend(defaults, options);\n\t\t\t\t} else {\n\t\t\t\t\t// for backward compatibility\n\t\t\t\t\topts = Basic.extend(defaults, {\n\t\t\t\t\t\twidth: arguments[0],\n\t\t\t\t\t\theight: arguments[1],\n\t\t\t\t\t\tcrop: arguments[2],\n\t\t\t\t\t\tpreserveHeaders: arguments[3]\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis.resize(opts);\n\t\t\t},\n\n\t\t\t/**\n\t\t\tAlias for downsize(width, height, true). (see downsize)\n\n\t\t\t@method crop\n\t\t\t@param {Number} width Resulting width\n\t\t\t@param {Number} [height=width] Resulting height (optional, if not supplied will default to width)\n\t\t\t@param {Boolean} [preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize)\n\t\t\t*/\n\t\t\tcrop: function(width, height, preserveHeaders) {\n\t\t\t\tthis.downsize(width, height, true, preserveHeaders);\n\t\t\t},\n\n\t\t\tgetAsCanvas: function() {\n\t\t\t\tif (!Env.can('create_canvas')) {\n\t\t\t\t\tthrow new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR);\n\t\t\t\t}\n\t\t\t\treturn this.exec('Image', 'getAsCanvas');\n\t\t\t},\n\n\t\t\t/**\n\t\t\tRetrieves image in it's current state as moxie.file.Blob object. Cannot be run on empty or image in progress (throws\n\t\t\tDOMException.INVALID_STATE_ERR).\n\n\t\t\t@method getAsBlob\n\t\t\t@param {String} [type=\"image/jpeg\"] Mime type of resulting blob. Can either be image/jpeg or image/png\n\t\t\t@param {Number} [quality=90] Applicable only together with mime type image/jpeg\n\t\t\t@return {Blob} Image as Blob\n\t\t\t*/\n\t\t\tgetAsBlob: function(type, quality) {\n\t\t\t\tif (!this.size) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\t\t\t\treturn this.exec('Image', 'getAsBlob', type || 'image/jpeg', quality || 90);\n\t\t\t},\n\n\t\t\t/**\n\t\t\tRetrieves image in it's current state as dataURL string. Cannot be run on empty or image in progress (throws\n\t\t\tDOMException.INVALID_STATE_ERR).\n\n\t\t\t@method getAsDataURL\n\t\t\t@param {String} [type=\"image/jpeg\"] Mime type of resulting blob. Can either be image/jpeg or image/png\n\t\t\t@param {Number} [quality=90] Applicable only together with mime type image/jpeg\n\t\t\t@return {String} Image as dataURL string\n\t\t\t*/\n\t\t\tgetAsDataURL: function(type, quality) {\n\t\t\t\tif (!this.size) {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t}\n\t\t\t\treturn this.exec('Image', 'getAsDataURL', type || 'image/jpeg', quality || 90);\n\t\t\t},\n\n\t\t\t/**\n\t\t\tRetrieves image in it's current state as binary string. Cannot be run on empty or image in progress (throws\n\t\t\tDOMException.INVALID_STATE_ERR).\n\n\t\t\t@method getAsBinaryString\n\t\t\t@param {String} [type=\"image/jpeg\"] Mime type of resulting blob. Can either be image/jpeg or image/png\n\t\t\t@param {Number} [quality=90] Applicable only together with mime type image/jpeg\n\t\t\t@return {String} Image as binary string\n\t\t\t*/\n\t\t\tgetAsBinaryString: function(type, quality) {\n\t\t\t\tvar dataUrl = this.getAsDataURL(type, quality);\n\t\t\t\treturn Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7));\n\t\t\t},\n\n\t\t\t/**\n\t\t\tEmbeds a visual representation of the image into the specified node. Depending on the runtime,\n\t\t\tit might be a canvas, an img node or a thrid party shim object (Flash or SilverLight - very rare,\n\t\t\tcan be used in legacy browsers that do not have canvas or proper dataURI support).\n\n\t\t\t@method embed\n\t\t\t@param {DOMElement} el DOM element to insert the image object into\n\t\t\t@param {Object} [options]\n\t\t\t\t@param {Number} [options.width] The width of an embed (defaults to the image width)\n\t\t\t\t@param {Number} [options.height] The height of an embed (defaults to the image height)\n\t\t\t\t@param {String} [options.type=\"image/jpeg\"] Mime type\n\t\t\t\t@param {Number} [options.quality=90] Quality of an embed, if mime type is image/jpeg\n\t\t\t\t@param {Boolean} [options.crop=false] Whether to crop an embed to the specified dimensions\n\t\t\t\t@param {Boolean} [options.fit=true] By default thumbs will be up- or downscaled as necessary to fit the dimensions\n\t\t\t*/\n\t\t\tembed: function(el, options) {\n\t\t\t\tvar self = this\n\t\t\t\t, runtime // this has to be outside of all the closures to contain proper runtime\n\t\t\t\t;\n\n\t\t\t\tvar opts = Basic.extend({\n\t\t\t\t\twidth: this.width,\n\t\t\t\t\theight: this.height,\n\t\t\t\t\ttype: this.type || 'image/jpeg',\n\t\t\t\t\tquality: 90,\n\t\t\t\t\tfit: true,\n\t\t\t\t\tresample: 'nearest'\n\t\t\t\t}, options);\n\n\n\t\t\t\tfunction render(type, quality) {\n\t\t\t\t\tvar img = this;\n\n\t\t\t\t\t// if possible, embed a canvas element directly\n\t\t\t\t\tif (Env.can('create_canvas')) {\n\t\t\t\t\t\tvar canvas = img.getAsCanvas();\n\t\t\t\t\t\tif (canvas) {\n\t\t\t\t\t\t\tel.appendChild(canvas);\n\t\t\t\t\t\t\tcanvas = null;\n\t\t\t\t\t\t\timg.destroy();\n\t\t\t\t\t\t\tself.trigger('embedded');\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar dataUrl = img.getAsDataURL(type, quality);\n\t\t\t\t\tif (!dataUrl) {\n\t\t\t\t\t\tthrow new x.ImageError(x.ImageError.WRONG_FORMAT);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Env.can('use_data_uri_of', dataUrl.length)) {\n\t\t\t\t\t\tel.innerHTML = '\"\"';\n\t\t\t\t\t\timg.destroy();\n\t\t\t\t\t\tself.trigger('embedded');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar tr = new Transporter();\n\n\t\t\t\t\t\ttr.bind(\"TransportingComplete\", function() {\n\t\t\t\t\t\t\truntime = self.connectRuntime(this.result.ruid);\n\n\t\t\t\t\t\t\tself.bind(\"Embedded\", function() {\n\t\t\t\t\t\t\t\t// position and size properly\n\t\t\t\t\t\t\t\tBasic.extend(runtime.getShimContainer().style, {\n\t\t\t\t\t\t\t\t\t//position: 'relative',\n\t\t\t\t\t\t\t\t\ttop: '0px',\n\t\t\t\t\t\t\t\t\tleft: '0px',\n\t\t\t\t\t\t\t\t\twidth: img.width + 'px',\n\t\t\t\t\t\t\t\t\theight: img.height + 'px'\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t// some shims (Flash/SilverLight) reinitialize, if parent element is hidden, reordered or it's\n\t\t\t\t\t\t\t\t// position type changes (in Gecko), but since we basically need this only in IEs 6/7 and\n\t\t\t\t\t\t\t\t// sometimes 8 and they do not have this problem, we can comment this for now\n\t\t\t\t\t\t\t\t/*tr.bind(\"RuntimeInit\", function(e, runtime) {\n\t\t\t\t\t\t\t\t\ttr.destroy();\n\t\t\t\t\t\t\t\t\truntime.destroy();\n\t\t\t\t\t\t\t\t\tonResize.call(self); // re-feed our image data\n\t\t\t\t\t\t\t\t});*/\n\n\t\t\t\t\t\t\t\truntime = null; // release\n\t\t\t\t\t\t\t}, 999);\n\n\t\t\t\t\t\t\truntime.exec.call(self, \"ImageView\", \"display\", this.result.uid, width, height);\n\t\t\t\t\t\t\timg.destroy();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\ttr.transport(Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7)), type, {\n\t\t\t\t\t\t\trequired_caps: {\n\t\t\t\t\t\t\t\tdisplay_media: true\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\truntime_order: 'flash,silverlight',\n\t\t\t\t\t\t\tcontainer: el\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tif (!(el = Dom.get(el))) {\n\t\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_NODE_TYPE_ERR);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!this.size) { // only preloaded image objects can be used as source\n\t\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t\t}\n\n\t\t\t\t\t// high-resolution images cannot be consistently handled across the runtimes\n\t\t\t\t\tif (this.width > Image.MAX_RESIZE_WIDTH || this.height > Image.MAX_RESIZE_HEIGHT) {\n\t\t\t\t\t\t//throw new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar imgCopy = new Image();\n\n\t\t\t\t\timgCopy.bind(\"Resize\", function() {\n\t\t\t\t\t\trender.call(this, opts.type, opts.quality);\n\t\t\t\t\t});\n\n\t\t\t\t\timgCopy.bind(\"Load\", function() {\n\t\t\t\t\t\tthis.downsize(opts);\n\t\t\t\t\t});\n\n\t\t\t\t\t// if embedded thumb data is available and dimensions are big enough, use it\n\t\t\t\t\tif (this.meta.thumb && this.meta.thumb.width >= opts.width && this.meta.thumb.height >= opts.height) {\n\t\t\t\t\t\timgCopy.load(this.meta.thumb.data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\timgCopy.clone(this, false);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn imgCopy;\n\t\t\t\t} catch(ex) {\n\t\t\t\t\t// for now simply trigger error event\n\t\t\t\t\tthis.trigger('error', ex.code);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\tProperly destroys the image and frees resources in use. If any. Recommended way to dispose\n\t\t\tmoxie.image.Image object.\n\n\t\t\t@method destroy\n\t\t\t*/\n\t\t\tdestroy: function() {\n\t\t\t\tif (this.ruid) {\n\t\t\t\t\tthis.getRuntime().exec.call(this, 'Image', 'destroy');\n\t\t\t\t\tthis.disconnectRuntime();\n\t\t\t\t}\n\t\t\t\tif (this.meta && this.meta.thumb) {\n\t\t\t\t\t// thumb is blob, make sure we destroy it first\n\t\t\t\t\tthis.meta.thumb.data.destroy();\n\t\t\t\t}\n\t\t\t\tthis.unbindAll();\n\t\t\t}\n\t\t});\n\n\n\t\t// this is here, because in order to bind properly, we need uid, which is created above\n\t\tthis.handleEventProps(dispatches);\n\n\t\tthis.bind('Load Resize', function() {\n\t\t\treturn _updateInfo.call(this); // if operation fails (e.g. image is neither PNG nor JPEG) cancel all pending events\n\t\t}, 999);\n\n\n\t\tfunction _updateInfo(info) {\n\t\t\ttry {\n\t\t\t\tif (!info) {\n\t\t\t\t\tinfo = this.exec('Image', 'getInfo');\n\t\t\t\t}\n\n\t\t\t\tthis.size = info.size;\n\t\t\t\tthis.width = info.width;\n\t\t\t\tthis.height = info.height;\n\t\t\t\tthis.type = info.type;\n\t\t\t\tthis.meta = info.meta;\n\n\t\t\t\t// update file name, only if empty\n\t\t\t\tif (this.name === '') {\n\t\t\t\t\tthis.name = info.name;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t} catch(ex) {\n\t\t\t\tthis.trigger('error', ex.code);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\n\t\tfunction _load(src) {\n\t\t\tvar srcType = Basic.typeOf(src);\n\n\t\t\ttry {\n\t\t\t\t// if source is Image\n\t\t\t\tif (src instanceof Image) {\n\t\t\t\t\tif (!src.size) { // only preloaded image objects can be used as source\n\t\t\t\t\t\tthrow new x.DOMException(x.DOMException.INVALID_STATE_ERR);\n\t\t\t\t\t}\n\t\t\t\t\t_loadFromImage.apply(this, arguments);\n\t\t\t\t}\n\t\t\t\t// if source is o.Blob/o.File\n\t\t\t\telse if (src instanceof Blob) {\n\t\t\t\t\tif (!~Basic.inArray(src.type, ['image/jpeg', 'image/png'])) {\n\t\t\t\t\t\tthrow new x.ImageError(x.ImageError.WRONG_FORMAT);\n\t\t\t\t\t}\n\t\t\t\t\t_loadFromBlob.apply(this, arguments);\n\t\t\t\t}\n\t\t\t\t// if native blob/file\n\t\t\t\telse if (Basic.inArray(srcType, ['blob', 'file']) !== -1) {\n\t\t\t\t\t_load.call(this, new File(null, src), arguments[1]);\n\t\t\t\t}\n\t\t\t\t// if String\n\t\t\t\telse if (srcType === 'string') {\n\t\t\t\t\t// if dataUrl String\n\t\t\t\t\tif (src.substr(0, 5) === 'data:') {\n\t\t\t\t\t\t_load.call(this, new Blob(null, { data: src }), arguments[1]);\n\t\t\t\t\t}\n\t\t\t\t\t// else assume Url, either relative or absolute\n\t\t\t\t\telse {\n\t\t\t\t\t\t_loadFromUrl.apply(this, arguments);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if source seems to be an img node\n\t\t\t\telse if (srcType === 'node' && src.nodeName.toLowerCase() === 'img') {\n\t\t\t\t\t_load.call(this, src.src, arguments[1]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new x.DOMException(x.DOMException.TYPE_MISMATCH_ERR);\n\t\t\t\t}\n\t\t\t} catch(ex) {\n\t\t\t\t// for now simply trigger error event\n\t\t\t\tthis.trigger('error', ex.code);\n\t\t\t}\n\t\t}\n\n\n\t\tfunction _loadFromImage(img, exact) {\n\t\t\tvar runtime = this.connectRuntime(img.ruid);\n\t\t\tthis.ruid = runtime.uid;\n\t\t\truntime.exec.call(this, 'Image', 'loadFromImage', img, (Basic.typeOf(exact) === 'undefined' ? true : exact));\n\t\t}\n\n\n\t\tfunction _loadFromBlob(blob, options) {\n\t\t\tvar self = this;\n\n\t\t\tself.name = blob.name || '';\n\n\t\t\tfunction exec(runtime) {\n\t\t\t\tself.ruid = runtime.uid;\n\t\t\t\truntime.exec.call(self, 'Image', 'loadFromBlob', blob);\n\t\t\t}\n\n\t\t\tif (blob.isDetached()) {\n\t\t\t\tthis.bind('RuntimeInit', function(e, runtime) {\n\t\t\t\t\texec(runtime);\n\t\t\t\t});\n\n\t\t\t\t// convert to object representation\n\t\t\t\tif (options && typeof(options.required_caps) === 'string') {\n\t\t\t\t\toptions.required_caps = Runtime.parseCaps(options.required_caps);\n\t\t\t\t}\n\n\t\t\t\tthis.connectRuntime(Basic.extend({\n\t\t\t\t\trequired_caps: {\n\t\t\t\t\t\taccess_image_binary: true,\n\t\t\t\t\t\tresize_image: true\n\t\t\t\t\t}\n\t\t\t\t}, options));\n\t\t\t} else {\n\t\t\t\texec(this.connectRuntime(blob.ruid));\n\t\t\t}\n\t\t}\n\n\n\t\tfunction _loadFromUrl(url, options) {\n\t\t\tvar self = this, xhr;\n\n\t\t\txhr = new XMLHttpRequest();\n\n\t\t\txhr.open('get', url);\n\t\t\txhr.responseType = 'blob';\n\n\t\t\txhr.onprogress = function(e) {\n\t\t\t\tself.trigger(e);\n\t\t\t};\n\n\t\t\txhr.onload = function() {\n\t\t\t\t_loadFromBlob.call(self, xhr.response, true);\n\t\t\t};\n\n\t\t\txhr.onerror = function(e) {\n\t\t\t\tself.trigger(e);\n\t\t\t};\n\n\t\t\txhr.onloadend = function() {\n\t\t\t\txhr.destroy();\n\t\t\t};\n\n\t\t\txhr.bind('RuntimeError', function(e, err) {\n\t\t\t\tself.trigger('RuntimeError', err);\n\t\t\t});\n\n\t\t\txhr.send(null, options);\n\t\t}\n\t}\n\n\t// virtual world will crash on you if image has a resolution higher than this:\n\tImage.MAX_RESIZE_WIDTH = 8192;\n\tImage.MAX_RESIZE_HEIGHT = 8192;\n\n\tImage.prototype = EventTarget.instance;\n\n\treturn Image;\n});\n\n// Included from: src/javascript/runtime/html5/Runtime.js\n\n/**\n * Runtime.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/*global File:true */\n\n/**\nDefines constructor for HTML5 runtime.\n\n@class moxie/runtime/html5/Runtime\n@private\n*/\ndefine(\"moxie/runtime/html5/Runtime\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/runtime/Runtime\",\n\t\"moxie/core/utils/Env\"\n], function(Basic, x, Runtime, Env) {\n\t\n\tvar type = \"html5\", extensions = {};\n\t\n\tfunction Html5Runtime(options) {\n\t\tvar I = this\n\t\t, Test = Runtime.capTest\n\t\t, True = Runtime.capTrue\n\t\t;\n\n\t\tvar caps = Basic.extend({\n\t\t\t\taccess_binary: Test(window.FileReader || window.File && window.File.getAsDataURL),\n\t\t\t\taccess_image_binary: function() {\n\t\t\t\t\treturn I.can('access_binary') && !!extensions.Image;\n\t\t\t\t},\n\t\t\t\tdisplay_media: Test(\n\t\t\t\t\t(Env.can('create_canvas') || Env.can('use_data_uri_over32kb')) && \n\t\t\t\t\tdefined('moxie/image/Image')\n\t\t\t\t),\n\t\t\t\tdo_cors: Test(window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()),\n\t\t\t\tdrag_and_drop: Test(function() {\n\t\t\t\t\t// this comes directly from Modernizr: http://www.modernizr.com/\n\t\t\t\t\tvar div = document.createElement('div');\n\t\t\t\t\t// IE has support for drag and drop since version 5, but doesn't support dropping files from desktop\n\t\t\t\t\treturn (('draggable' in div) || ('ondragstart' in div && 'ondrop' in div)) && \n\t\t\t\t\t\t(Env.browser !== 'IE' || Env.verComp(Env.version, 9, '>'));\n\t\t\t\t}()),\n\t\t\t\tfilter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest\n\t\t\t\t\treturn !(\n\t\t\t\t\t\t(Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '<')) || \n\t\t\t\t\t\t(Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) || \n\t\t\t\t\t\t(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '<')) ||\n\t\t\t\t\t\t(Env.browser === 'Firefox' && Env.verComp(Env.version, 37, '<'))\n\t\t\t\t\t);\n\t\t\t\t}()),\n\t\t\t\treturn_response_headers: True,\n\t\t\t\treturn_response_type: function(responseType) {\n\t\t\t\t\tif (responseType === 'json' && !!window.JSON) { // we can fake this one even if it's not supported\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} \n\t\t\t\t\treturn Env.can('return_response_type', responseType);\n\t\t\t\t},\n\t\t\t\treturn_status_code: True,\n\t\t\t\treport_upload_progress: Test(window.XMLHttpRequest && new XMLHttpRequest().upload),\n\t\t\t\tresize_image: function() {\n\t\t\t\t\treturn I.can('access_binary') && Env.can('create_canvas');\n\t\t\t\t},\n\t\t\t\tselect_file: function() {\n\t\t\t\t\treturn Env.can('use_fileinput') && window.File;\n\t\t\t\t},\n\t\t\t\tselect_folder: function() {\n\t\t\t\t\treturn I.can('select_file') && (\n\t\t\t\t\t\tEnv.browser === 'Chrome' && Env.verComp(Env.version, 21, '>=') ||\n\t\t\t\t\t\tEnv.browser === 'Firefox' && Env.verComp(Env.version, 42, '>=') // https://developer.mozilla.org/en-US/Firefox/Releases/42\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tselect_multiple: function() {\n\t\t\t\t\t// it is buggy on Safari Windows and iOS\n\t\t\t\t\treturn I.can('select_file') &&\n\t\t\t\t\t\t!(Env.browser === 'Safari' && Env.os === 'Windows') &&\n\t\t\t\t\t\t!(Env.os === 'iOS' && Env.verComp(Env.osVersion, \"7.0.0\", '>') && Env.verComp(Env.osVersion, \"8.0.0\", '<'));\n\t\t\t\t},\n\t\t\t\tsend_binary_string: Test(window.XMLHttpRequest && (new XMLHttpRequest().sendAsBinary || (window.Uint8Array && window.ArrayBuffer))),\n\t\t\t\tsend_custom_headers: Test(window.XMLHttpRequest),\n\t\t\t\tsend_multipart: function() {\n\t\t\t\t\treturn !!(window.XMLHttpRequest && new XMLHttpRequest().upload && window.FormData) || I.can('send_binary_string');\n\t\t\t\t},\n\t\t\t\tslice_blob: Test(window.File && (File.prototype.mozSlice || File.prototype.webkitSlice || File.prototype.slice)),\n\t\t\t\tstream_upload: function(){\n\t\t\t\t\treturn I.can('slice_blob') && I.can('send_multipart');\n\t\t\t\t},\n\t\t\t\tsummon_file_dialog: function() { // yeah... some dirty sniffing here...\n\t\t\t\t\treturn I.can('select_file') && !(\n\t\t\t\t\t\t(Env.browser === 'Firefox' && Env.verComp(Env.version, 4, '<')) ||\n\t\t\t\t\t\t(Env.browser === 'Opera' && Env.verComp(Env.version, 12, '<')) ||\n\t\t\t\t\t\t(Env.browser === 'IE' && Env.verComp(Env.version, 10, '<'))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tupload_filesize: True,\n\t\t\t\tuse_http_method: True\n\t\t\t}, \n\t\t\targuments[2]\n\t\t);\n\n\t\tRuntime.call(this, options, (arguments[1] || type), caps);\n\n\n\t\tBasic.extend(this, {\n\n\t\t\tinit : function() {\n\t\t\t\tthis.trigger(\"Init\");\n\t\t\t},\n\n\t\t\tdestroy: (function(destroy) { // extend default destroy method\n\t\t\t\treturn function() {\n\t\t\t\t\tdestroy.call(I);\n\t\t\t\t\tdestroy = I = null;\n\t\t\t\t};\n\t\t\t}(this.destroy))\n\t\t});\n\n\t\tBasic.extend(this.getShim(), extensions);\n\t}\n\n\tRuntime.addConstructor(type, Html5Runtime);\n\n\treturn extensions;\n});\n\n// Included from: src/javascript/runtime/html5/file/Blob.js\n\n/**\n * Blob.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/file/Blob\n@private\n*/\ndefine(\"moxie/runtime/html5/file/Blob\", [\n\t\"moxie/runtime/html5/Runtime\",\n\t\"moxie/file/Blob\"\n], function(extensions, Blob) {\n\n\tfunction HTML5Blob() {\n\t\tfunction w3cBlobSlice(blob, start, end) {\n\t\t\tvar blobSlice;\n\n\t\t\tif (window.File.prototype.slice) {\n\t\t\t\ttry {\n\t\t\t\t\tblob.slice();\t// depricated version will throw WRONG_ARGUMENTS_ERR exception\n\t\t\t\t\treturn blob.slice(start, end);\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// depricated slice method\n\t\t\t\t\treturn blob.slice(start, end - start);\n\t\t\t\t}\n\t\t\t// slice method got prefixed: https://bugzilla.mozilla.org/show_bug.cgi?id=649672\n\t\t\t} else if ((blobSlice = window.File.prototype.webkitSlice || window.File.prototype.mozSlice)) {\n\t\t\t\treturn blobSlice.call(blob, start, end);\n\t\t\t} else {\n\t\t\t\treturn null; // or throw some exception\n\t\t\t}\n\t\t}\n\n\t\tthis.slice = function() {\n\t\t\treturn new Blob(this.getRuntime().uid, w3cBlobSlice.apply(this, arguments));\n\t\t};\n\n\t\tthis.destroy = function() {\n\t\t\tthis.getRuntime().getShim().removeInstance(this.uid);\n\t\t};\n\t}\n\n\treturn (extensions.Blob = HTML5Blob);\n});\n\n// Included from: src/javascript/core/utils/Events.js\n\n/**\n * Events.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/core/utils/Events\n@public\n@static\n*/\n\ndefine('moxie/core/utils/Events', [\n\t'moxie/core/utils/Basic'\n], function(Basic) {\n\tvar eventhash = {}, uid = 'moxie_' + Basic.guid();\n\t\n\t// IE W3C like event funcs\n\tfunction preventDefault() {\n\t\tthis.returnValue = false;\n\t}\n\n\tfunction stopPropagation() {\n\t\tthis.cancelBubble = true;\n\t}\n\n\t/**\n\tAdds an event handler to the specified object and store reference to the handler\n\tin objects internal Plupload registry (@see removeEvent).\n\t\n\t@method addEvent\n\t@static\n\t@param {Object} obj DOM element like object to add handler to.\n\t@param {String} name Name to add event listener to.\n\t@param {Function} callback Function to call when event occurs.\n\t@param {String} [key] that might be used to add specifity to the event record.\n\t*/\n\tvar addEvent = function(obj, name, callback, key) {\n\t\tvar func, events;\n\t\t\t\t\t\n\t\tname = name.toLowerCase();\n\n\t\t// Add event listener\n\t\tif (obj.addEventListener) {\n\t\t\tfunc = callback;\n\t\t\t\n\t\t\tobj.addEventListener(name, func, false);\n\t\t} else if (obj.attachEvent) {\n\t\t\tfunc = function() {\n\t\t\t\tvar evt = window.event;\n\n\t\t\t\tif (!evt.target) {\n\t\t\t\t\tevt.target = evt.srcElement;\n\t\t\t\t}\n\n\t\t\t\tevt.preventDefault = preventDefault;\n\t\t\t\tevt.stopPropagation = stopPropagation;\n\n\t\t\t\tcallback(evt);\n\t\t\t};\n\n\t\t\tobj.attachEvent('on' + name, func);\n\t\t}\n\t\t\n\t\t// Log event handler to objects internal mOxie registry\n\t\tif (!obj[uid]) {\n\t\t\tobj[uid] = Basic.guid();\n\t\t}\n\t\t\n\t\tif (!eventhash.hasOwnProperty(obj[uid])) {\n\t\t\teventhash[obj[uid]] = {};\n\t\t}\n\t\t\n\t\tevents = eventhash[obj[uid]];\n\t\t\n\t\tif (!events.hasOwnProperty(name)) {\n\t\t\tevents[name] = [];\n\t\t}\n\t\t\t\t\n\t\tevents[name].push({\n\t\t\tfunc: func,\n\t\t\torig: callback, // store original callback for IE\n\t\t\tkey: key\n\t\t});\n\t};\n\t\n\t\n\t/**\n\tRemove event handler from the specified object. If third argument (callback)\n\tis not specified remove all events with the specified name.\n\t\n\t@method removeEvent\n\t@static\n\t@param {Object} obj DOM element to remove event listener(s) from.\n\t@param {String} name Name of event listener to remove.\n\t@param {Function|String} [callback] might be a callback or unique key to match.\n\t*/\n\tvar removeEvent = function(obj, name, callback) {\n\t\tvar type, undef;\n\t\t\n\t\tname = name.toLowerCase();\n\t\t\n\t\tif (obj[uid] && eventhash[obj[uid]] && eventhash[obj[uid]][name]) {\n\t\t\ttype = eventhash[obj[uid]][name];\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\tfor (var i = type.length - 1; i >= 0; i--) {\n\t\t\t// undefined or not, key should match\n\t\t\tif (type[i].orig === callback || type[i].key === callback) {\n\t\t\t\tif (obj.removeEventListener) {\n\t\t\t\t\tobj.removeEventListener(name, type[i].func, false);\n\t\t\t\t} else if (obj.detachEvent) {\n\t\t\t\t\tobj.detachEvent('on'+name, type[i].func);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttype[i].orig = null;\n\t\t\t\ttype[i].func = null;\n\t\t\t\ttype.splice(i, 1);\n\t\t\t\t\n\t\t\t\t// If callback was passed we are done here, otherwise proceed\n\t\t\t\tif (callback !== undef) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If event array got empty, remove it\n\t\tif (!type.length) {\n\t\t\tdelete eventhash[obj[uid]][name];\n\t\t}\n\t\t\n\t\t// If mOxie registry has become empty, remove it\n\t\tif (Basic.isEmptyObj(eventhash[obj[uid]])) {\n\t\t\tdelete eventhash[obj[uid]];\n\t\t\t\n\t\t\t// IE doesn't let you remove DOM object property with - delete\n\t\t\ttry {\n\t\t\t\tdelete obj[uid];\n\t\t\t} catch(e) {\n\t\t\t\tobj[uid] = undef;\n\t\t\t}\n\t\t}\n\t};\n\t\n\t\n\t/**\n\tRemove all kind of events from the specified object\n\t\n\t@method removeAllEvents\n\t@static\n\t@param {Object} obj DOM element to remove event listeners from.\n\t@param {String} [key] unique key to match, when removing events.\n\t*/\n\tvar removeAllEvents = function(obj, key) {\t\t\n\t\tif (!obj || !obj[uid]) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tBasic.each(eventhash[obj[uid]], function(events, name) {\n\t\t\tremoveEvent(obj, name, key);\n\t\t});\n\t};\n\n\treturn {\n\t\taddEvent: addEvent,\n\t\tremoveEvent: removeEvent,\n\t\tremoveAllEvents: removeAllEvents\n\t};\n});\n\n// Included from: src/javascript/runtime/html5/file/FileInput.js\n\n/**\n * FileInput.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/file/FileInput\n@private\n*/\ndefine(\"moxie/runtime/html5/file/FileInput\", [\n\t\"moxie/runtime/html5/Runtime\",\n\t\"moxie/file/File\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/utils/Events\",\n\t\"moxie/core/utils/Mime\",\n\t\"moxie/core/utils/Env\"\n], function(extensions, File, Basic, Dom, Events, Mime, Env) {\n\t\n\tfunction FileInput() {\n\t\tvar _options, _browseBtnZIndex; // save original z-index\n\n\t\tBasic.extend(this, {\n\t\t\tinit: function(options) {\n\t\t\t\tvar comp = this, I = comp.getRuntime(), input, shimContainer, mimes, browseButton, zIndex, top;\n\n\t\t\t\t_options = options;\n\n\t\t\t\t// figure out accept string\n\t\t\t\tmimes = Mime.extList2mimes(_options.accept, I.can('filter_by_extension'));\n\n\t\t\t\tshimContainer = I.getShimContainer();\n\n\t\t\t\tshimContainer.innerHTML = '';\n\n\t\t\t\tinput = Dom.get(I.uid);\n\n\t\t\t\t// prepare file input to be placed underneath the browse_button element\n\t\t\t\tBasic.extend(input.style, {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\theight: '100%'\n\t\t\t\t});\n\n\n\t\t\t\tbrowseButton = Dom.get(_options.browse_button);\n\t\t\t\t_browseBtnZIndex = Dom.getStyle(browseButton, 'z-index') || 'auto';\n\n\t\t\t\t// Route click event to the input[type=file] element for browsers that support such behavior\n\t\t\t\tif (I.can('summon_file_dialog')) {\n\t\t\t\t\tif (Dom.getStyle(browseButton, 'position') === 'static') {\n\t\t\t\t\t\tbrowseButton.style.position = 'relative';\n\t\t\t\t\t}\n\n\t\t\t\t\tEvents.addEvent(browseButton, 'click', function(e) {\n\t\t\t\t\t\tvar input = Dom.get(I.uid);\n\t\t\t\t\t\tif (input && !input.disabled) { // for some reason FF (up to 8.0.1 so far) lets to click disabled input[type=file]\n\t\t\t\t\t\t\tinput.click();\n\t\t\t\t\t\t}\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}, comp.uid);\n\n\t\t\t\t\tcomp.bind('Refresh', function() {\n\t\t\t\t\t\tzIndex = parseInt(_browseBtnZIndex, 10) || 1;\n\n\t\t\t\t\t\tDom.get(_options.browse_button).style.zIndex = zIndex;\n\t\t\t\t\t\tthis.getRuntime().getShimContainer().style.zIndex = zIndex - 1;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t/* Since we have to place input[type=file] on top of the browse_button for some browsers,\n\t\t\t\tbrowse_button loses interactivity, so we restore it here */\n\t\t\t\ttop = I.can('summon_file_dialog') ? browseButton : shimContainer;\n\n\t\t\t\tEvents.addEvent(top, 'mouseover', function() {\n\t\t\t\t\tcomp.trigger('mouseenter');\n\t\t\t\t}, comp.uid);\n\n\t\t\t\tEvents.addEvent(top, 'mouseout', function() {\n\t\t\t\t\tcomp.trigger('mouseleave');\n\t\t\t\t}, comp.uid);\n\n\t\t\t\tEvents.addEvent(top, 'mousedown', function() {\n\t\t\t\t\tcomp.trigger('mousedown');\n\t\t\t\t}, comp.uid);\n\n\t\t\t\tEvents.addEvent(Dom.get(_options.container), 'mouseup', function() {\n\t\t\t\t\tcomp.trigger('mouseup');\n\t\t\t\t}, comp.uid);\n\n\t\t\t\t// it shouldn't be possible to tab into the hidden element\n\t\t\t\t(I.can('summon_file_dialog') ? input : browseButton).setAttribute('tabindex', -1);\n\n\t\t\t\tinput.onchange = function onChange() { // there should be only one handler for this\n\t\t\t\t\tcomp.files = [];\n\n\t\t\t\t\tBasic.each(this.files, function(file) {\n\t\t\t\t\t\tvar relativePath = '';\n\n\t\t\t\t\t\tif (_options.directory) {\n\t\t\t\t\t\t\t// folders are represented by dots, filter them out (Chrome 11+)\n\t\t\t\t\t\t\tif (file.name == \".\") {\n\t\t\t\t\t\t\t\t// if it looks like a folder...\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\n\t\t\t\t\t\tif (file.webkitRelativePath) {\n\t\t\t\t\t\t\trelativePath = '/' + file.webkitRelativePath.replace(/^\\//, '');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfile = new File(I.uid, file);\n\t\t\t\t\t\tfile.relativePath = relativePath;\n\n\t\t\t\t\t\tcomp.files.push(file);\n\t\t\t\t\t});\n\n\t\t\t\t\t// clearing the value enables the user to select the same file again if they want to\n\t\t\t\t\tif (Env.browser !== 'IE' && Env.browser !== 'IEMobile') {\n\t\t\t\t\t\tthis.value = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// in IE input[type=\"file\"] is read-only so the only way to reset it is to re-insert it\n\t\t\t\t\t\tvar clone = this.cloneNode(true);\n\t\t\t\t\t\tthis.parentNode.replaceChild(clone, this);\n\t\t\t\t\t\tclone.onchange = onChange;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (comp.files.length) {\n\t\t\t\t\t\tcomp.trigger('change');\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// ready event is perfectly asynchronous\n\t\t\t\tcomp.trigger({\n\t\t\t\t\ttype: 'ready',\n\t\t\t\t\tasync: true\n\t\t\t\t});\n\n\t\t\t\tshimContainer = null;\n\t\t\t},\n\n\n\t\t\tsetOption: function(name, value) {\n\t\t\t\tvar I = this.getRuntime();\n\t\t\t\tvar input = Dom.get(I.uid);\n\n\t\t\t\tswitch (name) {\n\t\t\t\t\tcase 'accept':\n\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\tvar mimes = value.mimes || Mime.extList2mimes(value, I.can('filter_by_extension'));\n\t\t\t\t\t\t\tinput.setAttribute('accept', mimes.join(','));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinput.removeAttribute('accept');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'directory':\n\t\t\t\t\t\tif (value && I.can('select_folder')) {\n\t\t\t\t\t\t\tinput.setAttribute('directory', '');\n\t\t\t\t\t\t\tinput.setAttribute('webkitdirectory', '');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinput.removeAttribute('directory');\n\t\t\t\t\t\t\tinput.removeAttribute('webkitdirectory');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'multiple':\n\t\t\t\t\t\tif (value && I.can('select_multiple')) {\n\t\t\t\t\t\t\tinput.setAttribute('multiple', '');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinput.removeAttribute('multiple');\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t},\n\n\n\t\t\tdisable: function(state) {\n\t\t\t\tvar I = this.getRuntime(), input;\n\n\t\t\t\tif ((input = Dom.get(I.uid))) {\n\t\t\t\t\tinput.disabled = !!state;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tvar I = this.getRuntime()\n\t\t\t\t, shim = I.getShim()\n\t\t\t\t, shimContainer = I.getShimContainer()\n\t\t\t\t, container = _options && Dom.get(_options.container)\n\t\t\t\t, browseButton = _options && Dom.get(_options.browse_button)\n\t\t\t\t;\n\t\t\t\t\n\t\t\t\tif (container) {\n\t\t\t\t\tEvents.removeAllEvents(container, this.uid);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (browseButton) {\n\t\t\t\t\tEvents.removeAllEvents(browseButton, this.uid);\n\t\t\t\t\tbrowseButton.style.zIndex = _browseBtnZIndex; // reset to original value\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (shimContainer) {\n\t\t\t\t\tEvents.removeAllEvents(shimContainer, this.uid);\n\t\t\t\t\tshimContainer.innerHTML = '';\n\t\t\t\t}\n\n\t\t\t\tshim.removeInstance(this.uid);\n\n\t\t\t\t_options = shimContainer = container = browseButton = shim = null;\n\t\t\t}\n\t\t});\n\t}\n\n\treturn (extensions.FileInput = FileInput);\n});\n\n// Included from: src/javascript/runtime/html5/file/FileDrop.js\n\n/**\n * FileDrop.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/file/FileDrop\n@private\n*/\ndefine(\"moxie/runtime/html5/file/FileDrop\", [\n\t\"moxie/runtime/html5/Runtime\",\n\t'moxie/file/File',\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/utils/Events\",\n\t\"moxie/core/utils/Mime\"\n], function(extensions, File, Basic, Dom, Events, Mime) {\n\t\n\tfunction FileDrop() {\n\t\tvar _files = [], _allowedExts = [], _options, _ruid;\n\n\t\tBasic.extend(this, {\n\t\t\tinit: function(options) {\n\t\t\t\tvar comp = this, dropZone;\n\n\t\t\t\t_options = options;\n\t\t\t\t_ruid = comp.ruid; // every dropped-in file should have a reference to the runtime\n\t\t\t\t_allowedExts = _extractExts(_options.accept);\n\t\t\t\tdropZone = _options.container;\n\n\t\t\t\tEvents.addEvent(dropZone, 'dragover', function(e) {\n\t\t\t\t\tif (!_hasFiles(e)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.dataTransfer.dropEffect = 'copy';\n\t\t\t\t}, comp.uid);\n\n\t\t\t\tEvents.addEvent(dropZone, 'drop', function(e) {\n\t\t\t\t\tif (!_hasFiles(e)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t_files = [];\n\n\t\t\t\t\t// Chrome 21+ accepts folders via Drag'n'Drop\n\t\t\t\t\tif (e.dataTransfer.items && e.dataTransfer.items[0].webkitGetAsEntry) {\n\t\t\t\t\t\t_readItems(e.dataTransfer.items, function() {\n\t\t\t\t\t\t\tcomp.files = _files;\n\t\t\t\t\t\t\tcomp.trigger(\"drop\");\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tBasic.each(e.dataTransfer.files, function(file) {\n\t\t\t\t\t\t\t_addFile(file);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcomp.files = _files;\n\t\t\t\t\t\tcomp.trigger(\"drop\");\n\t\t\t\t\t}\n\t\t\t\t}, comp.uid);\n\n\t\t\t\tEvents.addEvent(dropZone, 'dragenter', function(e) {\n\t\t\t\t\tcomp.trigger(\"dragenter\");\n\t\t\t\t}, comp.uid);\n\n\t\t\t\tEvents.addEvent(dropZone, 'dragleave', function(e) {\n\t\t\t\t\tcomp.trigger(\"dragleave\");\n\t\t\t\t}, comp.uid);\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tEvents.removeAllEvents(_options && Dom.get(_options.container), this.uid);\n\t\t\t\t_ruid = _files = _allowedExts = _options = null;\n\t\t\t\tthis.getRuntime().getShim().removeInstance(this.uid);\n\t\t\t}\n\t\t});\n\n\n\t\tfunction _hasFiles(e) {\n\t\t\tif (!e.dataTransfer || !e.dataTransfer.types) { // e.dataTransfer.files is not available in Gecko during dragover\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar types = Basic.toArray(e.dataTransfer.types || []);\n\n\t\t\treturn Basic.inArray(\"Files\", types) !== -1 ||\n\t\t\t\tBasic.inArray(\"public.file-url\", types) !== -1 || // Safari < 5\n\t\t\t\tBasic.inArray(\"application/x-moz-file\", types) !== -1 // Gecko < 1.9.2 (< Firefox 3.6)\n\t\t\t\t;\n\t\t}\n\n\n\t\tfunction _addFile(file, relativePath) {\n\t\t\tif (_isAcceptable(file)) {\n\t\t\t\tvar fileObj = new File(_ruid, file);\n\t\t\t\tfileObj.relativePath = relativePath || '';\n\t\t\t\t_files.push(fileObj);\n\t\t\t}\n\t\t}\n\n\t\t\n\t\tfunction _extractExts(accept) {\n\t\t\tvar exts = [];\n\t\t\tfor (var i = 0; i < accept.length; i++) {\n\t\t\t\t[].push.apply(exts, accept[i].extensions.split(/\\s*,\\s*/));\n\t\t\t}\n\t\t\treturn Basic.inArray('*', exts) === -1 ? exts : [];\n\t\t}\n\n\n\t\tfunction _isAcceptable(file) {\n\t\t\tif (!_allowedExts.length) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tvar ext = Mime.getFileExtension(file.name);\n\t\t\treturn !ext || Basic.inArray(ext, _allowedExts) !== -1;\n\t\t}\n\n\n\t\tfunction _readItems(items, cb) {\n\t\t\tvar entries = [];\n\t\t\tBasic.each(items, function(item) {\n\t\t\t\tvar entry = item.webkitGetAsEntry();\n\t\t\t\t// Address #998 (https://code.google.com/p/chromium/issues/detail?id=332579)\n\t\t\t\tif (entry) {\n\t\t\t\t\t// file() fails on OSX when the filename contains a special character (e.g. umlaut): see #61\n\t\t\t\t\tif (entry.isFile) {\n\t\t\t\t\t\t_addFile(item.getAsFile(), entry.fullPath);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tentries.push(entry);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif (entries.length) {\n\t\t\t\t_readEntries(entries, cb);\n\t\t\t} else {\n\t\t\t\tcb();\n\t\t\t}\n\t\t}\n\n\n\t\tfunction _readEntries(entries, cb) {\n\t\t\tvar queue = [];\n\t\t\tBasic.each(entries, function(entry) {\n\t\t\t\tqueue.push(function(cbcb) {\n\t\t\t\t\t_readEntry(entry, cbcb);\n\t\t\t\t});\n\t\t\t});\n\t\t\tBasic.inSeries(queue, function() {\n\t\t\t\tcb();\n\t\t\t});\n\t\t}\n\n\n\t\tfunction _readEntry(entry, cb) {\n\t\t\tif (entry.isFile) {\n\t\t\t\tentry.file(function(file) {\n\t\t\t\t\t_addFile(file, entry.fullPath);\n\t\t\t\t\tcb();\n\t\t\t\t}, function() {\n\t\t\t\t\t// fire an error event maybe\n\t\t\t\t\tcb();\n\t\t\t\t});\n\t\t\t} else if (entry.isDirectory) {\n\t\t\t\t_readDirEntry(entry, cb);\n\t\t\t} else {\n\t\t\t\tcb(); // not file, not directory? what then?..\n\t\t\t}\n\t\t}\n\n\n\t\tfunction _readDirEntry(dirEntry, cb) {\n\t\t\tvar entries = [], dirReader = dirEntry.createReader();\n\n\t\t\t// keep quering recursively till no more entries\n\t\t\tfunction getEntries(cbcb) {\n\t\t\t\tdirReader.readEntries(function(moreEntries) {\n\t\t\t\t\tif (moreEntries.length) {\n\t\t\t\t\t\t[].push.apply(entries, moreEntries);\n\t\t\t\t\t\tgetEntries(cbcb);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcbcb();\n\t\t\t\t\t}\n\t\t\t\t}, cbcb);\n\t\t\t}\n\n\t\t\t// ...and you thought FileReader was crazy...\n\t\t\tgetEntries(function() {\n\t\t\t\t_readEntries(entries, cb);\n\t\t\t}); \n\t\t}\n\t}\n\n\treturn (extensions.FileDrop = FileDrop);\n});\n\n// Included from: src/javascript/runtime/html5/file/FileReader.js\n\n/**\n * FileReader.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/file/FileReader\n@private\n*/\ndefine(\"moxie/runtime/html5/file/FileReader\", [\n\t\"moxie/runtime/html5/Runtime\",\n\t\"moxie/core/utils/Encode\",\n\t\"moxie/core/utils/Basic\"\n], function(extensions, Encode, Basic) {\n\t\n\tfunction FileReader() {\n\t\tvar _fr, _convertToBinary = false;\n\n\t\tBasic.extend(this, {\n\n\t\t\tread: function(op, blob) {\n\t\t\t\tvar comp = this;\n\n\t\t\t\tcomp.result = '';\n\n\t\t\t\t_fr = new window.FileReader();\n\n\t\t\t\t_fr.addEventListener('progress', function(e) {\n\t\t\t\t\tcomp.trigger(e);\n\t\t\t\t});\n\n\t\t\t\t_fr.addEventListener('load', function(e) {\n\t\t\t\t\tcomp.result = _convertToBinary ? _toBinary(_fr.result) : _fr.result;\n\t\t\t\t\tcomp.trigger(e);\n\t\t\t\t});\n\n\t\t\t\t_fr.addEventListener('error', function(e) {\n\t\t\t\t\tcomp.trigger(e, _fr.error);\n\t\t\t\t});\n\n\t\t\t\t_fr.addEventListener('loadend', function(e) {\n\t\t\t\t\t_fr = null;\n\t\t\t\t\tcomp.trigger(e);\n\t\t\t\t});\n\n\t\t\t\tif (Basic.typeOf(_fr[op]) === 'function') {\n\t\t\t\t\t_convertToBinary = false;\n\t\t\t\t\t_fr[op](blob.getSource());\n\t\t\t\t} else if (op === 'readAsBinaryString') { // readAsBinaryString is depricated in general and never existed in IE10+\n\t\t\t\t\t_convertToBinary = true;\n\t\t\t\t\t_fr.readAsDataURL(blob.getSource());\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif (_fr) {\n\t\t\t\t\t_fr.abort();\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\t_fr = null;\n\t\t\t\tthis.getRuntime().getShim().removeInstance(this.uid);\n\t\t\t}\n\t\t});\n\n\t\tfunction _toBinary(str) {\n\t\t\treturn Encode.atob(str.substring(str.indexOf('base64,') + 7));\n\t\t}\n\t}\n\n\treturn (extensions.FileReader = FileReader);\n});\n\n// Included from: src/javascript/runtime/html5/xhr/XMLHttpRequest.js\n\n/**\n * XMLHttpRequest.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/*global ActiveXObject:true */\n\n/**\n@class moxie/runtime/html5/xhr/XMLHttpRequest\n@private\n*/\ndefine(\"moxie/runtime/html5/xhr/XMLHttpRequest\", [\n\t\"moxie/runtime/html5/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Mime\",\n\t\"moxie/core/utils/Url\",\n\t\"moxie/file/File\",\n\t\"moxie/file/Blob\",\n\t\"moxie/xhr/FormData\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/core/utils/Env\"\n], function(extensions, Basic, Mime, Url, File, Blob, FormData, x, Env) {\n\t\n\tfunction XMLHttpRequest() {\n\t\tvar self = this\n\t\t, _xhr\n\t\t, _filename\n\t\t;\n\n\t\tBasic.extend(this, {\n\t\t\tsend: function(meta, data) {\n\t\t\t\tvar target = this\n\t\t\t\t, isGecko2_5_6 = (Env.browser === 'Mozilla' && Env.verComp(Env.version, 4, '>=') && Env.verComp(Env.version, 7, '<'))\n\t\t\t\t, isAndroidBrowser = Env.browser === 'Android Browser'\n\t\t\t\t, mustSendAsBinary = false\n\t\t\t\t;\n\n\t\t\t\t// extract file name\n\t\t\t\t_filename = meta.url.replace(/^.+?\\/([\\w\\-\\.]+)$/, '$1').toLowerCase();\n\n\t\t\t\t_xhr = _getNativeXHR();\n\t\t\t\t_xhr.open(meta.method, meta.url, meta.async, meta.user, meta.password);\n\n\n\t\t\t\t// prepare data to be sent\n\t\t\t\tif (data instanceof Blob) {\n\t\t\t\t\tif (data.isDetached()) {\n\t\t\t\t\t\tmustSendAsBinary = true;\n\t\t\t\t\t}\n\t\t\t\t\tdata = data.getSource();\n\t\t\t\t} else if (data instanceof FormData) {\n\n\t\t\t\t\tif (data.hasBlob()) {\n\t\t\t\t\t\tif (data.getBlob().isDetached()) {\n\t\t\t\t\t\t\tdata = _prepareMultipart.call(target, data); // _xhr must be instantiated and be in OPENED state\n\t\t\t\t\t\t\tmustSendAsBinary = true;\n\t\t\t\t\t\t} else if ((isGecko2_5_6 || isAndroidBrowser) && Basic.typeOf(data.getBlob().getSource()) === 'blob' && window.FileReader) {\n\t\t\t\t\t\t\t// Gecko 2/5/6 can't send blob in FormData: https://bugzilla.mozilla.org/show_bug.cgi?id=649150\n\t\t\t\t\t\t\t// Android browsers (default one and Dolphin) seem to have the same issue, see: #613\n\t\t\t\t\t\t\t_preloadAndSend.call(target, meta, data);\n\t\t\t\t\t\t\treturn; // _preloadAndSend will reinvoke send() with transmutated FormData =%D\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\n\t\t\t\t\t// transfer fields to real FormData\n\t\t\t\t\tif (data instanceof FormData) { // if still a FormData, e.g. not mangled by _prepareMultipart()\n\t\t\t\t\t\tvar fd = new window.FormData();\n\t\t\t\t\t\tdata.each(function(value, name) {\n\t\t\t\t\t\t\tif (value instanceof Blob) {\n\t\t\t\t\t\t\t\tfd.append(name, value.getSource());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfd.append(name, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdata = fd;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t// if XHR L2\n\t\t\t\tif (_xhr.upload) {\n\t\t\t\t\tif (meta.withCredentials) {\n\t\t\t\t\t\t_xhr.withCredentials = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t_xhr.addEventListener('load', function(e) {\n\t\t\t\t\t\ttarget.trigger(e);\n\t\t\t\t\t});\n\n\t\t\t\t\t_xhr.addEventListener('error', function(e) {\n\t\t\t\t\t\ttarget.trigger(e);\n\t\t\t\t\t});\n\n\t\t\t\t\t// additionally listen to progress events\n\t\t\t\t\t_xhr.addEventListener('progress', function(e) {\n\t\t\t\t\t\ttarget.trigger(e);\n\t\t\t\t\t});\n\n\t\t\t\t\t_xhr.upload.addEventListener('progress', function(e) {\n\t\t\t\t\t\ttarget.trigger({\n\t\t\t\t\t\t\ttype: 'UploadProgress',\n\t\t\t\t\t\t\tloaded: e.loaded,\n\t\t\t\t\t\t\ttotal: e.total\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t// ... otherwise simulate XHR L2\n\t\t\t\t} else {\n\t\t\t\t\t_xhr.onreadystatechange = function onReadyStateChange() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// fake Level 2 events\n\t\t\t\t\t\tswitch (_xhr.readyState) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 1: // XMLHttpRequest.OPENED\n\t\t\t\t\t\t\t\t// readystatechanged is fired twice for OPENED state (in IE and Mozilla) - neu\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// looks like HEADERS_RECEIVED (state 2) is not reported in Opera (or it's old versions) - neu\n\t\t\t\t\t\t\tcase 2: // XMLHttpRequest.HEADERS_RECEIVED\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase 3: // XMLHttpRequest.LOADING \n\t\t\t\t\t\t\t\t// try to fire progress event for not XHR L2\n\t\t\t\t\t\t\t\tvar total, loaded;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (Url.hasSameOrigin(meta.url)) { // Content-Length not accessible for cross-domain on some browsers\n\t\t\t\t\t\t\t\t\t\ttotal = _xhr.getResponseHeader('Content-Length') || 0; // old Safari throws an exception here\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (_xhr.responseText) { // responseText was introduced in IE7\n\t\t\t\t\t\t\t\t\t\tloaded = _xhr.responseText.length;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch(ex) {\n\t\t\t\t\t\t\t\t\ttotal = loaded = 0;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\ttarget.trigger({\n\t\t\t\t\t\t\t\t\ttype: 'progress',\n\t\t\t\t\t\t\t\t\tlengthComputable: !!total,\n\t\t\t\t\t\t\t\t\ttotal: parseInt(total, 10),\n\t\t\t\t\t\t\t\t\tloaded: loaded\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\t\n\t\t\t\t\t\t\tcase 4: // XMLHttpRequest.DONE\n\t\t\t\t\t\t\t\t// release readystatechange handler (mostly for IE)\n\t\t\t\t\t\t\t\t_xhr.onreadystatechange = function() {};\n\n\t\t\t\t\t\t\t\t// usually status 0 is returned when server is unreachable, but FF also fails to status 0 for 408 timeout\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tif (_xhr.status >= 200 && _xhr.status < 400) {\n\t\t\t\t\t\t\t\t\t\ttarget.trigger('load');\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch(ex) {}\n\n\t\t\t\t\t\t\t\ttarget.trigger('error');\n\t\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\t\n\n\t\t\t\t// set request headers\n\t\t\t\tif (!Basic.isEmptyObj(meta.headers)) {\n\t\t\t\t\tBasic.each(meta.headers, function(value, header) {\n\t\t\t\t\t\t_xhr.setRequestHeader(header, value);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// request response type\n\t\t\t\tif (\"\" !== meta.responseType && 'responseType' in _xhr) {\n\t\t\t\t\tif ('json' === meta.responseType && !Env.can('return_response_type', 'json')) { // we can fake this one\n\t\t\t\t\t\t_xhr.responseType = 'text';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_xhr.responseType = meta.responseType;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// send ...\n\t\t\t\tif (!mustSendAsBinary) {\n\t\t\t\t\t_xhr.send(data);\n\t\t\t\t} else {\n\t\t\t\t\tif (_xhr.sendAsBinary) { // Gecko\n\t\t\t\t\t\t_xhr.sendAsBinary(data);\n\t\t\t\t\t} else { // other browsers having support for typed arrays\n\t\t\t\t\t\t(function() {\n\t\t\t\t\t\t\t// mimic Gecko's sendAsBinary\n\t\t\t\t\t\t\tvar ui8a = new Uint8Array(data.length);\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tui8a[i] = (data.charCodeAt(i) & 0xff);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_xhr.send(ui8a.buffer);\n\t\t\t\t\t\t}());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttarget.trigger('loadstart');\n\t\t\t},\n\n\t\t\tgetStatus: function() {\n\t\t\t\t// according to W3C spec it should return 0 for readyState < 3, but instead it throws an exception\n\t\t\t\ttry {\n\t\t\t\t\tif (_xhr) {\n\t\t\t\t\t\treturn _xhr.status;\n\t\t\t\t\t}\n\t\t\t\t} catch(ex) {}\n\t\t\t\treturn 0;\n\t\t\t},\n\n\t\t\tgetResponse: function(responseType) {\n\t\t\t\tvar I = this.getRuntime();\n\n\t\t\t\ttry {\n\t\t\t\t\tswitch (responseType) {\n\t\t\t\t\t\tcase 'blob':\n\t\t\t\t\t\t\tvar file = new File(I.uid, _xhr.response);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// try to extract file name from content-disposition if possible (might be - not, if CORS for example)\t\n\t\t\t\t\t\t\tvar disposition = _xhr.getResponseHeader('Content-Disposition');\n\t\t\t\t\t\t\tif (disposition) {\n\t\t\t\t\t\t\t\t// extract filename from response header if available\n\t\t\t\t\t\t\t\tvar match = disposition.match(/filename=([\\'\\\"'])([^\\1]+)\\1/);\n\t\t\t\t\t\t\t\tif (match) {\n\t\t\t\t\t\t\t\t\t_filename = match[2];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfile.name = _filename;\n\n\t\t\t\t\t\t\t// pre-webkit Opera doesn't set type property on the blob response\n\t\t\t\t\t\t\tif (!file.type) {\n\t\t\t\t\t\t\t\tfile.type = Mime.getFileMime(_filename);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn file;\n\n\t\t\t\t\t\tcase 'json':\n\t\t\t\t\t\t\tif (!Env.can('return_response_type', 'json')) {\n\t\t\t\t\t\t\t\treturn _xhr.status === 200 && !!window.JSON ? JSON.parse(_xhr.responseText) : null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn _xhr.response;\n\n\t\t\t\t\t\tcase 'document':\n\t\t\t\t\t\t\treturn _getDocument(_xhr);\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn _xhr.responseText !== '' ? _xhr.responseText : null; // against the specs, but for consistency across the runtimes\n\t\t\t\t\t}\n\t\t\t\t} catch(ex) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\t\t\t\t\n\t\t\t},\n\n\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\ttry {\n\t\t\t\t\treturn _xhr.getAllResponseHeaders();\n\t\t\t\t} catch(ex) {}\n\t\t\t\treturn '';\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif (_xhr) {\n\t\t\t\t\t_xhr.abort();\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tself = _filename = null;\n\t\t\t\tthis.getRuntime().getShim().removeInstance(this.uid);\n\t\t\t}\n\t\t});\n\n\n\t\t// here we go... ugly fix for ugly bug\n\t\tfunction _preloadAndSend(meta, data) {\n\t\t\tvar target = this, blob, fr;\n\t\t\t\t\n\t\t\t// get original blob\n\t\t\tblob = data.getBlob().getSource();\n\t\t\t\n\t\t\t// preload blob in memory to be sent as binary string\n\t\t\tfr = new window.FileReader();\n\t\t\tfr.onload = function() {\n\t\t\t\t// overwrite original blob\n\t\t\t\tdata.append(data.getBlobName(), new Blob(null, {\n\t\t\t\t\ttype: blob.type,\n\t\t\t\t\tdata: fr.result\n\t\t\t\t}));\n\t\t\t\t// invoke send operation again\n\t\t\t\tself.send.call(target, meta, data);\n\t\t\t};\n\t\t\tfr.readAsBinaryString(blob);\n\t\t}\n\n\t\t\n\t\tfunction _getNativeXHR() {\n\t\t\tif (window.XMLHttpRequest && !(Env.browser === 'IE' && Env.verComp(Env.version, 8, '<'))) { // IE7 has native XHR but it's buggy\n\t\t\t\treturn new window.XMLHttpRequest();\n\t\t\t} else {\n\t\t\t\treturn (function() {\n\t\t\t\t\tvar progIDs = ['Msxml2.XMLHTTP.6.0', 'Microsoft.XMLHTTP']; // if 6.0 available, use it, otherwise failback to default 3.0\n\t\t\t\t\tfor (var i = 0; i < progIDs.length; i++) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn new ActiveXObject(progIDs[i]);\n\t\t\t\t\t\t} catch (ex) {}\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// @credits Sergey Ilinsky\t(http://www.ilinsky.com/)\n\t\tfunction _getDocument(xhr) {\n\t\t\tvar rXML = xhr.responseXML;\n\t\t\tvar rText = xhr.responseText;\n\t\t\t\n\t\t\t// Try parsing responseText (@see: http://www.ilinsky.com/articles/XMLHttpRequest/#bugs-ie-responseXML-content-type)\n\t\t\tif (Env.browser === 'IE' && rText && rXML && !rXML.documentElement && /[^\\/]+\\/[^\\+]+\\+xml/.test(xhr.getResponseHeader(\"Content-Type\"))) {\n\t\t\t\trXML = new window.ActiveXObject(\"Microsoft.XMLDOM\");\n\t\t\t\trXML.async = false;\n\t\t\t\trXML.validateOnParse = false;\n\t\t\t\trXML.loadXML(rText);\n\t\t\t}\n\t\n\t\t\t// Check if there is no error in document\n\t\t\tif (rXML) {\n\t\t\t\tif ((Env.browser === 'IE' && rXML.parseError !== 0) || !rXML.documentElement || rXML.documentElement.tagName === \"parsererror\") {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rXML;\n\t\t}\n\n\n\t\tfunction _prepareMultipart(fd) {\n\t\t\tvar boundary = '----moxieboundary' + new Date().getTime()\n\t\t\t, dashdash = '--'\n\t\t\t, crlf = '\\r\\n'\n\t\t\t, multipart = ''\n\t\t\t, I = this.getRuntime()\n\t\t\t;\n\n\t\t\tif (!I.can('send_binary_string')) {\n\t\t\t\tthrow new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR);\n\t\t\t}\n\n\t\t\t_xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + boundary);\n\n\t\t\t// append multipart parameters\n\t\t\tfd.each(function(value, name) {\n\t\t\t\t// Firefox 3.6 failed to convert multibyte characters to UTF-8 in sendAsBinary(), \n\t\t\t\t// so we try it here ourselves with: unescape(encodeURIComponent(value))\n\t\t\t\tif (value instanceof Blob) {\n\t\t\t\t\t// Build RFC2388 blob\n\t\t\t\t\tmultipart += dashdash + boundary + crlf +\n\t\t\t\t\t\t'Content-Disposition: form-data; name=\"' + name + '\"; filename=\"' + unescape(encodeURIComponent(value.name || 'blob')) + '\"' + crlf +\n\t\t\t\t\t\t'Content-Type: ' + (value.type || 'application/octet-stream') + crlf + crlf +\n\t\t\t\t\t\tvalue.getSource() + crlf;\n\t\t\t\t} else {\n\t\t\t\t\tmultipart += dashdash + boundary + crlf +\n\t\t\t\t\t\t'Content-Disposition: form-data; name=\"' + name + '\"' + crlf + crlf +\n\t\t\t\t\t\tunescape(encodeURIComponent(value)) + crlf;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmultipart += dashdash + boundary + dashdash + crlf;\n\n\t\t\treturn multipart;\n\t\t}\n\t}\n\n\treturn (extensions.XMLHttpRequest = XMLHttpRequest);\n});\n\n// Included from: src/javascript/runtime/html5/utils/BinaryReader.js\n\n/**\n * BinaryReader.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/utils/BinaryReader\n@private\n*/\ndefine(\"moxie/runtime/html5/utils/BinaryReader\", [\n\t\"moxie/core/utils/Basic\"\n], function(Basic) {\n\n\t\n\tfunction BinaryReader(data) {\n\t\tif (data instanceof ArrayBuffer) {\n\t\t\tArrayBufferReader.apply(this, arguments);\n\t\t} else {\n\t\t\tUTF16StringReader.apply(this, arguments);\n\t\t}\n\t}\n\n\tBasic.extend(BinaryReader.prototype, {\n\t\t\n\t\tlittleEndian: false,\n\n\n\t\tread: function(idx, size) {\n\t\t\tvar sum, mv, i;\n\n\t\t\tif (idx + size > this.length()) {\n\t\t\t\tthrow new Error(\"You are trying to read outside the source boundaries.\");\n\t\t\t}\n\t\t\t\n\t\t\tmv = this.littleEndian \n\t\t\t\t? 0 \n\t\t\t\t: -8 * (size - 1)\n\t\t\t;\n\n\t\t\tfor (i = 0, sum = 0; i < size; i++) {\n\t\t\t\tsum |= (this.readByteAt(idx + i) << Math.abs(mv + i*8));\n\t\t\t}\n\t\t\treturn sum;\n\t\t},\n\n\n\t\twrite: function(idx, num, size) {\n\t\t\tvar mv, i, str = '';\n\n\t\t\tif (idx > this.length()) {\n\t\t\t\tthrow new Error(\"You are trying to write outside the source boundaries.\");\n\t\t\t}\n\n\t\t\tmv = this.littleEndian \n\t\t\t\t? 0 \n\t\t\t\t: -8 * (size - 1)\n\t\t\t;\n\n\t\t\tfor (i = 0; i < size; i++) {\n\t\t\t\tthis.writeByteAt(idx + i, (num >> Math.abs(mv + i*8)) & 255);\n\t\t\t}\n\t\t},\n\n\n\t\tBYTE: function(idx) {\n\t\t\treturn this.read(idx, 1);\n\t\t},\n\n\n\t\tSHORT: function(idx) {\n\t\t\treturn this.read(idx, 2);\n\t\t},\n\n\n\t\tLONG: function(idx) {\n\t\t\treturn this.read(idx, 4);\n\t\t},\n\n\n\t\tSLONG: function(idx) { // 2's complement notation\n\t\t\tvar num = this.read(idx, 4);\n\t\t\treturn (num > 2147483647 ? num - 4294967296 : num);\n\t\t},\n\n\n\t\tCHAR: function(idx) {\n\t\t\treturn String.fromCharCode(this.read(idx, 1));\n\t\t},\n\n\n\t\tSTRING: function(idx, count) {\n\t\t\treturn this.asArray('CHAR', idx, count).join('');\n\t\t},\n\n\n\t\tasArray: function(type, idx, count) {\n\t\t\tvar values = [];\n\n\t\t\tfor (var i = 0; i < count; i++) {\n\t\t\t\tvalues[i] = this[type](idx + i);\n\t\t\t}\n\t\t\treturn values;\n\t\t}\n\t});\n\n\n\tfunction ArrayBufferReader(data) {\n\t\tvar _dv = new DataView(data);\n\n\t\tBasic.extend(this, {\n\t\t\t\n\t\t\treadByteAt: function(idx) {\n\t\t\t\treturn _dv.getUint8(idx);\n\t\t\t},\n\n\n\t\t\twriteByteAt: function(idx, value) {\n\t\t\t\t_dv.setUint8(idx, value);\n\t\t\t},\n\t\t\t\n\n\t\t\tSEGMENT: function(idx, size, value) {\n\t\t\t\tswitch (arguments.length) {\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturn data.slice(idx, idx + size);\n\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturn data.slice(idx);\n\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tif (value === null) {\n\t\t\t\t\t\t\tvalue = new ArrayBuffer();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (value instanceof ArrayBuffer) {\t\t\t\t\t\n\t\t\t\t\t\t\tvar arr = new Uint8Array(this.length() - size + value.byteLength);\n\t\t\t\t\t\t\tif (idx > 0) {\n\t\t\t\t\t\t\t\tarr.set(new Uint8Array(data.slice(0, idx)), 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tarr.set(new Uint8Array(value), idx);\n\t\t\t\t\t\t\tarr.set(new Uint8Array(data.slice(idx + size)), idx + value.byteLength);\n\n\t\t\t\t\t\t\tthis.clear();\n\t\t\t\t\t\t\tdata = arr.buffer;\n\t\t\t\t\t\t\t_dv = new DataView(data);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\tdefault: return data;\n\t\t\t\t}\n\t\t\t},\n\n\n\t\t\tlength: function() {\n\t\t\t\treturn data ? data.byteLength : 0;\n\t\t\t},\n\n\n\t\t\tclear: function() {\n\t\t\t\t_dv = data = null;\n\t\t\t}\n\t\t});\n\t}\n\n\n\tfunction UTF16StringReader(data) {\n\t\tBasic.extend(this, {\n\t\t\t\n\t\t\treadByteAt: function(idx) {\n\t\t\t\treturn data.charCodeAt(idx);\n\t\t\t},\n\n\n\t\t\twriteByteAt: function(idx, value) {\n\t\t\t\tputstr(String.fromCharCode(value), idx, 1);\n\t\t\t},\n\n\n\t\t\tSEGMENT: function(idx, length, segment) {\n\t\t\t\tswitch (arguments.length) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturn data.substr(idx);\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturn data.substr(idx, length);\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tputstr(segment !== null ? segment : '', idx, length);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: return data;\n\t\t\t\t}\n\t\t\t},\n\n\n\t\t\tlength: function() {\n\t\t\t\treturn data ? data.length : 0;\n\t\t\t}, \n\n\t\t\tclear: function() {\n\t\t\t\tdata = null;\n\t\t\t}\n\t\t});\n\n\n\t\tfunction putstr(segment, idx, length) {\n\t\t\tlength = arguments.length === 3 ? length : data.length - idx - 1;\n\t\t\tdata = data.substr(0, idx) + segment + data.substr(length + idx);\n\t\t}\n\t}\n\n\n\treturn BinaryReader;\n});\n\n// Included from: src/javascript/runtime/html5/image/JPEGHeaders.js\n\n/**\n * JPEGHeaders.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n \n/**\n@class moxie/runtime/html5/image/JPEGHeaders\n@private\n*/\ndefine(\"moxie/runtime/html5/image/JPEGHeaders\", [\n\t\"moxie/runtime/html5/utils/BinaryReader\",\n\t\"moxie/core/Exceptions\"\n], function(BinaryReader, x) {\n\t\n\treturn function JPEGHeaders(data) {\n\t\tvar headers = [], _br, idx, marker, length = 0;\n\n\t\t_br = new BinaryReader(data);\n\n\t\t// Check if data is jpeg\n\t\tif (_br.SHORT(0) !== 0xFFD8) {\n\t\t\t_br.clear();\n\t\t\tthrow new x.ImageError(x.ImageError.WRONG_FORMAT);\n\t\t}\n\n\t\tidx = 2;\n\n\t\twhile (idx <= _br.length()) {\n\t\t\tmarker = _br.SHORT(idx);\n\n\t\t\t// omit RST (restart) markers\n\t\t\tif (marker >= 0xFFD0 && marker <= 0xFFD7) {\n\t\t\t\tidx += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// no headers allowed after SOS marker\n\t\t\tif (marker === 0xFFDA || marker === 0xFFD9) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tlength = _br.SHORT(idx + 2) + 2;\n\n\t\t\t// APPn marker detected\n\t\t\tif (marker >= 0xFFE1 && marker <= 0xFFEF) {\n\t\t\t\theaders.push({\n\t\t\t\t\thex: marker,\n\t\t\t\t\tname: 'APP' + (marker & 0x000F),\n\t\t\t\t\tstart: idx,\n\t\t\t\t\tlength: length,\n\t\t\t\t\tsegment: _br.SEGMENT(idx, length)\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tidx += length;\n\t\t}\n\n\t\t_br.clear();\n\n\t\treturn {\n\t\t\theaders: headers,\n\n\t\t\trestore: function(data) {\n\t\t\t\tvar max, i, br;\n\n\t\t\t\tbr = new BinaryReader(data);\n\n\t\t\t\tidx = br.SHORT(2) == 0xFFE0 ? 4 + br.SHORT(4) : 2;\n\n\t\t\t\tfor (i = 0, max = headers.length; i < max; i++) {\n\t\t\t\t\tbr.SEGMENT(idx, 0, headers[i].segment);\n\t\t\t\t\tidx += headers[i].length;\n\t\t\t\t}\n\n\t\t\t\tdata = br.SEGMENT();\n\t\t\t\tbr.clear();\n\t\t\t\treturn data;\n\t\t\t},\n\n\t\t\tstrip: function(data) {\n\t\t\t\tvar br, headers, jpegHeaders, i;\n\n\t\t\t\tjpegHeaders = new JPEGHeaders(data);\n\t\t\t\theaders = jpegHeaders.headers;\n\t\t\t\tjpegHeaders.purge();\n\n\t\t\t\tbr = new BinaryReader(data);\n\n\t\t\t\ti = headers.length;\n\t\t\t\twhile (i--) {\n\t\t\t\t\tbr.SEGMENT(headers[i].start, headers[i].length, '');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdata = br.SEGMENT();\n\t\t\t\tbr.clear();\n\t\t\t\treturn data;\n\t\t\t},\n\n\t\t\tget: function(name) {\n\t\t\t\tvar array = [];\n\n\t\t\t\tfor (var i = 0, max = headers.length; i < max; i++) {\n\t\t\t\t\tif (headers[i].name === name.toUpperCase()) {\n\t\t\t\t\t\tarray.push(headers[i].segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn array;\n\t\t\t},\n\n\t\t\tset: function(name, segment) {\n\t\t\t\tvar array = [], i, ii, max;\n\n\t\t\t\tif (typeof(segment) === 'string') {\n\t\t\t\t\tarray.push(segment);\n\t\t\t\t} else {\n\t\t\t\t\tarray = segment;\n\t\t\t\t}\n\n\t\t\t\tfor (i = ii = 0, max = headers.length; i < max; i++) {\n\t\t\t\t\tif (headers[i].name === name.toUpperCase()) {\n\t\t\t\t\t\theaders[i].segment = array[ii];\n\t\t\t\t\t\theaders[i].length = array[ii].length;\n\t\t\t\t\t\tii++;\n\t\t\t\t\t}\n\t\t\t\t\tif (ii >= array.length) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tpurge: function() {\n\t\t\t\tthis.headers = headers = [];\n\t\t\t}\n\t\t};\n\t};\n});\n\n// Included from: src/javascript/runtime/html5/image/ExifParser.js\n\n/**\n * ExifParser.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/image/ExifParser\n@private\n*/\ndefine(\"moxie/runtime/html5/image/ExifParser\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/html5/utils/BinaryReader\",\n\t\"moxie/core/Exceptions\"\n], function(Basic, BinaryReader, x) {\n\t\n\tfunction ExifParser(data) {\n\t\tvar __super__, tags, tagDescs, offsets, idx, Tiff;\n\t\t\n\t\tBinaryReader.call(this, data);\n\n\t\ttags = {\n\t\t\ttiff: {\n\t\t\t\t/*\n\t\t\t\tThe image orientation viewed in terms of rows and columns.\n\n\t\t\t\t1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.\n\t\t\t\t2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.\n\t\t\t\t3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.\n\t\t\t\t4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.\n\t\t\t\t5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.\n\t\t\t\t6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.\n\t\t\t\t7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.\n\t\t\t\t8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.\n\t\t\t\t*/\n\t\t\t\t0x0112: 'Orientation',\n\t\t\t\t0x010E: 'ImageDescription',\n\t\t\t\t0x010F: 'Make',\n\t\t\t\t0x0110: 'Model',\n\t\t\t\t0x0131: 'Software',\n\t\t\t\t0x8769: 'ExifIFDPointer',\n\t\t\t\t0x8825:\t'GPSInfoIFDPointer'\n\t\t\t},\n\t\t\texif: {\n\t\t\t\t0x9000: 'ExifVersion',\n\t\t\t\t0xA001: 'ColorSpace',\n\t\t\t\t0xA002: 'PixelXDimension',\n\t\t\t\t0xA003: 'PixelYDimension',\n\t\t\t\t0x9003: 'DateTimeOriginal',\n\t\t\t\t0x829A: 'ExposureTime',\n\t\t\t\t0x829D: 'FNumber',\n\t\t\t\t0x8827: 'ISOSpeedRatings',\n\t\t\t\t0x9201: 'ShutterSpeedValue',\n\t\t\t\t0x9202: 'ApertureValue'\t,\n\t\t\t\t0x9207: 'MeteringMode',\n\t\t\t\t0x9208: 'LightSource',\n\t\t\t\t0x9209: 'Flash',\n\t\t\t\t0x920A: 'FocalLength',\n\t\t\t\t0xA402: 'ExposureMode',\n\t\t\t\t0xA403: 'WhiteBalance',\n\t\t\t\t0xA406: 'SceneCaptureType',\n\t\t\t\t0xA404: 'DigitalZoomRatio',\n\t\t\t\t0xA408: 'Contrast',\n\t\t\t\t0xA409: 'Saturation',\n\t\t\t\t0xA40A: 'Sharpness'\n\t\t\t},\n\t\t\tgps: {\n\t\t\t\t0x0000: 'GPSVersionID',\n\t\t\t\t0x0001: 'GPSLatitudeRef',\n\t\t\t\t0x0002: 'GPSLatitude',\n\t\t\t\t0x0003: 'GPSLongitudeRef',\n\t\t\t\t0x0004: 'GPSLongitude'\n\t\t\t},\n\n\t\t\tthumb: {\n\t\t\t\t0x0201: 'JPEGInterchangeFormat',\n\t\t\t\t0x0202: 'JPEGInterchangeFormatLength'\n\t\t\t}\n\t\t};\n\n\t\ttagDescs = {\n\t\t\t'ColorSpace': {\n\t\t\t\t1: 'sRGB',\n\t\t\t\t0: 'Uncalibrated'\n\t\t\t},\n\n\t\t\t'MeteringMode': {\n\t\t\t\t0: 'Unknown',\n\t\t\t\t1: 'Average',\n\t\t\t\t2: 'CenterWeightedAverage',\n\t\t\t\t3: 'Spot',\n\t\t\t\t4: 'MultiSpot',\n\t\t\t\t5: 'Pattern',\n\t\t\t\t6: 'Partial',\n\t\t\t\t255: 'Other'\n\t\t\t},\n\n\t\t\t'LightSource': {\n\t\t\t\t1: 'Daylight',\n\t\t\t\t2: 'Fliorescent',\n\t\t\t\t3: 'Tungsten',\n\t\t\t\t4: 'Flash',\n\t\t\t\t9: 'Fine weather',\n\t\t\t\t10: 'Cloudy weather',\n\t\t\t\t11: 'Shade',\n\t\t\t\t12: 'Daylight fluorescent (D 5700 - 7100K)',\n\t\t\t\t13: 'Day white fluorescent (N 4600 -5400K)',\n\t\t\t\t14: 'Cool white fluorescent (W 3900 - 4500K)',\n\t\t\t\t15: 'White fluorescent (WW 3200 - 3700K)',\n\t\t\t\t17: 'Standard light A',\n\t\t\t\t18: 'Standard light B',\n\t\t\t\t19: 'Standard light C',\n\t\t\t\t20: 'D55',\n\t\t\t\t21: 'D65',\n\t\t\t\t22: 'D75',\n\t\t\t\t23: 'D50',\n\t\t\t\t24: 'ISO studio tungsten',\n\t\t\t\t255: 'Other'\n\t\t\t},\n\n\t\t\t'Flash': {\n\t\t\t\t0x0000: 'Flash did not fire',\n\t\t\t\t0x0001: 'Flash fired',\n\t\t\t\t0x0005: 'Strobe return light not detected',\n\t\t\t\t0x0007: 'Strobe return light detected',\n\t\t\t\t0x0009: 'Flash fired, compulsory flash mode',\n\t\t\t\t0x000D: 'Flash fired, compulsory flash mode, return light not detected',\n\t\t\t\t0x000F: 'Flash fired, compulsory flash mode, return light detected',\n\t\t\t\t0x0010: 'Flash did not fire, compulsory flash mode',\n\t\t\t\t0x0018: 'Flash did not fire, auto mode',\n\t\t\t\t0x0019: 'Flash fired, auto mode',\n\t\t\t\t0x001D: 'Flash fired, auto mode, return light not detected',\n\t\t\t\t0x001F: 'Flash fired, auto mode, return light detected',\n\t\t\t\t0x0020: 'No flash function',\n\t\t\t\t0x0041: 'Flash fired, red-eye reduction mode',\n\t\t\t\t0x0045: 'Flash fired, red-eye reduction mode, return light not detected',\n\t\t\t\t0x0047: 'Flash fired, red-eye reduction mode, return light detected',\n\t\t\t\t0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode',\n\t\t\t\t0x004D: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',\n\t\t\t\t0x004F: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',\n\t\t\t\t0x0059: 'Flash fired, auto mode, red-eye reduction mode',\n\t\t\t\t0x005D: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',\n\t\t\t\t0x005F: 'Flash fired, auto mode, return light detected, red-eye reduction mode'\n\t\t\t},\n\n\t\t\t'ExposureMode': {\n\t\t\t\t0: 'Auto exposure',\n\t\t\t\t1: 'Manual exposure',\n\t\t\t\t2: 'Auto bracket'\n\t\t\t},\n\n\t\t\t'WhiteBalance': {\n\t\t\t\t0: 'Auto white balance',\n\t\t\t\t1: 'Manual white balance'\n\t\t\t},\n\n\t\t\t'SceneCaptureType': {\n\t\t\t\t0: 'Standard',\n\t\t\t\t1: 'Landscape',\n\t\t\t\t2: 'Portrait',\n\t\t\t\t3: 'Night scene'\n\t\t\t},\n\n\t\t\t'Contrast': {\n\t\t\t\t0: 'Normal',\n\t\t\t\t1: 'Soft',\n\t\t\t\t2: 'Hard'\n\t\t\t},\n\n\t\t\t'Saturation': {\n\t\t\t\t0: 'Normal',\n\t\t\t\t1: 'Low saturation',\n\t\t\t\t2: 'High saturation'\n\t\t\t},\n\n\t\t\t'Sharpness': {\n\t\t\t\t0: 'Normal',\n\t\t\t\t1: 'Soft',\n\t\t\t\t2: 'Hard'\n\t\t\t},\n\n\t\t\t// GPS related\n\t\t\t'GPSLatitudeRef': {\n\t\t\t\tN: 'North latitude',\n\t\t\t\tS: 'South latitude'\n\t\t\t},\n\n\t\t\t'GPSLongitudeRef': {\n\t\t\t\tE: 'East longitude',\n\t\t\t\tW: 'West longitude'\n\t\t\t}\n\t\t};\n\n\t\toffsets = {\n\t\t\ttiffHeader: 10\n\t\t};\n\t\t\n\t\tidx = offsets.tiffHeader;\n\n\t\t__super__ = {\n\t\t\tclear: this.clear\n\t\t};\n\n\t\t// Public functions\n\t\tBasic.extend(this, {\n\t\t\t\n\t\t\tread: function() {\n\t\t\t\ttry {\n\t\t\t\t\treturn ExifParser.prototype.read.apply(this, arguments);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\tthrow new x.ImageError(x.ImageError.INVALID_META_ERR);\n\t\t\t\t}\n\t\t\t},\n\n\n\t\t\twrite: function() {\n\t\t\t\ttry {\n\t\t\t\t\treturn ExifParser.prototype.write.apply(this, arguments);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\tthrow new x.ImageError(x.ImageError.INVALID_META_ERR);\n\t\t\t\t}\n\t\t\t},\n\n\n\t\t\tUNDEFINED: function() {\n\t\t\t\treturn this.BYTE.apply(this, arguments);\n\t\t\t},\n\n\n\t\t\tRATIONAL: function(idx) {\n\t\t\t\treturn this.LONG(idx) / this.LONG(idx + 4)\n\t\t\t},\n\n\n\t\t\tSRATIONAL: function(idx) {\n\t\t\t\treturn this.SLONG(idx) / this.SLONG(idx + 4)\n\t\t\t},\n\n\t\t\tASCII: function(idx) {\n\t\t\t\treturn this.CHAR(idx);\n\t\t\t},\n\n\t\t\tTIFF: function() {\n\t\t\t\treturn Tiff || null;\n\t\t\t},\n\n\n\t\t\tEXIF: function() {\n\t\t\t\tvar Exif = null;\n\n\t\t\t\tif (offsets.exifIFD) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tExif = extractTags.call(this, offsets.exifIFD, tags.exif);\n\t\t\t\t\t} catch(ex) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fix formatting of some tags\n\t\t\t\t\tif (Exif.ExifVersion && Basic.typeOf(Exif.ExifVersion) === 'array') {\n\t\t\t\t\t\tfor (var i = 0, exifVersion = ''; i < Exif.ExifVersion.length; i++) {\n\t\t\t\t\t\t\texifVersion += String.fromCharCode(Exif.ExifVersion[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tExif.ExifVersion = exifVersion;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn Exif;\n\t\t\t},\n\n\n\t\t\tGPS: function() {\n\t\t\t\tvar GPS = null;\n\n\t\t\t\tif (offsets.gpsIFD) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tGPS = extractTags.call(this, offsets.gpsIFD, tags.gps);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// iOS devices (and probably some others) do not put in GPSVersionID tag (why?..)\n\t\t\t\t\tif (GPS.GPSVersionID && Basic.typeOf(GPS.GPSVersionID) === 'array') {\n\t\t\t\t\t\tGPS.GPSVersionID = GPS.GPSVersionID.join('.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn GPS;\n\t\t\t},\n\n\n\t\t\tthumb: function() {\n\t\t\t\tif (offsets.IFD1) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar IFD1Tags = extractTags.call(this, offsets.IFD1, tags.thumb);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ('JPEGInterchangeFormat' in IFD1Tags) {\n\t\t\t\t\t\t\treturn this.SEGMENT(offsets.tiffHeader + IFD1Tags.JPEGInterchangeFormat, IFD1Tags.JPEGInterchangeFormatLength);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ex) {}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\n\n\t\t\tsetExif: function(tag, value) {\n\t\t\t\t// Right now only setting of width/height is possible\n\t\t\t\tif (tag !== 'PixelXDimension' && tag !== 'PixelYDimension') { return false; }\n\n\t\t\t\treturn setTag.call(this, 'exif', tag, value);\n\t\t\t},\n\n\n\t\t\tclear: function() {\n\t\t\t\t__super__.clear();\n\t\t\t\tdata = tags = tagDescs = Tiff = offsets = __super__ = null;\n\t\t\t}\n\t\t});\n\n\n\t\t// Check if that's APP1 and that it has EXIF\n\t\tif (this.SHORT(0) !== 0xFFE1 || this.STRING(4, 5).toUpperCase() !== \"EXIF\\0\") {\n\t\t\tthrow new x.ImageError(x.ImageError.INVALID_META_ERR);\n\t\t}\n\n\t\t// Set read order of multi-byte data\n\t\tthis.littleEndian = (this.SHORT(idx) == 0x4949);\n\n\t\t// Check if always present bytes are indeed present\n\t\tif (this.SHORT(idx+=2) !== 0x002A) {\n\t\t\tthrow new x.ImageError(x.ImageError.INVALID_META_ERR);\n\t\t}\n\n\t\toffsets.IFD0 = offsets.tiffHeader + this.LONG(idx += 2);\n\t\tTiff = extractTags.call(this, offsets.IFD0, tags.tiff);\n\n\t\tif ('ExifIFDPointer' in Tiff) {\n\t\t\toffsets.exifIFD = offsets.tiffHeader + Tiff.ExifIFDPointer;\n\t\t\tdelete Tiff.ExifIFDPointer;\n\t\t}\n\n\t\tif ('GPSInfoIFDPointer' in Tiff) {\n\t\t\toffsets.gpsIFD = offsets.tiffHeader + Tiff.GPSInfoIFDPointer;\n\t\t\tdelete Tiff.GPSInfoIFDPointer;\n\t\t}\n\n\t\tif (Basic.isEmptyObj(Tiff)) {\n\t\t\tTiff = null;\n\t\t}\n\n\t\t// check if we have a thumb as well\n\t\tvar IFD1Offset = this.LONG(offsets.IFD0 + this.SHORT(offsets.IFD0) * 12 + 2);\n\t\tif (IFD1Offset) {\n\t\t\toffsets.IFD1 = offsets.tiffHeader + IFD1Offset;\n\t\t}\n\n\n\t\tfunction extractTags(IFD_offset, tags2extract) {\n\t\t\tvar data = this;\n\t\t\tvar length, i, tag, type, count, size, offset, value, values = [], hash = {};\n\t\t\t\n\t\t\tvar types = {\n\t\t\t\t1 : 'BYTE',\n\t\t\t\t7 : 'UNDEFINED',\n\t\t\t\t2 : 'ASCII',\n\t\t\t\t3 : 'SHORT',\n\t\t\t\t4 : 'LONG',\n\t\t\t\t5 : 'RATIONAL',\n\t\t\t\t9 : 'SLONG',\n\t\t\t\t10: 'SRATIONAL'\n\t\t\t};\n\n\t\t\tvar sizes = {\n\t\t\t\t'BYTE' \t\t: 1,\n\t\t\t\t'UNDEFINED'\t: 1,\n\t\t\t\t'ASCII'\t\t: 1,\n\t\t\t\t'SHORT'\t\t: 2,\n\t\t\t\t'LONG' \t\t: 4,\n\t\t\t\t'RATIONAL' \t: 8,\n\t\t\t\t'SLONG'\t\t: 4,\n\t\t\t\t'SRATIONAL'\t: 8\n\t\t\t};\n\n\t\t\tlength = data.SHORT(IFD_offset);\n\n\t\t\t// The size of APP1 including all these elements shall not exceed the 64 Kbytes specified in the JPEG standard.\n\n\t\t\tfor (i = 0; i < length; i++) {\n\t\t\t\tvalues = [];\n\n\t\t\t\t// Set binary reader pointer to beginning of the next tag\n\t\t\t\toffset = IFD_offset + 2 + i*12;\n\n\t\t\t\ttag = tags2extract[data.SHORT(offset)];\n\n\t\t\t\tif (tag === undefined) {\n\t\t\t\t\tcontinue; // Not the tag we requested\n\t\t\t\t}\n\n\t\t\t\ttype = types[data.SHORT(offset+=2)];\n\t\t\t\tcount = data.LONG(offset+=2);\n\t\t\t\tsize = sizes[type];\n\n\t\t\t\tif (!size) {\n\t\t\t\t\tthrow new x.ImageError(x.ImageError.INVALID_META_ERR);\n\t\t\t\t}\n\n\t\t\t\toffset += 4;\n\n\t\t\t\t// tag can only fit 4 bytes of data, if data is larger we should look outside\n\t\t\t\tif (size * count > 4) {\n\t\t\t\t\t// instead of data tag contains an offset of the data\n\t\t\t\t\toffset = data.LONG(offset) + offsets.tiffHeader;\n\t\t\t\t}\n\n\t\t\t\t// in case we left the boundaries of data throw an early exception\n\t\t\t\tif (offset + size * count >= this.length()) {\n\t\t\t\t\tthrow new x.ImageError(x.ImageError.INVALID_META_ERR);\n\t\t\t\t} \n\n\t\t\t\t// special care for the string\n\t\t\t\tif (type === 'ASCII') {\n\t\t\t\t\thash[tag] = Basic.trim(data.STRING(offset, count).replace(/\\0$/, '')); // strip trailing NULL\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tvalues = data.asArray(type, offset, count);\n\t\t\t\t\tvalue = (count == 1 ? values[0] : values);\n\n\t\t\t\t\tif (tagDescs.hasOwnProperty(tag) && typeof value != 'object') {\n\t\t\t\t\t\thash[tag] = tagDescs[tag][value];\n\t\t\t\t\t} else {\n\t\t\t\t\t\thash[tag] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn hash;\n\t\t}\n\n\t\t// At the moment only setting of simple (LONG) values, that do not require offset recalculation, is supported\n\t\tfunction setTag(ifd, tag, value) {\n\t\t\tvar offset, length, tagOffset, valueOffset = 0;\n\n\t\t\t// If tag name passed translate into hex key\n\t\t\tif (typeof(tag) === 'string') {\n\t\t\t\tvar tmpTags = tags[ifd.toLowerCase()];\n\t\t\t\tfor (var hex in tmpTags) {\n\t\t\t\t\tif (tmpTags[hex] === tag) {\n\t\t\t\t\t\ttag = hex;\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\toffset = offsets[ifd.toLowerCase() + 'IFD'];\n\t\t\tlength = this.SHORT(offset);\n\n\t\t\tfor (var i = 0; i < length; i++) {\n\t\t\t\ttagOffset = offset + 12 * i + 2;\n\n\t\t\t\tif (this.SHORT(tagOffset) == tag) {\n\t\t\t\t\tvalueOffset = tagOffset + 8;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!valueOffset) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tthis.write(valueOffset, value, 4);\n\t\t\t} catch(ex) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tExifParser.prototype = BinaryReader.prototype;\n\n\treturn ExifParser;\n});\n\n// Included from: src/javascript/runtime/html5/image/JPEG.js\n\n/**\n * JPEG.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/image/JPEG\n@private\n*/\ndefine(\"moxie/runtime/html5/image/JPEG\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/runtime/html5/image/JPEGHeaders\",\n\t\"moxie/runtime/html5/utils/BinaryReader\",\n\t\"moxie/runtime/html5/image/ExifParser\"\n], function(Basic, x, JPEGHeaders, BinaryReader, ExifParser) {\n\t\n\tfunction JPEG(data) {\n\t\tvar _br, _hm, _ep, _info;\n\n\t\t_br = new BinaryReader(data);\n\n\t\t// check if it is jpeg\n\t\tif (_br.SHORT(0) !== 0xFFD8) {\n\t\t\tthrow new x.ImageError(x.ImageError.WRONG_FORMAT);\n\t\t}\n\n\t\t// backup headers\n\t\t_hm = new JPEGHeaders(data);\n\n\t\t// extract exif info\n\t\ttry {\n\t\t\t_ep = new ExifParser(_hm.get('app1')[0]);\n\t\t} catch(ex) {}\n\n\t\t// get dimensions\n\t\t_info = _getDimensions.call(this);\n\n\t\tBasic.extend(this, {\n\t\t\ttype: 'image/jpeg',\n\n\t\t\tsize: _br.length(),\n\n\t\t\twidth: _info && _info.width || 0,\n\n\t\t\theight: _info && _info.height || 0,\n\n\t\t\tsetExif: function(tag, value) {\n\t\t\t\tif (!_ep) {\n\t\t\t\t\treturn false; // or throw an exception\n\t\t\t\t}\n\n\t\t\t\tif (Basic.typeOf(tag) === 'object') {\n\t\t\t\t\tBasic.each(tag, function(value, tag) {\n\t\t\t\t\t\t_ep.setExif(tag, value);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t_ep.setExif(tag, value);\n\t\t\t\t}\n\n\t\t\t\t// update internal headers\n\t\t\t\t_hm.set('app1', _ep.SEGMENT());\n\t\t\t},\n\n\t\t\twriteHeaders: function() {\n\t\t\t\tif (!arguments.length) {\n\t\t\t\t\t// if no arguments passed, update headers internally\n\t\t\t\t\treturn _hm.restore(data);\n\t\t\t\t}\n\t\t\t\treturn _hm.restore(arguments[0]);\n\t\t\t},\n\n\t\t\tstripHeaders: function(data) {\n\t\t\t\treturn _hm.strip(data);\n\t\t\t},\n\n\t\t\tpurge: function() {\n\t\t\t\t_purge.call(this);\n\t\t\t}\n\t\t});\n\n\t\tif (_ep) {\n\t\t\tthis.meta = {\n\t\t\t\ttiff: _ep.TIFF(),\n\t\t\t\texif: _ep.EXIF(),\n\t\t\t\tgps: _ep.GPS(),\n\t\t\t\tthumb: _getThumb()\n\t\t\t};\n\t\t}\n\n\n\t\tfunction _getDimensions(br) {\n\t\t\tvar idx = 0\n\t\t\t, marker\n\t\t\t, length\n\t\t\t;\n\n\t\t\tif (!br) {\n\t\t\t\tbr = _br;\n\t\t\t}\n\n\t\t\t// examine all through the end, since some images might have very large APP segments\n\t\t\twhile (idx <= br.length()) {\n\t\t\t\tmarker = br.SHORT(idx += 2);\n\n\t\t\t\tif (marker >= 0xFFC0 && marker <= 0xFFC3) { // SOFn\n\t\t\t\t\tidx += 5; // marker (2 bytes) + length (2 bytes) + Sample precision (1 byte)\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: br.SHORT(idx),\n\t\t\t\t\t\twidth: br.SHORT(idx += 2)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tlength = br.SHORT(idx += 2);\n\t\t\t\tidx += length - 2;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\n\t\tfunction _getThumb() {\n\t\t\tvar data = _ep.thumb()\n\t\t\t, br\n\t\t\t, info\n\t\t\t;\n\n\t\t\tif (data) {\n\t\t\t\tbr = new BinaryReader(data);\n\t\t\t\tinfo = _getDimensions(br);\n\t\t\t\tbr.clear();\n\n\t\t\t\tif (info) {\n\t\t\t\t\tinfo.data = data;\n\t\t\t\t\treturn info;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\n\t\tfunction _purge() {\n\t\t\tif (!_ep || !_hm || !_br) { \n\t\t\t\treturn; // ignore any repeating purge requests\n\t\t\t}\n\t\t\t_ep.clear();\n\t\t\t_hm.purge();\n\t\t\t_br.clear();\n\t\t\t_info = _hm = _ep = _br = null;\n\t\t}\n\t}\n\n\treturn JPEG;\n});\n\n// Included from: src/javascript/runtime/html5/image/PNG.js\n\n/**\n * PNG.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/image/PNG\n@private\n*/\ndefine(\"moxie/runtime/html5/image/PNG\", [\n\t\"moxie/core/Exceptions\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/html5/utils/BinaryReader\"\n], function(x, Basic, BinaryReader) {\n\t\n\tfunction PNG(data) {\n\t\tvar _br, _hm, _ep, _info;\n\n\t\t_br = new BinaryReader(data);\n\n\t\t// check if it's png\n\t\t(function() {\n\t\t\tvar idx = 0, i = 0\n\t\t\t, signature = [0x8950, 0x4E47, 0x0D0A, 0x1A0A]\n\t\t\t;\n\n\t\t\tfor (i = 0; i < signature.length; i++, idx += 2) {\n\t\t\t\tif (signature[i] != _br.SHORT(idx)) {\n\t\t\t\t\tthrow new x.ImageError(x.ImageError.WRONG_FORMAT);\n\t\t\t\t}\n\t\t\t}\n\t\t}());\n\n\t\tfunction _getDimensions() {\n\t\t\tvar chunk, idx;\n\n\t\t\tchunk = _getChunkAt.call(this, 8);\n\n\t\t\tif (chunk.type == 'IHDR') {\n\t\t\t\tidx = chunk.start;\n\t\t\t\treturn {\n\t\t\t\t\twidth: _br.LONG(idx),\n\t\t\t\t\theight: _br.LONG(idx += 4)\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\tfunction _purge() {\n\t\t\tif (!_br) {\n\t\t\t\treturn; // ignore any repeating purge requests\n\t\t\t}\n\t\t\t_br.clear();\n\t\t\tdata = _info = _hm = _ep = _br = null;\n\t\t}\n\n\t\t_info = _getDimensions.call(this);\n\n\t\tBasic.extend(this, {\n\t\t\ttype: 'image/png',\n\n\t\t\tsize: _br.length(),\n\n\t\t\twidth: _info.width,\n\n\t\t\theight: _info.height,\n\n\t\t\tpurge: function() {\n\t\t\t\t_purge.call(this);\n\t\t\t}\n\t\t});\n\n\t\t// for PNG we can safely trigger purge automatically, as we do not keep any data for later\n\t\t_purge.call(this);\n\n\t\tfunction _getChunkAt(idx) {\n\t\t\tvar length, type, start, CRC;\n\n\t\t\tlength = _br.LONG(idx);\n\t\t\ttype = _br.STRING(idx += 4, 4);\n\t\t\tstart = idx += 4;\n\t\t\tCRC = _br.LONG(idx + length);\n\n\t\t\treturn {\n\t\t\t\tlength: length,\n\t\t\t\ttype: type,\n\t\t\t\tstart: start,\n\t\t\t\tCRC: CRC\n\t\t\t};\n\t\t}\n\t}\n\n\treturn PNG;\n});\n\n// Included from: src/javascript/runtime/html5/image/ImageInfo.js\n\n/**\n * ImageInfo.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\nOptional image investigation tool for HTML5 runtime. Provides the following features:\n- ability to distinguish image type (JPEG or PNG) by signature\n- ability to extract image width/height directly from it's internals, without preloading in memory (fast)\n- ability to extract APP headers from JPEGs (Exif, GPS, etc)\n- ability to replace width/height tags in extracted JPEG headers\n- ability to restore APP headers, that were for example stripped during image manipulation\n\n@class moxie/runtime/html5/image/ImageInfo\n@private\n@param {String} data Image source as binary string\n*/\ndefine(\"moxie/runtime/html5/image/ImageInfo\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/runtime/html5/image/JPEG\",\n\t\"moxie/runtime/html5/image/PNG\"\n], function(Basic, x, JPEG, PNG) {\n\n\treturn function(data) {\n\t\tvar _cs = [JPEG, PNG], _img;\n\n\t\t// figure out the format, throw: ImageError.WRONG_FORMAT if not supported\n\t\t_img = (function() {\n\t\t\tfor (var i = 0; i < _cs.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\treturn new _cs[i](data);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// console.info(ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new x.ImageError(x.ImageError.WRONG_FORMAT);\n\t\t}());\n\n\t\tBasic.extend(this, {\n\t\t\t/**\n\t\t\tImage Mime Type extracted from it's depths\n\n\t\t\t@property type\n\t\t\t@type {String}\n\t\t\t@default ''\n\t\t\t*/\n\t\t\ttype: '',\n\n\t\t\t/**\n\t\t\tImage size in bytes\n\n\t\t\t@property size\n\t\t\t@type {Number}\n\t\t\t@default 0\n\t\t\t*/\n\t\t\tsize: 0,\n\n\t\t\t/**\n\t\t\tImage width extracted from image source\n\n\t\t\t@property width\n\t\t\t@type {Number}\n\t\t\t@default 0\n\t\t\t*/\n\t\t\twidth: 0,\n\n\t\t\t/**\n\t\t\tImage height extracted from image source\n\n\t\t\t@property height\n\t\t\t@type {Number}\n\t\t\t@default 0\n\t\t\t*/\n\t\t\theight: 0,\n\n\t\t\t/**\n\t\t\tSets Exif tag. Currently applicable only for width and height tags. Obviously works only with JPEGs.\n\n\t\t\t@method setExif\n\t\t\t@param {String} tag Tag to set\n\t\t\t@param {Mixed} value Value to assign to the tag\n\t\t\t*/\n\t\t\tsetExif: function() {},\n\n\t\t\t/**\n\t\t\tRestores headers to the source.\n\n\t\t\t@method writeHeaders\n\t\t\t@param {String} data Image source as binary string\n\t\t\t@return {String} Updated binary string\n\t\t\t*/\n\t\t\twriteHeaders: function(data) {\n\t\t\t\treturn data;\n\t\t\t},\n\n\t\t\t/**\n\t\t\tStrip all headers from the source.\n\n\t\t\t@method stripHeaders\n\t\t\t@param {String} data Image source as binary string\n\t\t\t@return {String} Updated binary string\n\t\t\t*/\n\t\t\tstripHeaders: function(data) {\n\t\t\t\treturn data;\n\t\t\t},\n\n\t\t\t/**\n\t\t\tDispose resources.\n\n\t\t\t@method purge\n\t\t\t*/\n\t\t\tpurge: function() {\n\t\t\t\tdata = null;\n\t\t\t}\n\t\t});\n\n\t\tBasic.extend(this, _img);\n\n\t\tthis.purge = function() {\n\t\t\t_img.purge();\n\t\t\t_img = null;\n\t\t};\n\t};\n});\n\n// Included from: src/javascript/runtime/html5/image/ResizerCanvas.js\n\n/**\n * ResizerCanvas.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n * Resizes image/canvas using canvas\n */\ndefine(\"moxie/runtime/html5/image/ResizerCanvas\", [], function() {\n\n function scale(image, ratio, resample) {\n var sD = image.width > image.height ? 'width' : 'height'; // take the largest side\n var dD = Math.round(image[sD] * ratio);\n var scaleCapped = false;\n\n if (resample !== 'nearest' && (ratio < 0.5 || ratio > 2)) {\n ratio = ratio < 0.5 ? 0.5 : 2;\n scaleCapped = true;\n }\n\n var tCanvas = _scale(image, ratio);\n\n if (scaleCapped) {\n return scale(tCanvas, dD / tCanvas[sD], resample);\n } else {\n return tCanvas;\n }\n }\n\n\n function _scale(image, ratio) {\n var sW = image.width;\n var sH = image.height;\n var dW = Math.round(sW * ratio);\n var dH = Math.round(sH * ratio);\n\n var canvas = document.createElement('canvas');\n canvas.width = dW;\n canvas.height = dH;\n canvas.getContext(\"2d\").drawImage(image, 0, 0, sW, sH, 0, 0, dW, dH);\n\n image = null; // just in case\n return canvas;\n }\n\n return {\n scale: scale\n };\n\n});\n\n// Included from: src/javascript/runtime/html5/image/Image.js\n\n/**\n * Image.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html5/image/Image\n@private\n*/\ndefine(\"moxie/runtime/html5/image/Image\", [\n\t\"moxie/runtime/html5/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/core/utils/Encode\",\n\t\"moxie/file/Blob\",\n\t\"moxie/file/File\",\n\t\"moxie/runtime/html5/image/ImageInfo\",\n\t\"moxie/runtime/html5/image/ResizerCanvas\",\n\t\"moxie/core/utils/Mime\",\n\t\"moxie/core/utils/Env\"\n], function(extensions, Basic, x, Encode, Blob, File, ImageInfo, ResizerCanvas, Mime, Env) {\n\n\tfunction HTML5Image() {\n\t\tvar me = this\n\t\t, _img, _imgInfo, _canvas, _binStr, _blob\n\t\t, _modified = false // is set true whenever image is modified\n\t\t, _preserveHeaders = true\n\t\t;\n\n\t\tBasic.extend(this, {\n\t\t\tloadFromBlob: function(blob) {\n\t\t\t\tvar I = this.getRuntime()\n\t\t\t\t, asBinary = arguments.length > 1 ? arguments[1] : true\n\t\t\t\t;\n\n\t\t\t\tif (!I.can('access_binary')) {\n\t\t\t\t\tthrow new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR);\n\t\t\t\t}\n\n\t\t\t\t_blob = blob;\n\n\t\t\t\tif (blob.isDetached()) {\n\t\t\t\t\t_binStr = blob.getSource();\n\t\t\t\t\t_preload.call(this, _binStr);\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\t_readAsDataUrl.call(this, blob.getSource(), function(dataUrl) {\n\t\t\t\t\t\tif (asBinary) {\n\t\t\t\t\t\t\t_binStr = _toBinary(dataUrl);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_preload.call(this, dataUrl);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tloadFromImage: function(img, exact) {\n\t\t\t\tthis.meta = img.meta;\n\n\t\t\t\t_blob = new File(null, {\n\t\t\t\t\tname: img.name,\n\t\t\t\t\tsize: img.size,\n\t\t\t\t\ttype: img.type\n\t\t\t\t});\n\n\t\t\t\t_preload.call(this, exact ? (_binStr = img.getAsBinaryString()) : img.getAsDataURL());\n\t\t\t},\n\n\t\t\tgetInfo: function() {\n\t\t\t\tvar I = this.getRuntime(), info;\n\n\t\t\t\tif (!_imgInfo && _binStr && I.can('access_image_binary')) {\n\t\t\t\t\t_imgInfo = new ImageInfo(_binStr);\n\t\t\t\t}\n\n\t\t\t\t// this stuff below is definitely having fun with itself\n\t\t\t\tinfo = {\n\t\t\t\t\twidth: _getImg().width || 0,\n\t\t\t\t\theight: _getImg().height || 0,\n\t\t\t\t\ttype: _blob.type || Mime.getFileMime(_blob.name),\n\t\t\t\t\tsize: _binStr && _binStr.length || _blob.size || 0,\n\t\t\t\t\tname: _blob.name || '',\n\t\t\t\t\tmeta: null\n\t\t\t\t};\n\n\t\t\t\tif (_preserveHeaders) {\n\t\t\t\t\tinfo.meta = _imgInfo && _imgInfo.meta || this.meta || {};\n\n\t\t\t\t\t// if data was taken from ImageInfo it will be a binary string, so we convert it to blob\n\t\t\t\t\tif (info.meta && info.meta.thumb && !(info.meta.thumb.data instanceof Blob)) {\n\t\t\t\t\t\tinfo.meta.thumb.data = new Blob(null, {\n\t\t\t\t\t\t\ttype: 'image/jpeg',\n\t\t\t\t\t\t\tdata: info.meta.thumb.data\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn info;\n\t\t\t},\n\n\n\t\t\tresize: function(rect, ratio, options) {\n\t\t\t\tvar canvas = document.createElement('canvas');\n\t\t\t\tcanvas.width = rect.width;\n\t\t\t\tcanvas.height = rect.height;\n\n\t\t\t\tcanvas.getContext(\"2d\").drawImage(_getImg(), rect.x, rect.y, rect.width, rect.height, 0, 0, canvas.width, canvas.height);\n\n\t\t\t\t_canvas = ResizerCanvas.scale(canvas, ratio);\n\n\t\t\t\t_preserveHeaders = options.preserveHeaders;\n\n\t\t\t\t// rotate if required, according to orientation tag\n\t\t\t\tif (!_preserveHeaders) {\n\t\t\t\t\tvar orientation = (this.meta && this.meta.tiff && this.meta.tiff.Orientation) || 1;\n\t\t\t\t\t_canvas = _rotateToOrientaion(_canvas, orientation);\n\t\t\t\t}\n\n\t\t\t\tthis.width = _canvas.width;\n\t\t\t\tthis.height = _canvas.height;\n\n\t\t\t\t_modified = true;\n\n\t\t\t\tthis.trigger('Resize');\n\t\t\t},\n\n\t\t\tgetAsCanvas: function() {\n\t\t\t\tif (!_canvas) {\n\t\t\t\t\t_canvas = _getCanvas();\n\t\t\t\t}\n\t\t\t\t_canvas.id = this.uid + '_canvas';\n\t\t\t\treturn _canvas;\n\t\t\t},\n\n\t\t\tgetAsBlob: function(type, quality) {\n\t\t\t\tif (type !== this.type) {\n\t\t\t\t\t_modified = true; // reconsider the state\n\t\t\t\t\treturn new File(null, {\n\t\t\t\t\t\tname: _blob.name || '',\n\t\t\t\t\t\ttype: type,\n\t\t\t\t\t\tdata: me.getAsDataURL(type, quality)\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn new File(null, {\n\t\t\t\t\tname: _blob.name || '',\n\t\t\t\t\ttype: type,\n\t\t\t\t\tdata: me.getAsBinaryString(type, quality)\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tgetAsDataURL: function(type) {\n\t\t\t\tvar quality = arguments[1] || 90;\n\n\t\t\t\t// if image has not been modified, return the source right away\n\t\t\t\tif (!_modified) {\n\t\t\t\t\treturn _img.src;\n\t\t\t\t}\n\n\t\t\t\t// make sure we have a canvas to work with\n\t\t\t\t_getCanvas();\n\n\t\t\t\tif ('image/jpeg' !== type) {\n\t\t\t\t\treturn _canvas.toDataURL('image/png');\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// older Geckos used to result in an exception on quality argument\n\t\t\t\t\t\treturn _canvas.toDataURL('image/jpeg', quality/100);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\treturn _canvas.toDataURL('image/jpeg');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetAsBinaryString: function(type, quality) {\n\t\t\t\t// if image has not been modified, return the source right away\n\t\t\t\tif (!_modified) {\n\t\t\t\t\t// if image was not loaded from binary string\n\t\t\t\t\tif (!_binStr) {\n\t\t\t\t\t\t_binStr = _toBinary(me.getAsDataURL(type, quality));\n\t\t\t\t\t}\n\t\t\t\t\treturn _binStr;\n\t\t\t\t}\n\n\t\t\t\tif ('image/jpeg' !== type) {\n\t\t\t\t\t_binStr = _toBinary(me.getAsDataURL(type, quality));\n\t\t\t\t} else {\n\t\t\t\t\tvar dataUrl;\n\n\t\t\t\t\t// if jpeg\n\t\t\t\t\tif (!quality) {\n\t\t\t\t\t\tquality = 90;\n\t\t\t\t\t}\n\n\t\t\t\t\t// make sure we have a canvas to work with\n\t\t\t\t\t_getCanvas();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// older Geckos used to result in an exception on quality argument\n\t\t\t\t\t\tdataUrl = _canvas.toDataURL('image/jpeg', quality/100);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tdataUrl = _canvas.toDataURL('image/jpeg');\n\t\t\t\t\t}\n\n\t\t\t\t\t_binStr = _toBinary(dataUrl);\n\n\t\t\t\t\tif (_imgInfo) {\n\t\t\t\t\t\t_binStr = _imgInfo.stripHeaders(_binStr);\n\n\t\t\t\t\t\tif (_preserveHeaders) {\n\t\t\t\t\t\t\t// update dimensions info in exif\n\t\t\t\t\t\t\tif (_imgInfo.meta && _imgInfo.meta.exif) {\n\t\t\t\t\t\t\t\t_imgInfo.setExif({\n\t\t\t\t\t\t\t\t\tPixelXDimension: this.width,\n\t\t\t\t\t\t\t\t\tPixelYDimension: this.height\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\t// re-inject the headers\n\t\t\t\t\t\t\t_binStr = _imgInfo.writeHeaders(_binStr);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// will be re-created from fresh on next getInfo call\n\t\t\t\t\t\t_imgInfo.purge();\n\t\t\t\t\t\t_imgInfo = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t_modified = false;\n\n\t\t\t\treturn _binStr;\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tme = null;\n\t\t\t\t_purge.call(this);\n\t\t\t\tthis.getRuntime().getShim().removeInstance(this.uid);\n\t\t\t}\n\t\t});\n\n\n\t\tfunction _getImg() {\n\t\t\tif (!_canvas && !_img) {\n\t\t\t\tthrow new x.ImageError(x.DOMException.INVALID_STATE_ERR);\n\t\t\t}\n\t\t\treturn _canvas || _img;\n\t\t}\n\n\n\t\tfunction _getCanvas() {\n\t\t\tvar canvas = _getImg();\n\t\t\tif (canvas.nodeName.toLowerCase() == 'canvas') {\n\t\t\t\treturn canvas;\n\t\t\t}\n\t\t\t_canvas = document.createElement('canvas');\n\t\t\t_canvas.width = canvas.width;\n\t\t\t_canvas.height = canvas.height;\n\t\t\t_canvas.getContext(\"2d\").drawImage(canvas, 0, 0);\n\t\t\treturn _canvas;\n\t\t}\n\n\n\t\tfunction _toBinary(str) {\n\t\t\treturn Encode.atob(str.substring(str.indexOf('base64,') + 7));\n\t\t}\n\n\n\t\tfunction _toDataUrl(str, type) {\n\t\t\treturn 'data:' + (type || '') + ';base64,' + Encode.btoa(str);\n\t\t}\n\n\n\t\tfunction _preload(str) {\n\t\t\tvar comp = this;\n\n\t\t\t_img = new Image();\n\t\t\t_img.onerror = function() {\n\t\t\t\t_purge.call(this);\n\t\t\t\tcomp.trigger('error', x.ImageError.WRONG_FORMAT);\n\t\t\t};\n\t\t\t_img.onload = function() {\n\t\t\t\tcomp.trigger('load');\n\t\t\t};\n\n\t\t\t_img.src = str.substr(0, 5) == 'data:' ? str : _toDataUrl(str, _blob.type);\n\t\t}\n\n\n\t\tfunction _readAsDataUrl(file, callback) {\n\t\t\tvar comp = this, fr;\n\n\t\t\t// use FileReader if it's available\n\t\t\tif (window.FileReader) {\n\t\t\t\tfr = new FileReader();\n\t\t\t\tfr.onload = function() {\n\t\t\t\t\tcallback.call(comp, this.result);\n\t\t\t\t};\n\t\t\t\tfr.onerror = function() {\n\t\t\t\t\tcomp.trigger('error', x.ImageError.WRONG_FORMAT);\n\t\t\t\t};\n\t\t\t\tfr.readAsDataURL(file);\n\t\t\t} else {\n\t\t\t\treturn callback.call(this, file.getAsDataURL());\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t* Transform canvas coordination according to specified frame size and orientation\n\t\t* Orientation value is from EXIF tag\n\t\t* @author Shinichi Tomita \n\t\t*/\n\t\tfunction _rotateToOrientaion(img, orientation) {\n\t\t\tvar RADIANS = Math.PI/180;\n\t\t\tvar canvas = document.createElement('canvas');\n\t\t\tvar ctx = canvas.getContext('2d');\n\t\t\tvar width = img.width;\n\t\t\tvar height = img.height;\n\n\t\t\tif (Basic.inArray(orientation, [5,6,7,8]) > -1) {\n\t\t\t\tcanvas.width = height;\n\t\t\t\tcanvas.height = width;\n\t\t\t} else {\n\t\t\t\tcanvas.width = width;\n\t\t\t\tcanvas.height = height;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t1 = The 0th row is at the visual top of the image, and the 0th column is the visual left-hand side.\n\t\t\t2 = The 0th row is at the visual top of the image, and the 0th column is the visual right-hand side.\n\t\t\t3 = The 0th row is at the visual bottom of the image, and the 0th column is the visual right-hand side.\n\t\t\t4 = The 0th row is at the visual bottom of the image, and the 0th column is the visual left-hand side.\n\t\t\t5 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual top.\n\t\t\t6 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual top.\n\t\t\t7 = The 0th row is the visual right-hand side of the image, and the 0th column is the visual bottom.\n\t\t\t8 = The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.\n\t\t\t*/\n\t\t\tswitch (orientation) {\n\t\t\t\tcase 2:\n\t\t\t\t\t// horizontal flip\n\t\t\t\t\tctx.translate(width, 0);\n\t\t\t\t\tctx.scale(-1, 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t// 180 rotate left\n\t\t\t\t\tctx.translate(width, height);\n\t\t\t\t\tctx.rotate(180 * RADIANS);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t// vertical flip\n\t\t\t\t\tctx.translate(0, height);\n\t\t\t\t\tctx.scale(1, -1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t// vertical flip + 90 rotate right\n\t\t\t\t\tctx.rotate(90 * RADIANS);\n\t\t\t\t\tctx.scale(1, -1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t// 90 rotate right\n\t\t\t\t\tctx.rotate(90 * RADIANS);\n\t\t\t\t\tctx.translate(0, -height);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\t// horizontal flip + 90 rotate right\n\t\t\t\t\tctx.rotate(90 * RADIANS);\n\t\t\t\t\tctx.translate(width, -height);\n\t\t\t\t\tctx.scale(-1, 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\t// 90 rotate left\n\t\t\t\t\tctx.rotate(-90 * RADIANS);\n\t\t\t\t\tctx.translate(-width, 0);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tctx.drawImage(img, 0, 0, width, height);\n\t\t\treturn canvas;\n\t\t}\n\n\n\t\tfunction _purge() {\n\t\t\tif (_imgInfo) {\n\t\t\t\t_imgInfo.purge();\n\t\t\t\t_imgInfo = null;\n\t\t\t}\n\n\t\t\t_binStr = _img = _canvas = _blob = null;\n\t\t\t_modified = false;\n\t\t}\n\t}\n\n\treturn (extensions.Image = HTML5Image);\n});\n\n// Included from: src/javascript/runtime/flash/Runtime.js\n\n/**\n * Runtime.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/*global ActiveXObject:true */\n\n/**\nDefines constructor for Flash runtime.\n\n@class moxie/runtime/flash/Runtime\n@private\n*/\ndefine(\"moxie/runtime/flash/Runtime\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Env\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/runtime/Runtime\"\n], function(Basic, Env, Dom, x, Runtime) {\n\t\n\tvar type = 'flash', extensions = {};\n\n\t/**\n\tGet the version of the Flash Player\n\n\t@method getShimVersion\n\t@private\n\t@return {Number} Flash Player version\n\t*/\n\tfunction getShimVersion() {\n\t\tvar version;\n\n\t\ttry {\n\t\t\tversion = navigator.plugins['Shockwave Flash'];\n\t\t\tversion = version.description;\n\t\t} catch (e1) {\n\t\t\ttry {\n\t\t\t\tversion = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');\n\t\t\t} catch (e2) {\n\t\t\t\tversion = '0.0';\n\t\t\t}\n\t\t}\n\t\tversion = version.match(/\\d+/g);\n\t\treturn parseFloat(version[0] + '.' + version[1]);\n\t}\n\n\n\t/**\n\tCross-browser SWF removal\n \t- Especially needed to safely and completely remove a SWF in Internet Explorer\n\n \tOriginated from SWFObject v2.2 \n\t*/\n\tfunction removeSWF(id) {\n var obj = Dom.get(id);\n if (obj && obj.nodeName == \"OBJECT\") {\n if (Env.browser === 'IE') {\n obj.style.display = \"none\";\n (function onInit(){\n \t// http://msdn.microsoft.com/en-us/library/ie/ms534360(v=vs.85).aspx\n if (obj.readyState == 4) {\n removeObjectInIE(id);\n }\n else {\n setTimeout(onInit, 10);\n }\n })();\n }\n else {\n obj.parentNode.removeChild(obj);\n }\n }\n }\n\n\n\tfunction removeObjectInIE(id) {\n var obj = Dom.get(id);\n if (obj) {\n for (var i in obj) {\n if (typeof obj[i] == \"function\") {\n obj[i] = null;\n }\n }\n obj.parentNode.removeChild(obj);\n }\n }\n\n\t/**\n\tConstructor for the Flash Runtime\n\t*/\n\tfunction FlashRuntime(options) {\n\t\tvar I = this, initTimer;\n\n\t\toptions = Basic.extend({ swf_url: Env.swf_url }, options);\n\n\t\tRuntime.call(this, options, type, {\n\t\t\taccess_binary: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\taccess_image_binary: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\tdisplay_media: Runtime.capTest(defined('moxie/image/Image')),\n\t\t\tdo_cors: Runtime.capTrue,\n\t\t\tdrag_and_drop: false,\n\t\t\treport_upload_progress: function() {\n\t\t\t\treturn I.mode === 'client';\n\t\t\t},\n\t\t\tresize_image: Runtime.capTrue,\n\t\t\treturn_response_headers: false,\n\t\t\treturn_response_type: function(responseType) {\n\t\t\t\tif (responseType === 'json' && !!window.JSON) {\n\t\t\t\t\treturn true;\n\t\t\t\t} \n\t\t\t\treturn !Basic.arrayDiff(responseType, ['', 'text', 'document']) || I.mode === 'browser';\n\t\t\t},\n\t\t\treturn_status_code: function(code) {\n\t\t\t\treturn I.mode === 'browser' || !Basic.arrayDiff(code, [200, 404]);\n\t\t\t},\n\t\t\tselect_file: Runtime.capTrue,\n\t\t\tselect_multiple: Runtime.capTrue,\n\t\t\tsend_binary_string: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\tsend_browser_cookies: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\tsend_custom_headers: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\tsend_multipart: Runtime.capTrue,\n\t\t\tslice_blob: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\tstream_upload: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\tsummon_file_dialog: false,\n\t\t\tupload_filesize: function(size) {\n\t\t\t\treturn Basic.parseSizeStr(size) <= 2097152 || I.mode === 'client';\n\t\t\t},\n\t\t\tuse_http_method: function(methods) {\n\t\t\t\treturn !Basic.arrayDiff(methods, ['GET', 'POST']);\n\t\t\t}\n\t\t}, { \n\t\t\t// capabilities that require specific mode\n\t\t\taccess_binary: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\taccess_image_binary: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\treport_upload_progress: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\treturn_response_type: function(responseType) {\n\t\t\t\treturn Basic.arrayDiff(responseType, ['', 'text', 'json', 'document']) ? 'browser' : ['client', 'browser'];\n\t\t\t},\n\t\t\treturn_status_code: function(code) {\n\t\t\t\treturn Basic.arrayDiff(code, [200, 404]) ? 'browser' : ['client', 'browser'];\n\t\t\t},\n\t\t\tsend_binary_string: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\tsend_browser_cookies: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\tsend_custom_headers: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\tslice_blob: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\tstream_upload: function(value) {\n\t\t\t\treturn value ? 'client' : 'browser';\n\t\t\t},\n\t\t\tupload_filesize: function(size) {\n\t\t\t\treturn Basic.parseSizeStr(size) >= 2097152 ? 'client' : 'browser';\n\t\t\t}\n\t\t}, 'client');\n\n\n\t\t// minimal requirement for Flash Player version\n\t\tif (getShimVersion() < 11.3) {\n\t\t\tif (MXI_DEBUG && Env.debug.runtime) {\n\t\t\t\tEnv.log(\"\\tFlash didn't meet minimal version requirement (11.3).\");\t\n\t\t\t}\n\n\t\t\tthis.mode = false; // with falsy mode, runtime won't operable, no matter what the mode was before\n\t\t}\n\n\n\t\tBasic.extend(this, {\n\n\t\t\tgetShim: function() {\n\t\t\t\treturn Dom.get(this.uid);\n\t\t\t},\n\n\t\t\tshimExec: function(component, action) {\n\t\t\t\tvar args = [].slice.call(arguments, 2);\n\t\t\t\treturn I.getShim().exec(this.uid, component, action, args);\n\t\t\t},\n\n\t\t\tinit: function() {\n\t\t\t\tvar html, el, container;\n\n\t\t\t\tcontainer = this.getShimContainer();\n\n\t\t\t\t// if not the minimal height, shims are not initialized in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc)\n\t\t\t\tBasic.extend(container.style, {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\ttop: '-8px',\n\t\t\t\t\tleft: '-8px',\n\t\t\t\t\twidth: '9px',\n\t\t\t\t\theight: '9px',\n\t\t\t\t\toverflow: 'hidden'\n\t\t\t\t});\n\n\t\t\t\t// insert flash object\n\t\t\t\thtml = '' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t'';\n\n\t\t\t\tif (Env.browser === 'IE') {\n\t\t\t\t\tel = document.createElement('div');\n\t\t\t\t\tcontainer.appendChild(el);\n\t\t\t\t\tel.outerHTML = html;\n\t\t\t\t\tel = container = null; // just in case\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.innerHTML = html;\n\t\t\t\t}\n\n\t\t\t\t// Init is dispatched by the shim\n\t\t\t\tinitTimer = setTimeout(function() {\n\t\t\t\t\tif (I && !I.initialized) { // runtime might be already destroyed by this moment\n\t\t\t\t\t\tI.trigger(\"Error\", new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR));\n\n\t\t\t\t\t\tif (MXI_DEBUG && Env.debug.runtime) {\n\t\t\t\t\t\t\tEnv.log(\"\\tFlash failed to initialize within a specified period of time (typically 5s).\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, 5000);\n\t\t\t},\n\n\t\t\tdestroy: (function(destroy) { // extend default destroy method\n\t\t\t\treturn function() {\n\t\t\t\t\tremoveSWF(I.uid); // SWF removal requires special care in IE\n\n\t\t\t\t\tdestroy.call(I);\n\t\t\t\t\tclearTimeout(initTimer); // initialization check might be still onwait\n\t\t\t\t\toptions = initTimer = destroy = I = null;\n\t\t\t\t};\n\t\t\t}(this.destroy))\n\n\t\t}, extensions);\n\t}\n\n\tRuntime.addConstructor(type, FlashRuntime);\n\n\treturn extensions;\n});\n\n// Included from: src/javascript/runtime/flash/file/Blob.js\n\n/**\n * Blob.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/flash/file/Blob\n@private\n*/\ndefine(\"moxie/runtime/flash/file/Blob\", [\n\t\"moxie/runtime/flash/Runtime\",\n\t\"moxie/file/Blob\"\n], function(extensions, Blob) {\n\n\tvar FlashBlob = {\n\t\tslice: function(blob, start, end, type) {\n\t\t\tvar self = this.getRuntime();\n\n\t\t\tif (start < 0) {\n\t\t\t\tstart = Math.max(blob.size + start, 0);\n\t\t\t} else if (start > 0) {\n\t\t\t\tstart = Math.min(start, blob.size);\n\t\t\t}\n\n\t\t\tif (end < 0) {\n\t\t\t\tend = Math.max(blob.size + end, 0);\n\t\t\t} else if (end > 0) {\n\t\t\t\tend = Math.min(end, blob.size);\n\t\t\t}\n\n\t\t\tblob = self.shimExec.call(this, 'Blob', 'slice', start, end, type || '');\n\n\t\t\tif (blob) {\n\t\t\t\tblob = new Blob(self.uid, blob);\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t};\n\n\treturn (extensions.Blob = FlashBlob);\n});\n\n// Included from: src/javascript/runtime/flash/file/FileInput.js\n\n/**\n * FileInput.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/flash/file/FileInput\n@private\n*/\ndefine(\"moxie/runtime/flash/file/FileInput\", [\n\t\"moxie/runtime/flash/Runtime\",\n\t\"moxie/file/File\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/utils/Basic\"\n], function(extensions, File, Dom, Basic) {\n\n\tvar FileInput = {\n\t\tinit: function(options) {\n\t\t\tvar comp = this, I = this.getRuntime();\n\t\t\tvar browseButton = Dom.get(options.browse_button);\n\n\t\t\tif (browseButton) {\n\t\t\t\tbrowseButton.setAttribute('tabindex', -1);\n\t\t\t\tbrowseButton = null;\n\t\t\t}\n\n\t\t\tthis.bind(\"Change\", function() {\n\t\t\t\tvar files = I.shimExec.call(comp, 'FileInput', 'getFiles');\n\t\t\t\tcomp.files = [];\n\t\t\t\tBasic.each(files, function(file) {\n\t\t\t\t\tcomp.files.push(new File(I.uid, file));\n\t\t\t\t});\n\t\t\t}, 999);\n\n\t\t\tthis.getRuntime().shimExec.call(this, 'FileInput', 'init', {\n\t\t\t\taccept: options.accept,\n\t\t\t\tmultiple: options.multiple\n\t\t\t});\n\n\t\t\tthis.trigger('ready');\n\t\t}\n\t};\n\n\treturn (extensions.FileInput = FileInput);\n});\n\n// Included from: src/javascript/runtime/flash/file/FileReader.js\n\n/**\n * FileReader.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/flash/file/FileReader\n@private\n*/\ndefine(\"moxie/runtime/flash/file/FileReader\", [\n\t\"moxie/runtime/flash/Runtime\",\n\t\"moxie/core/utils/Encode\"\n], function(extensions, Encode) {\n\n\tfunction _formatData(data, op) {\n\t\tswitch (op) {\n\t\t\tcase 'readAsText':\n\t\t\t\treturn Encode.atob(data, 'utf8');\n\t\t\tcase 'readAsBinaryString':\n\t\t\t\treturn Encode.atob(data);\n\t\t\tcase 'readAsDataURL':\n\t\t\t\treturn data;\n\t\t}\n\t\treturn null;\n\t}\n\n\tvar FileReader = {\n\t\tread: function(op, blob) {\n\t\t\tvar comp = this;\n\n\t\t\tcomp.result = '';\n\n\t\t\t// special prefix for DataURL read mode\n\t\t\tif (op === 'readAsDataURL') {\n\t\t\t\tcomp.result = 'data:' + (blob.type || '') + ';base64,';\n\t\t\t}\n\n\t\t\tcomp.bind('Progress', function(e, data) {\n\t\t\t\tif (data) {\n\t\t\t\t\tcomp.result += _formatData(data, op);\n\t\t\t\t}\n\t\t\t}, 999);\n\n\t\t\treturn comp.getRuntime().shimExec.call(this, 'FileReader', 'readAsBase64', blob.uid);\n\t\t}\n\t};\n\n\treturn (extensions.FileReader = FileReader);\n});\n\n// Included from: src/javascript/runtime/flash/file/FileReaderSync.js\n\n/**\n * FileReaderSync.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/flash/file/FileReaderSync\n@private\n*/\ndefine(\"moxie/runtime/flash/file/FileReaderSync\", [\n\t\"moxie/runtime/flash/Runtime\",\n\t\"moxie/core/utils/Encode\"\n], function(extensions, Encode) {\n\t\n\tfunction _formatData(data, op) {\n\t\tswitch (op) {\n\t\t\tcase 'readAsText':\n\t\t\t\treturn Encode.atob(data, 'utf8');\n\t\t\tcase 'readAsBinaryString':\n\t\t\t\treturn Encode.atob(data);\n\t\t\tcase 'readAsDataURL':\n\t\t\t\treturn data;\n\t\t}\n\t\treturn null;\n\t}\n\n\tvar FileReaderSync = {\n\t\tread: function(op, blob) {\n\t\t\tvar result, self = this.getRuntime();\n\n\t\t\tresult = self.shimExec.call(this, 'FileReaderSync', 'readAsBase64', blob.uid);\n\t\t\tif (!result) {\n\t\t\t\treturn null; // or throw ex\n\t\t\t}\n\n\t\t\t// special prefix for DataURL read mode\n\t\t\tif (op === 'readAsDataURL') {\n\t\t\t\tresult = 'data:' + (blob.type || '') + ';base64,' + result;\n\t\t\t}\n\n\t\t\treturn _formatData(result, op, blob.type);\n\t\t}\n\t};\n\n\treturn (extensions.FileReaderSync = FileReaderSync);\n});\n\n// Included from: src/javascript/runtime/flash/runtime/Transporter.js\n\n/**\n * Transporter.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/flash/runtime/Transporter\n@private\n*/\ndefine(\"moxie/runtime/flash/runtime/Transporter\", [\n\t\"moxie/runtime/flash/Runtime\",\n\t\"moxie/file/Blob\"\n], function(extensions, Blob) {\n\n\tvar Transporter = {\n\t\tgetAsBlob: function(type) {\n\t\t\tvar self = this.getRuntime()\n\t\t\t, blob = self.shimExec.call(this, 'Transporter', 'getAsBlob', type)\n\t\t\t;\n\t\t\tif (blob) {\n\t\t\t\treturn new Blob(self.uid, blob);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t};\n\n\treturn (extensions.Transporter = Transporter);\n});\n\n// Included from: src/javascript/runtime/flash/xhr/XMLHttpRequest.js\n\n/**\n * XMLHttpRequest.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/flash/xhr/XMLHttpRequest\n@private\n*/\ndefine(\"moxie/runtime/flash/xhr/XMLHttpRequest\", [\n\t\"moxie/runtime/flash/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/file/Blob\",\n\t\"moxie/file/File\",\n\t\"moxie/file/FileReaderSync\",\n\t\"moxie/runtime/flash/file/FileReaderSync\",\n\t\"moxie/xhr/FormData\",\n\t\"moxie/runtime/Transporter\",\n\t\"moxie/runtime/flash/runtime/Transporter\"\n], function(extensions, Basic, Blob, File, FileReaderSync, FileReaderSyncFlash, FormData, Transporter, TransporterFlash) {\n\t\n\tvar XMLHttpRequest = {\n\n\t\tsend: function(meta, data) {\n\t\t\tvar target = this, self = target.getRuntime();\n\n\t\t\tfunction send() {\n\t\t\t\tmeta.transport = self.mode;\n\t\t\t\tself.shimExec.call(target, 'XMLHttpRequest', 'send', meta, data);\n\t\t\t}\n\n\n\t\t\tfunction appendBlob(name, blob) {\n\t\t\t\tself.shimExec.call(target, 'XMLHttpRequest', 'appendBlob', name, blob.uid);\n\t\t\t\tdata = null;\n\t\t\t\tsend();\n\t\t\t}\n\n\n\t\t\tfunction attachBlob(blob, cb) {\n\t\t\t\tvar tr = new Transporter();\n\n\t\t\t\ttr.bind(\"TransportingComplete\", function() {\n\t\t\t\t\tcb(this.result);\n\t\t\t\t});\n\n\t\t\t\ttr.transport(blob.getSource(), blob.type, {\n\t\t\t\t\truid: self.uid\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// copy over the headers if any\n\t\t\tif (!Basic.isEmptyObj(meta.headers)) {\n\t\t\t\tBasic.each(meta.headers, function(value, header) {\n\t\t\t\t\tself.shimExec.call(target, 'XMLHttpRequest', 'setRequestHeader', header, value.toString()); // Silverlight doesn't accept integers into the arguments of type object\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// transfer over multipart params and blob itself\n\t\t\tif (data instanceof FormData) {\n\t\t\t\tvar blobField;\n\t\t\t\tdata.each(function(value, name) {\n\t\t\t\t\tif (value instanceof Blob) {\n\t\t\t\t\t\tblobField = name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.shimExec.call(target, 'XMLHttpRequest', 'append', name, value);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (!data.hasBlob()) {\n\t\t\t\t\tdata = null;\n\t\t\t\t\tsend();\n\t\t\t\t} else {\n\t\t\t\t\tvar blob = data.getBlob();\n\t\t\t\t\tif (blob.isDetached()) {\n\t\t\t\t\t\tattachBlob(blob, function(attachedBlob) {\n\t\t\t\t\t\t\tblob.destroy();\n\t\t\t\t\t\t\tappendBlob(blobField, attachedBlob);\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tappendBlob(blobField, blob);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (data instanceof Blob) {\n\t\t\t\tif (data.isDetached()) {\n\t\t\t\t\tattachBlob(data, function(attachedBlob) {\n\t\t\t\t\t\tdata.destroy();\n\t\t\t\t\t\tdata = attachedBlob.uid;\n\t\t\t\t\t\tsend();\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tdata = data.uid;\n\t\t\t\t\tsend();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsend();\n\t\t\t}\n\t\t},\n\n\t\tgetResponse: function(responseType) {\n\t\t\tvar frs, blob, self = this.getRuntime();\n\n\t\t\tblob = self.shimExec.call(this, 'XMLHttpRequest', 'getResponseAsBlob');\n\n\t\t\tif (blob) {\n\t\t\t\tblob = new File(self.uid, blob);\n\n\t\t\t\tif ('blob' === responseType) {\n\t\t\t\t\treturn blob;\n\t\t\t\t}\n\n\t\t\t\ttry { \n\t\t\t\t\tfrs = new FileReaderSync();\n\n\t\t\t\t\tif (!!~Basic.inArray(responseType, [\"\", \"text\"])) {\n\t\t\t\t\t\treturn frs.readAsText(blob);\n\t\t\t\t\t} else if ('json' === responseType && !!window.JSON) {\n\t\t\t\t\t\treturn JSON.parse(frs.readAsText(blob));\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tblob.destroy();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\n\t\tabort: function(upload_complete_flag) {\n\t\t\tvar self = this.getRuntime();\n\n\t\t\tself.shimExec.call(this, 'XMLHttpRequest', 'abort');\n\n\t\t\tthis.dispatchEvent('readystatechange');\n\t\t\t// this.dispatchEvent('progress');\n\t\t\tthis.dispatchEvent('abort');\n\n\t\t\t//if (!upload_complete_flag) {\n\t\t\t\t// this.dispatchEvent('uploadprogress');\n\t\t\t//}\n\t\t}\n\t};\n\n\treturn (extensions.XMLHttpRequest = XMLHttpRequest);\n});\n\n// Included from: src/javascript/runtime/flash/image/Image.js\n\n/**\n * Image.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/flash/image/Image\n@private\n*/\ndefine(\"moxie/runtime/flash/image/Image\", [\n\t\"moxie/runtime/flash/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/Transporter\",\n\t\"moxie/file/Blob\",\n\t\"moxie/file/FileReaderSync\"\n], function(extensions, Basic, Transporter, Blob, FileReaderSync) {\n\t\n\tvar Image = {\n\t\tloadFromBlob: function(blob) {\n\t\t\tvar comp = this, self = comp.getRuntime();\n\n\t\t\tfunction exec(srcBlob) {\n\t\t\t\tself.shimExec.call(comp, 'Image', 'loadFromBlob', srcBlob.uid);\n\t\t\t\tcomp = self = null;\n\t\t\t}\n\n\t\t\tif (blob.isDetached()) { // binary string\n\t\t\t\tvar tr = new Transporter();\n\t\t\t\ttr.bind(\"TransportingComplete\", function() {\n\t\t\t\t\texec(tr.result.getSource());\n\t\t\t\t});\n\t\t\t\ttr.transport(blob.getSource(), blob.type, { ruid: self.uid });\n\t\t\t} else {\n\t\t\t\texec(blob.getSource());\n\t\t\t}\n\t\t},\n\n\t\tloadFromImage: function(img) {\n\t\t\tvar self = this.getRuntime();\n\t\t\treturn self.shimExec.call(this, 'Image', 'loadFromImage', img.uid);\n\t\t},\n\n\t\tgetInfo: function() {\n\t\t\tvar self = this.getRuntime()\n\t\t\t, info = self.shimExec.call(this, 'Image', 'getInfo')\n\t\t\t;\n\n\t\t\tif (info.meta && info.meta.thumb && info.meta.thumb.data && !(self.meta.thumb.data instanceof Blob)) {\n\t\t\t\tinfo.meta.thumb.data = new Blob(self.uid, info.meta.thumb.data);\n\t\t\t}\n\t\t\treturn info;\n\t\t},\n\n\t\tgetAsBlob: function(type, quality) {\n\t\t\tvar self = this.getRuntime()\n\t\t\t, blob = self.shimExec.call(this, 'Image', 'getAsBlob', type, quality)\n\t\t\t;\n\t\t\tif (blob) {\n\t\t\t\treturn new Blob(self.uid, blob);\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\n\t\tgetAsDataURL: function() {\n\t\t\tvar self = this.getRuntime()\n\t\t\t, blob = self.Image.getAsBlob.apply(this, arguments)\n\t\t\t, frs\n\t\t\t;\n\t\t\tif (!blob) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tfrs = new FileReaderSync();\n\t\t\treturn frs.readAsDataURL(blob);\n\t\t}\n\t};\n\n\treturn (extensions.Image = Image);\n});\n\n// Included from: src/javascript/runtime/silverlight/Runtime.js\n\n/**\n * RunTime.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/*global ActiveXObject:true */\n\n/**\nDefines constructor for Silverlight runtime.\n\n@class moxie/runtime/silverlight/Runtime\n@private\n*/\ndefine(\"moxie/runtime/silverlight/Runtime\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Env\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/runtime/Runtime\"\n], function(Basic, Env, Dom, x, Runtime) {\n\t\n\tvar type = \"silverlight\", extensions = {};\n\n\tfunction isInstalled(version) {\n\t\tvar isVersionSupported = false, control = null, actualVer,\n\t\t\tactualVerArray, reqVerArray, requiredVersionPart, actualVersionPart, index = 0;\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tcontrol = new ActiveXObject('AgControl.AgControl');\n\n\t\t\t\tif (control.IsVersionSupported(version)) {\n\t\t\t\t\tisVersionSupported = true;\n\t\t\t\t}\n\n\t\t\t\tcontrol = null;\n\t\t\t} catch (e) {\n\t\t\t\tvar plugin = navigator.plugins[\"Silverlight Plug-In\"];\n\n\t\t\t\tif (plugin) {\n\t\t\t\t\tactualVer = plugin.description;\n\n\t\t\t\t\tif (actualVer === \"1.0.30226.2\") {\n\t\t\t\t\t\tactualVer = \"2.0.30226.2\";\n\t\t\t\t\t}\n\n\t\t\t\t\tactualVerArray = actualVer.split(\".\");\n\n\t\t\t\t\twhile (actualVerArray.length > 3) {\n\t\t\t\t\t\tactualVerArray.pop();\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ( actualVerArray.length < 4) {\n\t\t\t\t\t\tactualVerArray.push(0);\n\t\t\t\t\t}\n\n\t\t\t\t\treqVerArray = version.split(\".\");\n\n\t\t\t\t\twhile (reqVerArray.length > 4) {\n\t\t\t\t\t\treqVerArray.pop();\n\t\t\t\t\t}\n\n\t\t\t\t\tdo {\n\t\t\t\t\t\trequiredVersionPart = parseInt(reqVerArray[index], 10);\n\t\t\t\t\t\tactualVersionPart = parseInt(actualVerArray[index], 10);\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} while (index < reqVerArray.length && requiredVersionPart === actualVersionPart);\n\n\t\t\t\t\tif (requiredVersionPart <= actualVersionPart && !isNaN(requiredVersionPart)) {\n\t\t\t\t\t\tisVersionSupported = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e2) {\n\t\t\tisVersionSupported = false;\n\t\t}\n\n\t\treturn isVersionSupported;\n\t}\n\n\t/**\n\tConstructor for the Silverlight Runtime\n\t*/\n\tfunction SilverlightRuntime(options) {\n\t\tvar I = this, initTimer;\n\n\t\toptions = Basic.extend({ xap_url: Env.xap_url }, options);\n\n\t\tRuntime.call(this, options, type, {\n\t\t\taccess_binary: Runtime.capTrue,\n\t\t\taccess_image_binary: Runtime.capTrue,\n\t\t\tdisplay_media: Runtime.capTest(defined('moxie/image/Image')),\n\t\t\tdo_cors: Runtime.capTrue,\n\t\t\tdrag_and_drop: false,\n\t\t\treport_upload_progress: Runtime.capTrue,\n\t\t\tresize_image: Runtime.capTrue,\n\t\t\treturn_response_headers: function(value) {\n\t\t\t\treturn value && I.mode === 'client';\n\t\t\t},\n\t\t\treturn_response_type: function(responseType) {\n\t\t\t\tif (responseType !== 'json') {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn !!window.JSON;\n\t\t\t\t}\n\t\t\t},\n\t\t\treturn_status_code: function(code) {\n\t\t\t\treturn I.mode === 'client' || !Basic.arrayDiff(code, [200, 404]);\n\t\t\t},\n\t\t\tselect_file: Runtime.capTrue,\n\t\t\tselect_multiple: Runtime.capTrue,\n\t\t\tsend_binary_string: Runtime.capTrue,\n\t\t\tsend_browser_cookies: function(value) {\n\t\t\t\treturn value && I.mode === 'browser';\n\t\t\t},\n\t\t\tsend_custom_headers: function(value) {\n\t\t\t\treturn value && I.mode === 'client';\n\t\t\t},\n\t\t\tsend_multipart: Runtime.capTrue,\n\t\t\tslice_blob: Runtime.capTrue,\n\t\t\tstream_upload: true,\n\t\t\tsummon_file_dialog: false,\n\t\t\tupload_filesize: Runtime.capTrue,\n\t\t\tuse_http_method: function(methods) {\n\t\t\t\treturn I.mode === 'client' || !Basic.arrayDiff(methods, ['GET', 'POST']);\n\t\t\t}\n\t\t}, { \n\t\t\t// capabilities that require specific mode\n\t\t\treturn_response_headers: function(value) {\n\t\t\t\treturn value ? 'client' : 'browser';\n\t\t\t},\n\t\t\treturn_status_code: function(code) {\n\t\t\t\treturn Basic.arrayDiff(code, [200, 404]) ? 'client' : ['client', 'browser'];\n\t\t\t},\n\t\t\tsend_browser_cookies: function(value) {\n\t\t\t\treturn value ? 'browser' : 'client';\n\t\t\t},\n\t\t\tsend_custom_headers: function(value) {\n\t\t\t\treturn value ? 'client' : 'browser';\n\t\t\t},\n\t\t\tuse_http_method: function(methods) {\n\t\t\t\treturn Basic.arrayDiff(methods, ['GET', 'POST']) ? 'client' : ['client', 'browser'];\n\t\t\t}\n\t\t});\n\n\n\t\t// minimal requirement\n\t\tif (!isInstalled('2.0.31005.0') || Env.browser === 'Opera') {\n\t\t\tif (MXI_DEBUG && Env.debug.runtime) {\n\t\t\t\tEnv.log(\"\\tSilverlight is not installed or minimal version (2.0.31005.0) requirement not met (not likely).\");\t\n\t\t\t}\n\n\t\t\tthis.mode = false;\n\t\t}\n\n\n\t\tBasic.extend(this, {\n\t\t\tgetShim: function() {\n\t\t\t\treturn Dom.get(this.uid).content.Moxie;\n\t\t\t},\n\n\t\t\tshimExec: function(component, action) {\n\t\t\t\tvar args = [].slice.call(arguments, 2);\n\t\t\t\treturn I.getShim().exec(this.uid, component, action, args);\n\t\t\t},\n\n\t\t\tinit : function() {\n\t\t\t\tvar container;\n\n\t\t\t\tcontainer = this.getShimContainer();\n\n\t\t\t\tcontainer.innerHTML = '' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t\t'' +\n\t\t\t\t'';\n\n\t\t\t\t// Init is dispatched by the shim\n\t\t\t\tinitTimer = setTimeout(function() {\n\t\t\t\t\tif (I && !I.initialized) { // runtime might be already destroyed by this moment\n\t\t\t\t\t\tI.trigger(\"Error\", new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR));\n\n\t\t\t\t\t\tif (MXI_DEBUG && Env.debug.runtime) {\n\t\t\t\t\t\t\tEnv.log(\"\\Silverlight failed to initialize within a specified period of time (5-10s).\");\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, Env.OS !== 'Windows'? 10000 : 5000); // give it more time to initialize in non Windows OS (like Mac)\n\t\t\t},\n\n\t\t\tdestroy: (function(destroy) { // extend default destroy method\n\t\t\t\treturn function() {\n\t\t\t\t\tdestroy.call(I);\n\t\t\t\t\tclearTimeout(initTimer); // initialization check might be still onwait\n\t\t\t\t\toptions = initTimer = destroy = I = null;\n\t\t\t\t};\n\t\t\t}(this.destroy))\n\n\t\t}, extensions);\n\t}\n\n\tRuntime.addConstructor(type, SilverlightRuntime); \n\n\treturn extensions;\n});\n\n// Included from: src/javascript/runtime/silverlight/file/Blob.js\n\n/**\n * Blob.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/silverlight/file/Blob\n@private\n*/\ndefine(\"moxie/runtime/silverlight/file/Blob\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/flash/file/Blob\"\n], function(extensions, Basic, Blob) {\n\treturn (extensions.Blob = Basic.extend({}, Blob));\n});\n\n// Included from: src/javascript/runtime/silverlight/file/FileInput.js\n\n/**\n * FileInput.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/silverlight/file/FileInput\n@private\n*/\ndefine(\"moxie/runtime/silverlight/file/FileInput\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/file/File\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/utils/Basic\"\n], function(extensions, File, Dom, Basic) {\n\n\tfunction toFilters(accept) {\n\t\tvar filter = '';\n\t\tfor (var i = 0; i < accept.length; i++) {\n\t\t\tfilter += (filter !== '' ? '|' : '') + accept[i].title + \" | *.\" + accept[i].extensions.replace(/,/g, ';*.');\n\t\t}\n\t\treturn filter;\n\t}\n\n\t\n\tvar FileInput = {\n\t\tinit: function(options) {\n\t\t\tvar comp = this, I = this.getRuntime();\n\t\t\tvar browseButton = Dom.get(options.browse_button);\n\n\t\t\tif (browseButton) {\n\t\t\t\tbrowseButton.setAttribute('tabindex', -1);\n\t\t\t\tbrowseButton = null;\n\t\t\t}\n\n\t\t\tthis.bind(\"Change\", function() {\n\t\t\t\tvar files = I.shimExec.call(comp, 'FileInput', 'getFiles');\n\t\t\t\tcomp.files = [];\n\t\t\t\tBasic.each(files, function(file) {\n\t\t\t\t\tcomp.files.push(new File(I.uid, file));\n\t\t\t\t});\n\t\t\t}, 999);\n\t\t\t\n\t\t\tI.shimExec.call(this, 'FileInput', 'init', toFilters(options.accept), options.multiple);\n\t\t\tthis.trigger('ready');\n\t\t},\n\n\t\tsetOption: function(name, value) {\n\t\t\tif (name == 'accept') {\n\t\t\t\tvalue = toFilters(value);\n\t\t\t}\n\t\t\tthis.getRuntime().shimExec.call(this, 'FileInput', 'setOption', name, value);\n\t\t}\n\t};\n\n\treturn (extensions.FileInput = FileInput);\n});\n\n// Included from: src/javascript/runtime/silverlight/file/FileDrop.js\n\n/**\n * FileDrop.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/silverlight/file/FileDrop\n@private\n*/\ndefine(\"moxie/runtime/silverlight/file/FileDrop\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/core/utils/Dom\", \n\t\"moxie/core/utils/Events\"\n], function(extensions, Dom, Events) {\n\n\t// not exactly useful, since works only in safari (...crickets...)\n\tvar FileDrop = {\n\t\tinit: function() {\n\t\t\tvar comp = this, self = comp.getRuntime(), dropZone;\n\n\t\t\tdropZone = self.getShimContainer();\n\n\t\t\tEvents.addEvent(dropZone, 'dragover', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\te.dataTransfer.dropEffect = 'copy';\n\t\t\t}, comp.uid);\n\n\t\t\tEvents.addEvent(dropZone, 'dragenter', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar flag = Dom.get(self.uid).dragEnter(e);\n\t\t\t\t// If handled, then stop propagation of event in DOM\n\t\t\t\tif (flag) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t}, comp.uid);\n\n\t\t\tEvents.addEvent(dropZone, 'drop', function(e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tvar flag = Dom.get(self.uid).dragDrop(e);\n\t\t\t\t// If handled, then stop propagation of event in DOM\n\t\t\t\tif (flag) {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t}, comp.uid);\n\n\t\t\treturn self.shimExec.call(this, 'FileDrop', 'init');\n\t\t}\n\t};\n\n\treturn (extensions.FileDrop = FileDrop);\n});\n\n// Included from: src/javascript/runtime/silverlight/file/FileReader.js\n\n/**\n * FileReader.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/silverlight/file/FileReader\n@private\n*/\ndefine(\"moxie/runtime/silverlight/file/FileReader\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/flash/file/FileReader\"\n], function(extensions, Basic, FileReader) {\n\treturn (extensions.FileReader = Basic.extend({}, FileReader));\n});\n\n// Included from: src/javascript/runtime/silverlight/file/FileReaderSync.js\n\n/**\n * FileReaderSync.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/silverlight/file/FileReaderSync\n@private\n*/\ndefine(\"moxie/runtime/silverlight/file/FileReaderSync\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/flash/file/FileReaderSync\"\n], function(extensions, Basic, FileReaderSync) {\n\treturn (extensions.FileReaderSync = Basic.extend({}, FileReaderSync));\n});\n\n// Included from: src/javascript/runtime/silverlight/runtime/Transporter.js\n\n/**\n * Transporter.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/silverlight/runtime/Transporter\n@private\n*/\ndefine(\"moxie/runtime/silverlight/runtime/Transporter\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/flash/runtime/Transporter\"\n], function(extensions, Basic, Transporter) {\n\treturn (extensions.Transporter = Basic.extend({}, Transporter));\n});\n\n// Included from: src/javascript/runtime/silverlight/xhr/XMLHttpRequest.js\n\n/**\n * XMLHttpRequest.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/silverlight/xhr/XMLHttpRequest\n@private\n*/\ndefine(\"moxie/runtime/silverlight/xhr/XMLHttpRequest\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/runtime/flash/xhr/XMLHttpRequest\",\n\t\"moxie/runtime/silverlight/file/FileReaderSync\",\n\t\"moxie/runtime/silverlight/runtime/Transporter\"\n], function(extensions, Basic, XMLHttpRequest, FileReaderSyncSilverlight, TransporterSilverlight) {\n\treturn (extensions.XMLHttpRequest = Basic.extend({}, XMLHttpRequest));\n});\n\n// Included from: src/javascript/runtime/silverlight/image/Image.js\n\n/**\n * Image.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n \n/**\n@class moxie/runtime/silverlight/image/Image\n@private\n*/\ndefine(\"moxie/runtime/silverlight/image/Image\", [\n\t\"moxie/runtime/silverlight/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/file/Blob\",\n\t\"moxie/runtime/flash/image/Image\"\n], function(extensions, Basic, Blob, Image) {\n\treturn (extensions.Image = Basic.extend({}, Image, {\n\n\t\tgetInfo: function() {\n\t\t\tvar self = this.getRuntime()\n\t\t\t, grps = ['tiff', 'exif', 'gps', 'thumb']\n\t\t\t, info = { meta: {} }\n\t\t\t, rawInfo = self.shimExec.call(this, 'Image', 'getInfo')\n\t\t\t;\n\n\t\t\tif (rawInfo.meta) {\n\t\t\t\tBasic.each(grps, function(grp) {\n\t\t\t\t\tvar meta = rawInfo.meta[grp]\n\t\t\t\t\t, tag\n\t\t\t\t\t, i\n\t\t\t\t\t, length\n\t\t\t\t\t, value\n\t\t\t\t\t;\n\t\t\t\t\tif (meta && meta.keys) {\n\t\t\t\t\t\tinfo.meta[grp] = {};\n\t\t\t\t\t\tfor (i = 0, length = meta.keys.length; i < length; i++) {\n\t\t\t\t\t\t\ttag = meta.keys[i];\n\t\t\t\t\t\t\tvalue = meta[tag];\n\t\t\t\t\t\t\tif (value) {\n\t\t\t\t\t\t\t\t// convert numbers\n\t\t\t\t\t\t\t\tif (/^(\\d|[1-9]\\d+)$/.test(value)) { // integer (make sure doesn't start with zero)\n\t\t\t\t\t\t\t\t\tvalue = parseInt(value, 10);\n\t\t\t\t\t\t\t\t} else if (/^\\d*\\.\\d+$/.test(value)) { // double\n\t\t\t\t\t\t\t\t\tvalue = parseFloat(value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tinfo.meta[grp][tag] = value;\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// save thumb data as blob\n\t\t\t\tif (info.meta && info.meta.thumb && info.meta.thumb.data && !(self.meta.thumb.data instanceof Blob)) {\n\t\t\t\t\tinfo.meta.thumb.data = new Blob(self.uid, info.meta.thumb.data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tinfo.width = parseInt(rawInfo.width, 10);\n\t\t\tinfo.height = parseInt(rawInfo.height, 10);\n\t\t\tinfo.size = parseInt(rawInfo.size, 10);\n\t\t\tinfo.type = rawInfo.type;\n\t\t\tinfo.name = rawInfo.name;\n\n\t\t\treturn info;\n\t\t},\n\n\t\tresize: function(rect, ratio, opts) {\n\t\t\tthis.getRuntime().shimExec.call(this, 'Image', 'resize', rect.x, rect.y, rect.width, rect.height, ratio, opts.preserveHeaders, opts.resample);\n\t\t}\n\t}));\n});\n\n// Included from: src/javascript/runtime/html4/Runtime.js\n\n/**\n * Runtime.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/*global File:true */\n\n/**\nDefines constructor for HTML4 runtime.\n\n@class moxie/runtime/html4/Runtime\n@private\n*/\ndefine(\"moxie/runtime/html4/Runtime\", [\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/runtime/Runtime\",\n\t\"moxie/core/utils/Env\"\n], function(Basic, x, Runtime, Env) {\n\t\n\tvar type = 'html4', extensions = {};\n\n\tfunction Html4Runtime(options) {\n\t\tvar I = this\n\t\t, Test = Runtime.capTest\n\t\t, True = Runtime.capTrue\n\t\t;\n\n\t\tRuntime.call(this, options, type, {\n\t\t\taccess_binary: Test(window.FileReader || window.File && File.getAsDataURL),\n\t\t\taccess_image_binary: false,\n\t\t\tdisplay_media: Test(\n\t\t\t\t(Env.can('create_canvas') || Env.can('use_data_uri_over32kb')) && \n\t\t\t\tdefined('moxie/image/Image')\n\t\t\t),\n\t\t\tdo_cors: false,\n\t\t\tdrag_and_drop: false,\n\t\t\tfilter_by_extension: Test(function() { // if you know how to feature-detect this, please suggest\n\t\t\t\treturn !(\n\t\t\t\t\t(Env.browser === 'Chrome' && Env.verComp(Env.version, 28, '<')) || \n\t\t\t\t\t(Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) || \n\t\t\t\t\t(Env.browser === 'Safari' && Env.verComp(Env.version, 7, '<')) ||\n\t\t\t\t\t(Env.browser === 'Firefox' && Env.verComp(Env.version, 37, '<'))\n\t\t\t\t);\n\t\t\t}()),\n\t\t\tresize_image: function() {\n\t\t\t\treturn extensions.Image && I.can('access_binary') && Env.can('create_canvas');\n\t\t\t},\n\t\t\treport_upload_progress: false,\n\t\t\treturn_response_headers: false,\n\t\t\treturn_response_type: function(responseType) {\n\t\t\t\tif (responseType === 'json' && !!window.JSON) {\n\t\t\t\t\treturn true;\n\t\t\t\t} \n\t\t\t\treturn !!~Basic.inArray(responseType, ['text', 'document', '']);\n\t\t\t},\n\t\t\treturn_status_code: function(code) {\n\t\t\t\treturn !Basic.arrayDiff(code, [200, 404]);\n\t\t\t},\n\t\t\tselect_file: function() {\n\t\t\t\treturn Env.can('use_fileinput');\n\t\t\t},\n\t\t\tselect_multiple: false,\n\t\t\tsend_binary_string: false,\n\t\t\tsend_custom_headers: false,\n\t\t\tsend_multipart: true,\n\t\t\tslice_blob: false,\n\t\t\tstream_upload: function() {\n\t\t\t\treturn I.can('select_file');\n\t\t\t},\n\t\t\tsummon_file_dialog: function() { // yeah... some dirty sniffing here...\n\t\t\t\treturn I.can('select_file') && !(\n\t\t\t\t\t(Env.browser === 'Firefox' && Env.verComp(Env.version, 4, '<')) ||\n\t\t\t\t\t(Env.browser === 'Opera' && Env.verComp(Env.version, 12, '<')) ||\n\t\t\t\t\t(Env.browser === 'IE' && Env.verComp(Env.version, 10, '<'))\n\t\t\t\t);\n\t\t\t},\n\t\t\tupload_filesize: True,\n\t\t\tuse_http_method: function(methods) {\n\t\t\t\treturn !Basic.arrayDiff(methods, ['GET', 'POST']);\n\t\t\t}\n\t\t});\n\n\n\t\tBasic.extend(this, {\n\t\t\tinit : function() {\n\t\t\t\tthis.trigger(\"Init\");\n\t\t\t},\n\n\t\t\tdestroy: (function(destroy) { // extend default destroy method\n\t\t\t\treturn function() {\n\t\t\t\t\tdestroy.call(I);\n\t\t\t\t\tdestroy = I = null;\n\t\t\t\t};\n\t\t\t}(this.destroy))\n\t\t});\n\n\t\tBasic.extend(this.getShim(), extensions);\n\t}\n\n\tRuntime.addConstructor(type, Html4Runtime);\n\n\treturn extensions;\n});\n\n// Included from: src/javascript/runtime/html4/file/FileInput.js\n\n/**\n * FileInput.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html4/file/FileInput\n@private\n*/\ndefine(\"moxie/runtime/html4/file/FileInput\", [\n\t\"moxie/runtime/html4/Runtime\",\n\t\"moxie/file/File\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/utils/Events\",\n\t\"moxie/core/utils/Mime\",\n\t\"moxie/core/utils/Env\"\n], function(extensions, File, Basic, Dom, Events, Mime, Env) {\n\t\n\tfunction FileInput() {\n\t\tvar _uid, _mimes = [], _options, _browseBtnZIndex; // save original z-index;\n\n\t\tfunction addInput() {\n\t\t\tvar comp = this, I = comp.getRuntime(), shimContainer, browseButton, currForm, form, input, uid;\n\n\t\t\tuid = Basic.guid('uid_');\n\n\t\t\tshimContainer = I.getShimContainer(); // we get new ref every time to avoid memory leaks in IE\n\n\t\t\tif (_uid) { // move previous form out of the view\n\t\t\t\tcurrForm = Dom.get(_uid + '_form');\n\t\t\t\tif (currForm) {\n\t\t\t\t\tBasic.extend(currForm.style, { top: '100%' });\n\t\t\t\t\t// it shouldn't be possible to tab into the hidden element\n\t\t\t\t\tcurrForm.firstChild.setAttribute('tabindex', -1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// build form in DOM, since innerHTML version not able to submit file for some reason\n\t\t\tform = document.createElement('form');\n\t\t\tform.setAttribute('id', uid + '_form');\n\t\t\tform.setAttribute('method', 'post');\n\t\t\tform.setAttribute('enctype', 'multipart/form-data');\n\t\t\tform.setAttribute('encoding', 'multipart/form-data');\n\n\t\t\tBasic.extend(form.style, {\n\t\t\t\toverflow: 'hidden',\n\t\t\t\tposition: 'absolute',\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: '100%',\n\t\t\t\theight: '100%'\n\t\t\t});\n\n\t\t\tinput = document.createElement('input');\n\t\t\tinput.setAttribute('id', uid);\n\t\t\tinput.setAttribute('type', 'file');\n\t\t\tinput.setAttribute('accept', _mimes.join(','));\n\n\t\t\tif (I.can('summon_file_dialog')) {\n\t\t\t\tinput.setAttribute('tabindex', -1);\n\t\t\t}\n\n\t\t\tBasic.extend(input.style, {\n\t\t\t\tfontSize: '999px',\n\t\t\t\topacity: 0\n\t\t\t});\n\n\t\t\tform.appendChild(input);\n\t\t\tshimContainer.appendChild(form);\n\n\t\t\t// prepare file input to be placed underneath the browse_button element\n\t\t\tBasic.extend(input.style, {\n\t\t\t\tposition: 'absolute',\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\twidth: '100%',\n\t\t\t\theight: '100%'\n\t\t\t});\n\n\t\t\tif (Env.browser === 'IE' && Env.verComp(Env.version, 10, '<')) {\n\t\t\t\tBasic.extend(input.style, {\n\t\t\t\t\tfilter : \"progid:DXImageTransform.Microsoft.Alpha(opacity=0)\"\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tinput.onchange = function() { // there should be only one handler for this\n\t\t\t\tvar file;\n\n\t\t\t\tif (!this.value) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (this.files) { // check if browser is fresh enough\n\t\t\t\t\tfile = this.files[0];\n\t\t\t\t} else {\n\t\t\t\t\tfile = {\n\t\t\t\t\t\tname: this.value\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tfile = new File(I.uid, file);\n\n\t\t\t\t// clear event handler\n\t\t\t\tthis.onchange = function() {}; \n\t\t\t\taddInput.call(comp); \n\n\t\t\t\tcomp.files = [file];\n\n\t\t\t\t// substitute all ids with file uids (consider file.uid read-only - we cannot do it the other way around)\n\t\t\t\tinput.setAttribute('id', file.uid);\n\t\t\t\tform.setAttribute('id', file.uid + '_form');\n\t\t\t\t\n\t\t\t\tcomp.trigger('change');\n\n\t\t\t\tinput = form = null;\n\t\t\t};\n\n\n\t\t\t// route click event to the input\n\t\t\tif (I.can('summon_file_dialog')) {\n\t\t\t\tbrowseButton = Dom.get(_options.browse_button);\n\t\t\t\tEvents.removeEvent(browseButton, 'click', comp.uid);\n\t\t\t\tEvents.addEvent(browseButton, 'click', function(e) {\n\t\t\t\t\tif (input && !input.disabled) { // for some reason FF (up to 8.0.1 so far) lets to click disabled input[type=file]\n\t\t\t\t\t\tinput.click();\n\t\t\t\t\t}\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}, comp.uid);\n\t\t\t}\n\n\t\t\t_uid = uid;\n\n\t\t\tshimContainer = currForm = browseButton = null;\n\t\t}\n\n\t\tBasic.extend(this, {\n\t\t\tinit: function(options) {\n\t\t\t\tvar comp = this, I = comp.getRuntime(), shimContainer;\n\n\t\t\t\t// figure out accept string\n\t\t\t\t_options = options;\n\t\t\t\t_mimes = Mime.extList2mimes(options.accept, I.can('filter_by_extension'));\n\n\t\t\t\tshimContainer = I.getShimContainer();\n\n\t\t\t\t(function() {\n\t\t\t\t\tvar browseButton, zIndex, top;\n\n\t\t\t\t\tbrowseButton = Dom.get(options.browse_button);\n\t\t\t\t\t_browseBtnZIndex = Dom.getStyle(browseButton, 'z-index') || 'auto';\n\n\t\t\t\t\t// Route click event to the input[type=file] element for browsers that support such behavior\n\t\t\t\t\tif (I.can('summon_file_dialog')) {\n\t\t\t\t\t\tif (Dom.getStyle(browseButton, 'position') === 'static') {\n\t\t\t\t\t\t\tbrowseButton.style.position = 'relative';\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\n\t\t\t\t\t\tcomp.bind('Refresh', function() {\n\t\t\t\t\t\t\tzIndex = parseInt(_browseBtnZIndex, 10) || 1;\n\n\t\t\t\t\t\t\tDom.get(_options.browse_button).style.zIndex = zIndex;\n\t\t\t\t\t\t\tthis.getRuntime().getShimContainer().style.zIndex = zIndex - 1;\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// it shouldn't be possible to tab into the hidden element\n\t\t\t\t\t\tbrowseButton.setAttribute('tabindex', -1);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Since we have to place input[type=file] on top of the browse_button for some browsers,\n\t\t\t\t\tbrowse_button loses interactivity, so we restore it here */\n\t\t\t\t\ttop = I.can('summon_file_dialog') ? browseButton : shimContainer;\n\n\t\t\t\t\tEvents.addEvent(top, 'mouseover', function() {\n\t\t\t\t\t\tcomp.trigger('mouseenter');\n\t\t\t\t\t}, comp.uid);\n\n\t\t\t\t\tEvents.addEvent(top, 'mouseout', function() {\n\t\t\t\t\t\tcomp.trigger('mouseleave');\n\t\t\t\t\t}, comp.uid);\n\n\t\t\t\t\tEvents.addEvent(top, 'mousedown', function() {\n\t\t\t\t\t\tcomp.trigger('mousedown');\n\t\t\t\t\t}, comp.uid);\n\n\t\t\t\t\tEvents.addEvent(Dom.get(options.container), 'mouseup', function() {\n\t\t\t\t\t\tcomp.trigger('mouseup');\n\t\t\t\t\t}, comp.uid);\n\n\t\t\t\t\tbrowseButton = null;\n\t\t\t\t}());\n\n\t\t\t\taddInput.call(this);\n\n\t\t\t\tshimContainer = null;\n\n\t\t\t\t// trigger ready event asynchronously\n\t\t\t\tcomp.trigger({\n\t\t\t\t\ttype: 'ready',\n\t\t\t\t\tasync: true\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tsetOption: function(name, value) {\n\t\t\t\tvar I = this.getRuntime();\n\t\t\t\tvar input;\n\n\t\t\t\tif (name == 'accept') {\n\t\t\t\t\t_mimes = value.mimes || Mime.extList2mimes(value, I.can('filter_by_extension'));\n\t\t\t\t}\n\n\t\t\t\t// update current input\n\t\t\t\tinput = Dom.get(_uid)\n\t\t\t\tif (input) {\n\t\t\t\t\tinput.setAttribute('accept', _mimes.join(','));\n\t\t\t\t}\n\t\t\t},\n\n\n\t\t\tdisable: function(state) {\n\t\t\t\tvar input;\n\n\t\t\t\tif ((input = Dom.get(_uid))) {\n\t\t\t\t\tinput.disabled = !!state;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tvar I = this.getRuntime()\n\t\t\t\t, shim = I.getShim()\n\t\t\t\t, shimContainer = I.getShimContainer()\n\t\t\t\t, container = _options && Dom.get(_options.container)\n\t\t\t\t, browseButton = _options && Dom.get(_options.browse_button)\n\t\t\t\t;\n\t\t\t\t\n\t\t\t\tif (container) {\n\t\t\t\t\tEvents.removeAllEvents(container, this.uid);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (browseButton) {\n\t\t\t\t\tEvents.removeAllEvents(browseButton, this.uid);\n\t\t\t\t\tbrowseButton.style.zIndex = _browseBtnZIndex; // reset to original value\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (shimContainer) {\n\t\t\t\t\tEvents.removeAllEvents(shimContainer, this.uid);\n\t\t\t\t\tshimContainer.innerHTML = '';\n\t\t\t\t}\n\n\t\t\t\tshim.removeInstance(this.uid);\n\n\t\t\t\t_uid = _mimes = _options = shimContainer = container = browseButton = shim = null;\n\t\t\t}\n\t\t});\n\t}\n\n\treturn (extensions.FileInput = FileInput);\n});\n\n// Included from: src/javascript/runtime/html4/file/FileReader.js\n\n/**\n * FileReader.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html4/file/FileReader\n@private\n*/\ndefine(\"moxie/runtime/html4/file/FileReader\", [\n\t\"moxie/runtime/html4/Runtime\",\n\t\"moxie/runtime/html5/file/FileReader\"\n], function(extensions, FileReader) {\n\treturn (extensions.FileReader = FileReader);\n});\n\n// Included from: src/javascript/runtime/html4/xhr/XMLHttpRequest.js\n\n/**\n * XMLHttpRequest.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html4/xhr/XMLHttpRequest\n@private\n*/\ndefine(\"moxie/runtime/html4/xhr/XMLHttpRequest\", [\n\t\"moxie/runtime/html4/Runtime\",\n\t\"moxie/core/utils/Basic\",\n\t\"moxie/core/utils/Dom\",\n\t\"moxie/core/utils/Url\",\n\t\"moxie/core/Exceptions\",\n\t\"moxie/core/utils/Events\",\n\t\"moxie/file/Blob\",\n\t\"moxie/xhr/FormData\"\n], function(extensions, Basic, Dom, Url, x, Events, Blob, FormData) {\n\t\n\tfunction XMLHttpRequest() {\n\t\tvar _status, _response, _iframe;\n\n\t\tfunction cleanup(cb) {\n\t\t\tvar target = this, uid, form, inputs, i, hasFile = false;\n\n\t\t\tif (!_iframe) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tuid = _iframe.id.replace(/_iframe$/, '');\n\n\t\t\tform = Dom.get(uid + '_form');\n\t\t\tif (form) {\n\t\t\t\tinputs = form.getElementsByTagName('input');\n\t\t\t\ti = inputs.length;\n\n\t\t\t\twhile (i--) {\n\t\t\t\t\tswitch (inputs[i].getAttribute('type')) {\n\t\t\t\t\t\tcase 'hidden':\n\t\t\t\t\t\t\tinputs[i].parentNode.removeChild(inputs[i]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'file':\n\t\t\t\t\t\t\thasFile = true; // flag the case for later\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinputs = [];\n\n\t\t\t\tif (!hasFile) { // we need to keep the form for sake of possible retries\n\t\t\t\t\tform.parentNode.removeChild(form);\n\t\t\t\t}\n\t\t\t\tform = null;\n\t\t\t}\n\n\t\t\t// without timeout, request is marked as canceled (in console)\n\t\t\tsetTimeout(function() {\n\t\t\t\tEvents.removeEvent(_iframe, 'load', target.uid);\n\t\t\t\tif (_iframe.parentNode) { // #382\n\t\t\t\t\t_iframe.parentNode.removeChild(_iframe);\n\t\t\t\t}\n\n\t\t\t\t// check if shim container has any other children, if - not, remove it as well\n\t\t\t\tvar shimContainer = target.getRuntime().getShimContainer();\n\t\t\t\tif (!shimContainer.children.length) {\n\t\t\t\t\tshimContainer.parentNode.removeChild(shimContainer);\n\t\t\t\t}\n\n\t\t\t\tshimContainer = _iframe = null;\n\t\t\t\tcb();\n\t\t\t}, 1);\n\t\t}\n\n\t\tBasic.extend(this, {\n\t\t\tsend: function(meta, data) {\n\t\t\t\tvar target = this, I = target.getRuntime(), uid, form, input, blob;\n\n\t\t\t\t_status = _response = null;\n\n\t\t\t\tfunction createIframe() {\n\t\t\t\t\tvar container = I.getShimContainer() || document.body\n\t\t\t\t\t, temp = document.createElement('div')\n\t\t\t\t\t;\n\n\t\t\t\t\t// IE 6 won't be able to set the name using setAttribute or iframe.name\n\t\t\t\t\ttemp.innerHTML = '';\n\t\t\t\t\t_iframe = temp.firstChild;\n\t\t\t\t\tcontainer.appendChild(_iframe);\n\n\t\t\t\t\t/* _iframe.onreadystatechange = function() {\n\t\t\t\t\t\tconsole.info(_iframe.readyState);\n\t\t\t\t\t};*/\n\n\t\t\t\t\tEvents.addEvent(_iframe, 'load', function() { // _iframe.onload doesn't work in IE lte 8\n\t\t\t\t\t\tvar el;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tel = _iframe.contentWindow.document || _iframe.contentDocument || window.frames[_iframe.id].document;\n\n\t\t\t\t\t\t\t// try to detect some standard error pages\n\t\t\t\t\t\t\tif (/^4(0[0-9]|1[0-7]|2[2346])\\s/.test(el.title)) { // test if title starts with 4xx HTTP error\n\t\t\t\t\t\t\t\t_status = el.title.replace(/^(\\d+).*$/, '$1');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t_status = 200;\n\t\t\t\t\t\t\t\t// get result\n\t\t\t\t\t\t\t\t_response = Basic.trim(el.body.innerHTML);\n\n\t\t\t\t\t\t\t\t// we need to fire these at least once\n\t\t\t\t\t\t\t\ttarget.trigger({\n\t\t\t\t\t\t\t\t\ttype: 'progress',\n\t\t\t\t\t\t\t\t\tloaded: _response.length,\n\t\t\t\t\t\t\t\t\ttotal: _response.length\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (blob) { // if we were uploading a file\n\t\t\t\t\t\t\t\t\ttarget.trigger({\n\t\t\t\t\t\t\t\t\t\ttype: 'uploadprogress',\n\t\t\t\t\t\t\t\t\t\tloaded: blob.size || 1025,\n\t\t\t\t\t\t\t\t\t\ttotal: blob.size || 1025\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} catch (ex) {\n\t\t\t\t\t\t\tif (Url.hasSameOrigin(meta.url)) {\n\t\t\t\t\t\t\t\t// if response is sent with error code, iframe in IE gets redirected to res://ieframe.dll/http_x.htm\n\t\t\t\t\t\t\t\t// which obviously results to cross domain error (wtf?)\n\t\t\t\t\t\t\t\t_status = 404;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcleanup.call(target, function() {\n\t\t\t\t\t\t\t\t\ttarget.trigger('error');\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\t\tcleanup.call(target, function() {\n\t\t\t\t\t\t\ttarget.trigger('load');\n\t\t\t\t\t\t});\n\t\t\t\t\t}, target.uid);\n\t\t\t\t} // end createIframe\n\n\t\t\t\t// prepare data to be sent and convert if required\n\t\t\t\tif (data instanceof FormData && data.hasBlob()) {\n\t\t\t\t\tblob = data.getBlob();\n\t\t\t\t\tuid = blob.uid;\n\t\t\t\t\tinput = Dom.get(uid);\n\t\t\t\t\tform = Dom.get(uid + '_form');\n\t\t\t\t\tif (!form) {\n\t\t\t\t\t\tthrow new x.DOMException(x.DOMException.NOT_FOUND_ERR);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuid = Basic.guid('uid_');\n\n\t\t\t\t\tform = document.createElement('form');\n\t\t\t\t\tform.setAttribute('id', uid + '_form');\n\t\t\t\t\tform.setAttribute('method', meta.method);\n\t\t\t\t\tform.setAttribute('enctype', 'multipart/form-data');\n\t\t\t\t\tform.setAttribute('encoding', 'multipart/form-data');\n\n\t\t\t\t\tI.getShimContainer().appendChild(form);\n\t\t\t\t}\n\n\t\t\t\t// set upload target\n\t\t\t\tform.setAttribute('target', uid + '_iframe');\n\n\t\t\t\tif (data instanceof FormData) {\n\t\t\t\t\tdata.each(function(value, name) {\n\t\t\t\t\t\tif (value instanceof Blob) {\n\t\t\t\t\t\t\tif (input) {\n\t\t\t\t\t\t\t\tinput.setAttribute('name', name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar hidden = document.createElement('input');\n\n\t\t\t\t\t\t\tBasic.extend(hidden, {\n\t\t\t\t\t\t\t\ttype : 'hidden',\n\t\t\t\t\t\t\t\tname : name,\n\t\t\t\t\t\t\t\tvalue : value\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// make sure that input[type=\"file\"], if it's there, comes last\n\t\t\t\t\t\t\tif (input) {\n\t\t\t\t\t\t\t\tform.insertBefore(hidden, input);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tform.appendChild(hidden);\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// set destination url\n\t\t\t\tform.setAttribute(\"action\", meta.url);\n\n\t\t\t\tcreateIframe();\n\t\t\t\tform.submit();\n\t\t\t\ttarget.trigger('loadstart');\n\t\t\t},\n\n\t\t\tgetStatus: function() {\n\t\t\t\treturn _status;\n\t\t\t},\n\n\t\t\tgetResponse: function(responseType) {\n\t\t\t\tif ('json' === responseType) {\n\t\t\t\t\t// strip off
..
tags that might be enclosing the response\n\t\t\t\t\tif (Basic.typeOf(_response) === 'string' && !!window.JSON) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn JSON.parse(_response.replace(/^\\s*]*>/, '').replace(/<\\/pre>\\s*$/, ''));\n\t\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t} else if ('document' === responseType) {\n\n\t\t\t\t}\n\t\t\t\treturn _response;\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tvar target = this;\n\n\t\t\t\tif (_iframe && _iframe.contentWindow) {\n\t\t\t\t\tif (_iframe.contentWindow.stop) { // FireFox/Safari/Chrome\n\t\t\t\t\t\t_iframe.contentWindow.stop();\n\t\t\t\t\t} else if (_iframe.contentWindow.document.execCommand) { // IE\n\t\t\t\t\t\t_iframe.contentWindow.document.execCommand('Stop');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_iframe.src = \"about:blank\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcleanup.call(this, function() {\n\t\t\t\t\t// target.dispatchEvent('readystatechange');\n\t\t\t\t\ttarget.dispatchEvent('abort');\n\t\t\t\t});\n\t\t\t},\n\n\t\t\tdestroy: function() {\n\t\t\t\tthis.getRuntime().getShim().removeInstance(this.uid);\n\t\t\t}\n\t\t});\n\t}\n\n\treturn (extensions.XMLHttpRequest = XMLHttpRequest);\n});\n\n// Included from: src/javascript/runtime/html4/image/Image.js\n\n/**\n * Image.js\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n */\n\n/**\n@class moxie/runtime/html4/image/Image\n@private\n*/\ndefine(\"moxie/runtime/html4/image/Image\", [\n\t\"moxie/runtime/html4/Runtime\",\n\t\"moxie/runtime/html5/image/Image\"\n], function(extensions, Image) {\n\treturn (extensions.Image = Image);\n});\n\nexpose([\"moxie/core/utils/Basic\",\"moxie/core/utils/Encode\",\"moxie/core/utils/Env\",\"moxie/core/Exceptions\",\"moxie/core/utils/Dom\",\"moxie/core/EventTarget\",\"moxie/runtime/Runtime\",\"moxie/runtime/RuntimeClient\",\"moxie/file/Blob\",\"moxie/core/I18n\",\"moxie/core/utils/Mime\",\"moxie/file/FileInput\",\"moxie/file/File\",\"moxie/file/FileDrop\",\"moxie/file/FileReader\",\"moxie/core/utils/Url\",\"moxie/runtime/RuntimeTarget\",\"moxie/xhr/FormData\",\"moxie/xhr/XMLHttpRequest\",\"moxie/image/Image\",\"moxie/core/utils/Events\",\"moxie/runtime/html5/image/ResizerCanvas\"]);\n})(this);\n}));", "/**\n * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill\n * v1.5.7\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n *\n * Date: 2017-11-03\n */\n!function(e,t){var i=function(){var e={};return t.apply(e,arguments),e.moxie};\"function\"==typeof define&&define.amd?define(\"moxie\",[],i):\"object\"==typeof module&&module.exports?module.exports=i():e.moxie=i()}(this||window,function(){!function(e,t){\"use strict\";function i(e,t){for(var i,n=[],r=0;r0&&c(n,function(n,u){var c=-1!==h(e(n),[\"array\",\"object\"]);return n===r||t&&o[u]===r?!0:(c&&i&&(n=a(n)),e(o[u])===e(n)&&c?s(t,i,[o[u],n]):o[u]=n,void 0)})}),o}function u(e,t){function i(){this.constructor=e}for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.parent=t.prototype,e}function c(e,t){var i,n,r,o;if(e){try{i=e.length}catch(a){i=o}if(i===o||\"number\"!=typeof i){for(n in e)if(e.hasOwnProperty(n)&&t(e[n],n)===!1)return}else for(r=0;i>r;r++)if(t(e[r],r)===!1)return}}function l(t){var i;if(!t||\"object\"!==e(t))return!0;for(i in t)return!1;return!0}function d(t,i){function n(r){\"function\"===e(t[r])&&t[r](function(e){++ri;i++)if(t[i]===e)return i}return-1}function f(t,i){var n=[];\"array\"!==e(t)&&(t=[t]),\"array\"!==e(i)&&(i=[i]);for(var r in t)-1===h(t[r],i)&&n.push(t[r]);return n.length?n:!1}function p(e,t){var i=[];return c(e,function(e){-1!==h(e,t)&&i.push(e)}),i.length?i:null}function g(e){var t,i=[];for(t=0;ti;i++)n+=Math.floor(65535*Math.random()).toString(32);return(t||\"o_\")+n+(e++).toString(32)}}();return{guid:E,typeOf:e,extend:t,extendIf:i,extendImmutable:n,extendImmutableIf:r,clone:o,inherit:u,each:c,isEmptyObj:l,inSeries:d,inParallel:m,inArray:h,arrayDiff:f,arrayIntersect:p,toArray:g,trim:x,sprintf:w,parseSizeStr:v,delay:y}}),n(\"moxie/core/utils/Encode\",[],function(){var e=function(e){return unescape(encodeURIComponent(e))},t=function(e){return decodeURIComponent(escape(e))},i=function(e,i){if(\"function\"==typeof window.atob)return i?t(window.atob(e)):window.atob(e);var n,r,o,a,s,u,c,l,d=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",m=0,h=0,f=\"\",p=[];if(!e)return e;e+=\"\";do a=d.indexOf(e.charAt(m++)),s=d.indexOf(e.charAt(m++)),u=d.indexOf(e.charAt(m++)),c=d.indexOf(e.charAt(m++)),l=a<<18|s<<12|u<<6|c,n=255&l>>16,r=255&l>>8,o=255&l,p[h++]=64==u?String.fromCharCode(n):64==c?String.fromCharCode(n,r):String.fromCharCode(n,r,o);while(m>18,s=63&l>>12,u=63&l>>6,c=63&l,p[h++]=d.charAt(a)+d.charAt(s)+d.charAt(u)+d.charAt(c);while(mn;n++)if(e[n]!=t[n]){if(e[n]=u(e[n]),t[n]=u(t[n]),e[n]t[n]){o=1;break}}if(!i)return o;switch(i){case\">\":case\"gt\":return o>0;case\">=\":case\"ge\":return o>=0;case\"<=\":case\"le\":return 0>=o;case\"==\":case\"=\":case\"eq\":return 0===o;case\"<>\":case\"!=\":case\"ne\":return 0!==o;case\"\":case\"<\":case\"lt\":return 0>o;default:return null}}var n=function(e){var t=\"\",i=\"?\",n=\"function\",r=\"undefined\",o=\"object\",a=\"name\",s=\"version\",u={has:function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()}},c={rgx:function(){for(var t,i,a,s,u,c,l,d=0,m=arguments;d0?2==u.length?t[u[0]]=typeof u[1]==n?u[1].call(this,l):u[1]:3==u.length?t[u[0]]=typeof u[1]!==n||u[1].exec&&u[1].test?l?l.replace(u[1],u[2]):e:l?u[1].call(this,l,u[2]):e:4==u.length&&(t[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):e):t[u]=l?l:e;break}if(c)break}return t},str:function(t,n){for(var r in n)if(typeof n[r]===o&&n[r].length>0){for(var a=0;a=\")),i.use_blob_uri},use_data_uri:function(){var e=new Image;return e.onload=function(){i.use_data_uri=1===e.width&&1===e.height},setTimeout(function(){e.src=\"data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==\"},1),!1}(),use_data_uri_over32kb:function(){return i.use_data_uri&&(\"IE\"!==a.browser||a.version>=9)},use_data_uri_of:function(e){return i.use_data_uri&&33e3>e||i.use_data_uri_over32kb()},use_fileinput:function(){if(navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\\/(1.0|2.0|2.5|3.0))/))return!1;var e=document.createElement(\"input\");return e.setAttribute(\"type\",\"file\"),i.use_fileinput=!e.disabled},use_webgl:function(){var e,n=document.createElement(\"canvas\"),r=null;try{r=n.getContext(\"webgl\")||n.getContext(\"experimental-webgl\")}catch(o){}return r||(r=null),e=!!r,i.use_webgl=e,n=t,e}};return function(t){var n=[].slice.call(arguments);return n.shift(),\"function\"===e.typeOf(i[t])?i[t].apply(this,n):!!i[t]}}(),o=(new n).getResult(),a={can:r,uaParser:n,browser:o.browser.name,version:o.browser.version,os:o.os.name,osVersion:o.os.version,verComp:i,swf_url:\"../flash/Moxie.swf\",xap_url:\"../silverlight/Moxie.xap\",global_event_dispatcher:\"moxie.core.EventTarget.instance.dispatchEvent\"};return a.OS=a.os,a}),n(\"moxie/core/Exceptions\",[\"moxie/core/utils/Basic\"],function(e){function t(e,t){var i;for(i in e)if(e[i]===t)return i;return null}return{RuntimeError:function(){function i(e,i){this.code=e,this.name=t(n,e),this.message=this.name+(i||\": RuntimeError \"+this.code)}var n={NOT_INIT_ERR:1,EXCEPTION_ERR:3,NOT_SUPPORTED_ERR:9,JS_ERR:4};return e.extend(i,n),i.prototype=Error.prototype,i}(),OperationNotAllowedException:function(){function t(e){this.code=e,this.name=\"OperationNotAllowedException\"}return e.extend(t,{NOT_ALLOWED_ERR:1}),t.prototype=Error.prototype,t}(),ImageError:function(){function i(e){this.code=e,this.name=t(n,e),this.message=this.name+\": ImageError \"+this.code}var n={WRONG_FORMAT:1,MAX_RESOLUTION_ERR:2,INVALID_META_ERR:3};return e.extend(i,n),i.prototype=Error.prototype,i}(),FileException:function(){function i(e){this.code=e,this.name=t(n,e),this.message=this.name+\": FileException \"+this.code}var n={NOT_FOUND_ERR:1,SECURITY_ERR:2,ABORT_ERR:3,NOT_READABLE_ERR:4,ENCODING_ERR:5,NO_MODIFICATION_ALLOWED_ERR:6,INVALID_STATE_ERR:7,SYNTAX_ERR:8};return e.extend(i,n),i.prototype=Error.prototype,i}(),DOMException:function(){function i(e){this.code=e,this.name=t(n,e),this.message=this.name+\": DOMException \"+this.code}var n={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25};return e.extend(i,n),i.prototype=Error.prototype,i}(),EventException:function(){function t(e){this.code=e,this.name=\"EventException\"}return e.extend(t,{UNSPECIFIED_EVENT_TYPE_ERR:0}),t.prototype=Error.prototype,t}()}}),n(\"moxie/core/utils/Dom\",[\"moxie/core/utils/Env\"],function(e){var t=function(e){return\"string\"!=typeof e?e:document.getElementById(e)},i=function(e,t){if(!e.className)return!1;var i=new RegExp(\"(^|\\\\s+)\"+t+\"(\\\\s+|$)\");return i.test(e.className)},n=function(e,t){i(e,t)||(e.className=e.className?e.className.replace(/\\s+$/,\"\")+\" \"+t:t)},r=function(e,t){if(e.className){var i=new RegExp(\"(^|\\\\s+)\"+t+\"(\\\\s+|$)\");e.className=e.className.replace(i,function(e,t,i){return\" \"===t&&\" \"===i?\" \":\"\"})}},o=function(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null)[t]:void 0},a=function(t,i){function n(e){var t,i,n=0,r=0;return e&&(i=e.getBoundingClientRect(),t=\"CSS1Compat\"===c.compatMode?c.documentElement:c.body,n=i.left+t.scrollLeft,r=i.top+t.scrollTop),{x:n,y:r}}var r,o,a,s=0,u=0,c=document;if(t=t,i=i||c.body,t&&t.getBoundingClientRect&&\"IE\"===e.browser&&(!c.documentMode||c.documentMode<8))return o=n(t),a=n(i),{x:o.x-a.x,y:o.y-a.y};for(r=t;r&&r!=i&&r.nodeType;)s+=r.offsetLeft||0,u+=r.offsetTop||0,r=r.offsetParent;for(r=t.parentNode;r&&r!=i&&r.nodeType;)s-=r.scrollLeft||0,u-=r.scrollTop||0,r=r.parentNode;return{x:s,y:u}},s=function(e){return{w:e.offsetWidth||e.clientWidth,h:e.offsetHeight||e.clientHeight}};return{get:t,hasClass:i,addClass:n,removeClass:r,getStyle:o,getPos:a,getSize:s}}),n(\"moxie/core/EventTarget\",[\"moxie/core/utils/Env\",\"moxie/core/Exceptions\",\"moxie/core/utils/Basic\"],function(e,t,i){function n(){this.uid=i.guid()}var r={};return i.extend(n.prototype,{init:function(){this.uid||(this.uid=i.guid(\"uid_\"))},addEventListener:function(e,t,n,o){var a,s=this;return this.hasOwnProperty(\"uid\")||(this.uid=i.guid(\"uid_\")),e=i.trim(e),/\\s/.test(e)?(i.each(e.split(/\\s+/),function(e){s.addEventListener(e,t,n,o)}),void 0):(e=e.toLowerCase(),n=parseInt(n,10)||0,a=r[this.uid]&&r[this.uid][e]||[],a.push({fn:t,priority:n,scope:o||this}),r[this.uid]||(r[this.uid]={}),r[this.uid][e]=a,void 0)},hasEventListener:function(e){var t;return e?(e=e.toLowerCase(),t=r[this.uid]&&r[this.uid][e]):t=r[this.uid],t?t:!1},removeEventListener:function(e,t){var n,o,a=this;if(e=e.toLowerCase(),/\\s/.test(e))return i.each(e.split(/\\s+/),function(e){a.removeEventListener(e,t)}),void 0;if(n=r[this.uid]&&r[this.uid][e]){if(t){for(o=n.length-1;o>=0;o--)if(n[o].fn===t){n.splice(o,1);break}}else n=[];n.length||(delete r[this.uid][e],i.isEmptyObj(r[this.uid])&&delete r[this.uid])}},removeAllEventListeners:function(){r[this.uid]&&delete r[this.uid]},dispatchEvent:function(e){var n,o,a,s,u,c={},l=!0;if(\"string\"!==i.typeOf(e)){if(s=e,\"string\"!==i.typeOf(s.type))throw new t.EventException(t.EventException.UNSPECIFIED_EVENT_TYPE_ERR);e=s.type,s.total!==u&&s.loaded!==u&&(c.total=s.total,c.loaded=s.loaded),c.async=s.async||!1}if(-1!==e.indexOf(\"::\")?function(t){n=t[0],e=t[1]}(e.split(\"::\")):n=this.uid,e=e.toLowerCase(),o=r[n]&&r[n][e]){o.sort(function(e,t){return t.priority-e.priority}),a=[].slice.call(arguments),a.shift(),c.type=e,a.unshift(c);var d=[];i.each(o,function(e){a[0].target=e.scope,c.async?d.push(function(t){setTimeout(function(){t(e.fn.apply(e.scope,a)===!1)},1)}):d.push(function(t){t(e.fn.apply(e.scope,a)===!1)})}),d.length&&i.inSeries(d,function(e){l=!e})}return l},bindOnce:function(e,t,i,n){var r=this;r.bind.call(this,e,function o(){return r.unbind(e,o),t.apply(this,arguments)},i,n)},bind:function(){this.addEventListener.apply(this,arguments)},unbind:function(){this.removeEventListener.apply(this,arguments)},unbindAll:function(){this.removeAllEventListeners.apply(this,arguments)},trigger:function(){return this.dispatchEvent.apply(this,arguments)},handleEventProps:function(e){var t=this;this.bind(e.join(\" \"),function(e){var t=\"on\"+e.type.toLowerCase();\"function\"===i.typeOf(this[t])&&this[t].apply(this,arguments)}),i.each(e,function(e){e=\"on\"+e.toLowerCase(e),\"undefined\"===i.typeOf(t[e])&&(t[e]=null)})}}),n.instance=new n,n}),n(\"moxie/runtime/Runtime\",[\"moxie/core/utils/Env\",\"moxie/core/utils/Basic\",\"moxie/core/utils/Dom\",\"moxie/core/EventTarget\"],function(e,t,i,n){function r(e,n,o,s,u){var c,l=this,d=t.guid(n+\"_\"),m=u||\"browser\";e=e||{},a[d]=this,o=t.extend({access_binary:!1,access_image_binary:!1,display_media:!1,do_cors:!1,drag_and_drop:!1,filter_by_extension:!0,resize_image:!1,report_upload_progress:!1,return_response_headers:!1,return_response_type:!1,return_status_code:!0,send_custom_headers:!1,select_file:!1,select_folder:!1,select_multiple:!0,send_binary_string:!1,send_browser_cookies:!0,send_multipart:!0,slice_blob:!1,stream_upload:!1,summon_file_dialog:!1,upload_filesize:!0,use_http_method:!0},o),e.preferred_caps&&(m=r.getMode(s,e.preferred_caps,m)),c=function(){var e={};return{exec:function(t,i,n,r){return c[i]&&(e[t]||(e[t]={context:this,instance:new c[i]}),e[t].instance[n])?e[t].instance[n].apply(this,r):void 0},removeInstance:function(t){delete e[t]},removeAllInstances:function(){var i=this;t.each(e,function(e,n){\"function\"===t.typeOf(e.instance.destroy)&&e.instance.destroy.call(e.context),i.removeInstance(n)})}}}(),t.extend(this,{initialized:!1,uid:d,type:n,mode:r.getMode(s,e.required_caps,m),shimid:d+\"_container\",clients:0,options:e,can:function(e,i){var n=arguments[2]||o;if(\"string\"===t.typeOf(e)&&\"undefined\"===t.typeOf(i)&&(e=r.parseCaps(e)),\"object\"===t.typeOf(e)){for(var a in e)if(!this.can(a,e[a],n))return!1;return!0}return\"function\"===t.typeOf(n[e])?n[e].call(this,i):i===n[e]},getShimContainer:function(){var e,n=i.get(this.shimid);return n||(e=i.get(this.options.container)||document.body,n=document.createElement(\"div\"),n.id=this.shimid,n.className=\"moxie-shim moxie-shim-\"+this.type,t.extend(n.style,{position:\"absolute\",top:\"0px\",left:\"0px\",width:\"1px\",height:\"1px\",overflow:\"hidden\"}),e.appendChild(n),e=null),n},getShim:function(){return c},shimExec:function(e,t){var i=[].slice.call(arguments,2);return l.getShim().exec.call(this,this.uid,e,t,i)},exec:function(e,t){var i=[].slice.call(arguments,2);return l[e]&&l[e][t]?l[e][t].apply(this,i):l.shimExec.apply(this,arguments)},destroy:function(){if(l){var e=i.get(this.shimid);e&&e.parentNode.removeChild(e),c&&c.removeAllInstances(),this.unbindAll(),delete a[this.uid],this.uid=null,d=l=c=e=null}}}),this.mode&&e.required_caps&&!this.can(e.required_caps)&&(this.mode=!1)}var o={},a={};return r.order=\"html5,flash,silverlight,html4\",r.getRuntime=function(e){return a[e]?a[e]:!1},r.addConstructor=function(e,t){t.prototype=n.instance,o[e]=t},r.getConstructor=function(e){return o[e]||null},r.getInfo=function(e){var t=r.getRuntime(e);return t?{uid:t.uid,type:t.type,mode:t.mode,can:function(){return t.can.apply(t,arguments)}}:null},r.parseCaps=function(e){var i={};return\"string\"!==t.typeOf(e)?e||{}:(t.each(e.split(\",\"),function(e){i[e]=!0}),i)},r.can=function(e,t){var i,n,o=r.getConstructor(e);return o?(i=new o({required_caps:t}),n=i.mode,i.destroy(),!!n):!1},r.thatCan=function(e,t){var i=(t||r.order).split(/\\s*,\\s*/);for(var n in i)if(r.can(i[n],e))return i[n];return null},r.getMode=function(e,i,n){var r=null;if(\"undefined\"===t.typeOf(n)&&(n=\"browser\"),i&&!t.isEmptyObj(e)){if(t.each(i,function(i,n){if(e.hasOwnProperty(n)){var o=e[n](i);if(\"string\"==typeof o&&(o=[o]),r){if(!(r=t.arrayIntersect(r,o)))return r=!1}else r=o}}),r)return-1!==t.inArray(n,r)?n:r[0];if(r===!1)return!1}return n},r.getGlobalEventTarget=function(){if(/^moxie\\./.test(e.global_event_dispatcher)&&!e.can(\"access_global_ns\")){var i=t.guid(\"moxie_event_target_\");window[i]=function(e,t){n.instance.dispatchEvent(e,t)},e.global_event_dispatcher=i}return e.global_event_dispatcher},r.capTrue=function(){return!0},r.capFalse=function(){return!1},r.capTest=function(e){return function(){return!!e}},r}),n(\"moxie/runtime/RuntimeClient\",[\"moxie/core/utils/Env\",\"moxie/core/Exceptions\",\"moxie/core/utils/Basic\",\"moxie/runtime/Runtime\"],function(e,t,i,n){return function(){var e;i.extend(this,{connectRuntime:function(r){function o(i){var a,u;return i.length?(a=i.shift().toLowerCase(),(u=n.getConstructor(a))?(e=new u(r),e.bind(\"Init\",function(){e.initialized=!0,setTimeout(function(){e.clients++,s.ruid=e.uid,s.trigger(\"RuntimeInit\",e)},1)}),e.bind(\"Error\",function(){e.destroy(),o(i)}),e.bind(\"Exception\",function(e,i){var n=i.name+\"(#\"+i.code+\")\"+(i.message?\", from: \"+i.message:\"\");s.trigger(\"RuntimeError\",new t.RuntimeError(t.RuntimeError.EXCEPTION_ERR,n))}),e.mode?(e.init(),void 0):(e.trigger(\"Error\"),void 0)):(o(i),void 0)):(s.trigger(\"RuntimeError\",new t.RuntimeError(t.RuntimeError.NOT_INIT_ERR)),e=null,void 0)}var a,s=this;if(\"string\"===i.typeOf(r)?a=r:\"string\"===i.typeOf(r.ruid)&&(a=r.ruid),a){if(e=n.getRuntime(a))return s.ruid=a,e.clients++,e;throw new t.RuntimeError(t.RuntimeError.NOT_INIT_ERR)}o((r.runtime_order||n.order).split(/\\s*,\\s*/))},disconnectRuntime:function(){e&&--e.clients<=0&&e.destroy(),e=null},getRuntime:function(){return e&&e.uid?e:e=null},exec:function(){return e?e.exec.apply(this,arguments):null},can:function(t){return e?e.can(t):!1}})}}),n(\"moxie/file/Blob\",[\"moxie/core/utils/Basic\",\"moxie/core/utils/Encode\",\"moxie/runtime/RuntimeClient\"],function(e,t,i){function n(o,a){function s(t,i,o){var a,s=r[this.uid];return\"string\"===e.typeOf(s)&&s.length?(a=new n(null,{type:o,size:i-t}),a.detach(s.substr(t,a.size)),a):null}i.call(this),o&&this.connectRuntime(o),a?\"string\"===e.typeOf(a)&&(a={data:a}):a={},e.extend(this,{uid:a.uid||e.guid(\"uid_\"),ruid:o,size:a.size||0,type:a.type||\"\",slice:function(e,t,i){return this.isDetached()?s.apply(this,arguments):this.getRuntime().exec.call(this,\"Blob\",\"slice\",this.getSource(),e,t,i)},getSource:function(){return r[this.uid]?r[this.uid]:null},detach:function(e){if(this.ruid&&(this.getRuntime().exec.call(this,\"Blob\",\"destroy\"),this.disconnectRuntime(),this.ruid=null),e=e||\"\",\"data:\"==e.substr(0,5)){var i=e.indexOf(\";base64,\");this.type=e.substring(5,i),e=t.atob(e.substring(i+8))}this.size=e.length,r[this.uid]=e},isDetached:function(){return!this.ruid&&\"string\"===e.typeOf(r[this.uid])},destroy:function(){this.detach(),delete r[this.uid]}}),a.data?this.detach(a.data):r[this.uid]=a}var r={};return n}),n(\"moxie/core/I18n\",[\"moxie/core/utils/Basic\"],function(e){var t={};return{addI18n:function(i){return e.extend(t,i)},translate:function(e){return t[e]||e},_:function(e){return this.translate(e)},sprintf:function(t){var i=[].slice.call(arguments,1);return t.replace(/%[a-z]/g,function(){var t=i.shift();return\"undefined\"!==e.typeOf(t)?t:\"\"})}}}),n(\"moxie/core/utils/Mime\",[\"moxie/core/utils/Basic\",\"moxie/core/I18n\"],function(e,t){var i=\"application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb xlt xla,application/vnd.ms-powerpoint,ppt pps pot ppa,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mp3 mpga mpega mp2,audio/x-wav,wav,audio/x-m4a,m4a,audio/ogg,oga ogg,audio/aiff,aiff aif,audio/flac,flac,audio/aac,aac,audio/ac3,ac3,audio/x-ms-wma,wma,image/bmp,bmp,image/gif,gif,image/jpeg,jpg jpeg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe m2v,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/3gpp,3gpp 3gp,video/3gpp2,3g2,video/vnd.rn-realvideo,rv,video/ogg,ogv,video/x-matroska,mkv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe\",n={},r={},o=function(e){var t,i,o,a=e.split(/,/);for(t=0;ta;a++)o+=String.fromCharCode(r[a]);return o}}t.call(this),e.extend(this,{uid:e.guid(\"uid_\"),readAsBinaryString:function(e){return n.call(this,\"readAsBinaryString\",e)},readAsDataURL:function(e){return n.call(this,\"readAsDataURL\",e)},readAsText:function(e){return n.call(this,\"readAsText\",e)}})}}),n(\"moxie/xhr/FormData\",[\"moxie/core/Exceptions\",\"moxie/core/utils/Basic\",\"moxie/file/Blob\"],function(e,t,i){function n(){var e,n=[];t.extend(this,{append:function(r,o){var a=this,s=t.typeOf(o);o instanceof i?e={name:r,value:o}:\"array\"===s?(r+=\"[]\",t.each(o,function(e){a.append(r,e)})):\"object\"===s?t.each(o,function(e,t){a.append(r+\"[\"+t+\"]\",e)}):\"null\"===s||\"undefined\"===s||\"number\"===s&&isNaN(o)?a.append(r,\"false\"):n.push({name:r,value:o.toString()})},hasBlob:function(){return!!this.getBlob()},getBlob:function(){return e&&e.value||null},getBlobName:function(){return e&&e.name||null},each:function(i){t.each(n,function(e){i(e.value,e.name)}),e&&i(e.value,e.name)},destroy:function(){e=null,n=[]}})}return n}),n(\"moxie/xhr/XMLHttpRequest\",[\"moxie/core/utils/Basic\",\"moxie/core/Exceptions\",\"moxie/core/EventTarget\",\"moxie/core/utils/Encode\",\"moxie/core/utils/Url\",\"moxie/runtime/Runtime\",\"moxie/runtime/RuntimeTarget\",\"moxie/file/Blob\",\"moxie/file/FileReaderSync\",\"moxie/xhr/FormData\",\"moxie/core/utils/Env\",\"moxie/core/utils/Mime\"],function(e,t,i,n,r,o,a,s,u,c,l,d){function m(){this.uid=e.guid(\"uid_\")}function h(){function i(e,t){return I.hasOwnProperty(e)?1===arguments.length?l.can(\"define_property\")?I[e]:A[e]:(l.can(\"define_property\")?I[e]=t:A[e]=t,void 0):void 0}function u(t){function n(){_&&(_.destroy(),_=null),s.dispatchEvent(\"loadend\"),s=null}function r(r){_.bind(\"LoadStart\",function(e){i(\"readyState\",h.LOADING),s.dispatchEvent(\"readystatechange\"),s.dispatchEvent(e),L&&s.upload.dispatchEvent(e)}),_.bind(\"Progress\",function(e){i(\"readyState\")!==h.LOADING&&(i(\"readyState\",h.LOADING),s.dispatchEvent(\"readystatechange\")),s.dispatchEvent(e)}),_.bind(\"UploadProgress\",function(e){L&&s.upload.dispatchEvent({type:\"progress\",lengthComputable:!1,total:e.total,loaded:e.loaded})}),_.bind(\"Load\",function(t){i(\"readyState\",h.DONE),i(\"status\",Number(r.exec.call(_,\"XMLHttpRequest\",\"getStatus\")||0)),i(\"statusText\",f[i(\"status\")]||\"\"),i(\"response\",r.exec.call(_,\"XMLHttpRequest\",\"getResponse\",i(\"responseType\"))),~e.inArray(i(\"responseType\"),[\"text\",\"\"])?i(\"responseText\",i(\"response\")):\"document\"===i(\"responseType\")&&i(\"responseXML\",i(\"response\")),U=r.exec.call(_,\"XMLHttpRequest\",\"getAllResponseHeaders\"),s.dispatchEvent(\"readystatechange\"),i(\"status\")>0?(L&&s.upload.dispatchEvent(t),s.dispatchEvent(t)):(F=!0,s.dispatchEvent(\"error\")),n()}),_.bind(\"Abort\",function(e){s.dispatchEvent(e),n()}),_.bind(\"Error\",function(e){F=!0,i(\"readyState\",h.DONE),s.dispatchEvent(\"readystatechange\"),M=!0,s.dispatchEvent(e),n()}),r.exec.call(_,\"XMLHttpRequest\",\"send\",{url:x,method:v,async:T,user:w,password:y,headers:S,mimeType:D,encoding:O,responseType:s.responseType,withCredentials:s.withCredentials,options:k},t)}var s=this;E=(new Date).getTime(),_=new a,\"string\"==typeof k.required_caps&&(k.required_caps=o.parseCaps(k.required_caps)),k.required_caps=e.extend({},k.required_caps,{return_response_type:s.responseType}),t instanceof c&&(k.required_caps.send_multipart=!0),e.isEmptyObj(S)||(k.required_caps.send_custom_headers=!0),B||(k.required_caps.do_cors=!0),k.ruid?r(_.connectRuntime(k)):(_.bind(\"RuntimeInit\",function(e,t){r(t)}),_.bind(\"RuntimeError\",function(e,t){s.dispatchEvent(\"RuntimeError\",t)}),_.connectRuntime(k))}function g(){i(\"responseText\",\"\"),i(\"responseXML\",null),i(\"response\",null),i(\"status\",0),i(\"statusText\",\"\"),E=b=null}var x,v,w,y,E,b,_,R,A=this,I={timeout:0,readyState:h.UNSENT,withCredentials:!1,status:0,statusText:\"\",responseType:\"\",responseXML:null,responseText:null,response:null},T=!0,S={},O=null,D=null,N=!1,C=!1,L=!1,M=!1,F=!1,B=!1,P=null,H=null,k={},U=\"\";e.extend(this,I,{uid:e.guid(\"uid_\"),upload:new m,open:function(o,a,s,u,c){var l;if(!o||!a)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(/[\\u0100-\\uffff]/.test(o)||n.utf8_encode(o)!==o)throw new t.DOMException(t.DOMException.SYNTAX_ERR);if(~e.inArray(o.toUpperCase(),[\"CONNECT\",\"DELETE\",\"GET\",\"HEAD\",\"OPTIONS\",\"POST\",\"PUT\",\"TRACE\",\"TRACK\"])&&(v=o.toUpperCase()),~e.inArray(v,[\"CONNECT\",\"TRACE\",\"TRACK\"]))throw new t.DOMException(t.DOMException.SECURITY_ERR);if(a=n.utf8_encode(a),l=r.parseUrl(a),B=r.hasSameOrigin(l),x=r.resolveUrl(a),(u||c)&&!B)throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);if(w=u||l.user,y=c||l.pass,T=s||!0,T===!1&&(i(\"timeout\")||i(\"withCredentials\")||\"\"!==i(\"responseType\")))throw new t.DOMException(t.DOMException.INVALID_ACCESS_ERR);N=!T,C=!1,S={},g.call(this),i(\"readyState\",h.OPENED),this.dispatchEvent(\"readystatechange\")},setRequestHeader:function(r,o){var a=[\"accept-charset\",\"accept-encoding\",\"access-control-request-headers\",\"access-control-request-method\",\"connection\",\"content-length\",\"cookie\",\"cookie2\",\"content-transfer-encoding\",\"date\",\"expect\",\"host\",\"keep-alive\",\"origin\",\"referer\",\"te\",\"trailer\",\"transfer-encoding\",\"upgrade\",\"user-agent\",\"via\"];if(i(\"readyState\")!==h.OPENED||C)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(/[\\u0100-\\uffff]/.test(r)||n.utf8_encode(r)!==r)throw new t.DOMException(t.DOMException.SYNTAX_ERR);return r=e.trim(r).toLowerCase(),~e.inArray(r,a)||/^(proxy\\-|sec\\-)/.test(r)?!1:(S[r]?S[r]+=\", \"+o:S[r]=o,!0)},hasRequestHeader:function(e){return e&&S[e.toLowerCase()]||!1},getAllResponseHeaders:function(){return U||\"\"},getResponseHeader:function(t){return t=t.toLowerCase(),F||~e.inArray(t,[\"set-cookie\",\"set-cookie2\"])?null:U&&\"\"!==U&&(R||(R={},e.each(U.split(/\\r\\n/),function(t){var i=t.split(/:\\s+/);2===i.length&&(i[0]=e.trim(i[0]),R[i[0].toLowerCase()]={header:i[0],value:e.trim(i[1])})})),R.hasOwnProperty(t))?R[t].header+\": \"+R[t].value:null},overrideMimeType:function(n){var r,o;if(~e.inArray(i(\"readyState\"),[h.LOADING,h.DONE]))throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(n=e.trim(n.toLowerCase()),/;/.test(n)&&(r=n.match(/^([^;]+)(?:;\\scharset\\=)?(.*)$/))&&(n=r[1],r[2]&&(o=r[2])),!d.mimes[n])throw new t.DOMException(t.DOMException.SYNTAX_ERR);P=n,H=o},send:function(i,r){if(k=\"string\"===e.typeOf(r)?{ruid:r}:r?r:{},this.readyState!==h.OPENED||C)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);if(i instanceof s)k.ruid=i.ruid,D=i.type||\"application/octet-stream\";else if(i instanceof c){if(i.hasBlob()){var o=i.getBlob();k.ruid=o.ruid,D=o.type||\"application/octet-stream\"}}else\"string\"==typeof i&&(O=\"UTF-8\",D=\"text/plain;charset=UTF-8\",i=n.utf8_encode(i));this.withCredentials||(this.withCredentials=k.required_caps&&k.required_caps.send_browser_cookies&&!B),L=!N&&this.upload.hasEventListener(),F=!1,M=!i,N||(C=!0),u.call(this,i)},abort:function(){if(F=!0,N=!1,~e.inArray(i(\"readyState\"),[h.UNSENT,h.OPENED,h.DONE]))i(\"readyState\",h.UNSENT);else{if(i(\"readyState\",h.DONE),C=!1,!_)throw new t.DOMException(t.DOMException.INVALID_STATE_ERR);_.getRuntime().exec.call(_,\"XMLHttpRequest\",\"abort\",M),M=!0}},destroy:function(){_&&(\"function\"===e.typeOf(_.destroy)&&_.destroy(),_=null),this.unbindAll(),this.upload&&(this.upload.unbindAll(),this.upload=null)}}),this.handleEventProps(p.concat([\"readystatechange\"])),this.upload.handleEventProps(p)}var f={100:\"Continue\",101:\"Switching Protocols\",102:\"Processing\",200:\"OK\",201:\"Created\",202:\"Accepted\",203:\"Non-Authoritative Information\",204:\"No Content\",205:\"Reset Content\",206:\"Partial Content\",207:\"Multi-Status\",226:\"IM Used\",300:\"Multiple Choices\",301:\"Moved Permanently\",302:\"Found\",303:\"See Other\",304:\"Not Modified\",305:\"Use Proxy\",306:\"Reserved\",307:\"Temporary Redirect\",400:\"Bad Request\",401:\"Unauthorized\",402:\"Payment Required\",403:\"Forbidden\",404:\"Not Found\",405:\"Method Not Allowed\",406:\"Not Acceptable\",407:\"Proxy Authentication Required\",408:\"Request Timeout\",409:\"Conflict\",410:\"Gone\",411:\"Length Required\",412:\"Precondition Failed\",413:\"Request Entity Too Large\",414:\"Request-URI Too Long\",415:\"Unsupported Media Type\",416:\"Requested Range Not Satisfiable\",417:\"Expectation Failed\",422:\"Unprocessable Entity\",423:\"Locked\",424:\"Failed Dependency\",426:\"Upgrade Required\",500:\"Internal Server Error\",501:\"Not Implemented\",502:\"Bad Gateway\",503:\"Service Unavailable\",504:\"Gateway Timeout\",505:\"HTTP Version Not Supported\",506:\"Variant Also Negotiates\",507:\"Insufficient Storage\",510:\"Not Extended\"};m.prototype=i.instance;var p=[\"loadstart\",\"progress\",\"abort\",\"error\",\"load\",\"timeout\",\"loadend\"];return h.UNSENT=0,h.OPENED=1,h.HEADERS_RECEIVED=2,h.LOADING=3,h.DONE=4,h.prototype=i.instance,h}),n(\"moxie/runtime/Transporter\",[\"moxie/core/utils/Basic\",\"moxie/core/utils/Encode\",\"moxie/runtime/RuntimeClient\",\"moxie/core/EventTarget\"],function(e,t,i,n){function r(){function n(){l=d=0,c=this.result=null}function o(t,i){var n=this;u=i,n.bind(\"TransportingProgress\",function(t){d=t.loaded,l>d&&-1===e.inArray(n.state,[r.IDLE,r.DONE])&&a.call(n)},999),n.bind(\"TransportingComplete\",function(){d=l,n.state=r.DONE,c=null,n.result=u.exec.call(n,\"Transporter\",\"getAsBlob\",t||\"\")},999),n.state=r.BUSY,n.trigger(\"TransportingStarted\"),a.call(n)}function a(){var e,i=this,n=l-d;m>n&&(m=n),e=t.btoa(c.substr(d,m)),u.exec.call(i,\"Transporter\",\"receive\",e,l)}var s,u,c,l,d,m;i.call(this),e.extend(this,{uid:e.guid(\"uid_\"),state:r.IDLE,result:null,transport:function(t,i,r){var a=this;if(r=e.extend({chunk_size:204798},r),(s=r.chunk_size%3)&&(r.chunk_size+=3-s),m=r.chunk_size,n.call(this),c=t,l=t.length,\"string\"===e.typeOf(r)||r.ruid)o.call(a,i,this.connectRuntime(r));else{var u=function(e,t){a.unbind(\"RuntimeInit\",u),o.call(a,i,t)};this.bind(\"RuntimeInit\",u),this.connectRuntime(r)}},abort:function(){var e=this;e.state=r.IDLE,u&&(u.exec.call(e,\"Transporter\",\"clear\"),e.trigger(\"TransportingAborted\")),n.call(e)},destroy:function(){this.unbindAll(),u=null,this.disconnectRuntime(),n.call(this)}})}return r.IDLE=0,r.BUSY=1,r.DONE=2,r.prototype=n.instance,r}),n(\"moxie/image/Image\",[\"moxie/core/utils/Basic\",\"moxie/core/utils/Dom\",\"moxie/core/Exceptions\",\"moxie/file/FileReaderSync\",\"moxie/xhr/XMLHttpRequest\",\"moxie/runtime/Runtime\",\"moxie/runtime/RuntimeClient\",\"moxie/runtime/Transporter\",\"moxie/core/utils/Env\",\"moxie/core/EventTarget\",\"moxie/file/Blob\",\"moxie/file/File\",\"moxie/core/utils/Encode\"],function(e,t,i,n,r,o,a,s,u,c,l,d,m){function h(){function n(e){try{return e||(e=this.exec(\"Image\",\"getInfo\")),this.size=e.size,this.width=e.width,this.height=e.height,this.type=e.type,this.meta=e.meta,\"\"===this.name&&(this.name=e.name),!0}catch(t){return this.trigger(\"error\",t.code),!1}}function c(t){var n=e.typeOf(t);try{if(t instanceof h){if(!t.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);p.apply(this,arguments)}else if(t instanceof l){if(!~e.inArray(t.type,[\"image/jpeg\",\"image/png\"]))throw new i.ImageError(i.ImageError.WRONG_FORMAT);g.apply(this,arguments)}else if(-1!==e.inArray(n,[\"blob\",\"file\"]))c.call(this,new d(null,t),arguments[1]);else if(\"string\"===n)\"data:\"===t.substr(0,5)?c.call(this,new l(null,{data:t}),arguments[1]):x.apply(this,arguments);else{if(\"node\"!==n||\"img\"!==t.nodeName.toLowerCase())throw new i.DOMException(i.DOMException.TYPE_MISMATCH_ERR);c.call(this,t.src,arguments[1])}}catch(r){this.trigger(\"error\",r.code)}}function p(t,i){var n=this.connectRuntime(t.ruid);this.ruid=n.uid,n.exec.call(this,\"Image\",\"loadFromImage\",t,\"undefined\"===e.typeOf(i)?!0:i)}function g(t,i){function n(e){r.ruid=e.uid,e.exec.call(r,\"Image\",\"loadFromBlob\",t)}var r=this;r.name=t.name||\"\",t.isDetached()?(this.bind(\"RuntimeInit\",function(e,t){n(t)}),i&&\"string\"==typeof i.required_caps&&(i.required_caps=o.parseCaps(i.required_caps)),this.connectRuntime(e.extend({required_caps:{access_image_binary:!0,resize_image:!0}},i))):n(this.connectRuntime(t.ruid))}function x(e,t){var i,n=this;i=new r,i.open(\"get\",e),i.responseType=\"blob\",i.onprogress=function(e){n.trigger(e)},i.onload=function(){g.call(n,i.response,!0)},i.onerror=function(e){n.trigger(e)},i.onloadend=function(){i.destroy()},i.bind(\"RuntimeError\",function(e,t){n.trigger(\"RuntimeError\",t)}),i.send(null,t)}a.call(this),e.extend(this,{uid:e.guid(\"uid_\"),ruid:null,name:\"\",size:0,width:0,height:0,type:\"\",meta:{},clone:function(){this.load.apply(this,arguments)},load:function(){c.apply(this,arguments)},resize:function(t){var n,r,o=this,a={x:0,y:0,width:o.width,height:o.height},s=e.extendIf({width:o.width,height:o.height,type:o.type||\"image/jpeg\",quality:90,crop:!1,fit:!0,preserveHeaders:!0,resample:\"default\",multipass:!0},t);try{if(!o.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);if(o.width>h.MAX_RESIZE_WIDTH||o.height>h.MAX_RESIZE_HEIGHT)throw new i.ImageError(i.ImageError.MAX_RESOLUTION_ERR);if(n=o.meta&&o.meta.tiff&&o.meta.tiff.Orientation||1,-1!==e.inArray(n,[5,6,7,8])){var u=s.width;s.width=s.height,s.height=u}if(s.crop){switch(r=Math.max(s.width/o.width,s.height/o.height),t.fit?(a.width=Math.min(Math.ceil(s.width/r),o.width),a.height=Math.min(Math.ceil(s.height/r),o.height),r=s.width/a.width):(a.width=Math.min(s.width,o.width),a.height=Math.min(s.height,o.height),r=1),\"boolean\"==typeof s.crop&&(s.crop=\"cc\"),s.crop.toLowerCase().replace(/_/,\"-\")){case\"rb\":case\"right-bottom\":a.x=o.width-a.width,a.y=o.height-a.height;break;case\"cb\":case\"center-bottom\":a.x=Math.floor((o.width-a.width)/2),a.y=o.height-a.height;break;case\"lb\":case\"left-bottom\":a.x=0,a.y=o.height-a.height;break;case\"lt\":case\"left-top\":a.x=0,a.y=0;break;case\"ct\":case\"center-top\":a.x=Math.floor((o.width-a.width)/2),a.y=0;break;case\"rt\":case\"right-top\":a.x=o.width-a.width,a.y=0;break;case\"rc\":case\"right-center\":case\"right-middle\":a.x=o.width-a.width,a.y=Math.floor((o.height-a.height)/2);break;case\"lc\":case\"left-center\":case\"left-middle\":a.x=0,a.y=Math.floor((o.height-a.height)/2);break;case\"cc\":case\"center-center\":case\"center-middle\":default:a.x=Math.floor((o.width-a.width)/2),a.y=Math.floor((o.height-a.height)/2)}a.x=Math.max(a.x,0),a.y=Math.max(a.y,0)}else r=Math.min(s.width/o.width,s.height/o.height),r>1&&!s.fit&&(r=1);this.exec(\"Image\",\"resize\",a,r,s)}catch(c){o.trigger(\"error\",c.code)}},downsize:function(t){var i,n={width:this.width,height:this.height,type:this.type||\"image/jpeg\",quality:90,crop:!1,fit:!1,preserveHeaders:!0,resample:\"default\"};i=\"object\"==typeof t?e.extend(n,t):e.extend(n,{width:arguments[0],height:arguments[1],crop:arguments[2],preserveHeaders:arguments[3]}),this.resize(i)},crop:function(e,t,i){this.downsize(e,t,!0,i)},getAsCanvas:function(){if(!u.can(\"create_canvas\"))throw new i.RuntimeError(i.RuntimeError.NOT_SUPPORTED_ERR);return this.exec(\"Image\",\"getAsCanvas\")},getAsBlob:function(e,t){if(!this.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);return this.exec(\"Image\",\"getAsBlob\",e||\"image/jpeg\",t||90)},getAsDataURL:function(e,t){if(!this.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);return this.exec(\"Image\",\"getAsDataURL\",e||\"image/jpeg\",t||90)},getAsBinaryString:function(e,t){var i=this.getAsDataURL(e,t);return m.atob(i.substring(i.indexOf(\"base64,\")+7))},embed:function(n,r){function o(t,r){var o=this;if(u.can(\"create_canvas\")){var l=o.getAsCanvas();if(l)return n.appendChild(l),l=null,o.destroy(),c.trigger(\"embedded\"),void 0}var d=o.getAsDataURL(t,r);if(!d)throw new i.ImageError(i.ImageError.WRONG_FORMAT);if(u.can(\"use_data_uri_of\",d.length))n.innerHTML='\"\"',o.destroy(),c.trigger(\"embedded\");else{var h=new s;h.bind(\"TransportingComplete\",function(){a=c.connectRuntime(this.result.ruid),c.bind(\"Embedded\",function(){e.extend(a.getShimContainer().style,{top:\"0px\",left:\"0px\",width:o.width+\"px\",height:o.height+\"px\"}),a=null},999),a.exec.call(c,\"ImageView\",\"display\",this.result.uid,width,height),o.destroy()}),h.transport(m.atob(d.substring(d.indexOf(\"base64,\")+7)),t,{required_caps:{display_media:!0},runtime_order:\"flash,silverlight\",container:n})}}var a,c=this,l=e.extend({width:this.width,height:this.height,type:this.type||\"image/jpeg\",quality:90,fit:!0,resample:\"nearest\"},r);try{if(!(n=t.get(n)))throw new i.DOMException(i.DOMException.INVALID_NODE_TYPE_ERR);if(!this.size)throw new i.DOMException(i.DOMException.INVALID_STATE_ERR);this.width>h.MAX_RESIZE_WIDTH||this.height>h.MAX_RESIZE_HEIGHT;var d=new h;return d.bind(\"Resize\",function(){o.call(this,l.type,l.quality)}),d.bind(\"Load\",function(){this.downsize(l)}),this.meta.thumb&&this.meta.thumb.width>=l.width&&this.meta.thumb.height>=l.height?d.load(this.meta.thumb.data):d.clone(this,!1),d}catch(f){this.trigger(\"error\",f.code)}},destroy:function(){this.ruid&&(this.getRuntime().exec.call(this,\"Image\",\"destroy\"),this.disconnectRuntime()),this.meta&&this.meta.thumb&&this.meta.thumb.data.destroy(),this.unbindAll()}}),this.handleEventProps(f),this.bind(\"Load Resize\",function(){return n.call(this)},999)}var f=[\"progress\",\"load\",\"error\",\"resize\",\"embedded\"];return h.MAX_RESIZE_WIDTH=8192,h.MAX_RESIZE_HEIGHT=8192,h.prototype=c.instance,h}),n(\"moxie/runtime/html5/Runtime\",[\"moxie/core/utils/Basic\",\"moxie/core/Exceptions\",\"moxie/runtime/Runtime\",\"moxie/core/utils/Env\"],function(e,t,i,n){function o(t){var o=this,u=i.capTest,c=i.capTrue,l=e.extend({access_binary:u(window.FileReader||window.File&&window.File.getAsDataURL),access_image_binary:function(){return o.can(\"access_binary\")&&!!s.Image},display_media:u((n.can(\"create_canvas\")||n.can(\"use_data_uri_over32kb\"))&&r(\"moxie/image/Image\")),do_cors:u(window.XMLHttpRequest&&\"withCredentials\"in new XMLHttpRequest),drag_and_drop:u(function(){var e=document.createElement(\"div\");return(\"draggable\"in e||\"ondragstart\"in e&&\"ondrop\"in e)&&(\"IE\"!==n.browser||n.verComp(n.version,9,\">\"))}()),filter_by_extension:u(function(){return!(\"Chrome\"===n.browser&&n.verComp(n.version,28,\"<\")||\"IE\"===n.browser&&n.verComp(n.version,10,\"<\")||\"Safari\"===n.browser&&n.verComp(n.version,7,\"<\")||\"Firefox\"===n.browser&&n.verComp(n.version,37,\"<\"))}()),return_response_headers:c,return_response_type:function(e){return\"json\"===e&&window.JSON?!0:n.can(\"return_response_type\",e)},return_status_code:c,report_upload_progress:u(window.XMLHttpRequest&&(new XMLHttpRequest).upload),resize_image:function(){return o.can(\"access_binary\")&&n.can(\"create_canvas\")},select_file:function(){return n.can(\"use_fileinput\")&&window.File},select_folder:function(){return o.can(\"select_file\")&&(\"Chrome\"===n.browser&&n.verComp(n.version,21,\">=\")||\"Firefox\"===n.browser&&n.verComp(n.version,42,\">=\"))},select_multiple:function(){return!(!o.can(\"select_file\")||\"Safari\"===n.browser&&\"Windows\"===n.os||\"iOS\"===n.os&&n.verComp(n.osVersion,\"7.0.0\",\">\")&&n.verComp(n.osVersion,\"8.0.0\",\"<\"))},send_binary_string:u(window.XMLHttpRequest&&((new XMLHttpRequest).sendAsBinary||window.Uint8Array&&window.ArrayBuffer)),send_custom_headers:u(window.XMLHttpRequest),send_multipart:function(){return!!(window.XMLHttpRequest&&(new XMLHttpRequest).upload&&window.FormData)||o.can(\"send_binary_string\")},slice_blob:u(window.File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice)),stream_upload:function(){return o.can(\"slice_blob\")&&o.can(\"send_multipart\")},summon_file_dialog:function(){return o.can(\"select_file\")&&!(\"Firefox\"===n.browser&&n.verComp(n.version,4,\"<\")||\"Opera\"===n.browser&&n.verComp(n.version,12,\"<\")||\"IE\"===n.browser&&n.verComp(n.version,10,\"<\"))},upload_filesize:c,use_http_method:c},arguments[2]);i.call(this,t,arguments[1]||a,l),e.extend(this,{init:function(){this.trigger(\"Init\")},destroy:function(e){return function(){e.call(o),e=o=null}}(this.destroy)}),e.extend(this.getShim(),s)}var a=\"html5\",s={};return i.addConstructor(a,o),s}),n(\"moxie/runtime/html5/file/Blob\",[\"moxie/runtime/html5/Runtime\",\"moxie/file/Blob\"],function(e,t){function i(){function e(e,t,i){var n;if(!window.File.prototype.slice)return(n=window.File.prototype.webkitSlice||window.File.prototype.mozSlice)?n.call(e,t,i):null;try{return e.slice(),e.slice(t,i)}catch(r){return e.slice(t,i-t)}}this.slice=function(){return new t(this.getRuntime().uid,e.apply(this,arguments))},this.destroy=function(){this.getRuntime().getShim().removeInstance(this.uid)}}return e.Blob=i}),n(\"moxie/core/utils/Events\",[\"moxie/core/utils/Basic\"],function(e){function t(){this.returnValue=!1}function i(){this.cancelBubble=!0}var n={},r=\"moxie_\"+e.guid(),o=function(o,a,s,u){var c,l;a=a.toLowerCase(),o.addEventListener?(c=s,o.addEventListener(a,c,!1)):o.attachEvent&&(c=function(){var e=window.event;e.target||(e.target=e.srcElement),e.preventDefault=t,e.stopPropagation=i,s(e)},o.attachEvent(\"on\"+a,c)),o[r]||(o[r]=e.guid()),n.hasOwnProperty(o[r])||(n[o[r]]={}),l=n[o[r]],l.hasOwnProperty(a)||(l[a]=[]),l[a].push({func:c,orig:s,key:u})},a=function(t,i,o){var a,s;if(i=i.toLowerCase(),t[r]&&n[t[r]]&&n[t[r]][i]){a=n[t[r]][i];for(var u=a.length-1;u>=0&&(a[u].orig!==o&&a[u].key!==o||(t.removeEventListener?t.removeEventListener(i,a[u].func,!1):t.detachEvent&&t.detachEvent(\"on\"+i,a[u].func),a[u].orig=null,a[u].func=null,a.splice(u,1),o===s));u--);if(a.length||delete n[t[r]][i],e.isEmptyObj(n[t[r]])){delete n[t[r]];try{delete t[r]}catch(c){t[r]=s}}}},s=function(t,i){t&&t[r]&&e.each(n[t[r]],function(e,n){a(t,n,i)})};return{addEvent:o,removeEvent:a,removeAllEvents:s}}),n(\"moxie/runtime/html5/file/FileInput\",[\"moxie/runtime/html5/Runtime\",\"moxie/file/File\",\"moxie/core/utils/Basic\",\"moxie/core/utils/Dom\",\"moxie/core/utils/Events\",\"moxie/core/utils/Mime\",\"moxie/core/utils/Env\"],function(e,t,i,n,r,o,a){function s(){var e,s;i.extend(this,{init:function(u){var c,l,d,m,h,f,p=this,g=p.getRuntime();e=u,d=o.extList2mimes(e.accept,g.can(\"filter_by_extension\")),l=g.getShimContainer(),l.innerHTML='\",c=n.get(g.uid),i.extend(c.style,{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}),m=n.get(e.browse_button),s=n.getStyle(m,\"z-index\")||\"auto\",g.can(\"summon_file_dialog\")&&(\"static\"===n.getStyle(m,\"position\")&&(m.style.position=\"relative\"),r.addEvent(m,\"click\",function(e){var t=n.get(g.uid);t&&!t.disabled&&t.click(),e.preventDefault()},p.uid),p.bind(\"Refresh\",function(){h=parseInt(s,10)||1,n.get(e.browse_button).style.zIndex=h,this.getRuntime().getShimContainer().style.zIndex=h-1})),f=g.can(\"summon_file_dialog\")?m:l,r.addEvent(f,\"mouseover\",function(){p.trigger(\"mouseenter\")},p.uid),r.addEvent(f,\"mouseout\",function(){p.trigger(\"mouseleave\")},p.uid),r.addEvent(f,\"mousedown\",function(){p.trigger(\"mousedown\")},p.uid),r.addEvent(n.get(e.container),\"mouseup\",function(){p.trigger(\"mouseup\")},p.uid),(g.can(\"summon_file_dialog\")?c:m).setAttribute(\"tabindex\",-1),c.onchange=function x(){if(p.files=[],i.each(this.files,function(i){var n=\"\";return e.directory&&\".\"==i.name?!0:(i.webkitRelativePath&&(n=\"/\"+i.webkitRelativePath.replace(/^\\//,\"\")),i=new t(g.uid,i),i.relativePath=n,p.files.push(i),void 0)}),\"IE\"!==a.browser&&\"IEMobile\"!==a.browser)this.value=\"\";else{var n=this.cloneNode(!0);this.parentNode.replaceChild(n,this),n.onchange=x}p.files.length&&p.trigger(\"change\")},p.trigger({type:\"ready\",async:!0}),l=null},setOption:function(e,t){var i=this.getRuntime(),r=n.get(i.uid);switch(e){case\"accept\":if(t){var a=t.mimes||o.extList2mimes(t,i.can(\"filter_by_extension\"));r.setAttribute(\"accept\",a.join(\",\"))}else r.removeAttribute(\"accept\");break;case\"directory\":t&&i.can(\"select_folder\")?(r.setAttribute(\"directory\",\"\"),r.setAttribute(\"webkitdirectory\",\"\")):(r.removeAttribute(\"directory\"),r.removeAttribute(\"webkitdirectory\"));break;case\"multiple\":t&&i.can(\"select_multiple\")?r.setAttribute(\"multiple\",\"\"):r.removeAttribute(\"multiple\")}},disable:function(e){var t,i=this.getRuntime();(t=n.get(i.uid))&&(t.disabled=!!e)},destroy:function(){var t=this.getRuntime(),i=t.getShim(),o=t.getShimContainer(),a=e&&n.get(e.container),u=e&&n.get(e.browse_button);a&&r.removeAllEvents(a,this.uid),u&&(r.removeAllEvents(u,this.uid),u.style.zIndex=s),o&&(r.removeAllEvents(o,this.uid),o.innerHTML=\"\"),i.removeInstance(this.uid),e=o=a=u=i=null}})}return e.FileInput=s}),n(\"moxie/runtime/html5/file/FileDrop\",[\"moxie/runtime/html5/Runtime\",\"moxie/file/File\",\"moxie/core/utils/Basic\",\"moxie/core/utils/Dom\",\"moxie/core/utils/Events\",\"moxie/core/utils/Mime\"],function(e,t,i,n,r,o){function a(){function e(e){if(!e.dataTransfer||!e.dataTransfer.types)return!1;var t=i.toArray(e.dataTransfer.types||[]);return-1!==i.inArray(\"Files\",t)||-1!==i.inArray(\"public.file-url\",t)||-1!==i.inArray(\"application/x-moz-file\",t)}function a(e,i){if(u(e)){var n=new t(f,e);n.relativePath=i||\"\",p.push(n)}}function s(e){for(var t=[],n=0;n=\")&&u.verComp(u.version,7,\"<\"),f=\"Android Browser\"===u.browser,p=!1;if(h=i.url.replace(/^.+?\\/([\\w\\-\\.]+)$/,\"$1\").toLowerCase(),m=c(),m.open(i.method,i.url,i.async,i.user,i.password),r instanceof o)r.isDetached()&&(p=!0),r=r.getSource();else if(r instanceof a){if(r.hasBlob())if(r.getBlob().isDetached())r=d.call(s,r),p=!0;else if((l||f)&&\"blob\"===t.typeOf(r.getBlob().getSource())&&window.FileReader)return e.call(s,i,r),void 0;if(r instanceof a){var g=new window.FormData;r.each(function(e,t){e instanceof o?g.append(t,e.getSource()):g.append(t,e)}),r=g}}m.upload?(i.withCredentials&&(m.withCredentials=!0),m.addEventListener(\"load\",function(e){s.trigger(e)}),m.addEventListener(\"error\",function(e){s.trigger(e)}),m.addEventListener(\"progress\",function(e){s.trigger(e)}),m.upload.addEventListener(\"progress\",function(e){s.trigger({type:\"UploadProgress\",loaded:e.loaded,total:e.total})})):m.onreadystatechange=function(){switch(m.readyState){case 1:break;case 2:break;case 3:var e,t;try{n.hasSameOrigin(i.url)&&(e=m.getResponseHeader(\"Content-Length\")||0),m.responseText&&(t=m.responseText.length)}catch(r){e=t=0}s.trigger({type:\"progress\",lengthComputable:!!e,total:parseInt(e,10),loaded:t});break;case 4:m.onreadystatechange=function(){};try{if(m.status>=200&&m.status<400){s.trigger(\"load\");break}}catch(r){}s.trigger(\"error\")}},t.isEmptyObj(i.headers)||t.each(i.headers,function(e,t){m.setRequestHeader(t,e)}),\"\"!==i.responseType&&\"responseType\"in m&&(m.responseType=\"json\"!==i.responseType||u.can(\"return_response_type\",\"json\")?i.responseType:\"text\"),p?m.sendAsBinary?m.sendAsBinary(r):function(){for(var e=new Uint8Array(r.length),t=0;t0&&o.set(new Uint8Array(t.slice(0,e)),0),o.set(new Uint8Array(r),e),o.set(new Uint8Array(t.slice(e+n)),e+r.byteLength),this.clear(),t=o.buffer,i=new DataView(t);break}default:return t}},length:function(){return t?t.byteLength:0},clear:function(){i=t=null}})}function n(t){function i(e,i,n){n=3===arguments.length?n:t.length-i-1,t=t.substr(0,i)+e+t.substr(n+i)}e.extend(this,{readByteAt:function(e){return t.charCodeAt(e)},writeByteAt:function(e,t){i(String.fromCharCode(t),e,1)},SEGMENT:function(e,n,r){switch(arguments.length){case 1:return t.substr(e);case 2:return t.substr(e,n);case 3:i(null!==r?r:\"\",e,n);break;default:return t}},length:function(){return t?t.length:0},clear:function(){t=null}})}return e.extend(t.prototype,{littleEndian:!1,read:function(e,t){var i,n,r;if(e+t>this.length())throw new Error(\"You are trying to read outside the source boundaries.\");for(n=this.littleEndian?0:-8*(t-1),r=0,i=0;t>r;r++)i|=this.readByteAt(e+r)<this.length())throw new Error(\"You are trying to write outside the source boundaries.\");for(n=this.littleEndian?0:-8*(i-1),r=0;i>r;r++)this.writeByteAt(e+r,255&t>>Math.abs(n+8*r))},BYTE:function(e){return this.read(e,1)},SHORT:function(e){return this.read(e,2)},LONG:function(e){return this.read(e,4)},SLONG:function(e){var t=this.read(e,4);return t>2147483647?t-4294967296:t},CHAR:function(e){return String.fromCharCode(this.read(e,1))},STRING:function(e,t){return this.asArray(\"CHAR\",e,t).join(\"\")},asArray:function(e,t,i){for(var n=[],r=0;i>r;r++)n[r]=this[e](t+r);return n}}),t}),n(\"moxie/runtime/html5/image/JPEGHeaders\",[\"moxie/runtime/html5/utils/BinaryReader\",\"moxie/core/Exceptions\"],function(e,t){return function i(n){var r,o,a,s=[],u=0;if(r=new e(n),65496!==r.SHORT(0))throw r.clear(),new t.ImageError(t.ImageError.WRONG_FORMAT);for(o=2;o<=r.length();)if(a=r.SHORT(o),a>=65488&&65495>=a)o+=2;else{if(65498===a||65497===a)break;u=r.SHORT(o+2)+2,a>=65505&&65519>=a&&s.push({hex:a,name:\"APP\"+(15&a),start:o,length:u,segment:r.SEGMENT(o,u)}),o+=u}return r.clear(),{headers:s,restore:function(t){var i,n,r;for(r=new e(t),o=65504==r.SHORT(2)?4+r.SHORT(4):2,n=0,i=s.length;i>n;n++)r.SEGMENT(o,0,s[n].segment),o+=s[n].length;return t=r.SEGMENT(),r.clear(),t},strip:function(t){var n,r,o,a;for(o=new i(t),r=o.headers,o.purge(),n=new e(t),a=r.length;a--;)n.SEGMENT(r[a].start,r[a].length,\"\");return t=n.SEGMENT(),n.clear(),t},get:function(e){for(var t=[],i=0,n=s.length;n>i;i++)s[i].name===e.toUpperCase()&&t.push(s[i].segment);return t},set:function(e,t){var i,n,r,o=[];for(\"string\"==typeof t?o.push(t):o=t,i=n=0,r=s.length;r>i&&(s[i].name===e.toUpperCase()&&(s[i].segment=o[n],s[i].length=o[n].length,n++),!(n>=o.length));i++);},purge:function(){this.headers=s=[]}}}}),n(\"moxie/runtime/html5/image/ExifParser\",[\"moxie/core/utils/Basic\",\"moxie/runtime/html5/utils/BinaryReader\",\"moxie/core/Exceptions\"],function(e,i,n){function r(o){function a(i,r){var o,a,s,u,c,m,h,f,p=this,g=[],x={},v={1:\"BYTE\",7:\"UNDEFINED\",2:\"ASCII\",3:\"SHORT\",4:\"LONG\",5:\"RATIONAL\",9:\"SLONG\",10:\"SRATIONAL\"},w={BYTE:1,UNDEFINED:1,ASCII:1,SHORT:2,LONG:4,RATIONAL:8,SLONG:4,SRATIONAL:8};for(o=p.SHORT(i),a=0;o>a;a++)if(g=[],h=i+2+12*a,s=r[p.SHORT(h)],s!==t){if(u=v[p.SHORT(h+=2)],c=p.LONG(h+=2),m=w[u],!m)throw new n.ImageError(n.ImageError.INVALID_META_ERR);if(h+=4,m*c>4&&(h=p.LONG(h)+d.tiffHeader),h+m*c>=this.length())throw new n.ImageError(n.ImageError.INVALID_META_ERR);\"ASCII\"!==u?(g=p.asArray(u,h,c),f=1==c?g[0]:g,x[s]=l.hasOwnProperty(s)&&\"object\"!=typeof f?l[s][f]:f):x[s]=e.trim(p.STRING(h,c).replace(/\\0$/,\"\"))}return x}function s(e,t,i){var n,r,o,a=0;if(\"string\"==typeof t){var s=c[e.toLowerCase()];for(var u in s)if(s[u]===t){t=u;break}}n=d[e.toLowerCase()+\"IFD\"],r=this.SHORT(n);for(var l=0;r>l;l++)if(o=n+12*l+2,this.SHORT(o)==t){a=o+8;break}if(!a)return!1;try{this.write(a,i,4)}catch(m){return!1}return!0}var u,c,l,d,m,h;if(i.call(this,o),c={tiff:{274:\"Orientation\",270:\"ImageDescription\",271:\"Make\",272:\"Model\",305:\"Software\",34665:\"ExifIFDPointer\",34853:\"GPSInfoIFDPointer\"},exif:{36864:\"ExifVersion\",40961:\"ColorSpace\",40962:\"PixelXDimension\",40963:\"PixelYDimension\",36867:\"DateTimeOriginal\",33434:\"ExposureTime\",33437:\"FNumber\",34855:\"ISOSpeedRatings\",37377:\"ShutterSpeedValue\",37378:\"ApertureValue\",37383:\"MeteringMode\",37384:\"LightSource\",37385:\"Flash\",37386:\"FocalLength\",41986:\"ExposureMode\",41987:\"WhiteBalance\",41990:\"SceneCaptureType\",41988:\"DigitalZoomRatio\",41992:\"Contrast\",41993:\"Saturation\",41994:\"Sharpness\"},gps:{0:\"GPSVersionID\",1:\"GPSLatitudeRef\",2:\"GPSLatitude\",3:\"GPSLongitudeRef\",4:\"GPSLongitude\"},thumb:{513:\"JPEGInterchangeFormat\",514:\"JPEGInterchangeFormatLength\"}},l={ColorSpace:{1:\"sRGB\",0:\"Uncalibrated\"},MeteringMode:{0:\"Unknown\",1:\"Average\",2:\"CenterWeightedAverage\",3:\"Spot\",4:\"MultiSpot\",5:\"Pattern\",6:\"Partial\",255:\"Other\"},LightSource:{1:\"Daylight\",2:\"Fliorescent\",3:\"Tungsten\",4:\"Flash\",9:\"Fine weather\",10:\"Cloudy weather\",11:\"Shade\",12:\"Daylight fluorescent (D 5700 - 7100K)\",13:\"Day white fluorescent (N 4600 -5400K)\",14:\"Cool white fluorescent (W 3900 - 4500K)\",15:\"White fluorescent (WW 3200 - 3700K)\",17:\"Standard light A\",18:\"Standard light B\",19:\"Standard light C\",20:\"D55\",21:\"D65\",22:\"D75\",23:\"D50\",24:\"ISO studio tungsten\",255:\"Other\"},Flash:{0:\"Flash did not fire\",1:\"Flash fired\",5:\"Strobe return light not detected\",7:\"Strobe return light detected\",9:\"Flash fired, compulsory flash mode\",13:\"Flash fired, compulsory flash mode, return light not detected\",15:\"Flash fired, compulsory flash mode, return light detected\",16:\"Flash did not fire, compulsory flash mode\",24:\"Flash did not fire, auto mode\",25:\"Flash fired, auto mode\",29:\"Flash fired, auto mode, return light not detected\",31:\"Flash fired, auto mode, return light detected\",32:\"No flash function\",65:\"Flash fired, red-eye reduction mode\",69:\"Flash fired, red-eye reduction mode, return light not detected\",71:\"Flash fired, red-eye reduction mode, return light detected\",73:\"Flash fired, compulsory flash mode, red-eye reduction mode\",77:\"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected\",79:\"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected\",89:\"Flash fired, auto mode, red-eye reduction mode\",93:\"Flash fired, auto mode, return light not detected, red-eye reduction mode\",95:\"Flash fired, auto mode, return light detected, red-eye reduction mode\"},ExposureMode:{0:\"Auto exposure\",1:\"Manual exposure\",2:\"Auto bracket\"},WhiteBalance:{0:\"Auto white balance\",1:\"Manual white balance\"},SceneCaptureType:{0:\"Standard\",1:\"Landscape\",2:\"Portrait\",3:\"Night scene\"},Contrast:{0:\"Normal\",1:\"Soft\",2:\"Hard\"},Saturation:{0:\"Normal\",1:\"Low saturation\",2:\"High saturation\"},Sharpness:{0:\"Normal\",1:\"Soft\",2:\"Hard\"},GPSLatitudeRef:{N:\"North latitude\",S:\"South latitude\"},GPSLongitudeRef:{E:\"East longitude\",W:\"West longitude\"}},d={tiffHeader:10},m=d.tiffHeader,u={clear:this.clear},e.extend(this,{read:function(){try{return r.prototype.read.apply(this,arguments)}catch(e){throw new n.ImageError(n.ImageError.INVALID_META_ERR)}},write:function(){try{return r.prototype.write.apply(this,arguments)}catch(e){throw new n.ImageError(n.ImageError.INVALID_META_ERR)}},UNDEFINED:function(){return this.BYTE.apply(this,arguments)},RATIONAL:function(e){return this.LONG(e)/this.LONG(e+4)},SRATIONAL:function(e){return this.SLONG(e)/this.SLONG(e+4)},ASCII:function(e){return this.CHAR(e)},TIFF:function(){return h||null},EXIF:function(){var t=null;if(d.exifIFD){try{t=a.call(this,d.exifIFD,c.exif)}catch(i){return null}if(t.ExifVersion&&\"array\"===e.typeOf(t.ExifVersion)){for(var n=0,r=\"\";n=65472&&65475>=t)return n+=5,{height:e.SHORT(n),width:e.SHORT(n+=2)};i=e.SHORT(n+=2),n+=i-2}return null}function s(){var e,t,i=d.thumb();return i&&(e=new n(i),t=a(e),e.clear(),t)?(t.data=i,t):null}function u(){d&&l&&c&&(d.clear(),l.purge(),c.clear(),m=l=d=c=null)}var c,l,d,m;if(c=new n(o),65496!==c.SHORT(0))throw new t.ImageError(t.ImageError.WRONG_FORMAT);l=new i(o);try{d=new r(l.get(\"app1\")[0])}catch(h){}m=a.call(this),e.extend(this,{type:\"image/jpeg\",size:c.length(),width:m&&m.width||0,height:m&&m.height||0,setExif:function(t,i){return d?(\"object\"===e.typeOf(t)?e.each(t,function(e,t){d.setExif(t,e)}):d.setExif(t,i),l.set(\"app1\",d.SEGMENT()),void 0):!1},writeHeaders:function(){return arguments.length?l.restore(arguments[0]):l.restore(o)},stripHeaders:function(e){return l.strip(e)},purge:function(){u.call(this)}}),d&&(this.meta={tiff:d.TIFF(),exif:d.EXIF(),gps:d.GPS(),thumb:s()})}return o}),n(\"moxie/runtime/html5/image/PNG\",[\"moxie/core/Exceptions\",\"moxie/core/utils/Basic\",\"moxie/runtime/html5/utils/BinaryReader\"],function(e,t,i){function n(n){function r(){var e,t;return e=a.call(this,8),\"IHDR\"==e.type?(t=e.start,{width:s.LONG(t),height:s.LONG(t+=4)}):null}function o(){s&&(s.clear(),n=l=u=c=s=null)}function a(e){var t,i,n,r;return t=s.LONG(e),i=s.STRING(e+=4,4),n=e+=4,r=s.LONG(e+t),{length:t,type:i,start:n,CRC:r}}var s,u,c,l;s=new i(n),function(){var t=0,i=0,n=[35152,20039,3338,6666];for(i=0;ii.height?\"width\":\"height\",a=Math.round(i[o]*n),s=!1;\"nearest\"!==r&&(.5>n||n>2)&&(n=.5>n?.5:2,s=!0);var u=t(i,n);return s?e(u,a/u[o],r):u}function t(e,t){var i=e.width,n=e.height,r=Math.round(i*t),o=Math.round(n*t),a=document.createElement(\"canvas\");return a.width=r,a.height=o,a.getContext(\"2d\").drawImage(e,0,0,i,n,0,0,r,o),e=null,a}return{scale:e}}),n(\"moxie/runtime/html5/image/Image\",[\"moxie/runtime/html5/Runtime\",\"moxie/core/utils/Basic\",\"moxie/core/Exceptions\",\"moxie/core/utils/Encode\",\"moxie/file/Blob\",\"moxie/file/File\",\"moxie/runtime/html5/image/ImageInfo\",\"moxie/runtime/html5/image/ResizerCanvas\",\"moxie/core/utils/Mime\",\"moxie/core/utils/Env\"],function(e,t,i,n,r,o,a,s,u){function c(){function e(){if(!v&&!g)throw new i.ImageError(i.DOMException.INVALID_STATE_ERR);return v||g}function c(){var t=e();return\"canvas\"==t.nodeName.toLowerCase()?t:(v=document.createElement(\"canvas\"),v.width=t.width,v.height=t.height,v.getContext(\"2d\").drawImage(t,0,0),v)}function l(e){return n.atob(e.substring(e.indexOf(\"base64,\")+7))}function d(e,t){return\"data:\"+(t||\"\")+\";base64,\"+n.btoa(e)}function m(e){var t=this;g=new Image,g.onerror=function(){p.call(this),t.trigger(\"error\",i.ImageError.WRONG_FORMAT)},g.onload=function(){t.trigger(\"load\")},g.src=\"data:\"==e.substr(0,5)?e:d(e,y.type)}function h(e,t){var n,r=this;return window.FileReader?(n=new FileReader,n.onload=function(){t.call(r,this.result)},n.onerror=function(){r.trigger(\"error\",i.ImageError.WRONG_FORMAT)},n.readAsDataURL(e),void 0):t.call(this,e.getAsDataURL())}function f(e,i){var n=Math.PI/180,r=document.createElement(\"canvas\"),o=r.getContext(\"2d\"),a=e.width,s=e.height;switch(t.inArray(i,[5,6,7,8])>-1?(r.width=s,r.height=a):(r.width=a,r.height=s),i){case 2:o.translate(a,0),o.scale(-1,1);break;case 3:o.translate(a,s),o.rotate(180*n);break;case 4:o.translate(0,s),o.scale(1,-1);break;case 5:o.rotate(90*n),o.scale(1,-1);break;case 6:o.rotate(90*n),o.translate(0,-s);break;case 7:o.rotate(90*n),o.translate(a,-s),o.scale(-1,1);break;case 8:o.rotate(-90*n),o.translate(-a,0)}return o.drawImage(e,0,0,a,s),r}function p(){x&&(x.purge(),x=null),w=g=v=y=null,b=!1}var g,x,v,w,y,E=this,b=!1,_=!0;t.extend(this,{loadFromBlob:function(e){var t=this.getRuntime(),n=arguments.length>1?arguments[1]:!0;if(!t.can(\"access_binary\"))throw new i.RuntimeError(i.RuntimeError.NOT_SUPPORTED_ERR);return y=e,e.isDetached()?(w=e.getSource(),m.call(this,w),void 0):(h.call(this,e.getSource(),function(e){n&&(w=l(e)),m.call(this,e)}),void 0)},loadFromImage:function(e,t){this.meta=e.meta,y=new o(null,{name:e.name,size:e.size,type:e.type}),m.call(this,t?w=e.getAsBinaryString():e.getAsDataURL())},getInfo:function(){var t,i=this.getRuntime();return!x&&w&&i.can(\"access_image_binary\")&&(x=new a(w)),t={width:e().width||0,height:e().height||0,type:y.type||u.getFileMime(y.name),size:w&&w.length||y.size||0,name:y.name||\"\",meta:null},_&&(t.meta=x&&x.meta||this.meta||{},!t.meta||!t.meta.thumb||t.meta.thumb.data instanceof r||(t.meta.thumb.data=new r(null,{type:\"image/jpeg\",data:t.meta.thumb.data}))),t},resize:function(t,i,n){var r=document.createElement(\"canvas\");if(r.width=t.width,r.height=t.height,r.getContext(\"2d\").drawImage(e(),t.x,t.y,t.width,t.height,0,0,r.width,r.height),v=s.scale(r,i),_=n.preserveHeaders,!_){var o=this.meta&&this.meta.tiff&&this.meta.tiff.Orientation||1;v=f(v,o)}this.width=v.width,this.height=v.height,b=!0,this.trigger(\"Resize\")},getAsCanvas:function(){return v||(v=c()),v.id=this.uid+\"_canvas\",v},getAsBlob:function(e,t){return e!==this.type?(b=!0,new o(null,{name:y.name||\"\",type:e,data:E.getAsDataURL(e,t)})):new o(null,{name:y.name||\"\",type:e,data:E.getAsBinaryString(e,t)})},getAsDataURL:function(e){var t=arguments[1]||90;if(!b)return g.src;if(c(),\"image/jpeg\"!==e)return v.toDataURL(\"image/png\");try{return v.toDataURL(\"image/jpeg\",t/100)}catch(i){return v.toDataURL(\"image/jpeg\")}},getAsBinaryString:function(e,t){if(!b)return w||(w=l(E.getAsDataURL(e,t))),w;if(\"image/jpeg\"!==e)w=l(E.getAsDataURL(e,t));else{var i;t||(t=90),c();try{i=v.toDataURL(\"image/jpeg\",t/100)}catch(n){i=v.toDataURL(\"image/jpeg\")}w=l(i),x&&(w=x.stripHeaders(w),_&&(x.meta&&x.meta.exif&&x.setExif({PixelXDimension:this.width,PixelYDimension:this.height}),w=x.writeHeaders(w)),x.purge(),x=null)}return b=!1,w},destroy:function(){E=null,p.call(this),this.getRuntime().getShim().removeInstance(this.uid)}})}return e.Image=c}),n(\"moxie/runtime/flash/Runtime\",[\"moxie/core/utils/Basic\",\"moxie/core/utils/Env\",\"moxie/core/utils/Dom\",\"moxie/core/Exceptions\",\"moxie/runtime/Runtime\"],function(e,t,i,n,o){function a(){var e;try{e=navigator.plugins[\"Shockwave Flash\"],e=e.description}catch(t){try{e=new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\").GetVariable(\"$version\")}catch(i){e=\"0.0\"}}return e=e.match(/\\d+/g),parseFloat(e[0]+\".\"+e[1])}function s(e){var n=i.get(e);n&&\"OBJECT\"==n.nodeName&&(\"IE\"===t.browser?(n.style.display=\"none\",function r(){4==n.readyState?u(e):setTimeout(r,10)}()):n.parentNode.removeChild(n))}function u(e){var t=i.get(e);if(t){for(var n in t)\"function\"==typeof t[n]&&(t[n]=null);t.parentNode.removeChild(t)}}function c(u){var c,m=this;u=e.extend({swf_url:t.swf_url},u),o.call(this,u,l,{access_binary:function(e){return e&&\"browser\"===m.mode},access_image_binary:function(e){return e&&\"browser\"===m.mode},display_media:o.capTest(r(\"moxie/image/Image\")),do_cors:o.capTrue,drag_and_drop:!1,report_upload_progress:function(){return\"client\"===m.mode},resize_image:o.capTrue,return_response_headers:!1,return_response_type:function(t){return\"json\"===t&&window.JSON?!0:!e.arrayDiff(t,[\"\",\"text\",\"document\"])||\"browser\"===m.mode},return_status_code:function(t){return\"browser\"===m.mode||!e.arrayDiff(t,[200,404])},select_file:o.capTrue,select_multiple:o.capTrue,send_binary_string:function(e){return e&&\"browser\"===m.mode},send_browser_cookies:function(e){return e&&\"browser\"===m.mode},send_custom_headers:function(e){return e&&\"browser\"===m.mode},send_multipart:o.capTrue,slice_blob:function(e){return e&&\"browser\"===m.mode},stream_upload:function(e){return e&&\"browser\"===m.mode},summon_file_dialog:!1,upload_filesize:function(t){return e.parseSizeStr(t)<=2097152||\"client\"===m.mode},use_http_method:function(t){return!e.arrayDiff(t,[\"GET\",\"POST\"])}},{access_binary:function(e){return e?\"browser\":\"client\"},access_image_binary:function(e){return e?\"browser\":\"client\"},report_upload_progress:function(e){return e?\"browser\":\"client\"},return_response_type:function(t){return e.arrayDiff(t,[\"\",\"text\",\"json\",\"document\"])?\"browser\":[\"client\",\"browser\"]},return_status_code:function(t){return e.arrayDiff(t,[200,404])?\"browser\":[\"client\",\"browser\"]},send_binary_string:function(e){return e?\"browser\":\"client\"},send_browser_cookies:function(e){return e?\"browser\":\"client\"},send_custom_headers:function(e){return e?\"browser\":\"client\"},slice_blob:function(e){return e?\"browser\":\"client\"},stream_upload:function(e){return e?\"client\":\"browser\"},upload_filesize:function(t){return e.parseSizeStr(t)>=2097152?\"client\":\"browser\"}},\"client\"),a()<11.3&&(this.mode=!1),e.extend(this,{getShim:function(){return i.get(this.uid)},shimExec:function(e,t){var i=[].slice.call(arguments,2);return m.getShim().exec(this.uid,e,t,i)},init:function(){var i,r,a;a=this.getShimContainer(),e.extend(a.style,{position:\"absolute\",top:\"-8px\",left:\"-8px\",width:\"9px\",height:\"9px\",overflow:\"hidden\"}),i=''+''+''+''+\"\",\"IE\"===t.browser?(r=document.createElement(\"div\"),a.appendChild(r),r.outerHTML=i,r=a=null):a.innerHTML=i,c=setTimeout(function(){m&&!m.initialized&&m.trigger(\"Error\",new n.RuntimeError(n.RuntimeError.NOT_INIT_ERR))},5e3)},destroy:function(e){return function(){s(m.uid),e.call(m),clearTimeout(c),u=c=e=m=null}}(this.destroy)},d)}var l=\"flash\",d={};return o.addConstructor(l,c),d}),n(\"moxie/runtime/flash/file/Blob\",[\"moxie/runtime/flash/Runtime\",\"moxie/file/Blob\"],function(e,t){var i={slice:function(e,i,n,r){var o=this.getRuntime();return 0>i?i=Math.max(e.size+i,0):i>0&&(i=Math.min(i,e.size)),0>n?n=Math.max(e.size+n,0):n>0&&(n=Math.min(n,e.size)),e=o.shimExec.call(this,\"Blob\",\"slice\",i,n,r||\"\"),e&&(e=new t(o.uid,e)),e}};return e.Blob=i}),n(\"moxie/runtime/flash/file/FileInput\",[\"moxie/runtime/flash/Runtime\",\"moxie/file/File\",\"moxie/core/utils/Dom\",\"moxie/core/utils/Basic\"],function(e,t,i,n){var r={init:function(e){var r=this,o=this.getRuntime(),a=i.get(e.browse_button);a&&(a.setAttribute(\"tabindex\",-1),a=null),this.bind(\"Change\",function(){var e=o.shimExec.call(r,\"FileInput\",\"getFiles\");r.files=[],n.each(e,function(e){r.files.push(new t(o.uid,e))})},999),this.getRuntime().shimExec.call(this,\"FileInput\",\"init\",{accept:e.accept,multiple:e.multiple}),this.trigger(\"ready\")}};return e.FileInput=r}),n(\"moxie/runtime/flash/file/FileReader\",[\"moxie/runtime/flash/Runtime\",\"moxie/core/utils/Encode\"],function(e,t){function i(e,i){switch(i){case\"readAsText\":return t.atob(e,\"utf8\");case\"readAsBinaryString\":return t.atob(e);case\"readAsDataURL\":return e}return null}var n={read:function(e,t){var n=this;return n.result=\"\",\"readAsDataURL\"===e&&(n.result=\"data:\"+(t.type||\"\")+\";base64,\"),n.bind(\"Progress\",function(t,r){r&&(n.result+=i(r,e))},999),n.getRuntime().shimExec.call(this,\"FileReader\",\"readAsBase64\",t.uid)}};return e.FileReader=n}),n(\"moxie/runtime/flash/file/FileReaderSync\",[\"moxie/runtime/flash/Runtime\",\"moxie/core/utils/Encode\"],function(e,t){function i(e,i){switch(i){case\"readAsText\":return t.atob(e,\"utf8\");case\"readAsBinaryString\":return t.atob(e);case\"readAsDataURL\":return e}return null}var n={read:function(e,t){var n,r=this.getRuntime();return(n=r.shimExec.call(this,\"FileReaderSync\",\"readAsBase64\",t.uid))?(\"readAsDataURL\"===e&&(n=\"data:\"+(t.type||\"\")+\";base64,\"+n),i(n,e,t.type)):null}};return e.FileReaderSync=n}),n(\"moxie/runtime/flash/runtime/Transporter\",[\"moxie/runtime/flash/Runtime\",\"moxie/file/Blob\"],function(e,t){var i={getAsBlob:function(e){var i=this.getRuntime(),n=i.shimExec.call(this,\"Transporter\",\"getAsBlob\",e);return n?new t(i.uid,n):null}};return e.Transporter=i}),n(\"moxie/runtime/flash/xhr/XMLHttpRequest\",[\"moxie/runtime/flash/Runtime\",\"moxie/core/utils/Basic\",\"moxie/file/Blob\",\"moxie/file/File\",\"moxie/file/FileReaderSync\",\"moxie/runtime/flash/file/FileReaderSync\",\"moxie/xhr/FormData\",\"moxie/runtime/Transporter\",\"moxie/runtime/flash/runtime/Transporter\"],function(e,t,i,n,r,o,a,s){var u={send:function(e,n){function r(){e.transport=l.mode,l.shimExec.call(c,\"XMLHttpRequest\",\"send\",e,n)}function o(e,t){l.shimExec.call(c,\"XMLHttpRequest\",\"appendBlob\",e,t.uid),n=null,r()}function u(e,t){var i=new s;i.bind(\"TransportingComplete\",function(){t(this.result)}),i.transport(e.getSource(),e.type,{ruid:l.uid})}var c=this,l=c.getRuntime();if(t.isEmptyObj(e.headers)||t.each(e.headers,function(e,t){l.shimExec.call(c,\"XMLHttpRequest\",\"setRequestHeader\",t,e.toString())}),n instanceof a){var d;if(n.each(function(e,t){e instanceof i?d=t:l.shimExec.call(c,\"XMLHttpRequest\",\"append\",t,e)}),n.hasBlob()){var m=n.getBlob();m.isDetached()?u(m,function(e){m.destroy(),o(d,e)}):o(d,m)}else n=null,r()}else n instanceof i?n.isDetached()?u(n,function(e){n.destroy(),n=e.uid,r()}):(n=n.uid,r()):r()},getResponse:function(e){var i,o,a=this.getRuntime();if(o=a.shimExec.call(this,\"XMLHttpRequest\",\"getResponseAsBlob\")){if(o=new n(a.uid,o),\"blob\"===e)return o;try{if(i=new r,~t.inArray(e,[\"\",\"text\"]))return i.readAsText(o);if(\"json\"===e&&window.JSON)return JSON.parse(i.readAsText(o))}finally{o.destroy()}}return null},abort:function(){var e=this.getRuntime();e.shimExec.call(this,\"XMLHttpRequest\",\"abort\"),this.dispatchEvent(\"readystatechange\"),this.dispatchEvent(\"abort\")}};return e.XMLHttpRequest=u}),n(\"moxie/runtime/flash/image/Image\",[\"moxie/runtime/flash/Runtime\",\"moxie/core/utils/Basic\",\"moxie/runtime/Transporter\",\"moxie/file/Blob\",\"moxie/file/FileReaderSync\"],function(e,t,i,n,r){var o={loadFromBlob:function(e){function t(e){r.shimExec.call(n,\"Image\",\"loadFromBlob\",e.uid),n=r=null}var n=this,r=n.getRuntime();if(e.isDetached()){var o=new i;o.bind(\"TransportingComplete\",function(){t(o.result.getSource())}),o.transport(e.getSource(),e.type,{ruid:r.uid})}else t(e.getSource())},loadFromImage:function(e){var t=this.getRuntime();return t.shimExec.call(this,\"Image\",\"loadFromImage\",e.uid)},getInfo:function(){var e=this.getRuntime(),t=e.shimExec.call(this,\"Image\",\"getInfo\");return t.meta&&t.meta.thumb&&t.meta.thumb.data&&!(e.meta.thumb.data instanceof n)&&(t.meta.thumb.data=new n(e.uid,t.meta.thumb.data)),t},getAsBlob:function(e,t){var i=this.getRuntime(),r=i.shimExec.call(this,\"Image\",\"getAsBlob\",e,t);return r?new n(i.uid,r):null},getAsDataURL:function(){var e,t=this.getRuntime(),i=t.Image.getAsBlob.apply(this,arguments);return i?(e=new r,e.readAsDataURL(i)):null}};return e.Image=o}),n(\"moxie/runtime/silverlight/Runtime\",[\"moxie/core/utils/Basic\",\"moxie/core/utils/Env\",\"moxie/core/utils/Dom\",\"moxie/core/Exceptions\",\"moxie/runtime/Runtime\"],function(e,t,i,n,o){function a(e){var t,i,n,r,o,a=!1,s=null,u=0;try{try{s=new ActiveXObject(\"AgControl.AgControl\"),s.IsVersionSupported(e)&&(a=!0),s=null}catch(c){var l=navigator.plugins[\"Silverlight Plug-In\"];if(l){for(t=l.description,\"1.0.30226.2\"===t&&(t=\"2.0.30226.2\"),i=t.split(\".\");i.length>3;)i.pop();for(;i.length<4;)i.push(0);for(n=e.split(\".\");n.length>4;)n.pop();do r=parseInt(n[u],10),o=parseInt(i[u],10),u++;while(u=r&&!isNaN(r)&&(a=!0)}}}catch(d){a=!1}return a}function s(s){var l,d=this;s=e.extend({xap_url:t.xap_url},s),o.call(this,s,u,{access_binary:o.capTrue,access_image_binary:o.capTrue,display_media:o.capTest(r(\"moxie/image/Image\")),do_cors:o.capTrue,drag_and_drop:!1,report_upload_progress:o.capTrue,resize_image:o.capTrue,return_response_headers:function(e){return e&&\"client\"===d.mode},return_response_type:function(e){return\"json\"!==e?!0:!!window.JSON},return_status_code:function(t){return\"client\"===d.mode||!e.arrayDiff(t,[200,404])},select_file:o.capTrue,select_multiple:o.capTrue,send_binary_string:o.capTrue,send_browser_cookies:function(e){return e&&\"browser\"===d.mode},send_custom_headers:function(e){return e&&\"client\"===d.mode},send_multipart:o.capTrue,slice_blob:o.capTrue,stream_upload:!0,summon_file_dialog:!1,upload_filesize:o.capTrue,use_http_method:function(t){return\"client\"===d.mode||!e.arrayDiff(t,[\"GET\",\"POST\"])}},{return_response_headers:function(e){return e?\"client\":\"browser\"},return_status_code:function(t){return e.arrayDiff(t,[200,404])?\"client\":[\"client\",\"browser\"]},send_browser_cookies:function(e){return e?\"browser\":\"client\"},send_custom_headers:function(e){return e?\"client\":\"browser\"},use_http_method:function(t){return e.arrayDiff(t,[\"GET\",\"POST\"])?\"client\":[\"client\",\"browser\"]}}),a(\"2.0.31005.0\")&&\"Opera\"!==t.browser||(this.mode=!1),e.extend(this,{getShim:function(){return i.get(this.uid).content.Moxie},shimExec:function(e,t){var i=[].slice.call(arguments,2);return d.getShim().exec(this.uid,e,t,i)},init:function(){var e;e=this.getShimContainer(),e.innerHTML=''+''+''+''+''+''+\"\",l=setTimeout(function(){d&&!d.initialized&&d.trigger(\"Error\",new n.RuntimeError(n.RuntimeError.NOT_INIT_ERR))},\"Windows\"!==t.OS?1e4:5e3)},destroy:function(e){return function(){e.call(d),clearTimeout(l),s=l=e=d=null}}(this.destroy)},c)}var u=\"silverlight\",c={};return o.addConstructor(u,s),c}),n(\"moxie/runtime/silverlight/file/Blob\",[\"moxie/runtime/silverlight/Runtime\",\"moxie/core/utils/Basic\",\"moxie/runtime/flash/file/Blob\"],function(e,t,i){return e.Blob=t.extend({},i)}),n(\"moxie/runtime/silverlight/file/FileInput\",[\"moxie/runtime/silverlight/Runtime\",\"moxie/file/File\",\"moxie/core/utils/Dom\",\"moxie/core/utils/Basic\"],function(e,t,i,n){function r(e){for(var t=\"\",i=0;ii;i++)t=s.keys[i],a=s[t],a&&(/^(\\d|[1-9]\\d+)$/.test(a)?a=parseInt(a,10):/^\\d*\\.\\d+$/.test(a)&&(a=parseFloat(a)),r.meta[e][t]=a)}),r.meta&&r.meta.thumb&&r.meta.thumb.data&&!(e.meta.thumb.data instanceof i)&&(r.meta.thumb.data=new i(e.uid,r.meta.thumb.data))),r.width=parseInt(o.width,10),r.height=parseInt(o.height,10),r.size=parseInt(o.size,10),r.type=o.type,r.name=o.name,r},resize:function(e,t,i){this.getRuntime().shimExec.call(this,\"Image\",\"resize\",e.x,e.y,e.width,e.height,t,i.preserveHeaders,i.resample)}})}),n(\"moxie/runtime/html4/Runtime\",[\"moxie/core/utils/Basic\",\"moxie/core/Exceptions\",\"moxie/runtime/Runtime\",\"moxie/core/utils/Env\"],function(e,t,i,n){function o(t){var o=this,u=i.capTest,c=i.capTrue;i.call(this,t,a,{access_binary:u(window.FileReader||window.File&&File.getAsDataURL),access_image_binary:!1,display_media:u((n.can(\"create_canvas\")||n.can(\"use_data_uri_over32kb\"))&&r(\"moxie/image/Image\")),do_cors:!1,drag_and_drop:!1,filter_by_extension:u(function(){return!(\"Chrome\"===n.browser&&n.verComp(n.version,28,\"<\")||\"IE\"===n.browser&&n.verComp(n.version,10,\"<\")||\"Safari\"===n.browser&&n.verComp(n.version,7,\"<\")||\"Firefox\"===n.browser&&n.verComp(n.version,37,\"<\"))}()),resize_image:function(){return s.Image&&o.can(\"access_binary\")&&n.can(\"create_canvas\")},report_upload_progress:!1,return_response_headers:!1,return_response_type:function(t){return\"json\"===t&&window.JSON?!0:!!~e.inArray(t,[\"text\",\"document\",\"\"])},return_status_code:function(t){return!e.arrayDiff(t,[200,404])},select_file:function(){return n.can(\"use_fileinput\")},select_multiple:!1,send_binary_string:!1,send_custom_headers:!1,send_multipart:!0,slice_blob:!1,stream_upload:function(){return o.can(\"select_file\")},summon_file_dialog:function(){return o.can(\"select_file\")&&!(\"Firefox\"===n.browser&&n.verComp(n.version,4,\"<\")||\"Opera\"===n.browser&&n.verComp(n.version,12,\"<\")||\"IE\"===n.browser&&n.verComp(n.version,10,\"<\"))},upload_filesize:c,use_http_method:function(t){return!e.arrayDiff(t,[\"GET\",\"POST\"])}}),e.extend(this,{init:function(){this.trigger(\"Init\")},destroy:function(e){return function(){e.call(o),e=o=null}}(this.destroy)}),e.extend(this.getShim(),s)}var a=\"html4\",s={};return i.addConstructor(a,o),s}),n(\"moxie/runtime/html4/file/FileInput\",[\"moxie/runtime/html4/Runtime\",\"moxie/file/File\",\"moxie/core/utils/Basic\",\"moxie/core/utils/Dom\",\"moxie/core/utils/Events\",\"moxie/core/utils/Mime\",\"moxie/core/utils/Env\"],function(e,t,i,n,r,o,a){function s(){function e(){var o,c,d,m,h,f,p=this,g=p.getRuntime();f=i.guid(\"uid_\"),o=g.getShimContainer(),s&&(d=n.get(s+\"_form\"),d&&(i.extend(d.style,{top:\"100%\"}),d.firstChild.setAttribute(\"tabindex\",-1))),m=document.createElement(\"form\"),m.setAttribute(\"id\",f+\"_form\"),m.setAttribute(\"method\",\"post\"),m.setAttribute(\"enctype\",\"multipart/form-data\"),m.setAttribute(\"encoding\",\"multipart/form-data\"),i.extend(m.style,{overflow:\"hidden\",position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}),h=document.createElement(\"input\"),h.setAttribute(\"id\",f),h.setAttribute(\"type\",\"file\"),h.setAttribute(\"accept\",l.join(\",\")),g.can(\"summon_file_dialog\")&&h.setAttribute(\"tabindex\",-1),i.extend(h.style,{fontSize:\"999px\",opacity:0}),m.appendChild(h),o.appendChild(m),i.extend(h.style,{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}),\"IE\"===a.browser&&a.verComp(a.version,10,\"<\")&&i.extend(h.style,{filter:\"progid:DXImageTransform.Microsoft.Alpha(opacity=0)\"}),h.onchange=function(){var i;this.value&&(i=this.files?this.files[0]:{name:this.value},i=new t(g.uid,i),this.onchange=function(){},e.call(p),p.files=[i],h.setAttribute(\"id\",i.uid),m.setAttribute(\"id\",i.uid+\"_form\"),p.trigger(\"change\"),h=m=null)},g.can(\"summon_file_dialog\")&&(c=n.get(u.browse_button),r.removeEvent(c,\"click\",p.uid),r.addEvent(c,\"click\",function(e){h&&!h.disabled&&h.click(),e.preventDefault()},p.uid)),s=f,o=d=c=null}var s,u,c,l=[];i.extend(this,{init:function(t){var i,a=this,s=a.getRuntime();u=t,l=o.extList2mimes(t.accept,s.can(\"filter_by_extension\")),i=s.getShimContainer(),function(){var e,o,l;e=n.get(t.browse_button),c=n.getStyle(e,\"z-index\")||\"auto\",s.can(\"summon_file_dialog\")?(\"static\"===n.getStyle(e,\"position\")&&(e.style.position=\"relative\"),a.bind(\"Refresh\",function(){o=parseInt(c,10)||1,n.get(u.browse_button).style.zIndex=o,this.getRuntime().getShimContainer().style.zIndex=o-1})):e.setAttribute(\"tabindex\",-1),l=s.can(\"summon_file_dialog\")?e:i,r.addEvent(l,\"mouseover\",function(){a.trigger(\"mouseenter\")},a.uid),r.addEvent(l,\"mouseout\",function(){a.trigger(\"mouseleave\")},a.uid),r.addEvent(l,\"mousedown\",function(){a.trigger(\"mousedown\")},a.uid),r.addEvent(n.get(t.container),\"mouseup\",function(){a.trigger(\"mouseup\")},a.uid),e=null}(),e.call(this),i=null,a.trigger({type:\"ready\",async:!0})},setOption:function(e,t){var i,r=this.getRuntime();\"accept\"==e&&(l=t.mimes||o.extList2mimes(t,r.can(\"filter_by_extension\"))),i=n.get(s),i&&i.setAttribute(\"accept\",l.join(\",\"))},disable:function(e){var t;(t=n.get(s))&&(t.disabled=!!e)},destroy:function(){var e=this.getRuntime(),t=e.getShim(),i=e.getShimContainer(),o=u&&n.get(u.container),a=u&&n.get(u.browse_button);o&&r.removeAllEvents(o,this.uid),a&&(r.removeAllEvents(a,this.uid),a.style.zIndex=c),i&&(r.removeAllEvents(i,this.uid),i.innerHTML=\"\"),t.removeInstance(this.uid),s=l=u=i=o=a=t=null}})}return e.FileInput=s}),n(\"moxie/runtime/html4/file/FileReader\",[\"moxie/runtime/html4/Runtime\",\"moxie/runtime/html5/file/FileReader\"],function(e,t){return e.FileReader=t}),n(\"moxie/runtime/html4/xhr/XMLHttpRequest\",[\"moxie/runtime/html4/Runtime\",\"moxie/core/utils/Basic\",\"moxie/core/utils/Dom\",\"moxie/core/utils/Url\",\"moxie/core/Exceptions\",\"moxie/core/utils/Events\",\"moxie/file/Blob\",\"moxie/xhr/FormData\"],function(e,t,i,n,r,o,a,s){function u(){function e(e){var t,n,r,a,s=this,u=!1;if(l){if(t=l.id.replace(/_iframe$/,\"\"),n=i.get(t+\"_form\")){for(r=n.getElementsByTagName(\"input\"),a=r.length;a--;)switch(r[a].getAttribute(\"type\")){case\"hidden\":r[a].parentNode.removeChild(r[a]);break;case\"file\":u=!0}r=[],u||n.parentNode.removeChild(n),n=null}setTimeout(function(){o.removeEvent(l,\"load\",s.uid),l.parentNode&&l.parentNode.removeChild(l);var t=s.getRuntime().getShimContainer();t.children.length||t.parentNode.removeChild(t),t=l=null,e()},1)}}var u,c,l;t.extend(this,{send:function(d,m){function h(){var i=w.getShimContainer()||document.body,r=document.createElement(\"div\");r.innerHTML='',l=r.firstChild,i.appendChild(l),o.addEvent(l,\"load\",function(){var i;try{i=l.contentWindow.document||l.contentDocument||window.frames[l.id].document,/^4(0[0-9]|1[0-7]|2[2346])\\s/.test(i.title)?u=i.title.replace(/^(\\d+).*$/,\"$1\"):(u=200,c=t.trim(i.body.innerHTML),v.trigger({type:\"progress\",loaded:c.length,total:c.length}),x&&v.trigger({type:\"uploadprogress\",loaded:x.size||1025,total:x.size||1025}))}catch(r){if(!n.hasSameOrigin(d.url))return e.call(v,function(){v.trigger(\"error\")}),void 0;u=404}e.call(v,function(){v.trigger(\"load\")})},v.uid)}var f,p,g,x,v=this,w=v.getRuntime();if(u=c=null,m instanceof s&&m.hasBlob()){if(x=m.getBlob(),f=x.uid,g=i.get(f),p=i.get(f+\"_form\"),!p)throw new r.DOMException(r.DOMException.NOT_FOUND_ERR)}else f=t.guid(\"uid_\"),p=document.createElement(\"form\"),p.setAttribute(\"id\",f+\"_form\"),p.setAttribute(\"method\",d.method),p.setAttribute(\"enctype\",\"multipart/form-data\"),p.setAttribute(\"encoding\",\"multipart/form-data\"),w.getShimContainer().appendChild(p);p.setAttribute(\"target\",f+\"_iframe\"),m instanceof s&&m.each(function(e,i){if(e instanceof a)g&&g.setAttribute(\"name\",i);else{var n=document.createElement(\"input\");t.extend(n,{type:\"hidden\",name:i,value:e}),g?p.insertBefore(n,g):p.appendChild(n)}}),p.setAttribute(\"action\",d.url),h(),p.submit(),v.trigger(\"loadstart\")},getStatus:function(){return u},getResponse:function(e){if(\"json\"===e&&\"string\"===t.typeOf(c)&&window.JSON)try{return JSON.parse(c.replace(/^\\s*]*>/,\"\").replace(/<\\/pre>\\s*$/,\"\"))}catch(i){return null}return c},abort:function(){var t=this;l&&l.contentWindow&&(l.contentWindow.stop?l.contentWindow.stop():l.contentWindow.document.execCommand?l.contentWindow.document.execCommand(\"Stop\"):l.src=\"about:blank\"),e.call(this,function(){t.dispatchEvent(\"abort\")})},destroy:function(){this.getRuntime().getShim().removeInstance(this.uid)}})}return e.XMLHttpRequest=u}),n(\"moxie/runtime/html4/image/Image\",[\"moxie/runtime/html4/Runtime\",\"moxie/runtime/html5/image/Image\"],function(e,t){return e.Image=t}),a([\"moxie/core/utils/Basic\",\"moxie/core/utils/Encode\",\"moxie/core/utils/Env\",\"moxie/core/Exceptions\",\"moxie/core/utils/Dom\",\"moxie/core/EventTarget\",\"moxie/runtime/Runtime\",\"moxie/runtime/RuntimeClient\",\"moxie/file/Blob\",\"moxie/core/I18n\",\"moxie/core/utils/Mime\",\"moxie/file/FileInput\",\"moxie/file/File\",\"moxie/file/FileDrop\",\"moxie/file/FileReader\",\"moxie/core/utils/Url\",\"moxie/runtime/RuntimeTarget\",\"moxie/xhr/FormData\",\"moxie/xhr/XMLHttpRequest\",\"moxie/image/Image\",\"moxie/core/utils/Events\",\"moxie/runtime/html5/image/ResizerCanvas\"])}(this)});\n/**\n * Plupload - multi-runtime File Uploader\n * v2.3.9\n *\n * Copyright 2013, Moxiecode Systems AB\n * Released under GPL License.\n *\n * License: http://www.plupload.com/license\n * Contributing: http://www.plupload.com/contributing\n *\n * Date: 2021-11-15\n */\n!function(e,t){var i=function(){var e={};return t.apply(e,arguments),e.plupload};\"function\"==typeof define&&define.amd?define(\"plupload\",[\"./moxie\"],i):\"object\"==typeof module&&module.exports?module.exports=i(require(\"./moxie\")):e.plupload=i(e.moxie)}(this||window,function(e){!function(e,t,i){function n(e){function t(e,t,i){var r={chunks:\"slice_blob\",jpgresize:\"send_binary_string\",pngresize:\"send_binary_string\",progress:\"report_upload_progress\",multi_selection:\"select_multiple\",dragdrop:\"drag_and_drop\",drop_element:\"drag_and_drop\",headers:\"send_custom_headers\",urlstream_upload:\"send_binary_string\",canSendBinary:\"send_binary\",triggerDialog:\"summon_file_dialog\"};r[e]?n[r[e]]=t:i||(n[e]=t)}var i=e.required_features,n={};return\"string\"==typeof i?l.each(i.split(/\\s*,\\s*/),function(e){t(e,!0)}):\"object\"==typeof i?l.each(i,function(e,i){t(i,e)}):i===!0&&(e.chunk_size&&e.chunk_size>0&&(n.slice_blob=!0),l.isEmptyObj(e.resize)&&e.multipart!==!1||(n.send_binary_string=!0),e.http_method&&(n.use_http_method=e.http_method),l.each(e,function(e,i){t(i,!!e,!0)})),n}var r=window.setTimeout,s={},a=t.core.utils,o=t.runtime.Runtime,l={VERSION:\"2.3.6\",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,moxie:t,mimeTypes:a.Mime.mimes,ua:a.Env,typeOf:a.Basic.typeOf,extend:a.Basic.extend,guid:a.Basic.guid,getAll:function(e){var t,i=[];\"array\"!==l.typeOf(e)&&(e=[e]);for(var n=e.length;n--;)t=l.get(e[n]),t&&i.push(t);return i.length?i:null},get:a.Dom.get,each:a.Basic.each,getPos:a.Dom.getPos,getSize:a.Dom.getSize,xmlEncode:function(e){var t={\"<\":\"lt\",\">\":\"gt\",\"&\":\"amp\",'\"':\"quot\",\"'\":\"#39\"},i=/[<>&\\\"\\']/g;return e?(\"\"+e).replace(i,function(e){return t[e]?\"&\"+t[e]+\";\":e}):e},toArray:a.Basic.toArray,inArray:a.Basic.inArray,inSeries:a.Basic.inSeries,addI18n:t.core.I18n.addI18n,translate:t.core.I18n.translate,sprintf:a.Basic.sprintf,isEmptyObj:a.Basic.isEmptyObj,hasClass:a.Dom.hasClass,addClass:a.Dom.addClass,removeClass:a.Dom.removeClass,getStyle:a.Dom.getStyle,addEvent:a.Events.addEvent,removeEvent:a.Events.removeEvent,removeAllEvents:a.Events.removeAllEvents,cleanName:function(e){var t,i;for(i=[/[\\300-\\306]/g,\"A\",/[\\340-\\346]/g,\"a\",/\\307/g,\"C\",/\\347/g,\"c\",/[\\310-\\313]/g,\"E\",/[\\350-\\353]/g,\"e\",/[\\314-\\317]/g,\"I\",/[\\354-\\357]/g,\"i\",/\\321/g,\"N\",/\\361/g,\"n\",/[\\322-\\330]/g,\"O\",/[\\362-\\370]/g,\"o\",/[\\331-\\334]/g,\"U\",/[\\371-\\374]/g,\"u\"],t=0;t0?\"&\":\"?\")+i),e},formatSize:function(e){function t(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}if(e===i||/\\D/.test(e))return l.translate(\"N/A\");var n=Math.pow(1024,4);return e>n?t(e/n,1)+\" \"+l.translate(\"tb\"):e>(n/=1024)?t(e/n,1)+\" \"+l.translate(\"gb\"):e>(n/=1024)?t(e/n,1)+\" \"+l.translate(\"mb\"):e>1024?Math.round(e/1024)+\" \"+l.translate(\"kb\"):e+\" \"+l.translate(\"b\")},parseSize:a.Basic.parseSizeStr,predictRuntime:function(e,t){var i,n;return i=new l.Uploader(e),n=o.thatCan(i.getOption().required_features,t||e.runtimes),i.destroy(),n},addFileFilter:function(e,t){s[e]=t}};l.addFileFilter(\"mime_types\",function(e,t,i){e.length&&!e.regexp.test(t.name)?(this.trigger(\"Error\",{code:l.FILE_EXTENSION_ERROR,message:l.translate(\"File extension error.\"),file:t}),i(!1)):i(!0)}),l.addFileFilter(\"max_file_size\",function(e,t,i){var n;e=l.parseSize(e),t.size!==n&&e&&t.size>e?(this.trigger(\"Error\",{code:l.FILE_SIZE_ERROR,message:l.translate(\"File size error.\"),file:t}),i(!1)):i(!0)}),l.addFileFilter(\"prevent_duplicates\",function(e,t,i){if(e)for(var n=this.files.length;n--;)if(t.name===this.files[n].name&&t.size===this.files[n].size)return this.trigger(\"Error\",{code:l.FILE_DUPLICATE_ERROR,message:l.translate(\"Duplicate file error.\"),file:t}),i(!1),void 0;i(!0)}),l.addFileFilter(\"prevent_empty\",function(e,t,n){e&&!t.size&&t.size!==i?(this.trigger(\"Error\",{code:l.FILE_SIZE_ERROR,message:l.translate(\"File size error.\"),file:t}),n(!1)):n(!0)}),l.Uploader=function(e){function a(){var e,t,i=0;if(this.state==l.STARTED){for(t=0;t0?Math.ceil(100*(e.loaded/e.size)):100,d()}function d(){var e,t,n,r=0;for(I.reset(),e=0;eS)&&(r+=n),I.loaded+=n):I.size=i,t.status==l.DONE?I.uploaded++:t.status==l.FAILED?I.failed++:I.queued++;I.size===i?I.percent=D.length>0?Math.ceil(100*(I.uploaded/D.length)):0:(I.bytesPerSec=Math.ceil(r/((+new Date-S||1)/1e3)),I.percent=I.size>0?Math.ceil(100*(I.loaded/I.size)):0)}function c(){var e=F[0]||P[0];return e?e.getRuntime().uid:!1}function f(){this.bind(\"FilesAdded FilesRemoved\",function(e){e.trigger(\"QueueChanged\"),e.refresh()}),this.bind(\"CancelUpload\",b),this.bind(\"BeforeUpload\",m),this.bind(\"UploadFile\",_),this.bind(\"UploadProgress\",E),this.bind(\"StateChanged\",v),this.bind(\"QueueChanged\",d),this.bind(\"Error\",R),this.bind(\"FileUploaded\",y),this.bind(\"Destroy\",z)}function p(e,i){var n=this,r=0,s=[],a={runtime_order:e.runtimes,required_caps:e.required_features,preferred_caps:x,swf_url:e.flash_swf_url,xap_url:e.silverlight_xap_url};l.each(e.runtimes.split(/\\s*,\\s*/),function(t){e[t]&&(a[t]=e[t])}),e.browse_button&&l.each(e.browse_button,function(i){s.push(function(s){var u=new t.file.FileInput(l.extend({},a,{accept:e.filters.mime_types,name:e.file_data_name,multiple:e.multi_selection,container:e.container,browse_button:i}));u.onready=function(){var e=o.getInfo(this.ruid);l.extend(n.features,{chunks:e.can(\"slice_blob\"),multipart:e.can(\"send_multipart\"),multi_selection:e.can(\"select_multiple\")}),r++,F.push(this),s()},u.onchange=function(){n.addFile(this.files)},u.bind(\"mouseenter mouseleave mousedown mouseup\",function(t){U||(e.browse_button_hover&&(\"mouseenter\"===t.type?l.addClass(i,e.browse_button_hover):\"mouseleave\"===t.type&&l.removeClass(i,e.browse_button_hover)),e.browse_button_active&&(\"mousedown\"===t.type?l.addClass(i,e.browse_button_active):\"mouseup\"===t.type&&l.removeClass(i,e.browse_button_active)))}),u.bind(\"mousedown\",function(){n.trigger(\"Browse\")}),u.bind(\"error runtimeerror\",function(){u=null,s()}),u.init()})}),e.drop_element&&l.each(e.drop_element,function(e){s.push(function(i){var s=new t.file.FileDrop(l.extend({},a,{drop_zone:e}));s.onready=function(){var e=o.getInfo(this.ruid);l.extend(n.features,{chunks:e.can(\"slice_blob\"),multipart:e.can(\"send_multipart\"),dragdrop:e.can(\"drag_and_drop\")}),r++,P.push(this),i()},s.ondrop=function(){n.addFile(this.files)},s.bind(\"error runtimeerror\",function(){s=null,i()}),s.init()})}),l.inSeries(s,function(){\"function\"==typeof i&&i(r)})}function g(e,n,r,s){var a=new t.image.Image;try{a.onload=function(){n.width>this.width&&n.height>this.height&&n.quality===i&&n.preserve_headers&&!n.crop?(this.destroy(),s(e)):a.downsize(n.width,n.height,n.crop,n.preserve_headers)},a.onresize=function(){var t=this.getAsBlob(e.type,n.quality);this.destroy(),s(t)},a.bind(\"error runtimeerror\",function(){this.destroy(),s(e)}),a.load(e,r)}catch(o){s(e)}}function h(e,i,r){function s(e,i,n){var r=O[e];switch(e){case\"max_file_size\":\"max_file_size\"===e&&(O.max_file_size=O.filters.max_file_size=i);break;case\"chunk_size\":(i=l.parseSize(i))&&(O[e]=i,O.send_file_name=!0);break;case\"multipart\":O[e]=i,i||(O.send_file_name=!0);break;case\"http_method\":O[e]=\"PUT\"===i.toUpperCase()?\"PUT\":\"POST\";break;case\"unique_names\":O[e]=i,i&&(O.send_file_name=!0);break;case\"filters\":\"array\"===l.typeOf(i)&&(i={mime_types:i}),n?l.extend(O.filters,i):O.filters=i,i.mime_types&&(\"string\"===l.typeOf(i.mime_types)&&(i.mime_types=t.core.utils.Mime.mimes2extList(i.mime_types)),i.mime_types.regexp=function(e){var t=[];return l.each(e,function(e){l.each(e.extensions.split(/,/),function(e){/^\\s*\\*\\s*$/.test(e)?t.push(\"\\\\.*\"):t.push(\"\\\\.\"+e.replace(new RegExp(\"[\"+\"/^$.*+?|()[]{}\\\\\".replace(/./g,\"\\\\$&\")+\"]\",\"g\"),\"\\\\$&\"))})}),new RegExp(\"(\"+t.join(\"|\")+\")$\",\"i\")}(i.mime_types),O.filters.mime_types=i.mime_types);break;case\"resize\":O.resize=i?l.extend({preserve_headers:!0,crop:!1},i):!1;break;case\"prevent_duplicates\":O.prevent_duplicates=O.filters.prevent_duplicates=!!i;break;case\"container\":case\"browse_button\":case\"drop_element\":i=\"container\"===e?l.get(i):l.getAll(i);case\"runtimes\":case\"multi_selection\":case\"flash_swf_url\":case\"silverlight_xap_url\":O[e]=i,n||(u=!0);break;default:O[e]=i}n||a.trigger(\"OptionChanged\",e,i,r)}var a=this,u=!1;\"object\"==typeof e?l.each(e,function(e,t){s(t,e,r)}):s(e,i,r),r?(O.required_features=n(l.extend({},O)),x=n(l.extend({},O,{required_features:!0}))):u&&(a.trigger(\"Destroy\"),p.call(a,O,function(e){e?(a.runtime=o.getInfo(c()).type,a.trigger(\"Init\",{runtime:a.runtime}),a.trigger(\"PostInit\")):a.trigger(\"Error\",{code:l.INIT_ERROR,message:l.translate(\"Init error.\")})}))}function m(e,t){if(e.settings.unique_names){var i=t.name.match(/\\.([^.]+)$/),n=\"part\";i&&(n=i[1]),t.target_name=t.id+\".\"+n}}function _(e,i){function n(){c-->0?r(s,1e3):(i.loaded=p,e.trigger(\"Error\",{code:l.HTTP_ERROR,message:l.translate(\"HTTP Error.\"),file:i,response:T.responseText,status:T.status,responseHeaders:T.getAllResponseHeaders()}))}function s(){var t,n,r={};i.status===l.UPLOADING&&e.state!==l.STOPPED&&(e.settings.send_file_name&&(r.name=i.target_name||i.name),d&&f.chunks&&o.size>d?(n=Math.min(d,o.size-p),t=o.slice(p,p+n)):(n=o.size,t=o),d&&f.chunks&&(e.settings.send_chunk_number?(r.chunk=Math.ceil(p/d),r.chunks=Math.ceil(o.size/d)):(r.offset=p,r.total=o.size)),e.trigger(\"BeforeChunkUpload\",i,r,t,p)&&a(r,t,n))}function a(a,d,g){var m;T=new t.xhr.XMLHttpRequest,T.upload&&(T.upload.onprogress=function(t){i.loaded=Math.min(i.size,p+t.loaded),e.trigger(\"UploadProgress\",i)}),T.onload=function(){return T.status<200||T.status>=400?(n(),void 0):(c=e.settings.max_retries,g=o.size?(i.size!=i.origSize&&(o.destroy(),o=null),e.trigger(\"UploadProgress\",i),i.status=l.DONE,i.completeTimestamp=+new Date,e.trigger(\"FileUploaded\",i,{response:T.responseText,status:T.status,responseHeaders:T.getAllResponseHeaders()})):r(s,1),void 0)},T.onerror=function(){n()},T.onloadend=function(){this.destroy()},e.settings.multipart&&f.multipart?(T.open(e.settings.http_method,u,!0),l.each(e.settings.headers,function(e,t){T.setRequestHeader(t,e)}),m=new t.xhr.FormData,l.each(l.extend(a,e.settings.multipart_params),function(e,t){m.append(t,e)}),m.append(e.settings.file_data_name,d),T.send(m,h)):(u=l.buildUrl(e.settings.url,l.extend(a,e.settings.multipart_params)),T.open(e.settings.http_method,u,!0),l.each(e.settings.headers,function(e,t){T.setRequestHeader(t,e)}),T.hasRequestHeader(\"Content-Type\")||T.setRequestHeader(\"Content-Type\",\"application/octet-stream\"),T.send(d,h))}var o,u=e.settings.url,d=e.settings.chunk_size,c=e.settings.max_retries,f=e.features,p=0,h={runtime_order:e.settings.runtimes,required_caps:e.settings.required_features,preferred_caps:x,swf_url:e.settings.flash_swf_url,xap_url:e.settings.silverlight_xap_url};i.loaded&&(p=i.loaded=d?d*Math.floor(i.loaded/d):0),o=i.getSource(),l.isEmptyObj(e.settings.resize)||-1===l.inArray(o.type,[\"image/jpeg\",\"image/png\"])?s():g(o,e.settings.resize,h,function(e){o=e,i.size=e.size,s()})}function E(e,t){u(t)}function v(e){if(e.state==l.STARTED)S=+new Date;else if(e.state==l.STOPPED)for(var t=e.files.length-1;t>=0;t--)e.files[t].status==l.UPLOADING&&(e.files[t].status=l.QUEUED,d())}function b(){T&&T.abort()}function y(e){d(),r(function(){a.call(e)},1)}function R(e,t){t.code===l.INIT_ERROR?e.destroy():t.code===l.HTTP_ERROR&&(t.file.status=l.FAILED,t.file.completeTimestamp=+new Date,u(t.file),e.state==l.STARTED&&(e.trigger(\"CancelUpload\"),r(function(){a.call(e)},1)))}function z(e){e.stop(),l.each(D,function(e){e.destroy()}),D=[],F.length&&(l.each(F,function(e){e.destroy()}),F=[]),P.length&&(l.each(P,function(e){e.destroy()}),P=[]),x={},U=!1,S=T=null,I.reset()}var O,S,I,T,w=l.guid(),D=[],x={},F=[],P=[],U=!1;O={chunk_size:0,file_data_name:\"file\",filters:{mime_types:[],max_file_size:0,prevent_duplicates:!1,prevent_empty:!0},flash_swf_url:\"js/Moxie.swf\",http_method:\"POST\",max_retries:0,multipart:!0,multi_selection:!0,resize:!1,runtimes:o.order,send_file_name:!0,send_chunk_number:!0,silverlight_xap_url:\"js/Moxie.xap\"},h.call(this,e,null,!0),I=new l.QueueProgress,l.extend(this,{id:w,uid:w,state:l.STOPPED,features:{},runtime:null,files:D,settings:O,total:I,init:function(){var e,t,i=this;return e=i.getOption(\"preinit\"),\"function\"==typeof e?e(i):l.each(e,function(e,t){i.bind(t,e)}),f.call(i),l.each([\"container\",\"browse_button\",\"drop_element\"],function(e){return null===i.getOption(e)?(t={code:l.INIT_ERROR,message:l.sprintf(l.translate(\"%s specified, but cannot be found.\"),e)},!1):void 0}),t?i.trigger(\"Error\",t):O.browse_button||O.drop_element?(p.call(i,O,function(e){var t=i.getOption(\"init\");\"function\"==typeof t?t(i):l.each(t,function(e,t){i.bind(t,e)}),e?(i.runtime=o.getInfo(c()).type,i.trigger(\"Init\",{runtime:i.runtime}),i.trigger(\"PostInit\")):i.trigger(\"Error\",{code:l.INIT_ERROR,message:l.translate(\"Init error.\")})}),void 0):i.trigger(\"Error\",{code:l.INIT_ERROR,message:l.translate(\"You must specify either browse_button or drop_element.\")})},setOption:function(e,t){h.call(this,e,t,!this.runtime)},getOption:function(e){return e?O[e]:O},refresh:function(){F.length&&l.each(F,function(e){e.trigger(\"Refresh\")}),this.trigger(\"Refresh\")},start:function(){this.state!=l.STARTED&&(this.state=l.STARTED,this.trigger(\"StateChanged\"),a.call(this))},stop:function(){this.state!=l.STOPPED&&(this.state=l.STOPPED,this.trigger(\"StateChanged\"),this.trigger(\"CancelUpload\"))},disableBrowse:function(){U=arguments[0]!==i?arguments[0]:!0,F.length&&l.each(F,function(e){e.disable(U)}),this.trigger(\"DisableBrowse\",U)},getFile:function(e){var t;for(t=D.length-1;t>=0;t--)if(D[t].id===e)return D[t]},addFile:function(e,i){function n(e,t){var i=[];l.each(u.settings.filters,function(t,n){s[n]&&i.push(function(i){s[n].call(u,t,e,function(e){i(!e)})})}),l.inSeries(i,t)}function a(e){var s=l.typeOf(e);if(e instanceof t.file.File){if(!e.ruid&&!e.isDetached()){if(!o)return!1;e.ruid=o,e.connectRuntime(o)}a(new l.File(e))}else e instanceof t.file.Blob?(a(e.getSource()),e.destroy()):e instanceof l.File?(i&&(e.name=i),d.push(function(t){n(e,function(i){i||(D.push(e),f.push(e),u.trigger(\"FileFiltered\",e)),r(t,1)})})):-1!==l.inArray(s,[\"file\",\"blob\"])?a(new t.file.File(null,e)):\"node\"===s&&\"filelist\"===l.typeOf(e.files)?l.each(e.files,a):\"array\"===s&&(i=null,l.each(e,a))}var o,u=this,d=[],f=[];o=c(),a(e),d.length&&l.inSeries(d,function(){f.length&&u.trigger(\"FilesAdded\",f)})},removeFile:function(e){for(var t=\"string\"==typeof e?e:e.id,i=D.length-1;i>=0;i--)if(D[i].id===t)return this.splice(i,1)[0]},splice:function(e,t){var n=D.splice(e===i?0:e,t===i?D.length:t),r=!1;return this.state==l.STARTED&&(l.each(n,function(e){return e.status===l.UPLOADING?(r=!0,!1):void 0}),r&&this.stop()),this.trigger(\"FilesRemoved\",n),l.each(n,function(e){e.destroy()}),r&&this.start(),n},dispatchEvent:function(e){var t,i;if(e=e.toLowerCase(),t=this.hasEventListener(e)){t.sort(function(e,t){return t.priority-e.priority}),i=[].slice.call(arguments),i.shift(),i.unshift(this);for(var n=0;n {\n const metaTag = document.querySelector(\"meta[name=csp-nonce]\");\n return nonce = metaTag && metaTag.content;\n};\n\nconst cspNonce = () => nonce || loadCSPNonce();\n\nconst m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nconst matches = function(element, selector) {\n if (selector.exclude) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n};\n\nconst EXPANDO = \"_ujsData\";\n\nconst getData = (element, key) => element[EXPANDO] ? element[EXPANDO][key] : undefined;\n\nconst setData = function(element, key, value) {\n if (!element[EXPANDO]) {\n element[EXPANDO] = {};\n }\n return element[EXPANDO][key] = value;\n};\n\nconst $ = selector => Array.prototype.slice.call(document.querySelectorAll(selector));\n\nconst isContentEditable = function(element) {\n var isEditable = false;\n do {\n if (element.isContentEditable) {\n isEditable = true;\n break;\n }\n element = element.parentElement;\n } while (element);\n return isEditable;\n};\n\nconst csrfToken = () => {\n const meta = document.querySelector(\"meta[name=csrf-token]\");\n return meta && meta.content;\n};\n\nconst csrfParam = () => {\n const meta = document.querySelector(\"meta[name=csrf-param]\");\n return meta && meta.content;\n};\n\nconst CSRFProtection = xhr => {\n const token = csrfToken();\n if (token) {\n return xhr.setRequestHeader(\"X-CSRF-Token\", token);\n }\n};\n\nconst refreshCSRFTokens = () => {\n const token = csrfToken();\n const param = csrfParam();\n if (token && param) {\n return $('form input[name=\"' + param + '\"]').forEach((input => input.value = token));\n }\n};\n\nconst AcceptHeaders = {\n \"*\": \"*/*\",\n text: \"text/plain\",\n html: \"text/html\",\n xml: \"application/xml, text/xml\",\n json: \"application/json, text/javascript\",\n script: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n};\n\nconst ajax = options => {\n options = prepareOptions(options);\n var xhr = createXHR(options, (function() {\n const response = processResponse(xhr.response != null ? xhr.response : xhr.responseText, xhr.getResponseHeader(\"Content-Type\"));\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : undefined;\n }));\n if (options.beforeSend && !options.beforeSend(xhr, options)) {\n return false;\n }\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n};\n\nvar prepareOptions = function(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n if (options.type === \"GET\" && options.data) {\n if (options.url.indexOf(\"?\") < 0) {\n options.url += \"?\" + options.data;\n } else {\n options.url += \"&\" + options.data;\n }\n }\n if (!(options.dataType in AcceptHeaders)) {\n options.dataType = \"*\";\n }\n options.accept = AcceptHeaders[options.dataType];\n if (options.dataType !== \"*\") {\n options.accept += \", */*; q=0.01\";\n }\n return options;\n};\n\nvar createXHR = function(options, done) {\n const xhr = new XMLHttpRequest;\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader(\"Accept\", options.accept);\n if (typeof options.data === \"string\") {\n xhr.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded; charset=UTF-8\");\n }\n if (!options.crossDomain) {\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n CSRFProtection(xhr);\n }\n xhr.withCredentials = !!options.withCredentials;\n xhr.onreadystatechange = function() {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n return xhr;\n};\n\nvar processResponse = function(response, type) {\n if (typeof response === \"string\" && typeof type === \"string\") {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n const script = document.createElement(\"script\");\n script.setAttribute(\"nonce\", cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n const parser = new DOMParser;\n type = type.replace(/;.+/, \"\");\n try {\n response = parser.parseFromString(response, type);\n } catch (error1) {}\n }\n }\n return response;\n};\n\nconst href = element => element.href;\n\nconst isCrossDomain = function(url) {\n const originAnchor = document.createElement(\"a\");\n originAnchor.href = location.href;\n const urlAnchor = document.createElement(\"a\");\n try {\n urlAnchor.href = url;\n return !((!urlAnchor.protocol || urlAnchor.protocol === \":\") && !urlAnchor.host || originAnchor.protocol + \"//\" + originAnchor.host === urlAnchor.protocol + \"//\" + urlAnchor.host);\n } catch (e) {\n return true;\n }\n};\n\nlet preventDefault;\n\nlet {CustomEvent: CustomEvent} = window;\n\nif (typeof CustomEvent !== \"function\") {\n CustomEvent = function(event, params) {\n const evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n CustomEvent.prototype = window.Event.prototype;\n ({preventDefault: preventDefault} = CustomEvent.prototype);\n CustomEvent.prototype.preventDefault = function() {\n const result = preventDefault.call(this);\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, \"defaultPrevented\", {\n get() {\n return true;\n }\n });\n }\n return result;\n };\n}\n\nconst fire = (obj, name, data) => {\n const event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n};\n\nconst stopEverything = e => {\n fire(e.target, \"ujs:everythingStopped\");\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n};\n\nconst delegate = (element, selector, eventType, handler) => element.addEventListener(eventType, (function(e) {\n let {target: target} = e;\n while (!!(target instanceof Element) && !matches(target, selector)) {\n target = target.parentNode;\n }\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n e.stopPropagation();\n }\n}));\n\nconst toArray = e => Array.prototype.slice.call(e);\n\nconst serializeElement = (element, additionalParam) => {\n let inputs = [ element ];\n if (matches(element, \"form\")) {\n inputs = toArray(element.elements);\n }\n const params = [];\n inputs.forEach((function(input) {\n if (!input.name || input.disabled) {\n return;\n }\n if (matches(input, \"fieldset[disabled] *\")) {\n return;\n }\n if (matches(input, \"select\")) {\n toArray(input.options).forEach((function(option) {\n if (option.selected) {\n params.push({\n name: input.name,\n value: option.value\n });\n }\n }));\n } else if (input.checked || [ \"radio\", \"checkbox\", \"submit\" ].indexOf(input.type) === -1) {\n params.push({\n name: input.name,\n value: input.value\n });\n }\n }));\n if (additionalParam) {\n params.push(additionalParam);\n }\n return params.map((function(param) {\n if (param.name) {\n return `${encodeURIComponent(param.name)}=${encodeURIComponent(param.value)}`;\n } else {\n return param;\n }\n })).join(\"&\");\n};\n\nconst formElements = (form, selector) => {\n if (matches(form, \"form\")) {\n return toArray(form.elements).filter((el => matches(el, selector)));\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n};\n\nconst handleConfirmWithRails = rails => function(e) {\n if (!allowAction(this, rails)) {\n stopEverything(e);\n }\n};\n\nconst confirm = (message, element) => window.confirm(message);\n\nvar allowAction = function(element, rails) {\n let callback;\n const message = element.getAttribute(\"data-confirm\");\n if (!message) {\n return true;\n }\n let answer = false;\n if (fire(element, \"confirm\")) {\n try {\n answer = rails.confirm(message, element);\n } catch (error) {}\n callback = fire(element, \"confirm:complete\", [ answer ]);\n }\n return answer && callback;\n};\n\nconst handleDisabledElement = function(e) {\n const element = this;\n if (element.disabled) {\n stopEverything(e);\n }\n};\n\nconst enableElement = e => {\n let element;\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n element = e.target;\n } else {\n element = e;\n }\n if (isContentEditable(element)) {\n return;\n }\n if (matches(element, linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, buttonDisableSelector) || matches(element, formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, formSubmitSelector)) {\n return enableFormElements(element);\n }\n};\n\nconst disableElement = e => {\n const element = e instanceof Event ? e.target : e;\n if (isContentEditable(element)) {\n return;\n }\n if (matches(element, linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, buttonDisableSelector) || matches(element, formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, formSubmitSelector)) {\n return disableFormElements(element);\n }\n};\n\nvar disableLinkElement = function(element) {\n if (getData(element, \"ujs:disabled\")) {\n return;\n }\n const replacement = element.getAttribute(\"data-disable-with\");\n if (replacement != null) {\n setData(element, \"ujs:enable-with\", element.innerHTML);\n element.innerHTML = replacement;\n }\n element.addEventListener(\"click\", stopEverything);\n return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableLinkElement = function(element) {\n const originalText = getData(element, \"ujs:enable-with\");\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, \"ujs:enable-with\", null);\n }\n element.removeEventListener(\"click\", stopEverything);\n return setData(element, \"ujs:disabled\", null);\n};\n\nvar disableFormElements = form => formElements(form, formDisableSelector).forEach(disableFormElement);\n\nvar disableFormElement = function(element) {\n if (getData(element, \"ujs:disabled\")) {\n return;\n }\n const replacement = element.getAttribute(\"data-disable-with\");\n if (replacement != null) {\n if (matches(element, \"button\")) {\n setData(element, \"ujs:enable-with\", element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, \"ujs:enable-with\", element.value);\n element.value = replacement;\n }\n }\n element.disabled = true;\n return setData(element, \"ujs:disabled\", true);\n};\n\nvar enableFormElements = form => formElements(form, formEnableSelector).forEach((element => enableFormElement(element)));\n\nvar enableFormElement = function(element) {\n const originalText = getData(element, \"ujs:enable-with\");\n if (originalText != null) {\n if (matches(element, \"button\")) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n setData(element, \"ujs:enable-with\", null);\n }\n element.disabled = false;\n return setData(element, \"ujs:disabled\", null);\n};\n\nvar isXhrRedirect = function(event) {\n const xhr = event.detail ? event.detail[0] : undefined;\n return xhr && xhr.getResponseHeader(\"X-Xhr-Redirect\");\n};\n\nconst handleMethodWithRails = rails => function(e) {\n const link = this;\n const method = link.getAttribute(\"data-method\");\n if (!method) {\n return;\n }\n if (isContentEditable(this)) {\n return;\n }\n const href = rails.href(link);\n const csrfToken$1 = csrfToken();\n const csrfParam$1 = csrfParam();\n const form = document.createElement(\"form\");\n let formContent = ``;\n if (csrfParam$1 && csrfToken$1 && !isCrossDomain(href)) {\n formContent += ``;\n }\n formContent += '';\n form.method = \"post\";\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = \"none\";\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n stopEverything(e);\n};\n\nconst isRemote = function(element) {\n const value = element.getAttribute(\"data-remote\");\n return value != null && value !== \"false\";\n};\n\nconst handleRemoteWithRails = rails => function(e) {\n let data, method, url;\n const element = this;\n if (!isRemote(element)) {\n return true;\n }\n if (!fire(element, \"ajax:before\")) {\n fire(element, \"ajax:stopped\");\n return false;\n }\n if (isContentEditable(element)) {\n fire(element, \"ajax:stopped\");\n return false;\n }\n const withCredentials = element.getAttribute(\"data-with-credentials\");\n const dataType = element.getAttribute(\"data-type\") || \"script\";\n if (matches(element, formSubmitSelector)) {\n const button = getData(element, \"ujs:submit-button\");\n method = getData(element, \"ujs:submit-button-formmethod\") || element.getAttribute(\"method\") || \"get\";\n url = getData(element, \"ujs:submit-button-formaction\") || element.getAttribute(\"action\") || location.href;\n if (method.toUpperCase() === \"GET\") {\n url = url.replace(/\\?.*$/, \"\");\n }\n if (element.enctype === \"multipart/form-data\") {\n data = new FormData(element);\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n setData(element, \"ujs:submit-button\", null);\n setData(element, \"ujs:submit-button-formmethod\", null);\n setData(element, \"ujs:submit-button-formaction\", null);\n } else if (matches(element, buttonClickSelector) || matches(element, inputChangeSelector)) {\n method = element.getAttribute(\"data-method\");\n url = element.getAttribute(\"data-url\");\n data = serializeElement(element, element.getAttribute(\"data-params\"));\n } else {\n method = element.getAttribute(\"data-method\");\n url = rails.href(element);\n data = element.getAttribute(\"data-params\");\n }\n ajax({\n type: method || \"GET\",\n url: url,\n data: data,\n dataType: dataType,\n beforeSend(xhr, options) {\n if (fire(element, \"ajax:beforeSend\", [ xhr, options ])) {\n return fire(element, \"ajax:send\", [ xhr ]);\n } else {\n fire(element, \"ajax:stopped\");\n return false;\n }\n },\n success(...args) {\n return fire(element, \"ajax:success\", args);\n },\n error(...args) {\n return fire(element, \"ajax:error\", args);\n },\n complete(...args) {\n return fire(element, \"ajax:complete\", args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== \"false\"\n });\n stopEverything(e);\n};\n\nconst formSubmitButtonClick = function(e) {\n const button = this;\n const {form: form} = button;\n if (!form) {\n return;\n }\n if (button.name) {\n setData(form, \"ujs:submit-button\", {\n name: button.name,\n value: button.value\n });\n }\n setData(form, \"ujs:formnovalidate-button\", button.formNoValidate);\n setData(form, \"ujs:submit-button-formaction\", button.getAttribute(\"formaction\"));\n return setData(form, \"ujs:submit-button-formmethod\", button.getAttribute(\"formmethod\"));\n};\n\nconst preventInsignificantClick = function(e) {\n const link = this;\n const method = (link.getAttribute(\"data-method\") || \"GET\").toUpperCase();\n const data = link.getAttribute(\"data-params\");\n const metaClick = e.metaKey || e.ctrlKey;\n const insignificantMetaClick = metaClick && method === \"GET\" && !data;\n const nonPrimaryMouseClick = e.button != null && e.button !== 0;\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n e.stopImmediatePropagation();\n }\n};\n\nconst Rails = {\n $: $,\n ajax: ajax,\n buttonClickSelector: buttonClickSelector,\n buttonDisableSelector: buttonDisableSelector,\n confirm: confirm,\n cspNonce: cspNonce,\n csrfToken: csrfToken,\n csrfParam: csrfParam,\n CSRFProtection: CSRFProtection,\n delegate: delegate,\n disableElement: disableElement,\n enableElement: enableElement,\n fileInputSelector: fileInputSelector,\n fire: fire,\n formElements: formElements,\n formEnableSelector: formEnableSelector,\n formDisableSelector: formDisableSelector,\n formInputClickSelector: formInputClickSelector,\n formSubmitButtonClick: formSubmitButtonClick,\n formSubmitSelector: formSubmitSelector,\n getData: getData,\n handleDisabledElement: handleDisabledElement,\n href: href,\n inputChangeSelector: inputChangeSelector,\n isCrossDomain: isCrossDomain,\n linkClickSelector: linkClickSelector,\n linkDisableSelector: linkDisableSelector,\n loadCSPNonce: loadCSPNonce,\n matches: matches,\n preventInsignificantClick: preventInsignificantClick,\n refreshCSRFTokens: refreshCSRFTokens,\n serializeElement: serializeElement,\n setData: setData,\n stopEverything: stopEverything\n};\n\nconst handleConfirm = handleConfirmWithRails(Rails);\n\nRails.handleConfirm = handleConfirm;\n\nconst handleMethod = handleMethodWithRails(Rails);\n\nRails.handleMethod = handleMethod;\n\nconst handleRemote = handleRemoteWithRails(Rails);\n\nRails.handleRemote = handleRemote;\n\nconst start = function() {\n if (window._rails_loaded) {\n throw new Error(\"rails-ujs has already been loaded!\");\n }\n window.addEventListener(\"pageshow\", (function() {\n $(formEnableSelector).forEach((function(el) {\n if (getData(el, \"ujs:disabled\")) {\n enableElement(el);\n }\n }));\n $(linkDisableSelector).forEach((function(el) {\n if (getData(el, \"ujs:disabled\")) {\n enableElement(el);\n }\n }));\n }));\n delegate(document, linkDisableSelector, \"ajax:complete\", enableElement);\n delegate(document, linkDisableSelector, \"ajax:stopped\", enableElement);\n delegate(document, buttonDisableSelector, \"ajax:complete\", enableElement);\n delegate(document, buttonDisableSelector, \"ajax:stopped\", enableElement);\n delegate(document, linkClickSelector, \"click\", preventInsignificantClick);\n delegate(document, linkClickSelector, \"click\", handleDisabledElement);\n delegate(document, linkClickSelector, \"click\", handleConfirm);\n delegate(document, linkClickSelector, \"click\", disableElement);\n delegate(document, linkClickSelector, \"click\", handleRemote);\n delegate(document, linkClickSelector, \"click\", handleMethod);\n delegate(document, buttonClickSelector, \"click\", preventInsignificantClick);\n delegate(document, buttonClickSelector, \"click\", handleDisabledElement);\n delegate(document, buttonClickSelector, \"click\", handleConfirm);\n delegate(document, buttonClickSelector, \"click\", disableElement);\n delegate(document, buttonClickSelector, \"click\", handleRemote);\n delegate(document, inputChangeSelector, \"change\", handleDisabledElement);\n delegate(document, inputChangeSelector, \"change\", handleConfirm);\n delegate(document, inputChangeSelector, \"change\", handleRemote);\n delegate(document, formSubmitSelector, \"submit\", handleDisabledElement);\n delegate(document, formSubmitSelector, \"submit\", handleConfirm);\n delegate(document, formSubmitSelector, \"submit\", handleRemote);\n delegate(document, formSubmitSelector, \"submit\", (e => setTimeout((() => disableElement(e)), 13)));\n delegate(document, formSubmitSelector, \"ajax:send\", disableElement);\n delegate(document, formSubmitSelector, \"ajax:complete\", enableElement);\n delegate(document, formInputClickSelector, \"click\", preventInsignificantClick);\n delegate(document, formInputClickSelector, \"click\", handleDisabledElement);\n delegate(document, formInputClickSelector, \"click\", handleConfirm);\n delegate(document, formInputClickSelector, \"click\", formSubmitButtonClick);\n document.addEventListener(\"DOMContentLoaded\", refreshCSRFTokens);\n document.addEventListener(\"DOMContentLoaded\", loadCSPNonce);\n return window._rails_loaded = true;\n};\n\nRails.start = start;\n\nif (typeof jQuery !== \"undefined\" && jQuery && jQuery.ajax) {\n if (jQuery.rails) {\n throw new Error(\"If you load both jquery_ujs and rails-ujs, use rails-ujs only.\");\n }\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter((function(options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n }));\n}\n\nexport { Rails as default };\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tab'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n DISABLED : 'disabled',\n FADE : 'fade',\n SHOW : 'show'\n}\n\nconst Selector = {\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 * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tab {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n show() {\n if (this._element.parentNode &&\n this._element.parentNode.nodeType === Node.ELEMENT_NODE &&\n $(this._element).hasClass(ClassName.ACTIVE) ||\n $(this._element).hasClass(ClassName.DISABLED)) {\n return\n }\n\n let target\n let previous\n const listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0]\n const selector = Util.getSelectorFromElement(this._element)\n\n if (listElement) {\n const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE\n previous = $.makeArray($(listElement).find(itemSelector))\n previous = previous[previous.length - 1]\n }\n\n const hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n const showEvent = $.Event(Event.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() ||\n hideEvent.isDefaultPrevented()) {\n return\n }\n\n if (selector) {\n target = document.querySelector(selector)\n }\n\n this._activate(\n this._element,\n listElement\n )\n\n const complete = () => {\n const hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n const shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\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 dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _activate(element, container, callback) {\n const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL')\n ? $(container).find(Selector.ACTIVE_UL)\n : $(container).children(Selector.ACTIVE)\n\n const active = activeElements[0]\n const isTransitioning = callback && (active && $(active).hasClass(ClassName.FADE))\n const complete = () => this._transitionComplete(\n element,\n active,\n callback\n )\n\n if (active && isTransitioning) {\n const transitionDuration = Util.getTransitionDurationFromElement(active)\n\n $(active)\n .removeClass(ClassName.SHOW)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n _transitionComplete(element, active, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n const dropdownChild = $(active.parentNode).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false)\n }\n }\n\n $(element).addClass(ClassName.ACTIVE)\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.FADE)) {\n element.classList.add(ClassName.SHOW)\n }\n\n if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {\n const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]\n\n if (dropdownElement) {\n const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE))\n\n $(dropdownToggleList).addClass(ClassName.ACTIVE)\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Tab._jQueryInterface\n$.fn[NAME].Constructor = Tab\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n}\n\nexport default Tab\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n\nconst TRANSITION_END = 'transitionend'\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nfunction toType(obj) {\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\nfunction getSpecialTransitionEndEvent() {\n return {\n bindType: TRANSITION_END,\n delegateType: TRANSITION_END,\n handle(event) {\n if ($(event.target).is(this)) {\n return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params\n }\n return undefined // eslint-disable-line no-undefined\n }\n }\n}\n\nfunction transitionEndEmulator(duration) {\n let called = false\n\n $(this).one(Util.TRANSITION_END, () => {\n called = true\n })\n\n setTimeout(() => {\n if (!called) {\n Util.triggerTransitionEnd(this)\n }\n }, duration)\n\n return this\n}\n\nfunction setTransitionEndSupport() {\n $.fn.emulateTransitionEnd = transitionEndEmulator\n $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst Util = {\n\n TRANSITION_END: 'bsTransitionEnd',\n\n 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 return prefix\n },\n\n getSelectorFromElement(element) {\n let selector = element.getAttribute('data-target')\n\n if (!selector || selector === '#') {\n const 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\n getTransitionDurationFromElement(element) {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let transitionDuration = $(element).css('transition-duration')\n let transitionDelay = $(element).css('transition-delay')\n\n const floatTransitionDuration = parseFloat(transitionDuration)\n const floatTransitionDelay = parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n },\n\n reflow(element) {\n return element.offsetHeight\n },\n\n triggerTransitionEnd(element) {\n $(element).trigger(TRANSITION_END)\n },\n\n // TODO: Remove in v5\n supportsTransitionEnd() {\n return Boolean(TRANSITION_END)\n },\n\n isElement(obj) {\n return (obj[0] || obj).nodeType\n },\n\n typeCheckConfig(componentName, config, configTypes) {\n for (const property in configTypes) {\n if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && Util.isElement(value)\n ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n }\n }\n },\n\n findShadowRoot(element) {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return Util.findShadowRoot(element.parentNode)\n }\n}\n\nsetTransitionEndSupport()\n\nexport default Util\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'collapse'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Default = {\n toggle : true,\n parent : ''\n}\n\nconst DefaultType = {\n toggle : 'boolean',\n parent : '(string|element)'\n}\n\nconst Event = {\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`\n}\n\nconst ClassName = {\n SHOW : 'show',\n COLLAPSE : 'collapse',\n COLLAPSING : 'collapsing',\n COLLAPSED : 'collapsed'\n}\n\nconst Dimension = {\n WIDTH : 'width',\n HEIGHT : 'height'\n}\n\nconst Selector = {\n ACTIVES : '.show, .collapsing',\n DATA_TOGGLE : '[data-toggle=\"collapse\"]'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse {\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = [].slice.call(document.querySelectorAll(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n\n const toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE))\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i]\n const selector = Util.getSelectorFromElement(elem)\n const filterElement = [].slice.call(document.querySelectorAll(selector))\n .filter((foundElem) => foundElem === element)\n\n if (selector !== null && filterElement.length > 0) {\n this._selector = selector\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 }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle() {\n if ($(this._element).hasClass(ClassName.SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning ||\n $(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES))\n .filter((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.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)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = $.Event(Event.SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n const dimension = this._getDimension()\n\n $(this._element)\n .removeClass(ClassName.COLLAPSE)\n .addClass(ClassName.COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .removeClass(ClassName.COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .addClass(ClassName.SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(Event.SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning ||\n !$(this._element).hasClass(ClassName.SHOW)) {\n return\n }\n\n const startEvent = $.Event(Event.HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(ClassName.COLLAPSING)\n .removeClass(ClassName.COLLAPSE)\n .removeClass(ClassName.SHOW)\n\n const triggerArrayLength = this._triggerArray.length\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i]\n const selector = Util.getSelectorFromElement(trigger)\n\n if (selector !== null) {\n const $elem = $([].slice.call(document.querySelectorAll(selector)))\n if (!$elem.hasClass(ClassName.SHOW)) {\n $(trigger).addClass(ClassName.COLLAPSED)\n .attr('aria-expanded', false)\n }\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(ClassName.COLLAPSING)\n .addClass(ClassName.COLLAPSE)\n .trigger(Event.HIDDEN)\n }\n\n this._element.style[dimension] = ''\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n const hasWidth = $(this._element).hasClass(Dimension.WIDTH)\n return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT\n }\n\n _getParent() {\n let parent\n\n if (Util.isElement(this._config.parent)) {\n parent = this._config.parent\n\n // It's a jQuery object\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 const selector =\n `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n\n const children = [].slice.call(parent.querySelectorAll(selector))\n $(children).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n const isOpen = $(element).hasClass(ClassName.SHOW)\n\n if (triggerArray.length) {\n $(triggerArray)\n .toggleClass(ClassName.COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n\n // Static\n\n static _getTargetFromElement(element) {\n const selector = Util.getSelectorFromElement(element)\n return selector ? document.querySelector(selector) : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $this = $(this)\n let data = $this.data(DATA_KEY)\n const _config = {\n ...Default,\n ...$this.data(),\n ...typeof config === 'object' && config ? config : {}\n }\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, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.currentTarget.tagName === 'A') {\n event.preventDefault()\n }\n\n const $trigger = $(this)\n const selector = Util.getSelectorFromElement(this)\n const selectors = [].slice.call(document.querySelectorAll(selector))\n\n $(selectors).each(function () {\n const $target = $(this)\n const data = $target.data(DATA_KEY)\n const config = data ? 'toggle' : $trigger.data()\n Collapse._jQueryInterface.call($target, config)\n })\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Collapse._jQueryInterface\n$.fn[NAME].Constructor = Collapse\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n}\n\nexport default Collapse\n", "(function(){function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}\ndiff_match_patch.prototype.diff_main=function(a,b,c,d){\"undefined\"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error(\"Null input. (diff_main)\");if(a==b)return a?[[0,a]]:[];\"undefined\"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);var f=this.diff_commonSuffix(a,b),g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0,b.length-f);a=this.diff_compute_(a,\nb,e,d);c&&a.unshift([0,c]);g&&a.push([0,g]);this.diff_cleanupMerge(a);return a};\ndiff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[[1,b]];if(!b)return[[-1,a]];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[[1,e.substring(0,g)],[0,f],[1,e.substring(g+f.length)]],a.length>b.length&&(c[0][0]=c[2][0]=-1),c):1==f.length?[[-1,a],[1,b]]:(e=this.diff_halfMatch_(a,b))?(f=e[0],a=e[1],g=e[2],b=e[3],e=e[4],f=this.diff_main(f,g,c,d),c=this.diff_main(a,b,c,d),f.concat([[0,e]],c)):c&&100c);v++){for(var n=-v+r;n<=v-t;n+=2){var l=g+n,m;m=n==-v||n!=v&&j[l-1]d)t+=2;else if(s>e)r+=2;else if(q&&(l=g+k-n,0<=l&&l=\nu)return this.diff_bisectSplit_(a,b,m,s,c)}}for(n=-v+p;n<=v-w;n+=2){l=g+n;u=n==-v||n!=v&&i[l-1]d)w+=2;else if(m>e)p+=2;else if(!q&&(l=g+k-n,0<=l&&(l=u)))return this.diff_bisectSplit_(a,b,m,s,c)}}return[[-1,a],[1,b]]};\ndiff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)};\ndiff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b=\"\",c=0,f=-1,g=d.length;fd?a=a.substring(c-d):c=a.length?[h,j,n,l,g]:null}if(0>=this.Diff_Timeout)return null;\nvar d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.lengthd[4].length?g:d:d:g;var j;a.length>b.length?(g=h[0],d=h[1],e=h[2],j=h[3]):(e=h[0],j=h[1],g=h[2],d=h[3]);h=h[4];return[g,d,e,j,h]};\ndiff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,j=0,i=0;f=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,[0,c.substring(0,d)]),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,[0,b.substring(0,e)]),a[f-1][0]=1,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=-1,a[f+1][1]=b.substring(e),f++;f++}f++}};\ndiff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_),c=g&&c.match(diff_match_patch.linebreakRegex_),d=h&&d.match(diff_match_patch.linebreakRegex_),i=c&&a.match(diff_match_patch.blanklineEndRegex_),j=d&&b.match(diff_match_patch.blanklineStartRegex_);\nreturn i||j?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c=i&&(i=k,g=d,h=e,j=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c-1,1),c--),a[c][1]=\nh,j?a[c+1][1]=j:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\\s/;diff_match_patch.linebreakRegex_=/[\\r\\n]/;diff_match_patch.blanklineEndRegex_=/\\n\\r?\\n$/;diff_match_patch.blanklineStartRegex_=/^\\r?\\n\\r?\\n/;\ndiff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,j=!1,i=!1;fb)break;e=c;f=d}return a.length!=g&&-1===a[g][0]?f:f+(b-e)};\ndiff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=//g,f=/\\n/g,g=0;g\");switch(h){case 1:b[g]=''+j+\"\";break;case -1:b[g]=''+j+\"\";break;case 0:b[g]=\"\"+j+\"\"}}return b.join(\"\")};\ndiff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;ci)throw Error(\"Invalid number in diff_fromDelta: \"+h);h=a.substring(e,e+=i);\"=\"==f[g].charAt(0)?c[d++]=[0,h]:c[d++]=[-1,h];break;default:if(f[g])throw Error(\"Invalid diff operation in diff_fromDelta: \"+\nf[g]);}}if(e!=a.length)throw Error(\"Delta length (\"+e+\") does not equal source text length (\"+a.length+\").\");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error(\"Null input. (match_main)\");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1};\ndiff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return!f.Match_Distance?g?1:e:e+g/f.Match_Distance}if(b.length>this.Match_MaxBits)throw Error(\"Pattern too long for this browser.\");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));for(var j=1<=i;p--){var w=e[a.charAt(p-1)];k[p]=0===t?(k[p+1]<<1|1)&w:(k[p+1]<<1|1)&w|((r[p+1]|r[p])<<1|1)|r[p+1];if(k[p]&j&&(w=d(t,p-1),w<=g))if(g=w,h=p-1,h>c)i=Math.max(1,2*c-h);else break}if(d(t+1,c)>g)break;r=k}return h};\ndiff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c=2*this.Patch_Margin&&\ne&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}1!==i&&(f+=k.length);-1!==i&&(g+=k.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c};diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;cthis.Match_MaxBits){if(j=this.match_main(b,h.substring(0,this.Match_MaxBits),g),-1!=j&&(i=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==i||j>=i))j=-1}else j=this.match_main(b,h,g);\nif(-1==j)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=j-g,g=-1==i?b.substring(j,j+h.length):b.substring(j,i+this.Match_MaxBits),h==g)b=b.substring(0,j)+this.diff_text2(a[f].diffs)+b.substring(j+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);for(var h=0,k,i=0;ie[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs;0==e.length||0!=e[e.length-1][0]?(e.push([0,\nc]),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c};\ndiff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c2*b?(h.length1+=i.length,e+=i.length,j=!1,h.diffs.push([g,i]),d.diffs.shift()):(i=i.substring(0,b-h.length1-this.Patch_Margin),h.length1+=i.length,e+=i.length,0===g?(h.length2+=i.length,f+=i.length):j=!1,h.diffs.push([g,i]),i==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(i.length))}g=this.diff_text2(h.diffs);g=g.substring(g.length-this.Patch_Margin);i=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);\"\"!==i&&\n(h.length1+=i.length,h.length2+=i.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=i:h.diffs.push([0,i]));j||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c-1;z--){var e=h[z],a=(e.tagName||\"\").toUpperCase();[\"STYLE\",\"LINK\"].indexOf(a)>-1&&(v=e)}return K.head.insertBefore(l,v),c}}function v(){return++Cc}function z(c){for(var l=[],h=(c||[]).length>>>0;h--;)l[h]=c[h];return l}function e(c){return c.classList?z(c.classList):(c.getAttribute(\"class\")||\"\").split(\" \").filter(function(c){return c})}function a(c,h){var v=h.split(\"-\"),z=v[0],e=v.slice(1).join(\"-\");return z!==c||\"\"===e||l(e)?null:e}function m(c){return(\"\"+c).replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/'/g,\"'\").replace(//g,\">\")}function t(c){return Object.keys(c||{}).reduce(function(l,h){return l+(h+'=\"')+m(c[h])+'\" '},\"\").trim()}function s(c){return Object.keys(c||{}).reduce(function(l,h){return l+(h+\": \")+c[h]+\";\"},\"\")}function r(c){return c.size!==Vc.size||c.x!==Vc.x||c.y!==Vc.y||c.rotate!==Vc.rotate||c.flipX||c.flipY}function f(c){var l=c.transform,h=c.containerWidth,v=c.iconWidth;return{outer:{transform:\"translate(\"+h/2+\" 256)\"},inner:{transform:\"translate(\"+32*l.x+\", \"+32*l.y+\") \"+\" \"+(\"scale(\"+l.size/16*(l.flipX?-1:1)+\", \"+l.size/16*(l.flipY?-1:1)+\") \")+\" \"+(\"rotate(\"+l.rotate+\" 0 0)\")},path:{transform:\"translate(\"+v/2*-1+\" -256)\"}}}function M(c){var l=c.transform,h=c.width,v=void 0===h?$:h,z=c.height,e=void 0===z?$:z,a=c.startCentered,m=void 0!==a&&a,t=\"\";return t+=m&&Z?\"translate(\"+(l.x/oc-v/2)+\"em, \"+(l.y/oc-e/2)+\"em) \":m?\"translate(calc(-50% + \"+l.x/oc+\"em), calc(-50% + \"+l.y/oc+\"em)) \":\"translate(\"+l.x/oc+\"em, \"+l.y/oc+\"em) \",t+=\"scale(\"+l.size/oc*(l.flipX?-1:1)+\", \"+l.size/oc*(l.flipY?-1:1)+\") \",t+=\"rotate(\"+l.rotate+\"deg) \"}function i(c){var l,h=c.icons,z=h.main,e=h.mask,a=c.prefix,m=c.iconName,t=c.transform,s=c.symbol,r=c.title,f=c.extra,M=e.found?e:z,i=M.width,n=M.height,H=\"fa-w-\"+Math.ceil(i/n*16),o=[Hc.replacementClass,m?Hc.familyPrefix+\"-\"+m:\"\",H].concat(f.classes).join(\" \"),V={children:[],attributes:fc({},f.attributes,(l={},rc(l,cc,\"\"),rc(l,\"data-prefix\",a),rc(l,\"data-icon\",m),rc(l,\"class\",o),rc(l,\"role\",\"img\"),rc(l,\"xmlns\",\"http://www.w3.org/2000/svg\"),rc(l,\"viewBox\",\"0 0 \"+i+\" \"+n),l))};r&&V.children.push({tag:\"title\",attributes:{id:V.attributes[\"aria-labelledby\"]||\"title-\"+v()},children:[r]});var C=fc({},V,{prefix:a,iconName:m,main:z,mask:e,transform:t,symbol:s,styles:f.styles}),L=e.found&&z.found?uc(C):dc(C),u=L.children,d=L.attributes;return C.children=u,C.attributes=d,s?gc(C):pc(C)}function n(c){var l,h=c.content,v=c.width,z=c.height,e=c.transform,a=c.title,m=c.extra,t=fc({},m.attributes,a?{title:a}:{},(l={},rc(l,cc,\"\"),rc(l,\"class\",m.classes.join(\" \")),l)),f=fc({},m.styles);r(e)&&(f.transform=M({transform:e,startCentered:!0,width:v,height:z}),f[\"-webkit-transform\"]=f.transform);var i=s(f);i.length>0&&(t.style=i);var n=[];return n.push({tag:\"span\",attributes:t,children:[h]}),a&&n.push({tag:\"span\",attributes:{class:\"sr-only\"},children:[a]}),n}function H(c,l){return Nc[c][l]}function o(c,l){return qc[c][l]}function V(c){return Tc[c]||{prefix:null,iconName:null}}function C(c){return c.reduce(function(c,l){var h=a(Hc.familyPrefix,l);if(Fc[l])c.prefix=l;else if(h){var v=\"fa\"===c.prefix?V(h):{};c.iconName=v.iconName||h,c.prefix=v.prefix||c.prefix}else l!==Hc.replacementClass&&0!==l.indexOf(\"fa-w-\")&&c.rest.push(l);return c},Wc())}function L(c,l,h){if(c&&c[l]&&c[l][h])return{prefix:l,iconName:h,icon:c[l][h]}}function u(c){var l=c.tag,h=c.attributes,v=void 0===h?{}:h,z=c.children,e=void 0===z?[]:z;return\"string\"==typeof c?m(c):\"<\"+l+\" \"+t(v)+\">\"+e.map(u).join(\"\")+\"\"}function d(c){var l=c.getAttribute?c.getAttribute(\"class\"):null;return!!l&&(!!~l.toString().indexOf(Hc.replacementClass)||~l.toString().indexOf(\"fa-layers-text\"))}function p(){return!0===Hc.autoReplaceSvg?Ic.replace:Ic[Hc.autoReplaceSvg]||Ic.replace}function g(c,l){var h=\"function\"==typeof l?l:Pc;0===c.length?h():(U.requestAnimationFrame||function(c){return c()})(function(){var l=p(),v=kc.begin(\"mutate\");c.map(l),v(),h()})}function b(c){Rc=!0,c(),Rc=!1}function w(c){if(G){var l=c.treeCallback,h=c.nodeCallback,v=c.pseudoElementsCallback,a=new G(function(c){Rc||z(c).forEach(function(c){if(\"childList\"===c.type&&c.addedNodes.length>0&&!d(c.addedNodes[0])&&(Hc.searchPseudoElements&&v(c.target),l(c.target)),\"attributes\"===c.type&&\"class\"===c.attributeName&&c.target.parentNode&&Hc.searchPseudoElements&&v(c.target.parentNode),\"attributes\"===c.type&&d(c.target)&&~ac.indexOf(c.attributeName))if(\"class\"===c.attributeName){var z=C(e(c.target)),a=z.prefix,m=z.iconName;a&&c.target.setAttribute(\"data-prefix\",a),m&&c.target.setAttribute(\"data-icon\",m)}else h(c.target)})});K.getElementsByTagName&&a.observe(K.getElementsByTagName(\"body\")[0],{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function y(c){for(var l=\"\",h=0;h1&&void 0!==arguments[1]?arguments[1]:null,h=K.documentElement.classList,v=function(c){return h.add(hc+\"-\"+c)},e=function(c){return h.remove(hc+\"-\"+c)},a=Object.keys(ll),m=[\".\"+hl+\":not([\"+cc+\"])\"].concat(a.map(function(c){return\".\"+c+\":not([\"+cc+\"])\"})).join(\", \");if(0!==m.length){var t=z(c.querySelectorAll(m));if(t.length>0){v(\"pending\"),e(\"complete\");var s=kc.begin(\"onTree\"),r=t.reduce(function(c,l){try{var h=O(l);h&&c.push(h)}catch(c){vc||c instanceof _&&console.error(c)}return c},[]);s(),g(r,function(){v(\"active\"),v(\"complete\"),e(\"pending\"),\"function\"==typeof l&&l()})}}}function q(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,h=O(c);h&&g([h],l)}function T(c){return{found:!0,width:c[0],height:c[1],icon:{tag:\"path\",attributes:{fill:\"currentColor\",d:c.slice(4)[0]}}}}function j(){Hc.autoAddCss&&(sl||h(tl()),sl=!0)}function F(c,l){return Object.defineProperty(c,\"abstract\",{get:l}),Object.defineProperty(c,\"html\",{get:function(){return c.abstract.map(function(c){return u(c)})}}),Object.defineProperty(c,\"node\",{get:function(){if(K.createElement){var l=K.createElement(\"div\");return l.innerHTML=c.html,l.children}}}),c}function W(c){var l=c.prefix,h=void 0===l?\"fa\":l,v=c.iconName;if(v)return L(rl.definitions,h,v)||L(wc.styles,h,v)}var P=function(){},I={},R={},B=null,X={mark:P,measure:P};try{\"undefined\"!=typeof window&&(I=window),\"undefined\"!=typeof document&&(R=document),\"undefined\"!=typeof MutationObserver&&(B=MutationObserver),\"undefined\"!=typeof performance&&(X=performance)}catch(c){}var Y=(I.navigator||{}).userAgent,D=void 0===Y?\"\":Y,U=I,K=R,G=B,J=X,Q=!!U.document,Z=~D.indexOf(\"MSIE\")||~D.indexOf(\"Trident/\"),$=16,cc=\"data-fa-processed\",lc=\"data-fa-pseudo-element\",hc=\"fontawesome-i2svg\",vc=function(){try{return!0}catch(c){return!1}}(),zc=[1,2,3,4,5,6,7,8,9,10],ec=zc.concat([11,12,13,14,15,16,17,18,19,20]),ac=[\"class\",\"data-prefix\",\"data-icon\",\"data-fa-transform\",\"data-fa-mask\"],mc=[\"xs\",\"sm\",\"lg\",\"fw\",\"ul\",\"li\",\"border\",\"pull-left\",\"pull-right\",\"spin\",\"pulse\",\"rotate-90\",\"rotate-180\",\"rotate-270\",\"flip-horizontal\",\"flip-vertical\",\"stack\",\"stack-1x\",\"stack-2x\",\"inverse\",\"layers\",\"layers-text\",\"layers-counter\"].concat(zc.map(function(c){return c+\"x\"})).concat(ec.map(function(c){return\"w-\"+c})),tc=function(c,l){if(!(c instanceof l))throw new TypeError(\"Cannot call a class as a function\")},sc=function(){function c(c,l){for(var h=0;h=0||Object.prototype.hasOwnProperty.call(c,v)&&(h[v]=c[v]);return h},ic=function(c){if(Array.isArray(c)){for(var l=0,h=Array(c.length);l0&&(h.style=e),r(z)){var a=f({transform:z,containerWidth:v.width,iconWidth:v.width});l.push({tag:\"g\",attributes:fc({},a.outer),children:[{tag:\"g\",attributes:fc({},a.inner),children:[{tag:v.icon.tag,children:v.icon.children,attributes:fc({},v.icon.attributes,a.path)}]}]})}else l.push(v.icon);return{children:l,attributes:h}},pc=function(c){var l=c.children,h=c.main,v=c.mask,z=c.attributes,e=c.styles,a=c.transform;if(r(a)&&h.found&&!v.found){var m={x:h.width/h.height/2,y:.5};z.style=s(fc({},e,{\"transform-origin\":m.x+a.x/16+\"em \"+(m.y+a.y/16)+\"em\"}))}return[{tag:\"svg\",attributes:z,children:l}]},gc=function(c){var l=c.prefix,h=c.iconName,v=c.children,z=c.attributes,e=c.symbol,a=!0===e?l+\"-\"+Hc.familyPrefix+\"-\"+h:e;return[{tag:\"svg\",attributes:{style:\"display: none;\"},children:[{tag:\"symbol\",attributes:fc({},z,{id:a}),children:v}]}]},bc=U||{};bc.___FONT_AWESOME___||(bc.___FONT_AWESOME___={}),bc.___FONT_AWESOME___.styles||(bc.___FONT_AWESOME___.styles={}),bc.___FONT_AWESOME___.hooks||(bc.___FONT_AWESOME___.hooks={}),bc.___FONT_AWESOME___.shims||(bc.___FONT_AWESOME___.shims=[]);var wc=bc.___FONT_AWESOME___,yc=function(){},Sc=Hc.measurePerformance&&J&&J.mark&&J.measure?J:{mark:yc,measure:yc},_c=function(c){Sc.mark('FA \"5.0.1\" '+c+\" ends\"),Sc.measure('FA \"5.0.1\" '+c,'FA \"5.0.1\" '+c+\" begins\",'FA \"5.0.1\" '+c+\" ends\")},kc={begin:function(c){return Sc.mark('FA \"5.0.1\" '+c+\" begins\"),function(){return _c(c)}},end:_c},Ac=function(c,l){return function(h,v,z,e){return c.call(l,h,v,z,e)}},xc=function(c,l,h,v){var z,e,a,m=Object.keys(c),t=m.length,s=void 0!==v?Ac(l,v):l;for(void 0===h?(z=1,a=c[m[0]]):(z=0,a=h);z0&&(c[v]=z.join(\":\").trim()),c},{})),h},Xc=function(c){var l=c.getAttribute(\"data-prefix\"),h=c.getAttribute(\"data-icon\"),v=void 0!==c.innerText?c.innerText.trim():\"\",z=C(e(c));return l&&h&&(z.prefix=l,z.iconName=h),z.prefix&&v.length>1?z.iconName=o(z.prefix,c.innerText):z.prefix&&1===v.length&&(z.iconName=H(z.prefix,y(c.innerText))),z},Yc=function(c){var l={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return c?c.toLowerCase().split(\" \").reduce(function(c,l){var h=l.toLowerCase().split(\"-\"),v=h[0],z=h.slice(1).join(\"-\");if(v&&\"h\"===z)return c.flipX=!0,c;if(v&&\"v\"===z)return c.flipY=!0,c;if(z=parseFloat(z),isNaN(z))return c;switch(v){case\"grow\":c.size=c.size+z;break;case\"shrink\":c.size=c.size-z;break;case\"left\":c.x=c.x-z;break;case\"right\":c.x=c.x+z;break;case\"up\":c.y=c.y-z;break;case\"down\":c.y=c.y+z;break;case\"rotate\":c.rotate=c.rotate+z}return c},l):l},Dc=function(c){return Yc(c.getAttribute(\"data-fa-transform\"))},Uc=function(c){var l=c.getAttribute(\"data-fa-symbol\");return null!==l&&(\"\"===l||l)},Kc=function(c){var l=z(c.attributes).reduce(function(c,l){return\"class\"!==c.name&&\"style\"!==c.name&&(c[l.name]=l.value),c},{}),h=c.getAttribute(\"title\");return Hc.autoA11y&&(h?l[\"aria-labelledby\"]=Hc.replacementClass+\"-title-\"+v():l[\"aria-hidden\"]=\"true\"),l},Gc=function(c){var l=c.getAttribute(\"data-fa-mask\");return l?C(l.split(\" \").map(function(c){return c.trim()})):Wc()};_.prototype=Object.create(Error.prototype),_.prototype.constructor=_;var Jc={fill:\"currentColor\"},Qc={attributeType:\"XML\",repeatCount:\"indefinite\",dur:\"2s\"},Zc={tag:\"path\",attributes:fc({},Jc,{d:\"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z\"})},$c=fc({},Qc,{attributeName:\"opacity\"}),cl={tag:\"g\",children:[Zc,{tag:\"circle\",attributes:fc({},Jc,{cx:\"256\",cy:\"364\",r:\"28\"}),children:[{tag:\"animate\",attributes:fc({},Qc,{attributeName:\"r\",values:\"28;14;28;28;14;28;\"})},{tag:\"animate\",attributes:fc({},$c,{values:\"1;0;1;1;0;1;\"})}]},{tag:\"path\",attributes:fc({},Jc,{opacity:\"1\",d:\"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z\"}),children:[{tag:\"animate\",attributes:fc({},$c,{values:\"1;0;0;0;0;1;\"})}]},{tag:\"path\",attributes:fc({},Jc,{opacity:\"0\",d:\"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z\"}),children:[{tag:\"animate\",attributes:fc({},$c,{values:\"0;0;1;1;0;0;\"})}]}]},ll=wc.styles,hl=\"fa-layers-text\",vl=/Font Awesome 5 (Solid|Regular|Light|Brands)/,zl={Solid:\"fas\",Regular:\"far\",Light:\"fal\",Brands:\"fab\"},el=[],al=(K.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(K.readyState);al||K.addEventListener(\"DOMContentLoaded\",function c(){K.removeEventListener(\"DOMContentLoaded\",c),al=1,el.map(function(c){return c()})});var ml=function(c){K&&(al?setTimeout(c,0):el.push(c))},tl=function(){var c=\"svg-inline--fa\",l=Hc.familyPrefix,h=Hc.replacementClass,v=\"svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-inline--fa.fa-w-19{width:1.1875em}.svg-inline--fa.fa-w-20{width:1.25em}.svg-inline--fa.fa-pull-left{margin-right:.3em;width:auto}.svg-inline--fa.fa-pull-right{margin-left:.3em;width:auto}.svg-inline--fa.fa-border{height:1.5em}.svg-inline--fa.fa-li{width:2em}.svg-inline--fa.fa-fw{width:1.25em}.fa-layers svg.svg-inline--fa{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.fa-layers{display:inline-block;height:1em;position:relative;text-align:center;vertical-align:-12.5%;width:1em}.fa-layers svg.svg-inline--fa{-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter,.fa-layers-text{display:inline-block;position:absolute;text-align:center}.fa-layers-text{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform-origin:center center;transform-origin:center center}.fa-layers-counter{background-color:#ff253a;border-radius:1em;color:#fff;height:1.5em;line-height:1;max-width:5em;min-width:1.5em;overflow:hidden;padding:.25em;right:0;text-overflow:ellipsis;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-bottom-right{bottom:0;right:0;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom right;transform-origin:bottom right}.fa-layers-bottom-left{bottom:0;left:0;right:auto;top:auto;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:bottom left;transform-origin:bottom left}.fa-layers-top-right{right:0;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top right;transform-origin:top right}.fa-layers-top-left{left:0;right:auto;top:0;-webkit-transform:scale(.25);transform:scale(.25);-webkit-transform-origin:top left;transform-origin:top left}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid .08em #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{-webkit-transform:scale(1,-1);transform:scale(1,-1)}.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1,-1);transform:scale(-1,-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;position:relative;width:2em}.fa-stack-1x,.fa-stack-2x{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0}.svg-inline--fa.fa-stack-1x{height:1em;width:1em}.svg-inline--fa.fa-stack-2x{height:2em;width:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}\";if(\"fa\"!==l||h!==c){var z=new RegExp(\"\\\\.fa\\\\-\",\"g\"),e=new RegExp(\"\\\\.\"+c,\"g\");v=v.replace(z,\".\"+l+\"-\").replace(e,\".\"+h)}return v},sl=!1,rl=new(function(){function c(){tc(this,c),this.definitions={}}return sc(c,[{key:\"add\",value:function(){for(var c=this,l=arguments.length,h=Array(l),v=0;v0&&void 0!==arguments[0]?arguments[0]:{};j();var l=c.node,h=void 0===l?K:l,v=c.callback,z=void 0===v?function(){}:v;Hc.searchPseudoElements&&E(h),N(h,z)},css:tl,insertCss:function(){h(tl())}},library:rl,parse:{transform:function(c){return Yc(c)}},findIconDefinition:W,icon:function(c){return function(l){var h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},v=(l||{}).icon?l:W(l||{}),z=h.mask;return z&&(z=(z||{}).icon?z:W(z||{})),c(v,fc({},h,{mask:z}))}}(function(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=l.transform,z=void 0===h?Vc:h,e=l.symbol,a=void 0!==e&&e,m=l.mask,t=void 0===m?null:m,s=l.title,r=void 0===s?null:s,f=l.classes,M=void 0===f?[]:f,n=l.attributes,H=void 0===n?{}:n,o=l.styles,V=void 0===o?{}:o;if(c){var C=c.prefix,L=c.iconName,u=c.icon;return F(fc({type:\"icon\"},c),function(){return j(),Hc.autoA11y&&(r?H[\"aria-labelledby\"]=Hc.replacementClass+\"-title-\"+v():H[\"aria-hidden\"]=\"true\"),i({icons:{main:T(u),mask:t?T(t.icon):{found:!1,width:null,height:null,icon:{}}},prefix:C,iconName:L,transform:fc({},Vc,z),symbol:a,title:r,extra:{attributes:H,styles:V,classes:M}})})}}),text:function(c){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=l.transform,v=void 0===h?Vc:h,z=l.title,e=void 0===z?null:z,a=l.classes,m=void 0===a?[]:a,t=l.attributes,s=void 0===t?{}:t,r=l.styles,f=void 0===r?{}:r;return F({type:\"text\",content:c},function(){return j(),n({content:c,transform:fc({},Vc,v),title:e,extra:{attributes:s,styles:f,classes:[Hc.familyPrefix+\"-layers-text\"].concat(ic(m))}})})},layer:function(c){return F({type:\"layer\"},function(){j();var l=[];return c(function(c){l=Array.isArray(c)?c.map(function(c){l=l.concat(c.abstract)}):l.concat(c.abstract)}),[{tag:\"span\",attributes:{class:Hc.familyPrefix+\"-layers\"},children:l}]})}};Object.defineProperty(fl,\"config\",{get:function(){Hc.autoReplaceSvg,Hc.observeMutations,Hc.showMissingIcons;return Mc(Hc,[\"autoReplaceSvg\",\"observeMutations\",\"showMissingIcons\"])},set:function(l){c(l)}}),function(c){try{c()}catch(c){}}(function(){var c=function(){Hc.autoReplaceSvg&&fl.dom.i2svg({node:K})};Q&&(U.FontAwesome||(U.FontAwesome=fl),ml(function(){Object.keys(wc.styles).length>0&&c(),Hc.observeMutations&&\"function\"==typeof MutationObserver&&w({treeCallback:N,nodeCallback:q,pseudoElementsCallback:E})})),wc.hooks=fc({},wc.hooks,{addPack:function(l,h){wc.styles[l]=fc({},wc.styles[l]||{},h),jc(),c()},addShims:function(l){var h;(h=wc.shims).push.apply(h,ic(l)),jc(),c()}})})}();", "(() => {\n if (!window.CMS) window.CMS = {};\n const CMS = window.CMS;\n\n // TODO(glebm): Use the battle-tested universal onPageLoad code and enable Turbolinks+async in the demo app.\n // See: https://gist.github.com/glebm/2496daf445877055447a6fac46509d9a\n const isTurbolinks = \"Turbolinks\" in window && window.Turbolinks.supported;\n if (isTurbolinks) {\n document.addEventListener(\"turbolinks:load\", () => {\n window.CMS.init();\n });\n document.addEventListener(\"turbolinks:before-cache\", () => {\n window.CMS.dispose();\n });\n } else {\n document.addEventListener(\"DOMContentLoaded\", () => {\n window.CMS.init();\n });\n }\n\n CMS.init = () => {\n CMS.current_path = window.location.pathname;\n CMS.slugify();\n CMS.codemirror.init();\n CMS.wysiwyg.init();\n CMS.sortableList.init();\n CMS.timepicker.init();\n CMS.pageFragments();\n CMS.categories();\n CMS.files.init();\n CMS.fileLinks();\n CMS.fileUpload.init();\n CMS.diff();\n };\n\n CMS.dispose = () => {\n CMS.codemirror.dispose();\n CMS.wysiwyg.dispose();\n CMS.files.dispose();\n CMS.fileUpload.dispose();\n CMS.sortableList.dispose();\n CMS.timepicker.dispose();\n };\n\n CMS.getLocale = () =>\n document.querySelector('meta[name=\"cms-locale\"]').content;\n})();\n", "(() => {\n window.CMS.categories = (root = document) => {\n const widget = root.querySelector('.categories-widget');\n if (widget === null) return;\n const readSection = widget.querySelector('.read');\n const editSection = widget.querySelector('.editable');\n widget.querySelector('.read button.toggle-cat-edit').addEventListener('click', () => {\n readSection.style.display = 'none';\n editSection.style.display = 'block';\n });\n widget.querySelector('.editable button.toggle-cat-edit').addEventListener('click', () => {\n editSection.style.display = 'none';\n readSection.style.display = 'block';\n });\n };\n})();\n\n", "import jQuery from \"jquery\";\nimport CodeMirror from \"codemirror\";\nimport \"codemirror/mode/markdown/markdown\";\nimport \"codemirror/mode/htmlmixed/htmlmixed\";\n\n(() => {\n const codeMirrorInstances = [];\n window.CMS.codemirror = {\n init(root = document) {\n for (const textarea of root.querySelectorAll(\n \"textarea[data-cms-cm-mode]\"\n )) {\n const codemirror = CodeMirror.fromTextArea(textarea, {\n mode: textarea.dataset.cmsCmMode,\n tabSize: 2,\n lineWrapping: true,\n autoCloseTags: true,\n lineNumbers: true,\n viewportMargin: Infinity,\n });\n codeMirrorInstances.push(codemirror);\n }\n\n const tabsRoot =\n root.id === \"form-fragments\"\n ? root\n : root.querySelector(\"#form-fragments\");\n jQuery(tabsRoot)\n .find('a[data-toggle=\"tab\"]')\n .on(\"shown.bs.tab\", () => {\n for (const codemirror of codeMirrorInstances) {\n codemirror.refresh();\n }\n });\n },\n dispose() {\n for (const codemirror of codeMirrorInstances) {\n codemirror.toTextArea();\n }\n codeMirrorInstances.length = 0;\n },\n };\n})();\n", "import jQuery from \"jquery\";\n\n(() => {\n window.CMS.diff = () => {\n jQuery(\".revision\").prettyTextDiff({\n cleanup: true,\n originalContainer: \".original\",\n changedContainer: \".current\",\n diffContainer: \".diff .content\",\n });\n };\n})();\n", "import jQuery from \"jquery\";\nimport Popover from \"bootstrap/js/src/popover\";\n\n(() => {\n const isFirefox = /\\bFirefox\\//.test(navigator.userAgent);\n\n class FileLink {\n constructor(link) {\n this.link = link;\n this.isImage = !!link.dataset.cmsFileThumbUrl;\n\n link.addEventListener(\"dragstart\", (evt) => {\n evt.dataTransfer.setData(\n \"text/plain\",\n this.link.dataset.cmsFileLinkTag\n );\n });\n\n if (this.isImage) {\n new Popover(link, {\n container: link.parentElement,\n trigger: \"hover\",\n placement: \"top\",\n content: this.buildFileThumbnail(),\n html: true,\n });\n\n link.addEventListener(\"dragstart\", (evt) => {\n evt.dataTransfer.setDragImage(this.buildFileThumbnail(), 4, 2);\n this.getPopover().hide();\n });\n\n this.workAroundFirefoxPopoverGlitch();\n }\n }\n\n buildFileThumbnail() {\n const img = new Image();\n img.src = this.link.dataset.cmsFileThumbUrl;\n return img;\n }\n\n // To work around a Firefox bug causing the popover to re-appear after the drop:\n // https://github.com/comfy/comfortable-mexican-sofa/pull/799#issuecomment-369124161\n //\n // Possibly related to:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n workAroundFirefoxPopoverGlitch() {\n if (!isFirefox) return;\n this.link.addEventListener(\"dragstart\", () => {\n this.getPopover().disable();\n });\n this.link.addEventListener(\"dragend\", () => {\n setTimeout(() => {\n const popover = this.getPopover();\n popover.enable();\n popover.hide();\n }, 300);\n });\n }\n\n // We can't keep a reference to the Popover object, because Bootstrap re-creates it internally.\n getPopover() {\n return jQuery(this.link).data(Popover.DATA_KEY);\n }\n }\n\n window.CMS.fileLinks = (root = document) => {\n for (const link of root.querySelectorAll(\"[data-cms-file-link-tag]\")) {\n new FileLink(link);\n }\n };\n})();\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'popover'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n ...Tooltip.Default,\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '
' +\n '
' +\n '

' +\n '
'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content : '(string|element|function)'\n}\n\nconst ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n}\n\nconst Selector = {\n TITLE : '.popover-header',\n CONTENT : '.popover-body'\n}\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const $tip = $(this.getTipElement())\n\n // We use append for html objects to maintain js events\n this.setElementContent($tip.find(Selector.TITLE), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this.element)\n }\n this.setElementContent($tip.find(Selector.CONTENT), content)\n\n $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n // Private\n\n _getContent() {\n return this.element.getAttribute('data-content') ||\n this.config.content\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _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, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Popover._jQueryInterface\n$.fn[NAME].Constructor = Popover\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n}\n\nexport default Popover\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): tools/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = [\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n]\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\nexport const 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/**\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 */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi\n\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 */\nconst 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\nfunction allowedAttribute(attr, allowedAttributeList) {\n const 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 const regExp = allowedAttributeList.filter((attrRegex) => attrRegex instanceof RegExp)\n\n // Check if a regular expression validates the attribute.\n for (let 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\nexport 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 const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const whitelistKeys = Object.keys(whiteList)\n const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i]\n const elName = el.nodeName.toLowerCase()\n\n if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {\n el.parentNode.removeChild(el)\n\n continue\n }\n\n const attributeList = [].slice.call(el.attributes)\n const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n attributeList.forEach((attr) => {\n if (!allowedAttribute(attr, whitelistedAttributes)) {\n el.removeAttribute(attr.nodeName)\n }\n })\n }\n\n return createdDocument.body.innerHTML\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.3.1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n DefaultWhitelist,\n sanitizeHtml\n} from './tools/sanitizer'\nimport $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tooltip'\nconst VERSION = '4.3.1'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\nconst DefaultType = {\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}\n\nconst AttachmentMap = {\n AUTO : 'auto',\n TOP : 'top',\n RIGHT : 'right',\n BOTTOM : 'bottom',\n LEFT : 'left'\n}\n\nconst Default = {\n animation : true,\n template : '
' +\n '
' +\n '
',\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}\n\nconst HoverState = {\n SHOW : 'show',\n OUT : 'out'\n}\n\nconst Event = {\n HIDE : `hide${EVENT_KEY}`,\n HIDDEN : `hidden${EVENT_KEY}`,\n SHOW : `show${EVENT_KEY}`,\n SHOWN : `shown${EVENT_KEY}`,\n INSERTED : `inserted${EVENT_KEY}`,\n CLICK : `click${EVENT_KEY}`,\n FOCUSIN : `focusin${EVENT_KEY}`,\n FOCUSOUT : `focusout${EVENT_KEY}`,\n MOUSEENTER : `mouseenter${EVENT_KEY}`,\n MOUSELEAVE : `mouseleave${EVENT_KEY}`\n}\n\nconst ClassName = {\n FADE : 'fade',\n SHOW : 'show'\n}\n\nconst Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner',\n ARROW : '.arrow'\n}\n\nconst Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n}\n\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip {\n constructor(element, config) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper.js (https://popper.js.org/)')\n }\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const dataKey = this.constructor.DATA_KEY\n let context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\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.SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n $.removeData(this.element, this.constructor.DATA_KEY)\n\n $(this.element).off(this.constructor.EVENT_KEY)\n $(this.element).closest('.modal').off('hide.bs.modal')\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 if (this._popper !== null) {\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 show() {\n if ($(this.element).css('display') === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n const showEvent = $.Event(this.constructor.Event.SHOW)\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n const shadowRoot = Util.findShadowRoot(this.element)\n const isInTheDom = $.contains(\n shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n const placement = typeof this.config.placement === 'function'\n ? this.config.placement.call(this, tip, this.element)\n : this.config.placement\n\n const attachment = this._getAttachment(placement)\n this.addAttachmentClass(attachment)\n\n const container = this._getContainer()\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\n this._popper = new Popper(this.element, tip, {\n placement: attachment,\n modifiers: {\n offset: this._getOffset(),\n flip: {\n behavior: this.config.fallbackPlacement\n },\n arrow: {\n element: Selector.ARROW\n },\n preventOverflow: {\n boundariesElement: this.config.boundary\n }\n },\n onCreate: (data) => {\n if (data.originalPlacement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n },\n onUpdate: (data) => this._handlePopperPlacementChange(data)\n })\n\n $(tip).addClass(ClassName.SHOW)\n\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 if ('ontouchstart' in document.documentElement) {\n $(document.body).children().on('mouseover', null, $.noop)\n }\n\n const complete = () => {\n if (this.config.animation) {\n this._fixTransition()\n }\n const prevHoverState = this._hoverState\n this._hoverState = null\n\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.FADE)) {\n const transitionDuration = Util.getTransitionDurationFromElement(this.tip)\n\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n }\n\n hide(callback) {\n const tip = this.getTipElement()\n const hideEvent = $.Event(this.constructor.Event.HIDE)\n const complete = () => {\n if (this._hoverState !== HoverState.SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n if (this._popper !== null) {\n this._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.SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\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.FADE)) {\n const transitionDuration = Util.getTransitionDurationFromElement(tip)\n\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle())\n $(tip).removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)\n }\n\n 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 getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function'\n ? this.config.title.call(this.element)\n : this.config.title\n }\n\n return title\n }\n\n // Private\n\n _getOffset() {\n const offset = {}\n\n if (typeof this.config.offset === 'function') {\n offset.fn = (data) => {\n data.offsets = {\n ...data.offsets,\n ...this.config.offset(data.offsets, this.element) || {}\n }\n\n return data\n }\n } else {\n offset.offset = this.config.offset\n }\n\n return offset\n }\n\n _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 _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n (event) => this.toggle(event)\n )\n } else if (trigger !== Trigger.MANUAL) {\n const eventIn = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSEENTER\n : this.constructor.Event.FOCUSIN\n const eventOut = trigger === Trigger.HOVER\n ? this.constructor.Event.MOUSELEAVE\n : this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n (event) => this._enter(event)\n )\n .on(\n eventOut,\n this.config.selector,\n (event) => this._leave(event)\n )\n }\n })\n\n $(this.element).closest('.modal').on(\n 'hide.bs.modal',\n () => {\n if (this.element) {\n this.hide()\n }\n }\n )\n\n if (this.config.selector) {\n this.config = {\n ...this.config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const titleType = typeof this.element.getAttribute('data-original-title')\n\n if (this.element.getAttribute('title') || titleType !== 'string') {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {\n context._hoverState = HoverState.SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\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(() => {\n if (context._hoverState === HoverState.SHOW) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\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(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n const dataAttributes = $(this.element).data()\n\n Object.keys(dataAttributes)\n .forEach((dataAttr) => {\n if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {\n delete dataAttributes[dataAttr]\n }\n })\n\n config = {\n ...this.constructor.Default,\n ...dataAttributes,\n ...typeof config === 'object' && config ? config : {}\n }\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(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this.config) {\n for (const 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 _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n const popperInstance = popperData.instance\n this.tip = popperInstance.popper\n this._cleanTipClass()\n this.addAttachmentClass(this._getAttachment(popperData.placement))\n }\n\n _fixTransition() {\n const tip = this.getTipElement()\n const initConfigAnimation = this.config.animation\n\n if (tip.getAttribute('x-placement') !== null) {\n return\n }\n\n $(tip).removeClass(ClassName.FADE)\n this.config.animation = false\n this.hide()\n this.show()\n this.config.animation = initConfigAnimation\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _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, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Tooltip._jQueryInterface\n$.fn[NAME].Constructor = Tooltip\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n}\n\nexport default Tooltip\n", "export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n", "import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (let 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\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\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*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\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 */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n 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 */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\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 */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n", "import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\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 */\nexport default function 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 const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\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 */\nexport default function getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n", "import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst 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 */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n", "import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\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 */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let 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 const 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 (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n", "import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n 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 */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n", "import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\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 */\nexport default function 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 const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\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 const 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 * 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 */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n", "import getScroll from './getScroll';\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 */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const 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 * 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\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`])\n );\n}\n", "import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const 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", "/**\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 */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n", "import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\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 */\nexport default function getBoundingClientRect(element) {\n let 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 const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const 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 const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.width;\n const height =\n sizes.height || element.clientHeight || result.height;\n\n let horizScrollbar = element.offsetWidth - width;\n let 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 const 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", "import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const 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 let 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 const marginTop = parseFloat(styles.marginTop);\n const 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 (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n", "import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n", "import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\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 */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n", "import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\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\nexport default function 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 let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n", "import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\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 */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\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 const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\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 const 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", "import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\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 */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const 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 const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n", "import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\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 */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\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 */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\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 */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n", "import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\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 */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const 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 const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\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 */\nexport default function 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", "import find from './find';\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 */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n", "import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\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 */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const 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", "import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.
\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let 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(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\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(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\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(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : '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 * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\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 */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n", "import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function 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 * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n", "import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\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 */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\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 const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n", "import setupEventListeners from '../utils/setupEventListeners';\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 */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n", "import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function 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(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", "import removeEventListeners from '../utils/removeEventListeners';\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 */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\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 */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n", "import isNumeric from './isNumeric';\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 */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\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 */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n", "import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\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 */\nexport default function 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 */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const 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 const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\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 * @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 */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n", "import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst 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 */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const 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 const 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 let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is 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 const invertTop = sideA === 'bottom' ? -1 : 1;\n const 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 const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n", "import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.
\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 */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n", "import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\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 */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let 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(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const 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] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const 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 const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n let sideValue =\n 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 = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\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 */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n", "/**\n * List of accepted placements to use as values of the `placement` option.
\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.
\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 */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n", "import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst 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 */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n", "import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst 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 */\nexport default function 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 const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let 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((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 const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const 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 = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\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 */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n 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", "import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\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 */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const 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 let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const 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 let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\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 */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const 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 const 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 const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\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 const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\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 const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((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(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((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 */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\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", "import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\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 */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n 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 const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\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 const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\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 */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n", "import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\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 */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\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", "import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\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 */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n", "import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.
\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.
\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 */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.
\n * It will read the variation of the `placement` property.
\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.
\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.
\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.
\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.
\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".
\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", "import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.
\n * These can be overridden using the `options` argument of Popper.js.
\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 */\nexport default {\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.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n 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.
\n * By default, it is set to no-op.
\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n 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,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n", "// Utils\nimport debounce from './utils/debounce';\nimport isFunction from './utils/isFunction';\n\n// Methods\nimport update from './methods/update';\nimport destroy from './methods/destroy';\nimport enableEventListeners from './methods/enableEventListeners';\nimport disableEventListeners from './methods/disableEventListeners';\nimport Defaults from './methods/defaults';\nimport placements from './methods/placements';\n\nexport default class Popper {\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 constructor(reference, popper, options = {}) {\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 = { ...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({\n ...Popper.Defaults.modifiers,\n ...options.modifiers,\n }).forEach(name => {\n this.options.modifiers[name] = {\n // If it's a built-in modifier, use it as base\n ...(Popper.Defaults.modifiers[name] || {}),\n // If there are custom options, override and merge with default ones\n ...(options.modifiers ? options.modifiers[name] : {}),\n };\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers)\n .map(name => ({\n name,\n ...this.options.modifiers[name],\n }))\n // sort the modifiers by order\n .sort((a, b) => a.order - b.order);\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(modifierOptions => {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(\n this.reference,\n this.popper,\n this.options,\n modifierOptions,\n this.state\n );\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n const 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 update() {\n return update.call(this);\n }\n destroy() {\n return destroy.call(this);\n }\n enableEventListeners() {\n return enableEventListeners.call(this);\n }\n disableEventListeners() {\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 scheduleUpdate = () => requestAnimationFrame(this.update);\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 static Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\n\n static placements = placements;\n\n static Defaults = Defaults;\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.
\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", "import plupload from \"plupload\";\n\n(() => {\n const DROP_TARGET_ACTIVE_CLASS = \"cms-uploader-drag-drop-target-active\";\n\n class FileUpload {\n constructor(container, settings) {\n if (!container.id) container.id = plupload.guid();\n settings = Object.assign(\n FileUpload.defaultUploaderSettings(container.id),\n settings\n );\n this.ui = {\n container,\n list: container.querySelector(\".cms-uploader-filelist\"),\n dropElement: container.querySelector(`#${settings.drop_element}`),\n };\n this.cleanupFns = [];\n this.uploader = new plupload.Uploader(settings);\n this.uploader.bind(\"PostInit\", () => this.onUploaderPostInit());\n this.uploader.bind(\"Error\", (_uploader, error) =>\n this.onUploaderError(error)\n );\n this.uploader.bind(\"FilesAdded\", (_uploader, files) =>\n this.onUploaderFilesAdded(files)\n );\n this.uploader.bind(\"UploadProgress\", (_uploader, file) =>\n this.onUploaderUploadProgress(file)\n );\n this.uploader.bind(\"FileUploaded\", (_uploader, file, info) =>\n this.onUploaderFileUploaded(file, info)\n );\n this.uploader.bind(\"FilesRemoved\", (_uploader, files) =>\n this.onUploaderFilesRemoved(files)\n );\n this.uploader.init();\n if (settings.setup) {\n settings.setup(this.uploader);\n }\n }\n\n destroy() {\n this.uploader.destroy();\n for (const cleanupFn of this.cleanupFns) {\n cleanupFn();\n }\n }\n\n addCleanup(cleanupFn) {\n this.cleanupFns.push(cleanupFn);\n }\n\n onUploaderPostInit() {\n // Show drag and drop info and attach events only if drag and drop is enabled and supported.\n if (\n !this.uploader.settings.dragdrop ||\n !this.uploader.features.dragdrop\n ) {\n this.ui.container.querySelector(\n \".cms-uploader-drag-drop-info\"\n ).style.display = \"none\";\n return;\n }\n // When dragging over the document add a class to the drop target that puts it on top of every element and remove\n // that class when dropping or leaving the drop target. Otherwise the dragleave event would fire whenever we drag\n // over a child element inside the drop target such as text nodes.\n const onDragEnter = (e) => {\n // Only react to drag'n'drops that contain a file. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types\n if (e.dataTransfer.types.includes(\"Files\")) {\n this.ui.dropElement.classList.add(DROP_TARGET_ACTIVE_CLASS);\n }\n };\n document.addEventListener(\"dragenter\", onDragEnter);\n this.addCleanup(() => {\n document.removeEventListener(\"dragenter\", onDragEnter);\n });\n for (const eventName of [\"drop\", \"dragleave\"]) {\n this.ui.dropElement.addEventListener(eventName, () => {\n this.ui.dropElement.classList.remove(DROP_TARGET_ACTIVE_CLASS);\n });\n }\n }\n\n onUploaderError(error) {\n if (error.code === plupload.INIT_ERROR) {\n window.alert(\"Error: Initialisation error. Reload to try again.\");\n return;\n }\n const file = error.file;\n if (!file) return;\n // Get error message from the server response. Not all runtimes support this.\n let message = error.response;\n // If no error message is in the server response get standard plupload error messages.\n // This will have descriptive error message for something like file size or file format errors but for\n // server errors it will only display a general error message.\n if (!message) {\n message = error.message;\n if (error.details) message += ` (${error.details})`;\n }\n file.status = plupload.FAILED;\n file.error_message = message;\n this.updateFileStatus(file);\n }\n\n onUploaderFilesAdded(files) {\n for (const file of files) {\n this.addFile(file);\n }\n // Auto start upload when files are added.\n this.uploader.start();\n }\n\n onUploaderUploadProgress(file) {\n this.updateFileStatus(file);\n }\n\n onUploaderFileUploaded(file, info) {\n // Replace the dummy file entry in the file list with the the entry from the server response.\n const template = document.createElement(\"template\");\n template.innerHTML = info.response;\n const newListItem = template.content.firstElementChild;\n this.ui.list.replaceChild(newListItem, this.fileListItem(file));\n window.CMS.fileLinks(newListItem);\n }\n\n onUploaderFilesRemoved(files) {\n for (const file of files) {\n this.removeFile(file);\n }\n }\n\n addFile(file) {\n this.ui.list.insertAdjacentHTML(\n \"afterbegin\",\n FileUpload.buildListItemHTML(file)\n );\n this.fileListItem(file)\n .querySelector(\".cms-uploader-file-delete\")\n .addEventListener(\"click\", (evt) => {\n evt.preventDefault();\n this.uploader.removeFile(file);\n });\n this.updateFileStatus(file);\n }\n\n removeFile(file) {\n this.fileListItem(file).remove();\n }\n\n updateFileStatus(file) {\n const progressBar =\n this.fileListItem(file).querySelector(\".progress-bar\");\n switch (file.status) {\n case plupload.UPLOADING:\n progressBar.style.width = `${file.percent}%`;\n break;\n case plupload.FAILED:\n progressBar.style.width = \"100%\";\n progressBar.classList.add(\"progress-bar-danger\");\n progressBar.querySelector(\"span\").innerHTML = file.error_message;\n break;\n }\n }\n\n fileListItem({ id }) {\n return this.ui.container.querySelector(`#${id}`);\n }\n\n static buildListItemHTML({ id, name }) {\n return `
  • \n
    \n
    \n
    \n ${name}\n
    \n
    \n
    \n
    \n
  • `;\n }\n\n static defaultUploaderSettings(id) {\n return {\n runtimes: \"html5,browserplus,silverlight,flash,gears\",\n dragdrop: true,\n drop_element: `${id}-drag-drop-target`,\n browse_button: `${id}-browse`,\n container: id,\n file_data_name: \"file[file]\",\n };\n }\n }\n\n const uploaders = [];\n window.CMS.fileUpload = {\n init(root = document) {\n const el = root.querySelector(\"#cms-uploader\");\n if (el === null) return;\n uploaders.push(\n new FileUpload(el, {\n url: el.dataset.cmsUploaderUrl,\n multipart_params: {\n [el.dataset.cmsUploaderTokenName]: el.dataset.cmsUploaderTokenValue,\n [el.dataset.cmsUploaderSessionName]:\n el.dataset.cmsUploaderSessionValue,\n },\n })\n );\n },\n dispose() {\n for (const uploader of uploader) {\n uploader.dispose();\n }\n uploaders.length = 0;\n },\n };\n})();\n", "import Modal from \"bootstrap/js/src/popover\";\n\n// Site files modal.\n(() => {\n let modal = null;\n\n const initModalContent = (modalContent) => {\n window.CMS.fileUpload.init(modalContent);\n window.CMS.fileLinks(modalContent);\n modalContent.addEventListener(\"dragstart\", (evt) => {\n if (\n evt.target.nodeType === Node.ELEMENT_NODE &&\n evt.target.matches(\".cms-uploader-filelist .item-title a\") &&\n modal != null\n ) {\n modal.hide();\n }\n });\n };\n\n window.CMS.files = {\n init() {\n const modalToggle = document.querySelector(\".cms-files-open-modal\");\n const modalContainer = document.querySelector(\".cms-files-modal\");\n if (modalToggle === null || modalContainer === null) return;\n const modalContent = modalContainer.querySelector(\".modal-content\");\n modalToggle.addEventListener(\"click\", (evt) => {\n evt.preventDefault();\n fetch(modalContainer.dataset.url, { credentials: \"same-origin\" })\n .then((resp) => resp.text())\n .then((html) => {\n modalContent.innerHTML = `
    ${html}
    `;\n initModalContent(modalContent);\n });\n modal = modal || new Modal(modalContainer);\n modal.show();\n });\n },\n dispose() {\n if (modal !== null) {\n modal.hide();\n modal.dispose();\n modal = null;\n }\n },\n };\n})();\n", "window.CMS.pageFragments = () => {\n const toggle = document.querySelector('select#fragments-toggle');\n if (toggle === null) return;\n const url = new URL(toggle.dataset.url, document.location.href);\n toggle.addEventListener('change', () => {\n url.searchParams.set('layout_id', toggle.value);\n fetch(url, {credentials: 'same-origin'}).then((resp) => resp.text()).then((html) => {\n const container = document.querySelector('#form-fragments-container');\n container.innerHTML = html;\n // TODO: Only dispose of the widgets that were within the fragment.\n CMS.wysiwyg.dispose();\n CMS.timepicker.dispose();\n CMS.codemirror.dispose();\n\n CMS.fileLinks(container);\n // TODO: Container should also be passed here once the TODO above is addressed.\n CMS.wysiwyg.init();\n CMS.timepicker.init();\n CMS.codemirror.init();\n });\n });\n};\n", "/**!\n * Sortable 1.15.6\n * @author\tRubaXa \n * @author\towenm \n * @license MIT\n */\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\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 return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\nfunction _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 return obj;\n}\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar version = \"1.15.6\";\n\nfunction userAgent(pattern) {\n if (typeof window !== 'undefined' && window.navigator) {\n return !! /*@__PURE__*/navigator.userAgent.match(pattern);\n }\n}\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n capture: false,\n passive: false\n};\nfunction on(el, event, fn) {\n el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction off(el, event, fn) {\n el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\nfunction matches( /**HTMLElement*/el, /**String*/selector) {\n if (!selector) return;\n selector[0] === '>' && (selector = selector.substring(1));\n if (el) {\n try {\n if (el.matches) {\n return el.matches(selector);\n } else if (el.msMatchesSelector) {\n return el.msMatchesSelector(selector);\n } else if (el.webkitMatchesSelector) {\n return el.webkitMatchesSelector(selector);\n }\n } catch (_) {\n return false;\n }\n }\n return false;\n}\nfunction getParentOrHost(el) {\n return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\nfunction closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {\n if (el) {\n ctx = ctx || document;\n do {\n if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n return el;\n }\n if (el === ctx) break;\n /* jshint boss:true */\n } while (el = getParentOrHost(el));\n }\n return null;\n}\nvar R_SPACE = /\\s+/g;\nfunction toggleClass(el, name, state) {\n if (el && name) {\n if (el.classList) {\n el.classList[state ? 'add' : 'remove'](name);\n } else {\n var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n }\n }\n}\nfunction css(el, prop, val) {\n var style = el && el.style;\n if (style) {\n if (val === void 0) {\n if (document.defaultView && document.defaultView.getComputedStyle) {\n val = document.defaultView.getComputedStyle(el, '');\n } else if (el.currentStyle) {\n val = el.currentStyle;\n }\n return prop === void 0 ? val : val[prop];\n } else {\n if (!(prop in style) && prop.indexOf('webkit') === -1) {\n prop = '-webkit-' + prop;\n }\n style[prop] = val + (typeof val === 'string' ? '' : 'px');\n }\n }\n}\nfunction matrix(el, selfOnly) {\n var appliedTransforms = '';\n if (typeof el === 'string') {\n appliedTransforms = el;\n } else {\n do {\n var transform = css(el, 'transform');\n if (transform && transform !== 'none') {\n appliedTransforms = transform + ' ' + appliedTransforms;\n }\n /* jshint boss:true */\n } while (!selfOnly && (el = el.parentNode));\n }\n var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n /*jshint -W056 */\n return matrixFn && new matrixFn(appliedTransforms);\n}\nfunction find(ctx, tagName, iterator) {\n if (ctx) {\n var list = ctx.getElementsByTagName(tagName),\n i = 0,\n n = list.length;\n if (iterator) {\n for (; i < n; i++) {\n iterator(list[i], i);\n }\n }\n return list;\n }\n return [];\n}\nfunction getWindowScrollingElement() {\n var scrollingElement = document.scrollingElement;\n if (scrollingElement) {\n return scrollingElement;\n } else {\n return document.documentElement;\n }\n}\n\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param {HTMLElement} el The element whose boundingClientRect is wanted\r\n * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container\r\n * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param {[Boolean]} undoScale Whether the container's scale() should be undone\r\n * @param {[HTMLElement]} container The parent the element will be placed in\r\n * @return {Object} The boundingClientRect of el, with specified adjustments\r\n */\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n if (!el.getBoundingClientRect && el !== window) return;\n var elRect, top, left, bottom, right, height, width;\n if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {\n elRect = el.getBoundingClientRect();\n top = elRect.top;\n left = elRect.left;\n bottom = elRect.bottom;\n right = elRect.right;\n height = elRect.height;\n width = elRect.width;\n } else {\n top = 0;\n left = 0;\n bottom = window.innerHeight;\n right = window.innerWidth;\n height = window.innerHeight;\n width = window.innerWidth;\n }\n if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n // Adjust for translate()\n container = container || el.parentNode;\n\n // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n // Not needed on <= IE11\n if (!IE11OrLess) {\n do {\n if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n var containerRect = container.getBoundingClientRect();\n\n // Set relative to edges of padding box of container\n top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n bottom = top + elRect.height;\n right = left + elRect.width;\n break;\n }\n /* jshint boss:true */\n } while (container = container.parentNode);\n }\n }\n if (undoScale && el !== window) {\n // Adjust for scale()\n var elMatrix = matrix(container || el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d;\n if (elMatrix) {\n top /= scaleY;\n left /= scaleX;\n width /= scaleX;\n height /= scaleY;\n bottom = top + height;\n right = left + width;\n }\n }\n return {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n width: width,\n height: height\n };\n}\n\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param {HTMLElement} el The element who's side being scrolled out of view is in question\r\n * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\nfunction isScrolledPast(el, elSide, parentSide) {\n var parent = getParentAutoScrollElement(el, true),\n elSideVal = getRect(el)[elSide];\n\n /* jshint boss:true */\n while (parent) {\n var parentSideVal = getRect(parent)[parentSide],\n visible = void 0;\n if (parentSide === 'top' || parentSide === 'left') {\n visible = elSideVal >= parentSideVal;\n } else {\n visible = elSideVal <= parentSideVal;\n }\n if (!visible) return parent;\n if (parent === getWindowScrollingElement()) break;\n parent = getParentAutoScrollElement(parent, false);\n }\n return false;\n}\n\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param {HTMLElement} el The parent element\r\n * @param {Number} childNum The index of the child\r\n * @param {Object} options Parent Sortable's options\r\n * @return {HTMLElement} The child at index childNum, or null if not found\r\n */\nfunction getChild(el, childNum, options, includeDragEl) {\n var currentChild = 0,\n i = 0,\n children = el.children;\n while (i < children.length) {\n if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {\n if (currentChild === childNum) {\n return children[i];\n }\n currentChild++;\n }\n i++;\n }\n return null;\n}\n\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param {HTMLElement} el Parent element\r\n * @param {selector} selector Any other elements that should be ignored\r\n * @return {HTMLElement} The last child, ignoring ghostEl\r\n */\nfunction lastChild(el, selector) {\n var last = el.lastElementChild;\n while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n last = last.previousElementSibling;\n }\n return last || null;\n}\n\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param {HTMLElement} el\r\n * @param {selector} selector\r\n * @return {number}\r\n */\nfunction index(el, selector) {\n var index = 0;\n if (!el || !el.parentNode) {\n return -1;\n }\n\n /* jshint boss:true */\n while (el = el.previousElementSibling) {\n if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n index++;\n }\n }\n return index;\n}\n\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param {HTMLElement} el\r\n * @return {Array} Offsets in the format of [left, top]\r\n */\nfunction getRelativeScrollOffset(el) {\n var offsetLeft = 0,\n offsetTop = 0,\n winScroller = getWindowScrollingElement();\n if (el) {\n do {\n var elMatrix = matrix(el),\n scaleX = elMatrix.a,\n scaleY = elMatrix.d;\n offsetLeft += el.scrollLeft * scaleX;\n offsetTop += el.scrollTop * scaleY;\n } while (el !== winScroller && (el = el.parentNode));\n }\n return [offsetLeft, offsetTop];\n}\n\n/**\r\n * Returns the index of the object within the given array\r\n * @param {Array} arr Array that may or may not hold the object\r\n * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number} The index of the object in the array, or -1\r\n */\nfunction indexOfObject(arr, obj) {\n for (var i in arr) {\n if (!arr.hasOwnProperty(i)) continue;\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n }\n }\n return -1;\n}\nfunction getParentAutoScrollElement(el, includeSelf) {\n // skip to window\n if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n var elem = el;\n var gotSelf = false;\n do {\n // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n var elemCSS = css(elem);\n if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n if (gotSelf || includeSelf) return elem;\n gotSelf = true;\n }\n }\n /* jshint boss:true */\n } while (elem = elem.parentNode);\n return getWindowScrollingElement();\n}\nfunction extend(dst, src) {\n if (dst && src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dst[key] = src[key];\n }\n }\n }\n return dst;\n}\nfunction isRectEqual(rect1, rect2) {\n return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\nvar _throttleTimeout;\nfunction throttle(callback, ms) {\n return function () {\n if (!_throttleTimeout) {\n var args = arguments,\n _this = this;\n if (args.length === 1) {\n callback.call(_this, args[0]);\n } else {\n callback.apply(_this, args);\n }\n _throttleTimeout = setTimeout(function () {\n _throttleTimeout = void 0;\n }, ms);\n }\n };\n}\nfunction cancelThrottle() {\n clearTimeout(_throttleTimeout);\n _throttleTimeout = void 0;\n}\nfunction scrollBy(el, x, y) {\n el.scrollLeft += x;\n el.scrollTop += y;\n}\nfunction clone(el) {\n var Polymer = window.Polymer;\n var $ = window.jQuery || window.Zepto;\n if (Polymer && Polymer.dom) {\n return Polymer.dom(el).cloneNode(true);\n } else if ($) {\n return $(el).clone(true)[0];\n } else {\n return el.cloneNode(true);\n }\n}\nfunction setRect(el, rect) {\n css(el, 'position', 'absolute');\n css(el, 'top', rect.top);\n css(el, 'left', rect.left);\n css(el, 'width', rect.width);\n css(el, 'height', rect.height);\n}\nfunction unsetRect(el) {\n css(el, 'position', '');\n css(el, 'top', '');\n css(el, 'left', '');\n css(el, 'width', '');\n css(el, 'height', '');\n}\nfunction getChildContainingRectFromElement(container, options, ghostEl) {\n var rect = {};\n Array.from(container.children).forEach(function (child) {\n var _rect$left, _rect$top, _rect$right, _rect$bottom;\n if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;\n var childRect = getRect(child);\n rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);\n rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);\n rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);\n rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);\n });\n rect.width = rect.right - rect.left;\n rect.height = rect.bottom - rect.top;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n var animationStates = [],\n animationCallbackId;\n return {\n captureAnimationState: function captureAnimationState() {\n animationStates = [];\n if (!this.options.animation) return;\n var children = [].slice.call(this.el.children);\n children.forEach(function (child) {\n if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n animationStates.push({\n target: child,\n rect: getRect(child)\n });\n var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);\n\n // If animating: compensate for current animation\n if (child.thisAnimationDuration) {\n var childMatrix = matrix(child, true);\n if (childMatrix) {\n fromRect.top -= childMatrix.f;\n fromRect.left -= childMatrix.e;\n }\n }\n child.fromRect = fromRect;\n });\n },\n addAnimationState: function addAnimationState(state) {\n animationStates.push(state);\n },\n removeAnimationState: function removeAnimationState(target) {\n animationStates.splice(indexOfObject(animationStates, {\n target: target\n }), 1);\n },\n animateAll: function animateAll(callback) {\n var _this = this;\n if (!this.options.animation) {\n clearTimeout(animationCallbackId);\n if (typeof callback === 'function') callback();\n return;\n }\n var animating = false,\n animationTime = 0;\n animationStates.forEach(function (state) {\n var time = 0,\n target = state.target,\n fromRect = target.fromRect,\n toRect = getRect(target),\n prevFromRect = target.prevFromRect,\n prevToRect = target.prevToRect,\n animatingRect = state.rect,\n targetMatrix = matrix(target, true);\n if (targetMatrix) {\n // Compensate for current animation\n toRect.top -= targetMatrix.f;\n toRect.left -= targetMatrix.e;\n }\n target.toRect = toRect;\n if (target.thisAnimationDuration) {\n // Could also check if animatingRect is between fromRect and toRect\n if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&\n // Make sure animatingRect is on line between toRect & fromRect\n (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n // If returning to same place as started from animation and on same axis\n time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n }\n }\n\n // if fromRect != toRect: animate\n if (!isRectEqual(toRect, fromRect)) {\n target.prevFromRect = fromRect;\n target.prevToRect = toRect;\n if (!time) {\n time = _this.options.animation;\n }\n _this.animate(target, animatingRect, toRect, time);\n }\n if (time) {\n animating = true;\n animationTime = Math.max(animationTime, time);\n clearTimeout(target.animationResetTimer);\n target.animationResetTimer = setTimeout(function () {\n target.animationTime = 0;\n target.prevFromRect = null;\n target.fromRect = null;\n target.prevToRect = null;\n target.thisAnimationDuration = null;\n }, time);\n target.thisAnimationDuration = time;\n }\n });\n clearTimeout(animationCallbackId);\n if (!animating) {\n if (typeof callback === 'function') callback();\n } else {\n animationCallbackId = setTimeout(function () {\n if (typeof callback === 'function') callback();\n }, animationTime);\n }\n animationStates = [];\n },\n animate: function animate(target, currentRect, toRect, duration) {\n if (duration) {\n css(target, 'transition', '');\n css(target, 'transform', '');\n var elMatrix = matrix(this.el),\n scaleX = elMatrix && elMatrix.a,\n scaleY = elMatrix && elMatrix.d,\n translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n target.animatingX = !!translateX;\n target.animatingY = !!translateY;\n css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n this.forRepaintDummy = repaint(target); // repaint\n\n css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n css(target, 'transform', 'translate3d(0,0,0)');\n typeof target.animated === 'number' && clearTimeout(target.animated);\n target.animated = setTimeout(function () {\n css(target, 'transition', '');\n css(target, 'transform', '');\n target.animated = false;\n target.animatingX = false;\n target.animatingY = false;\n }, duration);\n }\n }\n };\n}\nfunction repaint(target) {\n return target.offsetWidth;\n}\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n initializeByDefault: true\n};\nvar PluginManager = {\n mount: function mount(plugin) {\n // Set default static properties\n for (var option in defaults) {\n if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n plugin[option] = defaults[option];\n }\n }\n plugins.forEach(function (p) {\n if (p.pluginName === plugin.pluginName) {\n throw \"Sortable: Cannot mount plugin \".concat(plugin.pluginName, \" more than once\");\n }\n });\n plugins.push(plugin);\n },\n pluginEvent: function pluginEvent(eventName, sortable, evt) {\n var _this = this;\n this.eventCanceled = false;\n evt.cancel = function () {\n _this.eventCanceled = true;\n };\n var eventNameGlobal = eventName + 'Global';\n plugins.forEach(function (plugin) {\n if (!sortable[plugin.pluginName]) return;\n // Fire global events if it exists in this sortable\n if (sortable[plugin.pluginName][eventNameGlobal]) {\n sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n\n // Only fire plugin event if plugin is enabled in this sortable,\n // and plugin has event defined\n if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n sortable[plugin.pluginName][eventName](_objectSpread2({\n sortable: sortable\n }, evt));\n }\n });\n },\n initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n plugins.forEach(function (plugin) {\n var pluginName = plugin.pluginName;\n if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n var initialized = new plugin(sortable, el, sortable.options);\n initialized.sortable = sortable;\n initialized.options = sortable.options;\n sortable[pluginName] = initialized;\n\n // Add default options from plugin\n _extends(defaults, initialized.defaults);\n });\n for (var option in sortable.options) {\n if (!sortable.options.hasOwnProperty(option)) continue;\n var modified = this.modifyOption(sortable, option, sortable.options[option]);\n if (typeof modified !== 'undefined') {\n sortable.options[option] = modified;\n }\n }\n },\n getEventProperties: function getEventProperties(name, sortable) {\n var eventProperties = {};\n plugins.forEach(function (plugin) {\n if (typeof plugin.eventProperties !== 'function') return;\n _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n });\n return eventProperties;\n },\n modifyOption: function modifyOption(sortable, name, value) {\n var modifiedValue;\n plugins.forEach(function (plugin) {\n // Plugin must exist on the Sortable\n if (!sortable[plugin.pluginName]) return;\n\n // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n }\n });\n return modifiedValue;\n }\n};\n\nfunction dispatchEvent(_ref) {\n var sortable = _ref.sortable,\n rootEl = _ref.rootEl,\n name = _ref.name,\n targetEl = _ref.targetEl,\n cloneEl = _ref.cloneEl,\n toEl = _ref.toEl,\n fromEl = _ref.fromEl,\n oldIndex = _ref.oldIndex,\n newIndex = _ref.newIndex,\n oldDraggableIndex = _ref.oldDraggableIndex,\n newDraggableIndex = _ref.newDraggableIndex,\n originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n extraEventProperties = _ref.extraEventProperties;\n sortable = sortable || rootEl && rootEl[expando];\n if (!sortable) return;\n var evt,\n options = sortable.options,\n onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent(name, {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent(name, true, true);\n }\n evt.to = toEl || rootEl;\n evt.from = fromEl || rootEl;\n evt.item = targetEl || rootEl;\n evt.clone = cloneEl;\n evt.oldIndex = oldIndex;\n evt.newIndex = newIndex;\n evt.oldDraggableIndex = oldDraggableIndex;\n evt.newDraggableIndex = newDraggableIndex;\n evt.originalEvent = originalEvent;\n evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));\n for (var option in allEventProperties) {\n evt[option] = allEventProperties[option];\n }\n if (rootEl) {\n rootEl.dispatchEvent(evt);\n }\n if (options[onName]) {\n options[onName].call(sortable, evt);\n }\n}\n\nvar _excluded = [\"evt\"];\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n originalEvent = _ref.evt,\n data = _objectWithoutProperties(_ref, _excluded);\n PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({\n dragEl: dragEl,\n parentEl: parentEl,\n ghostEl: ghostEl,\n rootEl: rootEl,\n nextEl: nextEl,\n lastDownEl: lastDownEl,\n cloneEl: cloneEl,\n cloneHidden: cloneHidden,\n dragStarted: moved,\n putSortable: putSortable,\n activeSortable: Sortable.active,\n originalEvent: originalEvent,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n hideGhostForTarget: _hideGhostForTarget,\n unhideGhostForTarget: _unhideGhostForTarget,\n cloneNowHidden: function cloneNowHidden() {\n cloneHidden = true;\n },\n cloneNowShown: function cloneNowShown() {\n cloneHidden = false;\n },\n dispatchSortableEvent: function dispatchSortableEvent(name) {\n _dispatchEvent({\n sortable: sortable,\n name: name,\n originalEvent: originalEvent\n });\n }\n }, data));\n};\nfunction _dispatchEvent(info) {\n dispatchEvent(_objectSpread2({\n putSortable: putSortable,\n cloneEl: cloneEl,\n targetEl: dragEl,\n rootEl: rootEl,\n oldIndex: oldIndex,\n oldDraggableIndex: oldDraggableIndex,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex\n }, info));\n}\nvar dragEl,\n parentEl,\n ghostEl,\n rootEl,\n nextEl,\n lastDownEl,\n cloneEl,\n cloneHidden,\n oldIndex,\n newIndex,\n oldDraggableIndex,\n newDraggableIndex,\n activeGroup,\n putSortable,\n awaitingDragStarted = false,\n ignoreNextClick = false,\n sortables = [],\n tapEvt,\n touchEvt,\n lastDx,\n lastDy,\n tapDistanceLeft,\n tapDistanceTop,\n moved,\n lastTarget,\n lastDirection,\n pastFirstInvertThresh = false,\n isCircumstantialInvert = false,\n targetMoveDistance,\n // For positioning ghost absolutely\n ghostRelativeParent,\n ghostRelativeParentInitialScroll = [],\n // (left, top)\n\n _silent = false,\n savedInputChecked = [];\n\n/** @const */\nvar documentExists = typeof document !== 'undefined',\n PositionGhostAbsolutely = IOS,\n CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n // This will not pass for IE9, because IE9 DnD only works on anchors\n supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n supportCssPointerEvents = function () {\n if (!documentExists) return;\n // false when <= IE11\n if (IE11OrLess) {\n return false;\n }\n var el = document.createElement('x');\n el.style.cssText = 'pointer-events:auto';\n return el.style.pointerEvents === 'auto';\n }(),\n _detectDirection = function _detectDirection(el, options) {\n var elCSS = css(el),\n elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n child1 = getChild(el, 0, options),\n child2 = getChild(el, 1, options),\n firstChildCSS = child1 && css(child1),\n secondChildCSS = child2 && css(child2),\n firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n if (elCSS.display === 'flex') {\n return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n }\n if (elCSS.display === 'grid') {\n return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n }\n if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n }\n return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n },\n _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n dragElOppLength = vertical ? dragRect.width : dragRect.height,\n targetS1Opp = vertical ? targetRect.left : targetRect.top,\n targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n targetOppLength = vertical ? targetRect.width : targetRect.height;\n return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n },\n /**\r\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\r\n * @param {Number} x X position\r\n * @param {Number} y Y position\r\n * @return {HTMLElement} Element of the first found nearest Sortable\r\n */\n _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n var ret;\n sortables.some(function (sortable) {\n var threshold = sortable[expando].options.emptyInsertThreshold;\n if (!threshold || lastChild(sortable)) return;\n var rect = getRect(sortable),\n insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n if (insideHorizontally && insideVertically) {\n return ret = sortable;\n }\n });\n return ret;\n },\n _prepareGroup = function _prepareGroup(options) {\n function toFn(value, pull) {\n return function (to, from, dragEl, evt) {\n var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n if (value == null && (pull || sameGroup)) {\n // Default pull value\n // Default pull and put value if same group\n return true;\n } else if (value == null || value === false) {\n return false;\n } else if (pull && value === 'clone') {\n return value;\n } else if (typeof value === 'function') {\n return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n } else {\n var otherGroup = (pull ? to : from).options.group.name;\n return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n }\n };\n }\n var group = {};\n var originalGroup = options.group;\n if (!originalGroup || _typeof(originalGroup) != 'object') {\n originalGroup = {\n name: originalGroup\n };\n }\n group.name = originalGroup.name;\n group.checkPull = toFn(originalGroup.pull, true);\n group.checkPut = toFn(originalGroup.put);\n group.revertClone = originalGroup.revertClone;\n options.group = group;\n },\n _hideGhostForTarget = function _hideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', 'none');\n }\n },\n _unhideGhostForTarget = function _unhideGhostForTarget() {\n if (!supportCssPointerEvents && ghostEl) {\n css(ghostEl, 'display', '');\n }\n };\n\n// #1184 fix - Prevent click event on fallback if dragged but item not changed position\nif (documentExists && !ChromeForAndroid) {\n document.addEventListener('click', function (evt) {\n if (ignoreNextClick) {\n evt.preventDefault();\n evt.stopPropagation && evt.stopPropagation();\n evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n ignoreNextClick = false;\n return false;\n }\n }, true);\n}\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n if (dragEl) {\n evt = evt.touches ? evt.touches[0] : evt;\n var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n if (nearest) {\n // Create imitation event\n var event = {};\n for (var i in evt) {\n if (evt.hasOwnProperty(i)) {\n event[i] = evt[i];\n }\n }\n event.target = event.rootEl = nearest;\n event.preventDefault = void 0;\n event.stopPropagation = void 0;\n nearest[expando]._onDragOver(event);\n }\n }\n};\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n if (dragEl) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n }\n};\n\n/**\r\n * @class Sortable\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nfunction Sortable(el, options) {\n if (!(el && el.nodeType && el.nodeType === 1)) {\n throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n }\n this.el = el; // root element\n this.options = options = _extends({}, options);\n\n // Export instance\n el[expando] = this;\n var defaults = {\n group: null,\n sort: true,\n disabled: false,\n store: null,\n handle: null,\n draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n swapThreshold: 1,\n // percentage; 0 <= x <= 1\n invertSwap: false,\n // invert always\n invertedSwapThreshold: null,\n // will be set to same as swapThreshold if default\n removeCloneOnHide: true,\n direction: function direction() {\n return _detectDirection(el, this.options);\n },\n ghostClass: 'sortable-ghost',\n chosenClass: 'sortable-chosen',\n dragClass: 'sortable-drag',\n ignore: 'a, img',\n filter: null,\n preventOnFilter: true,\n animation: 0,\n easing: null,\n setData: function setData(dataTransfer, dragEl) {\n dataTransfer.setData('Text', dragEl.textContent);\n },\n dropBubble: false,\n dragoverBubble: false,\n dataIdAttr: 'data-id',\n delay: 0,\n delayOnTouchOnly: false,\n touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n forceFallback: false,\n fallbackClass: 'sortable-fallback',\n fallbackOnBody: false,\n fallbackTolerance: 0,\n fallbackOffset: {\n x: 0,\n y: 0\n },\n // Disabled on Safari: #1571; Enabled on Safari IOS: #2244\n supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && (!Safari || IOS),\n emptyInsertThreshold: 5\n };\n PluginManager.initializePlugins(this, el, defaults);\n\n // Set default options\n for (var name in defaults) {\n !(name in options) && (options[name] = defaults[name]);\n }\n _prepareGroup(options);\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n\n // Setup drag mode\n this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n if (this.nativeDraggable) {\n // Touch start threshold cannot be greater than the native dragstart threshold\n this.options.touchStartThreshold = 1;\n }\n\n // Bind events\n if (options.supportPointer) {\n on(el, 'pointerdown', this._onTapStart);\n } else {\n on(el, 'mousedown', this._onTapStart);\n on(el, 'touchstart', this._onTapStart);\n }\n if (this.nativeDraggable) {\n on(el, 'dragover', this);\n on(el, 'dragenter', this);\n }\n sortables.push(this.el);\n\n // Restore sorting\n options.store && options.store.get && this.sort(options.store.get(this) || []);\n\n // Add animation state manager\n _extends(this, AnimationStateManager());\n}\nSortable.prototype = /** @lends Sortable.prototype */{\n constructor: Sortable,\n _isOutsideThisEl: function _isOutsideThisEl(target) {\n if (!this.el.contains(target) && target !== this.el) {\n lastTarget = null;\n }\n },\n _getDirection: function _getDirection(evt, target) {\n return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n },\n _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {\n if (!evt.cancelable) return;\n var _this = this,\n el = this.el,\n options = this.options,\n preventOnFilter = options.preventOnFilter,\n type = evt.type,\n touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n target = (touch || evt).target,\n originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n filter = options.filter;\n _saveInputCheckedState(el);\n\n // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n if (dragEl) {\n return;\n }\n if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n return; // only left button and enabled\n }\n\n // cancel dnd if original target is content editable\n if (originalTarget.isContentEditable) {\n return;\n }\n\n // Safari ignores further event handling after mousedown\n if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {\n return;\n }\n target = closest(target, options.draggable, el, false);\n if (target && target.animated) {\n return;\n }\n if (lastDownEl === target) {\n // Ignoring duplicate `down`\n return;\n }\n\n // Get the index of the dragged element within its parent\n oldIndex = index(target);\n oldDraggableIndex = index(target, options.draggable);\n\n // Check filter\n if (typeof filter === 'function') {\n if (filter.call(this, evt, target, this)) {\n _dispatchEvent({\n sortable: _this,\n rootEl: originalTarget,\n name: 'filter',\n targetEl: target,\n toEl: el,\n fromEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n preventOnFilter && evt.preventDefault();\n return; // cancel dnd\n }\n } else if (filter) {\n filter = filter.split(',').some(function (criteria) {\n criteria = closest(originalTarget, criteria.trim(), el, false);\n if (criteria) {\n _dispatchEvent({\n sortable: _this,\n rootEl: criteria,\n name: 'filter',\n targetEl: target,\n fromEl: el,\n toEl: el\n });\n pluginEvent('filter', _this, {\n evt: evt\n });\n return true;\n }\n });\n if (filter) {\n preventOnFilter && evt.preventDefault();\n return; // cancel dnd\n }\n }\n if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n return;\n }\n\n // Prepare `dragstart`\n this._prepareDragStart(evt, touch, target);\n },\n _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {\n var _this = this,\n el = _this.el,\n options = _this.options,\n ownerDocument = el.ownerDocument,\n dragStartFn;\n if (target && !dragEl && target.parentNode === el) {\n var dragRect = getRect(target);\n rootEl = el;\n dragEl = target;\n parentEl = dragEl.parentNode;\n nextEl = dragEl.nextSibling;\n lastDownEl = target;\n activeGroup = options.group;\n Sortable.dragged = dragEl;\n tapEvt = {\n target: dragEl,\n clientX: (touch || evt).clientX,\n clientY: (touch || evt).clientY\n };\n tapDistanceLeft = tapEvt.clientX - dragRect.left;\n tapDistanceTop = tapEvt.clientY - dragRect.top;\n this._lastX = (touch || evt).clientX;\n this._lastY = (touch || evt).clientY;\n dragEl.style['will-change'] = 'all';\n dragStartFn = function dragStartFn() {\n pluginEvent('delayEnded', _this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n _this._onDrop();\n return;\n }\n // Delayed drag has been triggered\n // we can re-enable the events: touchmove/mousemove\n _this._disableDelayedDragEvents();\n if (!FireFox && _this.nativeDraggable) {\n dragEl.draggable = true;\n }\n\n // Bind the events: dragstart/dragend\n _this._triggerDragStart(evt, touch);\n\n // Drag start event\n _dispatchEvent({\n sortable: _this,\n name: 'choose',\n originalEvent: evt\n });\n\n // Chosen item\n toggleClass(dragEl, options.chosenClass, true);\n };\n\n // Disable \"draggable\"\n options.ignore.split(',').forEach(function (criteria) {\n find(dragEl, criteria.trim(), _disableDraggable);\n });\n on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n if (options.supportPointer) {\n on(ownerDocument, 'pointerup', _this._onDrop);\n // Native D&D triggers pointercancel\n !this.nativeDraggable && on(ownerDocument, 'pointercancel', _this._onDrop);\n } else {\n on(ownerDocument, 'mouseup', _this._onDrop);\n on(ownerDocument, 'touchend', _this._onDrop);\n on(ownerDocument, 'touchcancel', _this._onDrop);\n }\n\n // Make dragEl draggable (must be before delay for FireFox)\n if (FireFox && this.nativeDraggable) {\n this.options.touchStartThreshold = 4;\n dragEl.draggable = true;\n }\n pluginEvent('delayStart', this, {\n evt: evt\n });\n\n // Delay is impossible for native DnD in Edge or IE\n if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n // If the user moves the pointer or let go the click or touch\n // before the delay has been reached:\n // disable the delayed drag\n if (options.supportPointer) {\n on(ownerDocument, 'pointerup', _this._disableDelayedDrag);\n on(ownerDocument, 'pointercancel', _this._disableDelayedDrag);\n } else {\n on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n }\n on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n } else {\n dragStartFn();\n }\n }\n },\n _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {\n var touch = e.touches ? e.touches[0] : e;\n if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n this._disableDelayedDrag();\n }\n },\n _disableDelayedDrag: function _disableDelayedDrag() {\n dragEl && _disableDraggable(dragEl);\n clearTimeout(this._dragStartTimer);\n this._disableDelayedDragEvents();\n },\n _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n off(ownerDocument, 'touchend', this._disableDelayedDrag);\n off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n off(ownerDocument, 'pointerup', this._disableDelayedDrag);\n off(ownerDocument, 'pointercancel', this._disableDelayedDrag);\n off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n },\n _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {\n touch = touch || evt.pointerType == 'touch' && evt;\n if (!this.nativeDraggable || touch) {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._onTouchMove);\n } else if (touch) {\n on(document, 'touchmove', this._onTouchMove);\n } else {\n on(document, 'mousemove', this._onTouchMove);\n }\n } else {\n on(dragEl, 'dragend', this);\n on(rootEl, 'dragstart', this._onDragStart);\n }\n try {\n if (document.selection) {\n _nextTick(function () {\n document.selection.empty();\n });\n } else {\n window.getSelection().removeAllRanges();\n }\n } catch (err) {}\n },\n _dragStarted: function _dragStarted(fallback, evt) {\n awaitingDragStarted = false;\n if (rootEl && dragEl) {\n pluginEvent('dragStarted', this, {\n evt: evt\n });\n if (this.nativeDraggable) {\n on(document, 'dragover', _checkOutsideTargetEl);\n }\n var options = this.options;\n\n // Apply effect\n !fallback && toggleClass(dragEl, options.dragClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n Sortable.active = this;\n fallback && this._appendGhost();\n\n // Drag start event\n _dispatchEvent({\n sortable: this,\n name: 'start',\n originalEvent: evt\n });\n } else {\n this._nulling();\n }\n },\n _emulateDragOver: function _emulateDragOver() {\n if (touchEvt) {\n this._lastX = touchEvt.clientX;\n this._lastY = touchEvt.clientY;\n _hideGhostForTarget();\n var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n var parent = target;\n while (target && target.shadowRoot) {\n target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n if (target === parent) break;\n parent = target;\n }\n dragEl.parentNode[expando]._isOutsideThisEl(target);\n if (parent) {\n do {\n if (parent[expando]) {\n var inserted = void 0;\n inserted = parent[expando]._onDragOver({\n clientX: touchEvt.clientX,\n clientY: touchEvt.clientY,\n target: target,\n rootEl: parent\n });\n if (inserted && !this.options.dragoverBubble) {\n break;\n }\n }\n target = parent; // store last element\n }\n /* jshint boss:true */ while (parent = getParentOrHost(parent));\n }\n _unhideGhostForTarget();\n }\n },\n _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {\n if (tapEvt) {\n var options = this.options,\n fallbackTolerance = options.fallbackTolerance,\n fallbackOffset = options.fallbackOffset,\n touch = evt.touches ? evt.touches[0] : evt,\n ghostMatrix = ghostEl && matrix(ghostEl, true),\n scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);\n\n // only set the status to dragging, when we are actually dragging\n if (!Sortable.active && !awaitingDragStarted) {\n if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n return;\n }\n this._onDragStart(evt, true);\n }\n if (ghostEl) {\n if (ghostMatrix) {\n ghostMatrix.e += dx - (lastDx || 0);\n ghostMatrix.f += dy - (lastDy || 0);\n } else {\n ghostMatrix = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n e: dx,\n f: dy\n };\n }\n var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n css(ghostEl, 'webkitTransform', cssMatrix);\n css(ghostEl, 'mozTransform', cssMatrix);\n css(ghostEl, 'msTransform', cssMatrix);\n css(ghostEl, 'transform', cssMatrix);\n lastDx = dx;\n lastDy = dy;\n touchEvt = touch;\n }\n evt.cancelable && evt.preventDefault();\n }\n },\n _appendGhost: function _appendGhost() {\n // Bug if using scale(): https://stackoverflow.com/questions/2637058\n // Not being adjusted for\n if (!ghostEl) {\n var container = this.options.fallbackOnBody ? document.body : rootEl,\n rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n options = this.options;\n\n // Position absolutely\n if (PositionGhostAbsolutely) {\n // Get relatively positioned parent\n ghostRelativeParent = container;\n while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n ghostRelativeParent = ghostRelativeParent.parentNode;\n }\n if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n rect.top += ghostRelativeParent.scrollTop;\n rect.left += ghostRelativeParent.scrollLeft;\n } else {\n ghostRelativeParent = getWindowScrollingElement();\n }\n ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n }\n ghostEl = dragEl.cloneNode(true);\n toggleClass(ghostEl, options.ghostClass, false);\n toggleClass(ghostEl, options.fallbackClass, true);\n toggleClass(ghostEl, options.dragClass, true);\n css(ghostEl, 'transition', '');\n css(ghostEl, 'transform', '');\n css(ghostEl, 'box-sizing', 'border-box');\n css(ghostEl, 'margin', 0);\n css(ghostEl, 'top', rect.top);\n css(ghostEl, 'left', rect.left);\n css(ghostEl, 'width', rect.width);\n css(ghostEl, 'height', rect.height);\n css(ghostEl, 'opacity', '0.8');\n css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n css(ghostEl, 'zIndex', '100000');\n css(ghostEl, 'pointerEvents', 'none');\n Sortable.ghost = ghostEl;\n container.appendChild(ghostEl);\n\n // Set transform-origin\n css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n }\n },\n _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {\n var _this = this;\n var dataTransfer = evt.dataTransfer;\n var options = _this.options;\n pluginEvent('dragStart', this, {\n evt: evt\n });\n if (Sortable.eventCanceled) {\n this._onDrop();\n return;\n }\n pluginEvent('setupClone', this);\n if (!Sortable.eventCanceled) {\n cloneEl = clone(dragEl);\n cloneEl.removeAttribute(\"id\");\n cloneEl.draggable = false;\n cloneEl.style['will-change'] = '';\n this._hideClone();\n toggleClass(cloneEl, this.options.chosenClass, false);\n Sortable.clone = cloneEl;\n }\n\n // #1143: IFrame support workaround\n _this.cloneId = _nextTick(function () {\n pluginEvent('clone', _this);\n if (Sortable.eventCanceled) return;\n if (!_this.options.removeCloneOnHide) {\n rootEl.insertBefore(cloneEl, dragEl);\n }\n _this._hideClone();\n _dispatchEvent({\n sortable: _this,\n name: 'clone'\n });\n });\n !fallback && toggleClass(dragEl, options.dragClass, true);\n\n // Set proper drop events\n if (fallback) {\n ignoreNextClick = true;\n _this._loopId = setInterval(_this._emulateDragOver, 50);\n } else {\n // Undo what was set in _prepareDragStart before drag started\n off(document, 'mouseup', _this._onDrop);\n off(document, 'touchend', _this._onDrop);\n off(document, 'touchcancel', _this._onDrop);\n if (dataTransfer) {\n dataTransfer.effectAllowed = 'move';\n options.setData && options.setData.call(_this, dataTransfer, dragEl);\n }\n on(document, 'drop', _this);\n\n // #1276 fix:\n css(dragEl, 'transform', 'translateZ(0)');\n }\n awaitingDragStarted = true;\n _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n on(document, 'selectstart', _this);\n moved = true;\n window.getSelection().removeAllRanges();\n if (Safari) {\n css(document.body, 'user-select', 'none');\n }\n },\n // Returns true - if no further action is needed (either inserted or another condition)\n _onDragOver: function _onDragOver( /**Event*/evt) {\n var el = this.el,\n target = evt.target,\n dragRect,\n targetRect,\n revert,\n options = this.options,\n group = options.group,\n activeSortable = Sortable.active,\n isOwner = activeGroup === group,\n canSort = options.sort,\n fromSortable = putSortable || activeSortable,\n vertical,\n _this = this,\n completedFired = false;\n if (_silent) return;\n function dragOverEvent(name, extra) {\n pluginEvent(name, _this, _objectSpread2({\n evt: evt,\n isOwner: isOwner,\n axis: vertical ? 'vertical' : 'horizontal',\n revert: revert,\n dragRect: dragRect,\n targetRect: targetRect,\n canSort: canSort,\n fromSortable: fromSortable,\n target: target,\n completed: completed,\n onMove: function onMove(target, after) {\n return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n },\n changed: changed\n }, extra));\n }\n\n // Capture animation state\n function capture() {\n dragOverEvent('dragOverAnimationCapture');\n _this.captureAnimationState();\n if (_this !== fromSortable) {\n fromSortable.captureAnimationState();\n }\n }\n\n // Return invocation when dragEl is inserted (or completed)\n function completed(insertion) {\n dragOverEvent('dragOverCompleted', {\n insertion: insertion\n });\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n } else {\n activeSortable._showClone(_this);\n }\n if (_this !== fromSortable) {\n // Set ghost class to new sortable's ghost class\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n toggleClass(dragEl, options.ghostClass, true);\n }\n if (putSortable !== _this && _this !== Sortable.active) {\n putSortable = _this;\n } else if (_this === Sortable.active && putSortable) {\n putSortable = null;\n }\n\n // Animation\n if (fromSortable === _this) {\n _this._ignoreWhileAnimating = target;\n }\n _this.animateAll(function () {\n dragOverEvent('dragOverAnimationComplete');\n _this._ignoreWhileAnimating = null;\n });\n if (_this !== fromSortable) {\n fromSortable.animateAll();\n fromSortable._ignoreWhileAnimating = null;\n }\n }\n\n // Null lastTarget if it is not inside a previously swapped element\n if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n lastTarget = null;\n }\n\n // no bubbling and not fallback\n if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n\n // Do not detect for empty insert if already inserted\n !insertion && nearestEmptyInsertDetectEvent(evt);\n }\n !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n return completedFired = true;\n }\n\n // Call when dragEl has been inserted\n function changed() {\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n _dispatchEvent({\n sortable: _this,\n name: 'change',\n toEl: el,\n newIndex: newIndex,\n newDraggableIndex: newDraggableIndex,\n originalEvent: evt\n });\n }\n if (evt.preventDefault !== void 0) {\n evt.cancelable && evt.preventDefault();\n }\n target = closest(target, options.draggable, el, true);\n dragOverEvent('dragOver');\n if (Sortable.eventCanceled) return completedFired;\n if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n return completed(false);\n }\n ignoreNextClick = false;\n if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list\n : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n vertical = this._getDirection(evt, target) === 'vertical';\n dragRect = getRect(dragEl);\n dragOverEvent('dragOverValid');\n if (Sortable.eventCanceled) return completedFired;\n if (revert) {\n parentEl = rootEl; // actualization\n capture();\n this._hideClone();\n dragOverEvent('revert');\n if (!Sortable.eventCanceled) {\n if (nextEl) {\n rootEl.insertBefore(dragEl, nextEl);\n } else {\n rootEl.appendChild(dragEl);\n }\n }\n return completed(true);\n }\n var elLastChild = lastChild(el, options.draggable);\n if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n // Insert to end of list\n\n // If already at end of list: Do not insert\n if (elLastChild === dragEl) {\n return completed(false);\n }\n\n // if there is a last element, it is the target\n if (elLastChild && el === evt.target) {\n target = elLastChild;\n }\n if (target) {\n targetRect = getRect(target);\n }\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n capture();\n if (elLastChild && elLastChild.nextSibling) {\n // the last draggable element is not the last node\n el.insertBefore(dragEl, elLastChild.nextSibling);\n } else {\n el.appendChild(dragEl);\n }\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {\n // Insert to start of list\n var firstChild = getChild(el, 0, options, true);\n if (firstChild === dragEl) {\n return completed(false);\n }\n target = firstChild;\n targetRect = getRect(target);\n if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {\n capture();\n el.insertBefore(dragEl, firstChild);\n parentEl = el; // actualization\n\n changed();\n return completed(true);\n }\n } else if (target.parentNode === el) {\n targetRect = getRect(target);\n var direction = 0,\n targetBeforeFirstSwap,\n differentLevel = dragEl.parentNode !== el,\n differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n side1 = vertical ? 'top' : 'left',\n scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n if (lastTarget !== target) {\n targetBeforeFirstSwap = targetRect[side1];\n pastFirstInvertThresh = false;\n isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n }\n direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n var sibling;\n if (direction !== 0) {\n // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n var dragIndex = index(dragEl);\n do {\n dragIndex -= direction;\n sibling = parentEl.children[dragIndex];\n } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n }\n // If dragEl is already beside target: Do not insert\n if (direction === 0 || sibling === target) {\n return completed(false);\n }\n lastTarget = target;\n lastDirection = direction;\n var nextSibling = target.nextElementSibling,\n after = false;\n after = direction === 1;\n var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n if (moveVector !== false) {\n if (moveVector === 1 || moveVector === -1) {\n after = moveVector === 1;\n }\n _silent = true;\n setTimeout(_unsilent, 30);\n capture();\n if (after && !nextSibling) {\n el.appendChild(dragEl);\n } else {\n target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n }\n\n // Undo chrome's scroll adjustment (has no effect on other browsers)\n if (scrolledPastTop) {\n scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n }\n parentEl = dragEl.parentNode; // actualization\n\n // must be done before animation\n if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n }\n changed();\n return completed(true);\n }\n }\n if (el.contains(dragEl)) {\n return completed(false);\n }\n }\n return false;\n },\n _ignoreWhileAnimating: null,\n _offMoveEvents: function _offMoveEvents() {\n off(document, 'mousemove', this._onTouchMove);\n off(document, 'touchmove', this._onTouchMove);\n off(document, 'pointermove', this._onTouchMove);\n off(document, 'dragover', nearestEmptyInsertDetectEvent);\n off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n },\n _offUpEvents: function _offUpEvents() {\n var ownerDocument = this.el.ownerDocument;\n off(ownerDocument, 'mouseup', this._onDrop);\n off(ownerDocument, 'touchend', this._onDrop);\n off(ownerDocument, 'pointerup', this._onDrop);\n off(ownerDocument, 'pointercancel', this._onDrop);\n off(ownerDocument, 'touchcancel', this._onDrop);\n off(document, 'selectstart', this);\n },\n _onDrop: function _onDrop( /**Event*/evt) {\n var el = this.el,\n options = this.options;\n\n // Get the index of the dragged element within its parent\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n pluginEvent('drop', this, {\n evt: evt\n });\n parentEl = dragEl && dragEl.parentNode;\n\n // Get again after plugin event\n newIndex = index(dragEl);\n newDraggableIndex = index(dragEl, options.draggable);\n if (Sortable.eventCanceled) {\n this._nulling();\n return;\n }\n awaitingDragStarted = false;\n isCircumstantialInvert = false;\n pastFirstInvertThresh = false;\n clearInterval(this._loopId);\n clearTimeout(this._dragStartTimer);\n _cancelNextTick(this.cloneId);\n _cancelNextTick(this._dragStartId);\n\n // Unbind events\n if (this.nativeDraggable) {\n off(document, 'drop', this);\n off(el, 'dragstart', this._onDragStart);\n }\n this._offMoveEvents();\n this._offUpEvents();\n if (Safari) {\n css(document.body, 'user-select', '');\n }\n css(dragEl, 'transform', '');\n if (evt) {\n if (moved) {\n evt.cancelable && evt.preventDefault();\n !options.dropBubble && evt.stopPropagation();\n }\n ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n // Remove clone(s)\n cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n }\n if (dragEl) {\n if (this.nativeDraggable) {\n off(dragEl, 'dragend', this);\n }\n _disableDraggable(dragEl);\n dragEl.style['will-change'] = '';\n\n // Remove classes\n // ghostClass is added in dragStarted\n if (moved && !awaitingDragStarted) {\n toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n }\n toggleClass(dragEl, this.options.chosenClass, false);\n\n // Drag stop event\n _dispatchEvent({\n sortable: this,\n name: 'unchoose',\n toEl: parentEl,\n newIndex: null,\n newDraggableIndex: null,\n originalEvent: evt\n });\n if (rootEl !== parentEl) {\n if (newIndex >= 0) {\n // Add event\n _dispatchEvent({\n rootEl: parentEl,\n name: 'add',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n\n // Remove event\n _dispatchEvent({\n sortable: this,\n name: 'remove',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // drag from one list and drop into another\n _dispatchEvent({\n rootEl: parentEl,\n name: 'sort',\n toEl: parentEl,\n fromEl: rootEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n putSortable && putSortable.save();\n } else {\n if (newIndex !== oldIndex) {\n if (newIndex >= 0) {\n // drag & drop within the same list\n _dispatchEvent({\n sortable: this,\n name: 'update',\n toEl: parentEl,\n originalEvent: evt\n });\n _dispatchEvent({\n sortable: this,\n name: 'sort',\n toEl: parentEl,\n originalEvent: evt\n });\n }\n }\n }\n if (Sortable.active) {\n /* jshint eqnull:true */\n if (newIndex == null || newIndex === -1) {\n newIndex = oldIndex;\n newDraggableIndex = oldDraggableIndex;\n }\n _dispatchEvent({\n sortable: this,\n name: 'end',\n toEl: parentEl,\n originalEvent: evt\n });\n\n // Save sorting\n this.save();\n }\n }\n }\n this._nulling();\n },\n _nulling: function _nulling() {\n pluginEvent('nulling', this);\n rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n savedInputChecked.forEach(function (el) {\n el.checked = true;\n });\n savedInputChecked.length = lastDx = lastDy = 0;\n },\n handleEvent: function handleEvent( /**Event*/evt) {\n switch (evt.type) {\n case 'drop':\n case 'dragend':\n this._onDrop(evt);\n break;\n case 'dragenter':\n case 'dragover':\n if (dragEl) {\n this._onDragOver(evt);\n _globalDragOver(evt);\n }\n break;\n case 'selectstart':\n evt.preventDefault();\n break;\n }\n },\n /**\r\n * Serializes the item into an array of string.\r\n * @returns {String[]}\r\n */\n toArray: function toArray() {\n var order = [],\n el,\n children = this.el.children,\n i = 0,\n n = children.length,\n options = this.options;\n for (; i < n; i++) {\n el = children[i];\n if (closest(el, options.draggable, this.el, false)) {\n order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n }\n }\n return order;\n },\n /**\r\n * Sorts the elements according to the array.\r\n * @param {String[]} order order of the items\r\n */\n sort: function sort(order, useAnimation) {\n var items = {},\n rootEl = this.el;\n this.toArray().forEach(function (id, i) {\n var el = rootEl.children[i];\n if (closest(el, this.options.draggable, rootEl, false)) {\n items[id] = el;\n }\n }, this);\n useAnimation && this.captureAnimationState();\n order.forEach(function (id) {\n if (items[id]) {\n rootEl.removeChild(items[id]);\n rootEl.appendChild(items[id]);\n }\n });\n useAnimation && this.animateAll();\n },\n /**\r\n * Save the current sorting\r\n */\n save: function save() {\n var store = this.options.store;\n store && store.set && store.set(this);\n },\n /**\r\n * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\r\n * @param {HTMLElement} el\r\n * @param {String} [selector] default: `options.draggable`\r\n * @returns {HTMLElement|null}\r\n */\n closest: function closest$1(el, selector) {\n return closest(el, selector || this.options.draggable, this.el, false);\n },\n /**\r\n * Set/get option\r\n * @param {string} name\r\n * @param {*} [value]\r\n * @returns {*}\r\n */\n option: function option(name, value) {\n var options = this.options;\n if (value === void 0) {\n return options[name];\n } else {\n var modifiedValue = PluginManager.modifyOption(this, name, value);\n if (typeof modifiedValue !== 'undefined') {\n options[name] = modifiedValue;\n } else {\n options[name] = value;\n }\n if (name === 'group') {\n _prepareGroup(options);\n }\n }\n },\n /**\r\n * Destroy\r\n */\n destroy: function destroy() {\n pluginEvent('destroy', this);\n var el = this.el;\n el[expando] = null;\n off(el, 'mousedown', this._onTapStart);\n off(el, 'touchstart', this._onTapStart);\n off(el, 'pointerdown', this._onTapStart);\n if (this.nativeDraggable) {\n off(el, 'dragover', this);\n off(el, 'dragenter', this);\n }\n // Remove draggable attributes\n Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n el.removeAttribute('draggable');\n });\n this._onDrop();\n this._disableDelayedDragEvents();\n sortables.splice(sortables.indexOf(this.el), 1);\n this.el = el = null;\n },\n _hideClone: function _hideClone() {\n if (!cloneHidden) {\n pluginEvent('hideClone', this);\n if (Sortable.eventCanceled) return;\n css(cloneEl, 'display', 'none');\n if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n cloneEl.parentNode.removeChild(cloneEl);\n }\n cloneHidden = true;\n }\n },\n _showClone: function _showClone(putSortable) {\n if (putSortable.lastPutMode !== 'clone') {\n this._hideClone();\n return;\n }\n if (cloneHidden) {\n pluginEvent('showClone', this);\n if (Sortable.eventCanceled) return;\n\n // show clone at dragEl or original position\n if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {\n rootEl.insertBefore(cloneEl, dragEl);\n } else if (nextEl) {\n rootEl.insertBefore(cloneEl, nextEl);\n } else {\n rootEl.appendChild(cloneEl);\n }\n if (this.options.group.revertClone) {\n this.animate(dragEl, cloneEl);\n }\n css(cloneEl, 'display', '');\n cloneHidden = false;\n }\n }\n};\nfunction _globalDragOver( /**Event*/evt) {\n if (evt.dataTransfer) {\n evt.dataTransfer.dropEffect = 'move';\n }\n evt.cancelable && evt.preventDefault();\n}\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n var evt,\n sortable = fromEl[expando],\n onMoveFn = sortable.options.onMove,\n retVal;\n // Support for new CustomEvent feature\n if (window.CustomEvent && !IE11OrLess && !Edge) {\n evt = new CustomEvent('move', {\n bubbles: true,\n cancelable: true\n });\n } else {\n evt = document.createEvent('Event');\n evt.initEvent('move', true, true);\n }\n evt.to = toEl;\n evt.from = fromEl;\n evt.dragged = dragEl;\n evt.draggedRect = dragRect;\n evt.related = targetEl || toEl;\n evt.relatedRect = targetRect || getRect(toEl);\n evt.willInsertAfter = willInsertAfter;\n evt.originalEvent = originalEvent;\n fromEl.dispatchEvent(evt);\n if (onMoveFn) {\n retVal = onMoveFn.call(sortable, evt, originalEvent);\n }\n return retVal;\n}\nfunction _disableDraggable(el) {\n el.draggable = false;\n}\nfunction _unsilent() {\n _silent = false;\n}\nfunction _ghostIsFirst(evt, vertical, sortable) {\n var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;\n}\nfunction _ghostIsLast(evt, vertical, sortable) {\n var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));\n var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);\n var spacer = 10;\n return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;\n}\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n targetLength = vertical ? targetRect.height : targetRect.width,\n targetS1 = vertical ? targetRect.top : targetRect.left,\n targetS2 = vertical ? targetRect.bottom : targetRect.right,\n invert = false;\n if (!invertSwap) {\n // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n // check if past first invert threshold on side opposite of lastDirection\n if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n pastFirstInvertThresh = true;\n }\n if (!pastFirstInvertThresh) {\n // dragEl shadow (target move distance shadow)\n if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n : mouseOnAxis > targetS2 - targetMoveDistance) {\n return -lastDirection;\n }\n } else {\n invert = true;\n }\n } else {\n // Regular\n if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n return _getInsertDirection(target);\n }\n }\n }\n invert = invert || invertSwap;\n if (invert) {\n // Invert of regular\n if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n }\n }\n return 0;\n}\n\n/**\r\n * Gets the direction dragEl must be swapped relative to target in order to make it\r\n * seem that dragEl has been \"inserted\" into that element's position\r\n * @param {HTMLElement} target The target whose position dragEl is being inserted at\r\n * @return {Number} Direction dragEl must be swapped\r\n */\nfunction _getInsertDirection(target) {\n if (index(dragEl) < index(target)) {\n return 1;\n } else {\n return -1;\n }\n}\n\n/**\r\n * Generate id\r\n * @param {HTMLElement} el\r\n * @returns {String}\r\n * @private\r\n */\nfunction _generateId(el) {\n var str = el.tagName + el.className + el.src + el.href + el.textContent,\n i = str.length,\n sum = 0;\n while (i--) {\n sum += str.charCodeAt(i);\n }\n return sum.toString(36);\n}\nfunction _saveInputCheckedState(root) {\n savedInputChecked.length = 0;\n var inputs = root.getElementsByTagName('input');\n var idx = inputs.length;\n while (idx--) {\n var el = inputs[idx];\n el.checked && savedInputChecked.push(el);\n }\n}\nfunction _nextTick(fn) {\n return setTimeout(fn, 0);\n}\nfunction _cancelNextTick(id) {\n return clearTimeout(id);\n}\n\n// Fixed #973:\nif (documentExists) {\n on(document, 'touchmove', function (evt) {\n if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n evt.preventDefault();\n }\n });\n}\n\n// Export utils\nSortable.utils = {\n on: on,\n off: off,\n css: css,\n find: find,\n is: function is(el, selector) {\n return !!closest(el, selector, el, false);\n },\n extend: extend,\n throttle: throttle,\n closest: closest,\n toggleClass: toggleClass,\n clone: clone,\n index: index,\n nextTick: _nextTick,\n cancelNextTick: _cancelNextTick,\n detectDirection: _detectDirection,\n getChild: getChild,\n expando: expando\n};\n\n/**\r\n * Get the Sortable instance of an element\r\n * @param {HTMLElement} element The element\r\n * @return {Sortable|undefined} The instance of Sortable\r\n */\nSortable.get = function (element) {\n return element[expando];\n};\n\n/**\r\n * Mount a plugin to Sortable\r\n * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted\r\n */\nSortable.mount = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n if (plugins[0].constructor === Array) plugins = plugins[0];\n plugins.forEach(function (plugin) {\n if (!plugin.prototype || !plugin.prototype.constructor) {\n throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n }\n if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);\n PluginManager.mount(plugin);\n });\n};\n\n/**\r\n * Create sortable instance\r\n * @param {HTMLElement} el\r\n * @param {Object} [options]\r\n */\nSortable.create = function (el, options) {\n return new Sortable(el, options);\n};\n\n// Export\nSortable.version = version;\n\nvar autoScrolls = [],\n scrollEl,\n scrollRootEl,\n scrolling = false,\n lastAutoScrollX,\n lastAutoScrollY,\n touchEvt$1,\n pointerElemChangedInterval;\nfunction AutoScrollPlugin() {\n function AutoScroll() {\n this.defaults = {\n scroll: true,\n forceAutoScrollFallback: false,\n scrollSensitivity: 30,\n scrollSpeed: 10,\n bubbleScroll: true\n };\n\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n }\n AutoScroll.prototype = {\n dragStarted: function dragStarted(_ref) {\n var originalEvent = _ref.originalEvent;\n if (this.sortable.nativeDraggable) {\n on(document, 'dragover', this._handleAutoScroll);\n } else {\n if (this.options.supportPointer) {\n on(document, 'pointermove', this._handleFallbackAutoScroll);\n } else if (originalEvent.touches) {\n on(document, 'touchmove', this._handleFallbackAutoScroll);\n } else {\n on(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref2) {\n var originalEvent = _ref2.originalEvent;\n // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n this._handleAutoScroll(originalEvent);\n }\n },\n drop: function drop() {\n if (this.sortable.nativeDraggable) {\n off(document, 'dragover', this._handleAutoScroll);\n } else {\n off(document, 'pointermove', this._handleFallbackAutoScroll);\n off(document, 'touchmove', this._handleFallbackAutoScroll);\n off(document, 'mousemove', this._handleFallbackAutoScroll);\n }\n clearPointerElemChangedInterval();\n clearAutoScrolls();\n cancelThrottle();\n },\n nulling: function nulling() {\n touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n autoScrolls.length = 0;\n },\n _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n this._handleAutoScroll(evt, true);\n },\n _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n var _this = this;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n elem = document.elementFromPoint(x, y);\n touchEvt$1 = evt;\n\n // IE does not seem to have native autoscroll,\n // Edge's autoscroll seems too conditional,\n // MACOS Safari does not have autoscroll,\n // Firefox and Chrome are good\n if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {\n autoScroll(evt, this.options, elem, fallback);\n\n // Listener for pointer element change\n var ogElemScroller = getParentAutoScrollElement(elem, true);\n if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n pointerElemChangedInterval && clearPointerElemChangedInterval();\n // Detect for pointer elem change, emulating native DnD behaviour\n pointerElemChangedInterval = setInterval(function () {\n var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n if (newElem !== ogElemScroller) {\n ogElemScroller = newElem;\n clearAutoScrolls();\n }\n autoScroll(evt, _this.options, newElem, fallback);\n }, 10);\n lastAutoScrollX = x;\n lastAutoScrollY = y;\n }\n } else {\n // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n clearAutoScrolls();\n return;\n }\n autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n }\n }\n };\n return _extends(AutoScroll, {\n pluginName: 'scroll',\n initializeByDefault: true\n });\n}\nfunction clearAutoScrolls() {\n autoScrolls.forEach(function (autoScroll) {\n clearInterval(autoScroll.pid);\n });\n autoScrolls = [];\n}\nfunction clearPointerElemChangedInterval() {\n clearInterval(pointerElemChangedInterval);\n}\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n if (!options.scroll) return;\n var x = (evt.touches ? evt.touches[0] : evt).clientX,\n y = (evt.touches ? evt.touches[0] : evt).clientY,\n sens = options.scrollSensitivity,\n speed = options.scrollSpeed,\n winScroller = getWindowScrollingElement();\n var scrollThisInstance = false,\n scrollCustomFn;\n\n // New scroll root, set scrollEl\n if (scrollRootEl !== rootEl) {\n scrollRootEl = rootEl;\n clearAutoScrolls();\n scrollEl = options.scroll;\n scrollCustomFn = options.scrollFn;\n if (scrollEl === true) {\n scrollEl = getParentAutoScrollElement(rootEl, true);\n }\n }\n var layersOut = 0;\n var currentParent = scrollEl;\n do {\n var el = currentParent,\n rect = getRect(el),\n top = rect.top,\n bottom = rect.bottom,\n left = rect.left,\n right = rect.right,\n width = rect.width,\n height = rect.height,\n canScrollX = void 0,\n canScrollY = void 0,\n scrollWidth = el.scrollWidth,\n scrollHeight = el.scrollHeight,\n elCSS = css(el),\n scrollPosX = el.scrollLeft,\n scrollPosY = el.scrollTop;\n if (el === winScroller) {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n } else {\n canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n }\n var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n if (!autoScrolls[layersOut]) {\n for (var i = 0; i <= layersOut; i++) {\n if (!autoScrolls[i]) {\n autoScrolls[i] = {};\n }\n }\n }\n if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n autoScrolls[layersOut].el = el;\n autoScrolls[layersOut].vx = vx;\n autoScrolls[layersOut].vy = vy;\n clearInterval(autoScrolls[layersOut].pid);\n if (vx != 0 || vy != 0) {\n scrollThisInstance = true;\n /* jshint loopfunc:true */\n autoScrolls[layersOut].pid = setInterval(function () {\n // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n if (isFallback && this.layer === 0) {\n Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n }\n var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n if (typeof scrollCustomFn === 'function') {\n if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n return;\n }\n }\n scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n }.bind({\n layer: layersOut\n }), 24);\n }\n }\n layersOut++;\n } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n var originalEvent = _ref.originalEvent,\n putSortable = _ref.putSortable,\n dragEl = _ref.dragEl,\n activeSortable = _ref.activeSortable,\n dispatchSortableEvent = _ref.dispatchSortableEvent,\n hideGhostForTarget = _ref.hideGhostForTarget,\n unhideGhostForTarget = _ref.unhideGhostForTarget;\n if (!originalEvent) return;\n var toSortable = putSortable || activeSortable;\n hideGhostForTarget();\n var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n var target = document.elementFromPoint(touch.clientX, touch.clientY);\n unhideGhostForTarget();\n if (toSortable && !toSortable.el.contains(target)) {\n dispatchSortableEvent('spill');\n this.onSpill({\n dragEl: dragEl,\n putSortable: putSortable\n });\n }\n};\nfunction Revert() {}\nRevert.prototype = {\n startIndex: null,\n dragStart: function dragStart(_ref2) {\n var oldDraggableIndex = _ref2.oldDraggableIndex;\n this.startIndex = oldDraggableIndex;\n },\n onSpill: function onSpill(_ref3) {\n var dragEl = _ref3.dragEl,\n putSortable = _ref3.putSortable;\n this.sortable.captureAnimationState();\n if (putSortable) {\n putSortable.captureAnimationState();\n }\n var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n if (nextSibling) {\n this.sortable.el.insertBefore(dragEl, nextSibling);\n } else {\n this.sortable.el.appendChild(dragEl);\n }\n this.sortable.animateAll();\n if (putSortable) {\n putSortable.animateAll();\n }\n },\n drop: drop\n};\n_extends(Revert, {\n pluginName: 'revertOnSpill'\n});\nfunction Remove() {}\nRemove.prototype = {\n onSpill: function onSpill(_ref4) {\n var dragEl = _ref4.dragEl,\n putSortable = _ref4.putSortable;\n var parentSortable = putSortable || this.sortable;\n parentSortable.captureAnimationState();\n dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n parentSortable.animateAll();\n },\n drop: drop\n};\n_extends(Remove, {\n pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\nfunction SwapPlugin() {\n function Swap() {\n this.defaults = {\n swapClass: 'sortable-swap-highlight'\n };\n }\n Swap.prototype = {\n dragStart: function dragStart(_ref) {\n var dragEl = _ref.dragEl;\n lastSwapEl = dragEl;\n },\n dragOverValid: function dragOverValid(_ref2) {\n var completed = _ref2.completed,\n target = _ref2.target,\n onMove = _ref2.onMove,\n activeSortable = _ref2.activeSortable,\n changed = _ref2.changed,\n cancel = _ref2.cancel;\n if (!activeSortable.options.swap) return;\n var el = this.sortable.el,\n options = this.options;\n if (target && target !== el) {\n var prevSwapEl = lastSwapEl;\n if (onMove(target) !== false) {\n toggleClass(target, options.swapClass, true);\n lastSwapEl = target;\n } else {\n lastSwapEl = null;\n }\n if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n toggleClass(prevSwapEl, options.swapClass, false);\n }\n }\n changed();\n completed(true);\n cancel();\n },\n drop: function drop(_ref3) {\n var activeSortable = _ref3.activeSortable,\n putSortable = _ref3.putSortable,\n dragEl = _ref3.dragEl;\n var toSortable = putSortable || this.sortable;\n var options = this.options;\n lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n if (dragEl !== lastSwapEl) {\n toSortable.captureAnimationState();\n if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n swapNodes(dragEl, lastSwapEl);\n toSortable.animateAll();\n if (toSortable !== activeSortable) activeSortable.animateAll();\n }\n }\n },\n nulling: function nulling() {\n lastSwapEl = null;\n }\n };\n return _extends(Swap, {\n pluginName: 'swap',\n eventProperties: function eventProperties() {\n return {\n swapItem: lastSwapEl\n };\n }\n });\n}\nfunction swapNodes(n1, n2) {\n var p1 = n1.parentNode,\n p2 = n2.parentNode,\n i1,\n i2;\n if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n i1 = index(n1);\n i2 = index(n2);\n if (p1.isEqualNode(p2) && i1 < i2) {\n i2++;\n }\n p1.insertBefore(n2, p1.children[i1]);\n p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n multiDragClones = [],\n lastMultiDragSelect,\n // for selection with modifier key down (SHIFT)\n multiDragSortable,\n initialFolding = false,\n // Initial multi-drag fold when drag started\n folding = false,\n // Folding any other time\n dragStarted = false,\n dragEl$1,\n clonesFromRect,\n clonesHidden;\nfunction MultiDragPlugin() {\n function MultiDrag(sortable) {\n // Bind all private methods\n for (var fn in this) {\n if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n this[fn] = this[fn].bind(this);\n }\n }\n if (!sortable.options.avoidImplicitDeselect) {\n if (sortable.options.supportPointer) {\n on(document, 'pointerup', this._deselectMultiDrag);\n } else {\n on(document, 'mouseup', this._deselectMultiDrag);\n on(document, 'touchend', this._deselectMultiDrag);\n }\n }\n on(document, 'keydown', this._checkKeyDown);\n on(document, 'keyup', this._checkKeyUp);\n this.defaults = {\n selectedClass: 'sortable-selected',\n multiDragKey: null,\n avoidImplicitDeselect: false,\n setData: function setData(dataTransfer, dragEl) {\n var data = '';\n if (multiDragElements.length && multiDragSortable === sortable) {\n multiDragElements.forEach(function (multiDragElement, i) {\n data += (!i ? '' : ', ') + multiDragElement.textContent;\n });\n } else {\n data = dragEl.textContent;\n }\n dataTransfer.setData('Text', data);\n }\n };\n }\n MultiDrag.prototype = {\n multiDragKeyDown: false,\n isMultiDrag: false,\n delayStartGlobal: function delayStartGlobal(_ref) {\n var dragged = _ref.dragEl;\n dragEl$1 = dragged;\n },\n delayEnded: function delayEnded() {\n this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n },\n setupClone: function setupClone(_ref2) {\n var sortable = _ref2.sortable,\n cancel = _ref2.cancel;\n if (!this.isMultiDrag) return;\n for (var i = 0; i < multiDragElements.length; i++) {\n multiDragClones.push(clone(multiDragElements[i]));\n multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n multiDragClones[i].draggable = false;\n multiDragClones[i].style['will-change'] = '';\n toggleClass(multiDragClones[i], this.options.selectedClass, false);\n multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n }\n sortable._hideClone();\n cancel();\n },\n clone: function clone(_ref3) {\n var sortable = _ref3.sortable,\n rootEl = _ref3.rootEl,\n dispatchSortableEvent = _ref3.dispatchSortableEvent,\n cancel = _ref3.cancel;\n if (!this.isMultiDrag) return;\n if (!this.options.removeCloneOnHide) {\n if (multiDragElements.length && multiDragSortable === sortable) {\n insertMultiDragClones(true, rootEl);\n dispatchSortableEvent('clone');\n cancel();\n }\n }\n },\n showClone: function showClone(_ref4) {\n var cloneNowShown = _ref4.cloneNowShown,\n rootEl = _ref4.rootEl,\n cancel = _ref4.cancel;\n if (!this.isMultiDrag) return;\n insertMultiDragClones(false, rootEl);\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', '');\n });\n cloneNowShown();\n clonesHidden = false;\n cancel();\n },\n hideClone: function hideClone(_ref5) {\n var _this = this;\n var sortable = _ref5.sortable,\n cloneNowHidden = _ref5.cloneNowHidden,\n cancel = _ref5.cancel;\n if (!this.isMultiDrag) return;\n multiDragClones.forEach(function (clone) {\n css(clone, 'display', 'none');\n if (_this.options.removeCloneOnHide && clone.parentNode) {\n clone.parentNode.removeChild(clone);\n }\n });\n cloneNowHidden();\n clonesHidden = true;\n cancel();\n },\n dragStartGlobal: function dragStartGlobal(_ref6) {\n var sortable = _ref6.sortable;\n if (!this.isMultiDrag && multiDragSortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n }\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.sortableIndex = index(multiDragElement);\n });\n\n // Sort multi-drag elements\n multiDragElements = multiDragElements.sort(function (a, b) {\n return a.sortableIndex - b.sortableIndex;\n });\n dragStarted = true;\n },\n dragStarted: function dragStarted(_ref7) {\n var _this2 = this;\n var sortable = _ref7.sortable;\n if (!this.isMultiDrag) return;\n if (this.options.sort) {\n // Capture rects,\n // hide multi drag elements (by positioning them absolute),\n // set multi drag elements rects to dragRect,\n // show multi drag elements,\n // animate to rects,\n // unset rects & remove from DOM\n\n sortable.captureAnimationState();\n if (this.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n css(multiDragElement, 'position', 'absolute');\n });\n var dragRect = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRect);\n });\n folding = true;\n initialFolding = true;\n }\n }\n sortable.animateAll(function () {\n folding = false;\n initialFolding = false;\n if (_this2.options.animation) {\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n }\n\n // Remove all auxiliary multidrag items from el, if sorting enabled\n if (_this2.options.sort) {\n removeMultiDragElements();\n }\n });\n },\n dragOver: function dragOver(_ref8) {\n var target = _ref8.target,\n completed = _ref8.completed,\n cancel = _ref8.cancel;\n if (folding && ~multiDragElements.indexOf(target)) {\n completed(false);\n cancel();\n }\n },\n revert: function revert(_ref9) {\n var fromSortable = _ref9.fromSortable,\n rootEl = _ref9.rootEl,\n sortable = _ref9.sortable,\n dragRect = _ref9.dragRect;\n if (multiDragElements.length > 1) {\n // Setup unfold animation\n multiDragElements.forEach(function (multiDragElement) {\n sortable.addAnimationState({\n target: multiDragElement,\n rect: folding ? getRect(multiDragElement) : dragRect\n });\n unsetRect(multiDragElement);\n multiDragElement.fromRect = dragRect;\n fromSortable.removeAnimationState(multiDragElement);\n });\n folding = false;\n insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n }\n },\n dragOverCompleted: function dragOverCompleted(_ref10) {\n var sortable = _ref10.sortable,\n isOwner = _ref10.isOwner,\n insertion = _ref10.insertion,\n activeSortable = _ref10.activeSortable,\n parentEl = _ref10.parentEl,\n putSortable = _ref10.putSortable;\n var options = this.options;\n if (insertion) {\n // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n if (isOwner) {\n activeSortable._hideClone();\n }\n initialFolding = false;\n // If leaving sort:false root, or already folding - Fold to new location\n if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n setRect(multiDragElement, dragRectAbsolute);\n\n // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n parentEl.appendChild(multiDragElement);\n });\n folding = true;\n }\n\n // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n if (!isOwner) {\n // Only remove if not folding (folding will remove them anyways)\n if (!folding) {\n removeMultiDragElements();\n }\n if (multiDragElements.length > 1) {\n var clonesHiddenBefore = clonesHidden;\n activeSortable._showClone(sortable);\n\n // Unfold animation for clones if showing from hidden\n if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n multiDragClones.forEach(function (clone) {\n activeSortable.addAnimationState({\n target: clone,\n rect: clonesFromRect\n });\n clone.fromRect = clonesFromRect;\n clone.thisAnimationDuration = null;\n });\n }\n } else {\n activeSortable._showClone(sortable);\n }\n }\n }\n },\n dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n var dragRect = _ref11.dragRect,\n isOwner = _ref11.isOwner,\n activeSortable = _ref11.activeSortable;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n });\n if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n clonesFromRect = _extends({}, dragRect);\n var dragMatrix = matrix(dragEl$1, true);\n clonesFromRect.top -= dragMatrix.f;\n clonesFromRect.left -= dragMatrix.e;\n }\n },\n dragOverAnimationComplete: function dragOverAnimationComplete() {\n if (folding) {\n folding = false;\n removeMultiDragElements();\n }\n },\n drop: function drop(_ref12) {\n var evt = _ref12.originalEvent,\n rootEl = _ref12.rootEl,\n parentEl = _ref12.parentEl,\n sortable = _ref12.sortable,\n dispatchSortableEvent = _ref12.dispatchSortableEvent,\n oldIndex = _ref12.oldIndex,\n putSortable = _ref12.putSortable;\n var toSortable = putSortable || this.sortable;\n if (!evt) return;\n var options = this.options,\n children = parentEl.children;\n\n // Multi-drag selection\n if (!dragStarted) {\n if (options.multiDragKey && !this.multiDragKeyDown) {\n this._deselectMultiDrag();\n }\n toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n if (!~multiDragElements.indexOf(dragEl$1)) {\n multiDragElements.push(dragEl$1);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n\n // Modifier activated, select from last to dragEl\n if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n var lastIndex = index(lastMultiDragSelect),\n currentIndex = index(dragEl$1);\n if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n (function () {\n // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n // (but previous selection existed)\n var n, i;\n if (currentIndex > lastIndex) {\n i = lastIndex;\n n = currentIndex;\n } else {\n i = currentIndex;\n n = lastIndex + 1;\n }\n var filter = options.filter;\n for (; i < n; i++) {\n if (~multiDragElements.indexOf(children[i])) continue;\n // Check if element is draggable\n if (!closest(children[i], options.draggable, parentEl, false)) continue;\n // Check if element is filtered\n var filtered = filter && (typeof filter === 'function' ? filter.call(sortable, evt, children[i], sortable) : filter.split(',').some(function (criteria) {\n return closest(children[i], criteria.trim(), parentEl, false);\n }));\n if (filtered) continue;\n toggleClass(children[i], options.selectedClass, true);\n multiDragElements.push(children[i]);\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'select',\n targetEl: children[i],\n originalEvent: evt\n });\n }\n })();\n }\n } else {\n lastMultiDragSelect = dragEl$1;\n }\n multiDragSortable = toSortable;\n } else {\n multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n lastMultiDragSelect = null;\n dispatchEvent({\n sortable: sortable,\n rootEl: rootEl,\n name: 'deselect',\n targetEl: dragEl$1,\n originalEvent: evt\n });\n }\n }\n\n // Multi-drag drop\n if (dragStarted && this.isMultiDrag) {\n folding = false;\n // Do not \"unfold\" after around dragEl if reverted\n if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n var dragRect = getRect(dragEl$1),\n multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n toSortable.captureAnimationState();\n if (!initialFolding) {\n if (options.animation) {\n dragEl$1.fromRect = dragRect;\n multiDragElements.forEach(function (multiDragElement) {\n multiDragElement.thisAnimationDuration = null;\n if (multiDragElement !== dragEl$1) {\n var rect = folding ? getRect(multiDragElement) : dragRect;\n multiDragElement.fromRect = rect;\n\n // Prepare unfold animation\n toSortable.addAnimationState({\n target: multiDragElement,\n rect: rect\n });\n }\n });\n }\n\n // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n // properly they must all be removed\n removeMultiDragElements();\n multiDragElements.forEach(function (multiDragElement) {\n if (children[multiDragIndex]) {\n parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n } else {\n parentEl.appendChild(multiDragElement);\n }\n multiDragIndex++;\n });\n\n // If initial folding is done, the elements may have changed position because they are now\n // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n // must be fired here as Sortable will not.\n if (oldIndex === index(dragEl$1)) {\n var update = false;\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n update = true;\n return;\n }\n });\n if (update) {\n dispatchSortableEvent('update');\n dispatchSortableEvent('sort');\n }\n }\n }\n\n // Must be done after capturing individual rects (scroll bar)\n multiDragElements.forEach(function (multiDragElement) {\n unsetRect(multiDragElement);\n });\n toSortable.animateAll();\n }\n multiDragSortable = toSortable;\n }\n\n // Remove clones if necessary\n if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n multiDragClones.forEach(function (clone) {\n clone.parentNode && clone.parentNode.removeChild(clone);\n });\n }\n },\n nullingGlobal: function nullingGlobal() {\n this.isMultiDrag = dragStarted = false;\n multiDragClones.length = 0;\n },\n destroyGlobal: function destroyGlobal() {\n this._deselectMultiDrag();\n off(document, 'pointerup', this._deselectMultiDrag);\n off(document, 'mouseup', this._deselectMultiDrag);\n off(document, 'touchend', this._deselectMultiDrag);\n off(document, 'keydown', this._checkKeyDown);\n off(document, 'keyup', this._checkKeyUp);\n },\n _deselectMultiDrag: function _deselectMultiDrag(evt) {\n if (typeof dragStarted !== \"undefined\" && dragStarted) return;\n\n // Only deselect if selection is in this sortable\n if (multiDragSortable !== this.sortable) return;\n\n // Only deselect if target is not item in this sortable\n if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;\n\n // Only deselect if left click\n if (evt && evt.button !== 0) return;\n while (multiDragElements.length) {\n var el = multiDragElements[0];\n toggleClass(el, this.options.selectedClass, false);\n multiDragElements.shift();\n dispatchEvent({\n sortable: this.sortable,\n rootEl: this.sortable.el,\n name: 'deselect',\n targetEl: el,\n originalEvent: evt\n });\n }\n },\n _checkKeyDown: function _checkKeyDown(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = true;\n }\n },\n _checkKeyUp: function _checkKeyUp(evt) {\n if (evt.key === this.options.multiDragKey) {\n this.multiDragKeyDown = false;\n }\n }\n };\n return _extends(MultiDrag, {\n // Static methods & properties\n pluginName: 'multiDrag',\n utils: {\n /**\r\n * Selects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be selected\r\n */\n select: function select(el) {\n var sortable = el.parentNode[expando];\n if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n if (multiDragSortable && multiDragSortable !== sortable) {\n multiDragSortable.multiDrag._deselectMultiDrag();\n multiDragSortable = sortable;\n }\n toggleClass(el, sortable.options.selectedClass, true);\n multiDragElements.push(el);\n },\n /**\r\n * Deselects the provided multi-drag item\r\n * @param {HTMLElement} el The element to be deselected\r\n */\n deselect: function deselect(el) {\n var sortable = el.parentNode[expando],\n index = multiDragElements.indexOf(el);\n if (!sortable || !sortable.options.multiDrag || !~index) return;\n toggleClass(el, sortable.options.selectedClass, false);\n multiDragElements.splice(index, 1);\n }\n },\n eventProperties: function eventProperties() {\n var _this3 = this;\n var oldIndicies = [],\n newIndicies = [];\n multiDragElements.forEach(function (multiDragElement) {\n oldIndicies.push({\n multiDragElement: multiDragElement,\n index: multiDragElement.sortableIndex\n });\n\n // multiDragElements will already be sorted if folding\n var newIndex;\n if (folding && multiDragElement !== dragEl$1) {\n newIndex = -1;\n } else if (folding) {\n newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n } else {\n newIndex = index(multiDragElement);\n }\n newIndicies.push({\n multiDragElement: multiDragElement,\n index: newIndex\n });\n });\n return {\n items: _toConsumableArray(multiDragElements),\n clones: [].concat(multiDragClones),\n oldIndicies: oldIndicies,\n newIndicies: newIndicies\n };\n },\n optionListeners: {\n multiDragKey: function multiDragKey(key) {\n key = key.toLowerCase();\n if (key === 'ctrl') {\n key = 'Control';\n } else if (key.length > 1) {\n key = key.charAt(0).toUpperCase() + key.substr(1);\n }\n return key;\n }\n }\n });\n}\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n multiDragElements.forEach(function (multiDragElement, i) {\n var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(multiDragElement, target);\n } else {\n rootEl.appendChild(multiDragElement);\n }\n });\n}\n\n/**\r\n * Insert multi-drag clones\r\n * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted\r\n * @param {HTMLElement} rootEl\r\n */\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n multiDragClones.forEach(function (clone, i) {\n var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n if (target) {\n rootEl.insertBefore(clone, target);\n } else {\n rootEl.appendChild(clone);\n }\n });\n}\nfunction removeMultiDragElements() {\n multiDragElements.forEach(function (multiDragElement) {\n if (multiDragElement === dragEl$1) return;\n multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\nexport default Sortable;\nexport { MultiDragPlugin as MultiDrag, Sortable, SwapPlugin as Swap };\n", "import Sortable from \"sortablejs\";\n\n(() => {\n const Rails = window.Rails;\n const DATA_ID_ATTRIBUTE = \"data-id\";\n\n const sortableStore = {\n get(sortable) {\n return Array.from(sortable.el.children, (el) =>\n el.getAttribute(DATA_ID_ATTRIBUTE)\n );\n },\n set(sortable) {\n fetch(`${CMS.current_path}/reorder`, {\n body: JSON.stringify({ order: sortable.toArray() }),\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-CSRF-Token\": Rails.csrfToken(),\n },\n credentials: \"same-origin\",\n method: \"PUT\",\n });\n },\n };\n\n const sortableInstances = [];\n window.CMS.sortableList = {\n init(root = document) {\n for (const sortableRoot of root.querySelectorAll(\".sortable\")) {\n sortableInstances.push(\n Sortable.create(sortableRoot, {\n handle: \".dragger\",\n draggable: \"li\",\n dataIdAttr: DATA_ID_ATTRIBUTE,\n store: sortableStore,\n onStart: (evt) => evt.from.classList.add(\"sortable-active\"),\n onEnd: (evt) => evt.from.classList.remove(\"sortable-active\"),\n })\n );\n }\n },\n dispose() {\n for (const sortable of sortableInstances) {\n sortable.destroy();\n }\n sortableInstances.length = 0;\n },\n };\n})();\n", "(() => {\n const SLUGIFY_REPLACEMENTS = [\n [/[\u00E0\u00E1\u00E2\u00E3]/g, 'a'],\n [/\u00E4/g, 'ae'],\n [/[\u00E8\u00E9\u00EB\u00EA]/g, 'e'],\n [/[\u00EC\u00ED\u00EF\u00EE]/g, 'i'],\n [/[\u00F2\u00F3\u00F4\u00F5]/g, 'o'],\n [/\u00F6/g, 'oe'],\n [/[\u00F9\u00FA\u00FB]/g, 'u'],\n [/\u00FC/g, 'ue'],\n [/\u00F1/g, 'n'],\n [/\u00E7/g, 'c'],\n [/\u00DF/g, 'ss'],\n [/[\u00B7\\/,:;_ ]/g, '-']\n ];\n\n const slugifyValue = (value) => {\n let slug = value.trim().toLowerCase();\n for (const [from, to] of SLUGIFY_REPLACEMENTS) {\n slug = slug.replace(from, to);\n }\n // Remove any other URL incompatible characters and replace multiple dashes with just a single one.\n return slug.replace(/[^a-z0-9-]/g, '').replace(/-+/g, '-');\n };\n\n window.CMS.slugify = () => {\n const input = document.querySelector('input[data-slugify=true]');\n const slugInput = document.querySelector('input[data-slug]');\n if (input === null || slugInput === null) return;\n input.addEventListener('input', () => {\n slugInput.value = slugifyValue(input.value);\n });\n };\n})();\n", "export var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n", "export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n", "export var pad = function (number, length) {\n if (length === void 0) { length = 2; }\n return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n}\nexport var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n};\n", "export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n", "import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport var formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function (date) { return pad(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function (date) { return pad(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return pad(date.getFullYear(), 4); },\n d: function (date) { return pad(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return pad(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return pad(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n", "import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n};\nexport var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n}\n", "\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n}\n", "var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return getEventTarget(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n compareDates(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n", "import flatpickr from \"flatpickr\";\n\n(() => {\n const flatpickrInstances = [];\n window.CMS.timepicker = {\n init(root = document) {\n const datetimes = root.querySelectorAll(\n \"input[type=text][data-cms-datetime]\"\n );\n const dates = root.querySelectorAll(\"input[type=text][data-cms-date]\");\n if (datetimes.length === 0 && dates.length === 0) return;\n const locale = CMS.getLocale();\n for (const datetime of datetimes) {\n flatpickrInstances.push(\n flatpickr(datetime, {\n format: \"yyyy-mm-dd hh:ii\",\n enableTime: true,\n locale: locale,\n })\n );\n }\n for (const date of dates) {\n flatpickrInstances.push(\n flatpickr(date, {\n format: \"yyyy-mm-dd\",\n locale: locale,\n })\n );\n }\n },\n dispose() {\n for (const flatpickrInstance of flatpickrInstances) {\n flatpickrInstance.destroy();\n }\n flatpickrInstances.length = 0;\n },\n };\n})();\n", "import jQuery from \"jquery\";\nimport Rails from \"@rails/ujs\";\n\nimport \"../../vendor/redactor\";\nimport \"../../vendor/redactor/filemanager\";\nimport \"../../vendor/redactor/imagemanager\";\nimport \"../../vendor/redactor/definedlinks\";\nimport \"../../vendor/redactor/table\";\nimport \"../../vendor/redactor/video\";\n\n(() => {\n const buildRedactorOptions = () => {\n const fileUploadPath = document.querySelector(\n 'meta[name=\"cms-file-upload-path\"]'\n ).content;\n const pagesPath = document.querySelector(\n 'meta[name=\"cms-pages-path\"]'\n ).content;\n const csrfParam = Rails.csrfParam();\n const csrfToken = Rails.csrfToken();\n\n const imageUpload = new URL(fileUploadPath, document.location.href);\n imageUpload.searchParams.set(\"source\", \"redactor\");\n imageUpload.searchParams.set(\"type\", \"image\");\n imageUpload.searchParams.set(csrfParam, csrfToken);\n\n const imageManagerJson = new URL(fileUploadPath, document.location.href);\n imageManagerJson.searchParams.set(\"source\", \"redactor\");\n imageManagerJson.searchParams.set(\"type\", \"image\");\n\n const fileUpload = new URL(fileUploadPath, document.location.href);\n fileUpload.searchParams.set(\"source\", \"redactor\");\n fileUpload.searchParams.set(\"type\", \"file\");\n fileUpload.searchParams.set(csrfParam, csrfToken);\n\n const fileManagerJson = new URL(fileUploadPath, document.location.href);\n fileManagerJson.searchParams.set(\"source\", \"redactor\");\n fileManagerJson.searchParams.set(\"type\", \"file\");\n\n const definedLinks = new URL(pagesPath, document.location.href);\n definedLinks.searchParams.set(\"source\", \"redactor\");\n\n return {\n minHeight: 160,\n autoresize: true,\n buttonSource: true,\n formatting: [\"p\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"],\n plugins: [\n \"imagemanager\",\n \"filemanager\",\n \"table\",\n \"video\",\n \"definedlinks\",\n ],\n lang: CMS.getLocale(),\n convertDivs: false,\n imageUpload,\n imageManagerJson,\n fileUpload,\n fileManagerJson,\n definedLinks,\n // allow unsafe tags and the like (prevent redactor stripping divs and other elements)\n cleanOnEnter: false,\n replaceTags: false,\n removeComments: false,\n removeNewLines: false,\n deniedTags: [],\n replaceDivs: false,\n };\n };\n\n const redactorInstances = [];\n window.CMS.wysiwyg = {\n init(root = document) {\n const textareas = root.querySelectorAll(\n \"textarea.rich-text-editor, textarea[data-cms-rich-text]\"\n );\n if (textareas.length === 0) return;\n const redactorOptions = buildRedactorOptions();\n for (const textarea of textareas) {\n redactorInstances.push(new jQuery.Redactor(textarea, redactorOptions));\n }\n },\n dispose() {\n for (const redactor of redactorInstances) {\n redactor.core.destroy();\n }\n redactorInstances.length = 0;\n },\n };\n})();\n", "/*\n\tRedactor 10.2.5\n\tUpdated: October 1, 2015\n\n\thttp://imperavi.com/redactor/\n\n\tCopyright (c) 2009-2015, Imperavi LLC.\n\tLicense: http://imperavi.com/redactor/license/\n\n\tUsage: $('#content').redactor();\n\n\tNOTE: This is the most recent editor we have licence for. There are inline\n\tfixes and tweaks annotated with \"COMFY FIX\"\n*/\n\nimport jQuery from \"jquery\";\n\n(function ($) {\n \"use strict\";\n\n if (!Function.prototype.bind) {\n Function.prototype.bind = function (scope) {\n var fn = this;\n return function () {\n return fn.apply(scope);\n };\n };\n }\n\n var uuid = 0;\n\n // Plugin\n $.fn.redactor = function (options) {\n var val = [];\n var args = Array.prototype.slice.call(arguments, 1);\n\n if (typeof options === \"string\") {\n this.each(function () {\n var instance = $.data(this, \"redactor\");\n var func;\n\n if (options.search(/\\./) != \"-1\") {\n func = options.split(\".\");\n if (typeof instance[func[0]] != \"undefined\") {\n func = instance[func[0]][func[1]];\n }\n } else {\n func = instance[options];\n }\n\n if (typeof instance !== \"undefined\" && $.isFunction(func)) {\n var methodVal = func.apply(instance, args);\n if (methodVal !== undefined && methodVal !== instance) {\n val.push(methodVal);\n }\n } else {\n $.error('No such method \"' + options + '\" for Redactor');\n }\n });\n } else {\n this.each(function () {\n $.data(this, \"redactor\", {});\n $.data(this, \"redactor\", Redactor(this, options));\n });\n }\n\n if (val.length === 0) return this;\n else if (val.length === 1) return val[0];\n else return val;\n };\n\n // Initialization\n function Redactor(el, options) {\n return new Redactor.prototype.init(el, options);\n }\n\n // Functionality\n $.Redactor = Redactor;\n $.Redactor.VERSION = \"10.2.5\";\n $.Redactor.modules = [\n \"alignment\",\n \"autosave\",\n \"block\",\n \"buffer\",\n \"build\",\n \"button\",\n \"caret\",\n \"clean\",\n \"code\",\n \"core\",\n \"dropdown\",\n \"file\",\n \"focus\",\n \"image\",\n \"indent\",\n \"inline\",\n \"insert\",\n \"keydown\",\n \"keyup\",\n \"lang\",\n \"line\",\n \"link\",\n \"linkify\",\n \"list\",\n \"modal\",\n \"observe\",\n \"paragraphize\",\n \"paste\",\n \"placeholder\",\n \"progress\",\n \"selection\",\n \"shortcuts\",\n \"tabifier\",\n \"tidy\",\n \"toolbar\",\n \"upload\",\n \"utils\",\n ];\n\n $.Redactor.opts = {\n // settings\n lang: \"en\",\n direction: \"ltr\", // ltr or rtl\n\n plugins: false, // array\n\n focus: false,\n focusEnd: false,\n\n placeholder: false,\n\n visual: true,\n tabindex: false,\n\n minHeight: false,\n maxHeight: false,\n\n linebreaks: false,\n replaceDivs: true,\n paragraphize: true,\n cleanStyleOnEnter: false,\n enterKey: true,\n\n cleanOnPaste: true,\n cleanSpaces: true,\n pastePlainText: false,\n\n autosave: false, // false or url\n autosaveName: false,\n autosaveInterval: 60, // seconds\n autosaveOnChange: false,\n autosaveFields: false,\n\n linkTooltip: true,\n linkProtocol: \"http\",\n linkNofollow: false,\n linkSize: 50,\n\n imageEditable: true,\n imageLink: true,\n imagePosition: true,\n imageFloatMargin: \"10px\",\n imageResizable: true,\n\n imageUpload: null,\n imageUploadParam: \"file\",\n\n uploadImageField: false,\n\n dragImageUpload: true,\n\n fileUpload: null,\n fileUploadParam: \"file\",\n\n dragFileUpload: true,\n\n s3: false,\n\n convertLinks: true,\n convertUrlLinks: true,\n convertImageLinks: true,\n convertVideoLinks: true,\n\n preSpaces: 4, // or false\n tabAsSpaces: false, // true or number of spaces\n tabKey: true,\n\n scrollTarget: false,\n\n toolbar: true,\n toolbarFixed: true,\n toolbarFixedTarget: document,\n toolbarFixedTopOffset: 0, // pixels\n toolbarExternal: false, // ID selector\n toolbarOverflow: false,\n\n source: true,\n buttons: [\n \"html\",\n \"formatting\",\n \"bold\",\n \"italic\",\n \"deleted\",\n \"unorderedlist\",\n \"orderedlist\",\n \"outdent\",\n \"indent\",\n \"image\",\n \"file\",\n \"link\",\n \"alignment\",\n \"horizontalrule\",\n ], // + 'underline'\n\n buttonsHide: [],\n buttonsHideOnMobile: [],\n\n formatting: [\"p\", \"blockquote\", \"pre\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"],\n formattingAdd: false,\n\n tabifier: true,\n\n deniedTags: [\"script\", \"style\"],\n allowedTags: false, // or array\n\n paragraphizeBlocks: [\n \"table\",\n \"div\",\n \"pre\",\n \"form\",\n \"ul\",\n \"ol\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"dl\",\n \"blockquote\",\n \"figcaption\",\n \"address\",\n \"section\",\n \"header\",\n \"footer\",\n \"aside\",\n \"article\",\n \"object\",\n \"style\",\n \"script\",\n \"iframe\",\n \"select\",\n \"input\",\n \"textarea\",\n \"button\",\n \"option\",\n \"map\",\n \"area\",\n \"math\",\n \"hr\",\n \"fieldset\",\n \"legend\",\n \"hgroup\",\n \"nav\",\n \"figure\",\n \"details\",\n \"menu\",\n \"summary\",\n \"p\",\n ],\n\n removeComments: false,\n replaceTags: [\n [\"strike\", \"del\"],\n [\"b\", \"strong\"],\n ],\n replaceStyles: [\n [\"font-weight:\\\\s?bold\", \"strong\"],\n [\"font-style:\\\\s?italic\", \"em\"],\n [\"text-decoration:\\\\s?underline\", \"u\"],\n [\"text-decoration:\\\\s?line-through\", \"del\"],\n ],\n removeDataAttr: false,\n\n removeAttr: false, // or multi array\n allowedAttr: false, // or multi array\n\n removeWithoutAttr: [\"span\"], // or false\n removeEmpty: [\"p\"], // or false;\n\n activeButtons: [\n \"deleted\",\n \"italic\",\n \"bold\",\n \"underline\",\n \"unorderedlist\",\n \"orderedlist\",\n \"alignleft\",\n \"aligncenter\",\n \"alignright\",\n \"justify\",\n ],\n activeButtonsStates: {\n b: \"bold\",\n strong: \"bold\",\n i: \"italic\",\n em: \"italic\",\n del: \"deleted\",\n strike: \"deleted\",\n ul: \"unorderedlist\",\n ol: \"orderedlist\",\n u: \"underline\",\n },\n\n shortcuts: {\n \"ctrl+shift+m, meta+shift+m\": { func: \"inline.removeFormat\" },\n \"ctrl+b, meta+b\": { func: \"inline.format\", params: [\"bold\"] },\n \"ctrl+i, meta+i\": { func: \"inline.format\", params: [\"italic\"] },\n \"ctrl+h, meta+h\": { func: \"inline.format\", params: [\"superscript\"] },\n \"ctrl+l, meta+l\": { func: \"inline.format\", params: [\"subscript\"] },\n \"ctrl+k, meta+k\": { func: \"link.show\" },\n \"ctrl+shift+7\": { func: \"list.toggle\", params: [\"orderedlist\"] },\n \"ctrl+shift+8\": { func: \"list.toggle\", params: [\"unorderedlist\"] },\n },\n shortcutsAdd: false,\n\n // private\n buffer: [],\n rebuffer: [],\n emptyHtml: \"

    \",\n invisibleSpace: \"​\",\n imageTypes: [\"image/png\", \"image/jpeg\", \"image/gif\"],\n indentValue: 20,\n verifiedTags: [\n \"a\",\n \"img\",\n \"b\",\n \"strong\",\n \"sub\",\n \"sup\",\n \"i\",\n \"em\",\n \"u\",\n \"small\",\n \"strike\",\n \"del\",\n \"cite\",\n \"ul\",\n \"ol\",\n \"li\",\n ], // and for span tag special rule\n inlineTags: [\n \"strong\",\n \"b\",\n \"u\",\n \"em\",\n \"i\",\n \"code\",\n \"del\",\n \"ins\",\n \"samp\",\n \"kbd\",\n \"sup\",\n \"sub\",\n \"mark\",\n \"var\",\n \"cite\",\n \"small\",\n ],\n alignmentTags: [\n \"P\",\n \"H1\",\n \"H2\",\n \"H3\",\n \"H4\",\n \"H5\",\n \"H6\",\n \"DL\",\n \"DT\",\n \"DD\",\n \"DIV\",\n \"TD\",\n \"BLOCKQUOTE\",\n \"OUTPUT\",\n \"FIGCAPTION\",\n \"ADDRESS\",\n \"SECTION\",\n \"HEADER\",\n \"FOOTER\",\n \"ASIDE\",\n \"ARTICLE\",\n ],\n blockLevelElements: [\"PRE\", \"UL\", \"OL\", \"LI\"],\n highContrast: false,\n observe: {\n dropdowns: [],\n },\n\n // lang\n langs: {\n en: {\n html: \"HTML\",\n video: \"Insert Video\",\n image: \"Insert Image\",\n table: \"Table\",\n link: \"Link\",\n link_insert: \"Insert link\",\n link_edit: \"Edit link\",\n unlink: \"Unlink\",\n formatting: \"Formatting\",\n paragraph: \"Normal text\",\n quote: \"Quote\",\n code: \"Code\",\n header1: \"Header 1\",\n header2: \"Header 2\",\n header3: \"Header 3\",\n header4: \"Header 4\",\n header5: \"Header 5\",\n bold: \"Bold\",\n italic: \"Italic\",\n fontcolor: \"Font Color\",\n backcolor: \"Back Color\",\n unorderedlist: \"Unordered List\",\n orderedlist: \"Ordered List\",\n outdent: \"Outdent\",\n indent: \"Indent\",\n cancel: \"Cancel\",\n insert: \"Insert\",\n save: \"Save\",\n _delete: \"Delete\",\n insert_table: \"Insert Table\",\n insert_row_above: \"Add Row Above\",\n insert_row_below: \"Add Row Below\",\n insert_column_left: \"Add Column Left\",\n insert_column_right: \"Add Column Right\",\n delete_column: \"Delete Column\",\n delete_row: \"Delete Row\",\n delete_table: \"Delete Table\",\n rows: \"Rows\",\n columns: \"Columns\",\n add_head: \"Add Head\",\n delete_head: \"Delete Head\",\n title: \"Title\",\n image_position: \"Position\",\n none: \"None\",\n left: \"Left\",\n right: \"Right\",\n center: \"Center\",\n image_web_link: \"Image Web Link\",\n text: \"Text\",\n mailto: \"Email\",\n web: \"URL\",\n video_html_code: \"Video Embed Code or Youtube/Vimeo Link\",\n file: \"Insert File\",\n upload: \"Upload\",\n download: \"Download\",\n choose: \"Choose\",\n or_choose: \"Or choose\",\n drop_file_here: \"Drop file here\",\n align_left: \"Align text to the left\",\n align_center: \"Center text\",\n align_right: \"Align text to the right\",\n align_justify: \"Justify text\",\n horizontalrule: \"Insert Horizontal Rule\",\n deleted: \"Deleted\",\n anchor: \"Anchor\",\n link_new_tab: \"Open link in new tab\",\n underline: \"Underline\",\n alignment: \"Alignment\",\n filename: \"Name (optional)\",\n edit: \"Edit\",\n upload_label: \"Drop file here or \",\n },\n },\n\n linkify: {\n regexps: {\n youtube:\n /https?:\\/\\/(?:[0-9A-Z-]+\\.)?(?:youtu\\.be\\/|youtube\\.com\\S*[^\\w\\-\\s])([\\w\\-]{11})(?=[^\\w\\-]|$)(?![?=&+%\\w.\\-]*(?:['\"][^<>]*>|<\\/a>))[?=&+%\\w.-]*/gi,\n vimeo: /https?:\\/\\/(www\\.)?vimeo.com\\/(\\d+)($|\\/)/,\n image: /((https?|www)[^\\s]+\\.)(jpe?g|png|gif)(\\?[^\\s-]+)?/gi,\n url: /(https?:\\/\\/(?:www\\.|(?!www))[^\\s\\.]+\\.[^\\s]{2,}|www\\.[^\\s]+\\.[^\\s]{2,})/gi,\n },\n },\n\n codemirror: false,\n };\n\n // Functionality\n Redactor.fn = $.Redactor.prototype = {\n keyCode: {\n BACKSPACE: 8,\n DELETE: 46,\n UP: 38,\n DOWN: 40,\n ENTER: 13,\n SPACE: 32,\n ESC: 27,\n TAB: 9,\n CTRL: 17,\n META: 91,\n SHIFT: 16,\n ALT: 18,\n RIGHT: 39,\n LEFT: 37,\n LEFT_WIN: 91,\n },\n\n // Initialization\n init: function (el, options) {\n this.$element = $(el);\n this.uuid = uuid++;\n\n // if paste event detected = true\n this.rtePaste = false;\n this.$pasteBox = false;\n\n this.loadOptions(options);\n this.loadModules();\n\n // formatting storage\n this.formatting = {};\n\n // block level tags\n $.merge(this.opts.blockLevelElements, this.opts.alignmentTags);\n this.reIsBlock = new RegExp(\n \"^(\" + this.opts.blockLevelElements.join(\"|\") + \")$\",\n \"i\"\n );\n\n // setup allowed and denied tags\n this.tidy.setupAllowed();\n\n // setup denied tags\n if (this.opts.deniedTags !== false) {\n var tags = [\"html\", \"head\", \"link\", \"body\", \"meta\", \"applet\"];\n for (var i = 0; i < tags.length; i++) {\n this.opts.deniedTags.push(tags[i]);\n }\n }\n\n // load lang\n this.lang.load();\n\n // extend shortcuts\n $.extend(this.opts.shortcuts, this.opts.shortcutsAdd);\n\n // start callback\n this.core.setCallback(\"start\");\n\n // build\n this.start = true;\n this.build.run();\n },\n\n loadOptions: function (options) {\n this.opts = $.extend(\n {},\n $.extend(true, {}, $.Redactor.opts),\n this.$element.data(),\n options\n );\n },\n getModuleMethods: function (object) {\n return Object.getOwnPropertyNames(object).filter(function (property) {\n return typeof object[property] == \"function\";\n });\n },\n loadModules: function () {\n var len = $.Redactor.modules.length;\n for (var i = 0; i < len; i++) {\n this.bindModuleMethods($.Redactor.modules[i]);\n }\n },\n bindModuleMethods: function (module) {\n if (typeof this[module] == \"undefined\") return;\n\n // init module\n this[module] = this[module]();\n\n var methods = this.getModuleMethods(this[module]);\n var len = methods.length;\n\n // bind methods\n for (var z = 0; z < len; z++) {\n this[module][methods[z]] = this[module][methods[z]].bind(this);\n }\n },\n alignment: function () {\n return {\n left: function () {\n this.alignment.set(\"\");\n },\n right: function () {\n this.alignment.set(\"right\");\n },\n center: function () {\n this.alignment.set(\"center\");\n },\n justify: function () {\n this.alignment.set(\"justify\");\n },\n set: function (type) {\n // focus\n if (!this.utils.browser(\"msie\") && !this.opts.linebreaks) {\n this.$editor.focus();\n }\n\n // get blocks\n this.alignment.blocks = this.selection.getBlocks();\n this.alignment.type = type;\n\n this.buffer.set();\n this.selection.save();\n\n // set alignment\n if (this.alignment.isLinebreaksOrNoBlocks()) {\n this.alignment.setText();\n } else {\n this.alignment.setBlocks();\n }\n\n // sync\n this.selection.restore();\n this.code.sync();\n },\n setText: function () {\n var wrapper = this.selection.wrap(\"div\");\n $(wrapper)\n .attr(\"data-tagblock\", \"redactor\")\n .css(\"text-align\", this.alignment.type);\n },\n setBlocks: function () {\n $.each(\n this.alignment.blocks,\n $.proxy(function (i, el) {\n var $el = this.utils.getAlignmentElement(el);\n if (!$el) return;\n\n if (this.alignment.isNeedReplaceElement($el)) {\n this.alignment.replaceElement($el);\n } else {\n this.alignment.alignElement($el);\n }\n }, this)\n );\n },\n isLinebreaksOrNoBlocks: function () {\n return this.opts.linebreaks && this.alignment.blocks[0] === false;\n },\n isNeedReplaceElement: function ($el) {\n return (\n this.alignment.type === \"\" &&\n typeof $el.data(\"tagblock\") !== \"undefined\"\n );\n },\n replaceElement: function ($el) {\n $el.replaceWith($el.html());\n },\n alignElement: function ($el) {\n $el.css(\"text-align\", this.alignment.type);\n this.utils.removeEmptyAttr($el, \"style\");\n },\n };\n },\n autosave: function () {\n return {\n html: false,\n enable: function () {\n if (!this.opts.autosave) return;\n\n this.autosave.name = this.opts.autosaveName\n ? this.opts.autosaveName\n : this.$textarea.attr(\"name\");\n\n if (this.opts.autosaveOnChange) return;\n this.autosaveInterval = setInterval(\n this.autosave.load,\n this.opts.autosaveInterval * 1000\n );\n },\n onChange: function () {\n if (!this.opts.autosaveOnChange) return;\n this.autosave.load();\n },\n load: function () {\n if (!this.opts.autosave) return;\n\n this.autosave.source = this.code.get();\n\n if (this.autosave.html === this.autosave.source) return;\n\n // data\n var data = {};\n data[\"name\"] = this.autosave.name;\n data[this.autosave.name] = this.autosave.source;\n data = this.autosave.getHiddenFields(data);\n\n // ajax\n var jsxhr = $.ajax({\n url: this.opts.autosave,\n type: \"post\",\n data: data,\n });\n\n jsxhr.done(this.autosave.success);\n },\n getHiddenFields: function (data) {\n if (\n this.opts.autosaveFields === false ||\n typeof this.opts.autosaveFields !== \"object\"\n ) {\n return data;\n }\n\n $.each(\n this.opts.autosaveFields,\n $.proxy(function (k, v) {\n if (v !== null && v.toString().indexOf(\"#\") === 0) v = $(v).val();\n data[k] = v;\n }, this)\n );\n\n return data;\n },\n success: function (data) {\n var json;\n try {\n json = $.parseJSON(data);\n } catch (e) {\n //data has already been parsed\n json = data;\n }\n\n var callbackName =\n typeof json.error == \"undefined\" ? \"autosave\" : \"autosaveError\";\n\n this.core.setCallback(callbackName, this.autosave.name, json);\n this.autosave.html = this.autosave.source;\n },\n disable: function () {\n clearInterval(this.autosaveInterval);\n },\n };\n },\n block: function () {\n return {\n formatting: function (name) {\n this.block.clearStyle = false;\n var type, value;\n\n if (typeof this.formatting[name].data != \"undefined\") type = \"data\";\n else if (typeof this.formatting[name].attr != \"undefined\")\n type = \"attr\";\n else if (typeof this.formatting[name][\"class\"] != \"undefined\")\n type = \"class\";\n\n if (typeof this.formatting[name].clear != \"undefined\") {\n this.block.clearStyle = true;\n }\n\n if (type) value = this.formatting[name][type];\n\n this.block.format(this.formatting[name].tag, type, value);\n },\n format: function (tag, type, value) {\n if (tag == \"quote\") tag = \"blockquote\";\n\n var formatTags = [\n \"p\",\n \"pre\",\n \"blockquote\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n ];\n if ($.inArray(tag, formatTags) == -1) return;\n\n this.block.isRemoveInline =\n tag == \"pre\" || tag.search(/h[1-6]/i) != -1;\n\n // focus\n if (!this.utils.browser(\"msie\")) this.$editor.focus();\n\n var html = $.trim(this.$editor.html());\n this.block.isEmpty = this.utils.isEmpty(html);\n\n // FF focus\n if (this.utils.browser(\"mozilla\") && !this.focus.isFocused()) {\n if (this.block.isEmpty) {\n var $first;\n if (!this.opts.linebreaks) {\n $first = this.$editor.children().first();\n this.caret.setEnd($first);\n }\n }\n }\n\n this.block.blocks = this.selection.getBlocks();\n\n this.block.blocksSize = this.block.blocks.length;\n this.block.type = type;\n this.block.value = value;\n\n this.buffer.set();\n this.selection.save();\n\n this.block.set(tag);\n\n this.selection.restore();\n this.code.sync();\n this.observe.load();\n },\n set: function (tag) {\n this.selection.get();\n this.block.containerTag = this.range.commonAncestorContainer.tagName;\n\n if (this.range.collapsed) {\n this.block.setCollapsed(tag);\n } else {\n this.block.setMultiple(tag);\n }\n },\n setCollapsed: function (tag) {\n if (this.opts.linebreaks && this.block.isEmpty && tag != \"p\") {\n var node = document.createElement(tag);\n this.$editor.html(node);\n this.caret.setEnd(node);\n\n return;\n }\n\n var block = this.block.blocks[0];\n if (block === false) return;\n\n if (block.tagName == \"LI\") {\n if (tag != \"blockquote\") return;\n\n this.block.formatListToBlockquote();\n return;\n }\n\n var isContainerTable =\n this.block.containerTag == \"TD\" || this.block.containerTag == \"TH\";\n if (isContainerTable && !this.opts.linebreaks) {\n document.execCommand(\"formatblock\", false, \"<\" + tag + \">\");\n\n block = this.selection.getBlock();\n this.block.toggle($(block));\n } else if (block.tagName.toLowerCase() != tag) {\n if (this.opts.linebreaks && tag == \"p\") {\n $(block).append(\"
    \");\n this.utils.replaceWithContents(block);\n } else {\n var $formatted = this.utils.replaceToTag(block, tag);\n\n this.block.toggle($formatted);\n\n if (tag != \"p\" && tag != \"blockquote\")\n $formatted.find(\"img\").remove();\n if (this.block.isRemoveInline)\n this.utils.removeInlineTags($formatted);\n if (tag == \"p\" || this.block.headTag)\n $formatted.find(\"p\").contents().unwrap();\n\n this.block.formatTableWrapping($formatted);\n }\n } else if (\n tag == \"blockquote\" &&\n block.tagName.toLowerCase() == tag\n ) {\n // blockquote off\n if (this.opts.linebreaks) {\n $(block).append(\"
    \");\n this.utils.replaceWithContents(block);\n } else {\n var $el = this.utils.replaceToTag(block, \"p\");\n this.block.toggle($el);\n }\n } else if (block.tagName.toLowerCase() == tag) {\n this.block.toggle($(block));\n }\n\n if (\n typeof this.block.type == \"undefined\" &&\n typeof this.block.value == \"undefined\"\n ) {\n $(block).removeAttr(\"class\").removeAttr(\"style\");\n }\n },\n setMultiple: function (tag) {\n var block = this.block.blocks[0];\n\n var isContainerTable =\n this.block.containerTag == \"TD\" || this.block.containerTag == \"TH\";\n\n if (block !== false && this.block.blocksSize === 1) {\n if (block.tagName.toLowerCase() == tag && tag == \"blockquote\") {\n // blockquote off\n if (this.opts.linebreaks) {\n $(block).append(\"
    \");\n this.utils.replaceWithContents(block);\n } else {\n var $el = this.utils.replaceToTag(block, \"p\");\n this.block.toggle($el);\n }\n } else if (block.tagName == \"LI\") {\n if (tag != \"blockquote\") return;\n\n this.block.formatListToBlockquote();\n } else if (this.block.containerTag == \"BLOCKQUOTE\") {\n this.block.formatBlockquote(tag);\n } else if (\n this.opts.linebreaks &&\n (isContainerTable || this.range.commonAncestorContainer != block)\n ) {\n this.block.formatWrap(tag);\n } else {\n if (this.opts.linebreaks && tag == \"p\") {\n $(block).prepend(\"
    \").append(\"
    \");\n this.utils.replaceWithContents(block);\n } else if (block.tagName === \"TD\") {\n this.block.formatWrap(tag);\n } else {\n var $formatted = this.utils.replaceToTag(block, tag);\n\n this.block.toggle($formatted);\n\n if (this.block.isRemoveInline)\n this.utils.removeInlineTags($formatted);\n if (tag == \"p\" || this.block.headTag)\n $formatted.find(\"p\").contents().unwrap();\n }\n }\n } else {\n if (this.opts.linebreaks || tag != \"p\") {\n if (tag == \"blockquote\") {\n var count = 0;\n for (var i = 0; i < this.block.blocksSize; i++) {\n if (this.block.blocks[i].tagName == \"BLOCKQUOTE\") count++;\n }\n\n // only blockquote selected\n if (count == this.block.blocksSize) {\n $.each(\n this.block.blocks,\n $.proxy(function (i, s) {\n var $formatted = false;\n if (this.opts.linebreaks) {\n $(s).prepend(\"
    \").append(\"
    \");\n $formatted = this.utils.replaceWithContents(s);\n } else {\n $formatted = this.utils.replaceToTag(s, \"p\");\n }\n\n if (\n $formatted &&\n typeof this.block.type == \"undefined\" &&\n typeof this.block.value == \"undefined\"\n ) {\n $formatted.removeAttr(\"class\").removeAttr(\"style\");\n }\n }, this)\n );\n\n return;\n }\n }\n\n this.block.formatWrap(tag);\n } else {\n var classSize = 0;\n var toggleType = false;\n if (this.block.type == \"class\") {\n toggleType = \"toggle\";\n classSize = $(this.block.blocks).filter(\n \".\" + this.block.value\n ).length;\n\n if (this.block.blocksSize == classSize) toggleType = \"toggle\";\n else if (this.block.blocksSize > classSize) toggleType = \"set\";\n else if (classSize === 0) toggleType = \"set\";\n }\n\n var exceptTags = [\"ul\", \"ol\", \"li\", \"td\", \"th\", \"dl\", \"dt\", \"dd\"];\n $.each(\n this.block.blocks,\n $.proxy(function (i, s) {\n if ($.inArray(s.tagName.toLowerCase(), exceptTags) != -1)\n return;\n\n var $formatted = this.utils.replaceToTag(s, tag);\n\n if (toggleType) {\n if (toggleType == \"toggle\") this.block.toggle($formatted);\n else if (toggleType == \"remove\")\n this.block.remove($formatted);\n else if (toggleType == \"set\")\n this.block.setForce($formatted);\n } else this.block.toggle($formatted);\n\n if (tag != \"p\" && tag != \"blockquote\")\n $formatted.find(\"img\").remove();\n if (this.block.isRemoveInline)\n this.utils.removeInlineTags($formatted);\n if (tag == \"p\" || this.block.headTag)\n $formatted.find(\"p\").contents().unwrap();\n\n if (\n typeof this.block.type == \"undefined\" &&\n typeof this.block.value == \"undefined\"\n ) {\n $formatted.removeAttr(\"class\").removeAttr(\"style\");\n }\n }, this)\n );\n }\n }\n },\n setForce: function ($el) {\n // remove style and class if the specified setting\n if (this.block.clearStyle) {\n $el.removeAttr(\"class\").removeAttr(\"style\");\n }\n\n if (this.block.type == \"class\") {\n $el.addClass(this.block.value);\n return;\n } else if (this.block.type == \"attr\" || this.block.type == \"data\") {\n $el.attr(this.block.value.name, this.block.value.value);\n return;\n }\n },\n toggle: function ($el) {\n // remove style and class if the specified setting\n if (this.block.clearStyle) {\n $el.removeAttr(\"class\").removeAttr(\"style\");\n }\n\n if (this.block.type == \"class\") {\n $el.toggleClass(this.block.value);\n return;\n } else if (this.block.type == \"attr\" || this.block.type == \"data\") {\n if ($el.attr(this.block.value.name) == this.block.value.value) {\n $el.removeAttr(this.block.value.name);\n } else {\n $el.attr(this.block.value.name, this.block.value.value);\n }\n\n return;\n } else {\n $el.removeAttr(\"style class\");\n return;\n }\n },\n remove: function ($el) {\n $el.removeClass(this.block.value);\n },\n formatListToBlockquote: function () {\n var block = $(this.block.blocks[0]).closest(\n \"ul, ol\",\n this.$editor[0]\n );\n\n $(block).find(\"ul, ol\").contents().unwrap();\n $(block).find(\"li\").append($(\"
    \")).contents().unwrap();\n\n var $el = this.utils.replaceToTag(block, \"blockquote\");\n this.block.toggle($el);\n },\n formatBlockquote: function (tag) {\n document.execCommand(\"outdent\");\n document.execCommand(\"formatblock\", false, tag);\n\n this.clean.clearUnverified();\n this.$editor.find(\"p:empty\").remove();\n\n var formatted = this.selection.getBlock();\n\n if (tag != \"p\") {\n $(formatted).find(\"img\").remove();\n }\n\n if (!this.opts.linebreaks) {\n this.block.toggle($(formatted));\n }\n\n this.$editor\n .find(\"ul, ol, tr, blockquote, p\")\n .each($.proxy(this.utils.removeEmpty, this));\n\n if (this.opts.linebreaks && tag == \"p\") {\n this.utils.replaceWithContents(formatted);\n }\n },\n formatWrap: function (tag) {\n if (\n this.block.containerTag == \"UL\" ||\n this.block.containerTag == \"OL\"\n ) {\n if (tag == \"blockquote\") {\n this.block.formatListToBlockquote();\n } else {\n return;\n }\n }\n\n var formatted = this.selection.wrap(tag);\n if (formatted === false) return;\n\n var $formatted = $(formatted);\n\n this.block.formatTableWrapping($formatted);\n\n var $elements = $formatted.find(\n this.opts.blockLevelElements.join(\",\") +\n \", td, table, thead, tbody, tfoot, th, tr\"\n );\n\n $elements.contents().unwrap();\n\n if (tag != \"p\" && tag != \"blockquote\")\n $formatted.find(\"img\").remove();\n\n $.each(this.block.blocks, $.proxy(this.utils.removeEmpty, this));\n\n $formatted.append(this.selection.getMarker(2));\n\n if (!this.opts.linebreaks) {\n this.block.toggle($formatted);\n }\n\n this.$editor\n .find(\"ul, ol, tr, blockquote, p\")\n .each($.proxy(this.utils.removeEmpty, this));\n $formatted.find(\"blockquote:empty\").remove();\n\n if (this.block.isRemoveInline) {\n this.utils.removeInlineTags($formatted);\n }\n\n if (this.opts.linebreaks && tag == \"p\") {\n this.utils.replaceWithContents($formatted);\n }\n\n if (this.opts.linebreaks) {\n var $next = $formatted.next().next();\n if ($next.size() != 0 && $next[0].tagName === \"BR\") {\n $next.remove();\n }\n }\n },\n formatTableWrapping: function ($formatted) {\n if ($formatted.closest(\"table\", this.$editor[0]).length === 0) return;\n\n if ($formatted.closest(\"tr\", this.$editor[0]).length === 0)\n $formatted.wrap(\"\");\n if (\n $formatted.closest(\"td\", this.$editor[0]).length === 0 &&\n $formatted.closest(\"th\").length === 0\n ) {\n $formatted.wrap(\"\");\n }\n },\n removeData: function (name, value) {\n var blocks = this.selection.getBlocks();\n $(blocks).removeAttr(\"data-\" + name);\n\n this.code.sync();\n },\n setData: function (name, value) {\n var blocks = this.selection.getBlocks();\n $(blocks).attr(\"data-\" + name, value);\n\n this.code.sync();\n },\n toggleData: function (name, value) {\n var blocks = this.selection.getBlocks();\n $.each(blocks, function () {\n if ($(this).attr(\"data-\" + name)) {\n $(this).removeAttr(\"data-\" + name);\n } else {\n $(this).attr(\"data-\" + name, value);\n }\n });\n },\n removeAttr: function (attr, value) {\n var blocks = this.selection.getBlocks();\n $(blocks).removeAttr(attr);\n\n this.code.sync();\n },\n setAttr: function (attr, value) {\n var blocks = this.selection.getBlocks();\n $(blocks).attr(attr, value);\n\n this.code.sync();\n },\n toggleAttr: function (attr, value) {\n var blocks = this.selection.getBlocks();\n $.each(blocks, function () {\n if ($(this).attr(name)) {\n $(this).removeAttr(name);\n } else {\n $(this).attr(name, value);\n }\n });\n },\n removeClass: function (className) {\n var blocks = this.selection.getBlocks();\n $(blocks).removeClass(className);\n\n this.utils.removeEmptyAttr(blocks, \"class\");\n\n this.code.sync();\n },\n setClass: function (className) {\n var blocks = this.selection.getBlocks();\n $(blocks).addClass(className);\n\n this.code.sync();\n },\n toggleClass: function (className) {\n var blocks = this.selection.getBlocks();\n $(blocks).toggleClass(className);\n\n this.code.sync();\n },\n };\n },\n buffer: function () {\n return {\n set: function (type) {\n if (typeof type == \"undefined\" || type == \"undo\") {\n this.buffer.setUndo();\n } else {\n this.buffer.setRedo();\n }\n },\n setUndo: function () {\n this.selection.save();\n this.opts.buffer.push(this.$editor.html());\n this.selection.restore();\n },\n setRedo: function () {\n this.selection.save();\n this.opts.rebuffer.push(this.$editor.html());\n this.selection.restore();\n },\n getUndo: function () {\n this.$editor.html(this.opts.buffer.pop());\n },\n getRedo: function () {\n this.$editor.html(this.opts.rebuffer.pop());\n },\n add: function () {\n this.opts.buffer.push(this.$editor.html());\n },\n undo: function () {\n if (this.opts.buffer.length === 0) return;\n\n this.buffer.set(\"redo\");\n this.buffer.getUndo();\n\n this.selection.restore();\n\n setTimeout($.proxy(this.observe.load, this), 50);\n },\n redo: function () {\n if (this.opts.rebuffer.length === 0) return;\n\n this.buffer.set(\"undo\");\n this.buffer.getRedo();\n\n this.selection.restore();\n\n setTimeout($.proxy(this.observe.load, this), 50);\n },\n };\n },\n build: function () {\n return {\n focused: false,\n blured: true,\n run: function () {\n this.build.createContainerBox();\n this.build.loadContent();\n this.build.loadEditor();\n this.build.enableEditor();\n this.build.setCodeAndCall();\n },\n isTextarea: function () {\n return this.$element[0].tagName === \"TEXTAREA\";\n },\n createContainerBox: function () {\n this.$box = $('
    ');\n },\n createTextarea: function () {\n this.$textarea = $(\"' +\n \"\"\n );\n },\n init: function () {\n var button = this.button.addAfter(\n \"image\",\n \"video\",\n this.lang.get(\"video\")\n );\n this.button.addCallback(button, this.video.show);\n },\n show: function () {\n this.modal.addTemplate(\"video\", this.video.getTemplate());\n\n this.modal.load(\"video\", this.lang.get(\"video\"), 700);\n this.modal.createCancelButton();\n\n var button = this.modal.createActionButton(this.lang.get(\"insert\"));\n button.on(\"click\", this.video.insert);\n\n this.selection.save();\n this.modal.show();\n\n $(\"#redactor-insert-video-area\").focus();\n },\n insert: function () {\n var data = $(\"#redactor-insert-video-area\").val();\n\n if (!data.match(/