diff --git a/package-lock.json b/package-lock.json index ac483b7..7602e80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,9 @@ "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==" }, "cuffeo": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/cuffeo/-/cuffeo-1.0.7.tgz", - "integrity": "sha512-9XpEUnN9jIfaiIMJwcfPW61PxTxBJUoa9VN/TjiWk7Z/jNStdrlPTdn6Y2cdclsWsHtAyabHdCNUAHscQ89WCQ==", + "version": "1.0.7-2", + "resolved": "https://registry.npmjs.org/cuffeo/-/cuffeo-1.0.7-2.tgz", + "integrity": "sha512-4ZrP6C5jpCu7+UtgB3rJl5wZJ48FSrdaTVgyx7bPtC0gMcEm0O5NcCjiZkJDvbLqsN92LAywFoGmdjt/rXG9EA==", "requires": { "flumm-fetch-cookies": "^1.3.5" } diff --git a/package.json b/package.json index 7acc4a6..919863e 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "author": "Flummi", "license": "MIT", "dependencies": { - "cuffeo": "^1.0.7", + "cuffeo": "^1.0.7-2", "flumm-fetch-cookies": "^1.4.0", "mariadb": "^2.5.2" } diff --git a/public/s/css/f0ck-custom.css b/public/s/css/f0ck-custom.css index 19d61eb..f057669 100644 --- a/public/s/css/f0ck-custom.css +++ b/public/s/css/f0ck-custom.css @@ -1,146 +1,161 @@ /* written by sirx for f0ck.me */ /* use whatever you like */ ul#posts { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); - grid-gap: 1em; - list-style: none; - padding: 0; - margin-top: 10px; + display: grid; + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + grid-gap: 1em; + list-style: none; + padding: 0; + margin-top: 10px; } .navbar { - background-color: #1b1b1b; - position: sticky; - top: 0; - z-index: 1; - font-family: monospace; - text-transform: uppercase; - text-shadow: 1px 1px black; + background-color: #1b1b1b; + position: sticky; + top: 0; + z-index: 1; + font-family: monospace; + text-transform: uppercase; + text-shadow: 1px 1px black; } body { - background-color: black; - color: white; + background-color: black; + color: white; } html { - background-color: black; + background-color: black; } .container.is-fluid { - padding-top: 10px; + padding-top: 10px; } li.post { - position: relative; + position: relative; } span.item-mime { - position: absolute; - right: 0; - top: 0; - color: #68da20; - text-shadow: 1px 1px black; - font-size: 11px; - text-transform: uppercase; - background: #000000b8; - visibility: hidden; + position: absolute; + right: 0; + top: 0; + color: #68da20; + text-shadow: 1px 1px black; + font-size: 11px; + text-transform: uppercase; + background: #000000b8; + visibility: hidden; } li.post:hover > span.item-mime { - visibility: visible; + visibility: visible; } a.navbar-item:focus, a.navbar-item:focus-within, a.navbar-item:hover, a.navbar-item.is-active, .navbar-link:focus, .navbar-link:focus-within, .navbar-link:hover, .navbar-link.is-active { - background-color: #000000; - color: #ffffff; + background-color: #000000; + color: #ffffff; } a#next, a#prev { - position: relative; - font-weight: normal; - top: 0px; - bottom: 932px; - margin: unset; - font-size: 30px; - color: #99ff00; - padding: 140px 40px 140px 40px; - cursor: pointer; - -webkit-transform: translateZ(0); - align-content: inherit; - align-self: center; - bottom: 0; + position: relative; + font-weight: normal; + top: 0px; + bottom: 932px; + margin: unset; + font-size: 30px; + color: #99ff00; + padding: 140px 40px 140px 40px; + cursor: pointer; + align-content: inherit; + align-self: center; + bottom: 0; } a#next, a#prev { - position: sticky; - top: 0; + position: sticky; + top: 0; } .content { - display: grid; - justify-content: space-around; - grid-template-columns: 0fr 1fr 0fr; + display: grid; + justify-content: space-around; + grid-template-columns: 0fr 1fr 0fr; } .previous-post, .next-post { - display: flex; + display: flex; } img#f0ck-image { - max-width: 100%; - max-height: 500px; + max-width: 100%; + max-height: 500px; } .metadata { - text-align: center; - position: sticky; - bottom: 0; + text-align: center; + position: sticky; + bottom: 0; } a:hover { - color: #99ff00; - opacity: 0.8; + color: #99ff00; + opacity: 0.8; } a { - color: #99ff00; - cursor: pointer; - text-decoration: none; + color: #99ff00; + cursor: pointer; + text-decoration: none; } .navbar-item, .navbar-link { - color: white; - text-shadow: 1px 1px black; + color: white; + text-shadow: 1px 1px black; } .media-object { - text-align: center; - align-self: center; + text-align: center; + align-self: center; } /*a.id-link { - padding-right: 5; +padding-right: 5; }*/ div#my-video { -max-height: unset; + max-height: unset; } -.box:not(:last-child), .content:not(:last-child), .notification:not(:last-child), .progress:not(:last-child), .table:not(:last-child), .table-container:not(:last-child), .title:not(:last-child), .subtitle:not(:last-child), .block:not(:last-child), .highlight:not(:last-child), .breadcrumb:not(:last-child), .level:not(:last-child), .list:not(:last-child), .message:not(:last-child), .pagination:not(:last-child), .tabs:not(:last-child) { - margin-bottom: 0; - margin-top: 0; +.box:not(:last-child), +.content:not(:last-child), +.notification:not(:last-child), +.progress:not(:last-child), +.table:not(:last-child), +.table-container:not(:last-child), +.title:not(:last-child), +.subtitle:not(:last-child), +.block:not(:last-child), +.highlight:not(:last-child), +.breadcrumb:not(:last-child), +.level:not(:last-child), +.list:not(:last-child), +.message:not(:last-child), +.pagination:not(:last-child), +.tabs:not(:last-child) { + margin-bottom: 0; + margin-top: 0; } .video-container { position: relative; - padding-bottom: 56.25%; /*16:9*/ - padding-top: 30px; - height: 0; + padding-bottom: 56.25%; + /*16:9*/ + padding-top: 30px; + height: 0; overflow: hidden; } - + .video-container video { position: absolute; top: 0; @@ -150,189 +165,516 @@ max-height: unset; } .irc { - padding: 10px; - color: white; + padding: 10px; + color: white; } a#next:hover { - box-shadow: -1px 0px #99ff001c; - transition: all .2s; + box-shadow: -1px 0px #99ff001c; + transition: all .2s; } a#prev:hover { - box-shadow: 1px 0px #99ff001c; - transition: all .2s; + box-shadow: 1px 0px #99ff001c; + transition: all .2s; } .navbar-brand a.navbar-item:focus, .navbar-brand a.navbar-item:hover { - background-color: black; + background-color: black; } .controls { - text-align: center; + text-align: center; } .content { - min-height: 517px; + min-height: 517px; } #themeselector { - color: #fff; - background-color: #343a40; - display: inline-block; - font-weight: 600; - line-height: 1; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: 0.25rem; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; - border: 0; - outline: 0; + color: #fff; + background-color: #343a40; + display: inline-block; + font-weight: 600; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 0.25rem; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + border: 0; + outline: 0; } select { - font-size: small; + font-size: small; } @media (max-width: 600px) { - a#next, a#prev { - padding: 0; - } + a#next, a#prev { + padding: 0; + } - .content { - min-height: 0; - } + .content { + min-height: 0; + } } img#biohaz { - width: 28px; + width: 28px; } .metadata { - background: #1b1b1b; - border-top: 1px solid #262626; + background: #1b1b1b; + border-top: 1px solid #262626; } .content { - border-left: 1px solid #1b1b1b; - border-right: 1px solid #1b1b1b; + border-left: 1px solid #1b1b1b; + border-right: 1px solid #1b1b1b; } .controls { - border-left: 1px solid #1b1b1b; - border-right: 1px solid #1b1b1b; + border-left: 1px solid #1b1b1b; + border-right: 1px solid #1b1b1b; } - #themeselector { - padding: 0.04em 0.2em; - vertical-align: top; - font-weight: 560; + padding: 0.04em 0.2em; + vertical-align: top; + font-weight: 560; } span.badge.badge-dark { - margin-right: 5px; + margin-right: 5px; } .badge-dark, #themeselector { - color: #fff; - background-color: #000000; - border-radius: 0; - border-left: 1px solid #262626; - border-right: 1px solid #262626; - border-top: 1px solid #000; - border-bottom: 1px solid #262626; + color: #fff; + background-color: #000000; + border-radius: 0; + border-left: 1px solid #262626; + border-right: 1px solid #262626; + border-top: 1px solid #000; + border-bottom: 1px solid #262626; } + .video-js .vjs-control-bar { - background-color: #1b1b1b !important; + background-color: #1b1b1b !important; } a#rndbtn { - color: #fff; - background-color: #1b1b1b; - border-radius: 0; - border-left: 1px solid #262626; - border-right: 1px solid #262626; - border-top: 1px solid #262626; - border-bottom: 1px solid #262626; - padding: 0px 5px 0px 5px; - text-decoration: none; + color: #fff; + background-color: #1b1b1b; + border-radius: 0; + border-left: 1px solid #262626; + border-right: 1px solid #262626; + border-top: 1px solid #262626; + border-bottom: 1px solid #262626; + padding: 0px 5px 0px 5px; + text-decoration: none; } .contact { - border-left: 1px solid #1b1b1b; - border-right: 1px solid #1b1b1b; - border-bottom: 1px solid #1b1b1b; - padding: 5px; + border-left: 1px solid #1b1b1b; + border-right: 1px solid #1b1b1b; + border-bottom: 1px solid #1b1b1b; + padding: 5px; } .irc { - border-left: 1px solid #1b1b1b; - border-right: 1px solid #1b1b1b; - border-bottom: 1px solid #1b1b1b; - padding: 5px; + border-left: 1px solid #1b1b1b; + border-right: 1px solid #1b1b1b; + border-bottom: 1px solid #1b1b1b; + padding: 5px; } /* Testing Area */ .content { - position: relative; + position: relative; } a#next { - top: 0; - position: absolute; - z-index: 1; - left: 0; - background: transparent; - width: 25%; - height: 95%; + top: 0; + position: absolute; + z-index: 1; + left: 0; + background: transparent; + width: 25%; + height: 95%; } a#prev { - position: absolute; - z-index: 1; - right: 0; - background: transparent; - width: 25%; - height: 95%; + position: absolute; + z-index: 1; + right: 0; + background: transparent; + width: 25%; + height: 95%; } .vjs-control-bar { - z-index: 2; + z-index: 2; } .arrow-prev { - height: 100%; - display: flex; - width: 100%; - align-items: center; - justify-content: end; + height: 100%; + display: flex; + width: 100%; + align-items: center; + justify-content: end; } .arrow-next { - height: 100%; - display: flex; - width: 100%; - align-items: center; - justify-content: start; + height: 100%; + display: flex; + width: 100%; + align-items: center; + justify-content: start; } - a#next:hover { - opacity: 1; - box-shadow: none; + opacity: 1; + box-shadow: none; } a#next { - opacity: 0.2; + opacity: 0.2; } a#prev:hover { - opacity: 1; - box-shadow: none; + opacity: 1; + box-shadow: none; } a#prev { - opacity: 0.2; + opacity: 0.2; +} + +/* pagination */ +.pagination { + padding: 8px; + background-clip: padding-box; + border: 1px solid; + border-color: #070809 #0d0e0f #131517; + border-color: rgba(0, 0, 0, 0.8) rgba(0, 0, 0, 0.65) rgba(0, 0, 0, 0.5); + border-radius: 3px; + display: inline-block; + vertical-align: baseline; + zoom: 1; *display: inline; + *vertical-align: auto; + background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0)); + background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0)); + background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0)); + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0)); + -webkit-box-shadow: 0 1px rgba(255, 255, 255, 0.05); + box-shadow: 0 1px rgba(255, 255, 255, 0.05); +} + +.pagination > a, .pagination > span { + float: left; + margin-left: 5px; + padding: 0 6px; + min-width: 17px; + line-height: 27px; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-size: 12px; + font-weight: 500; + color: #68da20; + text-align: center; + text-decoration: none; + border: 1px solid black; + border-radius: 3px; +} + +.pagination :first-child { + margin-left: 0; +} + +.pagination > a { + text-decoration: none; + text-shadow: 0 1px black; + background-clip: padding-box; + border-color: rgba(0, 0, 0, 0.9); + background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)); + background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)); + background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)); + background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)); + -webkit-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px rgba(255, 255, 255, 0.04), inset 0 -1px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px rgba(255, 255, 255, 0.04), inset 0 -1px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.1); + -webkit-transition: 0.1s ease-out; + -moz-transition: 0.1s ease-out; + -o-transition: 0.1s ease-out; + transition: 0.1s ease-out; +} + +.pagination > a:hover { + background-color: #333; + background-color: rgba(255, 255, 255, 0.05); +} + +.pagination > span, .pagination > a:active { + color: #68da20; + text-shadow: 0 -1px black; + background: #1c1c1c; + background: rgba(255, 255, 255, 0.01); + border-color: black rgba(0, 0, 0, 0.65) rgba(0, 0, 0, 0.6); + -webkit-box-shadow: inset 0 1px rgba(0, 0, 0, 0.05), inset 0 2px 2px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.06); + box-shadow: inset 0 1px rgba(0, 0, 0, 0.05), inset 0 2px 2px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.06); +} + +.pagination .prev, .pagination .next { + font-family: Noteworthy, Arial, sans-serif; + font-size: 14px; +} + +@font-face { + font-family: 'VCR'; + src: url('/s/vcr.ttf') format('truetype'); +} + +span#f0ck { + font-family: 'VCR'; + font-size: xx-large; + text-shadow: 1px 1px 1px black, 0px 0px 0px #9f0, -1px -1px 0px black, 1px -1px 0px black, -1px 1px 0px black, 0px 0px 0px #9f0; +} + +.navbar-brand { + padding-bottom: 0; +} + +/* nav overhaul */ +.nav-item { + width: 100%; + text-align: center +} + +.navbar-brand { + padding-top: 0 +} + +.navbar-nav.mr-auto { + flex-flow: row; + justify-content: space-between +} + +.navbar.navbar-expand-lg { + background: #242424 +} + +.navigation-links { + display: flex; + background: #232323; + background-image: none; + border-radius: 3px; + border: 1px solid #000; + background-image: linear-gradient(to bottom,rgba(0,0,0,.12),rgba(0,0,0,0)); + -webkit-box-shadow: 0 1px rgba(255,255,255,.05); + box-shadow: 0 1px rgba(255,255,255,.05); + border: 1px solid; + border-top-color: currentcolor; + border-right-color: currentcolor; + border-bottom-color: currentcolor; + border-left-color: currentcolor; + border-top-color: currentcolor; + border-right-color: currentcolor; + border-bottom-color: currentcolor; + border-left-color: currentcolor; + border-color: #070809 #0d0e0f #131517; + border-color: rgba(0,0,0,.8) rgba(0,0,0,.65) rgba(0,0,0,.5); + border-radius: 3px +} + +.nav-link { + padding: 0; + display: flex; + border: 1px solid #000; + border-radius: 3px; + transition: .1s ease-out +} + +.nav-link { + min-width: 17px; + line-height: 27px; + background-image: -webkit-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0)); + background-image: -moz-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0)); + background-image: -o-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0)); + background-image: linear-gradient(to bottom,rgba(255,255,255,.04),rgba(255,255,255,0)); + -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),inset 0 1px rgba(255,255,255,.04),inset 0 -1px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.1) +} + +.nav-item:hover>a:hover { + background-color: #333; + background-color: rgba(255,255,255,.05) +} + +.navbar-nav { + padding: 5px +} + +.nav-item { + width: 100%; + text-align: center +} + +#navbarSupportedContent { + padding: 5px +} + +.pagination-container-fluid { + display: flex; + margin-left: 15px +} + +.navbar-expand-lg .navbar-nav .nav-link { + padding-right: .5rem; + padding-left: .5rem; + margin-right: 5px; + margin-left: 5px +} + +.pagination { + padding: 5px; + background-clip: padding-box; + border: 1px solid; + border-color: #070809 #0d0e0f #131517; + border-color: rgba(0,0,0,.8) rgba(0,0,0,.65) rgba(0,0,0,.5); + border-radius: 3px; + display: inline-block; + vertical-align: baseline; + zoom:1;background-image: -webkit-linear-gradient(top,rgba(0,0,0,.12),rgba(0,0,0,0)); + background-image: -moz-linear-gradient(top,rgba(0,0,0,.12),rgba(0,0,0,0)); + background-image: -o-linear-gradient(top,rgba(0,0,0,.12),rgba(0,0,0,0)); + background-image: linear-gradient(to bottom,rgba(0,0,0,.12),rgba(0,0,0,0)); + -webkit-box-shadow: 0 1px rgba(255,255,255,.05); + box-shadow: 0 1px rgba(255,255,255,.05) +} + +.pagination>a,.pagination>span { + float: left; + margin-left: 5px; + padding: 0 10px; + min-width: 17px; + line-height: 27px; + font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; + font-size: 12px; + font-weight: 500; + color: #68da20; + text-align: center; + text-decoration: none; + border: 1px solid #000; + border-radius: 3px +} + +.pagination :first-child { + margin-left: 0 +} + +.pagination>a { + text-decoration: none; + text-shadow: 0 1px #000; + background-clip: padding-box; + border-color: rgba(0,0,0,.9); + background-image: -webkit-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0)); + background-image: -moz-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0)); + background-image: -o-linear-gradient(top,rgba(255,255,255,.04),rgba(255,255,255,0)); + background-image: linear-gradient(to bottom,rgba(255,255,255,.04),rgba(255,255,255,0)); + -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),inset 0 1px rgba(255,255,255,.04),inset 0 -1px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.1); + box-shadow: inset 0 0 0 1px rgba(255,255,255,.04),inset 0 1px rgba(255,255,255,.04),inset 0 -1px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.1); + -webkit-transition: .1s ease-out; + -moz-transition: .1s ease-out; + -o-transition: .1s ease-out; + transition: .1s ease-out +} + +.pagination>a:hover { + background-color: #333; + background-color: rgba(255,255,255,.05) +} + +.pagination>a:active,.pagination>span { + color: #68da20; + text-shadow: 0 -1px #000; + background: #1c1c1c; + background: rgba(255,255,255,.01); + border-color: #000 rgba(0,0,0,.65) rgba(0,0,0,.6); + -webkit-box-shadow: inset 0 1px rgba(0,0,0,.05),inset 0 2px 2px rgba(0,0,0,.3),0 1px rgba(255,255,255,.06); + box-shadow: inset 0 1px rgba(0,0,0,.05),inset 0 2px 2px rgba(0,0,0,.3),0 1px rgba(255,255,255,.06) +} + +.pagination .next,.pagination .prev { + font-family: Noteworthy,Arial,sans-serif; + font-size: 14px +} + +.navbar-nav { + width: 100%; + padding: 5px +} + +.nav-link-identifier { + text-align: center; + width: 100% +} + +@media (max-width: 768px) { + ul#posts { + grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); + text-align: center; + padding-top: 5px + } +} + +@media (max-width: 422px) { + ul#posts { + grid-column-gap: 0; + grid-row-gap: 5px + } + + .container-fluid,.container-lg,.container-md,.container-sm,.container-xl { + padding-right: 5px; + padding-left: 5px + } +} + +@media (max-width: 410px) { + ul#posts { + grid-column-gap: 15px; + grid-row-gap: 10px + } + + .container-fluid,.container-lg,.container-md,.container-sm,.container-xl { + padding-right: 15px; + padding-left: 15px + } +} + +@media (max-width: 991px) { + .navbar-nav { + width: 100%; + padding: 0 + } + + .navbar-expand-lg .navbar-nav .nav-link { + margin: 0 + } + + .pagination-container-fluid { + display: flex; + justify-content: center; + padding-top: 5px; + margin-bottom: 0 + } + + .navbar { + padding: .5rem 1rem 0 + } + + .navigation-links { + border-color: transparent transparent transparent + } + + .pagination-container-fluid { + margin-left: 0 + } } diff --git a/public/s/css/style.css b/public/s/css/style.css index e06cdc8..9d7e9b6 100644 --- a/public/s/css/style.css +++ b/public/s/css/style.css @@ -320,4 +320,4 @@ video#player { pre { letter-spacing: 7px; -} \ No newline at end of file +} diff --git a/public/s/img/broken.png b/public/s/img/broken.png new file mode 100755 index 0000000..7114472 Binary files /dev/null and b/public/s/img/broken.png differ diff --git a/public/s/js/bootstrap-native.min.js b/public/s/js/bootstrap-native.min.js new file mode 100644 index 0000000..1ff3ee3 --- /dev/null +++ b/public/s/js/bootstrap-native.min.js @@ -0,0 +1,2 @@ +// Native JavaScript for Bootstrap v3.0.14f | 2021 © dnp_theme | MIT-License +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).BSN=e()}(this,(function(){"use strict";var t="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",e="webkitTransition"in document.head.style||"transition"in document.head.style,i="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",n="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty";function o(t){var o=getComputedStyle(t),a=o[n],s=o[i],l=s.includes("ms")?1:1e3,c=e&&a&&"none"!==a?parseFloat(s)*l:0;return isNaN(c)?0:c}function a(e,i){var n=0,a=new Event(t),s=o(e);s?(e.addEventListener(t,(function o(a){a.target===e&&(i.apply(e,[a]),e.removeEventListener(t,o),n=1)})),setTimeout((function(){!n&&e.dispatchEvent(a)}),s+17)):i.apply(e,[a])}function s(t,e){var i=e&&e instanceof Element?e:document;return t instanceof Element?t:i.querySelector(t)}function l(t,e,i){var n=new CustomEvent(t+".bs."+e,{cancelable:!0});return void 0!==i&&Object.keys(i).forEach((function(t){Object.defineProperty(n,t,{value:i[t]})})),n}function c(t){this&&this.dispatchEvent(t)}function r(t){var e,i=this,n=l("close","alert"),o=l("closed","alert");function r(e){t[e=e?"addEventListener":"removeEventListener"]("click",d,!1)}function d(n){e=n&&n.target.closest(".alert"),(t=s('[data-dismiss="alert"]',e))&&e&&(t===n.target||t.contains(n.target))&&i.close()}function u(){r(),e.parentNode.removeChild(e),c.call(e,o)}i.close=function(){if(e&&t&&e.classList.contains("show")){if(c.call(e,n),n.defaultPrevented)return;i.dispose(),e.classList.remove("show"),e.classList.contains("fade")?a(e,u):u()}},i.dispose=function(){r(),delete t.Alert},t=s(t),e=t.closest(".alert"),t.Alert&&t.Alert.dispose(),t.Alert||r(1),i.element=t,t.Alert=i}function d(t){var e,i=l("change","button");function n(n){var o,a="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(o=a&&a.getElementsByTagName("INPUT")[0]){if(c.call(o,i),c.call(t,i),"checkbox"===o.type){if(i.defaultPrevented)return;o.checked?(a.classList.remove("active"),o.getAttribute("checked"),o.removeAttribute("checked"),o.checked=!1):(a.classList.add("active"),o.getAttribute("checked"),o.setAttribute("checked","checked"),o.checked=!0),t.toggled||(t.toggled=!0)}if("radio"===o.type&&!t.toggled){if(i.defaultPrevented)return;(!o.checked||0===n.screenX&&0==n.screenY)&&(a.classList.add("active"),a.classList.add("focus"),o.setAttribute("checked","checked"),o.checked=!0,t.toggled=!0,Array.from(e).map((function(t){var e=t.getElementsByTagName("INPUT")[0];t!==a&&t.classList.contains("active")&&(c.call(e,i),t.classList.remove("active"),e.removeAttribute("checked"),e.checked=!1)})))}setTimeout((function(){t.toggled=!1}),50)}}function o(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&n(t)}function a(t){32===(t.which||t.keyCode)&&t.preventDefault()}function r(t){if("INPUT"===t.target.tagName){var e="focusin"===t.type?"add":"remove";t.target.closest(".btn").classList[e]("focus")}}function d(e){t[e=e?"addEventListener":"removeEventListener"]("click",n,!1),t[e]("keyup",o,!1),t[e]("keydown",a,!1),t[e]("focusin",r,!1),t[e]("focusout",r,!1)}this.dispose=function(){d(),delete t.Button},(t=s(t)).Button&&t.Button.dispose(),(e=t.getElementsByClassName("btn")).length&&(t.Button||d(1),t.toggled=!1,t.Button=this,Array.from(e).map((function(t){!t.classList.contains("active")&&s("input:checked",t)&&t.classList.add("active"),t.classList.contains("active")&&!s("input:checked",t)&&t.classList.remove("active")})))}var u="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],m=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t,e)}),e)}catch(t){}return t}()&&{passive:!0};function f(t,e){e=e||{};var i,n,r,d,f,h,g,p,v,L=this;function b(){!1===n.interval||t.classList.contains("paused")||(t.classList.add("paused"),!i.isSliding&&(clearInterval(i.timer),i.timer=null))}function y(){!1!==n.interval&&t.classList.contains("paused")&&(t.classList.remove("paused"),!i.isSliding&&(clearInterval(i.timer),i.timer=null),!i.isSliding&&L.cycle())}function w(t){if(t.preventDefault(),!i.isSliding){var e=t.target;if(!e||e.classList.contains("active")||!e.getAttribute("data-slide-to"))return!1;i.index=parseInt(e.getAttribute("data-slide-to")),L.slideTo(i.index)}}function A(t){if(t.preventDefault(),!i.isSliding){var e=t.currentTarget||t.srcElement;e===g?i.index++:e===h&&i.index--,L.slideTo(i.index)}}function T(t){var e=t.which;if(!i.isSliding){switch(e){case 39:i.index++;break;case 37:i.index--;break;default:return}L.slideTo(i.index)}}function E(e){e=e?"addEventListener":"removeEventListener",n.pause&&n.interval&&(t[e](u[0],b,!1),t[e](u[1],y,!1),t[e]("touchstart",b,m),t[e]("touchend",y,m)),n.touch&&f.length>1&&t[e]("touchstart",x,m),g&&g[e]("click",A,!1),h&&h[e]("click",A,!1),p&&p[e]("click",w,!1),n.keyboard&&window[e]("keydown",T,!1)}function k(e){t[e=e?"addEventListener":"removeEventListener"]("touchmove",C,m),t[e]("touchend",N,m)}function x(e){i.isTouch||(i.touchPosition.startX=e.changedTouches[0].pageX,t.contains(e.target)&&(i.isTouch=!0,k(1)))}function C(t){if(i.isTouch)return i.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function N(e){if(i.isTouch&&!i.isSliding&&(i.touchPosition.endX=i.touchPosition.currentX||e.changedTouches[0].pageX,i.isTouch)){if((!t.contains(e.target)||!t.contains(e.relatedTarget))&&Math.abs(i.touchPosition.startX-i.touchPosition.endX)<75)return!1;i.touchPosition.currentXi.touchPosition.startX&&i.index--,i.isTouch=!1,L.slideTo(i.index),k()}}function P(t){Array.from(v).map((function(t){t.classList.remove("active")})),v[t]&&v[t].classList.add("active")}function H(e){if(i.touchPosition){var o=i.index,a=e&&e.target!==f[o]?1e3*e.elapsedTime+100:20,s=L.getActiveIndex(),l="left"===i.direction?"next":"prev";i.isSliding&&setTimeout((function(){i.touchPosition&&(i.isSliding=!1,f[o].classList.add("active"),f[s].classList.remove("active"),f[o].classList.remove("carousel-item-"+l),f[o].classList.remove("carousel-item-"+i.direction),f[s].classList.remove("carousel-item-"+i.direction),c.call(t,d),document.hidden||!n.interval||t.classList.contains("paused")||L.cycle())}),a)}}if(L.cycle=function(){i.timer&&(clearInterval(i.timer),i.timer=null),i.timer=setInterval((function(){var e=i.index||L.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;return e.top<=i&&e.bottom>=0})(t)&&(e++,L.slideTo(e))}),n.interval)},L.slideTo=function(e){if(!i.isSliding){var s,u,m=L.getActiveIndex();m!==e&&(me||m===f.length-1&&0===e)&&(i.direction="right"),e<0?e=f.length-1:e>=f.length&&(e=0),s="left"===i.direction?"next":"prev",u={relatedTarget:f[e],direction:i.direction,from:m,to:e},r=l("slide","carousel",u),d=l("slid","carousel",u),c.call(t,r),r.defaultPrevented||(i.index=e,i.isSliding=!0,clearInterval(i.timer),i.timer=null,P(e),o(f[e])&&t.classList.contains("slide")?(f[e].classList.add("carousel-item-"+s),f[e].offsetWidth,f[e].classList.add("carousel-item-"+i.direction),f[m].classList.add("carousel-item-"+i.direction),a(f[e],H)):(f[e].classList.add("active"),f[e].offsetWidth,f[m].classList.remove("active"),setTimeout((function(){i.isSliding=!1,n.interval&&t&&!t.classList.contains("paused")&&L.cycle(),c.call(t,d)}),100))))}},L.getActiveIndex=function(){return Array.from(f).indexOf(t.getElementsByClassName("carousel-item active")[0])||0},L.dispose=function(){var e=["left","right","prev","next"];Array.from(f).map((function(t,i){t.classList.contains("active")&&P(i),e.map((function(e){return t.classList.remove("carousel-item-"+e)}))})),clearInterval(i.timer),E(),i={},n={},delete t.Carousel},(t=s(t)).Carousel&&t.Carousel.dispose(),f=t.getElementsByClassName("carousel-item"),h=t.getElementsByClassName("carousel-control-prev")[0],g=t.getElementsByClassName("carousel-control-next")[0],p=t.getElementsByClassName("carousel-indicators")[0],v=p&&p.getElementsByTagName("LI")||[],!(f.length<2)){var S=t.getAttribute("data-interval"),B="false"===S?0:parseInt(S),I="false"===t.getAttribute("data-touch")?0:1,M="hover"===t.getAttribute("data-pause")||!1,D="true"===t.getAttribute("data-keyboard")||!1,X=e.interval,W=e.touch;(n={}).keyboard=!0===e.keyboard||D,n.pause=!("hover"!==e.pause&&!M)&&"hover",n.touch=W||I,n.interval="number"==typeof X?X:!1===X||0===B||!1===B?0:isNaN(B)?5e3:B,L.getActiveIndex()<0&&(f.length&&f[0].classList.add("active"),v.length&&P(0)),(i={}).direction="left",i.index=0,i.timer=null,i.isSliding=!1,i.isTouch=!1,i.touchPosition={startX:0,currentX:0,endX:0},E(1),n.interval&&L.cycle(),t.Carousel=L}}function h(t,e){e=e||{};var i,n,o,r,d,u,m=this,f=null,h=null;function g(t,e){c.call(t,d),d.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",t.classList.remove("collapse"),t.classList.remove("show"),t.classList.add("collapsing"),t.offsetWidth,t.style.height="0px",a(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),e.setAttribute("aria-expanded","false"),t.classList.remove("collapsing"),t.classList.add("collapse"),t.style.height="",c.call(t,u)})))}m.toggle=function(e){(e&&"A"===e.target.tagName||"A"===t.tagName)&&e.preventDefault(),(t.contains(e.target)||e.target===t)&&(h.classList.contains("show")?m.hide():m.show())},m.hide=function(){h.isAnimating||(g(h,t),t.classList.add("collapsed"))},m.show=function(){var e,l;f&&(i=f.getElementsByClassName("collapse show")[0],n=i&&(s('[data-target="#'+i.id+'"]',f)||s('[href="#'+i.id+'"]',f))),h.isAnimating||(n&&i!==h&&(g(i,n),n.classList.add("collapsed")),e=h,l=t,c.call(e,o),o.defaultPrevented||(e.isAnimating=!0,e.classList.add("collapsing"),e.classList.remove("collapse"),e.style.height=e.scrollHeight+"px",a(e,(function(){e.isAnimating=!1,e.setAttribute("aria-expanded","true"),l.setAttribute("aria-expanded","true"),e.classList.remove("collapsing"),e.classList.add("collapse"),e.classList.add("show"),e.style.height="",c.call(e,r)}))),t.classList.remove("collapsed"))},m.dispose=function(){t.removeEventListener("click",m.toggle,!1),delete t.Collapse},(t=s(t)).Collapse&&t.Collapse.dispose();var p=t.getAttribute("data-parent");o=l("show","collapse"),r=l("shown","collapse"),d=l("hide","collapse"),u=l("hidden","collapse"),null!==(h=s(e.target||t.getAttribute("data-target")||t.getAttribute("href")))&&(h.isAnimating=!1),f=t.closest(e.parent||p),t.Collapse||t.addEventListener("click",m.toggle,!1),t.Collapse=m}function g(t){t.focus?t.focus():t.setActive()}function p(t,e){var i,n,o,a,r,d,u,m=this,f=null,h=[];function p(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function v(){var e=t.open?"addEventListener":"removeEventListener";document[e]("click",L,!1),document[e]("keydown",y,!1),document[e]("keyup",w,!1),document[e]("focus",L,!1)}function L(e){var i=e.target,n=i&&(i.getAttribute("data-toggle")||i.parentNode&&i.parentNode.getAttribute&&i.parentNode.getAttribute("data-toggle"));("focus"!==e.type||i!==t&&i!==d&&!d.contains(i))&&(i!==d&&!d.contains(i)||!u&&!n)&&(f=i===t||t.contains(i)?t:null,m.hide(),p.call(e,i))}function b(e){f=t,m.show(),p.call(e,e.target)}function y(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function w(e){var i=e.which||e.keyCode,n=document.activeElement,o=n===t,a=d.contains(n),s=n.parentNode===d||n.parentNode.parentNode===d,l=h.indexOf(n);s&&(l=o?0:38===i?l>1?l-1:0:40===i&&l=m,E=h.top+u/2+v/2>=f,k=h.top-u<0,x=h.left-d<0,C=h.top+u+v>=f,N=h.left+d+p>=m;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&x&&N?"top":i)&&k?"bottom":i)&&C?"top":i)&&x?"right":i)&&N?"left":i,-1===e.className.indexOf(i)&&(e.className=e.className.replace(/\b(top|bottom|left|right)+/,i)),c=y.offsetWidth,r=y.offsetHeight,"left"===i||"right"===i?(a="left"===i?h.left+g.x-d-(L?c:0):h.left+g.x+p,w?(o=h.top+g.y,s=v/2-c):E?(o=h.top+g.y-u+v,s=u-v/2-c):(o=h.top+g.y-u/2+v/2,s=u/2-(L?.9*r:r/2))):"top"!==i&&"bottom"!==i||(o="top"===i?h.top+g.y-u-(L?r:0):h.top+g.y+v,A?(a=0,l=h.left+p/2-c):T?(a=m-1.01*d,l=d-(m-h.left)+p/2-c/2):(a=h.left+g.x-d/2+p/2,l=d/2-(L?c:c/2))),e.style.top=o+"px",e.style.left=a+"px",s&&(y.style.top=s+"px"),l&&(y.style.left=l+"px")}function w(t,e){e=e||{};var i,n,o,r,d,f,h,g,p,v,b,w,A,T,E,k,x,C,N,P=this,H=null,S=0,B=/(iPhone|iPod|iPad)/.test(navigator.userAgent),I={};function M(t){null!==H&&t.target===s(".close",H)&&P.hide()}function D(){return{0:e.title||t.getAttribute("data-title")||null,1:e.content||t.getAttribute("data-content")||null}}function X(){null===H&&t.focus()}function W(e){e=e?"addEventListener":"removeEventListener","hover"===I.trigger?(t[e](L,P.show),t[e](u[0],P.show),I.dismissible||t[e](u[1],P.hide)):"click"==I.trigger?t[e](I.trigger,P.toggle):"focus"==I.trigger&&(B&&t[e]("click",X,!1),t[e](I.trigger,P.toggle))}function O(e){H&&H.contains(e.target)||e.target===t||t.contains(e.target)||P.hide()}function R(e){e=e?"addEventListener":"removeEventListener",I.dismissible?document[e]("click",M,!1):("focus"==I.trigger&&t[e]("blur",P.hide),"hover"==I.trigger&&document[e]("touchstart",O,m)),window[e]("resize",P.hide,m)}function j(){R(1),c.call(t,b)}function z(){R(),I.container.removeChild(H),S=null,H=null,c.call(t,A)}P.toggle=function(){null===H?P.show():P.hide()},P.show=function(){clearTimeout(S),S=setTimeout((function(){if(null===H){if(c.call(t,v),v.defaultPrevented)return;!function(){i=D()[0]||null,n=(n=D()[1])?n.trim():null,H=document.createElement("div");var t=document.createElement("div");if(t.classList.add("arrow"),H.appendChild(t),null!==n&&null===I.template){if(H.setAttribute("role","tooltip"),null!==i){var e=document.createElement("h3");e.classList.add("popover-header"),e.innerHTML=I.dismissible?i+p:i,H.appendChild(e)}var o=document.createElement("div");o.classList.add("popover-body"),o.innerHTML=I.dismissible&&null===i?n+p:n,H.appendChild(o)}else{var a=document.createElement("div");a.innerHTML=I.template.trim(),H.className=a.firstChild.className,H.innerHTML=a.firstChild.innerHTML;var l=s(".popover-header",H),c=s(".popover-body",H);i&&l&&(l.innerHTML=i.trim()),n&&c&&(c.innerHTML=n.trim())}I.container.appendChild(H),H.style.display="block",!H.classList.contains("popover")&&H.classList.add("popover"),!H.classList.contains(I.animation)&&H.classList.add(I.animation),!H.classList.contains(N)&&H.classList.add(N)}(),y(t,H,I.placement,I.container),!H.classList.contains("show")&&H.classList.add("show"),I.animation?a(H,j):j()}}),20)},P.hide=function(){clearTimeout(S),S=setTimeout((function(){if(H&&null!==H&&H.classList.contains("show")){if(c.call(t,w),w.defaultPrevented)return;H.classList.remove("show"),I.animation?a(H,z):z()}}),I.delay)},P.dispose=function(){P.hide(),W(),delete t.Popover},(t=s(t)).Popover&&t.Popover.dispose(),o=t.getAttribute("data-trigger"),r=t.getAttribute("data-animation"),d=t.getAttribute("data-placement"),f=t.getAttribute("data-dismissible"),h=t.getAttribute("data-delay"),g=t.getAttribute("data-container"),p='',v=l("show","popover"),b=l("shown","popover"),w=l("hide","popover"),A=l("hidden","popover"),T=s(e.container),E=s(g),k=t.closest(".modal"),x=t.closest(".fixed-top"),C=t.closest(".fixed-bottom"),I.template=e.template?e.template:null,I.trigger=e.trigger?e.trigger:o||"hover",I.animation=e.animation&&"fade"!==e.animation?e.animation:r||"fade",I.placement=e.placement?e.placement:d||"top",I.delay=parseInt(e.delay||h)||200,I.dismissible=!(!e.dismissible&&"true"!==f),I.container=T||(E||(x||(C||(k||document.body)))),N="bs-popover-"+I.placement;var U=D();i=U[0],((n=U[1])||I.template)&&(t.Popover||W(1),t.Popover=P)}function A(t,e){e=e||{};var i,n,o,a,r,d,u=this,f={};function h(){var e,o,a;(n=r.getElementsByTagName("A"),i.scrollTop=i.isWindow?b().y:t.scrollTop,i.length!==n.length||p()!==i.scrollHeight)&&(i.items=[],i.offsets=[],i.scrollHeight=p(),i.maxScroll=i.scrollHeight-(i.isWindow?window.innerHeight:t.getBoundingClientRect().height),Array.from(n).map((function(t){e=t.getAttribute("href"),(o=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&s(e))&&(i.items.push(t),a=o.getBoundingClientRect(),i.offsets.push((i.isWindow?a.top+i.scrollTop:o.offsetTop)-f.offset))})),i.length=i.items.length)}function g(t){d[t=t?"addEventListener":"removeEventListener"]("scroll",u.refresh,m),window[t]("resize",u.refresh,m)}function p(){return d.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}function v(){Array.from(n).map((function(t){return t.classList.contains("active")&&t.classList.remove("active")}))}function L(e){v(),i.activeItem=e,e.classList.add("active");for(var n=[];e.parentNode!==document.body;)e=e.parentNode,["dropdown-menu","nav"].some((function(t){return e.classList.contains(t)}))&&n.push(e);n.map((function(t){var e=t.previousElementSibling;e&&!e.classList.contains("active")&&e.classList.add("active")})),c.call(t,l("activate","scrollspy",{relatedTarget:i.activeItem}))}u.refresh=function(){if(h(),i.scrollTop>=i.maxScroll){var t=i.items[i.length-1];i.activeItem!==t&&L(t)}else{if(i.activeItem&&i.scrollTop0)return i.activeItem=null,void v();for(var e=i.length;e--;)i.activeItem!==i.items[e]&&i.scrollTop>=i.offsets[e]&&(void 0===i.offsets[e+1]||i.scrollTop1&&(t=e[e.length-1]):t=e[0],t}function N(){return s(C().getAttribute("href"))}function P(t){t.preventDefault(),h=t.currentTarget,!o.isAnimating&&A.show()}A.show=function(){if(!(h=h||t).classList.contains("active")){if(v=s(h.getAttribute("href")),g=C(),p=N(),m=l("hide","tab",{relatedTarget:h}),c.call(g,m),m.defaultPrevented)return;o.isAnimating=!0,g.classList.remove("active"),g.setAttribute("aria-selected","false"),h.classList.add("active"),h.setAttribute("aria-selected","true"),r&&(t.parentNode.classList.contains("dropdown-menu")?r.classList.contains("active")||r.classList.add("active"):r.classList.contains("active")&&r.classList.remove("active")),p.classList.contains("fade")?(p.classList.remove("show"),a(p,x)):x()}},A.dispose=function(){t.removeEventListener("click",P,!1),delete t.Tab},(t=s(t)).Tab&&t.Tab.dispose(),n=t.getAttribute("data-height"),o=t.closest(".nav"),r=o&&s(".dropdown-toggle",o),w=!(!e||!1===i.height||"false"===n),o.isAnimating=!1,t.Tab||t.addEventListener("click",P,!1),w&&(T=N().parentNode),t.Tab=A}function E(t,e){e=e||{};var i,n,o,r,d,u,m,f,h=this,g=0,p={};function v(){i.classList.remove("showing"),i.classList.add("show"),c.call(i,m),p.autohide&&h.hide()}function L(){i.classList.add("hide"),c.call(i,f)}function b(){i.classList.remove("show"),p.animation?a(i,L):L()}function y(){clearTimeout(g),t.removeEventListener("click",h.hide,!1),delete t.Toast}h.show=function(){if(i&&!i.classList.contains("show")){if(c.call(i,d),d.defaultPrevented)return;p.animation&&i.classList.add("fade"),i.classList.remove("hide"),i.offsetWidth,i.classList.add("showing"),p.animation?a(i,v):v()}},h.hide=function(t){if(i&&i.classList.contains("show")){if(c.call(i,u),u.defaultPrevented)return;t?b():g=setTimeout(b,p.delay)}},h.dispose=function(){p.animation?a(i,y):y()},(t=s(t)).Toast&&t.Toast.dispose(),i=t.closest(".toast"),n=t.getAttribute("data-animation"),o=t.getAttribute("data-autohide"),r=t.getAttribute("data-delay"),d=l("show","toast"),u=l("hide","toast"),m=l("shown","toast"),f=l("hidden","toast"),p.animation=!1===e.animation||"false"===n?0:1,p.autohide=!1===e.autohide||"false"===o?0:1,p.delay=parseInt(e.delay||r)||500,t.Toast||t.addEventListener("click",h.hide,!1),t.Toast=h}function k(t,e){e=e||{};var i,n,o,r,d,f,h,g,p,v,b,w,A,T,E,k=this,x=null,C=0,N={};function P(){return t.getAttribute("title")||t.getAttribute("data-title")||t.getAttribute("data-original-title")}function H(e){x&&x.contains(e.target)||e.target===t||t.contains(e.target)||k.hide()}function S(t){t=t?"addEventListener":"removeEventListener",document[t]("touchstart",H,m),window[t]("resize",k.hide,m)}function B(){S(1),c.call(t,h)}function I(){S(),N.container.removeChild(x),x=null,C=null,c.call(t,p)}function M(e){t[e=e?"addEventListener":"removeEventListener"](L,k.show,!1),t[e](u[0],k.show,!1),t[e](u[1],k.hide,!1)}k.show=function(){clearTimeout(C),C=setTimeout((function(){if(null===x){if(c.call(t,f),f.defaultPrevented)return;!1!==function(){if(i=P()){if(x=document.createElement("div"),N.template){var t=document.createElement("div");t.innerHTML=N.template.trim(),x.className=t.firstChild.className,x.innerHTML=t.firstChild.innerHTML,s(".tooltip-inner",x).innerHTML=i.trim()}else{var e=document.createElement("div");e.classList.add("arrow"),x.appendChild(e);var n=document.createElement("div");n.classList.add("tooltip-inner"),x.appendChild(n),n.innerHTML=i}x.style.left="0",x.style.top="0",x.setAttribute("role","tooltip"),!x.classList.contains("tooltip")&&x.classList.add("tooltip"),!x.classList.contains(N.animation)&&x.classList.add(N.animation),!x.classList.contains(E)&&x.classList.add(E),N.container.appendChild(x)}}()&&(y(t,x,N.placement,N.container),!x.classList.contains("show")&&x.classList.add("show"),N.animation?a(x,B):B())}}),20)},k.hide=function(){clearTimeout(C),C=setTimeout((function(){if(x&&x.classList.contains("show")){if(c.call(t,g),g.defaultPrevented)return;x.classList.remove("show"),N.animation?a(x,I):I()}}),N.delay)},k.toggle=function(){x?k.hide():k.show()},k.dispose=function(){M(),k.hide(),t.setAttribute("title",t.getAttribute("data-original-title")),t.removeAttribute("data-original-title"),delete t.Tooltip},(t=s(t)).Tooltip&&t.Tooltip.dispose(),n=t.getAttribute("data-animation"),o=t.getAttribute("data-placement"),r=t.getAttribute("data-delay"),d=t.getAttribute("data-container"),f=l("show","tooltip"),h=l("shown","tooltip"),g=l("hide","tooltip"),p=l("hidden","tooltip"),v=s(e.container),b=s(d),w=t.closest(".modal"),A=t.closest(".fixed-top"),T=t.closest(".fixed-bottom"),N.animation=e.animation&&"fade"!==e.animation?e.animation:n||"fade",N.placement=e.placement?e.placement:o||"top",N.template=e.template?e.template:null,N.delay=parseInt(e.delay||r)||200,N.container=v||(b||(A||(T||(w||document.body)))),E="bs-tooltip-"+N.placement,(i=P())&&(t.Tooltip||(t.setAttribute("data-original-title",i),t.removeAttribute("title"),M(1)),t.Tooltip=k)}var x={};function C(t,e){Array.from(e).map((function(e){return new t(e)}))}function N(t){for(var e in t=t||document,x)C(x[e][0],t.querySelectorAll(x[e][1]))}function P(t,e){Array.from(e).map((function(e){return e[t].dispose()}))}x.Alert=[r,'[data-dismiss="alert"]'],x.Button=[d,'[data-toggle="buttons"]'],x.Carousel=[f,'[data-ride="carousel"]'],x.Collapse=[h,'[data-toggle="collapse"]'],x.Dropdown=[p,'[data-toggle="dropdown"]'],x.Modal=[v,'[data-toggle="modal"]'],x.Popover=[w,'[data-toggle="popover"],[data-tip="popover"]'],x.ScrollSpy=[A,'[data-spy="scroll"]'],x.Tab=[T,'[data-toggle="tab"]'],x.Toast=[E,'[data-dismiss="toast"]'],x.Tooltip=[k,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?N():document.addEventListener("DOMContentLoaded",(function t(){N(),document.removeEventListener("DOMContentLoaded",t,!1)}),!1);return{Alert:r,Button:d,Carousel:f,Collapse:h,Dropdown:p,Modal:v,Popover:w,ScrollSpy:A,Tab:T,Toast:E,Tooltip:k,initCallback:N,removeDataAPI:function(t){for(var e in t=t||document,x)P(e,t.querySelectorAll(x[e][1]))},componentsInit:x,Version:"3.0.14f"}})); diff --git a/public/s/js/scroller.js b/public/s/js/scroller.js index cff0853..c1b7e9a 100644 --- a/public/s/js/scroller.js +++ b/public/s/js/scroller.js @@ -6,7 +6,7 @@ let load = false; if((((document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop + window.innerHeight) + 310 >= ((document.documentElement && document.documentElement.scrollHeight) || document.body.scrollHeight)) && !load) { load = true; - fetch(`./api/p/${posts.dataset.last}`) + fetch(`./api/v1/p/${posts.dataset.last}`) .then(res => res.json()) .then((msg, html = "") => { for(let i = 0; i < msg.items.length; i++) diff --git a/public/s/vcr.ttf b/public/s/vcr.ttf new file mode 100644 index 0000000..dcca687 Binary files /dev/null and b/public/s/vcr.ttf differ diff --git a/src/inc/routes/api.mjs b/src/inc/routes/apiv1.mjs similarity index 75% rename from src/inc/routes/api.mjs rename to src/inc/routes/apiv1.mjs index e9f4b74..509b31c 100644 --- a/src/inc/routes/api.mjs +++ b/src/inc/routes/apiv1.mjs @@ -3,22 +3,22 @@ import sql from "../sql.mjs"; import { parse } from "url"; import cfg from "../../../config.json"; -import { mimes, queries } from "./inc/api.mjs"; +import { mimes, queries } from "./inc/apiv1.mjs"; -router.get("/api", (req, res) => { +router.get("/api/v1", (req, res) => { res.end("api lol"); }); -router.get(/^\/api\/random(\/user\/.+|\/image|\/video|\/audio)?$/, async (req, res) => { +router.get(/^\/api\/v1\/random(\/user\/.+|\/image|\/video|\/audio)?$/, async (req, res) => { const args = []; let q = queries.random.main; - if(req.url.split[2] === "user") { + if(req.url.split[3] === "user") { q += queries.random.where("username like ?"); - args.push(req.url.split[3] || "flummi"); + args.push(req.url.split[4] || "flummi"); } else - q += queries.random.where(mimes[req.url.split[2]] ? mimes[req.url.split[2]].map(mime => `mime = "${mime}"`).join(" or ") : null); + q += queries.random.where(mimes[req.url.split[3]] ? mimes[req.url.split[3]].map(mime => `mime = "${mime}"`).join(" or ") : null); try { const rows = await sql.query(q, args); @@ -32,7 +32,7 @@ router.get(/^\/api\/random(\/user\/.+|\/image|\/video|\/audio)?$/, async (req, r } }); -router.get("/api/p", async (req, res) => { +router.get("/api/v1/p", async (req, res) => { let id = parseInt(req.url.qs.id) || 99999999; const eps = Math.min(parseInt(req.url.qs.eps) || 100, 200); let [ order, trend ] = req.url.qs.order === "asc" ? [ "asc", ">" ] : [ "desc", "<" ]; @@ -67,9 +67,9 @@ router.get("/api/p", async (req, res) => { } }); -router.get(/^\/api\/p\/([0-9]+)/, async (req, res) => { // legacy +router.get(/^\/api\/v1\/p\/([0-9]+)/, async (req, res) => { // legacy let eps = 100; - let id = +req.url.split[2]; + let id = +req.url.split[3]; const query = await sql.query("select * from items where id < ? order by id desc limit ?", [ id, eps ]); const items = { @@ -81,9 +81,9 @@ router.get(/^\/api\/p\/([0-9]+)/, async (req, res) => { // legacy res.end(JSON.stringify(items), "utf-8"); }); -router.get(/^\/api\/item\/[0-9]+$/, async (req, res) => { +router.get(/^\/api\/v1\/item\/[0-9]+$/, async (req, res) => { try { - const rows = await sql.query(queries.item, Array(3).fill(req.url.split[2])); + const rows = await sql.query(queries.item, Array(3).fill(req.url.split[3])); res.reply({ type: "application/json", body: JSON.stringify(rows?.shift() || []) @@ -96,9 +96,9 @@ router.get(/^\/api\/item\/[0-9]+$/, async (req, res) => { } }); -router.get(/^\/api\/user\/.*(\/[0-9]+)?$/, async (req, res) => { // auf qs umstellen - const user = req.url.split[2]; - const eps = Math.min(req.url.split[3] || 50, 50); +router.get(/^\/api\/v1\/user\/.*(\/[0-9]+)?$/, async (req, res) => { // auf qs umstellen + const user = req.url.split[3]; + const eps = Math.min(req.url.split[4] || 50, 50); try { const rows = await sql.query(queries.user, [ user, eps ]); res.reply({ diff --git a/src/inc/routes/inc/api.mjs b/src/inc/routes/inc/apiv1.mjs similarity index 100% rename from src/inc/routes/inc/api.mjs rename to src/inc/routes/inc/apiv1.mjs diff --git a/src/inc/routes/index.mjs b/src/inc/routes/index.mjs index 9b58464..94cce67 100644 --- a/src/inc/routes/index.mjs +++ b/src/inc/routes/index.mjs @@ -1,6 +1,7 @@ import router from "../router.mjs"; import cfg from "../../../config.json"; import url from "url"; +import fs from "fs"; import { queries } from "./inc/index.mjs"; import sql from "../sql.mjs"; import lib from "../lib.mjs"; @@ -8,22 +9,55 @@ import tpl from "../tpl.mjs"; tpl.readdir("views"); -router.get("/", async (req, res) => { - const query = await sql.query("select id, mime from items order by id desc limit 300"); - const data = { - items: query, - last: query[query.length - 1].id - }; +router.get(/\/(p\/\d+)?$/, async (req, res) => { + try { + const total = (await sql.query("select count(*) as total from items"))[0].total; + const limit = 299; + const pages = +Math.ceil(total / limit); + const page = Math.min(pages, +req.url.split[1] || 1); + const offset = (page - 1) * limit; - res.reply({ body: tpl.render("views/index", data) }); + const query = await sql.query("select id, mime from items order by id desc limit ?, ?", [ offset, limit ]); + + let cheat = []; + for(let i = Math.max(1, page - 3); i <= Math.min(page + 3, pages); i++) + cheat.push(i); + + query.forEach(e => { + if(!fs.existsSync(`public/t/${e.id}.png`)) + fs.copyFileSync("public/s/img/broken.png", `public/t/${e.id}.png`); + }); + + const data = { + items: query, + pagination: { + end: pages, + prev: (page > 1) ? page - 1 : null, + next: (page < pages) ? page + 1 : null, + page: page, + cheat: cheat, + link: "/p/" + }, + last: query[query.length - 1].id + }; + + res.reply({ body: tpl.render("views/index", data) }); + } catch(err) { + res.reply({ body: "error :(" }); + } }); router.get(/^\/([0-9]+)$/, async (req, res) => { const query = (await sql.query(queries.item, Array(3).fill(req.url.split[0])))?.shift(); + const qmax = (await sql.query("select id from items order by id desc limit 1"))[0].id; if(!query?.id) return res.redirect("/404"); + let cheat = []; + for(let i = Math.min(query.id + 3, qmax); i >= Math.max(1, query.id - 3); i--) + cheat.push(i); + const data = { user: { name: query.username, @@ -44,7 +78,15 @@ router.get(/^\/([0-9]+)$/, async (req, res) => { }, next: query.next ? query.next : null, prev: query.prev ? query.prev : null, - title: `${query.id} - f0ck.me` + title: `${query.id} - f0ck.me`, + pagination: { + end: 1, + prev: query.id + 1, + next: Math.max(query.id - 1, 1), + page: query.id, + cheat: cheat, + link: "/" + } }; res.reply({ body: tpl.render("views/item", data) }); }); diff --git a/src/inc/trigger/f0ckgag.mjs b/src/inc/trigger/f0ckgag.mjs index eda975d..7364097 100644 --- a/src/inc/trigger/f0ckgag.mjs +++ b/src/inc/trigger/f0ckgag.mjs @@ -3,7 +3,7 @@ import sql from "../sql.mjs"; import lib from "../lib.mjs"; const _query = "select id, mime, size, username, userchannel, usernetwork, stamp from items where "; -const regex = /https\:\/\/f0ck\.me\/(\d+|(?:b\/)(\w{8})\.(jpg|webm|gif|mp4|png|mov|mp3|ogg|flac))/gi; +const regex = /(https\:\/\/f0ck\.me|http\:\/\/fockmoonsb24iczs7odozzy5uktlzbcgp337nabrgffzxv5ihabgpvyd\.onion)\/(\d+|(?:b\/)(\w{8})\.(jpg|webm|gif|mp4|png|mov|mp3|ogg|flac))/gi; export default async bot => { diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index f04b689..95e1618 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -132,9 +132,9 @@ export default async bot => { speed = !Number.isFinite(speed) ? "yes" : `${speed.toFixed(2)} Mbit/s`; e.reply([ - `title: ${meta.fulltitle}`, - `size: ${lib.formatSize(size)} speed: ${speed}`, - `link: ${cfg.main.url}/${insertq.insertId}` + //`title: ${meta.fulltitle}`, + `link: ${cfg.main.url}/${insertq.insertId} | size: ${lib.formatSize(size)} | speed: ${speed}` + //`link: ${cfg.main.url}/${insertq.insertId}` ]); }); diff --git a/views/index.html b/views/index.html index fda41ac..3204000 100644 --- a/views/index.html +++ b/views/index.html @@ -1,10 +1,10 @@ {{include main/header}}
-
    +
      {{each items as item}}
    • - + {{=item.mime}}
    • diff --git a/views/item.html b/views/item.html index 795b9fd..ed2e2e3 100644 --- a/views/item.html +++ b/views/item.html @@ -1,8 +1,5 @@ {{include main/header}}
      -
      - Random -
      @@ -37,7 +36,9 @@
      »
      {{else}} - + {{/if}}
      diff --git a/views/main/footer.html b/views/main/footer.html index 697c2e8..4dfea42 100644 --- a/views/main/footer.html +++ b/views/main/footer.html @@ -1,7 +1,7 @@ - - - - - + + + + + diff --git a/views/main/header.html b/views/main/header.html index b9c5463..2ebf066 100644 --- a/views/main/header.html +++ b/views/main/header.html @@ -2,11 +2,11 @@ {{if data.title}}{{=data.title}}{{else}}f0ck!{{/if}} - - - - - + + + + + {{if data.item}} diff --git a/views/partials/pagination.html b/views/partials/pagination.html new file mode 100644 index 0000000..285d9df --- /dev/null +++ b/views/partials/pagination.html @@ -0,0 +1,15 @@ +{{if typeof pagination !== "undefined"}} + +{{/if}} \ No newline at end of file diff --git a/views/snippets/navbar.html b/views/snippets/navbar.html index 1237777..fceb4b9 100644 --- a/views/snippets/navbar.html +++ b/views/snippets/navbar.html @@ -1,18 +1,27 @@ diff --git a/views/test.html b/views/test.html new file mode 100644 index 0000000..10eb606 --- /dev/null +++ b/views/test.html @@ -0,0 +1,16 @@ +{{include main/header}} +
      + {{include partials/pagination}} + + {{include partials/pagination}} +
      +{{include main/footer}}