diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7785984..a341679 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,10 @@ jobs: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - name: S3SyncStaticWeb run: aws s3 sync ./global-serverless/web/ s3://amazon-dynamodb-labs-static/static/global-serverless-application/web/ + - name: StaticYearReplacer + run: sed -i "s/<>/$(date +%Y)/" ./static/files/visualizer/index.html + - name: S3SyncVisualizer + run: aws s3 sync ./static/files/visualizer/ s3://amazon-dynamodb-labs-static/static/visualizer/ - name: Pull preview build run: aws s3 sync s3://amazon-dynamodb-labs-static/build/ . && chmod +x preview_build - name: Build Assets diff --git a/static/files/visualizer/LICENSE.txt b/static/files/visualizer/LICENSE.txt new file mode 100644 index 0000000..2fa5fba --- /dev/null +++ b/static/files/visualizer/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright 2025 Amazon Web Services, Inc. or its Affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/static/files/visualizer/README.md b/static/files/visualizer/README.md new file mode 100644 index 0000000..455ffac --- /dev/null +++ b/static/files/visualizer/README.md @@ -0,0 +1,17 @@ +## The Visualizer + + 🚀 [Launch the visualizer!](http://amazondynamodblabs.com/static/visualizer/index.html) 🚀 + +This is the source code from the DynamoDB visualizer original deployed to this [S3 bucket website](https://rh-web-bucket.s3.amazonaws.com/index.html). By using this code, you agree to the license found in [LICENSE.txt](LICENSE.txt) + + +![Sample screenshot](https://amazondynamodblabs.com/static/visualizer/img/model.png) + + +## Deployment and development + +On merge to the main branch, this code is auto deployed to [the Amazon DynamoDB Labs website](http://amazondynamodblabs.com/static/visualizer/index.html). Local development can be done in a simple web browser with a basic IDE. + +## Authorship + +The original author was Rick Houlihan, during his time at AWS - [X.com](https://x.com/houlihan_rick) \ No newline at end of file diff --git a/static/files/visualizer/css/bootstrap-3.3.7.min.css b/static/files/visualizer/css/bootstrap-3.3.7.min.css new file mode 100644 index 0000000..126116a --- /dev/null +++ b/static/files/visualizer/css/bootstrap-3.3.7.min.css @@ -0,0 +1,7209 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100% +} + +body { + margin: 0 +} + +article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { + display: block +} + +audio, canvas, progress, video { + display: inline-block; + vertical-align: baseline +} + +audio:not([controls]) { + display: none; + height: 0 +} + +[hidden], template { + display: none +} + +a { + background-color: transparent +} + +a:active, a:hover { + outline: 0 +} + +abbr[title] { + border-bottom: 1px dotted +} + +b, strong { + font-weight: 700 +} + +dfn { + font-style: italic +} + +h1 { + margin: .67em 0; + font-size: 2em +} + +mark { + color: #000; + background: #ff0 +} + +small { + font-size: 80% +} + +sub, sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline +} + +sup { + top: -.5em +} + +sub { + bottom: -.25em +} + +img { + border: 0 +} + +svg:not(:root) { + overflow: hidden +} + +figure { + margin: 1em 40px +} + +hr { + height: 0; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box +} + +pre { + overflow: auto +} + +code, kbd, pre, samp { + font-family: monospace, monospace; + font-size: 1em +} + +button, input, optgroup, select, textarea { + margin: 0; + font: inherit; + color: inherit +} + +button { + overflow: visible +} + +button, select { + text-transform: none +} + +button, html input[type=button], input[type=reset], input[type=submit] { + -webkit-appearance: button; + cursor: pointer +} + +button[disabled], html input[disabled] { + cursor: default +} + +button::-moz-focus-inner, input::-moz-focus-inner { + padding: 0; + border: 0 +} + +input { + line-height: normal +} + +input[type=checkbox], input[type=radio] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0 +} + +input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { + height: auto +} + +input[type=search] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield +} + +input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { + -webkit-appearance: none +} + +fieldset { + padding: .35em .625em .75em; + margin: 0 2px; + border: 1px solid silver +} + +legend { + padding: 0; + border: 0 +} + +textarea { + overflow: auto +} + +optgroup { + font-weight: 700 +} + +table { + border-spacing: 0; + border-collapse: collapse +} + +td, th { + padding: 0 +} + +/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ +@media print { + *, :after, :before { + color: #000 !important; + text-shadow: none !important; + background: 0 0 !important; + -webkit-box-shadow: none !important; + box-shadow: none !important + } + + a, a:visited { + text-decoration: underline + } + + a[href]:after { + content: " (" attr(href) ")" + } + + abbr[title]:after { + content: " (" attr(title) ")" + } + + a[href^="javascript:"]:after, a[href^="#"]:after { + content: "" + } + + blockquote, pre { + border: 1px solid #999; + page-break-inside: avoid + } + + thead { + display: table-header-group + } + + img, tr { + page-break-inside: avoid + } + + img { + max-width: 100% !important + } + + h2, h3, p { + orphans: 3; + widows: 3 + } + + h2, h3 { + page-break-after: avoid + } + + .navbar { + display: none + } + + .btn > .caret, .dropup > .btn > .caret { + border-top-color: #000 !important + } + + .label { + border: 1px solid #000 + } + + .table { + border-collapse: collapse !important + } + + .table td, .table th { + background-color: #fff !important + } + + .table-bordered td, .table-bordered th { + border: 1px solid #ddd !important + } +} + +@font-face { + font-family: 'Glyphicons Halflings'; + src: url(../fonts/glyphicons-halflings-regular.eot); + src: url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'), url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'), url(../fonts/glyphicons-halflings-regular.woff) format('woff'), url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'), url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg') +} + +.glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: 400; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale +} + +.glyphicon-asterisk:before { + content: "\002a" +} + +.glyphicon-plus:before { + content: "\002b" +} + +.glyphicon-eur:before, .glyphicon-euro:before { + content: "\20ac" +} + +.glyphicon-minus:before { + content: "\2212" +} + +.glyphicon-cloud:before { + content: "\2601" +} + +.glyphicon-envelope:before { + content: "\2709" +} + +.glyphicon-pencil:before { + content: "\270f" +} + +.glyphicon-glass:before { + content: "\e001" +} + +.glyphicon-music:before { + content: "\e002" +} + +.glyphicon-search:before { + content: "\e003" +} + +.glyphicon-heart:before { + content: "\e005" +} + +.glyphicon-star:before { + content: "\e006" +} + +.glyphicon-star-empty:before { + content: "\e007" +} + +.glyphicon-user:before { + content: "\e008" +} + +.glyphicon-film:before { + content: "\e009" +} + +.glyphicon-th-large:before { + content: "\e010" +} + +.glyphicon-th:before { + content: "\e011" +} + +.glyphicon-th-list:before { + content: "\e012" +} + +.glyphicon-ok:before { + content: "\e013" +} + +.glyphicon-remove:before { + content: "\e014" +} + +.glyphicon-zoom-in:before { + content: "\e015" +} + +.glyphicon-zoom-out:before { + content: "\e016" +} + +.glyphicon-off:before { + content: "\e017" +} + +.glyphicon-signal:before { + content: "\e018" +} + +.glyphicon-cog:before { + content: "\e019" +} + +.glyphicon-trash:before { + content: "\e020" +} + +.glyphicon-home:before { + content: "\e021" +} + +.glyphicon-file:before { + content: "\e022" +} + +.glyphicon-time:before { + content: "\e023" +} + +.glyphicon-road:before { + content: "\e024" +} + +.glyphicon-download-alt:before { + content: "\e025" +} + +.glyphicon-download:before { + content: "\e026" +} + +.glyphicon-upload:before { + content: "\e027" +} + +.glyphicon-inbox:before { + content: "\e028" +} + +.glyphicon-play-circle:before { + content: "\e029" +} + +.glyphicon-repeat:before { + content: "\e030" +} + +.glyphicon-refresh:before { + content: "\e031" +} + +.glyphicon-list-alt:before { + content: "\e032" +} + +.glyphicon-lock:before { + content: "\e033" +} + +.glyphicon-flag:before { + content: "\e034" +} + +.glyphicon-headphones:before { + content: "\e035" +} + +.glyphicon-volume-off:before { + content: "\e036" +} + +.glyphicon-volume-down:before { + content: "\e037" +} + +.glyphicon-volume-up:before { + content: "\e038" +} + +.glyphicon-qrcode:before { + content: "\e039" +} + +.glyphicon-barcode:before { + content: "\e040" +} + +.glyphicon-tag:before { + content: "\e041" +} + +.glyphicon-tags:before { + content: "\e042" +} + +.glyphicon-book:before { + content: "\e043" +} + +.glyphicon-bookmark:before { + content: "\e044" +} + +.glyphicon-print:before { + content: "\e045" +} + +.glyphicon-camera:before { + content: "\e046" +} + +.glyphicon-font:before { + content: "\e047" +} + +.glyphicon-bold:before { + content: "\e048" +} + +.glyphicon-italic:before { + content: "\e049" +} + +.glyphicon-text-height:before { + content: "\e050" +} + +.glyphicon-text-width:before { + content: "\e051" +} + +.glyphicon-align-left:before { + content: "\e052" +} + +.glyphicon-align-center:before { + content: "\e053" +} + +.glyphicon-align-right:before { + content: "\e054" +} + +.glyphicon-align-justify:before { + content: "\e055" +} + +.glyphicon-list:before { + content: "\e056" +} + +.glyphicon-indent-left:before { + content: "\e057" +} + +.glyphicon-indent-right:before { + content: "\e058" +} + +.glyphicon-facetime-video:before { + content: "\e059" +} + +.glyphicon-picture:before { + content: "\e060" +} + +.glyphicon-map-marker:before { + content: "\e062" +} + +.glyphicon-adjust:before { + content: "\e063" +} + +.glyphicon-tint:before { + content: "\e064" +} + +.glyphicon-edit:before { + content: "\e065" +} + +.glyphicon-share:before { + content: "\e066" +} + +.glyphicon-check:before { + content: "\e067" +} + +.glyphicon-move:before { + content: "\e068" +} + +.glyphicon-step-backward:before { + content: "\e069" +} + +.glyphicon-fast-backward:before { + content: "\e070" +} + +.glyphicon-backward:before { + content: "\e071" +} + +.glyphicon-play:before { + content: "\e072" +} + +.glyphicon-pause:before { + content: "\e073" +} + +.glyphicon-stop:before { + content: "\e074" +} + +.glyphicon-forward:before { + content: "\e075" +} + +.glyphicon-fast-forward:before { + content: "\e076" +} + +.glyphicon-step-forward:before { + content: "\e077" +} + +.glyphicon-eject:before { + content: "\e078" +} + +.glyphicon-chevron-left:before { + content: "\e079" +} + +.glyphicon-chevron-right:before { + content: "\e080" +} + +.glyphicon-plus-sign:before { + content: "\e081" +} + +.glyphicon-minus-sign:before { + content: "\e082" +} + +.glyphicon-remove-sign:before { + content: "\e083" +} + +.glyphicon-ok-sign:before { + content: "\e084" +} + +.glyphicon-question-sign:before { + content: "\e085" +} + +.glyphicon-info-sign:before { + content: "\e086" +} + +.glyphicon-screenshot:before { + content: "\e087" +} + +.glyphicon-remove-circle:before { + content: "\e088" +} + +.glyphicon-ok-circle:before { + content: "\e089" +} + +.glyphicon-ban-circle:before { + content: "\e090" +} + +.glyphicon-arrow-left:before { + content: "\e091" +} + +.glyphicon-arrow-right:before { + content: "\e092" +} + +.glyphicon-arrow-up:before { + content: "\e093" +} + +.glyphicon-arrow-down:before { + content: "\e094" +} + +.glyphicon-share-alt:before { + content: "\e095" +} + +.glyphicon-resize-full:before { + content: "\e096" +} + +.glyphicon-resize-small:before { + content: "\e097" +} + +.glyphicon-exclamation-sign:before { + content: "\e101" +} + +.glyphicon-gift:before { + content: "\e102" +} + +.glyphicon-leaf:before { + content: "\e103" +} + +.glyphicon-fire:before { + content: "\e104" +} + +.glyphicon-eye-open:before { + content: "\e105" +} + +.glyphicon-eye-close:before { + content: "\e106" +} + +.glyphicon-warning-sign:before { + content: "\e107" +} + +.glyphicon-plane:before { + content: "\e108" +} + +.glyphicon-calendar:before { + content: "\e109" +} + +.glyphicon-random:before { + content: "\e110" +} + +.glyphicon-comment:before { + content: "\e111" +} + +.glyphicon-magnet:before { + content: "\e112" +} + +.glyphicon-chevron-up:before { + content: "\e113" +} + +.glyphicon-chevron-down:before { + content: "\e114" +} + +.glyphicon-retweet:before { + content: "\e115" +} + +.glyphicon-shopping-cart:before { + content: "\e116" +} + +.glyphicon-folder-close:before { + content: "\e117" +} + +.glyphicon-folder-open:before { + content: "\e118" +} + +.glyphicon-resize-vertical:before { + content: "\e119" +} + +.glyphicon-resize-horizontal:before { + content: "\e120" +} + +.glyphicon-hdd:before { + content: "\e121" +} + +.glyphicon-bullhorn:before { + content: "\e122" +} + +.glyphicon-bell:before { + content: "\e123" +} + +.glyphicon-certificate:before { + content: "\e124" +} + +.glyphicon-thumbs-up:before { + content: "\e125" +} + +.glyphicon-thumbs-down:before { + content: "\e126" +} + +.glyphicon-hand-right:before { + content: "\e127" +} + +.glyphicon-hand-left:before { + content: "\e128" +} + +.glyphicon-hand-up:before { + content: "\e129" +} + +.glyphicon-hand-down:before { + content: "\e130" +} + +.glyphicon-circle-arrow-right:before { + content: "\e131" +} + +.glyphicon-circle-arrow-left:before { + content: "\e132" +} + +.glyphicon-circle-arrow-up:before { + content: "\e133" +} + +.glyphicon-circle-arrow-down:before { + content: "\e134" +} + +.glyphicon-globe:before { + content: "\e135" +} + +.glyphicon-wrench:before { + content: "\e136" +} + +.glyphicon-tasks:before { + content: "\e137" +} + +.glyphicon-filter:before { + content: "\e138" +} + +.glyphicon-briefcase:before { + content: "\e139" +} + +.glyphicon-fullscreen:before { + content: "\e140" +} + +.glyphicon-dashboard:before { + content: "\e141" +} + +.glyphicon-paperclip:before { + content: "\e142" +} + +.glyphicon-heart-empty:before { + content: "\e143" +} + +.glyphicon-link:before { + content: "\e144" +} + +.glyphicon-phone:before { + content: "\e145" +} + +.glyphicon-pushpin:before { + content: "\e146" +} + +.glyphicon-usd:before { + content: "\e148" +} + +.glyphicon-gbp:before { + content: "\e149" +} + +.glyphicon-sort:before { + content: "\e150" +} + +.glyphicon-sort-by-alphabet:before { + content: "\e151" +} + +.glyphicon-sort-by-alphabet-alt:before { + content: "\e152" +} + +.glyphicon-sort-by-order:before { + content: "\e153" +} + +.glyphicon-sort-by-order-alt:before { + content: "\e154" +} + +.glyphicon-sort-by-attributes:before { + content: "\e155" +} + +.glyphicon-sort-by-attributes-alt:before { + content: "\e156" +} + +.glyphicon-unchecked:before { + content: "\e157" +} + +.glyphicon-expand:before { + content: "\e158" +} + +.glyphicon-collapse-down:before { + content: "\e159" +} + +.glyphicon-collapse-up:before { + content: "\e160" +} + +.glyphicon-log-in:before { + content: "\e161" +} + +.glyphicon-flash:before { + content: "\e162" +} + +.glyphicon-log-out:before { + content: "\e163" +} + +.glyphicon-new-window:before { + content: "\e164" +} + +.glyphicon-record:before { + content: "\e165" +} + +.glyphicon-save:before { + content: "\e166" +} + +.glyphicon-open:before { + content: "\e167" +} + +.glyphicon-saved:before { + content: "\e168" +} + +.glyphicon-import:before { + content: "\e169" +} + +.glyphicon-export:before { + content: "\e170" +} + +.glyphicon-send:before { + content: "\e171" +} + +.glyphicon-floppy-disk:before { + content: "\e172" +} + +.glyphicon-floppy-saved:before { + content: "\e173" +} + +.glyphicon-floppy-remove:before { + content: "\e174" +} + +.glyphicon-floppy-save:before { + content: "\e175" +} + +.glyphicon-floppy-open:before { + content: "\e176" +} + +.glyphicon-credit-card:before { + content: "\e177" +} + +.glyphicon-transfer:before { + content: "\e178" +} + +.glyphicon-cutlery:before { + content: "\e179" +} + +.glyphicon-header:before { + content: "\e180" +} + +.glyphicon-compressed:before { + content: "\e181" +} + +.glyphicon-earphone:before { + content: "\e182" +} + +.glyphicon-phone-alt:before { + content: "\e183" +} + +.glyphicon-tower:before { + content: "\e184" +} + +.glyphicon-stats:before { + content: "\e185" +} + +.glyphicon-sd-video:before { + content: "\e186" +} + +.glyphicon-hd-video:before { + content: "\e187" +} + +.glyphicon-subtitles:before { + content: "\e188" +} + +.glyphicon-sound-stereo:before { + content: "\e189" +} + +.glyphicon-sound-dolby:before { + content: "\e190" +} + +.glyphicon-sound-5-1:before { + content: "\e191" +} + +.glyphicon-sound-6-1:before { + content: "\e192" +} + +.glyphicon-sound-7-1:before { + content: "\e193" +} + +.glyphicon-copyright-mark:before { + content: "\e194" +} + +.glyphicon-registration-mark:before { + content: "\e195" +} + +.glyphicon-cloud-download:before { + content: "\e197" +} + +.glyphicon-cloud-upload:before { + content: "\e198" +} + +.glyphicon-tree-conifer:before { + content: "\e199" +} + +.glyphicon-tree-deciduous:before { + content: "\e200" +} + +.glyphicon-cd:before { + content: "\e201" +} + +.glyphicon-save-file:before { + content: "\e202" +} + +.glyphicon-open-file:before { + content: "\e203" +} + +.glyphicon-level-up:before { + content: "\e204" +} + +.glyphicon-copy:before { + content: "\e205" +} + +.glyphicon-paste:before { + content: "\e206" +} + +.glyphicon-alert:before { + content: "\e209" +} + +.glyphicon-equalizer:before { + content: "\e210" +} + +.glyphicon-king:before { + content: "\e211" +} + +.glyphicon-queen:before { + content: "\e212" +} + +.glyphicon-pawn:before { + content: "\e213" +} + +.glyphicon-bishop:before { + content: "\e214" +} + +.glyphicon-knight:before { + content: "\e215" +} + +.glyphicon-baby-formula:before { + content: "\e216" +} + +.glyphicon-tent:before { + content: "\26fa" +} + +.glyphicon-blackboard:before { + content: "\e218" +} + +.glyphicon-bed:before { + content: "\e219" +} + +.glyphicon-apple:before { + content: "\f8ff" +} + +.glyphicon-erase:before { + content: "\e221" +} + +.glyphicon-hourglass:before { + content: "\231b" +} + +.glyphicon-lamp:before { + content: "\e223" +} + +.glyphicon-duplicate:before { + content: "\e224" +} + +.glyphicon-piggy-bank:before { + content: "\e225" +} + +.glyphicon-scissors:before { + content: "\e226" +} + +.glyphicon-bitcoin:before { + content: "\e227" +} + +.glyphicon-btc:before { + content: "\e227" +} + +.glyphicon-xbt:before { + content: "\e227" +} + +.glyphicon-yen:before { + content: "\00a5" +} + +.glyphicon-jpy:before { + content: "\00a5" +} + +.glyphicon-ruble:before { + content: "\20bd" +} + +.glyphicon-rub:before { + content: "\20bd" +} + +.glyphicon-scale:before { + content: "\e230" +} + +.glyphicon-ice-lolly:before { + content: "\e231" +} + +.glyphicon-ice-lolly-tasted:before { + content: "\e232" +} + +.glyphicon-education:before { + content: "\e233" +} + +.glyphicon-option-horizontal:before { + content: "\e234" +} + +.glyphicon-option-vertical:before { + content: "\e235" +} + +.glyphicon-menu-hamburger:before { + content: "\e236" +} + +.glyphicon-modal-window:before { + content: "\e237" +} + +.glyphicon-oil:before { + content: "\e238" +} + +.glyphicon-grain:before { + content: "\e239" +} + +.glyphicon-sunglasses:before { + content: "\e240" +} + +.glyphicon-text-size:before { + content: "\e241" +} + +.glyphicon-text-color:before { + content: "\e242" +} + +.glyphicon-text-background:before { + content: "\e243" +} + +.glyphicon-object-align-top:before { + content: "\e244" +} + +.glyphicon-object-align-bottom:before { + content: "\e245" +} + +.glyphicon-object-align-horizontal:before { + content: "\e246" +} + +.glyphicon-object-align-left:before { + content: "\e247" +} + +.glyphicon-object-align-vertical:before { + content: "\e248" +} + +.glyphicon-object-align-right:before { + content: "\e249" +} + +.glyphicon-triangle-right:before { + content: "\e250" +} + +.glyphicon-triangle-left:before { + content: "\e251" +} + +.glyphicon-triangle-bottom:before { + content: "\e252" +} + +.glyphicon-triangle-top:before { + content: "\e253" +} + +.glyphicon-console:before { + content: "\e254" +} + +.glyphicon-superscript:before { + content: "\e255" +} + +.glyphicon-subscript:before { + content: "\e256" +} + +.glyphicon-menu-left:before { + content: "\e257" +} + +.glyphicon-menu-right:before { + content: "\e258" +} + +.glyphicon-menu-down:before { + content: "\e259" +} + +.glyphicon-menu-up:before { + content: "\e260" +} + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} + +:after, :before { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} + +html { + font-size: 10px; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0) +} + +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff +} + +button, input, select, textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit +} + +a { + color: #337ab7; + text-decoration: none +} + +a:focus, a:hover { + color: #23527c; + text-decoration: underline +} + +a:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px +} + +figure { + margin: 0 +} + +img { + vertical-align: middle +} + +.carousel-inner > .item > a > img, .carousel-inner > .item > img, .img-responsive, .thumbnail a > img, .thumbnail > img { + display: block; + max-width: 100%; + height: auto +} + +.img-rounded { + border-radius: 6px +} + +.img-thumbnail { + display: inline-block; + max-width: 100%; + height: auto; + padding: 4px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: all .2s ease-in-out; + -o-transition: all .2s ease-in-out; + transition: all .2s ease-in-out +} + +.img-circle { + border-radius: 50% +} + +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #eee +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0 +} + +.sr-only-focusable:active, .sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto +} + +[role=button] { + cursor: pointer +} + +.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit +} + +.h1 .small, .h1 small, .h2 .small, .h2 small, .h3 .small, .h3 small, .h4 .small, .h4 small, .h5 .small, .h5 small, .h6 .small, .h6 small, h1 .small, h1 small, h2 .small, h2 small, h3 .small, h3 small, h4 .small, h4 small, h5 .small, h5 small, h6 .small, h6 small { + font-weight: 400; + line-height: 1; + color: #777 +} + +.h1, .h2, .h3, h1, h2, h3 { + margin-top: 20px; + margin-bottom: 10px +} + +.h1 .small, .h1 small, .h2 .small, .h2 small, .h3 .small, .h3 small, h1 .small, h1 small, h2 .small, h2 small, h3 .small, h3 small { + font-size: 65% +} + +.h4, .h5, .h6, h4, h5, h6 { + margin-top: 10px; + margin-bottom: 10px +} + +.h4 .small, .h4 small, .h5 .small, .h5 small, .h6 .small, .h6 small, h4 .small, h4 small, h5 .small, h5 small, h6 .small, h6 small { + font-size: 75% +} + +.h1, h1 { + font-size: 36px +} + +.h2, h2 { + font-size: 30px +} + +.h3, h3 { + font-size: 24px +} + +.h4, h4 { + font-size: 18px +} + +.h5, h5 { + font-size: 14px +} + +.h6, h6 { + font-size: 12px +} + +p { + margin: 0 0 10px +} + +.lead { + margin-bottom: 20px; + font-size: 16px; + font-weight: 300; + line-height: 1.4 +} + +@media (min-width: 768px) { + .lead { + font-size: 21px + } +} + +.small, small { + font-size: 85% +} + +.mark, mark { + padding: .2em; + background-color: #fcf8e3 +} + +.text-left { + text-align: left +} + +.text-right { + text-align: right +} + +.text-center { + text-align: center +} + +.text-justify { + text-align: justify +} + +.text-nowrap { + white-space: nowrap +} + +.text-lowercase { + text-transform: lowercase +} + +.text-uppercase { + text-transform: uppercase +} + +.text-capitalize { + text-transform: capitalize +} + +.text-muted { + color: #777 +} + +.text-primary { + color: #337ab7 +} + +a.text-primary:focus, a.text-primary:hover { + color: #286090 +} + +.text-success { + color: #3c763d +} + +a.text-success:focus, a.text-success:hover { + color: #2b542c +} + +.text-info { + color: #31708f +} + +a.text-info:focus, a.text-info:hover { + color: #245269 +} + +.text-warning { + color: #8a6d3b +} + +a.text-warning:focus, a.text-warning:hover { + color: #66512c +} + +.text-danger { + color: #a94442 +} + +a.text-danger:focus, a.text-danger:hover { + color: #843534 +} + +.bg-primary { + color: #fff; + background-color: #337ab7 +} + +a.bg-primary:focus, a.bg-primary:hover { + background-color: #286090 +} + +.bg-success { + background-color: #dff0d8 +} + +a.bg-success:focus, a.bg-success:hover { + background-color: #c1e2b3 +} + +.bg-info { + background-color: #d9edf7 +} + +a.bg-info:focus, a.bg-info:hover { + background-color: #afd9ee +} + +.bg-warning { + background-color: #fcf8e3 +} + +a.bg-warning:focus, a.bg-warning:hover { + background-color: #f7ecb5 +} + +.bg-danger { + background-color: #f2dede +} + +a.bg-danger:focus, a.bg-danger:hover { + background-color: #e4b9b9 +} + +.page-header { + padding-bottom: 9px; + margin: 40px 0 20px; + border-bottom: 1px solid #eee +} + +ol, ul { + margin-top: 0; + margin-bottom: 10px +} + +ol ol, ol ul, ul ol, ul ul { + margin-bottom: 0 +} + +.list-unstyled { + padding-left: 0; + list-style: none +} + +.list-inline { + padding-left: 0; + margin-left: -5px; + list-style: none +} + +.list-inline > li { + display: inline-block; + padding-right: 5px; + padding-left: 5px +} + +dl { + margin-top: 0; + margin-bottom: 20px +} + +dd, dt { + line-height: 1.42857143 +} + +dt { + font-weight: 700 +} + +dd { + margin-left: 0 +} + +@media (min-width: 768px) { + .dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap + } + + .dl-horizontal dd { + margin-left: 180px + } +} + +abbr[data-original-title], abbr[title] { + cursor: help; + border-bottom: 1px dotted #777 +} + +.initialism { + font-size: 90%; + text-transform: uppercase +} + +blockquote { + padding: 10px 20px; + margin: 0 0 20px; + font-size: 17.5px; + border-left: 5px solid #eee +} + +blockquote ol:last-child, blockquote p:last-child, blockquote ul:last-child { + margin-bottom: 0 +} + +blockquote .small, blockquote footer, blockquote small { + display: block; + font-size: 80%; + line-height: 1.42857143; + color: #777 +} + +blockquote .small:before, blockquote footer:before, blockquote small:before { + content: '\2014 \00A0' +} + +.blockquote-reverse, blockquote.pull-right { + padding-right: 15px; + padding-left: 0; + text-align: right; + border-right: 5px solid #eee; + border-left: 0 +} + +.blockquote-reverse .small:before, .blockquote-reverse footer:before, .blockquote-reverse small:before, blockquote.pull-right .small:before, blockquote.pull-right footer:before, blockquote.pull-right small:before { + content: '' +} + +.blockquote-reverse .small:after, .blockquote-reverse footer:after, .blockquote-reverse small:after, blockquote.pull-right .small:after, blockquote.pull-right footer:after, blockquote.pull-right small:after { + content: '\00A0 \2014' +} + +address { + margin-bottom: 20px; + font-style: normal; + line-height: 1.42857143 +} + +code, kbd, pre, samp { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace +} + +code { + padding: 2px 4px; + font-size: 90%; + color: #c7254e; + background-color: #f9f2f4; + border-radius: 4px +} + +kbd { + padding: 2px 4px; + font-size: 90%; + color: #fff; + background-color: #333; + border-radius: 3px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25) +} + +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: 700; + -webkit-box-shadow: none; + box-shadow: none +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 1.42857143; + color: #333; + word-break: break-all; + word-wrap: break-word; + background-color: #f5f5f5; + border: 1px solid #ccc; + border-radius: 4px +} + +pre code { + padding: 0; + font-size: inherit; + color: inherit; + white-space: pre-wrap; + background-color: transparent; + border-radius: 0 +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll +} + +.container { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto +} + +@media (min-width: 768px) { + .container { + width: 750px + } +} + +@media (min-width: 992px) { + .container { + width: 970px + } +} + +@media (min-width: 1200px) { + .container { + width: 1170px + } +} + +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto +} + +.row { + margin-right: -15px; + margin-left: -15px +} + +.col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 { + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px +} + +.col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 { + float: left +} + +.col-xs-12 { + width: 100% +} + +.col-xs-11 { + width: 91.66666667% +} + +.col-xs-10 { + width: 83.33333333% +} + +.col-xs-9 { + width: 75% +} + +.col-xs-8 { + width: 66.66666667% +} + +.col-xs-7 { + width: 58.33333333% +} + +.col-xs-6 { + width: 50% +} + +.col-xs-5 { + width: 41.66666667% +} + +.col-xs-4 { + width: 33.33333333% +} + +.col-xs-3 { + width: 25% +} + +.col-xs-2 { + width: 16.66666667% +} + +.col-xs-1 { + width: 8.33333333% +} + +.col-xs-pull-12 { + right: 100% +} + +.col-xs-pull-11 { + right: 91.66666667% +} + +.col-xs-pull-10 { + right: 83.33333333% +} + +.col-xs-pull-9 { + right: 75% +} + +.col-xs-pull-8 { + right: 66.66666667% +} + +.col-xs-pull-7 { + right: 58.33333333% +} + +.col-xs-pull-6 { + right: 50% +} + +.col-xs-pull-5 { + right: 41.66666667% +} + +.col-xs-pull-4 { + right: 33.33333333% +} + +.col-xs-pull-3 { + right: 25% +} + +.col-xs-pull-2 { + right: 16.66666667% +} + +.col-xs-pull-1 { + right: 8.33333333% +} + +.col-xs-pull-0 { + right: auto +} + +.col-xs-push-12 { + left: 100% +} + +.col-xs-push-11 { + left: 91.66666667% +} + +.col-xs-push-10 { + left: 83.33333333% +} + +.col-xs-push-9 { + left: 75% +} + +.col-xs-push-8 { + left: 66.66666667% +} + +.col-xs-push-7 { + left: 58.33333333% +} + +.col-xs-push-6 { + left: 50% +} + +.col-xs-push-5 { + left: 41.66666667% +} + +.col-xs-push-4 { + left: 33.33333333% +} + +.col-xs-push-3 { + left: 25% +} + +.col-xs-push-2 { + left: 16.66666667% +} + +.col-xs-push-1 { + left: 8.33333333% +} + +.col-xs-push-0 { + left: auto +} + +.col-xs-offset-12 { + margin-left: 100% +} + +.col-xs-offset-11 { + margin-left: 91.66666667% +} + +.col-xs-offset-10 { + margin-left: 83.33333333% +} + +.col-xs-offset-9 { + margin-left: 75% +} + +.col-xs-offset-8 { + margin-left: 66.66666667% +} + +.col-xs-offset-7 { + margin-left: 58.33333333% +} + +.col-xs-offset-6 { + margin-left: 50% +} + +.col-xs-offset-5 { + margin-left: 41.66666667% +} + +.col-xs-offset-4 { + margin-left: 33.33333333% +} + +.col-xs-offset-3 { + margin-left: 25% +} + +.col-xs-offset-2 { + margin-left: 16.66666667% +} + +.col-xs-offset-1 { + margin-left: 8.33333333% +} + +.col-xs-offset-0 { + margin-left: 0 +} + +@media (min-width: 768px) { + .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9 { + float: left + } + + .col-sm-12 { + width: 100% + } + + .col-sm-11 { + width: 91.66666667% + } + + .col-sm-10 { + width: 83.33333333% + } + + .col-sm-9 { + width: 75% + } + + .col-sm-8 { + width: 66.66666667% + } + + .col-sm-7 { + width: 58.33333333% + } + + .col-sm-6 { + width: 50% + } + + .col-sm-5 { + width: 41.66666667% + } + + .col-sm-4 { + width: 33.33333333% + } + + .col-sm-3 { + width: 25% + } + + .col-sm-2 { + width: 16.66666667% + } + + .col-sm-1 { + width: 8.33333333% + } + + .col-sm-pull-12 { + right: 100% + } + + .col-sm-pull-11 { + right: 91.66666667% + } + + .col-sm-pull-10 { + right: 83.33333333% + } + + .col-sm-pull-9 { + right: 75% + } + + .col-sm-pull-8 { + right: 66.66666667% + } + + .col-sm-pull-7 { + right: 58.33333333% + } + + .col-sm-pull-6 { + right: 50% + } + + .col-sm-pull-5 { + right: 41.66666667% + } + + .col-sm-pull-4 { + right: 33.33333333% + } + + .col-sm-pull-3 { + right: 25% + } + + .col-sm-pull-2 { + right: 16.66666667% + } + + .col-sm-pull-1 { + right: 8.33333333% + } + + .col-sm-pull-0 { + right: auto + } + + .col-sm-push-12 { + left: 100% + } + + .col-sm-push-11 { + left: 91.66666667% + } + + .col-sm-push-10 { + left: 83.33333333% + } + + .col-sm-push-9 { + left: 75% + } + + .col-sm-push-8 { + left: 66.66666667% + } + + .col-sm-push-7 { + left: 58.33333333% + } + + .col-sm-push-6 { + left: 50% + } + + .col-sm-push-5 { + left: 41.66666667% + } + + .col-sm-push-4 { + left: 33.33333333% + } + + .col-sm-push-3 { + left: 25% + } + + .col-sm-push-2 { + left: 16.66666667% + } + + .col-sm-push-1 { + left: 8.33333333% + } + + .col-sm-push-0 { + left: auto + } + + .col-sm-offset-12 { + margin-left: 100% + } + + .col-sm-offset-11 { + margin-left: 91.66666667% + } + + .col-sm-offset-10 { + margin-left: 83.33333333% + } + + .col-sm-offset-9 { + margin-left: 75% + } + + .col-sm-offset-8 { + margin-left: 66.66666667% + } + + .col-sm-offset-7 { + margin-left: 58.33333333% + } + + .col-sm-offset-6 { + margin-left: 50% + } + + .col-sm-offset-5 { + margin-left: 41.66666667% + } + + .col-sm-offset-4 { + margin-left: 33.33333333% + } + + .col-sm-offset-3 { + margin-left: 25% + } + + .col-sm-offset-2 { + margin-left: 16.66666667% + } + + .col-sm-offset-1 { + margin-left: 8.33333333% + } + + .col-sm-offset-0 { + margin-left: 0 + } +} + +@media (min-width: 992px) { + .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9 { + float: left + } + + .col-md-12 { + width: 100% + } + + .col-md-11 { + width: 91.66666667% + } + + .col-md-10 { + width: 83.33333333% + } + + .col-md-9 { + width: 75% + } + + .col-md-8 { + width: 66.66666667% + } + + .col-md-7 { + width: 58.33333333% + } + + .col-md-6 { + width: 50% + } + + .col-md-5 { + width: 41.66666667% + } + + .col-md-4 { + width: 33.33333333% + } + + .col-md-3 { + width: 25% + } + + .col-md-2 { + width: 16.66666667% + } + + .col-md-1 { + width: 8.33333333% + } + + .col-md-pull-12 { + right: 100% + } + + .col-md-pull-11 { + right: 91.66666667% + } + + .col-md-pull-10 { + right: 83.33333333% + } + + .col-md-pull-9 { + right: 75% + } + + .col-md-pull-8 { + right: 66.66666667% + } + + .col-md-pull-7 { + right: 58.33333333% + } + + .col-md-pull-6 { + right: 50% + } + + .col-md-pull-5 { + right: 41.66666667% + } + + .col-md-pull-4 { + right: 33.33333333% + } + + .col-md-pull-3 { + right: 25% + } + + .col-md-pull-2 { + right: 16.66666667% + } + + .col-md-pull-1 { + right: 8.33333333% + } + + .col-md-pull-0 { + right: auto + } + + .col-md-push-12 { + left: 100% + } + + .col-md-push-11 { + left: 91.66666667% + } + + .col-md-push-10 { + left: 83.33333333% + } + + .col-md-push-9 { + left: 75% + } + + .col-md-push-8 { + left: 66.66666667% + } + + .col-md-push-7 { + left: 58.33333333% + } + + .col-md-push-6 { + left: 50% + } + + .col-md-push-5 { + left: 41.66666667% + } + + .col-md-push-4 { + left: 33.33333333% + } + + .col-md-push-3 { + left: 25% + } + + .col-md-push-2 { + left: 16.66666667% + } + + .col-md-push-1 { + left: 8.33333333% + } + + .col-md-push-0 { + left: auto + } + + .col-md-offset-12 { + margin-left: 100% + } + + .col-md-offset-11 { + margin-left: 91.66666667% + } + + .col-md-offset-10 { + margin-left: 83.33333333% + } + + .col-md-offset-9 { + margin-left: 75% + } + + .col-md-offset-8 { + margin-left: 66.66666667% + } + + .col-md-offset-7 { + margin-left: 58.33333333% + } + + .col-md-offset-6 { + margin-left: 50% + } + + .col-md-offset-5 { + margin-left: 41.66666667% + } + + .col-md-offset-4 { + margin-left: 33.33333333% + } + + .col-md-offset-3 { + margin-left: 25% + } + + .col-md-offset-2 { + margin-left: 16.66666667% + } + + .col-md-offset-1 { + margin-left: 8.33333333% + } + + .col-md-offset-0 { + margin-left: 0 + } +} + +@media (min-width: 1200px) { + .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9 { + float: left + } + + .col-lg-12 { + width: 100% + } + + .col-lg-11 { + width: 91.66666667% + } + + .col-lg-10 { + width: 83.33333333% + } + + .col-lg-9 { + width: 75% + } + + .col-lg-8 { + width: 66.66666667% + } + + .col-lg-7 { + width: 58.33333333% + } + + .col-lg-6 { + width: 50% + } + + .col-lg-5 { + width: 41.66666667% + } + + .col-lg-4 { + width: 33.33333333% + } + + .col-lg-3 { + width: 25% + } + + .col-lg-2 { + width: 16.66666667% + } + + .col-lg-1 { + width: 8.33333333% + } + + .col-lg-pull-12 { + right: 100% + } + + .col-lg-pull-11 { + right: 91.66666667% + } + + .col-lg-pull-10 { + right: 83.33333333% + } + + .col-lg-pull-9 { + right: 75% + } + + .col-lg-pull-8 { + right: 66.66666667% + } + + .col-lg-pull-7 { + right: 58.33333333% + } + + .col-lg-pull-6 { + right: 50% + } + + .col-lg-pull-5 { + right: 41.66666667% + } + + .col-lg-pull-4 { + right: 33.33333333% + } + + .col-lg-pull-3 { + right: 25% + } + + .col-lg-pull-2 { + right: 16.66666667% + } + + .col-lg-pull-1 { + right: 8.33333333% + } + + .col-lg-pull-0 { + right: auto + } + + .col-lg-push-12 { + left: 100% + } + + .col-lg-push-11 { + left: 91.66666667% + } + + .col-lg-push-10 { + left: 83.33333333% + } + + .col-lg-push-9 { + left: 75% + } + + .col-lg-push-8 { + left: 66.66666667% + } + + .col-lg-push-7 { + left: 58.33333333% + } + + .col-lg-push-6 { + left: 50% + } + + .col-lg-push-5 { + left: 41.66666667% + } + + .col-lg-push-4 { + left: 33.33333333% + } + + .col-lg-push-3 { + left: 25% + } + + .col-lg-push-2 { + left: 16.66666667% + } + + .col-lg-push-1 { + left: 8.33333333% + } + + .col-lg-push-0 { + left: auto + } + + .col-lg-offset-12 { + margin-left: 100% + } + + .col-lg-offset-11 { + margin-left: 91.66666667% + } + + .col-lg-offset-10 { + margin-left: 83.33333333% + } + + .col-lg-offset-9 { + margin-left: 75% + } + + .col-lg-offset-8 { + margin-left: 66.66666667% + } + + .col-lg-offset-7 { + margin-left: 58.33333333% + } + + .col-lg-offset-6 { + margin-left: 50% + } + + .col-lg-offset-5 { + margin-left: 41.66666667% + } + + .col-lg-offset-4 { + margin-left: 33.33333333% + } + + .col-lg-offset-3 { + margin-left: 25% + } + + .col-lg-offset-2 { + margin-left: 16.66666667% + } + + .col-lg-offset-1 { + margin-left: 8.33333333% + } + + .col-lg-offset-0 { + margin-left: 0 + } +} + +table { + background-color: transparent +} + +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #777; + text-align: left +} + +th { + text-align: left +} + +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px +} + +.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #ddd +} + +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #ddd +} + +.table > caption + thead > tr:first-child > td, .table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > td, .table > thead:first-child > tr:first-child > th { + border-top: 0 +} + +.table > tbody + tbody { + border-top: 2px solid #ddd +} + +.table .table { + background-color: #fff +} + +.table-condensed > tbody > tr > td, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > td, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > thead > tr > th { + padding: 5px +} + +.table-bordered { + border: 1px solid #ddd +} + +.table-bordered > tbody > tr > td, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > td, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > thead > tr > th { + border: 1px solid #ddd +} + +.table-bordered > thead > tr > td, .table-bordered > thead > tr > th { + border-bottom-width: 2px +} + +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #f9f9f9 +} + +.table-hover > tbody > tr:hover { + background-color: #f5f5f5 +} + +table col[class*=col-] { + position: static; + display: table-column; + float: none +} + +table td[class*=col-], table th[class*=col-] { + position: static; + display: table-cell; + float: none +} + +.table > tbody > tr.active > td, .table > tbody > tr.active > th, .table > tbody > tr > td.active, .table > tbody > tr > th.active, .table > tfoot > tr.active > td, .table > tfoot > tr.active > th, .table > tfoot > tr > td.active, .table > tfoot > tr > th.active, .table > thead > tr.active > td, .table > thead > tr.active > th, .table > thead > tr > td.active, .table > thead > tr > th.active { + background-color: #f5f5f5 +} + +.table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr.active:hover > th, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr > td.active:hover, .table-hover > tbody > tr > th.active:hover { + background-color: #e8e8e8 +} + +.table > tbody > tr.success > td, .table > tbody > tr.success > th, .table > tbody > tr > td.success, .table > tbody > tr > th.success, .table > tfoot > tr.success > td, .table > tfoot > tr.success > th, .table > tfoot > tr > td.success, .table > tfoot > tr > th.success, .table > thead > tr.success > td, .table > thead > tr.success > th, .table > thead > tr > td.success, .table > thead > tr > th.success { + background-color: #dff0d8 +} + +.table-hover > tbody > tr.success:hover > td, .table-hover > tbody > tr.success:hover > th, .table-hover > tbody > tr:hover > .success, .table-hover > tbody > tr > td.success:hover, .table-hover > tbody > tr > th.success:hover { + background-color: #d0e9c6 +} + +.table > tbody > tr.info > td, .table > tbody > tr.info > th, .table > tbody > tr > td.info, .table > tbody > tr > th.info, .table > tfoot > tr.info > td, .table > tfoot > tr.info > th, .table > tfoot > tr > td.info, .table > tfoot > tr > th.info, .table > thead > tr.info > td, .table > thead > tr.info > th, .table > thead > tr > td.info, .table > thead > tr > th.info { + background-color: #d9edf7 +} + +.table-hover > tbody > tr.info:hover > td, .table-hover > tbody > tr.info:hover > th, .table-hover > tbody > tr:hover > .info, .table-hover > tbody > tr > td.info:hover, .table-hover > tbody > tr > th.info:hover { + background-color: #c4e3f3 +} + +.table > tbody > tr.warning > td, .table > tbody > tr.warning > th, .table > tbody > tr > td.warning, .table > tbody > tr > th.warning, .table > tfoot > tr.warning > td, .table > tfoot > tr.warning > th, .table > tfoot > tr > td.warning, .table > tfoot > tr > th.warning, .table > thead > tr.warning > td, .table > thead > tr.warning > th, .table > thead > tr > td.warning, .table > thead > tr > th.warning { + background-color: #fcf8e3 +} + +.table-hover > tbody > tr.warning:hover > td, .table-hover > tbody > tr.warning:hover > th, .table-hover > tbody > tr:hover > .warning, .table-hover > tbody > tr > td.warning:hover, .table-hover > tbody > tr > th.warning:hover { + background-color: #faf2cc +} + +.table > tbody > tr.danger > td, .table > tbody > tr.danger > th, .table > tbody > tr > td.danger, .table > tbody > tr > th.danger, .table > tfoot > tr.danger > td, .table > tfoot > tr.danger > th, .table > tfoot > tr > td.danger, .table > tfoot > tr > th.danger, .table > thead > tr.danger > td, .table > thead > tr.danger > th, .table > thead > tr > td.danger, .table > thead > tr > th.danger { + background-color: #f2dede +} + +.table-hover > tbody > tr.danger:hover > td, .table-hover > tbody > tr.danger:hover > th, .table-hover > tbody > tr:hover > .danger, .table-hover > tbody > tr > td.danger:hover, .table-hover > tbody > tr > th.danger:hover { + background-color: #ebcccc +} + +.table-responsive { + min-height: .01%; + overflow-x: auto +} + +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #ddd + } + + .table-responsive > .table { + margin-bottom: 0 + } + + .table-responsive > .table > tbody > tr > td, .table-responsive > .table > tbody > tr > th, .table-responsive > .table > tfoot > tr > td, .table-responsive > .table > tfoot > tr > th, .table-responsive > .table > thead > tr > td, .table-responsive > .table > thead > tr > th { + white-space: nowrap + } + + .table-responsive > .table-bordered { + border: 0 + } + + .table-responsive > .table-bordered > tbody > tr > td:first-child, .table-responsive > .table-bordered > tbody > tr > th:first-child, .table-responsive > .table-bordered > tfoot > tr > td:first-child, .table-responsive > .table-bordered > tfoot > tr > th:first-child, .table-responsive > .table-bordered > thead > tr > td:first-child, .table-responsive > .table-bordered > thead > tr > th:first-child { + border-left: 0 + } + + .table-responsive > .table-bordered > tbody > tr > td:last-child, .table-responsive > .table-bordered > tbody > tr > th:last-child, .table-responsive > .table-bordered > tfoot > tr > td:last-child, .table-responsive > .table-bordered > tfoot > tr > th:last-child, .table-responsive > .table-bordered > thead > tr > td:last-child, .table-responsive > .table-bordered > thead > tr > th:last-child { + border-right: 0 + } + + .table-responsive > .table-bordered > tbody > tr:last-child > td, .table-responsive > .table-bordered > tbody > tr:last-child > th, .table-responsive > .table-bordered > tfoot > tr:last-child > td, .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0 + } +} + +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0 +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: inherit; + color: #333; + border: 0; + border-bottom: 1px solid #e5e5e5 +} + +label { + display: inline-block; + max-width: 100%; + margin-bottom: 5px; + font-weight: 700 +} + +input[type=search] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} + +input[type=checkbox], input[type=radio] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal +} + +input[type=file] { + display: block +} + +input[type=range] { + display: block; + width: 100% +} + +select[multiple], select[size] { + height: auto +} + +input[type=file]:focus, input[type=checkbox]:focus, input[type=radio]:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px +} + +output { + display: block; + padding-top: 7px; + font-size: 14px; + line-height: 1.42857143; + color: #555 +} + +.form-control { + display: block; + width: 100%; + height: 34px; + padding: 6px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + background-color: #fff; + background-image: none; + border: 1px solid #ccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s +} + +.form-control:focus { + border-color: #66afe9; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6) +} + +.form-control::-moz-placeholder { + color: #999; + opacity: 1 +} + +.form-control:-ms-input-placeholder { + color: #999 +} + +.form-control::-webkit-input-placeholder { + color: #999 +} + +.form-control::-ms-expand { + background-color: transparent; + border: 0 +} + +.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { + background-color: #eee; + opacity: 1 +} + +.form-control[disabled], fieldset[disabled] .form-control { + cursor: not-allowed +} + +textarea.form-control { + height: auto +} + +input[type=search] { + -webkit-appearance: none +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + input[type=date].form-control, input[type=time].form-control, input[type=datetime-local].form-control, input[type=month].form-control { + line-height: 34px + } + + .input-group-sm input[type=date], .input-group-sm input[type=time], .input-group-sm input[type=datetime-local], .input-group-sm input[type=month], input[type=date].input-sm, input[type=time].input-sm, input[type=datetime-local].input-sm, input[type=month].input-sm { + line-height: 30px + } + + .input-group-lg input[type=date], .input-group-lg input[type=time], .input-group-lg input[type=datetime-local], .input-group-lg input[type=month], input[type=date].input-lg, input[type=time].input-lg, input[type=datetime-local].input-lg, input[type=month].input-lg { + line-height: 46px + } +} + +.form-group { + margin-bottom: 15px +} + +.checkbox, .radio { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px +} + +.checkbox label, .radio label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: 400; + cursor: pointer +} + +.checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] { + position: absolute; + margin-top: 4px \9; + margin-left: -20px +} + +.checkbox + .checkbox, .radio + .radio { + margin-top: -5px +} + +.checkbox-inline, .radio-inline { + position: relative; + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + font-weight: 400; + vertical-align: middle; + cursor: pointer +} + +.checkbox-inline + .checkbox-inline, .radio-inline + .radio-inline { + margin-top: 0; + margin-left: 10px +} + +fieldset[disabled] input[type=checkbox], fieldset[disabled] input[type=radio], input[type=checkbox].disabled, input[type=checkbox][disabled], input[type=radio].disabled, input[type=radio][disabled] { + cursor: not-allowed +} + +.checkbox-inline.disabled, .radio-inline.disabled, fieldset[disabled] .checkbox-inline, fieldset[disabled] .radio-inline { + cursor: not-allowed +} + +.checkbox.disabled label, .radio.disabled label, fieldset[disabled] .checkbox label, fieldset[disabled] .radio label { + cursor: not-allowed +} + +.form-control-static { + min-height: 34px; + padding-top: 7px; + padding-bottom: 7px; + margin-bottom: 0 +} + +.form-control-static.input-lg, .form-control-static.input-sm { + padding-right: 0; + padding-left: 0 +} + +.input-sm { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px +} + +select.input-sm { + height: 30px; + line-height: 30px +} + +select[multiple].input-sm, textarea.input-sm { + height: auto +} + +.form-group-sm .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px +} + +.form-group-sm select.form-control { + height: 30px; + line-height: 30px +} + +.form-group-sm select[multiple].form-control, .form-group-sm textarea.form-control { + height: auto +} + +.form-group-sm .form-control-static { + height: 30px; + min-height: 32px; + padding: 6px 10px; + font-size: 12px; + line-height: 1.5 +} + +.input-lg { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px +} + +select.input-lg { + height: 46px; + line-height: 46px +} + +select[multiple].input-lg, textarea.input-lg { + height: auto +} + +.form-group-lg .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px +} + +.form-group-lg select.form-control { + height: 46px; + line-height: 46px +} + +.form-group-lg select[multiple].form-control, .form-group-lg textarea.form-control { + height: auto +} + +.form-group-lg .form-control-static { + height: 46px; + min-height: 38px; + padding: 11px 16px; + font-size: 18px; + line-height: 1.3333333 +} + +.has-feedback { + position: relative +} + +.has-feedback .form-control { + padding-right: 42.5px +} + +.form-control-feedback { + position: absolute; + top: 0; + right: 0; + z-index: 2; + display: block; + width: 34px; + height: 34px; + line-height: 34px; + text-align: center; + pointer-events: none +} + +.form-group-lg .form-control + .form-control-feedback, .input-group-lg + .form-control-feedback, .input-lg + .form-control-feedback { + width: 46px; + height: 46px; + line-height: 46px +} + +.form-group-sm .form-control + .form-control-feedback, .input-group-sm + .form-control-feedback, .input-sm + .form-control-feedback { + width: 30px; + height: 30px; + line-height: 30px +} + +.has-success .checkbox, .has-success .checkbox-inline, .has-success .control-label, .has-success .help-block, .has-success .radio, .has-success .radio-inline, .has-success.checkbox label, .has-success.checkbox-inline label, .has-success.radio label, .has-success.radio-inline label { + color: #3c763d +} + +.has-success .form-control { + border-color: #3c763d; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) +} + +.has-success .form-control:focus { + border-color: #2b542c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168 +} + +.has-success .input-group-addon { + color: #3c763d; + background-color: #dff0d8; + border-color: #3c763d +} + +.has-success .form-control-feedback { + color: #3c763d +} + +.has-warning .checkbox, .has-warning .checkbox-inline, .has-warning .control-label, .has-warning .help-block, .has-warning .radio, .has-warning .radio-inline, .has-warning.checkbox label, .has-warning.checkbox-inline label, .has-warning.radio label, .has-warning.radio-inline label { + color: #8a6d3b +} + +.has-warning .form-control { + border-color: #8a6d3b; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) +} + +.has-warning .form-control:focus { + border-color: #66512c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b +} + +.has-warning .input-group-addon { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #8a6d3b +} + +.has-warning .form-control-feedback { + color: #8a6d3b +} + +.has-error .checkbox, .has-error .checkbox-inline, .has-error .control-label, .has-error .help-block, .has-error .radio, .has-error .radio-inline, .has-error.checkbox label, .has-error.checkbox-inline label, .has-error.radio label, .has-error.radio-inline label { + color: #a94442 +} + +.has-error .form-control { + border-color: #a94442; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075) +} + +.has-error .form-control:focus { + border-color: #843534; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483 +} + +.has-error .input-group-addon { + color: #a94442; + background-color: #f2dede; + border-color: #a94442 +} + +.has-error .form-control-feedback { + color: #a94442 +} + +.has-feedback label ~ .form-control-feedback { + top: 25px +} + +.has-feedback label.sr-only ~ .form-control-feedback { + top: 0 +} + +.help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373 +} + +@media (min-width: 768px) { + .form-inline .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle + } + + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle + } + + .form-inline .form-control-static { + display: inline-block + } + + .form-inline .input-group { + display: inline-table; + vertical-align: middle + } + + .form-inline .input-group .form-control, .form-inline .input-group .input-group-addon, .form-inline .input-group .input-group-btn { + width: auto + } + + .form-inline .input-group > .form-control { + width: 100% + } + + .form-inline .control-label { + margin-bottom: 0; + vertical-align: middle + } + + .form-inline .checkbox, .form-inline .radio { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle + } + + .form-inline .checkbox label, .form-inline .radio label { + padding-left: 0 + } + + .form-inline .checkbox input[type=checkbox], .form-inline .radio input[type=radio] { + position: relative; + margin-left: 0 + } + + .form-inline .has-feedback .form-control-feedback { + top: 0 + } +} + +.form-horizontal .checkbox, .form-horizontal .checkbox-inline, .form-horizontal .radio, .form-horizontal .radio-inline { + padding-top: 7px; + margin-top: 0; + margin-bottom: 0 +} + +.form-horizontal .checkbox, .form-horizontal .radio { + min-height: 27px +} + +.form-horizontal .form-group { + margin-right: -15px; + margin-left: -15px +} + +@media (min-width: 768px) { + .form-horizontal .control-label { + padding-top: 7px; + margin-bottom: 0; + text-align: right + } +} + +.form-horizontal .has-feedback .form-control-feedback { + right: 15px +} + +@media (min-width: 768px) { + .form-horizontal .form-group-lg .control-label { + padding-top: 11px; + font-size: 18px + } +} + +@media (min-width: 768px) { + .form-horizontal .form-group-sm .control-label { + padding-top: 6px; + font-size: 12px + } +} + +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px +} + +.btn.active.focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn:active:focus, .btn:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px +} + +.btn.focus, .btn:focus, .btn:hover { + color: #333; + text-decoration: none +} + +.btn.active, .btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) +} + +.btn.disabled, .btn[disabled], fieldset[disabled] .btn { + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65 +} + +a.btn.disabled, fieldset[disabled] a.btn { + pointer-events: none +} + +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc +} + +.btn-default.focus, .btn-default:focus { + color: #333; + background-color: #e6e6e6; + border-color: #8c8c8c +} + +.btn-default:hover { + color: #333; + background-color: #e6e6e6; + border-color: #adadad +} + +.btn-default.active, .btn-default:active, .open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad +} + +.btn-default.active.focus, .btn-default.active:focus, .btn-default.active:hover, .btn-default:active.focus, .btn-default:active:focus, .btn-default:active:hover, .open > .dropdown-toggle.btn-default.focus, .open > .dropdown-toggle.btn-default:focus, .open > .dropdown-toggle.btn-default:hover { + color: #333; + background-color: #d4d4d4; + border-color: #8c8c8c +} + +.btn-default.active, .btn-default:active, .open > .dropdown-toggle.btn-default { + background-image: none +} + +.btn-default.disabled.focus, .btn-default.disabled:focus, .btn-default.disabled:hover, .btn-default[disabled].focus, .btn-default[disabled]:focus, .btn-default[disabled]:hover, fieldset[disabled] .btn-default.focus, fieldset[disabled] .btn-default:focus, fieldset[disabled] .btn-default:hover { + background-color: #fff; + border-color: #ccc +} + +.btn-default .badge { + color: #fff; + background-color: #333 +} + +.btn-primary { + color: #fff; + background-color: #337ab7; + border-color: #2e6da4 +} + +.btn-primary.focus, .btn-primary:focus { + color: #fff; + background-color: #286090; + border-color: #122b40 +} + +.btn-primary:hover { + color: #fff; + background-color: #286090; + border-color: #204d74 +} + +.btn-primary.active, .btn-primary:active, .open > .dropdown-toggle.btn-primary { + color: #fff; + background-color: #286090; + border-color: #204d74 +} + +.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover, .btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover, .open > .dropdown-toggle.btn-primary.focus, .open > .dropdown-toggle.btn-primary:focus, .open > .dropdown-toggle.btn-primary:hover { + color: #fff; + background-color: #204d74; + border-color: #122b40 +} + +.btn-primary.active, .btn-primary:active, .open > .dropdown-toggle.btn-primary { + background-image: none +} + +.btn-primary.disabled.focus, .btn-primary.disabled:focus, .btn-primary.disabled:hover, .btn-primary[disabled].focus, .btn-primary[disabled]:focus, .btn-primary[disabled]:hover, fieldset[disabled] .btn-primary.focus, fieldset[disabled] .btn-primary:focus, fieldset[disabled] .btn-primary:hover { + background-color: #337ab7; + border-color: #2e6da4 +} + +.btn-primary .badge { + color: #337ab7; + background-color: #fff +} + +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c +} + +.btn-success.focus, .btn-success:focus { + color: #fff; + background-color: #449d44; + border-color: #255625 +} + +.btn-success:hover { + color: #fff; + background-color: #449d44; + border-color: #398439 +} + +.btn-success.active, .btn-success:active, .open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439 +} + +.btn-success.active.focus, .btn-success.active:focus, .btn-success.active:hover, .btn-success:active.focus, .btn-success:active:focus, .btn-success:active:hover, .open > .dropdown-toggle.btn-success.focus, .open > .dropdown-toggle.btn-success:focus, .open > .dropdown-toggle.btn-success:hover { + color: #fff; + background-color: #398439; + border-color: #255625 +} + +.btn-success.active, .btn-success:active, .open > .dropdown-toggle.btn-success { + background-image: none +} + +.btn-success.disabled.focus, .btn-success.disabled:focus, .btn-success.disabled:hover, .btn-success[disabled].focus, .btn-success[disabled]:focus, .btn-success[disabled]:hover, fieldset[disabled] .btn-success.focus, fieldset[disabled] .btn-success:focus, fieldset[disabled] .btn-success:hover { + background-color: #5cb85c; + border-color: #4cae4c +} + +.btn-success .badge { + color: #5cb85c; + background-color: #fff +} + +.btn-info { + color: #fff; + background-color: #5bc0de; + border-color: #46b8da +} + +.btn-info.focus, .btn-info:focus { + color: #fff; + background-color: #31b0d5; + border-color: #1b6d85 +} + +.btn-info:hover { + color: #fff; + background-color: #31b0d5; + border-color: #269abc +} + +.btn-info.active, .btn-info:active, .open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc +} + +.btn-info.active.focus, .btn-info.active:focus, .btn-info.active:hover, .btn-info:active.focus, .btn-info:active:focus, .btn-info:active:hover, .open > .dropdown-toggle.btn-info.focus, .open > .dropdown-toggle.btn-info:focus, .open > .dropdown-toggle.btn-info:hover { + color: #fff; + background-color: #269abc; + border-color: #1b6d85 +} + +.btn-info.active, .btn-info:active, .open > .dropdown-toggle.btn-info { + background-image: none +} + +.btn-info.disabled.focus, .btn-info.disabled:focus, .btn-info.disabled:hover, .btn-info[disabled].focus, .btn-info[disabled]:focus, .btn-info[disabled]:hover, fieldset[disabled] .btn-info.focus, fieldset[disabled] .btn-info:focus, fieldset[disabled] .btn-info:hover { + background-color: #5bc0de; + border-color: #46b8da +} + +.btn-info .badge { + color: #5bc0de; + background-color: #fff +} + +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236 +} + +.btn-warning.focus, .btn-warning:focus { + color: #fff; + background-color: #ec971f; + border-color: #985f0d +} + +.btn-warning:hover { + color: #fff; + background-color: #ec971f; + border-color: #d58512 +} + +.btn-warning.active, .btn-warning:active, .open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512 +} + +.btn-warning.active.focus, .btn-warning.active:focus, .btn-warning.active:hover, .btn-warning:active.focus, .btn-warning:active:focus, .btn-warning:active:hover, .open > .dropdown-toggle.btn-warning.focus, .open > .dropdown-toggle.btn-warning:focus, .open > .dropdown-toggle.btn-warning:hover { + color: #fff; + background-color: #d58512; + border-color: #985f0d +} + +.btn-warning.active, .btn-warning:active, .open > .dropdown-toggle.btn-warning { + background-image: none +} + +.btn-warning.disabled.focus, .btn-warning.disabled:focus, .btn-warning.disabled:hover, .btn-warning[disabled].focus, .btn-warning[disabled]:focus, .btn-warning[disabled]:hover, fieldset[disabled] .btn-warning.focus, fieldset[disabled] .btn-warning:focus, fieldset[disabled] .btn-warning:hover { + background-color: #f0ad4e; + border-color: #eea236 +} + +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff +} + +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a +} + +.btn-danger.focus, .btn-danger:focus { + color: #fff; + background-color: #c9302c; + border-color: #761c19 +} + +.btn-danger:hover { + color: #fff; + background-color: #c9302c; + border-color: #ac2925 +} + +.btn-danger.active, .btn-danger:active, .open > .dropdown-toggle.btn-danger { + color: #fff; + background-color: #c9302c; + border-color: #ac2925 +} + +.btn-danger.active.focus, .btn-danger.active:focus, .btn-danger.active:hover, .btn-danger:active.focus, .btn-danger:active:focus, .btn-danger:active:hover, .open > .dropdown-toggle.btn-danger.focus, .open > .dropdown-toggle.btn-danger:focus, .open > .dropdown-toggle.btn-danger:hover { + color: #fff; + background-color: #ac2925; + border-color: #761c19 +} + +.btn-danger.active, .btn-danger:active, .open > .dropdown-toggle.btn-danger { + background-image: none +} + +.btn-danger.disabled.focus, .btn-danger.disabled:focus, .btn-danger.disabled:hover, .btn-danger[disabled].focus, .btn-danger[disabled]:focus, .btn-danger[disabled]:hover, fieldset[disabled] .btn-danger.focus, fieldset[disabled] .btn-danger:focus, fieldset[disabled] .btn-danger:hover { + background-color: #d9534f; + border-color: #d43f3a +} + +.btn-danger .badge { + color: #d9534f; + background-color: #fff +} + +.btn-link { + font-weight: 400; + color: #337ab7; + border-radius: 0 +} + +.btn-link, .btn-link.active, .btn-link:active, .btn-link[disabled], fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none +} + +.btn-link, .btn-link:active, .btn-link:focus, .btn-link:hover { + border-color: transparent +} + +.btn-link:focus, .btn-link:hover { + color: #23527c; + text-decoration: underline; + background-color: transparent +} + +.btn-link[disabled]:focus, .btn-link[disabled]:hover, fieldset[disabled] .btn-link:focus, fieldset[disabled] .btn-link:hover { + color: #777; + text-decoration: none +} + +.btn-group-lg > .btn, .btn-lg { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px +} + +.btn-group-sm > .btn, .btn-sm { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px +} + +.btn-group-xs > .btn, .btn-xs { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px +} + +.btn-block { + display: block; + width: 100% +} + +.btn-block + .btn-block { + margin-top: 5px +} + +input[type=button].btn-block, input[type=reset].btn-block, input[type=submit].btn-block { + width: 100% +} + +.fade { + opacity: 0; + -webkit-transition: opacity .15s linear; + -o-transition: opacity .15s linear; + transition: opacity .15s linear +} + +.fade.in { + opacity: 1 +} + +.collapse { + display: none +} + +.collapse.in { + display: block +} + +tr.collapse.in { + display: table-row +} + +tbody.collapse.in { + display: table-row-group +} + +.collapsing { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition-timing-function: ease; + -o-transition-timing-function: ease; + transition-timing-function: ease; + -webkit-transition-duration: .35s; + -o-transition-duration: .35s; + transition-duration: .35s; + -webkit-transition-property: height, visibility; + -o-transition-property: height, visibility; + transition-property: height, visibility +} + +.caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px dashed; + border-top: 4px solid \9; + border-right: 4px solid transparent; + border-left: 4px solid transparent +} + +.dropdown, .dropup { + position: relative +} + +.dropdown-toggle:focus { + outline: 0 +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); + box-shadow: 0 6px 12px rgba(0, 0, 0, .175) +} + +.dropdown-menu.pull-right { + right: 0; + left: auto +} + +.dropdown-menu .divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5 +} + +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: 400; + line-height: 1.42857143; + color: #333; + white-space: nowrap +} + +.dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover { + color: #262626; + text-decoration: none; + background-color: #f5f5f5 +} + +.dropdown-menu > .active > a, .dropdown-menu > .active > a:focus, .dropdown-menu > .active > a:hover { + color: #fff; + text-decoration: none; + background-color: #337ab7; + outline: 0 +} + +.dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:focus, .dropdown-menu > .disabled > a:hover { + color: #777 +} + +.dropdown-menu > .disabled > a:focus, .dropdown-menu > .disabled > a:hover { + text-decoration: none; + cursor: not-allowed; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false) +} + +.open > .dropdown-menu { + display: block +} + +.open > a { + outline: 0 +} + +.dropdown-menu-right { + right: 0; + left: auto +} + +.dropdown-menu-left { + right: auto; + left: 0 +} + +.dropdown-header { + display: block; + padding: 3px 20px; + font-size: 12px; + line-height: 1.42857143; + color: #777; + white-space: nowrap +} + +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990 +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto +} + +.dropup .caret, .navbar-fixed-bottom .dropdown .caret { + content: ""; + border-top: 0; + border-bottom: 4px dashed; + border-bottom: 4px solid \9 +} + +.dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 2px +} + +@media (min-width: 768px) { + .navbar-right .dropdown-menu { + right: 0; + left: auto + } + + .navbar-right .dropdown-menu-left { + right: auto; + left: 0 + } +} + +.btn-group, .btn-group-vertical { + position: relative; + display: inline-block; + vertical-align: middle +} + +.btn-group-vertical > .btn, .btn-group > .btn { + position: relative; + float: left +} + +.btn-group-vertical > .btn.active, .btn-group-vertical > .btn:active, .btn-group-vertical > .btn:focus, .btn-group-vertical > .btn:hover, .btn-group > .btn.active, .btn-group > .btn:active, .btn-group > .btn:focus, .btn-group > .btn:hover { + z-index: 2 +} + +.btn-group .btn + .btn, .btn-group .btn + .btn-group, .btn-group .btn-group + .btn, .btn-group .btn-group + .btn-group { + margin-left: -1px +} + +.btn-toolbar { + margin-left: -5px +} + +.btn-toolbar .btn, .btn-toolbar .btn-group, .btn-toolbar .input-group { + float: left +} + +.btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { + margin-left: 5px +} + +.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { + border-radius: 0 +} + +.btn-group > .btn:first-child { + margin-left: 0 +} + +.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0 +} + +.btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0 +} + +.btn-group > .btn-group { + float: left +} + +.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0 +} + +.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-top-right-radius: 0; + border-bottom-right-radius: 0 +} + +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0 +} + +.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { + outline: 0 +} + +.btn-group > .btn + .dropdown-toggle { + padding-right: 8px; + padding-left: 8px +} + +.btn-group > .btn-lg + .dropdown-toggle { + padding-right: 12px; + padding-left: 12px +} + +.btn-group.open .dropdown-toggle { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) +} + +.btn-group.open .dropdown-toggle.btn-link { + -webkit-box-shadow: none; + box-shadow: none +} + +.btn .caret { + margin-left: 0 +} + +.btn-lg .caret { + border-width: 5px 5px 0; + border-bottom-width: 0 +} + +.dropup .btn-lg .caret { + border-width: 0 5px 5px +} + +.btn-group-vertical > .btn, .btn-group-vertical > .btn-group, .btn-group-vertical > .btn-group > .btn { + display: block; + float: none; + width: 100%; + max-width: 100% +} + +.btn-group-vertical > .btn-group > .btn { + float: none +} + +.btn-group-vertical > .btn + .btn, .btn-group-vertical > .btn + .btn-group, .btn-group-vertical > .btn-group + .btn, .btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0 +} + +.btn-group-vertical > .btn:not(:first-child):not(:last-child) { + border-radius: 0 +} + +.btn-group-vertical > .btn:first-child:not(:last-child) { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0 +} + +.btn-group-vertical > .btn:last-child:not(:first-child) { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px +} + +.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { + border-radius: 0 +} + +.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0 +} + +.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0 +} + +.btn-group-justified { + display: table; + width: 100%; + table-layout: fixed; + border-collapse: separate +} + +.btn-group-justified > .btn, .btn-group-justified > .btn-group { + display: table-cell; + float: none; + width: 1% +} + +.btn-group-justified > .btn-group .btn { + width: 100% +} + +.btn-group-justified > .btn-group .dropdown-menu { + left: auto +} + +[data-toggle=buttons] > .btn input[type=checkbox], [data-toggle=buttons] > .btn input[type=radio], [data-toggle=buttons] > .btn-group > .btn input[type=checkbox], [data-toggle=buttons] > .btn-group > .btn input[type=radio] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none +} + +.input-group { + position: relative; + display: table; + border-collapse: separate +} + +.input-group[class*=col-] { + float: none; + padding-right: 0; + padding-left: 0 +} + +.input-group .form-control { + position: relative; + z-index: 2; + float: left; + width: 100%; + margin-bottom: 0 +} + +.input-group .form-control:focus { + z-index: 3 +} + +.input-group-lg > .form-control, .input-group-lg > .input-group-addon, .input-group-lg > .input-group-btn > .btn { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px +} + +select.input-group-lg > .form-control, select.input-group-lg > .input-group-addon, select.input-group-lg > .input-group-btn > .btn { + height: 46px; + line-height: 46px +} + +select[multiple].input-group-lg > .form-control, select[multiple].input-group-lg > .input-group-addon, select[multiple].input-group-lg > .input-group-btn > .btn, textarea.input-group-lg > .form-control, textarea.input-group-lg > .input-group-addon, textarea.input-group-lg > .input-group-btn > .btn { + height: auto +} + +.input-group-sm > .form-control, .input-group-sm > .input-group-addon, .input-group-sm > .input-group-btn > .btn { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px +} + +select.input-group-sm > .form-control, select.input-group-sm > .input-group-addon, select.input-group-sm > .input-group-btn > .btn { + height: 30px; + line-height: 30px +} + +select[multiple].input-group-sm > .form-control, select[multiple].input-group-sm > .input-group-addon, select[multiple].input-group-sm > .input-group-btn > .btn, textarea.input-group-sm > .form-control, textarea.input-group-sm > .input-group-addon, textarea.input-group-sm > .input-group-btn > .btn { + height: auto +} + +.input-group .form-control, .input-group-addon, .input-group-btn { + display: table-cell +} + +.input-group .form-control:not(:first-child):not(:last-child), .input-group-addon:not(:first-child):not(:last-child), .input-group-btn:not(:first-child):not(:last-child) { + border-radius: 0 +} + +.input-group-addon, .input-group-btn { + width: 1%; + white-space: nowrap; + vertical-align: middle +} + +.input-group-addon { + padding: 6px 12px; + font-size: 14px; + font-weight: 400; + line-height: 1; + color: #555; + text-align: center; + background-color: #eee; + border: 1px solid #ccc; + border-radius: 4px +} + +.input-group-addon.input-sm { + padding: 5px 10px; + font-size: 12px; + border-radius: 3px +} + +.input-group-addon.input-lg { + padding: 10px 16px; + font-size: 18px; + border-radius: 6px +} + +.input-group-addon input[type=checkbox], .input-group-addon input[type=radio] { + margin-top: 0 +} + +.input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group > .btn, .input-group-btn:first-child > .dropdown-toggle, .input-group-btn:last-child > .btn-group:not(:last-child) > .btn, .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { + border-top-right-radius: 0; + border-bottom-right-radius: 0 +} + +.input-group-addon:first-child { + border-right: 0 +} + +.input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:first-child > .btn-group:not(:first-child) > .btn, .input-group-btn:first-child > .btn:not(:first-child), .input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group > .btn, .input-group-btn:last-child > .dropdown-toggle { + border-top-left-radius: 0; + border-bottom-left-radius: 0 +} + +.input-group-addon:last-child { + border-left: 0 +} + +.input-group-btn { + position: relative; + font-size: 0; + white-space: nowrap +} + +.input-group-btn > .btn { + position: relative +} + +.input-group-btn > .btn + .btn { + margin-left: -1px +} + +.input-group-btn > .btn:active, .input-group-btn > .btn:focus, .input-group-btn > .btn:hover { + z-index: 2 +} + +.input-group-btn:first-child > .btn, .input-group-btn:first-child > .btn-group { + margin-right: -1px +} + +.input-group-btn:last-child > .btn, .input-group-btn:last-child > .btn-group { + z-index: 2; + margin-left: -1px +} + +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none +} + +.nav > li { + position: relative; + display: block +} + +.nav > li > a { + position: relative; + display: block; + padding: 10px 15px +} + +.nav > li > a:focus, .nav > li > a:hover { + text-decoration: none; + background-color: #eee +} + +.nav > li.disabled > a { + color: #777 +} + +.nav > li.disabled > a:focus, .nav > li.disabled > a:hover { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent +} + +.nav .open > a, .nav .open > a:focus, .nav .open > a:hover { + background-color: #eee; + border-color: #337ab7 +} + +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5 +} + +.nav > li > a > img { + max-width: none +} + +.nav-tabs { + border-bottom: 1px solid #ddd +} + +.nav-tabs > li { + float: left; + margin-bottom: -1px +} + +.nav-tabs > li > a { + margin-right: 2px; + line-height: 1.42857143; + border: 1px solid transparent; + border-radius: 4px 4px 0 0 +} + +.nav-tabs > li > a:hover { + border-color: #eee #eee #ddd +} + +.nav-tabs > li.active > a, .nav-tabs > li.active > a:focus, .nav-tabs > li.active > a:hover { + color: #555; + cursor: default; + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: transparent +} + +.nav-tabs.nav-justified { + width: 100%; + border-bottom: 0 +} + +.nav-tabs.nav-justified > li { + float: none +} + +.nav-tabs.nav-justified > li > a { + margin-bottom: 5px; + text-align: center +} + +.nav-tabs.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto +} + +@media (min-width: 768px) { + .nav-tabs.nav-justified > li { + display: table-cell; + width: 1% + } + + .nav-tabs.nav-justified > li > a { + margin-bottom: 0 + } +} + +.nav-tabs.nav-justified > li > a { + margin-right: 0; + border-radius: 4px +} + +.nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:hover { + border: 1px solid #ddd +} + +@media (min-width: 768px) { + .nav-tabs.nav-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0 + } + + .nav-tabs.nav-justified > .active > a, .nav-tabs.nav-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:hover { + border-bottom-color: #fff + } +} + +.nav-pills > li { + float: left +} + +.nav-pills > li > a { + border-radius: 4px +} + +.nav-pills > li + li { + margin-left: 2px +} + +.nav-pills > li.active > a, .nav-pills > li.active > a:focus, .nav-pills > li.active > a:hover { + color: #fff; + background-color: #337ab7 +} + +.nav-stacked > li { + float: none +} + +.nav-stacked > li + li { + margin-top: 2px; + margin-left: 0 +} + +.nav-justified { + width: 100% +} + +.nav-justified > li { + float: none +} + +.nav-justified > li > a { + margin-bottom: 5px; + text-align: center +} + +.nav-justified > .dropdown .dropdown-menu { + top: auto; + left: auto +} + +@media (min-width: 768px) { + .nav-justified > li { + display: table-cell; + width: 1% + } + + .nav-justified > li > a { + margin-bottom: 0 + } +} + +.nav-tabs-justified { + border-bottom: 0 +} + +.nav-tabs-justified > li > a { + margin-right: 0; + border-radius: 4px +} + +.nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:focus, .nav-tabs-justified > .active > a:hover { + border: 1px solid #ddd +} + +@media (min-width: 768px) { + .nav-tabs-justified > li > a { + border-bottom: 1px solid #ddd; + border-radius: 4px 4px 0 0 + } + + .nav-tabs-justified > .active > a, .nav-tabs-justified > .active > a:focus, .nav-tabs-justified > .active > a:hover { + border-bottom-color: #fff + } +} + +.tab-content > .tab-pane { + display: none +} + +.tab-content > .active { + display: block +} + +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0 +} + +.navbar { + position: relative; + min-height: 50px; + margin-bottom: 20px; + border: 1px solid transparent +} + +@media (min-width: 768px) { + .navbar { + border-radius: 4px + } +} + +@media (min-width: 768px) { + .navbar-header { + float: left + } +} + +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1) +} + +.navbar-collapse.in { + overflow-y: auto +} + +@media (min-width: 768px) { + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none + } + + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important + } + + .navbar-collapse.in { + overflow-y: visible + } + + .navbar-fixed-bottom .navbar-collapse, .navbar-fixed-top .navbar-collapse, .navbar-static-top .navbar-collapse { + padding-right: 0; + padding-left: 0 + } +} + +.navbar-fixed-bottom .navbar-collapse, .navbar-fixed-top .navbar-collapse { + max-height: 340px +} + +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-fixed-bottom .navbar-collapse, .navbar-fixed-top .navbar-collapse { + max-height: 200px + } +} + +.container-fluid > .navbar-collapse, .container-fluid > .navbar-header, .container > .navbar-collapse, .container > .navbar-header { + margin-right: -15px; + margin-left: -15px +} + +@media (min-width: 768px) { + .container-fluid > .navbar-collapse, .container-fluid > .navbar-header, .container > .navbar-collapse, .container > .navbar-header { + margin-right: 0; + margin-left: 0 + } +} + +.navbar-static-top { + z-index: 1000; + border-width: 0 0 1px +} + +@media (min-width: 768px) { + .navbar-static-top { + border-radius: 0 + } +} + +.navbar-fixed-bottom, .navbar-fixed-top { + position: fixed; + right: 0; + left: 0; + z-index: 1030 +} + +@media (min-width: 768px) { + .navbar-fixed-bottom, .navbar-fixed-top { + border-radius: 0 + } +} + +.navbar-fixed-top { + top: 0; + border-width: 0 0 1px +} + +.navbar-fixed-bottom { + bottom: 0; + margin-bottom: 0; + border-width: 1px 0 0 +} + +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px +} + +.navbar-brand:focus, .navbar-brand:hover { + text-decoration: none +} + +.navbar-brand > img { + display: block +} + +@media (min-width: 768px) { + .navbar > .container .navbar-brand, .navbar > .container-fluid .navbar-brand { + margin-left: -15px + } +} + +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px +} + +.navbar-toggle:focus { + outline: 0 +} + +.navbar-toggle .icon-bar { + display: block; + width: 22px; + height: 2px; + border-radius: 1px +} + +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px +} + +@media (min-width: 768px) { + .navbar-toggle { + display: none + } +} + +.navbar-nav { + margin: 7.5px -15px +} + +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px +} + +@media (max-width: 767px) { + .navbar-nav .open .dropdown-menu { + position: static; + float: none; + width: auto; + margin-top: 0; + background-color: transparent; + border: 0; + -webkit-box-shadow: none; + box-shadow: none + } + + .navbar-nav .open .dropdown-menu .dropdown-header, .navbar-nav .open .dropdown-menu > li > a { + padding: 5px 15px 5px 25px + } + + .navbar-nav .open .dropdown-menu > li > a { + line-height: 20px + } + + .navbar-nav .open .dropdown-menu > li > a:focus, .navbar-nav .open .dropdown-menu > li > a:hover { + background-image: none + } +} + +@media (min-width: 768px) { + .navbar-nav { + float: left; + margin: 0 + } + + .navbar-nav > li { + float: left + } + + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px + } +} + +.navbar-form { + padding: 10px 15px; + margin-top: 8px; + margin-right: -15px; + margin-bottom: 8px; + margin-left: -15px; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1) +} + +@media (min-width: 768px) { + .navbar-form .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle + } + + .navbar-form .form-control { + display: inline-block; + width: auto; + vertical-align: middle + } + + .navbar-form .form-control-static { + display: inline-block + } + + .navbar-form .input-group { + display: inline-table; + vertical-align: middle + } + + .navbar-form .input-group .form-control, .navbar-form .input-group .input-group-addon, .navbar-form .input-group .input-group-btn { + width: auto + } + + .navbar-form .input-group > .form-control { + width: 100% + } + + .navbar-form .control-label { + margin-bottom: 0; + vertical-align: middle + } + + .navbar-form .checkbox, .navbar-form .radio { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle + } + + .navbar-form .checkbox label, .navbar-form .radio label { + padding-left: 0 + } + + .navbar-form .checkbox input[type=checkbox], .navbar-form .radio input[type=radio] { + position: relative; + margin-left: 0 + } + + .navbar-form .has-feedback .form-control-feedback { + top: 0 + } +} + +@media (max-width: 767px) { + .navbar-form .form-group { + margin-bottom: 5px + } + + .navbar-form .form-group:last-child { + margin-bottom: 0 + } +} + +@media (min-width: 768px) { + .navbar-form { + width: auto; + padding-top: 0; + padding-bottom: 0; + margin-right: 0; + margin-left: 0; + border: 0; + -webkit-box-shadow: none; + box-shadow: none + } +} + +.navbar-nav > li > .dropdown-menu { + margin-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0 +} + +.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { + margin-bottom: 0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0 +} + +.navbar-btn { + margin-top: 8px; + margin-bottom: 8px +} + +.navbar-btn.btn-sm { + margin-top: 10px; + margin-bottom: 10px +} + +.navbar-btn.btn-xs { + margin-top: 14px; + margin-bottom: 14px +} + +.navbar-text { + margin-top: 15px; + margin-bottom: 15px +} + +@media (min-width: 768px) { + .navbar-text { + float: left; + margin-right: 15px; + margin-left: 15px + } +} + +@media (min-width: 768px) { + .navbar-left { + float: left !important + } + + .navbar-right { + float: right !important; + margin-right: -15px + } + + .navbar-right ~ .navbar-right { + margin-right: 0 + } +} + +.navbar-default { + background-color: #f8f8f8; + border-color: #e7e7e7 +} + +.navbar-default .navbar-brand { + color: #777 +} + +.navbar-default .navbar-brand:focus, .navbar-default .navbar-brand:hover { + color: #5e5e5e; + background-color: transparent +} + +.navbar-default .navbar-text { + color: #777 +} + +.navbar-default .navbar-nav > li > a { + color: #777 +} + +.navbar-default .navbar-nav > li > a:focus, .navbar-default .navbar-nav > li > a:hover { + color: #333; + background-color: transparent +} + +.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:focus, .navbar-default .navbar-nav > .active > a:hover { + color: #555; + background-color: #e7e7e7 +} + +.navbar-default .navbar-nav > .disabled > a, .navbar-default .navbar-nav > .disabled > a:focus, .navbar-default .navbar-nav > .disabled > a:hover { + color: #ccc; + background-color: transparent +} + +.navbar-default .navbar-toggle { + border-color: #ddd +} + +.navbar-default .navbar-toggle:focus, .navbar-default .navbar-toggle:hover { + background-color: #ddd +} + +.navbar-default .navbar-toggle .icon-bar { + background-color: #888 +} + +.navbar-default .navbar-collapse, .navbar-default .navbar-form { + border-color: #e7e7e7 +} + +.navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover { + color: #555; + background-color: #e7e7e7 +} + +@media (max-width: 767px) { + .navbar-default .navbar-nav .open .dropdown-menu > li > a { + color: #777 + } + + .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus, .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover { + color: #333; + background-color: transparent + } + + .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover { + color: #555; + background-color: #e7e7e7 + } + + .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus, .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover { + color: #ccc; + background-color: transparent + } +} + +.navbar-default .navbar-link { + color: #777 +} + +.navbar-default .navbar-link:hover { + color: #333 +} + +.navbar-default .btn-link { + color: #777 +} + +.navbar-default .btn-link:focus, .navbar-default .btn-link:hover { + color: #333 +} + +.navbar-default .btn-link[disabled]:focus, .navbar-default .btn-link[disabled]:hover, fieldset[disabled] .navbar-default .btn-link:focus, fieldset[disabled] .navbar-default .btn-link:hover { + color: #ccc +} + +.navbar-inverse { + background-color: #222; + border-color: #080808 +} + +.navbar-inverse .navbar-brand { + color: #9d9d9d +} + +.navbar-inverse .navbar-brand:focus, .navbar-inverse .navbar-brand:hover { + color: #fff; + background-color: transparent +} + +.navbar-inverse .navbar-text { + color: #9d9d9d +} + +.navbar-inverse .navbar-nav > li > a { + color: #9d9d9d +} + +.navbar-inverse .navbar-nav > li > a:focus, .navbar-inverse .navbar-nav > li > a:hover { + color: #fff; + background-color: transparent +} + +.navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:focus, .navbar-inverse .navbar-nav > .active > a:hover { + color: #fff; + background-color: #080808 +} + +.navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:focus, .navbar-inverse .navbar-nav > .disabled > a:hover { + color: #444; + background-color: transparent +} + +.navbar-inverse .navbar-toggle { + border-color: #333 +} + +.navbar-inverse .navbar-toggle:focus, .navbar-inverse .navbar-toggle:hover { + background-color: #333 +} + +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff +} + +.navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form { + border-color: #101010 +} + +.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:focus, .navbar-inverse .navbar-nav > .open > a:hover { + color: #fff; + background-color: #080808 +} + +@media (max-width: 767px) { + .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { + border-color: #080808 + } + + .navbar-inverse .navbar-nav .open .dropdown-menu .divider { + background-color: #080808 + } + + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { + color: #9d9d9d + } + + .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus, .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover { + color: #fff; + background-color: transparent + } + + .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus, .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover { + color: #fff; + background-color: #080808 + } + + .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus, .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover { + color: #444; + background-color: transparent + } +} + +.navbar-inverse .navbar-link { + color: #9d9d9d +} + +.navbar-inverse .navbar-link:hover { + color: #fff +} + +.navbar-inverse .btn-link { + color: #9d9d9d +} + +.navbar-inverse .btn-link:focus, .navbar-inverse .btn-link:hover { + color: #fff +} + +.navbar-inverse .btn-link[disabled]:focus, .navbar-inverse .btn-link[disabled]:hover, fieldset[disabled] .navbar-inverse .btn-link:focus, fieldset[disabled] .navbar-inverse .btn-link:hover { + color: #444 +} + +.breadcrumb { + padding: 8px 15px; + margin-bottom: 20px; + list-style: none; + background-color: #f5f5f5; + border-radius: 4px +} + +.breadcrumb > li { + display: inline-block +} + +.breadcrumb > li + li:before { + padding: 0 5px; + color: #ccc; + content: "/\00a0" +} + +.breadcrumb > .active { + color: #777 +} + +.pagination { + display: inline-block; + padding-left: 0; + margin: 20px 0; + border-radius: 4px +} + +.pagination > li { + display: inline +} + +.pagination > li > a, .pagination > li > span { + position: relative; + float: left; + padding: 6px 12px; + margin-left: -1px; + line-height: 1.42857143; + color: #337ab7; + text-decoration: none; + background-color: #fff; + border: 1px solid #ddd +} + +.pagination > li:first-child > a, .pagination > li:first-child > span { + margin-left: 0; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px +} + +.pagination > li:last-child > a, .pagination > li:last-child > span { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px +} + +.pagination > li > a:focus, .pagination > li > a:hover, .pagination > li > span:focus, .pagination > li > span:hover { + z-index: 2; + color: #23527c; + background-color: #eee; + border-color: #ddd +} + +.pagination > .active > a, .pagination > .active > a:focus, .pagination > .active > a:hover, .pagination > .active > span, .pagination > .active > span:focus, .pagination > .active > span:hover { + z-index: 3; + color: #fff; + cursor: default; + background-color: #337ab7; + border-color: #337ab7 +} + +.pagination > .disabled > a, .pagination > .disabled > a:focus, .pagination > .disabled > a:hover, .pagination > .disabled > span, .pagination > .disabled > span:focus, .pagination > .disabled > span:hover { + color: #777; + cursor: not-allowed; + background-color: #fff; + border-color: #ddd +} + +.pagination-lg > li > a, .pagination-lg > li > span { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333 +} + +.pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span { + border-top-left-radius: 6px; + border-bottom-left-radius: 6px +} + +.pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px +} + +.pagination-sm > li > a, .pagination-sm > li > span { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5 +} + +.pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px +} + +.pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px +} + +.pager { + padding-left: 0; + margin: 20px 0; + text-align: center; + list-style: none +} + +.pager li { + display: inline +} + +.pager li > a, .pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 15px +} + +.pager li > a:focus, .pager li > a:hover { + text-decoration: none; + background-color: #eee +} + +.pager .next > a, .pager .next > span { + float: right +} + +.pager .previous > a, .pager .previous > span { + float: left +} + +.pager .disabled > a, .pager .disabled > a:focus, .pager .disabled > a:hover, .pager .disabled > span { + color: #777; + cursor: not-allowed; + background-color: #fff +} + +.label { + display: inline; + padding: .2em .6em .3em; + font-size: 75%; + font-weight: 700; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: .25em +} + +a.label:focus, a.label:hover { + color: #fff; + text-decoration: none; + cursor: pointer +} + +.label:empty { + display: none +} + +.btn .label { + position: relative; + top: -1px +} + +.label-default { + background-color: #777 +} + +.label-default[href]:focus, .label-default[href]:hover { + background-color: #5e5e5e +} + +.label-primary { + background-color: #337ab7 +} + +.label-primary[href]:focus, .label-primary[href]:hover { + background-color: #286090 +} + +.label-success { + background-color: #5cb85c +} + +.label-success[href]:focus, .label-success[href]:hover { + background-color: #449d44 +} + +.label-info { + background-color: #5bc0de +} + +.label-info[href]:focus, .label-info[href]:hover { + background-color: #31b0d5 +} + +.label-warning { + background-color: #f0ad4e +} + +.label-warning[href]:focus, .label-warning[href]:hover { + background-color: #ec971f +} + +.label-danger { + background-color: #d9534f +} + +.label-danger[href]:focus, .label-danger[href]:hover { + background-color: #c9302c +} + +.badge { + display: inline-block; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: 700; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-color: #777; + border-radius: 10px +} + +.badge:empty { + display: none +} + +.btn .badge { + position: relative; + top: -1px +} + +.btn-group-xs > .btn .badge, .btn-xs .badge { + top: 0; + padding: 1px 5px +} + +a.badge:focus, a.badge:hover { + color: #fff; + text-decoration: none; + cursor: pointer +} + +.list-group-item.active > .badge, .nav-pills > .active > a > .badge { + color: #337ab7; + background-color: #fff +} + +.list-group-item > .badge { + float: right +} + +.list-group-item > .badge + .badge { + margin-right: 5px +} + +.nav-pills > li > a > .badge { + margin-left: 3px +} + +.jumbotron { + padding-top: 30px; + padding-bottom: 30px; + margin-bottom: 30px; + color: inherit; + background-color: #eee +} + +.jumbotron .h1, .jumbotron h1 { + color: inherit +} + +.jumbotron p { + margin-bottom: 15px; + font-size: 21px; + font-weight: 200 +} + +.jumbotron > hr { + border-top-color: #d5d5d5 +} + +.container .jumbotron, .container-fluid .jumbotron { + padding-right: 15px; + padding-left: 15px; + border-radius: 6px +} + +.jumbotron .container { + max-width: 100% +} + +@media screen and (min-width: 768px) { + .jumbotron { + padding-top: 48px; + padding-bottom: 48px + } + + .container .jumbotron, .container-fluid .jumbotron { + padding-right: 60px; + padding-left: 60px + } + + .jumbotron .h1, .jumbotron h1 { + font-size: 63px + } +} + +.thumbnail { + display: block; + padding: 4px; + margin-bottom: 20px; + line-height: 1.42857143; + background-color: #fff; + border: 1px solid #ddd; + border-radius: 4px; + -webkit-transition: border .2s ease-in-out; + -o-transition: border .2s ease-in-out; + transition: border .2s ease-in-out +} + +.thumbnail a > img, .thumbnail > img { + margin-right: auto; + margin-left: auto +} + +a.thumbnail.active, a.thumbnail:focus, a.thumbnail:hover { + border-color: #337ab7 +} + +.thumbnail .caption { + padding: 9px; + color: #333 +} + +.alert { + padding: 15px; + margin-bottom: 20px; + border: 1px solid transparent; + border-radius: 4px +} + +.alert h4 { + margin-top: 0; + color: inherit +} + +.alert .alert-link { + font-weight: 700 +} + +.alert > p, .alert > ul { + margin-bottom: 0 +} + +.alert > p + p { + margin-top: 5px +} + +.alert-dismissable, .alert-dismissible { + padding-right: 35px +} + +.alert-dismissable .close, .alert-dismissible .close { + position: relative; + top: -2px; + right: -21px; + color: inherit +} + +.alert-success { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6 +} + +.alert-success hr { + border-top-color: #c9e2b3 +} + +.alert-success .alert-link { + color: #2b542c +} + +.alert-info { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1 +} + +.alert-info hr { + border-top-color: #a6e1ec +} + +.alert-info .alert-link { + color: #245269 +} + +.alert-warning { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc +} + +.alert-warning hr { + border-top-color: #f7e1b5 +} + +.alert-warning .alert-link { + color: #66512c +} + +.alert-danger { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1 +} + +.alert-danger hr { + border-top-color: #e4b9c0 +} + +.alert-danger .alert-link { + color: #843534 +} + +@-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 + } +} + +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f5f5f5; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1) +} + +.progress-bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + line-height: 20px; + color: #fff; + text-align: center; + background-color: #337ab7; + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); + -webkit-transition: width .6s ease; + -o-transition: width .6s ease; + transition: width .6s ease +} + +.progress-bar-striped, .progress-striped .progress-bar { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + background-size: 40px 40px +} + +.progress-bar.active, .progress.active .progress-bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite +} + +.progress-bar-success { + background-color: #5cb85c +} + +.progress-striped .progress-bar-success { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent) +} + +.progress-bar-info { + background-color: #5bc0de +} + +.progress-striped .progress-bar-info { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent) +} + +.progress-bar-warning { + background-color: #f0ad4e +} + +.progress-striped .progress-bar-warning { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent) +} + +.progress-bar-danger { + background-color: #d9534f +} + +.progress-striped .progress-bar-danger { + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent) +} + +.media { + margin-top: 15px +} + +.media:first-child { + margin-top: 0 +} + +.media, .media-body { + overflow: hidden; + zoom: 1 +} + +.media-body { + width: 10000px +} + +.media-object { + display: block +} + +.media-object.img-thumbnail { + max-width: none +} + +.media-right, .media > .pull-right { + padding-left: 10px +} + +.media-left, .media > .pull-left { + padding-right: 10px +} + +.media-body, .media-left, .media-right { + display: table-cell; + vertical-align: top +} + +.media-middle { + vertical-align: middle +} + +.media-bottom { + vertical-align: bottom +} + +.media-heading { + margin-top: 0; + margin-bottom: 5px +} + +.media-list { + padding-left: 0; + list-style: none +} + +.list-group { + padding-left: 0; + margin-bottom: 20px +} + +.list-group-item { + position: relative; + display: block; + padding: 10px 15px; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid #ddd +} + +.list-group-item:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px +} + +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 4px; + border-bottom-left-radius: 4px +} + +a.list-group-item, button.list-group-item { + color: #555 +} + +a.list-group-item .list-group-item-heading, button.list-group-item .list-group-item-heading { + color: #333 +} + +a.list-group-item:focus, a.list-group-item:hover, button.list-group-item:focus, button.list-group-item:hover { + color: #555; + text-decoration: none; + background-color: #f5f5f5 +} + +button.list-group-item { + width: 100%; + text-align: left +} + +.list-group-item.disabled, .list-group-item.disabled:focus, .list-group-item.disabled:hover { + color: #777; + cursor: not-allowed; + background-color: #eee +} + +.list-group-item.disabled .list-group-item-heading, .list-group-item.disabled:focus .list-group-item-heading, .list-group-item.disabled:hover .list-group-item-heading { + color: inherit +} + +.list-group-item.disabled .list-group-item-text, .list-group-item.disabled:focus .list-group-item-text, .list-group-item.disabled:hover .list-group-item-text { + color: #777 +} + +.list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover { + z-index: 2; + color: #fff; + background-color: #337ab7; + border-color: #337ab7 +} + +.list-group-item.active .list-group-item-heading, .list-group-item.active .list-group-item-heading > .small, .list-group-item.active .list-group-item-heading > small, .list-group-item.active:focus .list-group-item-heading, .list-group-item.active:focus .list-group-item-heading > .small, .list-group-item.active:focus .list-group-item-heading > small, .list-group-item.active:hover .list-group-item-heading, .list-group-item.active:hover .list-group-item-heading > .small, .list-group-item.active:hover .list-group-item-heading > small { + color: inherit +} + +.list-group-item.active .list-group-item-text, .list-group-item.active:focus .list-group-item-text, .list-group-item.active:hover .list-group-item-text { + color: #c7ddef +} + +.list-group-item-success { + color: #3c763d; + background-color: #dff0d8 +} + +a.list-group-item-success, button.list-group-item-success { + color: #3c763d +} + +a.list-group-item-success .list-group-item-heading, button.list-group-item-success .list-group-item-heading { + color: inherit +} + +a.list-group-item-success:focus, a.list-group-item-success:hover, button.list-group-item-success:focus, button.list-group-item-success:hover { + color: #3c763d; + background-color: #d0e9c6 +} + +a.list-group-item-success.active, a.list-group-item-success.active:focus, a.list-group-item-success.active:hover, button.list-group-item-success.active, button.list-group-item-success.active:focus, button.list-group-item-success.active:hover { + color: #fff; + background-color: #3c763d; + border-color: #3c763d +} + +.list-group-item-info { + color: #31708f; + background-color: #d9edf7 +} + +a.list-group-item-info, button.list-group-item-info { + color: #31708f +} + +a.list-group-item-info .list-group-item-heading, button.list-group-item-info .list-group-item-heading { + color: inherit +} + +a.list-group-item-info:focus, a.list-group-item-info:hover, button.list-group-item-info:focus, button.list-group-item-info:hover { + color: #31708f; + background-color: #c4e3f3 +} + +a.list-group-item-info.active, a.list-group-item-info.active:focus, a.list-group-item-info.active:hover, button.list-group-item-info.active, button.list-group-item-info.active:focus, button.list-group-item-info.active:hover { + color: #fff; + background-color: #31708f; + border-color: #31708f +} + +.list-group-item-warning { + color: #8a6d3b; + background-color: #fcf8e3 +} + +a.list-group-item-warning, button.list-group-item-warning { + color: #8a6d3b +} + +a.list-group-item-warning .list-group-item-heading, button.list-group-item-warning .list-group-item-heading { + color: inherit +} + +a.list-group-item-warning:focus, a.list-group-item-warning:hover, button.list-group-item-warning:focus, button.list-group-item-warning:hover { + color: #8a6d3b; + background-color: #faf2cc +} + +a.list-group-item-warning.active, a.list-group-item-warning.active:focus, a.list-group-item-warning.active:hover, button.list-group-item-warning.active, button.list-group-item-warning.active:focus, button.list-group-item-warning.active:hover { + color: #fff; + background-color: #8a6d3b; + border-color: #8a6d3b +} + +.list-group-item-danger { + color: #a94442; + background-color: #f2dede +} + +a.list-group-item-danger, button.list-group-item-danger { + color: #a94442 +} + +a.list-group-item-danger .list-group-item-heading, button.list-group-item-danger .list-group-item-heading { + color: inherit +} + +a.list-group-item-danger:focus, a.list-group-item-danger:hover, button.list-group-item-danger:focus, button.list-group-item-danger:hover { + color: #a94442; + background-color: #ebcccc +} + +a.list-group-item-danger.active, a.list-group-item-danger.active:focus, a.list-group-item-danger.active:hover, button.list-group-item-danger.active, button.list-group-item-danger.active:focus, button.list-group-item-danger.active:hover { + color: #fff; + background-color: #a94442; + border-color: #a94442 +} + +.list-group-item-heading { + margin-top: 0; + margin-bottom: 5px +} + +.list-group-item-text { + margin-bottom: 0; + line-height: 1.3 +} + +.panel { + margin-bottom: 20px; + background-color: #fff; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: 0 1px 1px rgba(0, 0, 0, .05) +} + +.panel-body { + padding: 15px +} + +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-left-radius: 3px; + border-top-right-radius: 3px +} + +.panel-heading > .dropdown .dropdown-toggle { + color: inherit +} + +.panel-title { + margin-top: 0; + margin-bottom: 0; + font-size: 16px; + color: inherit +} + +.panel-title > .small, .panel-title > .small > a, .panel-title > a, .panel-title > small, .panel-title > small > a { + color: inherit +} + +.panel-footer { + padding: 10px 15px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +.panel > .list-group, .panel > .panel-collapse > .list-group { + margin-bottom: 0 +} + +.panel > .list-group .list-group-item, .panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0 +} + +.panel > .list-group:first-child .list-group-item:first-child, .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-left-radius: 3px; + border-top-right-radius: 3px +} + +.panel > .list-group:last-child .list-group-item:last-child, .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { + border-top-left-radius: 0; + border-top-right-radius: 0 +} + +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0 +} + +.list-group + .panel-footer { + border-top-width: 0 +} + +.panel > .panel-collapse > .table, .panel > .table, .panel > .table-responsive > .table { + margin-bottom: 0 +} + +.panel > .panel-collapse > .table caption, .panel > .table caption, .panel > .table-responsive > .table caption { + padding-right: 15px; + padding-left: 15px +} + +.panel > .table-responsive:first-child > .table:first-child, .panel > .table:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px +} + +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child, .panel > .table:first-child > thead:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px +} + +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, .panel > .table:first-child > thead:first-child > tr:first-child td:first-child, .panel > .table:first-child > thead:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px +} + +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, .panel > .table:first-child > thead:first-child > tr:first-child td:last-child, .panel > .table:first-child > thead:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px +} + +.panel > .table-responsive:last-child > .table:last-child, .panel > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px +} + +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px +} + +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px +} + +.panel > .panel-body + .table, .panel > .panel-body + .table-responsive, .panel > .table + .panel-body, .panel > .table-responsive + .panel-body { + border-top: 1px solid #ddd +} + +.panel > .table > tbody:first-child > tr:first-child td, .panel > .table > tbody:first-child > tr:first-child th { + border-top: 0 +} + +.panel > .table-bordered, .panel > .table-responsive > .table-bordered { + border: 0 +} + +.panel > .table-bordered > tbody > tr > td:first-child, .panel > .table-bordered > tbody > tr > th:first-child, .panel > .table-bordered > tfoot > tr > td:first-child, .panel > .table-bordered > tfoot > tr > th:first-child, .panel > .table-bordered > thead > tr > td:first-child, .panel > .table-bordered > thead > tr > th:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, .panel > .table-responsive > .table-bordered > thead > tr > td:first-child, .panel > .table-responsive > .table-bordered > thead > tr > th:first-child { + border-left: 0 +} + +.panel > .table-bordered > tbody > tr > td:last-child, .panel > .table-bordered > tbody > tr > th:last-child, .panel > .table-bordered > tfoot > tr > td:last-child, .panel > .table-bordered > tfoot > tr > th:last-child, .panel > .table-bordered > thead > tr > td:last-child, .panel > .table-bordered > thead > tr > th:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child, .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, .panel > .table-responsive > .table-bordered > thead > tr > td:last-child, .panel > .table-responsive > .table-bordered > thead > tr > th:last-child { + border-right: 0 +} + +.panel > .table-bordered > tbody > tr:first-child > td, .panel > .table-bordered > tbody > tr:first-child > th, .panel > .table-bordered > thead > tr:first-child > td, .panel > .table-bordered > thead > tr:first-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th, .panel > .table-responsive > .table-bordered > thead > tr:first-child > td, .panel > .table-responsive > .table-bordered > thead > tr:first-child > th { + border-bottom: 0 +} + +.panel > .table-bordered > tbody > tr:last-child > td, .panel > .table-bordered > tbody > tr:last-child > th, .panel > .table-bordered > tfoot > tr:last-child > td, .panel > .table-bordered > tfoot > tr:last-child > th, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0 +} + +.panel > .table-responsive { + margin-bottom: 0; + border: 0 +} + +.panel-group { + margin-bottom: 20px +} + +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px +} + +.panel-group .panel + .panel { + margin-top: 5px +} + +.panel-group .panel-heading { + border-bottom: 0 +} + +.panel-group .panel-heading + .panel-collapse > .list-group, .panel-group .panel-heading + .panel-collapse > .panel-body { + border-top: 1px solid #ddd +} + +.panel-group .panel-footer { + border-top: 0 +} + +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid #ddd +} + +.panel-default { + border-color: #ddd +} + +.panel-default > .panel-heading { + color: #333; + background-color: #f5f5f5; + border-color: #ddd +} + +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ddd +} + +.panel-default > .panel-heading .badge { + color: #f5f5f5; + background-color: #333 +} + +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ddd +} + +.panel-primary { + border-color: #337ab7 +} + +.panel-primary > .panel-heading { + color: #fff; + background-color: #337ab7; + border-color: #337ab7 +} + +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #337ab7 +} + +.panel-primary > .panel-heading .badge { + color: #337ab7; + background-color: #fff +} + +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #337ab7 +} + +.panel-success { + border-color: #d6e9c6 +} + +.panel-success > .panel-heading { + color: #3c763d; + background-color: #dff0d8; + border-color: #d6e9c6 +} + +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #d6e9c6 +} + +.panel-success > .panel-heading .badge { + color: #dff0d8; + background-color: #3c763d +} + +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #d6e9c6 +} + +.panel-info { + border-color: #bce8f1 +} + +.panel-info > .panel-heading { + color: #31708f; + background-color: #d9edf7; + border-color: #bce8f1 +} + +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #bce8f1 +} + +.panel-info > .panel-heading .badge { + color: #d9edf7; + background-color: #31708f +} + +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #bce8f1 +} + +.panel-warning { + border-color: #faebcc +} + +.panel-warning > .panel-heading { + color: #8a6d3b; + background-color: #fcf8e3; + border-color: #faebcc +} + +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #faebcc +} + +.panel-warning > .panel-heading .badge { + color: #fcf8e3; + background-color: #8a6d3b +} + +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #faebcc +} + +.panel-danger { + border-color: #ebccd1 +} + +.panel-danger > .panel-heading { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1 +} + +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: #ebccd1 +} + +.panel-danger > .panel-heading .badge { + color: #f2dede; + background-color: #a94442 +} + +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: #ebccd1 +} + +.embed-responsive { + position: relative; + display: block; + height: 0; + padding: 0; + overflow: hidden +} + +.embed-responsive .embed-responsive-item, .embed-responsive embed, .embed-responsive iframe, .embed-responsive object, .embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0 +} + +.embed-responsive-16by9 { + padding-bottom: 56.25% +} + +.embed-responsive-4by3 { + padding-bottom: 75% +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05) +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, .15) +} + +.well-lg { + padding: 24px; + border-radius: 6px +} + +.well-sm { + padding: 9px; + border-radius: 3px +} + +.close { + float: right; + font-size: 21px; + font-weight: 700; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + filter: alpha(opacity=20); + opacity: .2 +} + +.close:focus, .close:hover { + color: #000; + text-decoration: none; + cursor: pointer; + filter: alpha(opacity=50); + opacity: .5 +} + +button.close { + -webkit-appearance: none; + padding: 0; + cursor: pointer; + background: 0 0; + border: 0 +} + +.modal-open { + overflow: hidden +} + +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: hidden; + -webkit-overflow-scrolling: touch; + outline: 0 +} + +.modal.fade .modal-dialog { + -webkit-transition: -webkit-transform .3s ease-out; + -o-transition: -o-transform .3s ease-out; + transition: transform .3s ease-out; + -webkit-transform: translate(0, -25%); + -ms-transform: translate(0, -25%); + -o-transform: translate(0, -25%); + transform: translate(0, -25%) +} + +.modal.in .modal-dialog { + -webkit-transform: translate(0, 0); + -ms-transform: translate(0, 0); + -o-transform: translate(0, 0); + transform: translate(0, 0) +} + +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto +} + +.modal-dialog { + position: relative; + width: auto; + margin: 10px +} + +.modal-content { + position: relative; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + outline: 0; + -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + box-shadow: 0 3px 9px rgba(0, 0, 0, .5) +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000 +} + +.modal-backdrop.fade { + filter: alpha(opacity=0); + opacity: 0 +} + +.modal-backdrop.in { + filter: alpha(opacity=50); + opacity: .5 +} + +.modal-header { + padding: 15px; + border-bottom: 1px solid #e5e5e5 +} + +.modal-header .close { + margin-top: -2px +} + +.modal-title { + margin: 0; + line-height: 1.42857143 +} + +.modal-body { + position: relative; + padding: 15px +} + +.modal-footer { + padding: 15px; + text-align: right; + border-top: 1px solid #e5e5e5 +} + +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px +} + +.modal-footer .btn-group .btn + .btn { + margin-left: -1px +} + +.modal-footer .btn-block + .btn-block { + margin-left: 0 +} + +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll +} + +@media (min-width: 768px) { + .modal-dialog { + width: 600px; + margin: 30px auto + } + + .modal-content { + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + box-shadow: 0 5px 15px rgba(0, 0, 0, .5) + } + + .modal-sm { + width: 300px + } +} + +@media (min-width: 992px) { + .modal-lg { + width: 900px + } +} + +.tooltip { + position: absolute; + z-index: 1070; + display: block; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 12px; + font-style: normal; + font-weight: 400; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + filter: alpha(opacity=0); + opacity: 0; + line-break: auto +} + +.tooltip.in { + filter: alpha(opacity=90); + opacity: .9 +} + +.tooltip.top { + padding: 5px 0; + margin-top: -3px +} + +.tooltip.right { + padding: 0 5px; + margin-left: 3px +} + +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px +} + +.tooltip.left { + padding: 0 5px; + margin-left: -3px +} + +.tooltip-inner { + max-width: 200px; + padding: 3px 8px; + color: #fff; + text-align: center; + background-color: #000; + border-radius: 4px +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000 +} + +.tooltip.top-left .tooltip-arrow { + right: 5px; + bottom: 0; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000 +} + +.tooltip.top-right .tooltip-arrow { + bottom: 0; + left: 5px; + margin-bottom: -5px; + border-width: 5px 5px 0; + border-top-color: #000 +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000 +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000 +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000 +} + +.tooltip.bottom-left .tooltip-arrow { + top: 0; + right: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000 +} + +.tooltip.bottom-right .tooltip-arrow { + top: 0; + left: 5px; + margin-top: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000 +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: none; + max-width: 276px; + padding: 1px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 1.42857143; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + word-wrap: normal; + white-space: normal; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + box-shadow: 0 5px 10px rgba(0, 0, 0, .2); + line-break: auto +} + +.popover.top { + margin-top: -10px +} + +.popover.right { + margin-left: 10px +} + +.popover.bottom { + margin-top: 10px +} + +.popover.left { + margin-left: -10px +} + +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-radius: 5px 5px 0 0 +} + +.popover-content { + padding: 9px 14px +} + +.popover > .arrow, .popover > .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid +} + +.popover > .arrow { + border-width: 11px +} + +.popover > .arrow:after { + content: ""; + border-width: 10px +} + +.popover.top > .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, .25); + border-bottom-width: 0 +} + +.popover.top > .arrow:after { + bottom: 1px; + margin-left: -10px; + content: " "; + border-top-color: #fff; + border-bottom-width: 0 +} + +.popover.right > .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, .25); + border-left-width: 0 +} + +.popover.right > .arrow:after { + bottom: -10px; + left: 1px; + content: " "; + border-right-color: #fff; + border-left-width: 0 +} + +.popover.bottom > .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, .25) +} + +.popover.bottom > .arrow:after { + top: 1px; + margin-left: -10px; + content: " "; + border-top-width: 0; + border-bottom-color: #fff +} + +.popover.left > .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, .25) +} + +.popover.left > .arrow:after { + right: 1px; + bottom: -10px; + content: " "; + border-right-width: 0; + border-left-color: #fff +} + +.carousel { + position: relative +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden +} + +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: .6s ease-in-out left; + -o-transition: .6s ease-in-out left; + transition: .6s ease-in-out left +} + +.carousel-inner > .item > a > img, .carousel-inner > .item > img { + line-height: 1 +} + +@media all and (transform-3d),(-webkit-transform-3d) { + .carousel-inner > .item { + -webkit-transition: -webkit-transform .6s ease-in-out; + -o-transition: -o-transform .6s ease-in-out; + transition: transform .6s ease-in-out; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000px; + perspective: 1000px + } + + .carousel-inner > .item.active.right, .carousel-inner > .item.next { + left: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0) + } + + .carousel-inner > .item.active.left, .carousel-inner > .item.prev { + left: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0) + } + + .carousel-inner > .item.active, .carousel-inner > .item.next.left, .carousel-inner > .item.prev.right { + left: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +.carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { + display: block +} + +.carousel-inner > .active { + left: 0 +} + +.carousel-inner > .next, .carousel-inner > .prev { + position: absolute; + top: 0; + width: 100% +} + +.carousel-inner > .next { + left: 100% +} + +.carousel-inner > .prev { + left: -100% +} + +.carousel-inner > .next.left, .carousel-inner > .prev.right { + left: 0 +} + +.carousel-inner > .active.left { + left: -100% +} + +.carousel-inner > .active.right { + left: 100% +} + +.carousel-control { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 15%; + font-size: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6); + background-color: rgba(0, 0, 0, 0); + filter: alpha(opacity=50); + opacity: .5 +} + +.carousel-control.left { + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, .0001) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, .0001) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, .0001) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); + background-repeat: repeat-x +} + +.carousel-control.right { + right: 0; + left: auto; + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0, rgba(0, 0, 0, .5) 100%); + background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0, rgba(0, 0, 0, .5) 100%); + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); + background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0, rgba(0, 0, 0, .5) 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); + background-repeat: repeat-x +} + +.carousel-control:focus, .carousel-control:hover { + color: #fff; + text-decoration: none; + filter: alpha(opacity=90); + outline: 0; + opacity: .9 +} + +.carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right, .carousel-control .icon-next, .carousel-control .icon-prev { + position: absolute; + top: 50%; + z-index: 5; + display: inline-block; + margin-top: -10px +} + +.carousel-control .glyphicon-chevron-left, .carousel-control .icon-prev { + left: 50%; + margin-left: -10px +} + +.carousel-control .glyphicon-chevron-right, .carousel-control .icon-next { + right: 50%; + margin-right: -10px +} + +.carousel-control .icon-next, .carousel-control .icon-prev { + width: 20px; + height: 20px; + font-family: serif; + line-height: 1 +} + +.carousel-control .icon-prev:before { + content: '\2039' +} + +.carousel-control .icon-next:before { + content: '\203a' +} + +.carousel-indicators { + position: absolute; + bottom: 10px; + left: 50%; + z-index: 15; + width: 60%; + padding-left: 0; + margin-left: -30%; + text-align: center; + list-style: none +} + +.carousel-indicators li { + display: inline-block; + width: 10px; + height: 10px; + margin: 1px; + text-indent: -999px; + cursor: pointer; + background-color: #000 \9; + background-color: rgba(0, 0, 0, 0); + border: 1px solid #fff; + border-radius: 10px +} + +.carousel-indicators .active { + width: 12px; + height: 12px; + margin: 0; + background-color: #fff +} + +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; + text-shadow: 0 1px 2px rgba(0, 0, 0, .6) +} + +.carousel-caption .btn { + text-shadow: none +} + +@media screen and (min-width: 768px) { + .carousel-control .glyphicon-chevron-left, .carousel-control .glyphicon-chevron-right, .carousel-control .icon-next, .carousel-control .icon-prev { + width: 30px; + height: 30px; + margin-top: -10px; + font-size: 30px + } + + .carousel-control .glyphicon-chevron-left, .carousel-control .icon-prev { + margin-left: -10px + } + + .carousel-control .glyphicon-chevron-right, .carousel-control .icon-next { + margin-right: -10px + } + + .carousel-caption { + right: 20%; + left: 20%; + padding-bottom: 30px + } + + .carousel-indicators { + bottom: 20px + } +} + +.btn-group-vertical > .btn-group:after, .btn-group-vertical > .btn-group:before, .btn-toolbar:after, .btn-toolbar:before, .clearfix:after, .clearfix:before, .container-fluid:after, .container-fluid:before, .container:after, .container:before, .dl-horizontal dd:after, .dl-horizontal dd:before, .form-horizontal .form-group:after, .form-horizontal .form-group:before, .modal-footer:after, .modal-footer:before, .modal-header:after, .modal-header:before, .nav:after, .nav:before, .navbar-collapse:after, .navbar-collapse:before, .navbar-header:after, .navbar-header:before, .navbar:after, .navbar:before, .pager:after, .pager:before, .panel-body:after, .panel-body:before, .row:after, .row:before { + display: table; + content: " " +} + +.btn-group-vertical > .btn-group:after, .btn-toolbar:after, .clearfix:after, .container-fluid:after, .container:after, .dl-horizontal dd:after, .form-horizontal .form-group:after, .modal-footer:after, .modal-header:after, .nav:after, .navbar-collapse:after, .navbar-header:after, .navbar:after, .pager:after, .panel-body:after, .row:after { + clear: both +} + +.center-block { + display: block; + margin-right: auto; + margin-left: auto +} + +.pull-right { + float: right !important +} + +.pull-left { + float: left !important +} + +.hide { + display: none !important +} + +.show { + display: block !important +} + +.invisible { + visibility: hidden +} + +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0 +} + +.hidden { + display: none !important +} + +.affix { + position: fixed +} + +@-ms-viewport { + width: device-width +} + +.visible-lg, .visible-md, .visible-sm, .visible-xs { + display: none !important +} + +.visible-lg-block, .visible-lg-inline, .visible-lg-inline-block, .visible-md-block, .visible-md-inline, .visible-md-inline-block, .visible-sm-block, .visible-sm-inline, .visible-sm-inline-block, .visible-xs-block, .visible-xs-inline, .visible-xs-inline-block { + display: none !important +} + +@media (max-width: 767px) { + .visible-xs { + display: block !important + } + + table.visible-xs { + display: table !important + } + + tr.visible-xs { + display: table-row !important + } + + td.visible-xs, th.visible-xs { + display: table-cell !important + } +} + +@media (max-width: 767px) { + .visible-xs-block { + display: block !important + } +} + +@media (max-width: 767px) { + .visible-xs-inline { + display: inline !important + } +} + +@media (max-width: 767px) { + .visible-xs-inline-block { + display: inline-block !important + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm { + display: block !important + } + + table.visible-sm { + display: table !important + } + + tr.visible-sm { + display: table-row !important + } + + td.visible-sm, th.visible-sm { + display: table-cell !important + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-block { + display: block !important + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline { + display: inline !important + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .visible-sm-inline-block { + display: inline-block !important + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md { + display: block !important + } + + table.visible-md { + display: table !important + } + + tr.visible-md { + display: table-row !important + } + + td.visible-md, th.visible-md { + display: table-cell !important + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-block { + display: block !important + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline { + display: inline !important + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .visible-md-inline-block { + display: inline-block !important + } +} + +@media (min-width: 1200px) { + .visible-lg { + display: block !important + } + + table.visible-lg { + display: table !important + } + + tr.visible-lg { + display: table-row !important + } + + td.visible-lg, th.visible-lg { + display: table-cell !important + } +} + +@media (min-width: 1200px) { + .visible-lg-block { + display: block !important + } +} + +@media (min-width: 1200px) { + .visible-lg-inline { + display: inline !important + } +} + +@media (min-width: 1200px) { + .visible-lg-inline-block { + display: inline-block !important + } +} + +@media (max-width: 767px) { + .hidden-xs { + display: none !important + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .hidden-sm { + display: none !important + } +} + +@media (min-width: 992px) and (max-width: 1199px) { + .hidden-md { + display: none !important + } +} + +@media (min-width: 1200px) { + .hidden-lg { + display: none !important + } +} + +.visible-print { + display: none !important +} + +@media print { + .visible-print { + display: block !important + } + + table.visible-print { + display: table !important + } + + tr.visible-print { + display: table-row !important + } + + td.visible-print, th.visible-print { + display: table-cell !important + } +} + +.visible-print-block { + display: none !important +} + +@media print { + .visible-print-block { + display: block !important + } +} + +.visible-print-inline { + display: none !important +} + +@media print { + .visible-print-inline { + display: inline !important + } +} + +.visible-print-inline-block { + display: none !important +} + +@media print { + .visible-print-inline-block { + display: inline-block !important + } +} + +@media print { + .hidden-print { + display: none !important + } +} diff --git a/static/files/visualizer/css/main.css b/static/files/visualizer/css/main.css new file mode 100644 index 0000000..4257566 --- /dev/null +++ b/static/files/visualizer/css/main.css @@ -0,0 +1,813 @@ +*, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +.center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.clearfix:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +.clearfix { display: inline-block; } +* html .clearfix { height: 1%; } +.clearfix { display: block; } + +hr{ + background-color: #ddd; + height: 1px; + border: 0; +} + +body { + font-family: AmazonEmber, HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; + font-weight: 300; + font-size: 14px; + margin:0; + padding:0; + color:#444; +} + +.scroll-box { + background: #f4f4f4; + border: 2px solid rgba(0, 0, 0, 0.1); + height: 400px; /* maximum height of the box, feel free to change this! */ + padding: 15px; + overflow-y: scroll; +} + +.main{ + padding:20px; +} + +/* Style for the table tab */ + +.tab { + overflow: hidden; + background-color: #FFFFFF; +} +#tabDiv{ + border-top:0; +} + +/* Style for the buttons that are used to open the tab content */ + +button{ + display: inline-block; + text-align: center; + max-width: 100%; + min-width: 8px; + vertical-align: middle; + outline: 0; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + line-height: 1.43; + font-size: 14px; + -webkit-tap-highlight-color: transparent; + -ms-touch-action: none; + -webkit-font-smoothing: antialiased; + border: 1px solid; + border-radius: 3px; + color: #333; + background-color: #e7e9ec; + border-color: #adb1b8 #a2a6ac #8d9096; +} + +/* Change background color of tab buttons on hover */ +.tab button.tablinks:hover { + background-color: #ddd; +} + +/* style for Cancel buttons */ +.cancel{ + border-color: #e76d0c #e15500 #e15500; + color: #fff; + text-shadow: rgba(0,0,0,.05) 0 1px 0; + background-color: #ec7211; + background-image: linear-gradient(180deg,#f67c1b 0,#e15500); + box-shadow: inset 0 1px 0 hsla(0,0%,100%,.2); +} + +/* style for OK buttons */ +.ok{ + border-color: #be952c #a68226 #9b7924; + background: #eeba37; + color: #333 !important; + background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiP…dpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==); + background-size: 100%; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fee6b0),color-stop(100%, #eeba37)); + background-image: -moz-linear-gradient(#fee6b0 0%,#eeba37 100%); + background-image: -webkit-linear-gradient(#fee6b0 0%,#eeba37 100%); + background-image: linear-gradient(#fee6b0 0%,#eeba37 100%); + margin-left:7px; +} + +/* Create an active/current tablink class +.tab button.active { + display: inline; + background-color: lightgrey; +}*/ + +.tab button.tablinks{ + border: 1px solid #a9a9a9; + border-bottom: 0; + border-radius: 8px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + background: #FFE3C6; + outline: none; + cursor: pointer; + padding: 0 12px 7px 12px + transition: 0.3s; + float:left; +} +.tab button.tablinks.active{ + background: #ffbf70; +} + +/* Style the tab content */ +.tabcontent { + display: none; + border: 1px solid #ccc; + border-top: none; + background-color: lightgrey; + margin-top: -1px; +} + +.sidenav { + background: #ffa735; + background: -moz-radial-gradient(center, ellipse cover, #ffa735 0%, #ea8100 100%); + background: -webkit-radial-gradient(center, ellipse cover, #ffa735 0%,#ea8100 100%); + background: radial-gradient(ellipse at center, #ffa735 0%,#ea8100 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffa735', endColorstr='#ea8100',GradientType=1 ); + height: 100%; + width: 0; + position: fixed; + z-index: 1; + top: 0; + left: 0; + overflow-x: hidden; + transition: 0.5s; + padding-top: 60px; + -webkit-box-shadow: 4px 0px 8px 0px rgba(0,0,0,0.53); + -moz-box-shadow: 4px 0px 8px 0px rgba(0,0,0,0.53); + box-shadow: 4px 0px 8px 0px rgba(0,0,0,0.53); +} + +.sidenav a { + padding: 8px 8px 8px 32px; + text-decoration: none; + font-size: 25px; + color: #f1f1f1; + display: block; + transition: 0.3s; +} + +.sidenav a:hover { + color: #818181; +} + +.sidenav .closebtn { + position: absolute; + top: 0; + right: 25px; + font-size: 36px; + margin-left: 50px; +} + +@media screen and (max-height: 450px) { + .sidenav {padding-top: 15px;} + .sidenav a {font-size: 18px;} +} + + +.App { + text-align: center +} + +.App-logo { + height: 80px +} + +.App-header { + background: #ffa735; + background: -moz-radial-gradient(center, ellipse cover, #ffa735 0%, #ea8100 100%); + background: -webkit-radial-gradient(center, ellipse cover, #ffa735 0%,#ea8100 100%); + background: radial-gradient(ellipse at center, #ffa735 0%,#ea8100 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffa735', endColorstr='#ea8100',GradientType=1 ); + height: 165px; + padding: 20px; + color: #fff; + border-bottom: 1px solid #888; +} + +.App-title { + font-size: 1.5em +} + +.classprimaryKey { + display: -ms-flexbox; + display: flex; + font-size: 15px; + margin-left: 30px +} + +.grey-header{ + color: #fff; + letter-spacing: 0.5px; + background: #7d7d7d; + text-align: center; + width: 1px; + white-space: nowrap; +} + +.outer { + display: table; + align-content: center; +} + +.inner { + display: table-cell; + vertical-align: bottom; + align-content: right; +} + +.topright { + vertical-align: top; + align-content: right; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +.bottomleft { + vertical-align: bottom; + align-content: left; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +.bottomright { + vertical-align: bottom; + align-content: right; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; +} + +table { + background-color: #EEEEEE; + table-layout:fixed; + text-align: left; + border-collapse: collapse; +} + +td, +th { + border: 1px solid #AAAAAA; + padding: 2px 4px 2px 4px; + width: 1px; + white-space: nowrap; +} + +tbody td { + font-size: 13px; + padding: 2px 4px 2px 4px; + width: 1px; + white-space: nowrap; +} + +tr:nth-child(even) { + background: #FFF; +} +thead { + background: #FFBF70; + border-bottom: 2px solid #444444; +} +thead th { + font-size: 15px; + font-weight: bold; + color: #000000; + border-left: 1px solid #AAAAAA; + text-align: center; + width: 1px; + white-space: nowrap; +} +thead th:first-child { + border-left: none; +} + +.key_cell { + text-align: center; + background: #FFBF70; + font-weight: normal; + width: 1px; + white-space: nowrap; +} + +.td_key { + background: #FFF; + width: 1px; + white-space: nowrap; +} + + +.key_input, input[type="text"], input[type="password"], input[type="date"], +input[type="datetime"], input[type="email"], input[type="number"], +input[type="search"], input[type="tel"], input[type="time"], +input[type="url"], textarea { + background-color: white; + font-family: inherit; + border: 1px solid #ddd; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + color: rgba(0,0,0,0.75); + display: block; + font-size: 14px; + margin: 6px 0 12px 0; + padding: 6px; + height: 32px; + width: 100%; + -moz-transition: all .15s linear; + -o-transition: all .15s linear; + -webkit-transition: all .15s linear; + transition: all .15s linear; +} +.key_input, input { + -webkit-appearance: textfield; + background-color: white; + -webkit-rtl-ordering: logical; + cursor: text; + padding: 1px; + border-width: 2px; + border-style: inset; + border-color: initial; + border-image: initial; +} +.key_input, input, textarea, select, button { + text-rendering: auto; + color: initial; + letter-spacing: normal; + word-spacing: normal; + text-transform: none; + text-indent: 0px; + text-shadow: none; + display: inline-block; + text-align: start; + margin: 0em; +} +textarea{ + margin: 6px 0 12px 0; +} +#query{ + min-height:200px; +} + +.key_select, select{ + width: 180px; + border: 1px solid #ddd; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); + color: rgba(0,0,0,0.75); + display: block; + font-size: 16px; + margin: 6px 0 12px 0; + padding: 6px; + height: 32px; + -moz-transition: all .15s linear; + -o-transition: all .15s linear; + -webkit-transition: all .15s linear; + transition: all .15s linear; + background: #fff; +} +/* +.key_select, .select { + width: 100px; + height: 26px; + font-size: 16px +} */ +.centered-buttons{ + position: relative; + text-align: center; + margin-top: 30px; +} + +.wizard-bar{ + width: 400px; + margin: auto; + float:none; + display:block; +} +.wizard-bar select{ + width:100%; +} +.wizard-bar .cancel{ + text-align: center; +} + +.uploadFile { + -ms-flex-pack: distribute; + justify-content: space-around; + -ms-flex-align: end; + align-items: flex-end +} + +.tablediv, +.uploadFile { + display: -ms-flexbox; + display: flex +} + +.setBut { + -ms-flex-align: end; + align-items: flex-end +} + +.overlayclass { + text-align: center; + background: #5f9ea0; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + position: fixed; + top: 40%; + left: 40%; + right: 40%; + padding: 1rem +} + +.openBtn { + height: 28px; + width: 28px +} + +.okBtnDiv { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: distribute; + justify-content: space-around; + margin-left: 3% +} + +.okBtnStyle { + margin-left: 10px; + width: 200px; + height: 50px; + font-size: 20px +} + +@-webkit-keyframes App-logo-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg) + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn) + } +} + +@keyframes App-logo-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg) + } + to { + -webkit-transform: rotate(1turn); + transform: rotate(1turn) + } +} + +/* The Modal (background) */ +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + padding-top: 100px; /* Location of the box */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ +} + +/* The Close Button */ +.close { + color: #aaaaaa; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; +} + +.noselect { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Old versions of Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome, Edge, Opera and Firefox */ +} + +/* Modal Content */ + +.modal-content{ + width:30%; + margin-left:35%; + border: 1px solid #888; + border-radius: 5px; + background-color: #efefef !important; + margin: auto; + padding: 40px; + -webkit-box-shadow: 4px 2px 8px 0px rgba(0,0,0,0.53); + -moz-box-shadow: 4px 2px 8px 0px rgba(0,0,0,0.53); + box-shadow: 4px 2px 8px 0px rgba(0,0,0,0.53); +} +.modal-content h1{ + margin-top:0; +} +#cgiModal .modal-content { + width: 480px; +} + +#myModal .modal-content { + position: absolute; + width: 20%; +} + +#lsiModal .modal-content { + width: 480px; +} + + +/* +.key_row { + display: flex; + margin: 10px 5px; +} */ + +.key_label { + text-align: left; + padding: 6px 0 6px 0; + font-weight: 600; +} + + +.sort_show { + display: none; +} +#lds-ellipsis{ + text-align: center; +} +.lds-ellipsis { + display: inline-block; + position: relative; + width: 64px; + height: 64px; +} +.lds-ellipsis div { + position: absolute; + top: 27px; + width: 11px; + height: 11px; + border-radius: 50%; + background: #000; + animation-timing-function: cubic-bezier(0, 1, 1, 0); +} +.lds-ellipsis div:nth-child(1) { + left: 6px; + animation: lds-ellipsis1 0.6s infinite; +} +.lds-ellipsis div:nth-child(2) { + left: 6px; + animation: lds-ellipsis2 0.6s infinite; +} +.lds-ellipsis div:nth-child(3) { + left: 26px; + animation: lds-ellipsis2 0.6s infinite; +} +.lds-ellipsis div:nth-child(4) { + left: 45px; + animation: lds-ellipsis3 0.6s infinite; +} +@keyframes lds-ellipsis1 { + 0% { + transform: scale(0); + } + 100% { + transform: scale(1); + } +} +@keyframes lds-ellipsis3 { + 0% { + transform: scale(1); + } + 100% { + transform: scale(0); + } +} +@keyframes lds-ellipsis2 { + 0% { + transform: translate(0, 0); + } + 100% { + transform: translate(19px, 0); + } +} + +[contenteditable] { + outline: 0px solid transparent; +}ext-decoration: none; +}*/ + + +/* Controls */ +.css-fix { } + +.controls { + text-align: right; + margin-right: 25%; +} +.controls.span { + margin-bottom: 6px; +} + +/* Switch check box -- replace native in Bootstrap 5 */ + +/* The switch - the box around the slider */ +.switch { + position: relative; + display: inline-block; + width: 30px; + height: 17px; +} + +/* Hide default HTML checkbox */ +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +/* The slider */ +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: .4s; + transition: .4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 13px; + width: 13px; + left: 2px; + bottom: 2px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked + .slider { + background-color: #2196F3; +} + +input:focus + .slider { + box-shadow: 0 0 1px #2196F3; +} + +input:checked + .slider:before { + -webkit-transform: translateX(13px); + -ms-transform: translateX(13px); + transform: translateX(13px); +} + +/* Rounded sliders */ +.slider.round { + border-radius: 17px; +} + +.slider.round:before { + border-radius: 50%; +} + + +/* Copyright fotoer */ + +:root{ + + --MAIN-TEXT-color:#232F3E; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #161E2D; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#95b0ff; /* Color of links */ + --MAIN-LINK-HOVER-color:#527FFF; /* Color of hovered links */ + --MAIN-ANCHOR-color: #95b0ff; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#161E2D; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#161E2D; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#202c3c; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #4d6584; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #4d6584; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#232F3E; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#161E2D; /* Background color of other sections */ + --MENU-SECTIONS-TEXT-color: #FF9900; /*Color of pre text */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #232F3E; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #FF9900; /* Color of background for the active category (only) */ + --MENU-SECTION-ACTIVE-CATEGORY-TEXT-color: #fff; /* Color of pre text when selected */ + + --MENU-VISITED-color: #527FFF; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #20272b; /* Color of
separator in menu */ + +} + +.footer { + position: relative; + bottom: 0; + width: 100%; + padding: 20px 0; + margin-top: 40px; + background-color: #f5f5f5; + border-top: 1px solid #ddd; +} + +.footer .copyright { + margin: 0; + font-size: 14px; +} +#footer h5.copyright a { + display: inline; + padding-left: 0; + padding-right: 0; + } + + #sidebar #footer { + padding-top: 20px !important; + } + #sidebar #footer h3.github-title { + font-size: 14px; + margin: 10px 0px 5px; + padding: 0px; + text-transform: uppercase; + letter-spacing: .15px; + } + + #sidebar #footer h5.copyright, #sidebar #footer p.build-number { + color: var(--MENU-SECTIONS-LINK-color) !important; + font-size: 10px; + letter-spacing: .15px; + line-height: 150% !important; + } +#sidebar #footer h5.copyright, #sidebar #footer p.build-number { + color: var(--MENU-SECTIONS-LINK-color) !important; + font-size: 10px; + letter-spacing: .15px; + line-height: 150% !important; + } \ No newline at end of file diff --git a/static/files/visualizer/data/ACL.json b/static/files/visualizer/data/ACL.json new file mode 100644 index 0000000..34d2cab --- /dev/null +++ b/static/files/visualizer/data/ACL.json @@ -0,0 +1 @@ +{"ModelName":"ACL","ModelMetadata":{"Author":"","DateCreated":"2021-07-21T19:40:44.189Z","DateLastModified":"2021-07-21T19:40:44.189Z","Description":"","AWSService":"Amazon DynamoDB","Version":"2.0"},"DataModel":[{"TableName":"data","KeyAttributes":{"PartitionKey":{"AttributeName":"PK","AttributeType":"S"},"SortKey":{"AttributeName":"SK","AttributeType":"S"}},"NonKeyAttributes":[{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"permissions","AttributeType":"S"},{"AttributeName":"permissions","AttributeType":"S"},{"AttributeName":"permissions","AttributeType":"S"},{"AttributeName":"permissions","AttributeType":"S"},{"AttributeName":"permissions","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"}],"GlobalSecondaryIndexes":[{"KeyAttributes":{"PartitionKey":{"AttributeName":"GSI1PK","AttributeType":"S"},"SortKey":{"AttributeName":"GSI1SK","AttributeType":"S"}},"IndexName":"GSI1","Projection":{"ProjectionType":"ALL"}}],"TableData":[{"PK":{"S":"U1"},"SK":{"S":"U1"},"type":{"S":"user"},"permissions":{"S":"{}"},"GSI1PK":{"S":"U1"},"GSI1SK":{"S":"U1"}},{"PK":{"S":"G1"},"SK":{"S":"G1"},"type":{"S":"group"},"permissions":{"S":"{}"}},{"PK":{"S":"R1"},"SK":{"S":"R1"},"type":{"S":"role"},"permissions":{"S":"{}"}},{"PK":{"S":"G1"},"SK":{"S":"U1"},"type":{"S":"privilege"},"permissions":{"S":"{}"},"GSI1PK":{"S":"U1"},"GSI1SK":{"S":"G1"}},{"PK":{"S":"R1"},"SK":{"S":"U1"},"type":{"S":"privilege"},"permissions":{"S":"{}"},"GSI1PK":{"S":"U1"},"GSI1SK":{"S":"R1"}}],"ModelSchema":{"indexes":{"primary":{"hash":"PK","sort":"SK"},"GSI1":{"hash":"SK","sort":"PK","projection":"ALL"}},"models":{"~new~":{"PK":{"type":"String"},"SK":{"type":"String"},"type":{"type":"String"}},"user":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"permissions":{"type":"String"},"GSI1PK":{"type":"String","value":"${SK}"},"GSI1SK":{"type":"String","value":"${PK}"}},"group":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"permissions":{"type":"String"}},"groupUser":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"permissions":{"type":"String"}},"role":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"permissions":{"type":"String"}},"userGroup":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"}},"permission":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"}},"privelege":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"}},"privilege":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"permissions":{"type":"String"},"GSI1PK":{"type":"String","value":"${SK}"},"GSI1SK":{"type":"String","value":"${PK}"}}},"queries":{}}}]} \ No newline at end of file diff --git a/static/files/visualizer/data/Asset Management.json b/static/files/visualizer/data/Asset Management.json new file mode 100644 index 0000000..3a7e2b6 --- /dev/null +++ b/static/files/visualizer/data/Asset Management.json @@ -0,0 +1 @@ +{"ModelName":"Asset Management","ModelMetadata":{"Author":"","DateCreated":"2021-06-04T15:40:23.771Z","DateLastModified":"2021-06-04T15:40:23.771Z","Description":"","AWSService":"Amazon DynamoDB","Version":"2.0"},"DataModel":[{"TableName":"data","KeyAttributes":{"PartitionKey":{"AttributeName":"PK","AttributeType":"S"},"SortKey":{"AttributeName":"SK","AttributeType":"S"}},"NonKeyAttributes":[{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"typeCode","AttributeType":"S"},{"AttributeName":"sizeCode","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"},{"AttributeName":"state","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"leid","AttributeType":"S"},{"AttributeName":"fromDate","AttributeType":"S"},{"AttributeName":"toDate","AttributeType":"S"},{"AttributeName":"lid","AttributeType":"S"},{"AttributeName":"pid","AttributeType":"S"},{"AttributeName":"status","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"}],"GlobalSecondaryIndexes":[{"KeyAttributes":{"PartitionKey":{"AttributeName":"GSI1PK","AttributeType":"S"},"SortKey":{"AttributeName":"GSI1SK","AttributeType":"S"}},"IndexName":"GSI1","Projection":{"ProjectionType":"ALL"}}],"TableData":[{"PK":{"S":"A1"},"SK":{"S":"A"},"type":{"S":"asset"},"typeCode":{"S":"/C1/ST1/T1"},"sizeCode":{"S":"XL"},"name":{"S":"someAsset"},"state":{"S":"offline"},"GSI1PK":{"S":"L2"},"GSI1SK":{"S":"/C1/ST1/T1"}},{"PK":{"S":"A2"},"SK":{"S":"A"},"type":{"S":"asset"},"typeCode":{"S":"/C1/ST1/T1"},"sizeCode":{"S":"XL"},"name":{"S":"someAsset1"},"state":{"S":"online"}},{"PK":{"S":"A2"},"SK":{"S":"2021-06-04T15:50:51#LCE1"},"type":{"S":"event"},"leid":{"S":"LCE1"},"fromDate":{"S":"2021-06-04T15:50:51"},"toDate":{"S":"2021-06-05T15:50:51"},"lid":{"S":"L2"},"pid":{"S":"P1"},"status":{"S":"checkedOut"},"GSI1PK":{"S":"L2"},"GSI1SK":{"S":"2021-06-04T15:50:51"}}],"ModelSchema":{"indexes":{"primary":{"hash":"PK","sort":"SK"},"GSI1":{"hash":"GSI1PK","sort":"GSI1SK","projection":"ALL"}},"models":{"~new~":{"PK":{"type":"String"},"SK":{"type":"String"},"type":{"type":"String"}},"asset":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"typeCode":{"type":"String"},"sizeCode":{"type":"String"},"name":{"type":"String"},"state":{"type":"String"},"GSI1PK":{"type":"String"},"GSI1SK":{"type":"String","value":"${typeCode}"}},"event":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${fromDate}#${leid}"},"leid":{"type":"String"},"fromDate":{"type":"String"},"toDate":{"type":"String"},"lid":{"type":"String"},"pid":{"type":"String"},"status":{"type":"String"},"GSI1PK":{"type":"String","value":"${lid}"},"GSI1SK":{"type":"String","value":"${fromDate}"}}},"queries":{}}}]} \ No newline at end of file diff --git a/static/files/visualizer/data/FlightsFares.json b/static/files/visualizer/data/FlightsFares.json new file mode 100644 index 0000000..06f45bf --- /dev/null +++ b/static/files/visualizer/data/FlightsFares.json @@ -0,0 +1 @@ +{"ModelName":"Reservations","ModelMetadata":{"Author":"","DateCreated":"2021-08-12T17:03:35.304Z","DateLastModified":"2021-08-12T17:03:35.304Z","Description":"","AWSService":"Amazon DynamoDB","Version":"2.0"},"DataModel":[{"TableName":"data","KeyAttributes":{"PartitionKey":{"AttributeName":"PK","AttributeType":"S"},"SortKey":{"AttributeName":"SK","AttributeType":"S"}},"NonKeyAttributes":[{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"effective","AttributeType":"S"},{"AttributeName":"end","AttributeType":"S"},{"AttributeName":"start","AttributeType":"S"},{"AttributeName":"end","AttributeType":"S"},{"AttributeName":"origin","AttributeType":"S"},{"AttributeName":"dest","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"depart","AttributeType":"S"},{"AttributeName":"arrive","AttributeType":"S"},{"AttributeName":"origin","AttributeType":"S"},{"AttributeName":"dest","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"data","AttributeType":"S"},{"AttributeName":"data","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"isSegment","AttributeType":"S"},{"AttributeName":"segments","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"class","AttributeType":"S"},{"AttributeName":"segId","AttributeType":"S"},{"AttributeName":"class","AttributeType":"S"},{"AttributeName":"number","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI2PK","AttributeType":"S"},{"AttributeName":"GSI2SK","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"passenger","AttributeType":"S"},{"AttributeName":"SSR","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"segId","AttributeType":"S"},{"AttributeName":"seat","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"flight","AttributeType":"S"},{"AttributeName":"flight","AttributeType":"S"},{"AttributeName":"segId","AttributeType":"S"},{"AttributeName":"seat","AttributeType":"S"},{"AttributeName":"depart","AttributeType":"S"},{"AttributeName":"arrive","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"flight","AttributeType":"S"},{"AttributeName":"depart","AttributeType":"S"},{"AttributeName":"arrive","AttributeType":"S"},{"AttributeName":"segments","AttributeType":"S"},{"AttributeName":"origin","AttributeType":"S"},{"AttributeName":"dest","AttributeType":"S"},{"AttributeName":"origin","AttributeType":"S"},{"AttributeName":"dest","AttributeType":"S"},{"AttributeName":"GSI2PK","AttributeType":"S"},{"AttributeName":"GSI2SK","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"}],"GlobalSecondaryIndexes":[{"KeyAttributes":{"PartitionKey":{"AttributeName":"GSI1PK","AttributeType":"S"},"SortKey":{"AttributeName":"GSI1SK","AttributeType":"S"}},"IndexName":"GSI1","Projection":{"ProjectionType":"ALL"}},{"KeyAttributes":{"PartitionKey":{"AttributeName":"GSI2PK","AttributeType":"S"},"SortKey":{"AttributeName":"GSI2SK","AttributeType":"S"}},"IndexName":"GSI2","Projection":{"ProjectionType":"ALL"}}],"TableData":[{"PK":{"S":"SFO"},"SK":{"S":"JFK#2021-08-01T00:00:00#nonstop"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"SFO"},"dest":{"S":"JFK"},"GSI1PK":{"S":"JFK"},"GSI1SK":{"S":"SFO#2021-08-01T00:00:00"},"class":{"S":"nonstop"}},{"PK":{"S":"SFO"},"SK":{"S":"JFK#2021-08-01T00:00:00#direct"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"SFO"},"dest":{"S":"JFK"},"GSI1PK":{"S":"JFK"},"GSI1SK":{"S":"SFO#2021-08-01T00:00:00"},"class":{"S":"direct"}},{"PK":{"S":"JFK"},"SK":{"S":"SFO#2021-08-01T00:00:00#nonstop"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"JFK"},"dest":{"S":"SFO"},"GSI1PK":{"S":"SFO"},"GSI1SK":{"S":"JFK#2021-08-01T00:00:00"},"class":{"S":"nonstop"}},{"PK":{"S":"JFK"},"SK":{"S":"SFO#2021-08-01T00:00:00#direct"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"JFK"},"dest":{"S":"SFO"},"GSI1PK":{"S":"SFO"},"GSI1SK":{"S":"JFK#2021-08-01T00:00:00"},"class":{"S":"direct"}},{"PK":{"S":"SFO"},"SK":{"S":"DEN#2021-08-01T00:00:00#nonstop"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"SFO"},"dest":{"S":"DEN"},"GSI1PK":{"S":"DEN"},"GSI1SK":{"S":"SFO#2021-08-01T00:00:00"},"class":{"S":"nonstop"}},{"PK":{"S":"DEN"},"SK":{"S":"JFK#2021-08-01T00:00:00#nonstop"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"DEN"},"dest":{"S":"JFK"},"GSI1PK":{"S":"JFK"},"GSI1SK":{"S":"DEN#2021-08-01T00:00:00"},"class":{"S":"nonstop"}},{"PK":{"S":"DEN"},"SK":{"S":"SFO#2021-08-01T00:00:00#nonstop"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"DEN"},"dest":{"S":"SFO"},"GSI1PK":{"S":"SFO"},"GSI1SK":{"S":"DEN#2021-08-01T00:00:00"},"class":{"S":"nonstop"}},{"PK":{"S":"SFO"},"SK":{"S":"JFK#2021-08-01T07:25:00#250#0"},"type":{"S":"flight"},"depart":{"S":"2021-08-01T07:25:00"},"arrive":{"S":"2021-08-01T13:25:00"},"origin":{"S":"SFO"},"dest":{"S":"JFK"},"GSI1PK":{"S":"JFK"},"GSI1SK":{"S":"SFO#2021-08-01T13:25:00"},"segId":{"S":"0"},"class":{"S":"nonstop"},"number":{"S":"250"},"GSI2PK":{"S":"250"},"GSI2SK":{"S":"0"}},{"PK":{"S":"SFO"},"SK":{"S":"JFK#2021-08-01T06:25:00#150#0"},"type":{"S":"flight"},"depart":{"S":"2021-08-01T06:25:00"},"arrive":{"S":"2021-08-01T14:25:00"},"origin":{"S":"SFO"},"dest":{"S":"JFK"},"GSI1PK":{"S":"JFK"},"GSI1SK":{"S":"SFO#2021-08-01T14:25:00"},"segments":{"S":"{DEN, JFK}"},"segId":{"S":"0"},"class":{"S":"direct"},"number":{"S":"150"},"GSI2PK":{"S":"150"},"GSI2SK":{"S":"0"}},{"PK":{"S":"JFK"},"SK":{"S":"SFO#2021-08-01T14:25:00#260#0"},"type":{"S":"flight"},"depart":{"S":"2021-08-01T14:25:00"},"arrive":{"S":"2021-08-01T17:25:00"},"origin":{"S":"JFK"},"dest":{"S":"SFO"},"GSI1PK":{"S":"SFO"},"GSI1SK":{"S":"JFK#2021-08-01T17:25:00"},"segId":{"S":"0"},"class":{"S":"nonstop"},"number":{"S":"260"},"GSI2PK":{"S":"260"},"GSI2SK":{"S":"0"}},{"PK":{"S":"JFK"},"SK":{"S":"SFO#2021-08-01T15:25:00#160#0"},"type":{"S":"flight"},"depart":{"S":"2021-08-01T15:25:00"},"arrive":{"S":"2021-08-03T20:25:25:00"},"origin":{"S":"JFK"},"dest":{"S":"SFO"},"GSI1PK":{"S":"SFO"},"GSI1SK":{"S":"JFK#2021-08-03T20:25:25:00"},"segments":{"S":"{DEN, SFO}"},"segId":{"S":"0"},"class":{"S":"direct"},"number":{"S":"160"},"GSI2PK":{"S":"160"},"GSI2SK":{"S":"0"}},{"PK":{"S":"SFO"},"SK":{"S":"DEN#2021-08-01T06:25:00#150#1"},"type":{"S":"flight"},"depart":{"S":"2021-08-01T06:25:00"},"arrive":{"S":"2021-08-01T09:25:00"},"origin":{"S":"SFO"},"dest":{"S":"DEN"},"GSI1PK":{"S":"DEN"},"GSI1SK":{"S":"SFO#2021-08-01T09:25:00"},"isSegment":{"S":"true"},"segId":{"S":"1"},"class":{"S":"nonstop"},"number":{"S":"150"},"GSI2PK":{"S":"150"},"GSI2SK":{"S":"1"}},{"PK":{"S":"DEN"},"SK":{"S":"SFO#2021-08-02T16:55:00#160#2"},"type":{"S":"flight"},"depart":{"S":"2021-08-02T16:55:00"},"arrive":{"S":"2021-08-02T18:25:00"},"origin":{"S":"DEN"},"dest":{"S":"SFO"},"GSI1PK":{"S":"SFO"},"GSI1SK":{"S":"DEN#2021-08-02T18:25:00"},"isSegment":{"S":"true"},"segId":{"S":"2"},"class":{"S":"nonstop"},"number":{"S":"160"},"GSI2PK":{"S":"160"},"GSI2SK":{"S":"2"}},{"PK":{"S":"DEN"},"SK":{"S":"JFK#2021-08-01T10:25:00#150#2"},"type":{"S":"flight"},"depart":{"S":"2021-08-01T10:25:00"},"arrive":{"S":"2021-08-01T14:25:00"},"origin":{"S":"DEN"},"dest":{"S":"JFK"},"GSI1PK":{"S":"JFK"},"GSI1SK":{"S":"DEN#2021-08-01T14:25:00"},"isSegment":{"S":"true"},"segId":{"S":"2"},"class":{"S":"nonstop"},"number":{"S":"150"},"GSI2PK":{"S":"150"},"GSI2SK":{"S":"2"}},{"PK":{"S":"JFK"},"SK":{"S":"DEN#2021-08-01T15:25:00#160#1"},"type":{"S":"flight"},"depart":{"S":"2021-08-01T15:25:00"},"arrive":{"S":"2021-08-01T19:25:00"},"origin":{"S":"JFK"},"dest":{"S":"DEN"},"GSI1PK":{"S":"DEN"},"GSI1SK":{"S":"JFK#2021-08-01T19:25:00"},"isSegment":{"S":"true"},"segId":{"S":"1"},"class":{"S":"nonstop"},"number":{"S":"160"},"GSI2PK":{"S":"160"},"GSI2SK":{"S":"1"}},{"PK":{"S":"JFK"},"SK":{"S":"DEN#2021-08-01T00:00:00#nonstop"},"type":{"S":"fare"},"start":{"S":"2021-08-01T00:00:00"},"end":{"S":"2021-08-01T23:59:59"},"origin":{"S":"JFK"},"dest":{"S":"DEN"},"GSI1PK":{"S":"DEN"},"GSI1SK":{"S":"JFK#2021-08-01T00:00:00"},"class":{"S":"nonstop"}},{"PK":{"S":"Smith, Jon"},"SK":{"S":"2021-08-01T10:25:00#150#2#1A"},"type":{"S":"assignment"},"SSR":{"S":"[wheelchair, vegan]"},"flight":{"S":"150"},"segId":{"S":"2"},"seat":{"S":"1A"},"depart":{"S":"2021-08-01T10:25:00"},"arrive":{"S":"2021-08-01T14:25:00"},"origin":{"S":"DEN"},"dest":{"S":"JFK"},"GSI2PK":{"S":"150"},"GSI2SK":{"S":"2#1A"}},{"PK":{"S":"Smith, Jon"},"SK":{"S":"2021-08-01T06:25:00#150#1#1A"},"type":{"S":"assignment"},"SSR":{"S":"[wheelchair, vegan]"},"flight":{"S":"150"},"segId":{"S":"1"},"seat":{"S":"1A"},"depart":{"S":"2021-08-01T06:25:00"},"arrive":{"S":"2021-08-01T09:25:00"},"origin":{"S":"SFO"},"dest":{"S":"DEN"},"GSI2PK":{"S":"150"},"GSI2SK":{"S":"1#1A"}},{"PK":{"S":"Smith, Jon"},"SK":{"S":"2021-08-01T06:25:00#150"},"type":{"S":"booking"},"flight":{"S":"150"},"depart":{"S":"2021-08-01T06:25:00"},"arrive":{"S":"2021-08-01T14:25:00"},"segments":{"S":"2"},"origin":{"S":"SFO"},"dest":{"S":"JFK"}},{"PK":{"S":"Parker, Jane"},"SK":{"S":"2021-08-01T10:25:00#150#2#3D"},"type":{"S":"assignment"},"SSR":{"S":"[]"},"flight":{"S":"150"},"segId":{"S":"2"},"seat":{"S":"3D"},"depart":{"S":"2021-08-01T10:25:00"},"arrive":{"S":"2021-08-01T14:25:00"},"origin":{"S":"DEN"},"dest":{"S":"JFK"},"GSI2PK":{"S":"150"},"GSI2SK":{"S":"2#3D"}},{"PK":{"S":"Parker, Jane"},"SK":{"S":"2021-08-01T15:25:00#160#1#3D"},"type":{"S":"assignment"},"SSR":{"S":"[]"},"flight":{"S":"160"},"segId":{"S":"1"},"seat":{"S":"3D"},"depart":{"S":"2021-08-01T15:25:00"},"arrive":{"S":"2021-08-01T19:25:00"},"origin":{"S":"JFK"},"dest":{"S":"DEN"},"GSI2PK":{"S":"160"},"GSI2SK":{"S":"1#3D"}},{"PK":{"S":"Smith, Jon"},"SK":{"S":"2021-08-01T14:25:00#260#0#1A"},"type":{"S":"assignment"},"SSR":{"S":"[wheelchair, vegan]"},"flight":{"S":"260"},"segId":{"S":"0"},"seat":{"S":"1A"},"depart":{"S":"2021-08-01T14:25:00"},"arrive":{"S":"2021-08-01T17:25:00"},"origin":{"S":"~new~"},"dest":{"S":"~new~"},"GSI2PK":{"S":"260"},"GSI2SK":{"S":"0#1A"}}],"ModelSchema":{"indexes":{"primary":{"hash":"PK","sort":"SK"},"GSI1":{"hash":"GSI1PK","sort":"GSI1SK","projection":"ALL"},"GSI2":{"hash":"GSI2PK","sort":"GSI2SK","projection":"ALL"},"GSI3":{"hash":"GSI3PK","sort":"GSI3SK","projection":"ALL"}},"models":{"~new~":{"PK":{"type":"String"},"SK":{"type":"String"},"type":{"type":"String"}},"fare":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${dest}#${start}#${class}"},"start":{"type":"String"},"end":{"type":"String"},"origin":{"type":"String"},"dest":{"type":"String"},"GSI1PK":{"type":"String","value":"${dest}"},"GSI1SK":{"type":"String","value":"${origin}#${start}"},"class":{"type":"String"}},"flight":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${dest}#${depart}#${number}#${segId}"},"depart":{"type":"String"},"arrive":{"type":"String"},"origin":{"type":"String"},"dest":{"type":"String"},"GSI1PK":{"type":"String","value":"${dest}"},"GSI1SK":{"type":"String","value":"${origin}#${arrive}"},"isSegment":{"type":"String"},"segments":{"type":"String"},"segId":{"type":"String"},"class":{"type":"String"},"number":{"type":"String"},"GSI2PK":{"type":"String","value":"${number}"},"GSI2SK":{"type":"String","value":"${segId}"}},"assignment":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${depart}#${flight}#${segId}#${seat}"},"SSR":{"type":"String"},"flight":{"type":"String"},"segId":{"type":"String"},"seat":{"type":"String"},"depart":{"type":"String"},"arrive":{"type":"String"},"origin":{"type":"String"},"dest":{"type":"String"},"GSI2PK":{"type":"String","value":"${flight}"},"GSI2SK":{"type":"String","value":"${segId}#${seat}"}},"booking":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${depart}#${flight}"},"flight":{"type":"String"},"depart":{"type":"String"},"arrive":{"type":"String"},"segments":{"type":"String"},"origin":{"type":"String"},"dest":{"type":"String"}}},"queries":{}},"SavedQuery":{"Get flights and fares":{"view":"data","PK":"SFO","SK":{"condition":"between","values":["JFK#2021-08-01","JFK#2021-08-02"]},"filter":[]}}}]} \ No newline at end of file diff --git a/static/files/visualizer/data/Hospital.json b/static/files/visualizer/data/Hospital.json new file mode 100644 index 0000000..7db9867 --- /dev/null +++ b/static/files/visualizer/data/Hospital.json @@ -0,0 +1,545 @@ +{ + "ModelName": "Hospital", + "ModelMetadata": { + "Author": "", + "DateCreated": "Nov 24, 2020, 08:00 PM", + "DateLastModified": "Apr 17, 2021, 01:07 PM", + "Description": "", + "AWSService": "Amazon DynamoDB", + "Version": "2.0" + }, + "DataModel": [ + { + "TableName": "data", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK", + "AttributeType": "S" + } + }, + "NonKeyAttributes": [ + { + "AttributeName": "type", + "AttributeType": "S" + }, + { + "AttributeName": "timestamp", + "AttributeType": "S" + }, + { + "AttributeName": "treatmentId", + "AttributeType": "S" + }, + { + "AttributeName": "roomId", + "AttributeType": "S" + }, + { + "AttributeName": "PK1", + "AttributeType": "S" + }, + { + "AttributeName": "SK1", + "AttributeType": "S" + }, + { + "AttributeName": "PK2", + "AttributeType": "S" + }, + { + "AttributeName": "SK2", + "AttributeType": "S" + }, + { + "AttributeName": "PK3", + "AttributeType": "S" + }, + { + "AttributeName": "SK3", + "AttributeType": "S" + }, + { + "AttributeName": "PK4", + "AttributeType": "S" + }, + { + "AttributeName": "SK4", + "AttributeType": "S" + }, + { + "AttributeName": "condition", + "AttributeType": "S" + } + ], + "GlobalSecondaryIndexes": [ + { + "IndexName": "GSI1", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK1", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK1", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + }, + { + "IndexName": "GSI2", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK2", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK2", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + }, + { + "IndexName": "GSI3", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK3", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK3", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + }, + { + "IndexName": "GSI4", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK4", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK4", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + } + ], + "TableData": [ + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "patient" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#T1" + }, + "type": { + "S": "treatment" + }, + "timestamp": { + "S": "2020-11-25T12:00:00" + }, + "treatmentId": { + "S": "T11" + }, + "PK1": { + "S": "D1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + }, + "PK2": { + "S": "hospitalId-T" + }, + "SK2": { + "S": "2020-11-25T12:00:00" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#M1" + }, + "type": { + "S": "medicine" + }, + "PK1": { + "S": "D1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + }, + "PK2": { + "S": "hospitalId-M" + }, + "SK2": { + "S": "2020-11-25T12:00:00" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#R1" + }, + "type": { + "S": "admission" + }, + "timestamp": { + "S": "2020-11-25T12:00:00" + }, + "roomId": { + "S": "R1" + }, + "PK1": { + "S": "N1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + }, + "PK2": { + "S": "normal" + }, + "SK2": { + "S": "2020-11-26T00:00:00" + }, + "PK3": { + "S": "R1" + }, + "SK3": { + "S": "2020-11-25T12:00:00" + }, + "PK4": { + "S": "hospitalId" + }, + "SK4": { + "S": "2020-11-25T12:00:00" + }, + "condition": { + "S": "minor trauma" + } + }, + { + "PK": { + "S": "D1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "doctor" + }, + "PK1": { + "S": "D1" + }, + "SK1": { + "S": "A" + }, + "PK2": { + "S": "specialty" + }, + "SK2": { + "S": "hospitalId" + } + }, + { + "PK": { + "S": "N1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "nurse" + }, + "PK1": { + "S": "N1" + }, + "SK1": { + "S": "A" + } + }, + { + "PK": { + "S": "R1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "room" + }, + "PK3": { + "S": "R1" + }, + "SK3": { + "S": "A" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#A1" + }, + "type": { + "S": "activity" + }, + "PK1": { + "S": "N1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + } + } + ], + "DataAccess": { + "MySql": {} + } + } + ], + "ModelSchema": { + "indexes": { + "primary": { + "hash": "PK", + "sort": "SK" + }, + "GSI1": { + "hash": "PK1", + "sort": "SK1", + "projection": "ALL" + }, + "GSI2": { + "hash": "PK2", + "sort": "SK2", + "projection": "ALL" + }, + "GSI3": { + "hash": "PK3", + "sort": "SK3", + "projection": "ALL" + }, + "GSI4": { + "hash": "PK4", + "sort": "SK4", + "projection": "ALL" + } + }, + "models": { + "patient": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + } + }, + "treatment": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String", + "value": "${timestamp}#${treatmentId}" + }, + "timestamp": { + "type": "String" + }, + "treatmentId": { + "type": "String" + }, + "PK1": { + "type": "String" + }, + "SK1": { + "type": "String" + }, + "PK2": { + "type": "String" + }, + "SK2": { + "type": "String" + } + }, + "medicine": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "PK1": { + "type": "String" + }, + "SK1": { + "type": "String" + }, + "PK2": { + "type": "String" + }, + "SK2": { + "type": "String" + } + }, + "admission": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String", + "value": "${timestamp}#${roomId}" + }, + "timestamp": { + "type": "String" + }, + "roomId": { + "type": "String" + }, + "PK1": { + "type": "String" + }, + "SK1": { + "type": "String" + }, + "PK2": { + "type": "String" + }, + "SK2": { + "type": "String" + }, + "PK3": { + "type": "String" + }, + "SK3": { + "type": "String" + }, + "PK4": { + "type": "String" + }, + "SK4": { + "type": "String" + }, + "condition": { + "type": "String" + } + }, + "doctor": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "PK1": { + "type": "String" + }, + "SK1": { + "type": "String" + }, + "PK2": { + "type": "String" + }, + "SK2": { + "type": "String" + } + }, + "nurse": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "PK1": { + "type": "String" + }, + "SK1": { + "type": "String" + } + }, + "room": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "PK3": { + "type": "String" + }, + "SK3": { + "type": "String" + } + }, + "activity": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "PK1": { + "type": "String" + }, + "SK1": { + "type": "String" + } + } + } + } +} \ No newline at end of file diff --git a/static/files/visualizer/data/Hotel Reservations.json b/static/files/visualizer/data/Hotel Reservations.json new file mode 100644 index 0000000..909b735 --- /dev/null +++ b/static/files/visualizer/data/Hotel Reservations.json @@ -0,0 +1 @@ +{"ModelName":"Hotel Reservations","ModelMetadata":{"Author":"Rick Houlihan","DateCreated":"2021-09-15T15:47:01.312Z","DateLastModified":"2021-09-15T15:47:01.312Z","Description":"","AWSService":"Amazon DynamoDB","Version":"2.0"},"DataModel":[{"TableName":"data","KeyAttributes":{"PartitionKey":{"AttributeName":"PK","AttributeType":"S"},"SortKey":{"AttributeName":"SK","AttributeType":"S"}},"NonKeyAttributes":[{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"details","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"startDate","AttributeType":"S"},{"AttributeName":"endDate","AttributeType":"S"},{"AttributeName":"amount","AttributeType":"S"},{"AttributeName":"rType","AttributeType":"S"},{"AttributeName":"rateId","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"data","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"startDate","AttributeType":"S"},{"AttributeName":"endDate","AttributeType":"S"},{"AttributeName":"rType","AttributeType":"S"},{"AttributeName":"reservationId","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"date","AttributeType":"S"},{"AttributeName":"summary","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"date","AttributeType":"S"},{"AttributeName":"roomId","AttributeType":"S"},{"AttributeName":"assignment","AttributeType":"S"},{"AttributeName":"state","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"}],"GlobalSecondaryIndexes":[{"KeyAttributes":{"PartitionKey":{"AttributeName":"GSI1PK","AttributeType":"S"},"SortKey":{"AttributeName":"GSI1SK","AttributeType":"S"}},"IndexName":"GSI1","Projection":{"ProjectionType":"ALL"}}],"TableData":[{"PK":{"S":"H1"},"SK":{"S":"A"},"type":{"S":"hotel"},"details":{"S":"{roomDefs: {}}"}},{"PK":{"S":"H1"},"SK":{"S":"2021-09-30T00:00:00#RATE1"},"type":{"S":"rate"},"startDate":{"S":"2021-09-01T00:00:00"},"endDate":{"S":"2021-09-30T00:00:00"},"amount":{"S":"~new~"},"rType":{"S":"standard"},"rateId":{"S":"RATE1"}},{"PK":{"S":"C1"},"SK":{"S":"A"},"type":{"S":"customert"},"data":{"S":"{}"}},{"PK":{"S":"C1"},"SK":{"S":"2021-09-15T02:00\"00"},"type":{"S":"booking"},"startDate":{"S":"2021-09-15T02:00\"00"},"endDate":{"S":"2021-09-16T12:00\"00"},"rType":{"S":"standard"},"reservationId":{"S":"RES1"},"assignment":{"S":"ROOM1"},"state":{"S":"COMPLETE"},"GSI1PK":{"S":"H1"},"GSI1SK":{"S":"2021-09-15T02:00\"00"}},{"PK":{"S":"H1"},"SK":{"S":"2021-09-15"},"type":{"S":"summary"},"date":{"S":"2021-09-15"},"summary":{"S":"{}"}}],"ModelSchema":{"indexes":{"primary":{"hash":"PK","sort":"SK"},"GSI1":{"hash":"GSI1PK","sort":"GSI1SK","projection":"ALL"}},"models":{"~new~":{"PK":{"type":"String"},"SK":{"type":"String"},"type":{"type":"String"}},"hotel":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"details":{"type":"String"}},"rate":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${endDate}#${rateId}"},"startDate":{"type":"String"},"endDate":{"type":"String"},"amount":{"type":"String"},"rType":{"type":"String"},"rateId":{"type":"String"}},"customert":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"data":{"type":"String"}},"booking":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${startDate}"},"startDate":{"type":"String"},"endDate":{"type":"String"},"rType":{"type":"String"},"reservationId":{"type":"String"},"assignment":{"type":"String"},"state":{"type":"String"},"GSI1PK":{"type":"String","value":"H1"},"GSI1SK":{"type":"String","value":"${startDate}"}},"summary":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${date}"},"date":{"type":"String"},"summary":{"type":"String"}},"checkin":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${type}#${date}#${roomId}"},"date":{"type":"String"},"roomId":{"type":"String"}}},"queries":{}}}]} \ No newline at end of file diff --git a/static/files/visualizer/data/Mobile Payments Service.json b/static/files/visualizer/data/Mobile Payments Service.json new file mode 100644 index 0000000..2cac9dd --- /dev/null +++ b/static/files/visualizer/data/Mobile Payments Service.json @@ -0,0 +1 @@ +{"ModelName":"Mobile Payments Service","ModelMetadata":{"Author":"","DateCreated":"2021-06-09T16:06:13.729Z","DateLastModified":"2021-06-09T16:06:13.729Z","Description":"","AWSService":"Amazon DynamoDB","Version":"2.0"},"DataModel":[{"TableName":"data","KeyAttributes":{"PartitionKey":{"AttributeName":"PK","AttributeType":"S"},"SortKey":{"AttributeName":"SK","AttributeType":"S"}},"NonKeyAttributes":[{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"},{"AttributeName":"details","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"providerId","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"number","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"status","AttributeType":"S"},{"AttributeName":"pData","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"number","AttributeType":"S"},{"AttributeName":"aType","AttributeType":"S"},{"AttributeName":"details","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"},{"AttributeName":"acctId","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"code","AttributeType":"S"},{"AttributeName":"acctId","AttributeType":"S"},{"AttributeName":"retailId","AttributeType":"S"},{"AttributeName":"timestamp","AttributeType":"S"},{"AttributeName":"number","AttributeType":"S"},{"AttributeName":"transId","AttributeType":"S"}],"GlobalSecondaryIndexes":[{"KeyAttributes":{"PartitionKey":{"AttributeName":"GSI1PK","AttributeType":"S"},"SortKey":{"AttributeName":"GSI1SK","AttributeType":"S"}},"IndexName":"GSI1","Projection":{"ProjectionType":"ALL"}}],"TableData":[{"PK":{"S":"C1"},"SK":{"S":"A"},"type":{"S":"customer"},"name":{"S":"John Doe"},"details":{"S":"map"}},{"PK":{"S":"C1"},"SK":{"S":"512.333.3333"},"type":{"S":"device"},"providerId":{"S":"P1"},"GSI1PK":{"S":"online#P1#(hashCode(number) % 10)"},"GSI1SK":{"S":"512.333.3333"},"number":{"S":"512.333.3333"},"status":{"S":"online"},"pData":{"S":"map"}},{"PK":{"S":"C1"},"SK":{"S":"512.444.4444"},"type":{"S":"device"},"providerId":{"S":"P1"},"GSI1PK":{"S":"offline#P1#(hashCode(number) % 10)"},"GSI1SK":{"S":"512.444.4444"},"number":{"S":"512.444.4444"},"status":{"S":"offline"},"pData":{"S":"map"}},{"PK":{"S":"C2"},"SK":{"S":"A"},"type":{"S":"customer"},"name":{"S":"Jane Doe"},"details":{"S":"map"}},{"PK":{"S":"C2"},"SK":{"S":"512.555.5555"},"type":{"S":"device"},"providerId":{"S":"P1"},"GSI1PK":{"S":"online#P1#(hashCode(number) % 10)"},"GSI1SK":{"S":"512.555.5555"},"number":{"S":"512.555.5555"},"status":{"S":"online"},"pData":{"S":"map"}},{"PK":{"S":"C1"},"SK":{"S":"512.333.3333#A1"},"type":{"S":"account"},"number":{"S":"512.333.3333"},"aType":{"S":"credit"},"details":{"S":"map"},"name":{"S":"primary"},"acctId":{"S":"A1"}},{"PK":{"S":"C1"},"SK":{"S":"512.333.3333#2021-06-09T16:46:03#T1"},"type":{"S":"transaction"},"code":{"S":"purchase"},"acctId":{"S":"A1"},"retailId":{"S":"R1"},"timestamp":{"S":"2021-06-09T16:46:03"},"number":{"S":"512.333.3333"},"transId":{"S":"T1"}}],"ModelSchema":{"indexes":{"primary":{"hash":"PK","sort":"SK"},"GSI1":{"hash":"GSI1PK","sort":"GSI1SK","projection":"ALL"}},"models":{"~new~":{"PK":{"type":"String"},"SK":{"type":"String"},"type":{"type":"String"}},"customer":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"name":{"type":"String"},"details":{"type":"String"}},"device":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${number}"},"providerId":{"type":"String"},"GSI1PK":{"type":"String","value":"${status}#${providerId}#(hashCode(number) % 10)"},"GSI1SK":{"type":"String","value":"${number}"},"number":{"type":"String"},"status":{"type":"String"},"pData":{"type":"String"}},"provider":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"name":{"type":"String"}},"account":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${number}#${acctId}"},"number":{"type":"String"},"aType":{"type":"String"},"details":{"type":"String"},"name":{"type":"String"},"acctId":{"type":"String"}},"transaction":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"${number}#${timestamp}#${transId}"},"code":{"type":"String"},"acctId":{"type":"String"},"retailId":{"type":"String"},"timestamp":{"type":"String"},"number":{"type":"String"},"transId":{"type":"String"}}},"queries":{}}}]} \ No newline at end of file diff --git a/static/files/visualizer/data/OneTable.js b/static/files/visualizer/data/OneTable.js new file mode 100644 index 0000000..f2aea9f --- /dev/null +++ b/static/files/visualizer/data/OneTable.js @@ -0,0 +1,181 @@ +{ + indexes: { + primary: { + hash: 'PK', + sort: 'SK' + }, + gsi1: { + hash: 'PK1', + sort: 'SK1', + projection: 'ALL' + }, + gsi2: { + hash: 'PK2', + sort: 'SK2', + projection: 'ALL' + }, + gsi3: { + hash: 'PK3', + sort: 'SK3', + projection: 'ALL' + }, + gsi4: { + hash: 'PK4', + sort: 'SK4', + projection: 'ALL' + } + }, + models: { + activity: { + PK: { type: String, value: 'activity#${date}' }, + SK: { type: String, value: 'activity#' }, + PK1: { type: String }, + SK1: { type: String }, + timestamp: { type: Date, required: true }, + description: { type: String }, + }, + admission: { + PK: { type: String, value: 'admission#${patientId}' }, + SK: { type: String, value: 'admission#${timestamp}#{roomId}' }, + timestamp: { type: Date }, + roomId: { type: String }, + condition: { type: String }, + patientId: { type: String }, + PK1: { type: String }, + SK1: { type: String }, + PK2: { type: String }, + SK2: { type: String } + }, + doctor: { + PK: { type: String, value: 'doctor#${name}' }, + SK: { type: String, value: 'doctor#' }, + name: { type: String, required: true }, + PK1: { type: String }, + SK1: { type: String }, + PK2: { type: String }, + SK2: { type: String } + }, + medicine: { + PK: { type: String, value: 'medicine#${name}' }, + SK: { type: String, value: 'medicine#' }, + name: { type: String }, + PK1: { type: String }, + SK1: { type: String }, + PK2: { type: String }, + SK2: { type: String } + }, + nurse: { + PK: { type: String, value: 'nurse#${name}' }, + SK: { type: String, value: 'nurse#' }, + name: { type: String, required: true }, + PK1: { type: String }, + SK1: { type: String }, + }, + patient: { + PK: { type: String, value: 'patient#${name}' }, + SK: { type: String, value: 'patient#' }, + name: { type: String, required: true }, + age: { type: Number, required: true }, + medicare: { type: String }, + }, + room: { + PK: { type: String, value: 'room#${roomId}' }, + SK: { type: String, value: 'room#' }, + PK3: { type: String }, + SK3: { type: String }, + roomId: { type: String, required: true }, + building: { type: String, required: true }, + }, + treatment: { + PK: { type: String, value: 'treatment#${treatmentId}' }, + SK: { type: String, value: 'treatment#${timestamp}#${treatmentId}' }, + timestamp: { type: Date }, + treatmentId: { type: String }, + description: { type: String }, + PK1: { type: String }, + SK1: { type: String }, + PK2: { type: String }, + SK2: { type: String } + }, + }, + data: [ + { + PK: "P1", + SK: "A", + type: "patient", + name: "John Morrison", + }, + { + PK: "P1", + SK: "2020-11-25T12:00:00#T1", + type: "treatment", + timestamp: "2020-11-25T12:00:00", + treatmentId: "T11", + description: "Covid-19 vaccination", + PK1: "D1", + SK: "2020-11-25T12:00:00", + PK2: "hospitalId-T", + SK2: "2020-11-25T12:00:00" + }, + { + PK: "P1", + SK: "2020-11-25T12:00:00#M1", + type: "medicine", + name: "Pfizer Covid-19", + PK1: "D1", + SK: "2020-11-25T12:00:00", + PK2: "hospitalId-M", + SK2: "2020-11-25T12:00:00" + }, + { + PK: "P1", + SK: "2020-11-25T12:00:00#R1", + type: "admission", + timestamp: "2020-11-25T12:00:00", + roomId: "R1", + PK1: "N1", + SK: "2020-11-25T12:00:00", + PK2: "normal", + SK2: "2020-11-26T00:00:00", + PK3: "R1", + SK3: "2020-11-25T12:00:00", + PK4: "hospitalId", + SK4: "2020-11-25T12:00:00", + "condition": "Covid-19 test" + }, + { + PK: "D1", + SK: "A", + type: "doctor", + name: "Dr. Z. Smith", + PK1: "D1", + SK: "A", + PK2: "specialty", + SK2: "hospitalId" + }, + { + PK: "N1", + SK: "A", + type: "nurse", + name: "Ms. E. Jones", + PK1: "N1", + SK: "A" + }, + { + PK: "R1", + SK: "A", + type: "room", + roomId: "R1", + building: "East Wing", + PK3: "R1", + SK3: "A" + }, + { + PK: "P1", + SK: "2020-11-25T12:00:00#A1", + type: "activity", + PK1: "N1", + SK: "2020-11-25T12:00:00" + } + ] +} diff --git a/static/files/visualizer/data/OneTable.json b/static/files/visualizer/data/OneTable.json new file mode 100644 index 0000000..56cc025 --- /dev/null +++ b/static/files/visualizer/data/OneTable.json @@ -0,0 +1 @@ +{"indexes":{"primary":{"hash":"PK","sort":"SK"},"gsi1":{"hash":"PK1","sort":"SK1","projection":"ALL"},"gsi2":{"hash":"PK2","sort":"SK2","projection":"ALL"},"gsi3":{"hash":"PK3","sort":"SK3","projection":"ALL"},"gsi4":{"hash":"PK4","sort":"SK4","projection":"ALL"}},"models":{"activity":{"PK":{"type":"String","value":"activity#${date}"},"SK":{"type":"String","value":"activity#"},"PK1":{"type":"String"},"SK1":{"type":"String"},"timestamp":{"type":"Date","required":true},"description":{"type":"String"}},"admission":{"PK":{"type":"String","value":"admission#${patientId}"},"SK":{"type":"String","value":"admission#${timestamp}#{roomId}"},"timestamp":{"type":"Date"},"roomId":{"type":"String"},"condition":{"type":"String"},"patientId":{"type":"String"},"PK1":{"type":"String"},"SK1":{"type":"String"},"PK2":{"type":"String"},"SK2":{"type":"String"}},"doctor":{"PK":{"type":"String","value":"doctor#${name}"},"SK":{"type":"String","value":"doctor#"},"name":{"type":"String","required":true},"PK1":{"type":"String"},"SK1":{"type":"String"},"PK2":{"type":"String"},"SK2":{"type":"String"}},"medicine":{"PK":{"type":"String","value":"medicine#${name}"},"SK":{"type":"String","value":"medicine#"},"name":{"type":"String"},"PK1":{"type":"String"},"SK1":{"type":"String"},"PK2":{"type":"String"},"SK2":{"type":"String"}},"nurse":{"PK":{"type":"String","value":"nurse#${name}"},"SK":{"type":"String","value":"nurse#"},"name":{"type":"String","required":true},"PK1":{"type":"String"},"SK1":{"type":"String"}},"patient":{"PK":{"type":"String","value":"patient#${name}"},"SK":{"type":"String","value":"patient#"},"name":{"type":"String","required":true},"age":{"type":"Number","required":true},"medicare":{"type":"String"}},"room":{"PK":{"type":"String","value":"room#${roomId}"},"SK":{"type":"String","value":"room#"},"PK3":{"type":"String"},"SK3":{"type":"String"},"roomId":{"type":"String","required":true},"building":{"type":"String","required":true}},"treatment":{"PK":{"type":"String","value":"treatment#${treatmentId}"},"SK":{"type":"String","value":"treatment#${timestamp}#${treatmentId}"},"timestamp":{"type":"Date"},"treatmentId":{"type":"String"},"description":{"type":"String"},"PK1":{"type":"String"},"SK1":{"type":"String"},"PK2":{"type":"String"},"SK2":{"type":"String"}}},"data":[{"PK":"P1","SK":"A","type":"patient","name":"John Morrison"},{"PK":"P1","SK":"2020-11-25T12:00:00","type":"treatment","timestamp":"2020-11-25T12:00:00","treatmentId":"T11","description":"Covid-19 vaccination","PK1":"D1","PK2":"hospitalId-T","SK2":"2020-11-25T12:00:00"},{"PK":"P1","SK":"2020-11-25T12:00:00","type":"medicine","name":"Pfizer Covid-19","PK1":"D1","PK2":"hospitalId-M","SK2":"2020-11-25T12:00:00"},{"PK":"P1","SK":"2020-11-25T12:00:00","type":"admission","timestamp":"2020-11-25T12:00:00","roomId":"R1","PK1":"N1","PK2":"normal","SK2":"2020-11-26T00:00:00","PK3":"R1","SK3":"2020-11-25T12:00:00","PK4":"hospitalId","SK4":"2020-11-25T12:00:00","condition":"Covid-19 test"},{"PK":"D1","SK":"A","type":"doctor","name":"Dr. Z. Smith","PK1":"D1","PK2":"specialty","SK2":"hospitalId"},{"PK":"N1","SK":"A","type":"nurse","name":"Ms. E. Jones","PK1":"N1"},{"PK":"R1","SK":"A","type":"room","roomId":"R1","building":"East Wing","PK3":"R1","SK3":"A"},{"PK":"P1","SK":"2020-11-25T12:00:00","type":"activity","PK1":"N1"}]} diff --git a/static/files/visualizer/data/Phone Billing.json b/static/files/visualizer/data/Phone Billing.json new file mode 100644 index 0000000..c1300af --- /dev/null +++ b/static/files/visualizer/data/Phone Billing.json @@ -0,0 +1 @@ +{"ModelName":"Phone Billing","ModelMetadata":{"Author":"","DateCreated":"2021-07-07T15:23:13.193Z","DateLastModified":"2021-07-07T15:23:13.193Z","Description":"","AWSService":"Amazon DynamoDB","Version":"2.0"},"DataModel":[{"TableName":"data","KeyAttributes":{"PartitionKey":{"AttributeName":"PK","AttributeType":"S"},"SortKey":{"AttributeName":"SK","AttributeType":"S"}},"NonKeyAttributes":[{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"name","AttributeType":"S"},{"AttributeName":"email","AttributeType":"S"},{"AttributeName":"commercial","AttributeType":"S"},{"AttributeName":"details","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"street","AttributeType":"S"},{"AttributeName":"city","AttributeType":"S"},{"AttributeName":"state","AttributeType":"S"},{"AttributeName":"from","AttributeType":"S"},{"AttributeName":"to","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"postal","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"numType","AttributeType":"S"},{"AttributeName":"number","AttributeType":"S"},{"AttributeName":"from","AttributeType":"S"},{"AttributeName":"to","AttributeType":"S"},{"AttributeName":"details","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"number","AttributeType":"S"},{"AttributeName":"typeCode","AttributeType":"S"},{"AttributeName":"called","AttributeType":"S"},{"AttributeName":"start","AttributeType":"S"},{"AttributeName":"end","AttributeType":"S"},{"AttributeName":"details","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"},{"AttributeName":"type","AttributeType":"S"},{"AttributeName":"headerId","AttributeType":"S"},{"AttributeName":"detailId","AttributeType":"S"},{"AttributeName":"duration","AttributeType":"S"},{"AttributeName":"cost","AttributeType":"S"},{"AttributeName":"start","AttributeType":"S"},{"AttributeName":"number","AttributeType":"S"},{"AttributeName":"end","AttributeType":"S"},{"AttributeName":"GSI1PK","AttributeType":"S"},{"AttributeName":"GSI1SK","AttributeType":"S"}],"GlobalSecondaryIndexes":[{"KeyAttributes":{"PartitionKey":{"AttributeName":"GSI1PK","AttributeType":"S"},"SortKey":{"AttributeName":"GSI1SK","AttributeType":"S"}},"IndexName":"GSI1","Projection":{"ProjectionType":"ALL"}}],"TableData":[{"PK":{"S":"C1"},"SK":{"S":"A#A"},"type":{"S":"customer"},"name":{"S":"John Doe"},"email":{"S":"jdoe@somewhere.com"},"commercial":{"S":"false"},"details":{"S":"{}"}},{"PK":{"S":"C1"},"SK":{"S":"A#2021-07-07T16:09:12"},"type":{"S":"address"},"street":{"S":"~new~"},"city":{"S":"~new~"},"state":{"S":"~new~"},"from":{"S":"2021-07-07T16:09:12"},"to":{"S":"2021-07-07T16:09:50"},"GSI1PK":{"S":"TX"},"GSI1SK":{"S":"78681#2021-07-07T16:09:12"},"postal":{"S":"78681"}},{"PK":{"S":"C1"},"SK":{"S":"A#2021-07-07T16:09:50"},"type":{"S":"address"},"street":{"S":"~new~"},"city":{"S":"~new~"},"state":{"S":"~new~"},"from":{"S":"2021-07-07T16:09:50"},"to":{"S":"A"},"GSI1PK":{"S":"WA"},"GSI1SK":{"S":"99999#2021-07-07T16:09:50"},"postal":{"S":"99999"}},{"PK":{"S":"C1"},"SK":{"S":"P#512-777-7777"},"type":{"S":"phone"},"numType":{"S":"mobile"},"number":{"S":"512-777-7777"},"from":{"S":"2021-07-07T16:27:49"},"to":{"S":"A"},"details":{"S":"{}"},"GSI1PK":{"S":"512-777-7777"},"GSI1SK":{"S":"2021-07-07T16:27:49"}},{"PK":{"S":"C1"},"SK":{"S":"P#512-777-7777#2021-07-07T16:36:42-1"},"type":{"S":"call"},"number":{"S":"512-777-7777"},"typeCode":{"S":"0900"},"called":{"S":"512-888-8888"},"start":{"S":"2021-07-07T16:36:42-1"},"end":{"S":"2021-07-07T16:36:46"},"details":{"S":"{}"},"GSI1PK":{"S":"0"},"GSI1SK":{"S":"2021-07-07T16:36:42-1"}},{"PK":{"S":"C1"},"SK":{"S":"P#512-777-7777#2021-07-07T16:36:42"},"type":{"S":"call"},"number":{"S":"512-777-7777"},"typeCode":{"S":"0900"},"called":{"S":"512-999-9999"},"start":{"S":"2021-07-07T16:36:42"},"end":{"S":"2021-07-07T16:36:46"},"details":{"S":"{}"},"GSI1PK":{"S":"0"},"GSI1SK":{"S":"2021-07-07T16:36:42"}},{"PK":{"S":"C1"},"SK":{"S":"P#512-777-7777#2021-07-07T16:36:42-D"},"type":{"S":"detail"},"headerId":{"S":"~new~"},"detailId":{"S":"~new~"},"duration":{"S":"~new~"},"cost":{"S":"~new~"},"start":{"S":"2021-07-07T16:36:42-D"},"number":{"S":"512-777-7777"},"end":{"S":"2021-07-07T16:36:46"},"GSI1PK":{"S":"T1"},"GSI1SK":{"S":"2021-07-07T16:36:46"}}],"ModelSchema":{"indexes":{"primary":{"hash":"PK","sort":"SK"},"GSI1":{"hash":"GSI1PK","sort":"GSI1SK","projection":"ALL"}},"models":{"~new~":{"PK":{"type":"String"},"SK":{"type":"String"},"type":{"type":"String"}},"customer":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String"},"name":{"type":"String"},"email":{"type":"String"},"commercial":{"type":"String"},"details":{"type":"String"}},"address":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"A#${from}"},"street":{"type":"String"},"city":{"type":"String"},"state":{"type":"String"},"from":{"type":"String"},"to":{"type":"String"},"GSI1PK":{"type":"String"},"GSI1SK":{"type":"String","value":"${postal}#${from}"},"postal":{"type":"String"}},"phone":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"P#${number}"},"numType":{"type":"String"},"number":{"type":"String"},"from":{"type":"String"},"to":{"type":"String"},"details":{"type":"String"},"GSI1PK":{"type":"String","value":"${number}"},"GSI1SK":{"type":"String","value":"${from}"}},"call":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"P#${number}#${start}"},"number":{"type":"String"},"typeCode":{"type":"String"},"called":{"type":"String"},"start":{"type":"String"},"end":{"type":"String"},"details":{"type":"String"},"GSI1PK":{"type":"String"},"GSI1SK":{"type":"String","value":"${start}"}},"detail":{"type":{"type":"String"},"PK":{"type":"String"},"SK":{"type":"String","value":"P#${number}#${start}"},"headerId":{"type":"String"},"detailId":{"type":"String"},"duration":{"type":"String"},"cost":{"type":"String"},"start":{"type":"String"},"number":{"type":"String"},"end":{"type":"String"},"GSI1PK":{"type":"String"},"GSI1SK":{"type":"String","value":"${end}"}}},"queries":{}}}]} \ No newline at end of file diff --git a/static/files/visualizer/data/banking.json b/static/files/visualizer/data/banking.json new file mode 100644 index 0000000..e27b684 --- /dev/null +++ b/static/files/visualizer/data/banking.json @@ -0,0 +1,512 @@ +{ + "ModelName": "Online Banking", + "ModelMetadata": { + "Author": "", + "DateCreated": "2021-05-20T18:39:58.705Z", + "DateLastModified": "2021-05-20T18:39:58.705Z", + "Description": "", + "AWSService": "Amazon DynamoDB", + "Version": "2.0" + }, + "DataModel": [{ + "TableName": "data", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK", + "AttributeType": "S" + } + }, + "NonKeyAttributes": [{ + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "custType", + "AttributeType": "S" + }, { + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "acctType", + "AttributeType": "S" + }, { + "AttributeName": "balance", + "AttributeType": "S" + }, { + "AttributeName": "GSI1PK", + "AttributeType": "S" + }, { + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "acctId", + "AttributeType": "S" + }, { + "AttributeName": "timestamp", + "AttributeType": "S" + }, { + "AttributeName": "transId", + "AttributeType": "S" + }, { + "AttributeName": "transType", + "AttributeType": "S" + }, { + "AttributeName": "balance", + "AttributeType": "S" + }, { + "AttributeName": "amount", + "AttributeType": "S" + }, { + "AttributeName": "GSI1PK", + "AttributeType": "S" + }, { + "AttributeName": "GSI1SK", + "AttributeType": "S" + }, { + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "GSI1SK", + "AttributeType": "S" + }, { + "AttributeName": "dailies", + "AttributeType": "S" + }, { + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "pType", + "AttributeType": "S" + }, { + "AttributeName": "timestamp", + "AttributeType": "S" + }, { + "AttributeName": "pId", + "AttributeType": "S" + }, { + "AttributeName": "aId", + "AttributeType": "S" + }, { + "AttributeName": "GSI2PK", + "AttributeType": "S" + }, { + "AttributeName": "GSI2SK", + "AttributeType": "S" + }, { + "AttributeName": "type", + "AttributeType": "S" + }, { + "AttributeName": "GSI2PK", + "AttributeType": "S" + }, { + "AttributeName": "GSI2SK", + "AttributeType": "S" + }], + "GlobalSecondaryIndexes": [{ + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "GSI1PK", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "GSI1SK", + "AttributeType": "S" + } + }, + "IndexName": "GSI1", + "Projection": { + "ProjectionType": "ALL" + } + }, { + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "GSI2PK", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "GSI2SK", + "AttributeType": "S" + } + }, + "IndexName": "GSI2", + "Projection": { + "ProjectionType": "ALL" + } + }], + "TableData": [{ + "PK": { + "S": "C1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "customer" + }, + "custType": { + "S": "individual" + } + }, { + "PK": { + "S": "C1" + }, + "SK": { + "S": "A1" + }, + "type": { + "S": "account" + }, + "acctType": { + "S": "checking" + }, + "balance": { + "S": "1900" + }, + "GSI1PK": { + "S": "C1" + }, + "GSI1SK": { + "S": "A1" + }, + "dailies": { + "S": "map" + } + }, { + "PK": { + "S": "C1" + }, + "SK": { + "S": "A1#2021-05-20T18:46:50" + }, + "type": { + "S": "transaction" + }, + "acctId": { + "S": "A1" + }, + "timestamp": { + "S": "2021-05-20T18:46:50" + }, + "transId": { + "S": "T1" + }, + "transType": { + "S": "atm" + }, + "balance": { + "S": "1900" + }, + "amount": { + "S": "100" + } + }, { + "PK": { + "S": "C1" + }, + "SK": { + "S": "A1#2021-05-20T18:47:59" + }, + "type": { + "S": "transaction" + }, + "acctId": { + "S": "A1" + }, + "timestamp": { + "S": "2021-05-20T18:47:59" + }, + "transId": { + "S": "T2" + }, + "transType": { + "S": "wire" + }, + "balance": { + "S": "1400" + }, + "amount": { + "S": "500" + }, + "GSI1PK": { + "S": "A1" + }, + "GSI1SK": { + "S": "2021-05-20T18:47:59" + } + }, { + "PK": { + "S": "C1" + }, + "SK": { + "S": "A2" + }, + "type": { + "S": "account" + }, + "acctType": { + "S": "savings" + }, + "balance": { + "S": "5000" + }, + "GSI1PK": { + "S": "C1" + }, + "GSI1SK": { + "S": "A2" + }, + "dailies": { + "S": "map" + } + }, { + "PK": { + "S": "C1" + }, + "SK": { + "S": "A2#2021-05-20T18:51:46" + }, + "type": { + "S": "transaction" + }, + "acctId": { + "S": "A2" + }, + "timestamp": { + "S": "2021-05-20T18:51:46" + }, + "transId": { + "S": "T3" + }, + "transType": { + "S": "deposit" + }, + "balance": { + "S": "5000" + }, + "amount": { + "S": "1000" + } + }, { + "PK": { + "S": "C1" + }, + "SK": { + "S": "purchase#2021-05-20T18:54:28#P1" + }, + "type": { + "S": "purchase" + }, + "pType": { + "S": "checks" + }, + "timestamp": { + "S": "2021-05-20T18:54:28" + }, + "pId": { + "S": "P1" + }, + "aId": { + "S": "A1" + }, + "GSI2PK": { + "S": "P1" + }, + "GSI2SK": { + "S": "2021-05-20T18:54:28" + } + }, { + "PK": { + "S": "C1" + }, + "SK": { + "S": "A1#2021-05-20T18:54:28" + }, + "type": { + "S": "transaction" + }, + "acctId": { + "S": "A1" + }, + "timestamp": { + "S": "2021-05-20T18:54:28" + }, + "transId": { + "S": "T4" + }, + "transType": { + "S": "purchase" + }, + "balance": { + "S": "1375" + }, + "amount": { + "S": "25" + }, + "GSI2PK": { + "S": "P1" + }, + "GSI2SK": { + "S": "2021-05-20T18:54:28" + } + }], + "ModelSchema": { + "indexes": { + "primary": { + "hash": "PK", + "sort": "SK" + }, + "GSI1": { + "hash": "GSI1PK", + "sort": "GSI1SK", + "projection": "ALL" + }, + "GSI2": { + "hash": "GSI2PK", + "sort": "GSI2SK", + "projection": "ALL" + } + }, + "models": { + "~new~": { + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "type": { + "type": "String" + } + }, + "customer": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "custType": { + "type": "String" + } + }, + "account": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String" + }, + "acctType": { + "type": "String" + }, + "balance": { + "type": "String" + }, + "GSI1PK": { + "type": "String", + "value": "${PK}" + }, + "GSI1SK": { + "type": "String" + }, + "dailies": { + "type": "String" + } + }, + "transaction": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String", + "value": "${acctId}#${timestamp}" + }, + "acctId": { + "type": "String" + }, + "timestamp": { + "type": "String" + }, + "transId": { + "type": "String" + }, + "transType": { + "type": "String" + }, + "balance": { + "type": "String" + }, + "amount": { + "type": "String" + }, + "GSI1PK": { + "type": "String", + "value": "${acctId}" + }, + "GSI1SK": { + "type": "String", + "value": "${timestamp}" + }, + "GSI2PK": { + "type": "String" + }, + "GSI2SK": { + "type": "String", + "value": "${timestamp}" + } + }, + "purchase": { + "type": { + "type": "String" + }, + "PK": { + "type": "String" + }, + "SK": { + "type": "String", + "value": "${type}#${timestamp}#${pId}" + }, + "pType": { + "type": "String" + }, + "timestamp": { + "type": "String" + }, + "pId": { + "type": "String" + }, + "aId": { + "type": "String" + }, + "GSI2PK": { + "type": "String", + "value": "${pId}" + }, + "GSI2SK": { + "type": "String", + "value": "${timestamp}" + } + } + }, + "queries": {} + } + }] +} \ No newline at end of file diff --git a/static/files/visualizer/favicon.ico b/static/files/visualizer/favicon.ico new file mode 100644 index 0000000..818948c Binary files /dev/null and b/static/files/visualizer/favicon.ico differ diff --git a/static/files/visualizer/img/AttributeContext.png b/static/files/visualizer/img/AttributeContext.png new file mode 100644 index 0000000..0e34408 Binary files /dev/null and b/static/files/visualizer/img/AttributeContext.png differ diff --git a/static/files/visualizer/img/DynamoDB.png b/static/files/visualizer/img/DynamoDB.png new file mode 100644 index 0000000..4bc39c5 Binary files /dev/null and b/static/files/visualizer/img/DynamoDB.png differ diff --git a/static/files/visualizer/img/MappingFunction.png b/static/files/visualizer/img/MappingFunction.png new file mode 100644 index 0000000..b200c88 Binary files /dev/null and b/static/files/visualizer/img/MappingFunction.png differ diff --git a/static/files/visualizer/img/OneTable.png b/static/files/visualizer/img/OneTable.png new file mode 100644 index 0000000..8ceef06 Binary files /dev/null and b/static/files/visualizer/img/OneTable.png differ diff --git a/static/files/visualizer/img/PK.png b/static/files/visualizer/img/PK.png new file mode 100644 index 0000000..c2c7e10 Binary files /dev/null and b/static/files/visualizer/img/PK.png differ diff --git a/static/files/visualizer/img/PKcontext.png b/static/files/visualizer/img/PKcontext.png new file mode 100644 index 0000000..ba139aa Binary files /dev/null and b/static/files/visualizer/img/PKcontext.png differ diff --git a/static/files/visualizer/img/SK.png b/static/files/visualizer/img/SK.png new file mode 100644 index 0000000..d7ebad0 Binary files /dev/null and b/static/files/visualizer/img/SK.png differ diff --git a/static/files/visualizer/img/SKcontext.png b/static/files/visualizer/img/SKcontext.png new file mode 100644 index 0000000..5829886 Binary files /dev/null and b/static/files/visualizer/img/SKcontext.png differ diff --git a/static/files/visualizer/img/add.png b/static/files/visualizer/img/add.png new file mode 100644 index 0000000..8ce2551 Binary files /dev/null and b/static/files/visualizer/img/add.png differ diff --git a/static/files/visualizer/img/back.png b/static/files/visualizer/img/back.png new file mode 100644 index 0000000..309608f Binary files /dev/null and b/static/files/visualizer/img/back.png differ diff --git a/static/files/visualizer/img/binoculars.png b/static/files/visualizer/img/binoculars.png new file mode 100644 index 0000000..4016a61 Binary files /dev/null and b/static/files/visualizer/img/binoculars.png differ diff --git a/static/files/visualizer/img/button.png b/static/files/visualizer/img/button.png new file mode 100644 index 0000000..5177935 Binary files /dev/null and b/static/files/visualizer/img/button.png differ diff --git a/static/files/visualizer/img/button1.png b/static/files/visualizer/img/button1.png new file mode 100644 index 0000000..63cd3a5 Binary files /dev/null and b/static/files/visualizer/img/button1.png differ diff --git a/static/files/visualizer/img/data/Hospital.json b/static/files/visualizer/img/data/Hospital.json new file mode 100644 index 0000000..a4f64fa --- /dev/null +++ b/static/files/visualizer/img/data/Hospital.json @@ -0,0 +1,331 @@ +{ + "ModelName": "Hospital", + "ModelMetadata": { + "Author": "", + "DateCreated": "Nov 24, 2020, 08:00 PM", + "DateLastModified": "Nov 25, 2020, 12:03 PM", + "Description": "", + "AWSService": "Amazon DynamoDB", + "Version": "2.0" + }, + "DataModel": [{ + "TableName": "data", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK", + "AttributeType": "S", + "MapFunction": { + "treatment": "${timestamp}#${treatmentId}", + "admission": "${timestamp}#${roomId}" + } + } + }, + "NonKeyAttributes": [{ + "AttributeName": "type", + "AttributeType": "S" + }, + { + "AttributeName": "timestamp", + "AttributeType": "S" + }, + { + "AttributeName": "treatmentId", + "AttributeType": "S" + }, + { + "AttributeName": "roomId", + "AttributeType": "S" + }, + { + "AttributeName": "PK1", + "AttributeType": "S" + }, + { + "AttributeName": "SK1", + "AttributeType": "S" + }, + { + "AttributeName": "PK2", + "AttributeType": "S" + }, + { + "AttributeName": "SK2", + "AttributeType": "S" + }, + { + "AttributeName": "PK3", + "AttributeType": "S" + }, + { + "AttributeName": "SK3", + "AttributeType": "S" + }, + { + "AttributeName": "PK4", + "AttributeType": "S" + }, + { + "AttributeName": "SK4", + "AttributeType": "S" + }, + { + "AttributeName": "condition", + "AttributeType": "S" + } + ], + "GlobalSecondaryIndexes": [{ + "IndexName": "GSI1", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK1", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK1", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + }, + { + "IndexName": "GSI2", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK2", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK2", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + }, + { + "IndexName": "GSI3", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK3", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK3", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + }, + { + "IndexName": "GSI4", + "KeyAttributes": { + "PartitionKey": { + "AttributeName": "PK4", + "AttributeType": "S" + }, + "SortKey": { + "AttributeName": "SK4", + "AttributeType": "S" + } + }, + "Projection": { + "ProjectionType": "ALL" + } + } + ], + "TableData": [{ + "PK": { + "S": "P1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "patient" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#T1" + }, + "type": { + "S": "treatment" + }, + "timestamp": { + "S": "2020-11-25T12:00:00" + }, + "treatmentId": { + "S": "T11" + }, + "PK1": { + "S": "D1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + }, + "PK2": { + "S": "hospitalId-T" + }, + "SK2": { + "S": "2020-11-25T12:00:00" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#M1" + }, + "type": { + "S": "medicine" + }, + "PK1": { + "S": "D1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + }, + "PK2": { + "S": "hospitalId-M" + }, + "SK2": { + "S": "2020-11-25T12:00:00" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#R1" + }, + "type": { + "S": "admission" + }, + "timestamp": { + "S": "2020-11-25T12:00:00" + }, + "roomId": { + "S": "R1" + }, + "PK1": { + "S": "N1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + }, + "PK2": { + "S": "normal" + }, + "SK2": { + "S": "2020-11-26T00:00:00" + }, + "PK3": { + "S": "R1" + }, + "SK3": { + "S": "2020-11-25T12:00:00" + }, + "PK4": { + "S": "hospitalId" + }, + "SK4": { + "S": "2020-11-25T12:00:00" + }, + "condition": { + "S": "minor trauma" + } + }, + { + "PK": { + "S": "D1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "doctor" + }, + "PK1": { + "S": "D1" + }, + "SK1": { + "S": "A" + }, + "PK2": { + "S": "specialty" + }, + "SK2": { + "S": "hospitalId" + } + }, + { + "PK": { + "S": "N1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "nurse" + }, + "PK1": { + "S": "N1" + }, + "SK1": { + "S": "A" + } + }, + { + "PK": { + "S": "R1" + }, + "SK": { + "S": "A" + }, + "type": { + "S": "room" + }, + "PK3": { + "S": "R1" + }, + "SK3": { + "S": "A" + } + }, + { + "PK": { + "S": "P1" + }, + "SK": { + "S": "2020-11-25T12:00:00#A1" + }, + "type": { + "S": "activity" + }, + "PK1": { + "S": "N1" + }, + "SK1": { + "S": "2020-11-25T12:00:00" + } + } + ], + "DataAccess": { + "MySql": {} + } + }] +} \ No newline at end of file diff --git a/static/files/visualizer/img/delete.png b/static/files/visualizer/img/delete.png new file mode 100644 index 0000000..c4a1831 Binary files /dev/null and b/static/files/visualizer/img/delete.png differ diff --git a/static/files/visualizer/img/model.png b/static/files/visualizer/img/model.png new file mode 100644 index 0000000..fc2711f Binary files /dev/null and b/static/files/visualizer/img/model.png differ diff --git a/static/files/visualizer/img/model1.png b/static/files/visualizer/img/model1.png new file mode 100644 index 0000000..f9d5aea Binary files /dev/null and b/static/files/visualizer/img/model1.png differ diff --git a/static/files/visualizer/img/model2.png b/static/files/visualizer/img/model2.png new file mode 100644 index 0000000..079d3d9 Binary files /dev/null and b/static/files/visualizer/img/model2.png differ diff --git a/static/files/visualizer/img/model3.png b/static/files/visualizer/img/model3.png new file mode 100644 index 0000000..bffe521 Binary files /dev/null and b/static/files/visualizer/img/model3.png differ diff --git a/static/files/visualizer/img/model4.png b/static/files/visualizer/img/model4.png new file mode 100644 index 0000000..44fcc07 Binary files /dev/null and b/static/files/visualizer/img/model4.png differ diff --git a/static/files/visualizer/img/model5.png b/static/files/visualizer/img/model5.png new file mode 100644 index 0000000..e1550a7 Binary files /dev/null and b/static/files/visualizer/img/model5.png differ diff --git a/static/files/visualizer/img/newTable.png b/static/files/visualizer/img/newTable.png new file mode 100644 index 0000000..b6a800e Binary files /dev/null and b/static/files/visualizer/img/newTable.png differ diff --git a/static/files/visualizer/img/primaryKey.png b/static/files/visualizer/img/primaryKey.png new file mode 100644 index 0000000..fc32cbe Binary files /dev/null and b/static/files/visualizer/img/primaryKey.png differ diff --git a/static/files/visualizer/img/remove.png b/static/files/visualizer/img/remove.png new file mode 100644 index 0000000..dddc9cd Binary files /dev/null and b/static/files/visualizer/img/remove.png differ diff --git a/static/files/visualizer/img/show-schema.png b/static/files/visualizer/img/show-schema.png new file mode 100644 index 0000000..d1eff68 Binary files /dev/null and b/static/files/visualizer/img/show-schema.png differ diff --git a/static/files/visualizer/img/swap.png b/static/files/visualizer/img/swap.png new file mode 100644 index 0000000..72824b5 Binary files /dev/null and b/static/files/visualizer/img/swap.png differ diff --git a/static/files/visualizer/img/tab.png b/static/files/visualizer/img/tab.png new file mode 100644 index 0000000..637de17 Binary files /dev/null and b/static/files/visualizer/img/tab.png differ diff --git a/static/files/visualizer/img/valueTemplate.png b/static/files/visualizer/img/valueTemplate.png new file mode 100644 index 0000000..85c00a1 Binary files /dev/null and b/static/files/visualizer/img/valueTemplate.png differ diff --git a/static/files/visualizer/index.html b/static/files/visualizer/index.html new file mode 100644 index 0000000..8dfb549 --- /dev/null +++ b/static/files/visualizer/index.html @@ -0,0 +1,485 @@ + + + + + + + DynamoDB Data Modeler + + + + + + + + + + + + + + + + + + + + +
+

Amazon DynamoDB Data Modeler

+
☰ menu
+
+
+ × + Create Model + Clear Model + Load from File + Save to File + Set Credentials + + + Import OneTable + Export OneTable +
+
+
+
+

Introduction

+

Welcome to the DynamoDB Data Modeler. This utility creates a data model with one or more virtual Tables, allowing users to visualize how relational data might be stored and indexed in DynamoDB in order to help design efficient schema for your application. The tool is fully compatible with the NoSQL Workbench for DynamoDB, and models generated by either tool are interchangeable. Any changes made in either tool can be easily exported and loaded into the other to facilitate collaboration with users who may be working in environments that do not allow installation of desktop applications like NoSQL Workbench for DynamoDB.

+ +

The data displayed by the DynamoDB Data Modeler is stored locally in memory as a collection of virtual Tables, allowing complex data models to be easily constructed and validated without requiring resources to be created in an AWS account space. Unlike other tools for visualizing data, both the DynamoDB Data Modeler online tool and the NoSQL Workbench for DynamoDB are designed specifically to model NoSQL data and do not assume that the items being displayed are homogenous in nature. The Table will display many types of items as a single aggregated view representing a DynamoDB data model.

+ +

Getting Started

+

+

To get started with a new model, select 'Create Model' from the options menu. To import an existing model use the 'Load Model' option. When 'Create Model' is selected you will be prompted to provide a Model Name, Author and Description and then asked to define the first Table in the Data Model. When a new Table is defined, the DynamoDB Data Modeler wiill build an empty Table with a single Item that looks similar to the following image:

+
+ +
+
+

Using the Amazon DynamoDB Data Modeler

+

Certain elements in the Table view are decorated with controls that can be used for the following actions:

+

Click the swap '' control to add a new Table or select an existing Table from the current Model to view.

+

Click the binoculars '' control to define and run a query against the sample data loaded in the modeler.

+

Click the back '' control to undo a change to the currently selected Table. The modeler caches up to 50 changes for each Table in the currently loaded Model. The change cache is cleared when a new Model is loaded.

+

Click the wrench '' control to switch to 'schema view' to edit attribute types and Value Templates. See 'Editing Schema' section below for details.

+

Click the sliders '' control to switch back to 'values view' and edit attribute values.

+

Click the plus '' control:

+
    +
  1. On the Table Name tab to create a new index:


  2. +
  3. In the Primary Key header cell to add a new partition:


  4. +
  5. In a Partition Key value cell to add a new item to a partition:


  6. +
  7. In a Sort Key value cell to add a new attribute to an Item:


  8. +
+

Finally, click the minus '' control:

+
    +
  1. In a Partition Key value cell to delete a partition and all Items in it:


  2. +
  3. In a Sort Key value cell to delete an Item:


  4. +
+

The following image shows a data model for tracking patients, room assignments, and treatments for a hospital resource scheduling service originally created in NoSQL Workbench for DynamoDB (Hospital.json):

+

+

Clicking the add '' symbol in the "Primary Key" field of the Table header will add a new Item to the bottom of the Table, as shown in the following image

+

+

Clicking the add '' symbol in an existing Partition Value cell or changing the PK value of a new or existing Partition will move or create Items in the specified Partition.

+

+ +

Changing the "type" attribute value will cause the Item to be annoted with attributes from the corresponding Item template:

+

+ + +

Clicking the add '' symbol in a Sort Key value cell will add a new attribute to the Item. When new attribtes are added to an existing Item the Attribute Name becomes editable:

+

+

When the attribute name is assigned, all objects of that type will be annotated with the new attribute:

+

+

The modeler uses custom code to maintain an editable HTML Table, and there are probably a few bugs that still need to be worked out. If you edit a model and something goes wrong you can hit the back arrow in the Attributes area of the Table header to undo up to 50 changes.

+

Item Types

+

All Items created by the DynamoDB Data Modeler have a "type" attribute added automatically, and the modeler maintains an attribute template for each unique Item type detected. As new Items are added to the tool they will inherit the template attributes for the specified Item type, and adding an attribute to any object will also update the template for that object type as well as cause other Items of that type to be annotated with the new attribute.

+

Context Menus

+

Every attribute on the table has a Context Menu that can be accessed via right click on the attribute value. The options available on the context menu differ depending on whether the attribute is the Partion Key, Sort Key, or generic.

+

Partition Key Menu

+

+

The Partition Key Context Menu contains the following options:

+
    +
  1. Add Item - Adds a new Item to the partition.
  2. +
  3. Paste Item - Adds a copied Item to the partition.
  4. +
  5. Delete Partition - Deletes all Items in this partition from the table.
  6. +
  7. Edit Value Template - Define a value template to generate the Partition Key value.
  8. +
  9. Move Up/Down - Change the position of the partition on the table.
  10. +
+

Sort Key Menu

+

+

The Sort Key Context Menu contains the following options:

+
    +
  1. Add Attribute - Adds a new Attribute to the Item.
  2. +
  3. Cut Item - Removes the Item from the Table and copies it to the clipboard.
  4. +
  5. Copy Item - Copies the Item to the clipboard.
  6. +
  7. Delete Item - Removes the Item from the Table.
  8. +
  9. Edit Value Template - Define a value template to generate the Sort Key value.
  10. +
  11. Generate Value - Inserts either an ISO Date or UUID string as the Sort Key value.
  12. +
+

Attribute Menu

+

+

The Attribute Context Menu contains the following options:

+
    +
  1. Delete Attribute - Removes the Attribute from the Item.
  2. +
  3. Cut Item - Removes the Item from the Table and copies it to the clipboard.
  4. +
  5. Edit Value Template - Define a value template to generate the Attribute value.
  6. +
  7. Generate Value - Inserts either an ISO Date or UUID string as the Attribute value.
  8. +
+
+

Schema View

+

Toggling the wrench '' icon on the right of the table will display the Schema Models of the object types associated with the sample data. When displaying the "Schema" view, the attribute types and values templates are displayed instead of the table values. Click the sliders '' icon to return the Data View.

+


+

Value Templates

+

Attributes can be assigned value templates to generate values. Value templates are associated to Attributes by Item type. When an Item is created or modified the type of the Item will determine any value templates that should be used to generate Attribute values. Value Templates can be assigned directly by editing values in the "Schema" view or via dialog by selecting the "Edit Value Template" option from the context menu. Assigning a Value Template to an attribute will apply the template to all Items of the same model type.

+

Currently the only operation supported for value template is concatenation of other Attributes into a composite attribute. To combine Attribute values simply reference the attribute name using '${name}' as shown in the screenshot. Any text outside of the '${}' syntax will appear as typed in the final value. In the model defined below the Value Template for the Item attribute 'SK' of the 'treatment' Schema Model is defined as follows:
+
"${timestamp}#${treatmentId}"

+ This will cause the modeler to generate an 'SK' attribute with a value similar to "2020-11-25T12:00:00#T1" using the values of the 'timestamp' and 'treatmentId' attributes for any Item with a 'type' value of 'treatment'.

+


+ + +

OneTable Integration

+

If you use OneTable you can now import and export your schema files to/from the DynamoDB Modeler using the convenient links on the Side Panel menu. To import, simply click the import link and specify the location of your OneTable json or javascript schema file. The modeler will convert any data objects from OneTable format and load all the ValueTemplates and Shema models defined in the OneTable schema. After the schema is imported you will be able to create Items using OneTable model types. Exported schemas are saved to a file in a multi-line JSON format.

+

That should be enough to get you going. Click the '☰ menu' icon in the upper right corner to import an existing model from NoSQL Workbench for DynamoDB or use the modeler to build a data model for your DynamoDB Table from scratch.

+

Have ideas or feature requests? Create an issue on GitHub Amazon DynamoDB Labs and let us know!

+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/files/visualizer/js/aws-sdk-2.892.0.min.js b/static/files/visualizer/js/aws-sdk-2.892.0.min.js new file mode 100644 index 0000000..2f06bbc --- /dev/null +++ b/static/files/visualizer/js/aws-sdk-2.892.0.min.js @@ -0,0 +1,8 @@ +_xamzrequire=function(){function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){return i(t[s][1][e]||e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s=0||r.indexOf("fips")>=0)throw n.util.error(new Error,{code:"InvalidConfiguration",message:"ARN endpoint is not compatible with FIPS region"});if(!t&&r!==s)throw n.util.error(new Error,{code:"InvalidConfiguration",message:"Configured region conflicts with access point region"});if(t&&i.getEndpointSuffix(r)!==i.getEndpointSuffix(s))throw n.util.error(new Error,{code:"InvalidConfiguration",message:"Configured region and access point region not in same partition"});if(e.service.config.useAccelerateEndpoint)throw n.util.error(new Error,{code:"InvalidConfiguration",message:"useAccelerateEndpoint config is not supported with access point ARN"});if("s3-outposts"===e._parsedArn.service&&e.service.config.useDualstack)throw n.util.error(new Error,{code:"InvalidConfiguration",message:"useDualstack config is not supported with outposts access point ARN"})},loadUseArnRegionConfig:function(e){var t="AWS_S3_USE_ARN_REGION",i="s3_use_arn_region",o=!0,s=e.service._originalConfig||{};if(void 0!==e.service.config.s3UseArnRegion)return e.service.config.s3UseArnRegion;if(void 0!==s.s3UseArnRegion)o=!0===s.s3UseArnRegion;else if(n.util.isNode())if(r.env[t]){var a=r.env[t].trim().toLowerCase();if(["false","true"].indexOf(a)<0)throw n.util.error(new Error,{code:"InvalidConfiguration",message:t+" only accepts true or false. Got "+r.env[t],retryable:!1});o="true"===a}else{var u={},c={};try{u=n.util.getProfilesFromSharedConfig(n.util.iniLoader),c=u[r.env.AWS_PROFILE||n.util.defaultProfile]}catch(e){}if(c[i]){if(["false","true"].indexOf(c[i].trim().toLowerCase())<0)throw n.util.error(new Error,{code:"InvalidConfiguration",message:i+" only accepts true or false. Got "+c[i],retryable:!1});o="true"===c[i].trim().toLowerCase()}}return e.service.config.s3UseArnRegion=o,o},validatePopulateUriFromArn:function(e){if(e.service._originalConfig&&e.service._originalConfig.endpoint)throw n.util.error(new Error,{code:"InvalidConfiguration",message:"Custom endpoint is not compatible with access point ARN"});if(e.service.config.s3ForcePathStyle)throw n.util.error(new Error,{code:"InvalidConfiguration",message:"Cannot construct path-style endpoint with access point"})},dnsCompatibleBucketName:function(e){var t=e,r=new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/),n=new RegExp(/(\d+\.){3}\d+/),i=new RegExp(/\.\./);return!(!t.match(r)||t.match(n)||t.match(i))}};t.exports=o}).call(this)}).call(this,e("_process"))},{"../core":39,"../region_config":82,_process:8}],106:[function(e,t,r){var n=e("../core"),i={setupRequestListeners:function(e,t,r){if(-1!==r.indexOf(t.operation)&&t.params.SourceRegion)if(t.params=n.util.copy(t.params),t.params.PreSignedUrl||t.params.SourceRegion===e.config.region)delete t.params.SourceRegion;else{var o=!!e.config.paramValidation;o&&t.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),t.onAsync("validate",i.buildCrossRegionPresignedUrl),o&&t.addListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS)}},buildCrossRegionPresignedUrl:function(e,t){var r=n.util.copy(e.service.config);r.region=e.params.SourceRegion,delete e.params.SourceRegion,delete r.endpoint,delete r.params,r.signatureVersion="v4";var i=e.service.config.region,o=new e.service.constructor(r),s=o[e.operation](n.util.copy(e.params));s.on("build",function(e){var t=e.httpRequest;t.params.DestinationRegion=i,t.body=n.util.queryParamsToString(t.params)}),s.presign(function(r,n){r?t(r):(e.params.PreSignedUrl=n,t())})}};t.exports=i},{"../core":39}],38:[function(e,t,r){(function(r){(function(){function n(e,t){if("string"==typeof e){if(["legacy","regional"].indexOf(e.toLowerCase())>=0)return e.toLowerCase();throw o.util.error(new Error,t)}}function i(e,t){e=e||{};var i;if(e[t.clientConfig]&&(i=n(e[t.clientConfig],{code:"InvalidConfiguration",message:'invalid "'+t.clientConfig+'" configuration. Expect "legacy" or "regional". Got "'+e[t.clientConfig]+'".'})))return i;if(!o.util.isNode())return i;if(Object.prototype.hasOwnProperty.call(r.env,t.env)){if(i=n(r.env[t.env],{code:"InvalidEnvironmentalVariable",message:"invalid "+t.env+' environmental variable. Expect "legacy" or "regional". Got "'+r.env[t.env]+'".'}))return i}var s={};try{s=o.util.getProfilesFromSharedConfig(o.util.iniLoader)[r.env.AWS_PROFILE||o.util.defaultProfile]}catch(e){}if(s&&Object.prototype.hasOwnProperty.call(s,t.sharedConfig)){if(i=n(s[t.sharedConfig],{code:"InvalidConfiguration",message:"invalid "+t.sharedConfig+' profile config. Expect "legacy" or "regional". Got "'+s[t.sharedConfig]+'".'}))return i}return i}var o=e("./core");t.exports=i}).call(this)}).call(this,e("_process"))},{"./core":39,_process:8}],39:[function(e,t,r){var n={util:e("./util")};({}).toString(),t.exports=n,n.util.update(n,{VERSION:"2.892.0",Signers:{},Protocol:{Json:e("./protocol/json"),Query:e("./protocol/query"),Rest:e("./protocol/rest"),RestJson:e("./protocol/rest_json"),RestXml:e("./protocol/rest_xml")},XML:{Builder:e("./xml/builder"),Parser:null},JSON:{Builder:e("./json/builder"),Parser:e("./json/parser")},Model:{Api:e("./model/api"),Operation:e("./model/operation"),Shape:e("./model/shape"),Paginator:e("./model/paginator"),ResourceWaiter:e("./model/resource_waiter")},apiLoader:e("./api_loader"),EndpointCache:e("../vendor/endpoint-cache").EndpointCache}),e("./sequential_executor"),e("./service"),e("./config"),e("./http"),e("./event_listeners"),e("./request"),e("./response"),e("./resource_waiter"),e("./signers/request_signer"),e("./param_validator"),n.events=new n.SequentialExecutor,n.util.memoizedProperty(n,"endpointCache",function(){return new n.EndpointCache(n.config.endpointCacheSize)},!0)},{"../vendor/endpoint-cache":130,"./api_loader":27,"./config":37,"./event_listeners":60,"./http":61,"./json/builder":63,"./json/parser":64,"./model/api":65,"./model/operation":67,"./model/paginator":68,"./model/resource_waiter":69,"./model/shape":70,"./param_validator":71,"./protocol/json":74,"./protocol/query":75,"./protocol/rest":76,"./protocol/rest_json":77,"./protocol/rest_xml":78,"./request":84,"./resource_waiter":85,"./response":86,"./sequential_executor":88,"./service":89,"./signers/request_signer":115,"./util":123,"./xml/builder":125}],130:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e("./utils/LRU"),i=1e3,o=function(){function e(e){void 0===e&&(e=i),this.maxSize=e,this.cache=new n.LRUCache(e)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),e.prototype.put=function(t,r){var n="string"!=typeof t?e.getKeyString(t):t,i=this.populateValue(r);this.cache.put(n,i)},e.prototype.get=function(t){var r="string"!=typeof t?e.getKeyString(t):t,n=Date.now(),i=this.cache.get(r);if(i)for(var o=0;o0||n?o.toString():""},t.exports=n},{"../util":123,"./xml-node":128,"./xml-text":129}],129:[function(e,t,r){function n(e){this.value=e}var i=e("./escape-element").escapeElement;n.prototype.toString=function(){return i(""+this.value)},t.exports={XmlText:n}},{"./escape-element":127}],127:[function(e,t,r){function n(e){return e.replace(/&/g,"&").replace(//g,">")}t.exports={escapeElement:n}},{}],128:[function(e,t,r){function n(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}var i=e("./escape-attribute").escapeAttribute;n.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},n.prototype.addChildNode=function(e){return this.children.push(e),this},n.prototype.removeAttribute=function(e){return delete this.attributes[e],this},n.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,r=this.attributes,n=0,o=Object.keys(r);n"+this.children.map(function(e){return e.toString()}).join("")+"":"/>"},t.exports={XmlNode:n}},{"./escape-attribute":126}],126:[function(e,t,r){function n(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(//g,">").replace(/"/g,""")}t.exports={escapeAttribute:n}},{}],115:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.RequestSigner=i({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),n.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return n.Signers.V2;case"v3":return n.Signers.V3;case"s3v4":case"v4":return n.Signers.V4;case"s3":return n.Signers.S3;case"v3https":return n.Signers.V3Https}throw new Error("Unknown signing version "+e)},e("./v2"),e("./v3"),e("./v3https"),e("./v4"),e("./s3"),e("./presign")},{"../core":39,"./presign":114,"./s3":116,"./v2":117,"./v3":118,"./v3https":119,"./v4":120}],120:[function(e,t,r){var n=e("../core"),i=e("./v4_credentials"),o=n.util.inherit;n.Signers.V4=o(n.Signers.RequestSigner,{constructor:function(e,t,r){n.Signers.RequestSigner.call(this,e),this.serviceName=t,r=r||{},this.signatureCache="boolean"!=typeof r.signatureCache||r.signatureCache,this.operation=r.operation,this.signatureVersion=r.signatureVersion},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,t){var r=n.util.date.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,r):this.addHeaders(e,r),this.request.headers.Authorization=this.authorization(e,r)},addHeaders:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(e,t){var r=this.credentialString(t),i={"X-Amz-Date":t,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers["presigned-expires"],"X-Amz-SignedHeaders":this.signedHeaders()};e.sessionToken&&(i["X-Amz-Security-Token"]=e.sessionToken),this.request.headers["Content-Type"]&&(i["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(i["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(i["Cache-Control"]=this.request.headers["Cache-Control"]),n.util.each.call(this,this.request.headers,function(e,t){if("presigned-expires"!==e&&this.isSignableHeader(e)){var r=e.toLowerCase();0===r.indexOf("x-amz-meta-")?i[r]=t:0===r.indexOf("x-amz-")&&(i[e]=t)}});var o=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=o+n.util.queryParamsToString(i)},authorization:function(e,t){var r=[],n=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=i.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return n.util.crypto.hmac(r,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(t=n.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];n.util.each.call(this,this.request.headers,function(t,r){e.push([t,r])}),e.sort(function(e,t){return e[0].toLowerCase()50&&delete i[o.shift()]),f},emptyCache:function(){i={},o=[]}}},{"../core":39}],119:[function(e,t,r){var n=e("../core"),i=n.util.inherit;e("./v3"),n.Signers.V3Https=i(n.Signers.V3,{authorization:function(e){return"AWS3-HTTPS AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(e)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}}),t.exports=n.Signers.V3Https},{"../core":39,"./v3":118}],118:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.V3=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){var r=n.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,r)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return n.util.arrayEach(this.headersToSign(),function(t){e.push(t.toLowerCase())}),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,t=[];return n.util.arrayEach(this.headersToSign(),function(r){t.push(r.toLowerCase().trim()+":"+String(e[r]).trim())}),t.sort().join("\n")+"\n"},headersToSign:function(){var e=[];return n.util.each(this.request.headers,function(t){("Host"===t||"Content-Encoding"===t||t.match(/^X-Amz/i))&&e.push(t)}),e},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),n.util.crypto.sha256(e.join("\n"))}}),t.exports=n.Signers.V3},{"../core":39}],117:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.V2=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){t||(t=n.util.date.getDate());var r=this.request;r.params.Timestamp=n.util.date.iso8601(t),r.params.SignatureVersion="2",r.params.SignatureMethod="HmacSHA256",r.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(r.params.SecurityToken=e.sessionToken),delete r.params.Signature,r.params.Signature=this.signature(e),r.body=n.util.queryParamsToString(r.params),r.headers["Content-Length"]=r.body.length},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push(this.request.endpoint.host.toLowerCase()),e.push(this.request.pathname()),e.push(n.util.queryParamsToString(this.request.params)),e.join("\n")}}),t.exports=n.Signers.V2},{"../core":39}],116:[function(e,t,r){var n=e("../core"),i=n.util.inherit;n.Signers.S3=i(n.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=n.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),i="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=i},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];n.util.each(this.request.headers,function(t){t.match(/^x-amz-/i)&&e.push(t)}),e.sort(function(e,t){return e.toLowerCase()604800){throw o.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1})}e.httpRequest.headers[a]=t}else{if(r!==o.Signers.S3)throw o.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var n=e.service?e.service.getSkewCorrectedDate():o.util.date.getDate();e.httpRequest.headers[a]=parseInt(o.util.date.unixTimestamp(n)+t,10).toString()}}function i(e){var t=e.httpRequest.endpoint,r=o.util.urlParse(e.httpRequest.path),n={};r.search&&(n=o.util.queryStringParse(r.search.substr(1)));var i=e.httpRequest.headers.Authorization.split(" ");if("AWS"===i[0])i=i[1].split(":"),n.Signature=i.pop(),n.AWSAccessKeyId=i.join(":"),o.util.each(e.httpRequest.headers,function(e,t){e===a&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete n[e],e=e.toLowerCase()),n[e]=t}),delete e.httpRequest.headers[a],delete n.Authorization,delete n.Host;else if("AWS4-HMAC-SHA256"===i[0]){i.shift();var s=i.join(" "),u=s.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];n["X-Amz-Signature"]=u,delete n.Expires}t.pathname=r.pathname,t.search=o.util.queryParamsToString(n)}var o=e("../core"),s=o.util.inherit,a="presigned-expires";o.Signers.Presign=s({sign:function(e,t,r){if(e.httpRequest.headers[a]=t||3600,e.on("build",n),e.on("sign",i),e.removeListener("afterBuild",o.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",o.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return o.util.urlFormat(e.httpRequest.endpoint)}e.build(function(){this.response.error?r(this.response.error):r(null,o.util.urlFormat(e.httpRequest.endpoint))})}}),t.exports=o.Signers.Presign},{"../core":39}],89:[function(e,t,r){(function(r){(function(){var n=e("./core"),i=e("./model/api"),o=e("./region_config"),s=n.util.inherit,a=0;n.Service=s({constructor:function(e){if(!this.loadServiceClass)throw n.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});if(t){var r=n.util.copy(e),i=new t(e);return Object.defineProperty(i,"_originalConfig",{get:function(){return r},enumerable:!1,configurable:!0}),i._clientId=++a,i}this.initialize(e)},initialize:function(e){var t=n.config[this.serviceIdentifier];if(this.config=new n.Config(n.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||o.configureEndpoint(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),n.SequentialExecutor.call(this),n.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||n.Service._clientSideMonitoring)&&this.publisher){var i=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",function(e){r.nextTick(function(){i.eventHandler(e)})}),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",function(e){r.nextTick(function(){i.eventHandler(e)})})}},validateService:function(){},loadServiceClass:function(e){var t=e;if(n.util.isEmpty(this.api)){if(t.apiConfig)return n.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){t=new n.Config(n.config),t.update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&n.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?n.util.isType(e,Date)&&(e=n.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),r=null,i=t.length-1;i>=0;i--)if("*"!==t[i][t[i].length-1]&&(r=t[i]),t[i].substr(0,10)<=e)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var i=this.api.operations[e];i&&(t=n.util.copy(t),n.util.each(this.config.params,function(e,r){i.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=r))}))}var o=new n.Request(this,e,t);return this.addAllRequestListeners(o),this.attachMonitoringEmitter(o),r&&o.send(r),o},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new n.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[n.events,n.EventListeners.Core,this.serviceInterface(),n.EventListeners.CorePost],r=0;r299?(i.code&&(r.FinalAwsException=i.code),i.message&&(r.FinalAwsExceptionMessage=i.message)):((i.code||i.name)&&(r.FinalSdkException=i.code||i.name),i.message&&(r.FinalSdkExceptionMessage=i.message))}return r},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},n=e.response;return n.httpResponse.statusCode&&(r.HttpStatusCode=n.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(r.AccessKey=e.service.config.credentials.accessKeyId),n.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(r.SessionToken=e.httpRequest.headers["x-amz-security-token"]),n.httpResponse.headers["x-amzn-requestid"]&&(r.XAmznRequestId=n.httpResponse.headers["x-amzn-requestid"]), +n.httpResponse.headers["x-amz-request-id"]&&(r.XAmzRequestId=n.httpResponse.headers["x-amz-request-id"]),n.httpResponse.headers["x-amz-id-2"]&&(r.XAmzId2=n.httpResponse.headers["x-amz-id-2"]),r):r},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),r=e.response,n=r.error;return r.httpResponse.statusCode>299?(n.code&&(t.AwsException=n.code),n.message&&(t.AwsExceptionMessage=n.message)):((n.code||n.name)&&(t.SdkException=n.code||n.name),n.message&&(t.SdkExceptionMessage=n.message)),t},attachMonitoringEmitter:function(e){var t,r,i,o,s,a,u=0,c=this;e.on("validate",function(){o=n.util.realClock.now(),a=Date.now()},!0),e.on("sign",function(){r=n.util.realClock.now(),t=Date.now(),s=e.httpRequest.region,u++},!0),e.on("validateResponse",function(){i=Math.round(n.util.realClock.now()-r)}),e.addNamedListener("API_CALL_ATTEMPT","success",function(){var r=c.apiAttemptEvent(e);r.Timestamp=t,r.AttemptLatency=i>=0?i:0,r.Region=s,c.emit("apiCallAttempt",[r])}),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",function(){var o=c.attemptFailEvent(e);o.Timestamp=t,i=i||Math.round(n.util.realClock.now()-r),o.AttemptLatency=i>=0?i:0,o.Region=s,c.emit("apiCallAttempt",[o])}),e.addNamedListener("API_CALL","complete",function(){var t=c.apiCallEvent(e);if(t.AttemptCount=u,!(t.AttemptCount<=0)){t.Timestamp=a;var r=Math.round(n.util.realClock.now()-o);t.Latency=r>=0?r:0;var i=e.response;i.error&&i.error.retryable&&"number"==typeof i.retryCount&&"number"==typeof i.maxRetries&&i.retryCount>=i.maxRetries&&(t.MaxRetriesExceeded=1),c.emit("apiCall",[t])}})},setupRequestListeners:function(e){},getSigningName:function(){return this.api.signingName||this.api.endpointPrefix},getSignerClass:function(e){var t,r=null,i="";if(e){r=(e.service.api.operations||{})[e.operation]||null,i=r?r.authtype:""}return t=this.config.signatureVersion?this.config.signatureVersion:"v4"===i||"v4-unsigned-body"===i?"v4":this.api.signatureVersion,n.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return n.EventListeners.Query;case"json":return n.EventListeners.Json;case"rest-json":return n.EventListeners.RestJson;case"rest-xml":return n.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e,t){return n.util.calculateRetryDelay(e,this.config.retryDelayOptions,t)},retryableError:function(e){return!!this.timeoutError(e)||(!!this.networkingError(e)||(!!this.expiredCredentialsError(e)||(!!this.throttledError(e)||e.statusCode>=500)))},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e5},throttledError:function(e){if(429===e.statusCode)return!0;switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=t.replace(/\{service\}/g,this.api.endpointPrefix),t=t.replace(/\{region\}/g,this.config.region),t=t.replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new n.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var i=new Error;throw n.util.error(i,"No pagination configuration for "+e)}return null}return r}}),n.util.update(n.Service,{defineMethods:function(e){n.util.each(e.prototype.api.operations,function(t){if(!e.prototype[t]){"none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,r){return this.makeUnauthenticatedRequest(t,e,r)}:e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)}}})},defineService:function(e,t,r){n.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var i=s(n.Service,r||{});if("string"==typeof e){n.Service.addVersions(i,t);var o=i.serviceIdentifier||e;i.serviceIdentifier=o}else i.prototype.api=e,n.Service.defineMethods(i);if(n.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&n.util.clientSideMonitoring){var a=n.util.clientSideMonitoring.Publisher,u=n.util.clientSideMonitoring.configProvider,c=u();this.prototype.publisher=new a(c),c.enabled&&(n.Service._clientSideMonitoring=!0)}return n.SequentialExecutor.call(i.prototype),n.Service.addDefaultMonitoringListeners(i.prototype),i},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r=0){u=!0;var c=0}var l=function(){u&&c!==a?i.emit("error",n.util.error(new Error("Stream content length mismatch. Received "+c+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===n.HttpClient.streamsApiVersion?i.end():i.emit("end")},h=s.httpResponse.createUnbufferedStream();if(2===n.HttpClient.streamsApiVersion)if(u){var p=new e.PassThrough;p._write=function(t){return t&&t.length&&(c+=t.length),e.PassThrough.prototype._write.apply(this,arguments)},p.on("end",l),i.on("error",function(e){u=!1,h.unpipe(p),p.emit("end"),p.end()}),h.pipe(p).pipe(i,{end:!1})}else h.pipe(i);else u&&h.on("data",function(e){e&&e.length&&(c+=e.length)}),h.on("data",function(e){i.emit("data",e)}),h.on("end",l);h.on("error",function(e){u=!1,i.emit("error",e)})}}),i},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response)),n.SequentialExecutor.prototype.emit.call(this,e,t,function(e){e&&(this.response.error=e),r.call(this,e)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new n.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",n.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",n.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),n.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e(function(e,r){t.on("complete",function(t){t.error?r(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))}),t.runTo()})}},n.Request.deletePromisesFromClass=function(){delete this.prototype.promise},n.util.addPromises(n.Request),n.util.mixin(n.Request,n.SequentialExecutor)}).call(this)}).call(this,e("_process"))},{"./core":39,"./state_machine":122,_process:8,jmespath:7}],122:[function(e,t,r){function n(e,t){this.currentState=t||null,this.states=e||{}}n.prototype.runTo=function(e,t,r,n){"function"==typeof e&&(n=r,r=t,t=e,e=null);var i=this,o=i.states[i.currentState];o.fn.call(r||i,n,function(n){if(n){if(!o.fail)return t?t.call(r,n):null;i.currentState=o.fail}else{if(!o.accept)return t?t.call(r):null;i.currentState=o.accept}if(i.currentState===e)return t?t.call(r,n):null;i.runTo(e,t,r,n)})},n.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},t.exports=n},{}],71:[function(e,t,r){var n=e("./core");n.ParamValidator=n.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,n.util.error(new Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(n.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,r){this.validateType(t,r,["object"],"structure");for(var n,i=0;e.required&&i= 1, but found "'+t+'" for '+r)},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r))},validateRange:function(e,t,r,n){this.validation.min&&void 0!==e.min&&t= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(e,t,r,i){if(null===e||void 0===e)return!1;for(var o=!1,s=0;s=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();i.util.computeSha256(o,function(r,n){r?t(r):(e.httpRequest.headers["X-Amz-Content-Sha256"]=n,t())})}else t()}}),e("SET_CONTENT_LENGTH","afterBuild",function(e){var t=n(e),r=i.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var o=i.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=o}catch(n){if(r&&r.isStreaming){if(r.requiresLength)throw n;if(t.indexOf("unsigned-body")>=0)return void(e.httpRequest.headers["Transfer-Encoding"]="chunked");throw n}throw n}}),e("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),e("RESTART","restart",function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new i.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],function(e){e?t(e):s()}):s()}),e("HTTP_HEADERS","httpHeaders",function(e,t,r,n){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=n,r.httpResponse.headers=t,r.httpResponse.body=i.util.buffer.toBuffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var o=t.date||t.Date,s=r.request.service;if(o){var a=Date.parse(o);s.config.correctClockSkew&&s.isClockSkewed(a)&&s.applyClockOffset(a)}}),e("HTTP_DATA","httpData",function(e,t){if(e){if(i.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],n={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[n,t])}t.httpResponse.buffers.push(i.util.buffer.toBuffer(e))}}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=i.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers}),e("FINALIZE_ERROR","retry",function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))}),e("INVALIDATE_CREDENTIALS","retry",function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}}),e("EXPIRED_SIGNATURE","retry",function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)}),e("CLOCK_SKEWED","retry",function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)}),e("REDIRECT","retry",function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new i.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)}),e("RETRY_CHECK","retry",function(e){e.error&&(e.error.redirect&&e.redirectCount=0?(e.error=null,setTimeout(t,r)):t()})}),CorePost:(new o).addNamedListeners(function(e){e("EXTRACT_REQUEST_ID","extractData",i.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",i.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",function(e){if("NetworkingError"===e.code&&function(e){return"ENOTFOUND"===e.errno||"number"==typeof e.errno&&"function"==typeof i.util.getSystemErrorName&&["EAI_NONAME","EAI_NODATA"].indexOf(i.util.getSystemErrorName(e.errno)>=0)}(e)){var t="Inaccessible host: `"+e.hostname+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=i.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}})}),Logger:(new o).addNamedListeners(function(t){t("LOG_REQUEST","complete",function(t){function r(e,t){if(!t)return t;if(e.isSensitive)return"***SensitiveInformation***";switch(e.type){case"structure":var n={};return i.util.each(t,function(t,i){Object.prototype.hasOwnProperty.call(e.members,t)?n[t]=r(e.members[t],i):n[t]=i}),n;case"list":var o=[];return i.util.arrayEach(t,function(t,n){o.push(r(e.member,t))}),o;case"map":var s={};return i.util.each(t,function(t,n){s[t]=r(e.value,n)}),s;default:return t}}var n=t.request,o=n.service.config.logger;if(o){var s=function(){var s=t.request.service.getSkewCorrectedDate().getTime(),a=(s-n.startTime.getTime())/1e3,u=!!o.isTTY,c=t.httpResponse.statusCode,l=n.params;if(n.service.api.operations&&n.service.api.operations[n.operation]&&n.service.api.operations[n.operation].input){l=r(n.service.api.operations[n.operation].input,n.params)}var h=e("util").inspect(l,!0,null),p="";return u&&(p+=""),p+="[AWS "+n.service.serviceIdentifier+" "+c,p+=" "+a.toString()+"s "+t.retryCount+" retries]",u&&(p+=""),p+=" "+i.util.string.lowerFirst(n.operation),p+="("+h+")",u&&(p+=""),p}();"function"==typeof o.log?o.log(s):"function"==typeof o.write&&o.write(s+"\n")}})}),Json:(new o).addNamedListeners(function(t){var r=e("./protocol/json");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),Rest:(new o).addNamedListeners(function(t){var r=e("./protocol/rest");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),RestJson:(new o).addNamedListeners(function(t){var r=e("./protocol/rest_json");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),RestXml:(new o).addNamedListeners(function(t){var r=e("./protocol/rest_xml");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)}),Query:(new o).addNamedListeners(function(t){var r=e("./protocol/query");t("BUILD","build",r.buildRequest),t("EXTRACT_DATA","extractData",r.extractData),t("EXTRACT_ERROR","extractError",r.extractError)})}},{"./core":39,"./discover_endpoint":47,"./protocol/json":74,"./protocol/query":75,"./protocol/rest":76,"./protocol/rest_json":77,"./protocol/rest_xml":78,"./sequential_executor":88,util:20}],88:[function(e,t,r){var n=e("./core");n.SequentialExecutor=n.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t,r){return this._events[e]?r?this._events[e].unshift(t):this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t,r){return t._isAsync=!0,this.on(e,t,r)},removeListener:function(e,t){var r=this._events[e];if(r){for(var n=r.length,i=-1,o=0;o-1&&r.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),i=n.length;return this.callListeners(n,t,r),i>0},callListeners:function(e,t,r,i){function o(i){if(i&&(a=n.util.error(a||new Error,i),s._haltHandlersOnError))return r.call(s,a);s.callListeners(e,t,r,a)}for(var s=this,a=i||null;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(s,t.concat([o]));try{u.apply(s,t)}catch(e){a=n.util.error(a||new Error,e)}if(a&&s._haltHandlersOnError)return void r.call(s,a)}r.call(s,a)},addListeners:function(e){var t=this;return e._events&&(e=e._events),n.util.each(e,function(e,r){"function"==typeof r&&(r=[r]),n.util.arrayEach(r,function(r){t.on(e,r)})}),t},addNamedListener:function(e,t,r,n){return this[e]=r,this.addListener(t,r,n),this},addNamedAsyncListener:function(e,t,r,n){return r._isAsync=!0,this.addNamedListener(e,t,r,n)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,t.exports=n.SequentialExecutor},{"./core":39}],78:[function(e,t,r){function n(e){var t=e.service.api.operations[e.operation].input,r=new a.XML.Builder,n=e.params,i=t.payload;if(i){var o=t.members[i];if(void 0===(n=n[i]))return;if("structure"===o.type){var s=o.name;e.httpRequest.body=r.toXML(n,o,s,!0)}else e.httpRequest.body=n}else e.httpRequest.body=r.toXML(n,t,t.name||t.shape||u.string.upperFirst(e.operation)+"Request")}function i(e){c.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&n(e)}function o(e){c.extractError(e);var t;try{t=(new a.XML.Parser).parse(e.httpResponse.body.toString())}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=u.error(new Error,{code:t.Code,message:t.Message}):e.error=u.error(new Error,{code:e.httpResponse.statusCode,message:null})}function s(e){c.extractData(e);var t,r=e.request,n=e.httpResponse.body,i=r.service.api.operations[r.operation],o=i.output,s=(i.hasEventOutput,o.payload);if(s){var l=o.members[s];l.isEventStream?(t=new a.XML.Parser,e.data[s]=u.createEventStream(2===a.HttpClient.streamsApiVersion?e.httpResponse.stream:e.httpResponse.body,t,l)):"structure"===l.type?(t=new a.XML.Parser,e.data[s]=t.parse(n.toString(),l)):"binary"===l.type||l.isStreaming?e.data[s]=n:e.data[s]=l.toType(n)}else if(n.length>0){t=new a.XML.Parser;var h=t.parse(n.toString(),o);u.update(e.data,h)}}var a=e("../core"),u=e("../util"),c=e("./rest");t.exports={buildRequest:i,extractError:o,extractData:s}},{"../core":39,"../util":123,"./rest":76}],77:[function(e,t,r){function n(e){var t=new h,r=e.service.api.operations[e.operation].input;if(r.payload){var n={},o=r.members[r.payload];if(void 0===(n=e.params[r.payload]))return;"structure"===o.type?(e.httpRequest.body=t.build(n,o),i(e)):(e.httpRequest.body=n,("binary"===o.type||o.isStreaming)&&i(e,!0))}else{var s=t.build(e.params,r);"{}"===s&&"GET"===e.httpRequest.method||(e.httpRequest.body=s),i(e)}}function i(e,t){var r=e.service.api.operations[e.operation];r.input;if(!e.httpRequest.headers["Content-Type"]){var n=t?"binary/octet-stream":"application/json";e.httpRequest.headers["Content-Type"]=n}}function o(e){c.buildRequest(e),["HEAD","DELETE"].indexOf(e.httpRequest.method)<0&&n(e)}function s(e){l.extractError(e)}function a(e){c.extractData(e);var t,r=e.request,n=r.service.api.operations[r.operation],i=r.service.api.operations[r.operation].output||{};n.hasEventOutput;if(i.payload){var o=i.members[i.payload],s=e.httpResponse.body;if(o.isEventStream)t=new p,e.data[payload]=u.createEventStream(2===AWS.HttpClient.streamsApiVersion?e.httpResponse.stream:s,t,o);else if("structure"===o.type||"list"===o.type){var t=new p;e.data[i.payload]=t.parse(s,o)}else"binary"===o.type||o.isStreaming?e.data[i.payload]=s:e.data[i.payload]=o.toType(s)}else{var a=e.data;l.extractData(e),e.data=u.merge(a,e.data)}}var u=e("../util"),c=e("./rest"),l=e("./json"),h=e("../json/builder"),p=e("../json/parser");t.exports={buildRequest:o,extractError:s,extractData:a}},{"../json/builder":63,"../json/parser":64,"../util":123,"./json":74,"./rest":76}],76:[function(e,t,r){function n(e){e.httpRequest.method=e.service.api.operations[e.operation].httpMethod}function i(e,t,r,n){var i=[e,t].join("/");i=i.replace(/\/+/g,"/");var o={},s=!1;if(l.each(r.members,function(e,t){var r=n[e];if(null!==r&&void 0!==r)if("uri"===t.location){var a=new RegExp("\\{"+t.name+"(\\+)?\\}");i=i.replace(a,function(e,t){return(t?l.uriEscapePath:l.uriEscape)(String(r))})}else"querystring"===t.location&&(s=!0,"list"===t.type?o[t.name]=r.map(function(e){return l.uriEscape(t.member.toWireFormat(e).toString())}):"map"===t.type?l.each(r,function(e,t){Array.isArray(t)?o[e]=t.map(function(e){return l.uriEscape(String(e))}):o[e]=l.uriEscape(String(t))}):o[t.name]=l.uriEscape(t.toWireFormat(r).toString()))}),s){i+=i.indexOf("?")>=0?"&":"?";var a=[];l.arrayEach(Object.keys(o).sort(),function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&"function"==typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function p(){o.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseFloat(e)},this.toWireFormat=this.toType}function f(){o.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseInt(e,10)},this.toWireFormat=this.toType}function d(){o.apply(this,arguments),this.toType=function(e){var t=y.base64.decode(e);if(this.isSensitive&&y.isNode()&&"function"==typeof y.Buffer.alloc){var r=y.Buffer.alloc(t.length,t);t.fill(0),t=r}return t},this.toWireFormat=y.base64.encode}function m(){d.apply(this,arguments)}function v(){o.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null===e||void 0===e?null:"true"===e}}var g=e("./collection"),y=e("../util");o.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},o.types={structure:a,list:u,map:c,boolean:v,timestamp:l,float:p,integer:f,string:h,base64:m,binary:d},o.resolve=function(e,t){if(e.shape){var r=t.api.shapes[e.shape];if(!r)throw new Error("Cannot find shape reference: "+e.shape);return r}return null},o.create=function(e,t,r){if(e.isShape)return e;var n=o.resolve(e,t);if(n){var i=Object.keys(e);t.documentation||(i=i.filter(function(e){return!e.match(/documentation/)}));var s=function(){n.constructor.call(this,e,t,r)};return s.prototype=n,new s}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var a=e.type;if(o.normalizedTypes[e.type]&&(e.type=o.normalizedTypes[e.type]),o.types[e.type])return new o.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+a)},o.shapes={StructureShape:a,ListShape:u,MapShape:c,StringShape:h,BooleanShape:v,Base64Shape:m},t.exports=o},{"../util":123,"./collection":66}],66:[function(e,t,r){function n(e,t,r,n){o(this,n(e),function(){return r(e,t)})}function i(e,t,r,i,o){i=i||String;var s=this;for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n.call(s,a,e[a],r,i),o&&o(a,e[a]))}var o=e("../util").memoizedProperty;t.exports=i},{"../util":123}],74:[function(e,t,r){function n(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,i=r.jsonVersion||"1.0",o=r.operations[e.operation].input,s=new a;1===i&&(i="1.0"),t.body=s.build(e.params||{},o),t.headers["Content-Type"]="application/x-amz-json-"+i,t.headers["X-Amz-Target"]=n,c(e)}function i(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),r.body.length>0)try{var n=JSON.parse(r.body.toString()),i=n.__type||n.code||n.Code;i&&(t.code=i.split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=n.message||n.Message||null}catch(n){t.statusCode=r.statusCode,t.message=r.statusMessage}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=s.error(new Error,t)}function o(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation],n=r.output||{},i=new u;e.data=i.parse(t,n)}}var s=e("../util"),a=e("../json/builder"),u=e("../json/parser"),c=e("./helpers").populateHostPrefix;t.exports={buildRequest:n,extractError:i,extractData:o}},{"../json/builder":63,"../json/parser":64,"../util":123,"./helpers":73}],73:[function(e,t,r){function n(e){if(!e.service.config.hostPrefixEnabled)return e;var t=e.service.api.operations[e.operation];if(i(e))return e;if(t.endpoint&&t.endpoint.hostPrefix){var r=t.endpoint.hostPrefix,n=o(r,e.params,t.input);s(e.httpRequest.endpoint,n),a(e.httpRequest.endpoint.hostname)}return e}function i(e){var t=e.service.api,r=t.operations[e.operation],n=t.endpointOperation&&t.endpointOperation===u.string.lowerFirst(r.name);return"NULL"!==r.endpointDiscoveryRequired||!0===n}function o(e,t,r){return u.each(r.members,function(r,n){if(!0===n.hostLabel){if("string"!=typeof t[r]||""===t[r])throw u.error(new Error,{message:"Parameter "+r+" should be a non-empty string.",code:"InvalidParameter"});var i=new RegExp("\\{"+r+"\\}","g");e=e.replace(i,t[r])}}),e}function s(e,t){e.host&&(e.host=t+e.host),e.hostname&&(e.hostname=t+e.hostname)}function a(e){var t=e.split("."),r=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/;u.arrayEach(t,function(e){if(!e.length||e.length<1||e.length>63)throw u.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!r.test(e))throw c.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})})}var u=e("../util"),c=e("../core");t.exports={populateHostPrefix:n}},{"../core":39,"../util":123}],64:[function(e,t,r){function n(){}function i(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return o(e,t);case"map":return a(e,t);case"list":return s(e,t);default:return u(e,t)}}function o(e,t){if(null!=e){var r={},n=t.members;return c.each(n,function(t,n){var o=n.isLocationName?n.name:t;if(Object.prototype.hasOwnProperty.call(e,o)){var s=e[o],a=i(s,n);void 0!==a&&(r[t]=a)}}),r}}function s(e,t){if(null!=e){var r=[];return c.arrayEach(e,function(e){var n=i(e,t.member);void 0===n?r.push(null):r.push(n)}),r}}function a(e,t){if(null!=e){var r={};return c.each(e,function(e,n){var o=i(n,t.value);r[e]=void 0===o?null:o}),r}}function u(e,t){return t.toType(e)}var c=e("../util");n.prototype.parse=function(e,t){return i(JSON.parse(e),t)},t.exports=n},{"../util":123}],63:[function(e,t,r){function n(){}function i(e,t){if(t&&void 0!==e&&null!==e)switch(t.type){case"structure":return o(e,t);case"map":return a(e,t);case"list":return s(e,t);default:return u(e,t)}}function o(e,t){var r={};return c.each(e,function(e,n){var o=t.members[e];if(o){if("body"!==o.location)return;var s=o.isLocationName?o.name:e,a=i(n,o);void 0!==a&&(r[s]=a)}}),r}function s(e,t){var r=[];return c.arrayEach(e,function(e){var n=i(e,t.member);void 0!==n&&r.push(n)}),r}function a(e,t){var r={};return c.each(e,function(e,n){var o=i(n,t.value);void 0!==o&&(r[e]=o)}),r}function u(e,t){return t.toWireFormat(e)}var c=e("../util");n.prototype.build=function(e,t){return JSON.stringify(i(e,t))},t.exports=n},{"../util":123}],47:[function(e,t,r){(function(r){(function(){function n(e){var t=e.service,r=t.api||{},n={};return t.config.region&&(n.region=t.config.region),r.serviceId&&(n.serviceId=r.serviceId),t.config.credentials.accessKeyId&&(n.accessKeyId=t.config.credentials.accessKeyId),n}function i(e,t,r){r&&void 0!==t&&null!==t&&"structure"===r.type&&r.required&&r.required.length>0&&m.arrayEach(r.required,function(n){var o=r.members[n];if(!0===o.endpointDiscoveryId){var s=o.isLocationName?o.name:n;e[s]=String(t[n])}else i(e,t[n],o)})}function o(e,t){var r={};return i(r,e.params,t),r}function s(e){var t=e.service,r=t.api,i=r.operations?r.operations[e.operation]:void 0,s=i?i.input:void 0,a=o(e,s),c=n(e);Object.keys(a).length>0&&(c=m.update(c,a),i&&(c.operation=i.name));var l=d.endpointCache.get(c);if(!l||1!==l.length||""!==l[0].Address)if(l&&l.length>0)e.httpRequest.updateEndpoint(l[0].Address);else{var h=t.makeRequest(r.endpointOperation,{Operation:i.name,Identifiers:a});u(h),h.removeListener("validate",d.EventListeners.Core.VALIDATE_PARAMETERS),h.removeListener("retry",d.EventListeners.Core.RETRY_CHECK),d.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}]), +h.send(function(e,t){t&&t.Endpoints?d.endpointCache.put(c,t.Endpoints):e&&d.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}])})}}function a(e,t){var r=e.service,i=r.api,s=i.operations?i.operations[e.operation]:void 0,a=s?s.input:void 0,c=o(e,a),l=n(e);Object.keys(c).length>0&&(l=m.update(l,c),s&&(l.operation=s.name));var h=d.EndpointCache.getKeyString(l),p=d.endpointCache.get(h);if(p&&1===p.length&&""===p[0].Address)return g[h]||(g[h]=[]),void g[h].push({request:e,callback:t});if(p&&p.length>0)e.httpRequest.updateEndpoint(p[0].Address),t();else{var f=r.makeRequest(i.endpointOperation,{Operation:s.name,Identifiers:c});f.removeListener("validate",d.EventListeners.Core.VALIDATE_PARAMETERS),u(f),d.endpointCache.put(h,[{Address:"",CachePeriodInMinutes:60}]),f.send(function(r,n){if(r){if(e.response.error=m.error(r,{retryable:!1}),d.endpointCache.remove(l),g[h]){var i=g[h];m.arrayEach(i,function(e){e.request.response.error=m.error(r,{retryable:!1}),e.callback()}),delete g[h]}}else if(n&&(d.endpointCache.put(h,n.Endpoints),e.httpRequest.updateEndpoint(n.Endpoints[0].Address),g[h])){var i=g[h];m.arrayEach(i,function(e){e.request.httpRequest.updateEndpoint(n.Endpoints[0].Address),e.callback()}),delete g[h]}t()})}}function u(e){var t=e.service.api,r=t.apiVersion;r&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=r)}function c(e){var t=e.error,r=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===r.statusCode)){var i=e.request,s=i.service.api.operations||{},a=s[i.operation]?s[i.operation].input:void 0,u=o(i,a),c=n(i);Object.keys(u).length>0&&(c=m.update(c,u),s[i.operation]&&(c.operation=s[i.operation].name)),d.endpointCache.remove(c)}}function l(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw m.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=d.config[e.serviceIdentifier]||{};return Boolean(d.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}function h(e){return["false","0"].indexOf(e)>=0}function p(e){var t=e.service||{};if(void 0!==t.config.endpointDiscoveryEnabled)return t.config.endpointDiscoveryEnabled;if(!m.isBrowser()){for(var n=0;n=e.length)return t.push(null);var i=r+n;i>e.length&&(i=e.length),t.push(e.slice(r,i)),r=i},t},concat:function(e){var t,r=0,n=0,i=null;for(t=0;t>>8^t[255&(r^e.readUInt8(n))]}return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"==typeof t&&(t=o.buffer.toBuffer(t)),o.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return o.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return o.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var i=o.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=o.buffer.toBuffer(t));var s=o.arraySliceFn(t),a=o.Buffer.isBuffer(t);if(o.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!a)t.on("data",function(e){i.update(e)}),t.on("error",function(e){n(e)}),t.on("end",function(){n(null,i.digest(r))});else{if(!n||!s||a||"undefined"==typeof FileReader){o.isBrowser()&&"object"==typeof t&&!a&&(t=new o.Buffer(new Uint8Array(t)));var u=i.update(t).digest(r);return n&&n(null,u),u}var c=0,l=new FileReader;l.onerror=function(){n(new Error("Failed to read data."))},l.onload=function(){var e=new o.Buffer(new Uint8Array(l.result));i.update(e),c+=e.length,l._continueReading()},l._continueReading=function(){if(c>=t.size)return void n(null,i.digest(r));var e=c+524288;e>t.size&&(e=t.size),l.readAsArrayBuffer(s.call(t,c,e))},l._continueReading()}},toHex:function(e){for(var t=[],r=0;r=3e5,!1),i.config.isClockSkewed},applyClockOffset:function(e){e&&(i.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&i&&i.config&&(t=i.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var n=0;n=0)return a++,void setTimeout(c,i+(e.retryAfter||0))}r(e)},c=function(){var t="";n.handleRequest(e,s,function(e){e.on("data",function(e){t+=e.toString()}),e.on("end",function(){var n=e.statusCode;if(n<300)r(null,t);else{var i=1e3*parseInt(e.headers["retry-after"],10)||0,s=o.error(new Error,{statusCode:n,retryable:n>=500||429===n});i&&s.retryable&&(s.retryAfter=i),u(s)}})},u)};i.util.defer(c)},uuid:{v4:function(){return e("uuid").v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"==typeof r&&"function"==typeof r.nextTick?r.nextTick(e):"function"==typeof n?n(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var r=(t||{})[e.operation];if(r&&r.input&&r.input.payload)return r.input.members[r.input.payload]}},getProfilesFromSharedConfig:function(e,t){function n(e,t){for(var r=0,n=Object.keys(t);r=6},parse:function(e){var t=e.split(":");return{partition:t[1],service:t[2],region:t[3],accountId:t[4],resource:t.slice(5).join(":")}},build:function(e){if(void 0===e.service||void 0===e.region||void 0===e.accountId||void 0===e.resource)throw o.error(new Error("Input ARN object is invalid"));return"arn:"+(e.partition||"aws")+":"+e.service+":"+e.region+":"+e.accountId+":"+e.resource}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};t.exports=o}).call(this)}).call(this,e("_process"),e("timers").setImmediate)},{"../apis/metadata.json":26,"./core":39,_process:8,fs:2,timers:16,uuid:21}],37:[function(e,t,r){var n=e("./core");e("./credentials"),e("./credentials/credential_provider_chain");var i;n.Config=n.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),n.util.each.call(this,this.keys,function(t,r){this.set(t,e[t],r)})},getCredentials:function(e){function t(t){e(t,t?null:i.credentials)}function r(e,t){return new n.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}var i=this;i.credentials?"function"==typeof i.credentials.get?function(){i.credentials.get(function(e){e&&(e=r("Could not load credentials from "+i.credentials.constructor.name,e)),t(e)})}():function(){var e=null;i.credentials.accessKeyId&&i.credentials.secretAccessKey||(e=r("Missing credentials")),t(e)}():i.credentialProvider?i.credentialProvider.resolve(function(e,n){e&&(e=r("Could not load credentials from any providers",e)),i.credentials=n,t(e)}):t(r("No credentials to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),n.util.each.call(this,e,function(e,r){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||n.Service.hasService(e))&&this.set(e,r)})},loadFromPath:function(e){this.clear();var t=JSON.parse(n.util.readFileSync(e)),r=new n.FileSystemCredentials(e),i=new n.CredentialProviderChain;return i.providers.unshift(r),i.resolve(function(e,r){if(e)throw e;t.credentials=r}),this.constructor(t),this},clear:function(){n.util.each.call(this,this.keys,function(e){delete this[e]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,r){void 0===t?(void 0===r&&(r=this.keys[e]),this[e]="function"==typeof r?r.call(this):r):"httpOptions"===e&&this[e]?this[e]=n.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,s3UsEast1RegionalEndpoint:"legacy",s3UseArnRegion:void 0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:void 0,endpointCacheSize:1e3,hostPrefixEnabled:!0,stsRegionalEndpoints:"legacy"},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&(e=n.util.copy(e),e.credentials=new n.Credentials(e)),e},setPromisesDependency:function(e){i=e,null===e&&"function"==typeof Promise&&(i=Promise);var t=[n.Request,n.Credentials,n.CredentialProviderChain];n.S3&&(t.push(n.S3),n.S3.ManagedUpload&&t.push(n.S3.ManagedUpload)),n.util.addPromises(t,i)},getPromisesDependency:function(){return i}}),n.config=new n.Config},{"./core":39,"./credentials":40,"./credentials/credential_provider_chain":43}],43:[function(e,t,r){var n=e("../core");n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){this.providers=e||n.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){function t(e,s){if(!e&&s||i===o.length)return n.util.arrayEach(r.resolveCallbacks,function(t){t(e,s)}),void(r.resolveCallbacks.length=0);var a=o[i++];s="function"==typeof a?a.call():a,s.get?s.get(function(e){t(e,e?null:s)}):t(null,s)}var r=this;if(0===r.providers.length)return e(new Error("No providers")),r;if(1===r.resolveCallbacks.push(e)){var i=0,o=r.providers.slice(0);t()}return r}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},{"../core":39}],40:[function(e,t,r){var n=e("./core");n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],1===arguments.length&&"object"==typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=n.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||(this.expired||!this.accessKeyId||!this.secretAccessKey)},get:function(e){var t=this;this.needsRefresh()?this.refresh(function(r){r||(t.expired=!1),e&&e(r)}):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var r=this;1===r.refreshCallbacks.push(e)&&r.load(function(e){n.util.arrayEach(r.refreshCallbacks,function(r){t?r(e):n.util.defer(function(){r(e)})}),r.refreshCallbacks.length=0})},load:function(e){e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},{"./core":39}],27:[function(e,t,r){function n(e,t){if(!n.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return n.services[e][t]}n.services={},t.exports=n},{}],26:[function(e,t,r){t.exports={acm:{name:"ACM",cors:!0},apigateway:{name:"APIGateway",cors:!0},applicationautoscaling:{prefix:"application-autoscaling",name:"ApplicationAutoScaling",cors:!0},appstream:{name:"AppStream"},autoscaling:{name:"AutoScaling",cors:!0},batch:{name:"Batch"},budgets:{name:"Budgets"},clouddirectory:{name:"CloudDirectory",versions:["2016-05-10*"]},cloudformation:{name:"CloudFormation",cors:!0},cloudfront:{name:"CloudFront",versions:["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*","2016-09-07*","2016-09-29*","2016-11-25*","2017-03-25*","2017-10-30*","2018-06-18*","2018-11-05*","2019-03-26*"],cors:!0},cloudhsm:{name:"CloudHSM",cors:!0},cloudsearch:{name:"CloudSearch"},cloudsearchdomain:{name:"CloudSearchDomain"},cloudtrail:{name:"CloudTrail",cors:!0},cloudwatch:{prefix:"monitoring",name:"CloudWatch",cors:!0},cloudwatchevents:{prefix:"events",name:"CloudWatchEvents",versions:["2014-02-03*"],cors:!0},cloudwatchlogs:{prefix:"logs",name:"CloudWatchLogs",cors:!0},codebuild:{name:"CodeBuild",cors:!0},codecommit:{name:"CodeCommit",cors:!0},codedeploy:{name:"CodeDeploy",cors:!0},codepipeline:{name:"CodePipeline",cors:!0},cognitoidentity:{prefix:"cognito-identity",name:"CognitoIdentity",cors:!0},cognitoidentityserviceprovider:{prefix:"cognito-idp",name:"CognitoIdentityServiceProvider",cors:!0},cognitosync:{prefix:"cognito-sync",name:"CognitoSync",cors:!0},configservice:{prefix:"config",name:"ConfigService",cors:!0},cur:{name:"CUR",cors:!0},datapipeline:{name:"DataPipeline"},devicefarm:{name:"DeviceFarm",cors:!0},directconnect:{name:"DirectConnect",cors:!0},directoryservice:{prefix:"ds",name:"DirectoryService"},discovery:{name:"Discovery"},dms:{name:"DMS"},dynamodb:{name:"DynamoDB",cors:!0},dynamodbstreams:{prefix:"streams.dynamodb",name:"DynamoDBStreams",cors:!0},ec2:{name:"EC2",versions:["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*","2016-04-01*","2016-09-15*"],cors:!0},ecr:{name:"ECR",cors:!0},ecs:{name:"ECS",cors:!0},efs:{prefix:"elasticfilesystem",name:"EFS",cors:!0},elasticache:{name:"ElastiCache",versions:["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],cors:!0},elasticbeanstalk:{name:"ElasticBeanstalk",cors:!0},elb:{prefix:"elasticloadbalancing",name:"ELB",cors:!0},elbv2:{prefix:"elasticloadbalancingv2",name:"ELBv2",cors:!0},emr:{prefix:"elasticmapreduce",name:"EMR",cors:!0},es:{name:"ES"},elastictranscoder:{name:"ElasticTranscoder",cors:!0},firehose:{name:"Firehose",cors:!0},gamelift:{name:"GameLift",cors:!0},glacier:{name:"Glacier"},health:{name:"Health"},iam:{name:"IAM",cors:!0},importexport:{name:"ImportExport"},inspector:{name:"Inspector",versions:["2015-08-18*"],cors:!0},iot:{name:"Iot",cors:!0},iotdata:{prefix:"iot-data",name:"IotData",cors:!0},kinesis:{name:"Kinesis",cors:!0},kinesisanalytics:{name:"KinesisAnalytics"},kms:{name:"KMS",cors:!0},lambda:{name:"Lambda",cors:!0},lexruntime:{prefix:"runtime.lex",name:"LexRuntime",cors:!0},lightsail:{name:"Lightsail"},machinelearning:{name:"MachineLearning",cors:!0},marketplacecommerceanalytics:{name:"MarketplaceCommerceAnalytics",cors:!0},marketplacemetering:{prefix:"meteringmarketplace",name:"MarketplaceMetering"},mturk:{prefix:"mturk-requester",name:"MTurk",cors:!0},mobileanalytics:{name:"MobileAnalytics",cors:!0},opsworks:{name:"OpsWorks",cors:!0},opsworkscm:{name:"OpsWorksCM"},organizations:{name:"Organizations"},pinpoint:{name:"Pinpoint"},polly:{name:"Polly",cors:!0},rds:{name:"RDS",versions:["2014-09-01*"],cors:!0},redshift:{name:"Redshift",cors:!0},rekognition:{name:"Rekognition",cors:!0},resourcegroupstaggingapi:{name:"ResourceGroupsTaggingAPI"},route53:{name:"Route53",cors:!0},route53domains:{name:"Route53Domains",cors:!0},s3:{name:"S3",dualstackAvailable:!0,cors:!0},s3control:{name:"S3Control",dualstackAvailable:!0,xmlNoDefaultLists:!0},servicecatalog:{name:"ServiceCatalog",cors:!0},ses:{prefix:"email",name:"SES",cors:!0},shield:{name:"Shield"},simpledb:{prefix:"sdb",name:"SimpleDB"},sms:{name:"SMS"},snowball:{name:"Snowball"},sns:{name:"SNS",cors:!0},sqs:{name:"SQS",cors:!0},ssm:{name:"SSM",cors:!0},storagegateway:{name:"StorageGateway",cors:!0},stepfunctions:{prefix:"states",name:"StepFunctions"},sts:{name:"STS",cors:!0},support:{name:"Support"},swf:{name:"SWF"},xray:{name:"XRay",cors:!0},waf:{name:"WAF",cors:!0},wafregional:{prefix:"waf-regional",name:"WAFRegional"},workdocs:{name:"WorkDocs",cors:!0},workspaces:{name:"WorkSpaces"},codestar:{name:"CodeStar"},lexmodelbuildingservice:{prefix:"lex-models",name:"LexModelBuildingService",cors:!0},marketplaceentitlementservice:{prefix:"entitlement.marketplace",name:"MarketplaceEntitlementService"},athena:{name:"Athena"},greengrass:{name:"Greengrass"},dax:{name:"DAX"},migrationhub:{prefix:"AWSMigrationHub",name:"MigrationHub"},cloudhsmv2:{name:"CloudHSMV2"},glue:{name:"Glue"},mobile:{name:"Mobile"},pricing:{name:"Pricing",cors:!0},costexplorer:{prefix:"ce",name:"CostExplorer",cors:!0},mediaconvert:{name:"MediaConvert"},medialive:{name:"MediaLive"},mediapackage:{name:"MediaPackage"},mediastore:{name:"MediaStore"},mediastoredata:{prefix:"mediastore-data",name:"MediaStoreData",cors:!0},appsync:{name:"AppSync"},guardduty:{name:"GuardDuty"},mq:{name:"MQ"},comprehend:{name:"Comprehend",cors:!0},iotjobsdataplane:{prefix:"iot-jobs-data",name:"IoTJobsDataPlane"},kinesisvideoarchivedmedia:{prefix:"kinesis-video-archived-media",name:"KinesisVideoArchivedMedia",cors:!0},kinesisvideomedia:{prefix:"kinesis-video-media",name:"KinesisVideoMedia",cors:!0},kinesisvideo:{name:"KinesisVideo",cors:!0},sagemakerruntime:{prefix:"runtime.sagemaker",name:"SageMakerRuntime"},sagemaker:{name:"SageMaker"},translate:{name:"Translate",cors:!0},resourcegroups:{prefix:"resource-groups",name:"ResourceGroups",cors:!0},alexaforbusiness:{name:"AlexaForBusiness"},cloud9:{name:"Cloud9"},serverlessapplicationrepository:{prefix:"serverlessrepo",name:"ServerlessApplicationRepository"},servicediscovery:{name:"ServiceDiscovery"},workmail:{name:"WorkMail"},autoscalingplans:{prefix:"autoscaling-plans",name:"AutoScalingPlans"},transcribeservice:{prefix:"transcribe",name:"TranscribeService"},connect:{name:"Connect",cors:!0},acmpca:{prefix:"acm-pca",name:"ACMPCA"},fms:{name:"FMS"},secretsmanager:{name:"SecretsManager",cors:!0},iotanalytics:{name:"IoTAnalytics",cors:!0},iot1clickdevicesservice:{prefix:"iot1click-devices",name:"IoT1ClickDevicesService" +},iot1clickprojects:{prefix:"iot1click-projects",name:"IoT1ClickProjects"},pi:{name:"PI"},neptune:{name:"Neptune"},mediatailor:{name:"MediaTailor"},eks:{name:"EKS"},macie:{name:"Macie"},dlm:{name:"DLM"},signer:{name:"Signer"},chime:{name:"Chime"},pinpointemail:{prefix:"pinpoint-email",name:"PinpointEmail"},ram:{name:"RAM"},route53resolver:{name:"Route53Resolver"},pinpointsmsvoice:{prefix:"sms-voice",name:"PinpointSMSVoice"},quicksight:{name:"QuickSight"},rdsdataservice:{prefix:"rds-data",name:"RDSDataService"},amplify:{name:"Amplify"},datasync:{name:"DataSync"},robomaker:{name:"RoboMaker"},transfer:{name:"Transfer"},globalaccelerator:{name:"GlobalAccelerator"},comprehendmedical:{name:"ComprehendMedical",cors:!0},kinesisanalyticsv2:{name:"KinesisAnalyticsV2"},mediaconnect:{name:"MediaConnect"},fsx:{name:"FSx"},securityhub:{name:"SecurityHub"},appmesh:{name:"AppMesh",versions:["2018-10-01*"]},licensemanager:{prefix:"license-manager",name:"LicenseManager"},kafka:{name:"Kafka"},apigatewaymanagementapi:{name:"ApiGatewayManagementApi"},apigatewayv2:{name:"ApiGatewayV2"},docdb:{name:"DocDB"},backup:{name:"Backup"},worklink:{name:"WorkLink"},textract:{name:"Textract"},managedblockchain:{name:"ManagedBlockchain"},mediapackagevod:{prefix:"mediapackage-vod",name:"MediaPackageVod"},groundstation:{name:"GroundStation"},iotthingsgraph:{name:"IoTThingsGraph"},iotevents:{name:"IoTEvents"},ioteventsdata:{prefix:"iotevents-data",name:"IoTEventsData"},personalize:{name:"Personalize",cors:!0},personalizeevents:{prefix:"personalize-events",name:"PersonalizeEvents",cors:!0},personalizeruntime:{prefix:"personalize-runtime",name:"PersonalizeRuntime",cors:!0},applicationinsights:{prefix:"application-insights",name:"ApplicationInsights"},servicequotas:{prefix:"service-quotas",name:"ServiceQuotas"},ec2instanceconnect:{prefix:"ec2-instance-connect",name:"EC2InstanceConnect"},eventbridge:{name:"EventBridge"},lakeformation:{name:"LakeFormation"},forecastservice:{prefix:"forecast",name:"ForecastService",cors:!0},forecastqueryservice:{prefix:"forecastquery",name:"ForecastQueryService",cors:!0},qldb:{name:"QLDB"},qldbsession:{prefix:"qldb-session",name:"QLDBSession"},workmailmessageflow:{name:"WorkMailMessageFlow"},codestarnotifications:{prefix:"codestar-notifications",name:"CodeStarNotifications"},savingsplans:{name:"SavingsPlans"},sso:{name:"SSO"},ssooidc:{prefix:"sso-oidc",name:"SSOOIDC"},marketplacecatalog:{prefix:"marketplace-catalog",name:"MarketplaceCatalog"},dataexchange:{name:"DataExchange"},sesv2:{name:"SESV2"},migrationhubconfig:{prefix:"migrationhub-config",name:"MigrationHubConfig"},connectparticipant:{name:"ConnectParticipant"},appconfig:{name:"AppConfig"},iotsecuretunneling:{name:"IoTSecureTunneling"},wafv2:{name:"WAFV2"},elasticinference:{prefix:"elastic-inference",name:"ElasticInference"},imagebuilder:{name:"Imagebuilder"},schemas:{name:"Schemas"},accessanalyzer:{name:"AccessAnalyzer"},codegurureviewer:{prefix:"codeguru-reviewer",name:"CodeGuruReviewer"},codeguruprofiler:{name:"CodeGuruProfiler"},computeoptimizer:{prefix:"compute-optimizer",name:"ComputeOptimizer"},frauddetector:{name:"FraudDetector"},kendra:{name:"Kendra"},networkmanager:{name:"NetworkManager"},outposts:{name:"Outposts"},augmentedairuntime:{prefix:"sagemaker-a2i-runtime",name:"AugmentedAIRuntime"},ebs:{name:"EBS"},kinesisvideosignalingchannels:{prefix:"kinesis-video-signaling",name:"KinesisVideoSignalingChannels",cors:!0},detective:{name:"Detective"},codestarconnections:{prefix:"codestar-connections",name:"CodeStarconnections"},synthetics:{name:"Synthetics"},iotsitewise:{name:"IoTSiteWise"},macie2:{name:"Macie2"},codeartifact:{name:"CodeArtifact"},honeycode:{name:"Honeycode"},ivs:{name:"IVS"},braket:{name:"Braket"},identitystore:{name:"IdentityStore"},appflow:{name:"Appflow"},redshiftdata:{prefix:"redshift-data",name:"RedshiftData"},ssoadmin:{prefix:"sso-admin",name:"SSOAdmin"},timestreamquery:{prefix:"timestream-query",name:"TimestreamQuery"},timestreamwrite:{prefix:"timestream-write",name:"TimestreamWrite"},s3outposts:{name:"S3Outposts"},databrew:{name:"DataBrew"},servicecatalogappregistry:{prefix:"servicecatalog-appregistry",name:"ServiceCatalogAppRegistry"},networkfirewall:{prefix:"network-firewall",name:"NetworkFirewall"},mwaa:{name:"MWAA"},amplifybackend:{name:"AmplifyBackend"},appintegrations:{name:"AppIntegrations"},connectcontactlens:{prefix:"connect-contact-lens",name:"ConnectContactLens"},devopsguru:{prefix:"devops-guru",name:"DevOpsGuru"},ecrpublic:{prefix:"ecr-public",name:"ECRPUBLIC"},lookoutvision:{name:"LookoutVision"},sagemakerfeaturestoreruntime:{prefix:"sagemaker-featurestore-runtime",name:"SageMakerFeatureStoreRuntime"},customerprofiles:{prefix:"customer-profiles",name:"CustomerProfiles"},auditmanager:{name:"AuditManager"},emrcontainers:{prefix:"emr-containers",name:"EMRcontainers"},healthlake:{name:"HealthLake"},sagemakeredge:{prefix:"sagemaker-edge",name:"SagemakerEdge"},amp:{name:"Amp"},greengrassv2:{name:"GreengrassV2"},iotdeviceadvisor:{name:"IotDeviceAdvisor"},iotfleethub:{name:"IoTFleetHub"},iotwireless:{name:"IoTWireless"},location:{name:"Location"},wellarchitected:{name:"WellArchitected"},lexmodelsv2:{prefix:"models.lex.v2",name:"LexModelsV2"},lexruntimev2:{prefix:"runtime.lex.v2",name:"LexRuntimeV2",cors:!0},fis:{name:"Fis"},lookoutmetrics:{name:"LookoutMetrics"},mgn:{name:"Mgn"},lookoutequipment:{name:"LookoutEquipment"}}},{}],21:[function(e,t,r){var n=e("./v1"),i=e("./v4"),o=i;o.v1=n,o.v4=i,t.exports=o},{"./v1":24,"./v4":25}],25:[function(e,t,r){function n(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[n+a]=s[a];return t||o(s)}var i=e("./lib/rng"),o=e("./lib/bytesToUuid");t.exports=n},{"./lib/bytesToUuid":22,"./lib/rng":23}],24:[function(e,t,r){function n(e,t,r){var n=t&&r||0,l=t||[];e=e||{};var h=e.node||i,p=void 0!==e.clockseq?e.clockseq:o;if(null==h||null==p){var f=s();null==h&&(h=i=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=o=16383&(f[6]<<8|f[7]))}var d=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,v=d-u+(m-c)/1e4;if(v<0&&void 0===e.clockseq&&(p=p+1&16383),(v<0||d>u)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=m,o=p,d+=122192928e5;var g=(1e4*(268435455&d)+m)%4294967296;l[n++]=g>>>24&255,l[n++]=g>>>16&255,l[n++]=g>>>8&255,l[n++]=255&g;var y=d/4294967296*1e4&268435455;l[n++]=y>>>8&255,l[n++]=255&y,l[n++]=y>>>24&15|16,l[n++]=y>>>16&255,l[n++]=p>>>8|128,l[n++]=255&p;for(var b=0;b<6;++b)l[n+b]=h[b];return t||a(l)}var i,o,s=e("./lib/rng"),a=e("./lib/bytesToUuid"),u=0,c=0;t.exports=n},{"./lib/bytesToUuid":22,"./lib/rng":23}],23:[function(e,t,r){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var i=new Uint8Array(16);t.exports=function(){return n(i),i}}else{var o=new Array(16);t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},{}],22:[function(e,t,r){function n(e,t){var r=t||0,n=i;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")}for(var i=[],o=0;o<256;++o)i[o]=(o+256).toString(16).substr(1);t.exports=n},{}],20:[function(e,t,r){(function(t,n){(function(){function i(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=u(e,i,n)),i}var o=c(e,t);if(o)return o;var s=Object.keys(t),m=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),x(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(t);if(0===s.length){if(A(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(x(t))return l(t)}var g="",y=!1,w=["{","}"];if(d(t)&&(y=!0,w=["[","]"]),A(t)){g=" [Function"+(t.name?": "+t.name:"")+"]"}if(_(t)&&(g=" "+RegExp.prototype.toString.call(t)),C(t)&&(g=" "+Date.prototype.toUTCString.call(t)),x(t)&&(g=" "+l(t)),0===s.length&&(!y||0==t.length))return w[0]+g+w[1];if(n<0)return _(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=y?h(e,t,n,m,s):s.map(function(r){return p(e,t,n,m,r,y)}),e.seen.pop(),f(E,g,w)}function c(e,t){if(E(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i){for(var o=[],s=0,a=t.length;s-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),E(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function f(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function g(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function E(e){return void 0===e}function _(e){return S(e)&&"[object RegExp]"===T(e)}function S(e){return"object"==typeof e&&null!==e}function C(e){return S(e)&&"[object Date]"===T(e)}function x(e){return S(e)&&("[object Error]"===T(e)||e instanceof Error)}function A(e){return"function"==typeof e}function R(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function T(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}function I(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),N[e.getMonth()],t].join(" ")}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],r=0;r=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),a=n[r];r=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=c++,n=!(arguments.length<2)&&a.call(arguments,1);return u[t]=!0,o(function(){u[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof n?n:function(e){delete u[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":8,timers:16}],8:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(h===setTimeout)return setTimeout(e,0);if((h===n||!h)&&setTimeout)return h=setTimeout,setTimeout(e,0);try{return h(e,0)}catch(t){try{return h.call(null,e,0)}catch(t){return h.call(this,e,0)}}}function s(e){if(p===clearTimeout)return clearTimeout(e);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){v&&d&&(v=!1,d.length?m=d.concat(m):g=-1,m.length&&u())}function u(){if(!v){var e=o(a);v=!0;for(var t=m.length;t;){for(d=m,m=[];++g1)for(var r=1;r="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e}function a(e){return e>="0"&&e<="9"||"-"===e}function u(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e}function c(){}function l(){}function h(e){this.runtime=e}function p(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[g]}]},avg:{_func:this._functionAvg,_signature:[{types:[S]}]},ceil:{_func:this._functionCeil,_signature:[{types:[g]}]},contains:{_func:this._functionContains,_signature:[{types:[b,w]},{types:[y]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[b]},{types:[b]}]},floor:{_func:this._functionFloor,_signature:[{types:[g]}]},length:{_func:this._functionLength,_signature:[{types:[b,w,E]}]},map:{_func:this._functionMap,_signature:[{types:[_]},{types:[w]}]},max:{_func:this._functionMax,_signature:[{types:[S,C]}]},merge:{_func:this._functionMerge,_signature:[{types:[E],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[w]},{types:[_]}]},sum:{_func:this._functionSum,_signature:[{types:[S]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[b]},{types:[b]}]},min:{_func:this._functionMin,_signature:[{types:[S,C]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[w]},{types:[_]}]},type:{_func:this._functionType,_signature:[{types:[y]}]},keys:{_func:this._functionKeys,_signature:[{types:[E]}]},values:{_func:this._functionValues,_signature:[{types:[E]}]},sort:{_func:this._functionSort,_signature:[{types:[C,S]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[w]},{types:[_]}]},join:{_func:this._functionJoin,_signature:[{types:[b]},{types:[C]}]},reverse:{_func:this._functionReverse,_signature:[{types:[b,w]}]},to_array:{_func:this._functionToArray,_signature:[{types:[y]}]},to_string:{_func:this._functionToString,_signature:[{types:[y]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[y]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[y],variadic:!0}]}}}function f(e){return(new l).parse(e)}function d(e){return(new c).tokenize(e)}function m(e,t){var r=new l,n=new p,i=new h(n);n._interpreter=i;var o=r.parse(t);return i.search(o,e)}var v;v="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var g=0,y=1,b=2,w=3,E=4,_=6,S=8,C=9,x={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},A={"<":!0,">":!0,"=":!0,"!":!0},R={" ":!0,"\t":!0,"\n":!0};c.prototype={tokenize:function(e){var t=[];this._current=0;for(var r,n,i;this._current"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(r.indexOf(e)>=0)return!0;if(!(n.indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var T={};T.EOF=0,T.UnquotedIdentifier=0,T.QuotedIdentifier=0,T.Rbracket=0,T.Rparen=0,T.Comma=0,T.Rbrace=0,T.Number=0,T.Current=0,T.Expref=0,T.Pipe=1,T.Or=2,T.And=3,T.EQ=5,T.GT=5,T.LT=5,T.GTE=5,T.LTE=5,T.NE=5,T.Flatten=9,T.Star=20,T.Filter=21,T.Dot=40,T.Not=45,T.Lbrace=50,T.Lbracket=55,T.Lparen=60,l.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=new c,r=t.tokenize(e);r.push({type:"EOF",value:"",start:e.length}),this.tokens=r},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(T[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n,i=[],o=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),r=this.expression(0),n={type:"KeyValuePair",name:t,value:r},i.push(n),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:i}}},h.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,s){var a,u,c,l,h,p,f,d,m;switch(e.type){case"Field":return null===s?null:r(s)?(p=s[e.name],void 0===p?null:p):null;case"Subexpression":for(c=this.visit(e.children[0],s),m=1;m0)for(m=b;mw;m+=E)c.push(s[m]);return c;case"Projection":var _=this.visit(e.children[0],s);if(!t(_))return null;for(d=[], +m=0;m<_.length;m++)null!==(u=this.visit(e.children[1],_[m]))&&d.push(u);return d;case"ValueProjection":if(_=this.visit(e.children[0],s),!r(_))return null;d=[];var S=o(_);for(m=0;mh;break;case"GTE":c=l>=h;break;case"LT":c=l=e&&(t=r<0?e-1:e),t}},p.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){var n;if(r[r.length-1].variadic){if(t.length=0;n--)r+=t[n];return r}var i=e[0].slice(0);return i.reverse(),i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],i=e[1],o=0;o0){if(this._getTypeName(e[0][0])===g)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n0){if(this._getTypeName(e[0][0])===g)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;na?1:ss&&(s=r,t=i[a]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],i=e[0],o=this.createKeyFunction(n,[g,b]),s=1/0,a=0;a=this.HEADERS_RECEIVED&&!h&&(u.statusCode=l.status,u.headers=s.parseHeaders(l.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers,l.statusText),h=!0),this.readyState===this.DONE&&s.finishRequest(l,u)},!1),l.upload.addEventListener("progress",function(e){u.emit("sendProgress",e)}),l.addEventListener("progress",function(e){u.emit("receiveProgress",e)},!1),l.addEventListener("timeout",function(){o(n.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),l.addEventListener("error",function(){o(n.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),l.addEventListener("abort",function(){o(n.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))},!1),r(u),l.open(e.method,c,!1!==t.xhrAsync),n.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)}),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.responseType="arraybuffer"}catch(e){}try{e.body?l.send(e.body):l.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;l.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return n.util.arrayEach(e.split(/\r?\n/),function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)}),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var i=e.response;r=new n.util.Buffer(i.byteLength);for(var o=new Uint8Array(i),s=0;s-1&&0===++e[t];t--);}var o=e("../core").util,s=o.buffer.toBuffer;n.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,o=Math.abs(Math.round(e));r>-1&&o>0;r--,o/=256)t[r]=o;return e<0&&i(t),new n(t)},n.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&i(e),parseInt(e.toString("hex"),16)*(t?-1:1)},n.prototype.toString=function(){return String(this.valueOf())},t.exports={Int64:n}},{"../core":39}],55:[function(e,t,r){function n(e){for(var t=[],r=0;ra)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},n.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%64>=56){for(var o=this.bufferLength;o<64;o++)r.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<56;o++)r.setUint8(o,0);r.setUint32(56,Math.floor(t/4294967296),!0),r.setUint32(60,t),this.hashBuffer(),this.finished=!0}for(var s=new i(32),o=0;o<8;o++)s[4*o]=this.state[o]>>>24&255,s[4*o+1]=this.state[o]>>>16&255,s[4*o+2]=this.state[o]>>>8&255,s[4*o+3]=this.state[o]>>>0&255;return e?s.toString(e):s},n.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,r=e.state,n=r[0],i=r[1],o=r[2],a=r[3],u=r[4],c=r[5],l=r[6],h=r[7],p=0;p<64;p++){if(p<16)this.temp[p]=(255&t[4*p])<<24|(255&t[4*p+1])<<16|(255&t[4*p+2])<<8|255&t[4*p+3];else{var f=this.temp[p-2],d=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;f=this.temp[p-15];var m=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;this.temp[p]=(d+this.temp[p-7]|0)+(m+this.temp[p-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&c^~u&l)|0)+(h+(s[p]+this.temp[p]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;h=l,l=c,c=u,u=a+v|0,a=o,o=i,i=n,n=v+g|0}r[0]+=n,r[1]+=i,r[2]+=o,r[3]+=a,r[4]+=u,r[5]+=c,r[6]+=l,r[7]+=h}},{"./browserHashUtils":30,"buffer/":3}],33:[function(e,t,r){function n(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}var i=e("buffer/").Buffer,o=e("./browserHashUtils");new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53);t.exports=n,n.BLOCK_SIZE=64,n.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(o.isEmptyData(e))return this;e=o.convertToBuffer(e);var t=e.length;this.totalLength+=8*t;for(var r=0;r14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var r=new i(20),n=new DataView(r.buffer);return n.setUint32(0,this.h0,!1),n.setUint32(4,this.h1,!1),n.setUint32(8,this.h2,!1),n.setUint32(12,this.h3,!1),n.setUint32(16,this.h4,!1),e?r.toString(e):r},n.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var r,n,i=this.h0,o=this.h1,s=this.h2,a=this.h3,u=this.h4;for(e=0;e<80;e++){e<20?(r=a^o&(s^a),n=1518500249):e<40?(r=o^s^a,n=1859775393):e<60?(r=o&s|a&(o|s),n=2400959708):(r=o^s^a,n=3395469782);var c=(i<<5|i>>>27)+r+u+n+(0|this.block[e]);u=a,a=s,s=o<<30|o>>>2,o=i,i=c}for(this.h0=this.h0+i|0,this.h1=this.h1+o|0,this.h2=this.h2+s|0,this.h3=this.h3+a|0,this.h4=this.h4+u|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},{"./browserHashUtils":30,"buffer/":3}],32:[function(e,t,r){function n(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(h)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function i(e,t,r,n,i,o){return((t=(t+e&4294967295)+(n+o&4294967295)&4294967295)<>>32-i)+r&4294967295}function o(e,t,r,n,o,s,a){return i(t&r|~t&n,e,t,o,s,a)}function s(e,t,r,n,o,s,a){return i(t&n|r&~n,e,t,o,s,a)}function a(e,t,r,n,o,s,a){return i(t^r^n,e,t,o,s,a)}function u(e,t,r,n,o,s,a){return i(r^(t|~n),e,t,o,s,a)}var c=e("./browserHashUtils"),l=e("buffer/").Buffer,h=64;t.exports=n,n.BLOCK_SIZE=h,n.prototype.update=function(e){if(c.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=c.convertToBuffer(e),r=0,n=t.byteLength;for(this.bytesHashed+=n;n>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),n--,this.bufferLength===h&&(this.hashBuffer(),this.bufferLength=0);return this},n.prototype.digest=function(e){if(!this.finished){var t=this,r=t.buffer,n=t.bufferLength,i=t.bytesHashed,o=8*i +;if(r.setUint8(this.bufferLength++,128),n%h>=h-8){for(var s=this.bufferLength;s>>0,!0),r.setUint32(h-4,Math.floor(o/4294967296),!0),this.hashBuffer(),this.finished=!0}for(var a=new DataView(new ArrayBuffer(16)),s=0;s<4;s++)a.setUint32(4*s,this.state[s],!0);var u=new l(a.buffer,a.byteOffset,a.byteLength);return e?u.toString(e):u},n.prototype.hashBuffer=function(){var e=this,t=e.buffer,r=e.state,n=r[0],i=r[1],c=r[2],l=r[3];n=o(n,i,c,l,t.getUint32(0,!0),7,3614090360),l=o(l,n,i,c,t.getUint32(4,!0),12,3905402710),c=o(c,l,n,i,t.getUint32(8,!0),17,606105819),i=o(i,c,l,n,t.getUint32(12,!0),22,3250441966),n=o(n,i,c,l,t.getUint32(16,!0),7,4118548399),l=o(l,n,i,c,t.getUint32(20,!0),12,1200080426),c=o(c,l,n,i,t.getUint32(24,!0),17,2821735955),i=o(i,c,l,n,t.getUint32(28,!0),22,4249261313),n=o(n,i,c,l,t.getUint32(32,!0),7,1770035416),l=o(l,n,i,c,t.getUint32(36,!0),12,2336552879),c=o(c,l,n,i,t.getUint32(40,!0),17,4294925233),i=o(i,c,l,n,t.getUint32(44,!0),22,2304563134),n=o(n,i,c,l,t.getUint32(48,!0),7,1804603682),l=o(l,n,i,c,t.getUint32(52,!0),12,4254626195),c=o(c,l,n,i,t.getUint32(56,!0),17,2792965006),i=o(i,c,l,n,t.getUint32(60,!0),22,1236535329),n=s(n,i,c,l,t.getUint32(4,!0),5,4129170786),l=s(l,n,i,c,t.getUint32(24,!0),9,3225465664),c=s(c,l,n,i,t.getUint32(44,!0),14,643717713),i=s(i,c,l,n,t.getUint32(0,!0),20,3921069994),n=s(n,i,c,l,t.getUint32(20,!0),5,3593408605),l=s(l,n,i,c,t.getUint32(40,!0),9,38016083),c=s(c,l,n,i,t.getUint32(60,!0),14,3634488961),i=s(i,c,l,n,t.getUint32(16,!0),20,3889429448),n=s(n,i,c,l,t.getUint32(36,!0),5,568446438),l=s(l,n,i,c,t.getUint32(56,!0),9,3275163606),c=s(c,l,n,i,t.getUint32(12,!0),14,4107603335),i=s(i,c,l,n,t.getUint32(32,!0),20,1163531501),n=s(n,i,c,l,t.getUint32(52,!0),5,2850285829),l=s(l,n,i,c,t.getUint32(8,!0),9,4243563512),c=s(c,l,n,i,t.getUint32(28,!0),14,1735328473),i=s(i,c,l,n,t.getUint32(48,!0),20,2368359562),n=a(n,i,c,l,t.getUint32(20,!0),4,4294588738),l=a(l,n,i,c,t.getUint32(32,!0),11,2272392833),c=a(c,l,n,i,t.getUint32(44,!0),16,1839030562),i=a(i,c,l,n,t.getUint32(56,!0),23,4259657740),n=a(n,i,c,l,t.getUint32(4,!0),4,2763975236),l=a(l,n,i,c,t.getUint32(16,!0),11,1272893353),c=a(c,l,n,i,t.getUint32(28,!0),16,4139469664),i=a(i,c,l,n,t.getUint32(40,!0),23,3200236656),n=a(n,i,c,l,t.getUint32(52,!0),4,681279174),l=a(l,n,i,c,t.getUint32(0,!0),11,3936430074),c=a(c,l,n,i,t.getUint32(12,!0),16,3572445317),i=a(i,c,l,n,t.getUint32(24,!0),23,76029189),n=a(n,i,c,l,t.getUint32(36,!0),4,3654602809),l=a(l,n,i,c,t.getUint32(48,!0),11,3873151461),c=a(c,l,n,i,t.getUint32(60,!0),16,530742520),i=a(i,c,l,n,t.getUint32(8,!0),23,3299628645),n=u(n,i,c,l,t.getUint32(0,!0),6,4096336452),l=u(l,n,i,c,t.getUint32(28,!0),10,1126891415),c=u(c,l,n,i,t.getUint32(56,!0),15,2878612391),i=u(i,c,l,n,t.getUint32(20,!0),21,4237533241),n=u(n,i,c,l,t.getUint32(48,!0),6,1700485571),l=u(l,n,i,c,t.getUint32(12,!0),10,2399980690),c=u(c,l,n,i,t.getUint32(40,!0),15,4293915773),i=u(i,c,l,n,t.getUint32(4,!0),21,2240044497),n=u(n,i,c,l,t.getUint32(32,!0),6,1873313359),l=u(l,n,i,c,t.getUint32(60,!0),10,4264355552),c=u(c,l,n,i,t.getUint32(24,!0),15,2734768916),i=u(i,c,l,n,t.getUint32(52,!0),21,1309151649),n=u(n,i,c,l,t.getUint32(16,!0),6,4149444226),l=u(l,n,i,c,t.getUint32(44,!0),10,3174756917),c=u(c,l,n,i,t.getUint32(8,!0),15,718787259),i=u(i,c,l,n,t.getUint32(36,!0),21,3951481745),r[0]=n+r[0]&4294967295,r[1]=i+r[1]&4294967295,r[2]=c+r[2]&4294967295,r[3]=l+r[3]&4294967295}},{"./browserHashUtils":30,"buffer/":3}],31:[function(e,t,r){function n(e,t){this.hash=new e,this.outer=new e;var r=i(e,t),n=new Uint8Array(e.BLOCK_SIZE);n.set(r);for(var o=0;oe.BLOCK_SIZE){var n=new e;n.update(r),r=n.digest()}var i=new Uint8Array(e.BLOCK_SIZE);return i.set(r),i}var o=e("./browserHashUtils");t.exports=n,n.prototype.update=function(e){if(o.isEmptyData(e)||this.error)return this;try{this.hash.update(o.convertToBuffer(e))}catch(e){this.error=e}return this},n.prototype.digest=function(e){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(e)}},{"./browserHashUtils":30}],30:[function(e,t,r){function n(e){return"string"==typeof e?0===e.length:0===e.byteLength}function i(e){return"string"==typeof e&&(e=new o(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var o=e("buffer/").Buffer;"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(e){return s.indexOf(Object.prototype.toString.call(e))>-1});var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];t.exports={isEmptyData:n,convertToBuffer:i}},{"buffer/":3}],17:[function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&c(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return u(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function u(e){return"string"==typeof e}function c(e){return"object"==typeof e&&null!==e}function l(e){return null===e}function h(e){return null==e}var p=e("punycode");r.parse=i,r.resolve=s,r.resolveObject=a,r.format=o,r.Url=n;var f=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,m=["<",">",'"',"`"," ","\r","\n","\t"],v=["{","}","|","\\","^","`"].concat(m),g=["'"].concat(v),y=["%","/","?",";","#"].concat(g),b=["/","?","#"],w=/^[a-z0-9A-Z_-]{0,63}$/,E=/^([a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=e("querystring");n.prototype.parse=function(e,t,r){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=f.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&S[i]||(n=n.substr(2),this.slashes=!0)}if(!S[i]&&(s||i&&!C[i])){for(var a=-1,c=0;c127?T+="x":T+=R[k];if(!T.match(w)){var L=v.slice(0,c),P=v.slice(c+1),q=R.match(E);q&&(L.push(q[1]),P.unshift(q[2])),P.length&&(n="/"+P.join(".")+n),this.hostname=L.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!m){for(var O=this.hostname.split("."),N=[],c=0;c0)&&r.host.split("@");v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return r.search=e.search,r.query=e.query,l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=d.slice(-1)[0],y=(r.host||e.host)&&("."===g||".."===g)||""===g,b=0,w=d.length;w>=0;w--)g=d[w],"."==g?d.splice(w,1):".."===g?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!p&&!f)for(;b--;b)d.unshift("..");!p||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),y&&"/"!==d.join("/").substr(-1)&&d.push("");var E=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(m){r.hostname=r.host=E?"":d.length?d.shift():"";var v=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");v&&(r.auth=v.shift(),r.host=r.hostname=v.shift())}return p=p||r.host&&d.length,p&&!E&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),l(r.pathname)&&l(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=d.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:9,querystring:12}],15:[function(e,t,r){arguments[4][12][0].apply(r,arguments)},{"./decode":13,"./encode":14,dup:12}],14:[function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},{}],13:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c=0?(l=d.substr(0,m),h=d.substr(m+1)):(l=d,h=""),p=decodeURIComponent(l),f=decodeURIComponent(h),n(o,p)?Array.isArray(o[p])?o[p].push(f):o[p]=[o[p],f]:o[p]=f}return o}},{}],12:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":10,"./encode":11}],11:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n0&&c>u&&(c=u);for(var l=0;l=0?(h=m.substr(0,v),p=m.substr(v+1)):(h=m,p=""),f=decodeURIComponent(h),d=decodeURIComponent(p),n(s,f)?i(s[f])?s[f].push(d):s[f]=[s[f],d]:s[f]=d}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],9:[function(e,t,r){(function(e){(function(){!function(n){function i(e){throw RangeError(q[e])}function o(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function s(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(P,"."),n+o(e.split("."),t).join(".")}function a(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=U(e>>>10&1023|55296),e=56320|1023&e),t+=U(e)}).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:_}function l(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,r){var n=0;for(e=r?N(e/A):e>>1,e+=N(e/t);e>O*C>>1;n+=_)e=N(e/O);return N(n+(O+1)*e/(e+x))}function p(e){var t,r,n,o,s,a,l,p,f,d,m=[],v=e.length,g=0,y=T,b=R;for(r=e.lastIndexOf(k),r<0&&(r=0),n=0;n=128&&i("not-basic"),m.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=v&&i("invalid-input"),p=c(e.charCodeAt(o++)),(p>=_||p>N((E-g)/a))&&i("overflow"),g+=p*a,f=l<=b?S:l>=b+C?C:l-b,!(pN(E/d)&&i("overflow"),a*=d;t=m.length+1,b=h(g-s,t,0==s),N(g/t)>E-y&&i("overflow"),y+=N(g/t),g%=t,m.splice(g++,0,y)}return u(m)}function f(e){var t,r,n,o,s,u,c,p,f,d,m,v,g,y,b,w=[];for(e=a(e),v=e.length,t=T,r=0,s=R,u=0;u=t&&mN((E-r)/g)&&i("overflow"),r+=(c-t)*g,t=c,u=0;uE&&i("overflow"),m==t){for(p=r,f=_;d=f<=s?S:f>=s+C?C:f-s,!(p= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=_-S,N=Math.floor,U=String.fromCharCode;if(b={version:"1.3.2",ucs2:{decode:a,encode:u},decode:p,encode:f,toASCII:m,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return b});else if(v&&g)if(t.exports==v)g.exports=b;else for(w in b)b.hasOwnProperty(w)&&(v[w]=b[w]);else n.punycode=b}(this)}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,o,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(r=this._events[e],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(s(r))for(o=Array.prototype.slice.call(arguments,1),c=r.slice(),n=c.length,u=0;u0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,o,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],o=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=o;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t,r){(function(t,n){(function(){"use strict";function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),o.alloc(+e)}function v(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return R(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,i){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}var c;if(i){var l=-1;for(c=r;ca&&(r=a-u),c=r;c>=0;c--){for(var h=!0,p=0;pi&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,c,l,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],128==(192&u)&&(h=(31&o)<<6|63&u)>127&&(s=h);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(h=(15&o)<<12|(63&u)<<6|63&c)>2047&&(h<55296||h>57343)&&(s=h);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(h=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&h<1114112&&(s=h)}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return k(n)}function k(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function U(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function D(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,i){return i||M(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,i){return i||M(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function F(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){for(var t=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function X(e){return J.toByteArray(F(e))}function G(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Y(e){return e!==e}var J=e("base64-js"),Z=e("ieee754"),$=e("isarray");r.Buffer=o,r.SlowBuffer=m,r.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,r){return s(null,e,t,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,r){return u(null,e,t,r)},o.allocUnsafe=function(e){return c(null,e)},o.allocUnsafeSlow=function(e){return c(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},o.prototype.compare=function(e,t,r,n,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,a=r-t,u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),h=0;hi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return C(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,o=0;++o=i&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);N(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s>1,l=-7,h=r?i-1:0,p=r?-1:1,f=e[t+h];for(h+=p,o=f&(1<<-l)-1,f>>=-l,l+=a;l>0;o=256*o+e[t+h],h+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+h],h+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),o-=c}return(f?-1:1)*s*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+h>=1?p/u:p*Math.pow(2,1-h),t*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+f]=255&a,f+=d,a/=256,i-=8);for(s=s<0;e[r+f]=255&s,f+=d,s/=256,c-=8);e[r+f-d]|=128*m}},{}],1:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function i(e){var t=n(e),r=t[0],i=t[1];return 3*(r+i)/4-i}function o(e,t,r){return 3*(t+r)/4-r}function s(e){var t,r,i=n(e),s=i[0],a=i[1],u=new p(o(e,s,a)),c=0,l=a>0?s-4:s;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===a&&(t=h[e.charCodeAt(r)]<<2|h[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===a&&(t=h[e.charCodeAt(r)]<<10|h[e.charCodeAt(r+1)]<<4|h[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function u(e,t,r){for(var n,i=[],o=t;os?s:o+16383));return 1===n?(t=e[r-1],i.push(l[t>>2]+l[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),i.join("")}r.byteLength=i,r.toByteArray=s,r.fromByteArray=c;for(var l=[],h=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,m=f.length;d 0 ? JSON.parse(JSON.stringify(pasteItem)) : {}; + + newItem[table.partition_key] = {"S":(cellId.hasOwnProperty(id) ? getValue(cellId[id].obj[table.partition_key]) : "~new~")}; + + if (!newItem.hasOwnProperty(table.sort_key)) { + if (sortkey_datatype == 'N') + newItem[table.sort_key] = {"N":"0"}; + else + newItem[table.sort_key] = {"S":"~new~"}; + + newItem["type"] = {"S": "~new~"}; + } else { + var dup = false; + + $.each(json_data, function(idx, obj) { + if (getValue(obj[table.partition_key]) == getValue(newItem[table.partition_key]) && getValue(obj[table.sort_key]) == getValue(newItem[table.sort_key])) { + alert("Duplicate Sort Key values not allowed in the same Partition."); + dup = true; + return false; + } + }); + + if (dup) + return; + } + + // snapshot model state + makeChange(); + + // add "type" as a non-key attribute + addNonKeyAttribute(null, 'type'); + json_data.push(newItem); + + // refresh the table view + showValues = true; + loadDataModel(); +} + +// add a non-key attribute to the model if it does not already exist +function addNonKeyAttribute(type, attribute) { + // add this attribute to the schema + if (type && !schema.models[type][attribute]) { + schema.models[type][attribute] = { type: 'String' } + } + // search the attribute list for this name + var found = false; + $.each(model.DataModel[modelIndex].NonKeyAttributes, function (idx, obj) { + if (attribute.AttributeName == obj.AttributeName) + found = true; + }); + + // if the attribute is not on the list then add it + if (!found) + model.DataModel[modelIndex].NonKeyAttributes.push({AttributeName: attribute, AttributeType: 'S'}); +} + +function findModel(id) { + let type = findType(id) + return schema.models.find(m => m.type == type) +} + +function findType(id) { + return cellId[id].type +} + +// add an attribute to an Item. Note: this does not change the schema until an attibute name is assigned. +function addAttribute(id, name) { + // find the backing object for this Item + let obj = cellId[id].obj; + + // if the object has a "type" attribute that is unset then throw an alert and bail + if (obj.hasOwnProperty("type") && obj.type.S == "~new~") { + alert("You need to assign this object a type before adding new attributes."); + + // set the selectId to focus on the type attribute for this item when the table renders and bail out + selectId.attr = "type"; + } else { + // snapshot the model state and add a new attribute to the Item + makeChange(); + obj[name] = {"S":"~new~"}; + } + + // refresh the table view + showValues = true; + loadDataModel(); +} + +// assign a name to a new attribute +function nameAttribute(id) { + var keycode = (event.keyCode ? event.keyCode : event.which); + + // process the name change if this is an enter or null key + if(keycode == '13' || keycode == '0' || selectId.hasOwnProperty("attrName")) { + // cancel keypress + event.preventDefault(); + + // find the attribute name + var attribute = selectId.hasOwnProperty("attrName") ? selectId.attrName : $(jq(id)).text(), + type = {}; + + delete selectId.attrName; + + // find the backing object for the Item + let obj = cellId[id].obj; + + // if the property already exists then bail out + if (obj.hasOwnProperty(attribute)) { + return false; + } + // add the non-key attribute defintion + addNonKeyAttribute(obj.type.S, attribute) + + // swap the value into the new attribute and delete the placeholder + obj[attribute] = obj["~new~"]; + delete obj["~new~"]; + selectId = { + PK: getValue(obj[table.partition_key]), + SK: getValue(obj[table.sort_key]), + attr: attribute + }; + + // add this attribute to other objects of this type + if (obj.hasOwnProperty("type")) { + $.each(json_data, function (idx, obj1) { + if (obj.type.S == obj1.type.S) + obj1[attribute] = { "S" : "~new~"}; + }); + } + + // if the object had a type then add attribute to other objects of this type + if (Object.keys(type).length > 0) { + $.each(json_data, function (idx, obj) { + if (obj["type"]["S"] == type.S) + obj[attribute] = { "S" : "~new~"}; + }); + } + + // refresh the table view + loadDataModel(); + } +} + +function importOneTableSchema(text) { + schema = JSON.parse(text); + if (!schema.models) { + alert('Invalid OneTable schema. Missing top level models.') + return + } + model = {}; + + for (let [indexName, index] of Object.entries(schema.indexes)) { + var def = {}; + def.KeyAttributes = {}; + def.KeyAttributes.PartitionKey = { + 'AttributeName': index.hash, + 'AttributeType': 'S' + }; + def.KeyAttributes.SortKey = { + 'AttributeName': index.sort, + 'AttributeType': 'S' + }; + def.NonKeyAttributes = []; + def.TableData = []; + + if (!model.hasOwnProperty("DataModel")) { + modelIndex = 0; + model.DataModel = []; + def.GlobalSecondaryIndexes = []; + def.TableName = indexName; + tableChanges[indexName] = []; + model.DataModel.push(def); + table = { + name: indexName, + partition_key: def.KeyAttributes.PartitionKey.AttributeName, + sort_key: def.KeyAttributes.SortKey.AttributeName, + sortkey_datatype: def.KeyAttributes.SortKey.AttributeType + }; + json_data = def.TableData; + } else { + def.IndexName = indexName; + def.Projection = { ProjectionType: "ALL" }; + model.DataModel[modelIndex].GlobalSecondaryIndexes.push(def); + } + } + modelIndex = 0; + datamodel = model.DataModel[modelIndex]; + + for (let [modelName, model] of Object.entries(schema.models)) { + for (let [name, field] of Object.entries(model)) { + if (field.value) { + if (!schema.indexes[name]) { + let item = datamodel.NonKeyAttributes.find(a => a.AttributeName == name); + if (!item) { + item = { + AttributeName: name, + AttributeType: typeToDynamo(field.type), + } + datamodel.NonKeyAttributes.push(item); + } + } + } + } + // Define type attribute (OneTable does this automatically) + if (!schema.models[modelName]) { + schema.models[modelName].type = { type: 'String', required: true, value: modelName }; + } + } + + if (schema.data) { + let item = {}; + for (let row of schema.data) { + item = {}; + for (let [key, value] of Object.entries(row)) { + item[key] = { 'S': value }; + } + json_data.push(item); + } + expandValueTemplates(); + showTable(); + } else { + addItem("~new~"); + } +} + +function exportOneTableSchema() { + let output = Object.assign({}, schema, {data: []}) + let data = output.data + for (let row of json_data) { + let item = {} + for (let [key, value] of Object.entries(row)) { + item[key] = Object.values(value)[0] + } + data.push(item) + } + save(JSON.stringify(output, null, 4), "schema.json", "json"); +} + +function setAttributeType(type, item, attr) { + + switch (type) { + case "Number": + if ( isNaN(getValue(item[attr])) ) + item[name] = { + "N": "0" + } + else + item[name] = { + "N": getValue(item[attr]) + } + break; + + case "Boolean": + item[attr] = { + "BOOL": getValue(item[attr]).toLowerCase() == "false" || getValue(item[attr]) == "0" ? false : !!getValue(item[attr]) + }; + break; + + default: + let newAttr = {}; + newAttr[types[type]] = getValue(item[attr]); + item[attr] = newAttr; + break; + } +} + +// set an attribute value +function setValue(id) { + // get the new value for the attribute and split out the key values and attribute name + var newVal = $(jq(id)).text(), + PK = cellId[id].PK, + SK = cellId[id].SK, + name = cellId[id].attr, + change = true, + obj = cellId[id].obj; + + // if the value is uninitialized + if (newVal == "~new~") + return; + + // if this is a sort key change make sure it is a unique value + var found = false; + if ( name == table.sort_key ) { + $.each(json_data, function(idx, obj) { + if ( getValue(obj[table.partition_key]) == PK && getValue(obj[table.sort_key]) == newVal) { + found = true; + $(jq(id)).html(buildButtonHtml(id)); + } + }); + } + + if (!found) { + let entity = schema.models[getValue(obj.type)] + let field = { + type: "String" + } + + if (entity) + field = entity[name]; + + if (!showValues) { + // Editing meta view, so update the type or value template where appropriate + if (name == 'type') { + if (getValue(obj.type) == newVal) + return; + + showValues = true; + setValue(id); + showValues = false; + } else { + + if (newVal == field.type || newVal == field.value) + return; + + makeChange(); + if (Object.keys(types).includes(newVal)) { + $.each(json_data, function(idx, item) { + setAttributeType(newVal, item, name); + }); + + field.type = newVal + } else { + field.value = newVal + } + } + + loadDataModel(); + } else { + // if the value has changed then process it + if (getValue(obj[name]) != newVal) { + if ( name == sort_key) { + if ( !mouseDown ) + selectId = { + PK: PK, + SK: newVal, + attr: "type", + obj: obj + }; + } + else { + if ( cellId.hasOwnProperty("cell" + (parseInt(id.substr(4)) + 1))) + selectId = cellId["cell" + (parseInt(id.substr(4)) + 1)]; + else + selectId = cellId["cell1"]; + } + + // snapshot model state and apply the change + makeChange(); + assignValue(obj[name], newVal); + setAttributeType(field.type, obj, name); + + // if this is a type change then adjust the attributes accordingly + if (name == "type") { + //remove existing attributes + $.each(Object.keys(obj), function (idx, key) { + if (key != table.partition_key && key != table.sort_key && key != "type") + delete obj[key]; + }); + + // add attributes for new type with default value + if (schema.models.hasOwnProperty(newVal)) { + $.each(schema.models[newVal], function(prop, field) { + let props = ['type', table.partition_key, table.sort_key]; + if (!props.includes(prop)) { + obj[prop] = {'S': field.default || '~new~'} + } + }); + } else { + addEntityToSchema(obj); + } + } + + // refresh the table view + loadDataModel(); + } + } + } +} + +// update an Item attribute with a new value +function updateItem(id) { + var keycode = (event.keyCode ? event.keyCode : event.which); + + // if this is an enter or null key code then process new value + if(keycode == '13' || keycode == '0') { + event.preventDefault(); + + // set keypress event flag + fired = true; + mouseDown = false; + setValue(id); + } +} + +// remove all items from a partition +function deletePartition(id) { + if (getValue(cellId[id].obj[table.partition_key]) == "~new~") { + alert("New partitions cannot be deleted."); + return; + } + + alertData = { + caller: "deletePartition", + data: getValue(cellId[id].obj[table.partition_key]) + }; + + $("#alertTitle h1").text("Delete Partition"); + $("#alertText").text(`All items in the '${alertData.data}' partition will be deleted, continue?`); + + $("#alertModal").show(); +} + +// remove an item from the model +function deleteItem(id) { + alertData = { + caller: "deleteItem", + data: id + }; + + var PK = getValue(cellId[id].obj[table.partition_key]), + SK = getValue(cellId[id].obj[table.sort_key]), + message = ""; + + if (PK == "~new~") + message = "Items cannot be deleted from new partitions."; + + if (SK == "~new~") + message = "New Items cannot be deleted."; + + if ( message != "") { + loadDataModel(); + return; + } + + $("#alertTitle h1").text("Delete Item"); + $("#alertText").text(`Item key '${PK}, ${SK}' will be deleted, continue?`); + + $("#alertModal").show(); +} + +// refresh the table view +function showTable() { + // reset the table display + $("#primary_table").html(''); + + // build the table html + makeTable(table); + + // build the HTML and add a tab for each index + $.each(datamodel.GlobalSecondaryIndexes, function(index, gsi) { + makeIndex(gsi); + }); + + $("#aboutDiv").hide(); + $("#tabDiv").show(); + $("#tabs").show(); + $("#fileDiv").hide(); + $("#tableDivButton").className += " active"; + + $(".tabable").mousedown(function(eventData) { + var id = $(this).attr("id"); + selectId = cellId[id]; + mouseDown = true; + if (eventData.which === 3) { + $(jq(id)).selectText(parseInt(id.substr(4))); + } + }); +} + +// generate the HTML for the table +function makeTable(table) { + // set the working configuration for the HTML generator + partition_key = table.partition_key; + sort_key = table.sort_key; + sortkey_datatype = table.sortkey_datatype; + + // group and sort the object list + sortObjectList(); + + // generate HTML for the table + var html = '
Primary Key
'; + + + html += generate(true); + + // add generated HTML to the primary_table element and set titles and styles + $("#primary_table").html(html); + $(".basetable_title").text(table.name); + $(".tablediv").css('display', '-webkit-box'); + $(".classprimaryKey").css('width', '400'); + + + // focus the first cell or selected object + var focusCell = selectId == null || Object.keys(selectId).length == 0 ? boundary.first : selectId; + $.each(cellId, function(prop, val) { + if (val.PK == focusCell.PK && val.SK == focusCell.SK && val.attr == focusCell.attr) { + $(jq(prop)).trigger("focus"); + return false; + } + }); + + // remove all index tab content + $.each($(".tabcontent"), function (idx, obj) { + if (obj.id != "tablediv") { + $(jq(obj.id)).remove(); + } + }); + + // remove index tab buttons + $.each($(".tablinks"), function (idx, obj) { + if (obj.id != "tableDivButton") + $(jq(obj.id)).remove(); + }); +} + +// generate the HTML and construct the tab element for an index +function makeIndex(index) { + // set the working configuration for the HTML generator + partition_key = index.KeyAttributes.PartitionKey.AttributeName; + sort_key = index.KeyAttributes.SortKey.AttributeName; + sortkey_datatype = index.KeyAttributes.SortKey.AttributeType; + + // group and sort the object list + sortObjectList(); + + // set base element name + var element = "#" + index.IndexName; + + // if this tab already exists then remove it + if ($(element + "_tab").length) + $(element + "_tab").remove(); + + // generate the HTML for this index + var html = '
'; + html += ''; + html += generate(false); + html += ""; + + // add the html to the tab control + $("#tabs").append(html); + + // if the button for this index tab exists then remove it + if ($(element + "_btn").length) + $(element + "_btn").remove(); + + // build the button for the HTML and add it to the tab control + html = '' + $("#tabDiv").append(html); +} + +// build the html for a table or index view +function generate(isTable) { + // container for sort row html + var sort_row = '', + maxLength = 0; + // column span for partition key column + var partition_colspan = 1; + + // Add sort key to table header if it exists + if (sort_key && sort_key != '') { + sort_row = ''; + } else { + sort_row = ''; + partition_colspan = 2; + } + + // find the max length of all rows to calculate cell width + $.each(json_data, function(index, object) { + // Record max width for the table + if (maxLength < Object.keys(object).length) + maxLength = Object.keys(object).length; + }); + + // set the tab index + tabIndex = 1; + // Build a row for each Item in the TableData array + var row_html = ''; + + $.each(sortObjectList(), function(index, tr_arr) { + var tbody_html = '', + PK = '', + SK = '', + dispVal = '', + id = ''; + + $.each(tr_arr, function(count, obj) { + // Check if partition key exists on this item and skip it if not + if (!obj.hasOwnProperty(partition_key)) { + return true; + } + + //Check for sort key and skip item if does not exist + if (sort_key && sort_key != '') { + if (!obj.hasOwnProperty(sort_key)) { + return true; + } + } + + tbody_html = ''; + + let type = (obj && obj.type) ? obj.type.S : null; + let entity = type ? schema.models[type] : null; + + // If its the first cell insert the partition key value and span all the rows for the objects in this partition otherwise skip + if (count == 0) { + if (!showValues && entity) { + if (entity[partition_key]) { + PK = dispVal = entity[partition_key].value || entity[partition_key].type; + } else { + PK = getValue(obj[partition_key]); + } + } else { + PK = getValue(obj[partition_key]); + // set the default display value + dispVal = PK; + } + + // if this is the table then its editable + if (isTable) { + id = "cell" + tabIndex; + + // if this is a new partition then set the focus on it when the table renders + if (PK == "~new~") + selectId = { + PK: "~new~", + attr: partition_key + }; + + if (!boundary.first.hasOwnProperty("PK")) + boundary.first = { + PK: PK, + attr: partition_key + }; + + cellId[id] = { + PK: PK, + attr: partition_key, + type: type, + obj: obj + } + + // wrap the partition key value in a contenteditable div using the cellId value as element id and hook the relevant handlers + dispVal = buildKeyCell(id); + } + + // add the cell to the row + tbody_html += ''; + } + + // Insert sort key value for the Item + if (sort_key && sort_key != '') { + id = "cell" + tabIndex; + if (!showValues && entity) { + if (entity[sort_key]) { + SK = dispVal = entity[sort_key].value || entity[sort_key].type; + } else { + SK = getValue(obj[sort_key]); + } + } else { + SK = getValue(obj[sort_key]); + // set the default display value + dispVal = SK.startsWith("~new~") ? "~new~" : SK; + } + + // if this is the table then its editable + if (isTable) { + cellId[id] = { + PK: PK, + SK: SK, + attr: sort_key, + type: type, + obj: obj + } + + // wrap the partition key value in a contenteditable div using the PK value as element id and hook the relevant handlers + dispVal = buildKeyCell(id); + } + + // add the cell to the row + tbody_html += ''; + } + + // build header and value rows for the Item + var header = ''; + var row = ''; + $.each(obj, function(name, value) { + id = "cell" + tabIndex; + if (name == partition_key || name == sort_key) + return true; + + // start building the header cell + header += ''; + + // if this is not a map attribute then add the value cell + if (Object.keys(value)[0] != 'M') { + if (!showValues && entity && entity[name]) { + if (name == 'type') { + dispVal = getValue(value); + } else { + dispVal = entity[name].value || entity[name].type || getValue(value); + } + } else { + dispVal = getValue(value); + if (dispVal == '~new~' && entity && entity[name] && entity[name].default) { + displVal = entity[name].default + } + } + if (isTable) { + id = "cell" + tabIndex; + cellId[id] = { + PK: PK, + SK: SK, + attr: name, + type: type, + obj: obj + } + + boundary.last = cellId[id]; + + dispVal = '
' + dispVal + '
'; + } + row += ''; + } else { + // this is a map attribute so push the value onto the vals array + vals.push(value); + // link the map in the value cell + // TODO - implement map editor + row += ''; + } + }); + + // finish the header/value rows and add them to the Item row + header += ''; + row += ''; + tbody_html += header; + tbody_html += row; + + //Add the Item row to the Item row collection HTML + row_html += tbody_html; + }); + }); + + // add the undo button if this is the table view + var backDiv = ""; + if (isTable) { + backDiv = ''; + + if (showValues) + backDiv += ''; + else + backDiv += ''; + } + + // build the table HTML + var html = ''; + html += ''; + html += sort_row + ''; + html += row_html; + html += ""; + + return html; +} + +// create the HTML for the controls in a key cell +function buildKeyCell(id) { + var keypress = '"updatePK(\'' + id + '\')"', + css = "PK-context-menu tab"; + + if (cellId[id].attr == sort_key) { + keypress = '"updateItem(\'' + id + '\')"'; + css = "SK-context-menu tab"; + } + + retVal = '
' + buildButtonHtml(id) + '
'; + + return retVal; +} + +// construct the button HTML for a key cell +function buildButtonHtml(id) { + var add = '"addItemClick(\'' + id + '\')"', + remove = '"deletePartition(\'' + id + '\')"', + text = cellId[id].PK, + title1 = "Add Item", + title2 = "Delete Partition"; + + if (cellId[id].attr == table.sort_key) { + add = '"addAttribute(\'' + id + '\', \'~new~\')"'; + remove = '"deleteItem(\'' + id + '\')"'; + text = cellId[id].SK; + title1 = "Add Attribute"; + title2 = "Delete Item"; + } + + text += '
' + + return text; +} + +// process value templates and generate values +function expandValueTemplates() { + for (let item of datamodel.TableData) { + for (let [name, value] of Object.entries(item)) { + if (!item.type) continue + let type = Object.values(item.type)[0] + if (type == '~new~') continue + + let entity = schema.models[type] + if (!entity) continue + + let field = entity[name] + if (!field || !field.value) continue + + let text = field.value.replace(/\${(.*?)}/g, (pattern, varName) => { + return item[varName] ? Object.values(item[varName])[0] : pattern + }) + if (text != value) { + item[name] = { 'S' : text } + } + } + } +} + +// choose a table to view from the model +function selectTable() { + $("#selectTableDiv").show(); +} + +function getCookie(cname) { + var name = cname + "="; + var decodedCookie = decodeURIComponent(document.cookie); + var ca = decodedCookie.split(';'); + for(var i = 0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0) == ' ') { + c = c.substring(1); + } + if (c.indexOf(name) == 0) { + return c.substring(name.length, c.length); + } + } + return ""; +} + +function setCookie(cname,cvalue,exdays) { + var d = new Date(); + d.setTime(d.getTime() + (exdays*24*60*60*1000)); + var expires = "expires=" + d.toGMTString(); + document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; +} + +// parse the json file coming from the file loader +function onReaderLoad(event) { + if (alertData.caller == "loadModel") { + model = JSON.parse(event.target.result); + + // Clear out prior schema + schema = Object.assign({}, DefaultSchema) + + findDataModels(); + + if (model.hasOwnProperty("ModelSchema")) { + model.DataModel[modelIndex].ModelSchema = model.ModelSchema; + delete model.ModelSchema; + } + + loadDataModel(); + } else { + credentials = JSON.parse(event.target.result); + + initDynamoClient(); + + if ($("#saveCookie").is(":checked")) + setCookie("credentials", JSON.stringify(credentials), 365); + } + + $("#importFile").val(""); + alertData = {}; +} + +function initDynamoClient() { + AWS.config.update(credentials); + dynamodb = new AWS.DynamoDB(); + client = new AWS.DynamoDB.DocumentClient({maxRetries: 20, httpOptions: {connectTimeout: 500}}); + + var params = {}; + + dynamodb.listTables(params, function(err, data) { + if (err) + console.log(err, err.stack); + else { + accountTables = data; + + // initialize the dropdown + $("#acctTable").empty(); + // add the default selected item + $("#acctTable").append(''); + + $.each(data.TableNames, function(idx, table) { + $("#acctTable").append(``); + }); + + $("#loadFromTable").show(); + $("#saveToTable").show(); + $("#loadCreds").hide(); + } + }); +} + +function describeTable(params) { + dynamodb.describeTable(params, function (err, data) { + if (err) + console.log(err, err.stack); // an error occurred + else { + $.each(data.Table.KeySchema, function (idx, key) { + if (key.KeyType == "HASH") { + alertData.PK = key.AttributeName; + } else { + alertData.SK = key.AttributeName; + } + }); + } + }); +} + +function togglePKdiv() { + $("#customPKDiv").toggle($("#customPK").is(":checked")); +} + +function saveToTable() { + var params = { + TableName: saveTable + }; + + describeTable(params); + + let item = {}; + item[alertData.PK] = "_schema"; + item[alertData.SK] = model.ModelName; + item.Schema = model; + + params.Item = item; + + client.put(params, function (err, data) { + if (err) { + if (err.message.includes("Missing the key")) + saveToTable(); + else + console.log(err); + } else { + alertData = {}; + $("#schemaTableDiv").hide(); + } + }); +} + +function schemaTable() { + initDynamoClient(); + if (alertData.caller == "save") { + saveTable = $("#acctTable").val(); + saveToTable(); + } + else + loadFromTable(); +} + +function loadModels() { + if (alertData.caller == "save") + return; + + var params = { + TableName: $("#acctTable").val() + }; + + describeTable(params); + + params = { + TableName: $("#acctTable").val(), + KeyConditionExpression: "#pk = :val", + ExpressionAttributeNames: { + "#pk": alertData.PK + }, + ExpressionAttributeValues: { + ":val": "_schema" + } + }; + + alertData.models = {}; + + client.query(params, function(err, data) { + if (err) { + if (err.message.includes("ExpressionAttributeNames")) + loadModels(); + else + console.log(err); + } else { + // initialize the dropdown + $("#selectModel").empty(); + // add the default selected item + $("#selectModel").append(''); + + $.each(data.Items, function(idx, item) { + $("#selectModel").append(``); + alertData.models[item[alertData.SK]] = item.Schema; + }); + + $("#modelDiv").show(); + } + }); +} + +function loadFromTable() { + model = alertData.models[$("#selectModel").val()]; + alertData = {}; + $("#modelDiv").hide(); + $("#schemaTableDiv").hide(); + loadDataModel(); +} + +function scanTable() { + var params = { + TableName: $("#acctTable").val() + }; + + model = { + "ModelName": "Hospital", + "ModelMetadata": { + "Author": "", + "DateCreated": "Nov 24, 2020, 08:00 PM", + "DateLastModified": "Apr 17, 2021, 01:07 PM", + "Description": "", + "AWSService": "Amazon DynamoDB", + "Version": "2.0" + }, + DataModel: [{ + TableName: $("#acctTable").val() + }] + }; + + dynamodb.describeTable(function(err, data) { + + }); + + params.Limit = $("#txtItemCount").val(); + + client.scan(params, onScan); + //loadDataModel(); +} + +function onScan(err, data) { + if (err) { + console.error("Unable to scan the table. Error JSON:", JSON.stringify(err, null, 2)); + } else { + + data.Items.forEach(function(item) { + alert(JSON.stringify(item)); + // TODO - load Items into tableData + }); + + if (typeof data.LastEvaluatedKey != "undefined") { + params.ExclusiveStartKey = data.LastEvaluatedKey; + docClient.scan(params, onScan); + } + } +} + +// load the table data models into the view table dropdown +function findDataModels() { + // initialize the dropdown + $("#viewTable").empty(); + + // add the default selected item + $("#viewTable").append(''); + + // add an option for each table in the model + $.each(model["DataModel"], function (idx, obj) { + $("#viewTable").append(``); + }); + + // add the create new table option + $("#viewTable").append(''); +} + +// add a new table to the model +function addTable() { + $("#title h1").text("Create Table"); + $("#idx_lbl").text("Table name:"); + $("#tbSort").show(); + $("#dropSort").show(); + $("#projection_cfg").hide(); + $('#createTableOrIndex').toggle(); +} + +/* + Create a schema from the data in a workbench model + */ +function createSchema() { + schema = Object.assign({}, DefaultSchema) + let {data, indexes, models, queries} = schema + let keys = datamodel.KeyAttributes + + /* + Extract indexes + */ + indexes.primary = { + hash: keys.PartitionKey.AttributeName, + sort: keys.SortKey.AttributeName, + } + for (let gsi of datamodel.GlobalSecondaryIndexes) { + indexes[gsi.IndexName] = { + hash: gsi.KeyAttributes.PartitionKey.AttributeName, + sort: gsi.KeyAttributes.SortKey.AttributeName, + projection: gsi.Projection.ProjectionType, + } + } + + /* + Extract the schema entity models + */ + for (let row of datamodel.TableData) { + let entity + if (row.type) { + let type = Object.values(row.type)[0] + entity = schema.models[type] = schema.models[type] || {} + } + /* + Extract the attributes, map the types and save the data to the schema.data (future) + */ + let drow = {} + for (let [fieldName, col] of Object.entries(row)) { + if (entity) { + let field = entity[fieldName] = entity[fieldName] || {} + field.type = dynamoToType(Object.keys(col)[0]) + } + drow[fieldName] = Object.values(col)[0] + } + data.push(drow) + } + /* + Apply the value templates + */ + for (let [type, fn] of Object.entries(keys.PartitionKey.MapFunction || {})) { + schema.models[type][keys.ParitionKey.AttributeName].value = fn + } + for (let [type, fn] of Object.entries(keys.SortKey.MapFunction || {})) { + schema.models[type][keys.SortKey.AttributeName].value = fn + } + for (let att of datamodel.NonKeyAttributes) { + for (let [type, fn] of Object.entries(att.MapFunction || {})) { + schema.models[type][att.AttributeName].value = fn + } + } + + datamodel.ModelSchema = schema; +} + +// load the current data model for the viewer +function loadDataModel() { + datamodel = model.DataModel[modelIndex]; + + if (!datamodel.hasOwnProperty("ModelSchema")) + createSchema(); + else + schema = datamodel.ModelSchema; + + table = { + name: datamodel.TableName, + partition_key: datamodel.KeyAttributes.PartitionKey.AttributeName, + sort_key: datamodel.KeyAttributes.SortKey.AttributeName, + sortkey_datatype: datamodel.KeyAttributes.SortKey.AttributeType + }; + + if (!tableChanges.hasOwnProperty(datamodel.TableName)) + tableChanges[datamodel.TableName] = []; + + expandValueTemplates(); + json_data = datamodel.TableData; + + if (match_data.length > 0) + json_data = match_data; + + if (!table.hasOwnProperty(("partition_key"))) { + alert("Invalid Table Specification."); + location.reload(); + } + + // render the table + showTable(); +} + +// download the model in JSON format +function saveModel() { + if (!model.hasOwnProperty("ModelName")) { + var date = new Date(); + + model.ModelName = "export"; + model.ModelMetadata = { + "Author": "unknown", + "DateCreated": date.toDateString(), + "DateLastModified": date.toDateString(), + "Description": "", + "AWSService": "Amazon DynamoDB", + "Version": "2.0" + }; + } + + if (datamodel.ModelSchema.data) + delete datamodel.ModelSchema.data; + + save(JSON.stringify(model), model.ModelName + ".json", "json"); +} + +// save the file +function save(data, filename, type) { + var file = new Blob([data], {type: type}); + if (window.navigator.msSaveOrOpenBlob) // IE10+ + window.navigator.msSaveOrOpenBlob(file, filename); + else { // Others + var a = document.createElement("a"), + url = URL.createObjectURL(file); + a.href = url; + a.download = filename; + document.body.appendChild(a); + a.click(); + setTimeout(function() { + document.body.removeChild(a); + window.URL.revokeObjectURL(url); + }, 0); + } +} + +// store a copy of the current datamodel in the history buffer +function makeChange() { + //MOB - must save schema here somehow + tableChanges[model.DataModel[modelIndex]["TableName"]].push(JSON.parse(JSON.stringify(datamodel))); + + // if the buffer is too long then trim the oldest change + if (tableChanges[model.DataModel[modelIndex]["TableName"]].length > 50) + tableChanges[model.DataModel[modelIndex]["TableName"]].shift(); +} + +// undo the last edit to the model +function undoChange() { + // if there are changes then undo the last one + if (tableChanges[model.DataModel[modelIndex]["TableName"]].length > 0) { + // pop the last change into the current datamodel and reset the config + model.DataModel[modelIndex] = tableChanges[model.DataModel[modelIndex]["TableName"]].pop(); + } + + selectId = boundary.first; + loadDataModel(); +} + +// Build a map of unique attribute values by attribute name and identify typed objects +function findValues() { + $.each(json_data, function(index, obj) { + $.each(obj, function(name, propVal) { + if (!unique_values.hasOwnProperty(name)) { + unique_values[name] = []; + } + + var value = propVal[Object.keys(propVal)[0]]; + if (!unique_values[name].includes(value)) { + unique_values[name].push(value); + } + }); + addEntityToSchema(obj); + }); +} + +// scan object templates and add new types +function addEntityToSchema(obj) { + var type = getValue(obj.type); + if (type != '~new~' && !schema.models[type]) { + // add the type template object + schema.models[type] = {type: { type: 'String', required: true, value: type }}; + + // add all the attributes from this object to the template + $.each(Object.keys(obj), function (idx, key) { + schema.models[type][key] = { type: 'String' }; + }); + } +} + +// move a partition up or down in the display order +function movePartition(moveUp) { + var index = -1; + + $.each(unique_values[table.partition_key], function (idx, unique) { + if (unique == selectId.PK) { + index = idx; + return false; + } + }); + + if (index >= 0) { + var temp = unique_values[table.partition_key][index], + swap = index + 1; + + if (moveUp) + swap = index - 1; + + unique_values[table.partition_key][index] = unique_values[table.partition_key][swap]; + unique_values[table.partition_key][swap] = temp; + } + + var newKeySort = []; + $.each(unique_values[table.partition_key], function(idx, unique) { + $.each(json_data, function(idx, obj) { + if (getValue(obj[table.partition_key]) == unique) + newKeySort.push(obj); + }); + }); + + makeChange(); + model.DataModel[modelIndex].TableData = newKeySort; + loadDataModel(); +} + +// group objects by current partion key, sorted by current sort key +function sortObjectList() { + var sortedItems = []; + unique_values = {}; + + findValues(); + + // Group the JSON Objects by partition key + $.each(unique_values[partition_key], function(index, unique) { + var newArr = []; + $.each(json_data, function(index, obj){ + if ( obj.hasOwnProperty(partition_key) && unique === getValue(obj[partition_key]) ) { + if (sort_key && sort_key != '' && obj.hasOwnProperty(sort_key)) + newArr.push(obj); + } + }); + + // If there is a sort key then sort all the JSON objects by type + if (sort_key && sort_key != '') { + if (sortkey_datatype == 'N') { + newArr.sort((a,b) => (parseInt(a[sort_key].N) > parseInt(b[sort_key].N) ? 1 : -1)); + } else { + try { + newArr.sort((a,b) => (a[sort_key].S > b[sort_key].S ? 1 : -1)); + } catch(e) { + //no sort key on these items + } + } + } + sortedItems.push(newArr); + }); + + return sortedItems; +} + +// select the text inside the focused table element +jQuery.fn.selectText = function(idx){ + idx++; + + if ( !cellId.hasOwnProperty("cell" + idx) ) + idx--; + + selectId = cellId["cell" + idx]; + + mouseDown = false; + var doc = document; + var element = this[0]; + console.log(this, element); + if (doc.body.createTextRange) { + var range = document.body.createTextRange(); + range.moveToElementText(element); + range.select(); + } else if (window.getSelection) { + var selection = window.getSelection(); + var range = document.createRange(); + range.selectNodeContents(element); + range.setEnd(element, 1); + selection.removeAllRanges(); + selection.addRange(range); + } + + buildContextMenus(); +}; + +// create a fake UUID +function fakeUUID() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); +} + +// onclick event for Question dialog +function postResponse() { + $("#alertModal").hide(); + + var new_data = []; + + switch (alertData.caller) { + case "createModel": + if (response == '0') + $("#createModelDiv").show(); + break; + + case "deletePartition": + $.each(json_data, function (idx, obj) { + if (getValue(obj[datamodel.KeyAttributes.PartitionKey.AttributeName]) != alertData.data) + new_data.push(obj); + }); + break; + + case "cutItem": + case "copyItem": + case "deleteItem": + var PK = getValue(cellId[alertData.data].obj[table.partition_key]), + SK = getValue(cellId[alertData.data].obj[table.sort_key]); + + $.each(json_data, function (idx, obj) { + if (getValue(obj[table.partition_key]) == PK && getValue(obj[table.sort_key]) == SK) + pasteItem = obj; + else + new_data.push(obj); + }); + break; + + default: + alertData = ""; + break; + } + + if (alertData.caller.startsWith("delete") || alertData.caller.startsWith("cut")) { + showValues = true; + makeChange(); + model.DataModel[modelIndex].TableData = new_data; + loadDataModel(); + pasteItem = alertData.caller == "cutItem" ? pasteItem : {}; + } +} + +// delete an attribute from an entity type +function removeAttr(applyAll) { + var PK = selectId.PK, + SK = selectId.SK, + attr = selectId.attr, + type = ""; + + makeChange(); + $.each(json_data, function(idx, obj) { + if (getValue(obj[table.partition_key]) == PK && getValue(obj[table.sort_key]) == SK) { + delete obj[attr]; + type = getValue(obj.type); + return false; + } + }); + + if (applyAll) { + $.each(json_data, function(idx, obj) { + if (getValue(obj["type"]) == type) + delete obj[attr]; + }); + if (schema.models[type]) { + delete schema.models[type][attr]; + } + } + + selectId.attr = table.sort_key; + $("#removeAttributeModal").hide(); + loadDataModel(); +} + +// create a mapping for an entity attribute +function createMapping(type, name, value) { + schema.models[type][name].value = value + + /* + makeChange(); + switch (alertData.caller) { + case table.partition_key: + if (!datamodel.KeyAttributes.PartitionKey.hasOwnProperty("MapFunction")) + datamodel.KeyAttributes.PartitionKey.MapFunction = {}; + + datamodel.KeyAttributes.PartitionKey.MapFunction[alertData.data.type] = alertData.data.function; + break; + + case table.sort_key: + if (!datamodel.KeyAttributes.SortKey.hasOwnProperty("MapFunction")) + datamodel.KeyAttributes.SortKey.MapFunction = {}; + + datamodel.KeyAttributes.SortKey.MapFunction[alertData.data.type] = alertData.data.function; + break; + + default: + $.each(datamodel.NonKeyAttributes, function (idx, attr) { + if (attr.AttributeName == alertData.caller) { + if (!attr.hasOwnProperty("MapFunction")) + attr.MapFunction = {}; + attr.MapFunction[alertData.data.type] = alertData.data.function; + } + }); + break; + } + if (loadModel) { + loadDataModel(); + } + */ +} + +// get the backing Item for a table cell by cellId +function findItemByCellId(id) { + var item = null; + $.each(json_data, function(idx, obj) { + if (getValue(obj[table.partition_key]) == cellId[id].PK && getValue(obj[table.sort_key]) == cellId[id].SK) { + item = obj; + return false; + } + }); + + return item; +} + +// update the entity type in the Mapping Function modal when it is changed +function setType() { + if (datamodel.KeyAttributes.PartitionKey.hasOwnProperty("MapFunction")) + if (datamodel.KeyAttributes.PartitionKey.MapFunction.hasOwnProperty($("#selectType").val())) + $("#txtMapFunction").val(datamodel.KeyAttributes.PartitionKey.MapFunction[$("#selectType").val()]); + + $("#txtMapFunction").prop("disabled", false); + $("#btnDefineMap").prop("disabled", false); + alertData.data.type = $("#selectType").val(); + $("#lblEditMap").text("Enter Mapping Function for '" + alertData.data.type + "." + alertData.caller + "' attribute:"); + $("#txtMapFunction").focus(); +} + +// initialize and show the Value Template modal +function showValueTemplate(id) { + alertData.data = {}; + alertData.caller = cellId[id].attr; + + $('#selectType') + .find('option') + .remove() + .end() + .append(''); + + if (alertData.caller == table.partition_key) { + $("#txtMapFunction").prop("disabled", true); + $("#btnDefineMap").prop("disabled", true); + + $.each(schema.models, function(prop, val) { + $("#selectType").append($('').val(prop).html(prop)); + }); + $("#selectTypeDiv").show(); + } else { + var item = findItemByCellId(id); + alertData.data.type = getValue(item.type); + $("#lblEditMap").text("Enter Mapping Function for '" + alertData.data.type + "." + alertData.caller + "' attribute:"); + } + + switch (alertData.caller) { + case table.sort_key: + if (datamodel.KeyAttributes.SortKey.hasOwnProperty("MapFunction")) + if (datamodel.KeyAttributes.SortKey.MapFunction.hasOwnProperty(alertData.data.type)) + $("#txtMapFunction").val(datamodel.KeyAttributes.SortKey.MapFunction[alertData.data.type]); + break; + + default: + $.each(datamodel.NonKeyAttributes, function(idx, obj) { + if (obj.AttributeName == alertData.caller && obj.hasOwnProperty("MapFunction")) + if (obj.MapFunction.hasOwnProperty(alertData.data.type)) + $("#txtMapFunction").val(obj.MapFunction[alertData.data.type]); + }); + break; + } + + $("#defineValueTemplateDiv").show(); + $("#txtMapFunction").focus(); +} + +// construct the context menus for the table cells +function buildContextMenus() { + $.contextMenu( 'destroy' ); + var items = {}; + + $.each(datamodel.NonKeyAttributes, function(idx, attr) { + if (!selectId.obj.hasOwnProperty(attr.AttributeName)) + items[attr.AttributeName] = {name: attr.AttributeName}; + }) + + if (Object.keys(items).length > 0) + $.contextMenu({ + selector: '.attribute-context-menu', + callback: function(key, options) { + selectId.attrName = key; + nameAttribute($(this).attr("id")); + }, + items: items + }); + + items["new"] = {name: "New attribute..."}; + + items = { + "add": { + name: "Add Attribute", + icon: "fa-plus", + items: items + }, + "cut": {name: "Cut Item", icon: "fa-cut"}, + "copy": {name: "Copy Item", icon: "fa-copy"}, + "delete": {name: "Delete Item", icon: "fa-minus"}, + "function": { + name: "Edit Value Template", + icon: "fa-wrench" + }, + "insert": { + name: "Generate Value", + items: { + "uuid": { name: "UUID", icon: "fa-fingerprint" }, + "date": { name: "ISO8601 Date String", icon: "fa-clock" } + }, + icon: "fa-clone" + } + }; + + $.contextMenu({ + selector: '.SK-context-menu', + callback: function(key, options) { + switch (key) { + case "date": + $(this).text(new Date().toISOString().split(".")[0]); + selectId.SK = $(this).text(); + setValue($(this).attr("id")); + break; + + case "uuid": + $(this).text(fakeUUID()); + selectId.SK = $(this).text(); + setValue($(this).attr("id")); + break; + + case "cut": + alertData.caller = "cutItem"; + alertData.data = $(this).attr("id"); + postResponse(); + break; + + case "copy": + alertData.caller = "copyItem"; + alertData.data = $(this).attr("id"); + postResponse(); + break; + + case "delete": + deleteItem($(this).attr("id")); + break; + + case "function": + showValueTemplate($(this).attr("id")); + break; + + default: + addAttribute($(this).attr("id"), key == "new" ? "~new~" : key); + break; + } + }, + items: items + }); + + $.contextMenu({ + selector: '.cell-context-menu', + callback: function(key, options) { + switch (key) { + case "date": + $(this).text(new Date().toISOString().split(".")[0]); + setValue($(this).attr("id")); + break; + + case "uuid": + $(this).text(fakeUUID()); + setValue($(this).attr("id")); + break; + + case "delete": + selectId = cellId[$(this).attr("id")]; + $("#removeAttributeModal").show(); + break; + + case "function": + showValueTemplate($(this).attr("id")); + break; + } + }, + items: { + "delete": { + name: "Delete Attribute", + icon: "fa-minus", + disabled: function(key, opt) { + return cellId[$(this).attr("id")].attr == "type"; + } + }, + "function": { + name: "Edit Value Template", + icon: "fa-wrench", + disabled: function(key, opt) { + return cellId[$(this).attr("id")].attr == "type"; + } + }, + "insert": { + name: "Generate Value", + items: { + "uuid": { name: "UUID", icon: "fa-fingerprint" }, + "date": { name: "ISO8601 Date String", icon: "fa-clock" } + }, + icon: "fa-clone" + } + } + }); + + items = { + "add": {name: "Add Item", icon: "fa-plus"}, + "paste": { + name: "Paste Item", + icon: "fa-paste", + disabled: function(key, opt) { + return Object.keys(pasteItem).length == 0; + } + }, + "delete": {name: "Delete Partition", icon: "fa-minus"}, + "function": { + name: "Edit Value Template", + icon: "fa-wrench" + }, + "moveUp": { + name: "Move Up", + icon: "fa-arrow-up", + disabled: function(key, opt) { + return unique_values[table.partition_key][0] == cellId[$(this).attr("id")].PK; + } + }, + "moveDown": { + name: "Move Down", + icon: "fa-arrow-down", + disabled: function(key, opt) { + return unique_values[table.partition_key][unique_values[table.partition_key].length - 1] == cellId[$(this).attr("id")].PK; + } + } + }; + + $.contextMenu({ + selector: '.PK-context-menu', + callback: function(key, options) { + switch (key) { + case "add": + addItemClick($(this).attr("id")); + break; + + case "delete": + deletePartition($(this).attr("id")); + break; + + case "paste": + selectId.SK = pasteItem.SK; + selectId.attr = table.sort_key; + addItem($(this).attr("id")); + loadDataModel(); + break; + + case "moveUp": + case "moveDown": + selectId = cellId[$(this).attr("id")]; + movePartition(key == "moveUp"); + break; + + case "function": + showValueTemplate($(this).attr("id")); + break; + } + }, + items: items + }); + + items = { + "add": { + name: "Add Attribute", + icon: "fa-plus" + }, + "cut": {name: "Cut Item", icon: "fa-cut"}, + "copy": {name: "Copy Item", icon: "fa-copy"}, + "delete": {name: "Delete Item", icon: "fa-minus"}, + "function": { + name: "Edit Value Template", + icon: "fa-wrench" + }, + "insert": { + name: "Generate Value", + items: { + "uuid": { name: "UUID", icon: "fa-fingerprint" }, + "date": { name: "ISO8601 Date String", icon: "fa-clock" } + }, + icon: "fa-clone" + } + }; + + $.contextMenu({ + selector: '.SK-context-menu', + callback: function(key, options) { + switch (key) { + case "date": + $(this).text(new Date().toISOString().split(".")[0]); + selectId.SK = $(this).text(); + setValue($(this).attr("id")); + break; + + case "uuid": + $(this).text(fakeUUID()); + selectId.SK = $(this).text(); + setValue($(this).attr("id")); + break; + + case "cut": + alertData.caller = "cutItem"; + alertData.data = $(this).attr("id"); + postResponse(); + break; + + case "copy": + alertData.caller = "copyItem"; + alertData.data = $(this).attr("id"); + postResponse(); + break; + + case "delete": + deleteItem($(this).attr("id")); + break; + + case "function": + showValueTemplate($(this).attr("id")); + break; + } + }, + items: items + }); +} + +function toggleSchema() { + showValues = !showValues + showTable(); +} + +function getModel(type) { + return schema.models.find(m => m.type == type) +} + +function dynamoToType(dtype) { + switch (dtype) { + case 'B': + return 'Binary' + case 'BOOL': + return 'Boolean' + case 'S': + return 'String' + case 'N': + return 'Number' + case 'SS': + return 'Set' + default: + return 'String' + } +} + +function typeToDynamo(type) { + switch (type) { + case 'Binary': + return 'B' + case 'Boolean': + return 'BOOL' + case 'Date': + return 'S' + case 'Number': + return 'N' + case 'Set': + // need support for SS, NS, BS + return 'SS' + default: + return 'S' + } +} + + +// Just for debug +dump = (...args) => { + let s = [] + for (let item of args) { + s.push(JSON.stringify(item, function (key, value) { + if (this[key] instanceof Date) { + return this[key].toLocaleString() + } + return value + }, 4)) + } + print(s.join(' ')) +} +print = (...args) => { + console.log(...args) +} diff --git a/static/files/visualizer/js/globals.js b/static/files/visualizer/js/globals.js new file mode 100644 index 0000000..2db5ce0 --- /dev/null +++ b/static/files/visualizer/js/globals.js @@ -0,0 +1,112 @@ +var // container for the data model + model = {}, + // pointer to model.DataModel[modelIndex] + datamodel = {}, + // pointer to model.DataModels[0].TableData + json_data = [], + // container for change history (up to 50 revisions per table in the model) + tableChanges = {}, + // container for the current table + // properties: name, partition_key, sort_key, sortkey_datatype + table = {}, + // holders for the current keys and data types used by makeTable()/makeIndex()/generate() + partition_key, + sort_key, + sortkey_datatype, + // list of unique values by attribute name + unique_values = {}, + // gsi projection settings for new GSI + gsi_attrkey = 'all', + gsi_attrlist = [], + // list of values from attributes with Map type + vals = [], + // Attribute element counter + tabIndex = 0, + // the object to focus when table is rendered + selectId = {}, + // keypress event flag; + fired = true, + // current DataModel index + modelIndex = 0, + // container for alert data + alertData = { + caller: "", + data: "" + }, + // onClick event indicator to avoid double firing updates + mouseDown = false, + // container to hold first and last Attribute cells + boundary = { + first: {}, + last: {} + }, + // container for Attribute cell metadata + cellId = {}, + // the Item clipboard + pasteItem = {}, + // number of filters for the currently loaded query + numFilters = 0, + // collection of items matching the current query + match_data = [], + // Show values vs types/templates + showValues = true, + // AWS account credentials + credentials, + client, + dynamodb, + accountTables, + saveTable; + +const DefaultSchema = { + indexes: {}, + models: {}, + queries: {}, + data: [], +} + +const types = { + "String": "S", + "Number": "N", + "Binary": "B", + "Boolean": "BOOL", + "Null": "NULL", + "Map": "M", + "List": "L", + "StringSet": "SS", + "NumberSet": "NS", + "BinarySet": "BS" +} + +/* + Schema defining indexes, entity models. +*/ +var schema = { + indexes: { /* + primary: { hash: 'partition-key-name', sort: 'sort-key-name' } + gs1: { hash: 'partition-key-name', sort: 'sort-key-name' } + */ }, + models: { /* + map String. Either simple attribute name or "attribute.property". + default String. Default value string or function. + foreign String. Reference to another entity model (model:keys) + nulls Boolean. Allow property to be set to null. + required Boolean. Attribute is always required. + size Number. Maximum size of the data value + type String: String, Boolean, Number, Date, Set, Buffer, Binary, Set, Object, Array + validate String. Regular expression to match data (/regexp/qualifiers) + value String|Function. Value string template, function (mapping function) + unique Boolean. Attribute must have a unique value + + // Not proposed to implement + crypt Boolean + enum Array of values + filter Boolean. Prevent a property from being used in a filter + hidden Boolean Don't return the attributes to API callers. + transform Transform hook function + uuid ‘uuid | ulid | ksuid' + */ }, + + // Present on import / export + queries: {}, + data: {}, +} \ No newline at end of file diff --git a/static/files/visualizer/js/jquery-3.5.1.min.js b/static/files/visualizer/js/jquery-3.5.1.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/static/files/visualizer/js/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"
Primary Key' + sort_key + '
' + dispVal + '' + dispVal + '' + var tail = ""; + + // if this is a new attribute then it needs to be editable + if (isTable && name == "~new~") { + cellId[id] = { + PK: getValue(obj[partition_key]), + SK: getValue(obj[sort_key]), + attr: "new", + type: type, + obj: obj + } + + // store attribute name cell id in the focus pointer + selectId = cellId[id]; + + // wrap the attribute name in a contenteditable div and hook the relevant event handlers + header += '
'; + tail = "
"; + } + + // finish the header cell + header += name + tail + '
' + dispVal + '...
Attributes' + backDiv + '
' + partition_key + '
","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0= 0) { + alert("Map Functions cannot reference the destination attribute."); + return; + } + + var valueTemplate = $("#txtMapFunction").val(); + debugger; + makeChange(); + createMapping(alertData.data.type, alertData.caller, valueTemplate); + loadDataModel(); + + $("#txtMapFunction").val(""); + $("#lblEditMap").text("Mapping Function:"); + $("#selectTypeDiv").hide(); + $("#defineValueTemplateDiv").hide(); + }); + + // generic click handler for Cancel buttons + $('.cancel').bind('click', function(evt) { + $("#createTableOrIndex").hide(); + $("#fileDiv").hide(); + $("#selectTableDiv").hide(); + $("#createModelDiv").hide(); + $("#alertModal").hide(); + $("#removeAttributeModal").hide(); + $("#oneTableModal").hide(); + $("#defineValueTemplateDiv").hide(); + $("#txtMapFunction").val(""); + $("#lblEditMap").text("Mapping Function:"); + $("#selectTypeDiv").hide(); + $("#txtMapFunction").prop("disabled", false); + $("#btnDefineMap").prop("disabled", false); + $("#schemaTableDiv").hide(); + $("#modelDiv").hide(); + + initQuery(); + }); + + // click handler for Create Model + $("#btnCreateModel").click(function (evt) { + // initialize the current model + model = {}; + + // populate metadata from the form and set created timestamp + model.ModelName = $("#txtModelName").val(); + var date = new Date(); + model.ModelMetadata = { + "Author": $("#txtModelAuthor").val(), + "DateCreated": date, + "DateLastModified": date, + "Description": $("#txtModelDesc").val(), + "AWSService": "Amazon DynamoDB", + "Version": "2.0" + }; + + // initialize Model change buffer and add a new Table + tableChanges = {}; + addTable(); + + $("#createModelDiv").hide(); + }); + + // hook the onchange event handler for the view table dropdown + $("#viewTable").change(function (event) { + $("#selectTableDiv").hide(); + + if ($("#viewTable").val() == "-1") { + // if create table was selected then fire add table dialog + $("#selectTableDiv").hide(); + addTable(); + } + else { + // set the modelIndex to load + modelIndex = parseInt($("#viewTable").val()); + + // initialize tab index and load the selected data model + loadDataModel(); + } + + findDataModels(); + + }); + + $("#createTableOrIndex").find(".input_key_select").on('change', function() { + var sel = $(this).val(); + if (sel == "include") { + $(".inputkey_group").show(); + gsi_attrkey = "include"; + } else { + $(".inputkey_group").hide(); + gsi_attrkey = "all"; + } + gsi_attrlist = []; + }); + + // click handler for Create Table + $("#createTableOrIndex").find(".btn_tablecreate").on('click', function() { + var definition = {}, + isTable = $("#title h1").text() == "Create Table"; + + if ($('.gsi_primary').val() == '') { + alert("Please provide a patition key!"); + return; + } + + if ($('.cgi_title').val() == '') { + alert("Please provide a name"); + return; + } + + definition.KeyAttributes = {}; + let indexName = $('.cgi_title').val(); + definition[isTable ? "TableName" : "IndexName"] = indexName + definition.KeyAttributes.PartitionKey = { + "AttributeName": $('.gsi_primary').val(), + "AttributeType": $('#dropPart').val() + }; + definition.KeyAttributes.SortKey = { + "AttributeName": $('.gsi_sort').val(), + "AttributeType": $('#dropSort').val() + }; + + if (!isTable) { + definition["Projection"] = { + "ProjectionType": "ALL" + }; + + makeChange(); + datamodel.GlobalSecondaryIndexes.push(definition); + schema.indexes[indexName] = { + hash: $('.gsi_primary').val(), + sort: $('.gsi_sort').val(), + projection: 'ALL', + } + } else { + datamodel = { + "TableName": definition.TableName, + "KeyAttributes": definition.KeyAttributes, + "NonKeyAttributes":[], + "GlobalSecondaryIndexes": [], + "TableData": [] + }; + + if (model.DataModel == null) + model.DataModel = [] + + model.DataModel.push(datamodel); + modelIndex = model.DataModel.length - 1; + + json_data = datamodel.TableData; + + table.name = definition.TableName; + table.partition_key = $('.gsi_primary').val(); + table.sort_key = $('.gsi_sort').val(); + table.sortkey_datatype = $('.dropSort').val(); + tableChanges[datamodel.TableName] = []; + + schema.indexes.primary = { + hash: $('.gsi_primary').val(), + sort: $('.gsi_sort').val(), + } + addItem("~new~"); + } + $("#createTableOrIndex").find('.key_input').val(''); + $('#createTableOrIndex').toggle(); + + findDataModels(); + loadDataModel(); + }); + + $("#createTableOrIndex").find(".btn_attrkey").on("click", function() { + gsi_attrkey = $("#createTableOrIndex").find(".input_key_select").val(); + var html = ''; + var atrkey = $("#createTableOrIndex").find(".attrkey_input").val(); + if (atrkey.trim() == '') { + alert("Please input key"); + return; + } + if (gsi_attrkey == 'include') { + html = '
  • ' + atrkey + '
  • '; + gsi_attrlist.push(atrkey); + } else { + + } + }); + + $("#loadModel").on('click', function() { + $("#mySidenav").css("width","0"); + $("#saveCredsDiv").hide(); + $("#fileDiv").show(); + + $("#fileType").text("Load Model"); + $("#loadType").text("Select a model:"); + + alertData.caller = "loadModel"; + }); + + $("#loadCreds").on('click', function() { + $("#mySidenav").css("width","0"); + $("#saveCredsDiv").prop('checked', false); + $("#saveCredsDiv").show(); + $("#fileDiv").show(); + + $("#fileType").text("Load Credentials"); + $("#loadType").text("Select credentials file:"); + + alertData.caller = "loadCreds"; + }); + + $("#saveToTable").on('click', function() { + alertData.caller = "save"; + $("#lblLoadSave").text("Save to Table"); + $("#mySidenav").css("width","0"); + $("#schemaTableDiv").show(); + }); + + $("#loadFromTable").on('click', function() { + alertData.caller = "load"; + $("#selectModel").val("none"); + $("#lblLoadSave").text("Load from Table"); + $("#mySidenav").css("width","0"); + $("#schemaTableDiv").show(); + }); + + $(".addGSI").on('click', function() { + $("#mySidenav").css("width","0"); + $("#title h1").text("Create Index"); + $("#idx_lbl").text("Index name:"); + $("#tbSort").show(); + $("#dropSort").show(); + $("#projection_cfg").show(); + $('#createTableOrIndex').toggle(); + }); + + $("#createModel").on('click', function() { + $("#mySidenav").css("width","0"); + if (model.ModelName != null) { + alertData = { + caller: "createModel", + data: "" + }; + + $("#alertTitle h1").text("Model Overwrite"); + $("#alertText").text("The existing model will be overwritten, continue?"); + + $("#alertModal").show(); + } + else + $("#createModelDiv").show(); + }); + + $("#saveModel").on('click', function() { + $("#mySidenav").css("width","0"); + saveModel(); + }); + + $("#clearIdx").on('click', function() { + $("#mySidenav").css("width","0"); + datamodel.GlobalSecondaryIndexes = []; + loadDataModel(); + }); + + $("#importSchema").on('click', function() { + $("#oneTableModal").show(); + }); + + $("#showValues").on('click', function(e) { + showValues = !showValues + showTable(); + $("#showValuesCheckbox").prop("checked", showValues); + e.preventDefault() + }); + + $("#showValuesCheckbox").prop("checked", true); + + $("#exportSchema").on('click', function() { + $("#mySidenav").css("width","0"); + exportOneTableSchema(); + }); + + $("#reload").on('click', function() { + location.reload(); + }); +}); \ No newline at end of file diff --git a/static/files/visualizer/js/query.js b/static/files/visualizer/js/query.js new file mode 100644 index 0000000..d40ab36 --- /dev/null +++ b/static/files/visualizer/js/query.js @@ -0,0 +1,365 @@ +// show the query modal +function showQuery(caller) { + initQuery(); + + $("#selectQuery").show(); + $("#queryDiv").show(); +} + +// reset the query modal +function initQuery() { + if (!model.DataModel) return; + var name = model.DataModel[modelIndex].TableName; + + $(".remove").remove(); + $("#selectQuery").val($("#selectQuery option:first").val()); + $("#selectTableOrIndex").val($("#selectTableOrIndex option:first").val()); + $("#selectOp").val($("#selectOp option:first").val()); + $("#filterOp").val($("#filterOp option:first").val()); + $("#selectAttrType").val($("#selectAttrType option:first").val()); + + $("#txtQueryName").val(""); + $("#txtPKval").val(""); + $("#txtSKval").val(""); + $("#txtSKendVal").val(""); + $("#txtFilterAttr").val(""); + $("#txtFilterValue").val(""); + $("#txtFilterEndValue").val(""); + $("#btnAddFilter").hide(); + $("#btnAddSort").hide(); + $("#queryConditions").css("display", "none"); + $("#skDiv").css("display", "none"); + $("#filterArea").css("display", "none"); + $("#queryDiv").hide(); + + match_data = []; + loadDataModel(); + + $("#selectTableOrIndex").append(``); + $.each(model.DataModel[modelIndex].GlobalSecondaryIndexes, function (idx, gsi) { + $("#selectTableOrIndex").append(``) + }); + + $.each(datamodel.SavedQuery, function (name, query) { + $("#selectQuery").append(``) + }); + $("#selectQuery").append(``); +} + +// show second value textbox if this is a between +function setOp(type) { + if (type == 'sort') { + if ($("#selectOp").val() == 'between') { + $("#lblSKendVal").css("visibility", "visible"); + $("#txtSKendVal").css("visibility", "visible"); + } else { + $("#lblSKendVal").css("visibility", "hidden"); + $("#txtSKendVal").css("visibility", "hidden"); + } + } else { + $.each($(".filterOp"), function (idx, select) { + if (select.value == 'between') { + $("#lblFilterEndVal" + select.id.substring(8)).css("visibility", "visible"); + $("#txtFilterEndVal" + select.id.substring(8)).css("visibility", "visible"); + } else { + $("#lblFilterEndVal" + select.id.substring(8)).css("visibility", "hidden"); + $("#txtFilterEndVal" + select.id.substring(8)).css("visibility", "hidden"); + } + }); + } +} + +// make the sort condition area visible +function addSortCondition() { + $("#btnAddSort").hide(); + $("#skDiv").show(); +} + +// add a filter to the query modal +function addFilter() { + if ($("#filterArea").is(":hidden")) { + numFilters = 0; + $("#filterArea").show(); + } + else { + var clone = $("#filterDiv").clone(true); + clone.attr("id", "filterDiv" + numFilters); + clone.attr("class", "filterDiv remove"); + $("#selectFilter").append(clone); + $("#filterDiv" + numFilters).find(">:first-child").show(); + + $.each($("#filterDiv" + numFilters).children(), function (idx, child) { + child.id = child.id + numFilters; + }); + + $("#selectFilter" + numFilters).val($("#selectFilter" + numFilters + " option:first").val()); + $("#selectAttrType" + numFilters).val($("#selectAttrType" + numFilters + " option:first").val()); + $("#txtFilterVal" + numFilters).val(""); + $("#txtFilterEndVal" + numFilters).val(""); + $("#txtFilterAttr" + numFilters).val(""); + + $("#lblFilterEndVal" + numFilters).css("visibility", "hidden"); + $("#txtFilterEndVal" + numFilters).css("visibility", "hidden"); + + numFilters++; + } + + $("#selectFilter").scrollTop($("#selectFilter")[0].scrollHeight); +} + +// create a query object +function buildQuery() { + var query = {}, + test = {}; + + query.view = $("#selectTableOrIndex").val(); + query.PK = $("#txtPKval").val(); + if ($("#selectOp").val() != null) { + query.SK = {}; + query.SK.condition = $("#selectOp").val(); + query.SK.values = []; + query.SK.values.push($("#txtSKval").val()); + + if ( query.SK.condition == "between" ) + query.SK.values.push($("#txtSKendVal").val()); + } + + query.filter = []; + + $.each($(".filterDiv"), function (count, div) { + if (!$("#filterArea").is(":visible")) + return; + + var divId = count > 0 ? count - 1 : ""; + + if (divId >= 0) + test.operator = $("#selectAndOr" + divId).val(); + + test.attribute = $("#txtFilterAttr" + divId).val(); + test.type = $("#selectAttrType" + divId).val(); + test.condition = $("#filterOp" + divId).val(); + test.values = []; + test.values.push($("#txtFilterVal" + divId).val()); + + if (test.condition == "between") + test.values.push($("#txtFilterEndVal" + divId).val()); + + query.filter.push(test); + test = {}; + }); + + if (!datamodel.hasOwnProperty("SavedQuery")) + datamodel.SavedQuery = {}; + + if ($("#txtQueryName").val() != "") + datamodel.SavedQuery[$("#txtQueryName").val()] = query; + + runQuery($("#txtQueryName").val()); +} + +// load a query object into the query modal +function setConditions() { + var query = $("#selectQuery").val(); + + $("#selectQuery").css("display", "none"); + + $("#queryConditions").show(); + $("#btnAddFilter").show(); + $("#btnAddSort").show(); + + if (query == "new") { + $("#lblQueryName").show(); + $("#txtQueryName").show(); + return; + } + + $("#txtQueryName").val(query); + query = datamodel.SavedQuery[query]; + $("#selectTableOrIndex").val(query.view); + $("#txtPKval").val(query.PK); + + if (query.hasOwnProperty("SK")) { + $("#skDiv").show(); + $("#btnAddSort").hide(); + $("#selectOp").val(query.SK.condition); + $("#txtSKval").val(query.SK.values[0]); + + $("#txtSKendVal").css("display", "none"); + + if (query.SK.condition == "between") { + $("#txtSKendVal").val(query.SK.values[1]); + $("#txtSKendVal").show(); + } + } + + $.each(query.filter, function (idx, test) { + var divId = idx > 0 ? idx - 1 : ""; + addFilter(); + + if (divId != "") + $("#selectAndOr" + divId).val(test.operator); + + $("#txtFilterAttr" + divId).val(test.attribute); + $("#selectAttrType" + divId).val(test.type); + $("#filterOp" + divId).val(test.condition); + $("#txtFilterVal" + divId).val(test.values[0]); + + if (test.condition == "between") + $("#txtFilterEndVal" + divId).val(test.values[1]); + }); +} + +// execute the query and display the result +function runQuery(name) { + var query = datamodel.SavedQuery[name], + PK = "", + SK = ""; + + match_data = []; + json_data = datamodel.TableData; + + if (query.view == datamodel.TableName) { + PK = table.partition_key; + SK = table.sort_key + } else { + $.each(datamodel.GlobalSecondaryIndexes, function (idx, gsi) { + if (gsi.IndexName == query.view) { + PK = gsi.KeyAttributes.PartitionKey.AttributeName; + SK = gsi.KeyAttributes.SortKey.AttributeName; + return false; + } + }); + } + + $.each(json_data, function (idx, item) { + if (item.hasOwnProperty(PK) && getValue(item[PK]) == query.PK) { + var test = {}, + pass = true; + + // test the sort condition if there is one + if (query.hasOwnProperty("SK")) { + test.type = table.sortkey_datatype; + test.attribute = table.sort_key; + test.values = query.SK.values; + test.condition = query.SK.condition; + pass = evaluate(item, test); + } + + if (pass) { + // test each filter condition + $.each(query.filter, function (idx, filter) { + if (filter.operator == "OR") + if (pass) + // if pass is still true on an OR operator the test is done + return false; + else + // if pass is false on OR operator then set it to true and continue testing + pass = true; + + if (pass) + pass = evaluate(item, filter); + }); + } + + // add the item if it passed all condition checks + if (pass) + match_data.push(item); + } + }); + + $("#queryDiv").hide(); + $("#runQueryDiv").hide(); + $(".remove").remove(); + $("#filterArea").hide(); + loadDataModel(); +} + +// evaluate whether an item passes a test or not +function evaluate(item, test) { + var value = "", + comparevalues = []; + + switch (test.type) { + case "Boolean": + value = getValue(item[test.attribute]) == true; + $.each(test.values, function (idx, value) { + test.values[idx].replace(value == "true"); + }); + break; + + case "N": + case "Number": + value = parseFloat(getValue(item[test.attribute])); + $.each(test.values, function (idx, value) { + test.values[idx].replace(parseFloat(value)); + }); + break; + + case "S": + case "String": + value = getValue(item[test.attribute]); + break; + } + + var testVal = false; + switch (test.condition) { + case ">": + if (value > test.values[0]) + testVal = true; + break; + + case ">=": + if (value >= test.values[0]) + testVal = true; + break; + + case "<": + if (value < test.values[0]) + testVal = true; + break; + + case "<=": + if (value <= test.values[0]) + testVal = true; + break; + + case "=": + if (value == test.values[0]) + testVal = true; + break; + + case "begins": + if (value.startsWith(test.values[0])) + testVal = true; + break; + + case "between": + var startVal = test.values[0], + endVal = test.values[1]; + + if (startVal > endVal) { + startVal = endVal; + endVal = test.values[0]; + } + + if (value > test.values[0] && value < test.values[1]) + testVal = true; + break; + + case "contains": + if (value.indexOf(test.values[0]) >= 0) + testVal = true; + break; + + case "in": + $.each(test.values, function (idx, val) { + if (value == val) { + testVal = true; + return false; + } + }); + break; + } + + return testVal; +} \ No newline at end of file