diff --git a/assets/assets.json b/assets/assets.json index d02d3a72..b44677a5 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -1,15 +1,43 @@ { - "styles" : [ - "css/normalize.css", - "css/fonts.css", - "css/academicons.css", - "css/fontawesome.css", - "css/fancybox.css" - ], - "scripts" : [ - "js/jquery-3.5.1.js", - "js/fancybox.js", - "js/lunr.js", - "js/util.js" - ] + "styles": [ + { + "vendor": "normalize", + "cdn": "https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" + }, + { + "vendor": "academicons", + "cdn": "https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.1/css/academicons.min.css" + }, + { + "vendor": "fontawesome", + "cdn": "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" + }, + { + "vendor": "fancybox", + "cdn": "https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" + } + ], + "scripts": [ + { + "vendor": "js/photoswipe.js", + "cdn": "https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.js" + }, + { + "vendor": "js/photoswipe-ui-default.js", + "cdn": "https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe-ui-default.min.js" + }, + { + "vendor": "js/lunr.js", + "cdn": "https://unpkg.com/lunr/lunr.js" + }, + { + "vendor": "js/user-header.js", + "cdn": "js/user-header.js", + "header": true + }, + { + "vendor": "js/user-footer.js", + "cdn": "js/user-footer.js" + } + ] } diff --git a/assets/css/fancybox.css b/assets/css/fancybox.css deleted file mode 100644 index 5b6f7282..00000000 --- a/assets/css/fancybox.css +++ /dev/null @@ -1,658 +0,0 @@ -body.compensate-for-scrollbar { - overflow: hidden; -} - -.fancybox-active { - height: auto; -} - -.fancybox-is-hidden { - left: -9999px; - margin: 0; - position: absolute !important; - top: -9999px; - visibility: hidden; -} - -.fancybox-container { - -webkit-backface-visibility: hidden; - height: 100%; - left: 0; - outline: none; - position: fixed; - -webkit-tap-highlight-color: transparent; - top: 0; - touch-action: manipulation; - transform: translateZ(0); - width: 100%; - z-index: 99992; -} - -.fancybox-container * { - box-sizing: border-box; -} - -.fancybox-outer, -.fancybox-inner, -.fancybox-bg, -.fancybox-stage { - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; -} - -.fancybox-outer { - -webkit-overflow-scrolling: touch; - overflow-y: auto; -} - -.fancybox-bg { - background: rgb(30, 30, 30); - opacity: 0; - transition-duration: inherit; - transition-property: opacity; - transition-timing-function: cubic-bezier(.47, 0, .74, .71); -} - -.fancybox-is-open .fancybox-bg { - opacity: .9; - transition-timing-function: cubic-bezier(.22, .61, .36, 1); -} - -.fancybox-infobar, -.fancybox-toolbar, -.fancybox-caption, -.fancybox-navigation .fancybox-button { - direction: ltr; - opacity: 0; - position: absolute; - transition: opacity .25s ease, visibility 0s ease .25s; - visibility: hidden; - z-index: 99997; -} - -.fancybox-show-infobar .fancybox-infobar, -.fancybox-show-toolbar .fancybox-toolbar, -.fancybox-show-caption .fancybox-caption, -.fancybox-show-nav .fancybox-navigation .fancybox-button { - opacity: 1; - transition: opacity .25s ease 0s, visibility 0s ease 0s; - visibility: visible; -} - -.fancybox-infobar { - color: #ccc; - font-size: 13px; - -webkit-font-smoothing: subpixel-antialiased; - height: 44px; - left: 0; - line-height: 44px; - min-width: 44px; - mix-blend-mode: difference; - padding: 0 10px; - pointer-events: none; - top: 0; - -webkit-touch-callout: none; - user-select: none; -} - -.fancybox-toolbar { - right: 0; - top: 0; -} - -.fancybox-stage { - direction: ltr; - overflow: visible; - transform: translateZ(0); - z-index: 99994; -} - -.fancybox-is-open .fancybox-stage { - overflow: hidden; -} - -.fancybox-slide { - -webkit-backface-visibility: hidden; - /* Using without prefix would break IE11 */ - display: none; - height: 100%; - left: 0; - outline: none; - overflow: auto; - -webkit-overflow-scrolling: touch; - padding: 44px; - position: absolute; - text-align: center; - top: 0; - transition-property: transform, opacity; - white-space: normal; - width: 100%; - z-index: 99994; -} - -.fancybox-slide::before { - content: ''; - display: inline-block; - font-size: 0; - height: 100%; - vertical-align: middle; - width: 0; -} - -.fancybox-is-sliding .fancybox-slide, -.fancybox-slide--previous, -.fancybox-slide--current, -.fancybox-slide--next { - display: block; -} - -.fancybox-slide--image { - overflow: hidden; - padding: 44px 0; -} - -.fancybox-slide--image::before { - display: none; -} - -.fancybox-slide--html { - padding: 6px; -} - -.fancybox-content { - background: #fff; - display: inline-block; - margin: 0; - max-width: 100%; - overflow: auto; - -webkit-overflow-scrolling: touch; - padding: 44px; - position: relative; - text-align: left; - vertical-align: middle; -} - -.fancybox-slide--image .fancybox-content { - animation-timing-function: cubic-bezier(.5, 0, .14, 1); - -webkit-backface-visibility: hidden; - background: transparent; - background-repeat: no-repeat; - background-size: 100% 100%; - left: 0; - max-width: none; - overflow: visible; - padding: 0; - position: absolute; - top: 0; - transform-origin: top left; - transition-property: transform, opacity; - user-select: none; - z-index: 99995; -} - -.fancybox-can-zoomOut .fancybox-content { - cursor: zoom-out; -} - -.fancybox-can-zoomIn .fancybox-content { - cursor: zoom-in; -} - -.fancybox-can-swipe .fancybox-content, -.fancybox-can-pan .fancybox-content { - cursor: grab; -} - -.fancybox-is-grabbing .fancybox-content { - cursor: grabbing; -} - -.fancybox-container [data-selectable='true'] { - cursor: text; -} - -.fancybox-image, -.fancybox-spaceball { - background: transparent; - border: 0; - height: 100%; - left: 0; - margin: 0; - max-height: none; - max-width: none; - padding: 0; - position: absolute; - top: 0; - user-select: none; - width: 100%; -} - -.fancybox-spaceball { - z-index: 1; -} - -.fancybox-slide--video .fancybox-content, -.fancybox-slide--map .fancybox-content, -.fancybox-slide--pdf .fancybox-content, -.fancybox-slide--iframe .fancybox-content { - height: 100%; - overflow: visible; - padding: 0; - width: 100%; -} - -.fancybox-slide--video .fancybox-content { - background: #000; -} - -.fancybox-slide--map .fancybox-content { - background: #e5e3df; -} - -.fancybox-slide--iframe .fancybox-content { - background: #fff; -} - -.fancybox-video, -.fancybox-iframe { - background: transparent; - border: 0; - display: block; - height: 100%; - margin: 0; - overflow: hidden; - padding: 0; - width: 100%; -} - -/* Fix iOS */ -.fancybox-iframe { - left: 0; - position: absolute; - top: 0; -} - -.fancybox-error { - background: #fff; - cursor: default; - max-width: 400px; - padding: 40px; - width: 100%; -} - -.fancybox-error p { - color: #444; - font-size: 16px; - line-height: 20px; - margin: 0; - padding: 0; -} - -/* Buttons */ - -.fancybox-button { - background: rgba(30, 30, 30, .6); - border: 0; - border-radius: 0; - box-shadow: none; - cursor: pointer; - display: inline-block; - height: 44px; - margin: 0; - padding: 10px; - position: relative; - transition: color .2s; - vertical-align: top; - visibility: inherit; - width: 44px; -} - -.fancybox-button, -.fancybox-button:visited, -.fancybox-button:link { - color: #ccc; -} - -.fancybox-button:hover { - color: #fff; -} - -.fancybox-button:focus { - outline: none; -} - -.fancybox-button.fancybox-focus { - outline: 1px dotted; -} - -.fancybox-button[disabled], -.fancybox-button[disabled]:hover { - color: #888; - cursor: default; - outline: none; -} - -/* Fix IE11 */ -.fancybox-button div { - height: 100%; -} - -.fancybox-button svg { - display: block; - height: 100%; - overflow: visible; - position: relative; - width: 100%; -} - -.fancybox-button svg path { - fill: currentColor; - stroke-width: 0; -} - -.fancybox-button--play svg:nth-child(2), -.fancybox-button--fsenter svg:nth-child(2) { - display: none; -} - -.fancybox-button--pause svg:nth-child(1), -.fancybox-button--fsexit svg:nth-child(1) { - display: none; -} - -.fancybox-progress { - background: #ff5268; - height: 2px; - left: 0; - position: absolute; - right: 0; - top: 0; - transform: scaleX(0); - transform-origin: 0; - transition-property: transform; - transition-timing-function: linear; - z-index: 99998; -} - -/* Close button on the top right corner of html content */ - -.fancybox-close-small { - background: transparent; - border: 0; - border-radius: 0; - color: #ccc; - cursor: pointer; - opacity: .8; - padding: 8px; - position: absolute; - right: -12px; - top: -44px; - z-index: 401; -} - -.fancybox-close-small:hover { - color: #fff; - opacity: 1; -} - -.fancybox-slide--html .fancybox-close-small { - color: currentColor; - padding: 10px; - right: 0; - top: 0; -} - -.fancybox-slide--image.fancybox-is-scaling .fancybox-content { - overflow: hidden; -} - -.fancybox-is-scaling .fancybox-close-small, -.fancybox-is-zoomable.fancybox-can-pan .fancybox-close-small { - display: none; -} - -/* Navigation arrows */ - -.fancybox-navigation .fancybox-button { - background-clip: content-box; - height: 100px; - opacity: 0; - position: absolute; - top: calc(50% - 50px); - width: 70px; -} - -.fancybox-navigation .fancybox-button div { - padding: 7px; -} - -.fancybox-navigation .fancybox-button--arrow_left { - left: 0; - left: env(safe-area-inset-left); - padding: 31px 26px 31px 6px; -} - -.fancybox-navigation .fancybox-button--arrow_right { - padding: 31px 6px 31px 26px; - right: 0; - right: env(safe-area-inset-right); -} - -/* Caption */ - -.fancybox-caption { - background: linear-gradient(to top, - rgba(0, 0, 0, .85) 0%, - rgba(0, 0, 0, .3) 50%, - rgba(0, 0, 0, .15) 65%, - rgba(0, 0, 0, .075) 75.5%, - rgba(0, 0, 0, .037) 82.85%, - rgba(0, 0, 0, .019) 88%, - rgba(0, 0, 0, 0) 100%); - bottom: 0; - color: #eee; - font-size: 14px; - font-weight: 400; - left: 0; - line-height: 1.5; - padding: 75px 44px 25px 44px; - pointer-events: none; - right: 0; - text-align: center; - z-index: 99996; -} - -@supports (padding: max(0px)) { - .fancybox-caption { - padding: 75px max(44px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left)); - } -} - -.fancybox-caption--separate { - margin-top: -50px; -} - -.fancybox-caption__body { - max-height: 50vh; - overflow: auto; - pointer-events: all; -} - -.fancybox-caption a, -.fancybox-caption a:link, -.fancybox-caption a:visited { - color: #ccc; - text-decoration: none; -} - -.fancybox-caption a:hover { - color: #fff; - text-decoration: underline; -} - -/* Loading indicator */ - -.fancybox-loading { - animation: fancybox-rotate 1s linear infinite; - background: transparent; - border: 4px solid #888; - border-bottom-color: #fff; - border-radius: 50%; - height: 50px; - left: 50%; - margin: -25px 0 0 -25px; - opacity: .7; - padding: 0; - position: absolute; - top: 50%; - width: 50px; - z-index: 99999; -} - -@keyframes fancybox-rotate { - 100% { - transform: rotate(360deg); - } -} - -/* Transition effects */ - -.fancybox-animated { - transition-timing-function: cubic-bezier(0, 0, .25, 1); -} - -/* transitionEffect: slide */ - -.fancybox-fx-slide.fancybox-slide--previous { - opacity: 0; - transform: translate3d(-100%, 0, 0); -} - -.fancybox-fx-slide.fancybox-slide--next { - opacity: 0; - transform: translate3d(100%, 0, 0); -} - -.fancybox-fx-slide.fancybox-slide--current { - opacity: 1; - transform: translate3d(0, 0, 0); -} - -/* transitionEffect: fade */ - -.fancybox-fx-fade.fancybox-slide--previous, -.fancybox-fx-fade.fancybox-slide--next { - opacity: 0; - transition-timing-function: cubic-bezier(.19, 1, .22, 1); -} - -.fancybox-fx-fade.fancybox-slide--current { - opacity: 1; -} - -/* transitionEffect: zoom-in-out */ - -.fancybox-fx-zoom-in-out.fancybox-slide--previous { - opacity: 0; - transform: scale3d(1.5, 1.5, 1.5); -} - -.fancybox-fx-zoom-in-out.fancybox-slide--next { - opacity: 0; - transform: scale3d(.5, .5, .5); -} - -.fancybox-fx-zoom-in-out.fancybox-slide--current { - opacity: 1; - transform: scale3d(1, 1, 1); -} - -/* transitionEffect: rotate */ - -.fancybox-fx-rotate.fancybox-slide--previous { - opacity: 0; - transform: rotate(-360deg); -} - -.fancybox-fx-rotate.fancybox-slide--next { - opacity: 0; - transform: rotate(360deg); -} - -.fancybox-fx-rotate.fancybox-slide--current { - opacity: 1; - transform: rotate(0deg); -} - -/* transitionEffect: circular */ - -.fancybox-fx-circular.fancybox-slide--previous { - opacity: 0; - transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0); -} - -.fancybox-fx-circular.fancybox-slide--next { - opacity: 0; - transform: scale3d(0, 0, 0) translate3d(100%, 0, 0); -} - -.fancybox-fx-circular.fancybox-slide--current { - opacity: 1; - transform: scale3d(1, 1, 1) translate3d(0, 0, 0); -} - -/* transitionEffect: tube */ - -.fancybox-fx-tube.fancybox-slide--previous { - transform: translate3d(-100%, 0, 0) scale(.1) skew(-10deg); -} - -.fancybox-fx-tube.fancybox-slide--next { - transform: translate3d(100%, 0, 0) scale(.1) skew(10deg); -} - -.fancybox-fx-tube.fancybox-slide--current { - transform: translate3d(0, 0, 0) scale(1); -} - -/* Styling for Small-Screen Devices */ -@media all and (max-height: 576px) { - .fancybox-slide { - padding-left: 6px; - padding-right: 6px; - } - - .fancybox-slide--image { - padding: 6px 0; - } - - .fancybox-close-small { - right: -6px; - } - - .fancybox-slide--image .fancybox-close-small { - background: #4e4e4e; - color: #f2f4f6; - height: 36px; - opacity: 1; - padding: 6px; - right: 0; - top: 0; - width: 36px; - } - - .fancybox-caption { - padding-left: 12px; - padding-right: 12px; - } - - @supports (padding: max(0px)) { - .fancybox-caption { - padding-left: max(12px, env(safe-area-inset-left)); - padding-right: max(12px, env(safe-area-inset-right)); - } - } -} \ No newline at end of file diff --git a/assets/css/fonts.css b/assets/css/fonts.css deleted file mode 100644 index 85a8e3b6..00000000 --- a/assets/css/fonts.css +++ /dev/null @@ -1,160 +0,0 @@ -/* latin-ext */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: local('Raleway'), local('Raleway-Regular'), url(https://fonts.gstatic.com/s/raleway/v14/1Ptug8zYS_SKggPNyCMIT5lu.woff2) format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: local('Raleway'), local('Raleway-Regular'), url(https://fonts.gstatic.com/s/raleway/v14/1Ptug8zYS_SKggPNyC0ITw.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* latin-ext */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 800; - src: local('Raleway ExtraBold'), local('Raleway-ExtraBold'), url(https://fonts.gstatic.com/s/raleway/v14/1Ptrg8zYS_SKggPNwIouWqhPAMif.woff2) format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 800; - src: local('Raleway ExtraBold'), local('Raleway-ExtraBold'), url(https://fonts.gstatic.com/s/raleway/v14/1Ptrg8zYS_SKggPNwIouWqZPAA.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* latin-ext */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 900; - src: local('Raleway Black'), local('Raleway-Black'), url(https://fonts.gstatic.com/s/raleway/v14/1Ptrg8zYS_SKggPNwK4vWqhPAMif.woff2) format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 900; - src: local('Raleway Black'), local('Raleway-Black'), url(https://fonts.gstatic.com/s/raleway/v14/1Ptrg8zYS_SKggPNwK4vWqZPAA.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* cyrillic-ext */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lqDY.woff2) format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qPK7lqDY.woff2) format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* greek-ext */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNK7lqDY.woff2) format('woff2'); - unicode-range: U+1F00-1FFF; -} -/* greek */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qO67lqDY.woff2) format('woff2'); - unicode-range: U+0370-03FF; -} -/* vietnamese */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qN67lqDY.woff2) format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 400; - src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* cyrillic-ext */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 700; - src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmhduz8A.woff2) format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 700; - src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwkxduz8A.woff2) format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* greek-ext */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 700; - src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmxduz8A.woff2) format('woff2'); - unicode-range: U+1F00-1FFF; -} -/* greek */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 700; - src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBduz8A.woff2) format('woff2'); - unicode-range: U+0370-03FF; -} -/* vietnamese */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 700; - src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBduz8A.woff2) format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 700; - src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRduz8A.woff2) format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Source Sans Pro'; - font-style: normal; - font-weight: 700; - src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v13/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} diff --git a/assets/js/fancybox.js b/assets/js/fancybox.js deleted file mode 100644 index 998995ed..00000000 --- a/assets/js/fancybox.js +++ /dev/null @@ -1,3425 +0,0 @@ -(function (window, document, $, undefined) { - "use strict"; - - window.console = window.console || { - info: function (stuff) {} - }; - - // If there's no jQuery, fancyBox can't work - // ========================================= - - if (!$) { - return; - } - - // Check if fancyBox is already initialized - // ======================================== - - if ($.fn.fancybox) { - console.info("fancyBox already initialized"); - - return; - } - - // Private default settings - // ======================== - - var defaults = { - // Close existing modals - // Set this to false if you do not need to stack multiple instances - closeExisting: false, - - // Enable infinite gallery navigation - loop: false, - - // Horizontal space between slides - gutter: 50, - - // Enable keyboard navigation - keyboard: true, - - // Should allow caption to overlap the content - preventCaptionOverlap: true, - - // Should display navigation arrows at the screen edges - arrows: true, - - // Should display counter at the top left corner - infobar: true, - - // Should display close button (using `btnTpl.smallBtn` template) over the content - // Can be true, false, "auto" - // If "auto" - will be automatically enabled for "html", "inline" or "ajax" items - smallBtn: "auto", - - // Should display toolbar (buttons at the top) - // Can be true, false, "auto" - // If "auto" - will be automatically hidden if "smallBtn" is enabled - toolbar: "auto", - - // What buttons should appear in the top right corner. - // Buttons will be created using templates from `btnTpl` option - // and they will be placed into toolbar (class="fancybox-toolbar"` element) - buttons: [ - "zoom", - //"share", - "slideShow", - //"fullScreen", - //"download", - "thumbs", - "close" - ], - - // Detect "idle" time in seconds - idleTime: 3, - - // Disable right-click and use simple image protection for images - protect: false, - - // Shortcut to make content "modal" - disable keyboard navigtion, hide buttons, etc - modal: false, - - image: { - // Wait for images to load before displaying - // true - wait for image to load and then display; - // false - display thumbnail and load the full-sized image over top, - // requires predefined image dimensions (`data-width` and `data-height` attributes) - preload: false - }, - - ajax: { - // Object containing settings for ajax request - settings: { - // This helps to indicate that request comes from the modal - // Feel free to change naming - data: { - fancybox: true - } - } - }, - - iframe: { - // Iframe template - tpl: '', - - // Preload iframe before displaying it - // This allows to calculate iframe content width and height - // (note: Due to "Same Origin Policy", you can't get cross domain data). - preload: true, - - // Custom CSS styling for iframe wrapping element - // You can use this to set custom iframe dimensions - css: {}, - - // Iframe tag attributes - attr: { - scrolling: "auto" - } - }, - - // For HTML5 video only - video: { - tpl: '", - format: "", // custom video format - autoStart: true - }, - - // Default content type if cannot be detected automatically - defaultType: "image", - - // Open/close animation type - // Possible values: - // false - disable - // "zoom" - zoom images from/to thumbnail - // "fade" - // "zoom-in-out" - // - animationEffect: "zoom", - - // Duration in ms for open/close animation - animationDuration: 366, - - // Should image change opacity while zooming - // If opacity is "auto", then opacity will be changed if image and thumbnail have different aspect ratios - zoomOpacity: "auto", - - // Transition effect between slides - // - // Possible values: - // false - disable - // "fade' - // "slide' - // "circular' - // "tube' - // "zoom-in-out' - // "rotate' - // - transitionEffect: "fade", - - // Duration in ms for transition animation - transitionDuration: 366, - - // Custom CSS class for slide element - slideClass: "", - - // Custom CSS class for layout - baseClass: "", - - // Base template for layout - baseTpl: '", - - // Loading indicator template - spinnerTpl: '
', - - // Error message template - errorTpl: '

{{ERROR}}

', - - btnTpl: { - download: '' + - '' + - "", - - zoom: '", - - close: '", - - // Arrows - arrowLeft: '", - - arrowRight: '", - - // This small close button will be appended to your html/inline/ajax content by default, - // if "smallBtn" option is not set to false - smallBtn: '" - }, - - // Container is injected into this element - parentEl: "body", - - // Hide browser vertical scrollbars; use at your own risk - hideScrollbar: true, - - // Focus handling - // ============== - - // Try to focus on the first focusable element after opening - autoFocus: true, - - // Put focus back to active element after closing - backFocus: true, - - // Do not let user to focus on element outside modal content - trapFocus: true, - - // Module specific options - // ======================= - - fullScreen: { - autoStart: false - }, - - // Set `touch: false` to disable panning/swiping - touch: { - vertical: true, // Allow to drag content vertically - momentum: true // Continue movement after releasing mouse/touch when panning - }, - - // Hash value when initializing manually, - // set `false` to disable hash change - hash: null, - - // Customize or add new media types - // Example: - /* - media : { - youtube : { - params : { - autoplay : 0 - } - } - } - */ - media: {}, - - slideShow: { - autoStart: false, - speed: 3000 - }, - - thumbs: { - autoStart: false, // Display thumbnails on opening - hideOnClose: true, // Hide thumbnail grid when closing animation starts - parentEl: ".fancybox-container", // Container is injected into this element - axis: "y" // Vertical (y) or horizontal (x) scrolling - }, - - // Use mousewheel to navigate gallery - // If 'auto' - enabled for images only - wheel: "auto", - - // Callbacks - //========== - - // See Documentation/API/Events for more information - // Example: - /* - afterShow: function( instance, current ) { - console.info( 'Clicked element:' ); - console.info( current.opts.$orig ); - } - */ - - onInit: $.noop, // When instance has been initialized - - beforeLoad: $.noop, // Before the content of a slide is being loaded - afterLoad: $.noop, // When the content of a slide is done loading - - beforeShow: $.noop, // Before open animation starts - afterShow: $.noop, // When content is done loading and animating - - beforeClose: $.noop, // Before the instance attempts to close. Return false to cancel the close. - afterClose: $.noop, // After instance has been closed - - onActivate: $.noop, // When instance is brought to front - onDeactivate: $.noop, // When other instance has been activated - - // Interaction - // =========== - - // Use options below to customize taken action when user clicks or double clicks on the fancyBox area, - // each option can be string or method that returns value. - // - // Possible values: - // "close" - close instance - // "next" - move to next gallery item - // "nextOrClose" - move to next gallery item or close if gallery has only one item - // "toggleControls" - show/hide controls - // "zoom" - zoom image (if loaded) - // false - do nothing - - // Clicked on the content - clickContent: function (current, event) { - return current.type === "image" ? "zoom" : false; - }, - - // Clicked on the slide - clickSlide: "close", - - // Clicked on the background (backdrop) element; - // if you have not changed the layout, then most likely you need to use `clickSlide` option - clickOutside: "close", - - // Same as previous two, but for double click - dblclickContent: false, - dblclickSlide: false, - dblclickOutside: false, - - // Custom options when mobile device is detected - // ============================================= - - mobile: { - preventCaptionOverlap: false, - idleTime: false, - clickContent: function (current, event) { - return current.type === "image" ? "toggleControls" : false; - }, - clickSlide: function (current, event) { - return current.type === "image" ? "toggleControls" : "close"; - }, - dblclickContent: function (current, event) { - return current.type === "image" ? "zoom" : false; - }, - dblclickSlide: function (current, event) { - return current.type === "image" ? "zoom" : false; - } - }, - - // Internationalization - // ==================== - - lang: "en", - i18n: { - en: { - CLOSE: "Close", - NEXT: "Next", - PREV: "Previous", - ERROR: "The requested content cannot be loaded.
Please try again later.", - PLAY_START: "Start slideshow", - PLAY_STOP: "Pause slideshow", - FULL_SCREEN: "Full screen", - THUMBS: "Thumbnails", - DOWNLOAD: "Download", - SHARE: "Share", - ZOOM: "Zoom" - }, - de: { - CLOSE: "Schließen", - NEXT: "Weiter", - PREV: "Zurück", - ERROR: "Die angeforderten Daten konnten nicht geladen werden.
Bitte versuchen Sie es später nochmal.", - PLAY_START: "Diaschau starten", - PLAY_STOP: "Diaschau beenden", - FULL_SCREEN: "Vollbild", - THUMBS: "Vorschaubilder", - DOWNLOAD: "Herunterladen", - SHARE: "Teilen", - ZOOM: "Vergrößern" - } - } - }; - - // Few useful variables and methods - // ================================ - - var $W = $(window); - var $D = $(document); - - var called = 0; - - // Check if an object is a jQuery object and not a native JavaScript object - // ======================================================================== - var isQuery = function (obj) { - return obj && obj.hasOwnProperty && obj instanceof $; - }; - - // Handle multiple browsers for "requestAnimationFrame" and "cancelAnimationFrame" - // =============================================================================== - var requestAFrame = (function () { - return ( - window.requestAnimationFrame || - window.webkitRequestAnimationFrame || - window.mozRequestAnimationFrame || - window.oRequestAnimationFrame || - // if all else fails, use setTimeout - function (callback) { - return window.setTimeout(callback, 1000 / 60); - } - ); - })(); - - var cancelAFrame = (function () { - return ( - window.cancelAnimationFrame || - window.webkitCancelAnimationFrame || - window.mozCancelAnimationFrame || - window.oCancelAnimationFrame || - function (id) { - window.clearTimeout(id); - } - ); - })(); - - // Detect the supported transition-end event property name - // ======================================================= - var transitionEnd = (function () { - var el = document.createElement("fakeelement"), - t; - - var transitions = { - transition: "transitionend", - OTransition: "oTransitionEnd", - MozTransition: "transitionend", - WebkitTransition: "webkitTransitionEnd" - }; - - for (t in transitions) { - if (el.style[t] !== undefined) { - return transitions[t]; - } - } - - return "transitionend"; - })(); - - // Force redraw on an element. - // This helps in cases where the browser doesn't redraw an updated element properly - // ================================================================================ - var forceRedraw = function ($el) { - return $el && $el.length && $el[0].offsetHeight; - }; - - // Exclude array (`buttons`) options from deep merging - // =================================================== - var mergeOpts = function (opts1, opts2) { - var rez = $.extend(true, {}, opts1, opts2); - - $.each(opts2, function (key, value) { - if ($.isArray(value)) { - rez[key] = value; - } - }); - - return rez; - }; - - // How much of an element is visible in viewport - // ============================================= - - var inViewport = function (elem) { - var elemCenter, rez; - - if (!elem || elem.ownerDocument !== document) { - return false; - } - - $(".fancybox-container").css("pointer-events", "none"); - - elemCenter = { - x: elem.getBoundingClientRect().left + elem.offsetWidth / 2, - y: elem.getBoundingClientRect().top + elem.offsetHeight / 2 - }; - - rez = document.elementFromPoint(elemCenter.x, elemCenter.y) === elem; - - $(".fancybox-container").css("pointer-events", ""); - - return rez; - }; - - // Class definition - // ================ - - var FancyBox = function (content, opts, index) { - var self = this; - - self.opts = mergeOpts({ - index: index - }, $.fancybox.defaults); - - if ($.isPlainObject(opts)) { - self.opts = mergeOpts(self.opts, opts); - } - - if ($.fancybox.isMobile) { - self.opts = mergeOpts(self.opts, self.opts.mobile); - } - - self.id = self.opts.id || ++called; - - self.currIndex = parseInt(self.opts.index, 10) || 0; - self.prevIndex = null; - - self.prevPos = null; - self.currPos = 0; - - self.firstRun = true; - - // All group items - self.group = []; - - // Existing slides (for current, next and previous gallery items) - self.slides = {}; - - // Create group elements - self.addContent(content); - - if (!self.group.length) { - return; - } - - self.init(); - }; - - $.extend(FancyBox.prototype, { - // Create DOM structure - // ==================== - - init: function () { - var self = this, - firstItem = self.group[self.currIndex], - firstItemOpts = firstItem.opts, - $container, - buttonStr; - - if (firstItemOpts.closeExisting) { - $.fancybox.close(true); - } - - // Hide scrollbars - // =============== - - $("body").addClass("fancybox-active"); - - if ( - !$.fancybox.getInstance() && - firstItemOpts.hideScrollbar !== false && - !$.fancybox.isMobile && - document.body.scrollHeight > window.innerHeight - ) { - $("head").append( - '" - ); - - $("body").addClass("compensate-for-scrollbar"); - } - - // Build html markup and set references - // ==================================== - - // Build html code for buttons and insert into main template - buttonStr = ""; - - $.each(firstItemOpts.buttons, function (index, value) { - buttonStr += firstItemOpts.btnTpl[value] || ""; - }); - - // Create markup from base template, it will be initially hidden to - // avoid unnecessary work like painting while initializing is not complete - $container = $( - self.translate( - self, - firstItemOpts.baseTpl - .replace("{{buttons}}", buttonStr) - .replace("{{arrows}}", firstItemOpts.btnTpl.arrowLeft + firstItemOpts.btnTpl.arrowRight) - ) - ) - .attr("id", "fancybox-container-" + self.id) - .addClass(firstItemOpts.baseClass) - .data("FancyBox", self) - .appendTo(firstItemOpts.parentEl); - - // Create object holding references to jQuery wrapped nodes - self.$refs = { - container: $container - }; - - ["bg", "inner", "infobar", "toolbar", "stage", "caption", "navigation"].forEach(function (item) { - self.$refs[item] = $container.find(".fancybox-" + item); - }); - - self.trigger("onInit"); - - // Enable events, deactive previous instances - self.activate(); - - // Build slides, load and reveal content - self.jumpTo(self.currIndex); - }, - - // Simple i18n support - replaces object keys found in template - // with corresponding values - // ============================================================ - - translate: function (obj, str) { - var arr = obj.opts.i18n[obj.opts.lang] || obj.opts.i18n.en; - - return str.replace(/\{\{(\w+)\}\}/g, function (match, n) { - return arr[n] === undefined ? match : arr[n]; - }); - }, - - // Populate current group with fresh content - // Check if each object has valid type and content - // =============================================== - - addContent: function (content) { - var self = this, - items = $.makeArray(content), - thumbs; - - $.each(items, function (i, item) { - var obj = {}, - opts = {}, - $item, - type, - found, - src, - srcParts; - - // Step 1 - Make sure we have an object - // ==================================== - - if ($.isPlainObject(item)) { - // We probably have manual usage here, something like - // $.fancybox.open( [ { src : "image.jpg", type : "image" } ] ) - - obj = item; - opts = item.opts || item; - } else if ($.type(item) === "object" && $(item).length) { - // Here we probably have jQuery collection returned by some selector - $item = $(item); - - // Support attributes like `data-options='{"touch" : false}'` and `data-touch='false'` - opts = $item.data() || {}; - opts = $.extend(true, {}, opts, opts.options); - - // Here we store clicked element - opts.$orig = $item; - - obj.src = self.opts.src || opts.src || $item.attr("href"); - - // Assume that simple syntax is used, for example: - // `$.fancybox.open( $("#test"), {} );` - if (!obj.type && !obj.src) { - obj.type = "inline"; - obj.src = item; - } - } else { - // Assume we have a simple html code, for example: - // $.fancybox.open( '

Hi!

' ); - obj = { - type: "html", - src: item + "" - }; - } - - // Each gallery object has full collection of options - obj.opts = $.extend(true, {}, self.opts, opts); - - // Do not merge buttons array - if ($.isArray(opts.buttons)) { - obj.opts.buttons = opts.buttons; - } - - if ($.fancybox.isMobile && obj.opts.mobile) { - obj.opts = mergeOpts(obj.opts, obj.opts.mobile); - } - - // Step 2 - Make sure we have content type, if not - try to guess - // ============================================================== - - type = obj.type || obj.opts.type; - src = obj.src || ""; - - if (!type && src) { - if ((found = src.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))) { - type = "video"; - - if (!obj.opts.video.format) { - obj.opts.video.format = "video/" + (found[1] === "ogv" ? "ogg" : found[1]); - } - } else if (src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)) { - type = "image"; - } else if (src.match(/\.(pdf)((\?|#).*)?$/i)) { - type = "iframe"; - obj = $.extend(true, obj, { - contentType: "pdf", - opts: { - iframe: { - preload: false - } - } - }); - } else if (src.charAt(0) === "#") { - type = "inline"; - } - } - - if (type) { - obj.type = type; - } else { - self.trigger("objectNeedsType", obj); - } - - if (!obj.contentType) { - obj.contentType = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1 ? "html" : obj.type; - } - - // Step 3 - Some adjustments - // ========================= - - obj.index = self.group.length; - - if (obj.opts.smallBtn == "auto") { - obj.opts.smallBtn = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1; - } - - if (obj.opts.toolbar === "auto") { - obj.opts.toolbar = !obj.opts.smallBtn; - } - - // Find thumbnail image, check if exists and if is in the viewport - obj.$thumb = obj.opts.$thumb || null; - - if (obj.opts.$trigger && obj.index === self.opts.index) { - obj.$thumb = obj.opts.$trigger.find("img:first"); - - if (obj.$thumb.length) { - obj.opts.$orig = obj.opts.$trigger; - } - } - - if (!(obj.$thumb && obj.$thumb.length) && obj.opts.$orig) { - obj.$thumb = obj.opts.$orig.find("img:first"); - } - - if (obj.$thumb && !obj.$thumb.length) { - obj.$thumb = null; - } - - obj.thumb = obj.opts.thumb || (obj.$thumb ? obj.$thumb[0].src : null); - - // "caption" is a "special" option, it can be used to customize caption per gallery item - if ($.type(obj.opts.caption) === "function") { - obj.opts.caption = obj.opts.caption.apply(item, [self, obj]); - } - - if ($.type(self.opts.caption) === "function") { - obj.opts.caption = self.opts.caption.apply(item, [self, obj]); - } - - // Make sure we have caption as a string or jQuery object - if (!(obj.opts.caption instanceof $)) { - obj.opts.caption = obj.opts.caption === undefined ? "" : obj.opts.caption + ""; - } - - // Check if url contains "filter" used to filter the content - // Example: "ajax.html #something" - if (obj.type === "ajax") { - srcParts = src.split(/\s+/, 2); - - if (srcParts.length > 1) { - obj.src = srcParts.shift(); - - obj.opts.filter = srcParts.shift(); - } - } - - // Hide all buttons and disable interactivity for modal items - if (obj.opts.modal) { - obj.opts = $.extend(true, obj.opts, { - trapFocus: true, - // Remove buttons - infobar: 0, - toolbar: 0, - - smallBtn: 0, - - // Disable keyboard navigation - keyboard: 0, - - // Disable some modules - slideShow: 0, - fullScreen: 0, - thumbs: 0, - touch: 0, - - // Disable click event handlers - clickContent: false, - clickSlide: false, - clickOutside: false, - dblclickContent: false, - dblclickSlide: false, - dblclickOutside: false - }); - } - - // Step 4 - Add processed object to group - // ====================================== - - self.group.push(obj); - }); - - // Update controls if gallery is already opened - if (Object.keys(self.slides).length) { - self.updateControls(); - - // Update thumbnails, if needed - thumbs = self.Thumbs; - - if (thumbs && thumbs.isActive) { - thumbs.create(); - - thumbs.focus(); - } - } - }, - - // Attach an event handler functions for: - // - navigation buttons - // - browser scrolling, resizing; - // - focusing - // - keyboard - // - detecting inactivity - // ====================================== - - addEvents: function () { - var self = this; - - self.removeEvents(); - - // Make navigation elements clickable - // ================================== - - self.$refs.container - .on("click.fb-close", "[data-fancybox-close]", function (e) { - e.stopPropagation(); - e.preventDefault(); - - self.close(e); - }) - .on("touchstart.fb-prev click.fb-prev", "[data-fancybox-prev]", function (e) { - e.stopPropagation(); - e.preventDefault(); - - self.previous(); - }) - .on("touchstart.fb-next click.fb-next", "[data-fancybox-next]", function (e) { - e.stopPropagation(); - e.preventDefault(); - - self.next(); - }) - .on("click.fb", "[data-fancybox-zoom]", function (e) { - // Click handler for zoom button - self[self.isScaledDown() ? "scaleToActual" : "scaleToFit"](); - }); - - // Handle page scrolling and browser resizing - // ========================================== - - $W.on("orientationchange.fb resize.fb", function (e) { - if (e && e.originalEvent && e.originalEvent.type === "resize") { - if (self.requestId) { - cancelAFrame(self.requestId); - } - - self.requestId = requestAFrame(function () { - self.update(e); - }); - } else { - if (self.current && self.current.type === "iframe") { - self.$refs.stage.hide(); - } - - setTimeout( - function () { - self.$refs.stage.show(); - - self.update(e); - }, - $.fancybox.isMobile ? 600 : 250 - ); - } - }); - - $D.on("keydown.fb", function (e) { - var instance = $.fancybox ? $.fancybox.getInstance() : null, - current = instance.current, - keycode = e.keyCode || e.which; - - // Trap keyboard focus inside of the modal - // ======================================= - - if (keycode == 9) { - if (current.opts.trapFocus) { - self.focus(e); - } - - return; - } - - // Enable keyboard navigation - // ========================== - - if (!current.opts.keyboard || e.ctrlKey || e.altKey || e.shiftKey || $(e.target).is("input,textarea,video,audio,select")) { - return; - } - - // Backspace and Esc keys - if (keycode === 8 || keycode === 27) { - e.preventDefault(); - - self.close(e); - - return; - } - - // Left arrow and Up arrow - if (keycode === 37 || keycode === 38) { - e.preventDefault(); - - self.previous(); - - return; - } - - // Righ arrow and Down arrow - if (keycode === 39 || keycode === 40) { - e.preventDefault(); - - self.next(); - - return; - } - - self.trigger("afterKeydown", e, keycode); - }); - - // Hide controls after some inactivity period - if (self.group[self.currIndex].opts.idleTime) { - self.idleSecondsCounter = 0; - - $D.on( - "mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle", - function (e) { - self.idleSecondsCounter = 0; - - if (self.isIdle) { - self.showControls(); - } - - self.isIdle = false; - } - ); - - self.idleInterval = window.setInterval(function () { - self.idleSecondsCounter++; - - if (self.idleSecondsCounter >= self.group[self.currIndex].opts.idleTime && !self.isDragging) { - self.isIdle = true; - self.idleSecondsCounter = 0; - - self.hideControls(); - } - }, 1000); - } - }, - - // Remove events added by the core - // =============================== - - removeEvents: function () { - var self = this; - - $W.off("orientationchange.fb resize.fb"); - $D.off("keydown.fb .fb-idle"); - - this.$refs.container.off(".fb-close .fb-prev .fb-next"); - - if (self.idleInterval) { - window.clearInterval(self.idleInterval); - - self.idleInterval = null; - } - }, - - // Change to previous gallery item - // =============================== - - previous: function (duration) { - return this.jumpTo(this.currPos - 1, duration); - }, - - // Change to next gallery item - // =========================== - - next: function (duration) { - return this.jumpTo(this.currPos + 1, duration); - }, - - // Switch to selected gallery item - // =============================== - - jumpTo: function (pos, duration) { - var self = this, - groupLen = self.group.length, - firstRun, - isMoved, - loop, - current, - previous, - slidePos, - stagePos, - prop, - diff; - - if (self.isDragging || self.isClosing || (self.isAnimating && self.firstRun)) { - return; - } - - // Should loop? - pos = parseInt(pos, 10); - loop = self.current ? self.current.opts.loop : self.opts.loop; - - if (!loop && (pos < 0 || pos >= groupLen)) { - return false; - } - - // Check if opening for the first time; this helps to speed things up - firstRun = self.firstRun = !Object.keys(self.slides).length; - - // Create slides - previous = self.current; - - self.prevIndex = self.currIndex; - self.prevPos = self.currPos; - - current = self.createSlide(pos); - - if (groupLen > 1) { - if (loop || current.index < groupLen - 1) { - self.createSlide(pos + 1); - } - - if (loop || current.index > 0) { - self.createSlide(pos - 1); - } - } - - self.current = current; - self.currIndex = current.index; - self.currPos = current.pos; - - self.trigger("beforeShow", firstRun); - - self.updateControls(); - - // Validate duration length - current.forcedDuration = undefined; - - if ($.isNumeric(duration)) { - current.forcedDuration = duration; - } else { - duration = current.opts[firstRun ? "animationDuration" : "transitionDuration"]; - } - - duration = parseInt(duration, 10); - - // Check if user has swiped the slides or if still animating - isMoved = self.isMoved(current); - - // Make sure current slide is visible - current.$slide.addClass("fancybox-slide--current"); - - // Fresh start - reveal container, current slide and start loading content - if (firstRun) { - if (current.opts.animationEffect && duration) { - self.$refs.container.css("transition-duration", duration + "ms"); - } - - self.$refs.container.addClass("fancybox-is-open").trigger("focus"); - - // Attempt to load content into slide - // This will later call `afterLoad` -> `revealContent` - self.loadSlide(current); - - self.preload("image"); - - return; - } - - // Get actual slide/stage positions (before cleaning up) - slidePos = $.fancybox.getTranslate(previous.$slide); - stagePos = $.fancybox.getTranslate(self.$refs.stage); - - // Clean up all slides - $.each(self.slides, function (index, slide) { - $.fancybox.stop(slide.$slide, true); - }); - - if (previous.pos !== current.pos) { - previous.isComplete = false; - } - - previous.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"); - - // If slides are out of place, then animate them to correct position - if (isMoved) { - // Calculate horizontal swipe distance - diff = slidePos.left - (previous.pos * slidePos.width + previous.pos * previous.opts.gutter); - - $.each(self.slides, function (index, slide) { - slide.$slide.removeClass("fancybox-animated").removeClass(function (index, className) { - return (className.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" "); - }); - - // Make sure that each slide is in equal distance - // This is mostly needed for freshly added slides, because they are not yet positioned - var leftPos = slide.pos * slidePos.width + slide.pos * slide.opts.gutter; - - $.fancybox.setTranslate(slide.$slide, { - top: 0, - left: leftPos - stagePos.left + diff - }); - - if (slide.pos !== current.pos) { - slide.$slide.addClass("fancybox-slide--" + (slide.pos > current.pos ? "next" : "previous")); - } - - // Redraw to make sure that transition will start - forceRedraw(slide.$slide); - - // Animate the slide - $.fancybox.animate( - slide.$slide, { - top: 0, - left: (slide.pos - current.pos) * slidePos.width + (slide.pos - current.pos) * slide.opts.gutter - }, - duration, - function () { - slide.$slide - .css({ - transform: "", - opacity: "" - }) - .removeClass("fancybox-slide--next fancybox-slide--previous"); - - if (slide.pos === self.currPos) { - self.complete(); - } - } - ); - }); - } else if (duration && current.opts.transitionEffect) { - // Set transition effect for previously active slide - prop = "fancybox-animated fancybox-fx-" + current.opts.transitionEffect; - - previous.$slide.addClass("fancybox-slide--" + (previous.pos > current.pos ? "next" : "previous")); - - $.fancybox.animate( - previous.$slide, - prop, - duration, - function () { - previous.$slide.removeClass(prop).removeClass("fancybox-slide--next fancybox-slide--previous"); - }, - false - ); - } - - if (current.isLoaded) { - self.revealContent(current); - } else { - self.loadSlide(current); - } - - self.preload("image"); - }, - - // Create new "slide" element - // These are gallery items that are actually added to DOM - // ======================================================= - - createSlide: function (pos) { - var self = this, - $slide, - index; - - index = pos % self.group.length; - index = index < 0 ? self.group.length + index : index; - - if (!self.slides[pos] && self.group[index]) { - $slide = $('
').appendTo(self.$refs.stage); - - self.slides[pos] = $.extend(true, {}, self.group[index], { - pos: pos, - $slide: $slide, - isLoaded: false - }); - - self.updateSlide(self.slides[pos]); - } - - return self.slides[pos]; - }, - - // Scale image to the actual size of the image; - // x and y values should be relative to the slide - // ============================================== - - scaleToActual: function (x, y, duration) { - var self = this, - current = self.current, - $content = current.$content, - canvasWidth = $.fancybox.getTranslate(current.$slide).width, - canvasHeight = $.fancybox.getTranslate(current.$slide).height, - newImgWidth = current.width, - newImgHeight = current.height, - imgPos, - posX, - posY, - scaleX, - scaleY; - - if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) { - return; - } - - self.isAnimating = true; - - $.fancybox.stop($content); - - x = x === undefined ? canvasWidth * 0.5 : x; - y = y === undefined ? canvasHeight * 0.5 : y; - - imgPos = $.fancybox.getTranslate($content); - - imgPos.top -= $.fancybox.getTranslate(current.$slide).top; - imgPos.left -= $.fancybox.getTranslate(current.$slide).left; - - scaleX = newImgWidth / imgPos.width; - scaleY = newImgHeight / imgPos.height; - - // Get center position for original image - posX = canvasWidth * 0.5 - newImgWidth * 0.5; - posY = canvasHeight * 0.5 - newImgHeight * 0.5; - - // Make sure image does not move away from edges - if (newImgWidth > canvasWidth) { - posX = imgPos.left * scaleX - (x * scaleX - x); - - if (posX > 0) { - posX = 0; - } - - if (posX < canvasWidth - newImgWidth) { - posX = canvasWidth - newImgWidth; - } - } - - if (newImgHeight > canvasHeight) { - posY = imgPos.top * scaleY - (y * scaleY - y); - - if (posY > 0) { - posY = 0; - } - - if (posY < canvasHeight - newImgHeight) { - posY = canvasHeight - newImgHeight; - } - } - - self.updateCursor(newImgWidth, newImgHeight); - - $.fancybox.animate( - $content, { - top: posY, - left: posX, - scaleX: scaleX, - scaleY: scaleY - }, - duration || 366, - function () { - self.isAnimating = false; - } - ); - - // Stop slideshow - if (self.SlideShow && self.SlideShow.isActive) { - self.SlideShow.stop(); - } - }, - - // Scale image to fit inside parent element - // ======================================== - - scaleToFit: function (duration) { - var self = this, - current = self.current, - $content = current.$content, - end; - - if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) { - return; - } - - self.isAnimating = true; - - $.fancybox.stop($content); - - end = self.getFitPos(current); - - self.updateCursor(end.width, end.height); - - $.fancybox.animate( - $content, { - top: end.top, - left: end.left, - scaleX: end.width / $content.width(), - scaleY: end.height / $content.height() - }, - duration || 366, - function () { - self.isAnimating = false; - } - ); - }, - - // Calculate image size to fit inside viewport - // =========================================== - - getFitPos: function (slide) { - var self = this, - $content = slide.$content, - $slide = slide.$slide, - width = slide.width || slide.opts.width, - height = slide.height || slide.opts.height, - maxWidth, - maxHeight, - minRatio, - aspectRatio, - rez = {}; - - if (!slide.isLoaded || !$content || !$content.length) { - return false; - } - - maxWidth = $.fancybox.getTranslate(self.$refs.stage).width; - maxHeight = $.fancybox.getTranslate(self.$refs.stage).height; - - maxWidth -= - parseFloat($slide.css("paddingLeft")) + - parseFloat($slide.css("paddingRight")) + - parseFloat($content.css("marginLeft")) + - parseFloat($content.css("marginRight")); - - maxHeight -= - parseFloat($slide.css("paddingTop")) + - parseFloat($slide.css("paddingBottom")) + - parseFloat($content.css("marginTop")) + - parseFloat($content.css("marginBottom")); - - if (!width || !height) { - width = maxWidth; - height = maxHeight; - } - - minRatio = Math.min(1, maxWidth / width, maxHeight / height); - - width = minRatio * width; - height = minRatio * height; - - // Adjust width/height to precisely fit into container - if (width > maxWidth - 0.5) { - width = maxWidth; - } - - if (height > maxHeight - 0.5) { - height = maxHeight; - } - - if (slide.type === "image") { - rez.top = Math.floor((maxHeight - height) * 0.5) + parseFloat($slide.css("paddingTop")); - rez.left = Math.floor((maxWidth - width) * 0.5) + parseFloat($slide.css("paddingLeft")); - } else if (slide.contentType === "video") { - // Force aspect ratio for the video - // "I say the whole world must learn of our peaceful ways… by force!" - aspectRatio = slide.opts.width && slide.opts.height ? width / height : slide.opts.ratio || 16 / 9; - - if (height > width / aspectRatio) { - height = width / aspectRatio; - } else if (width > height * aspectRatio) { - width = height * aspectRatio; - } - } - - rez.width = width; - rez.height = height; - - return rez; - }, - - // Update content size and position for all slides - // ============================================== - - update: function (e) { - var self = this; - - $.each(self.slides, function (key, slide) { - self.updateSlide(slide, e); - }); - }, - - // Update slide content position and size - // ====================================== - - updateSlide: function (slide, e) { - var self = this, - $content = slide && slide.$content, - width = slide.width || slide.opts.width, - height = slide.height || slide.opts.height, - $slide = slide.$slide; - - // First, prevent caption overlap, if needed - self.adjustCaption(slide); - - // Then resize content to fit inside the slide - if ($content && (width || height || slide.contentType === "video") && !slide.hasError) { - $.fancybox.stop($content); - - $.fancybox.setTranslate($content, self.getFitPos(slide)); - - if (slide.pos === self.currPos) { - self.isAnimating = false; - - self.updateCursor(); - } - } - - // Then some adjustments - self.adjustLayout(slide); - - if ($slide.length) { - $slide.trigger("refresh"); - - if (slide.pos === self.currPos) { - self.$refs.toolbar - .add(self.$refs.navigation.find(".fancybox-button--arrow_right")) - .toggleClass("compensate-for-scrollbar", $slide.get(0).scrollHeight > $slide.get(0).clientHeight); - } - } - - self.trigger("onUpdate", slide, e); - }, - - // Horizontally center slide - // ========================= - - centerSlide: function (duration) { - var self = this, - current = self.current, - $slide = current.$slide; - - if (self.isClosing || !current) { - return; - } - - $slide.siblings().css({ - transform: "", - opacity: "" - }); - - $slide - .parent() - .children() - .removeClass("fancybox-slide--previous fancybox-slide--next"); - - $.fancybox.animate( - $slide, { - top: 0, - left: 0, - opacity: 1 - }, - duration === undefined ? 0 : duration, - function () { - // Clean up - $slide.css({ - transform: "", - opacity: "" - }); - - if (!current.isComplete) { - self.complete(); - } - }, - false - ); - }, - - // Check if current slide is moved (swiped) - // ======================================== - - isMoved: function (slide) { - var current = slide || this.current, - slidePos, - stagePos; - - if (!current) { - return false; - } - - stagePos = $.fancybox.getTranslate(this.$refs.stage); - slidePos = $.fancybox.getTranslate(current.$slide); - - return ( - !current.$slide.hasClass("fancybox-animated") && - (Math.abs(slidePos.top - stagePos.top) > 0.5 || Math.abs(slidePos.left - stagePos.left) > 0.5) - ); - }, - - // Update cursor style depending if content can be zoomed - // ====================================================== - - updateCursor: function (nextWidth, nextHeight) { - var self = this, - current = self.current, - $container = self.$refs.container, - canPan, - isZoomable; - - if (!current || self.isClosing || !self.Guestures) { - return; - } - - $container.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"); - - canPan = self.canPan(nextWidth, nextHeight); - - isZoomable = canPan ? true : self.isZoomable(); - - $container.toggleClass("fancybox-is-zoomable", isZoomable); - - $("[data-fancybox-zoom]").prop("disabled", !isZoomable); - - if (canPan) { - $container.addClass("fancybox-can-pan"); - } else if ( - isZoomable && - (current.opts.clickContent === "zoom" || ($.isFunction(current.opts.clickContent) && current.opts.clickContent(current) == "zoom")) - ) { - $container.addClass("fancybox-can-zoomIn"); - } else if (current.opts.touch && (current.opts.touch.vertical || self.group.length > 1) && current.contentType !== "video") { - $container.addClass("fancybox-can-swipe"); - } - }, - - // Check if current slide is zoomable - // ================================== - - isZoomable: function () { - var self = this, - current = self.current, - fitPos; - - // Assume that slide is zoomable if: - // - image is still loading - // - actual size of the image is smaller than available area - if (current && !self.isClosing && current.type === "image" && !current.hasError) { - if (!current.isLoaded) { - return true; - } - - fitPos = self.getFitPos(current); - - if (fitPos && (current.width > fitPos.width || current.height > fitPos.height)) { - return true; - } - } - - return false; - }, - - // Check if current image dimensions are smaller than actual - // ========================================================= - - isScaledDown: function (nextWidth, nextHeight) { - var self = this, - rez = false, - current = self.current, - $content = current.$content; - - if (nextWidth !== undefined && nextHeight !== undefined) { - rez = nextWidth < current.width && nextHeight < current.height; - } else if ($content) { - rez = $.fancybox.getTranslate($content); - rez = rez.width < current.width && rez.height < current.height; - } - - return rez; - }, - - // Check if image dimensions exceed parent element - // =============================================== - - canPan: function (nextWidth, nextHeight) { - var self = this, - current = self.current, - pos = null, - rez = false; - - if (current.type === "image" && (current.isComplete || (nextWidth && nextHeight)) && !current.hasError) { - rez = self.getFitPos(current); - - if (nextWidth !== undefined && nextHeight !== undefined) { - pos = { - width: nextWidth, - height: nextHeight - }; - } else if (current.isComplete) { - pos = $.fancybox.getTranslate(current.$content); - } - - if (pos && rez) { - rez = Math.abs(pos.width - rez.width) > 1.5 || Math.abs(pos.height - rez.height) > 1.5; - } - } - - return rez; - }, - - // Load content into the slide - // =========================== - - loadSlide: function (slide) { - var self = this, - type, - $slide, - ajaxLoad; - - if (slide.isLoading || slide.isLoaded) { - return; - } - - slide.isLoading = true; - - if (self.trigger("beforeLoad", slide) === false) { - slide.isLoading = false; - - return false; - } - - type = slide.type; - $slide = slide.$slide; - - $slide - .off("refresh") - .trigger("onReset") - .addClass(slide.opts.slideClass); - - // Create content depending on the type - switch (type) { - case "image": - self.setImage(slide); - - break; - - case "iframe": - self.setIframe(slide); - - break; - - case "html": - self.setContent(slide, slide.src || slide.content); - - break; - - case "video": - self.setContent( - slide, - slide.opts.video.tpl - .replace(/\{\{src\}\}/gi, slide.src) - .replace("{{format}}", slide.opts.videoFormat || slide.opts.video.format || "") - .replace("{{poster}}", slide.thumb || "") - ); - - break; - - case "inline": - if ($(slide.src).length) { - self.setContent(slide, $(slide.src)); - } else { - self.setError(slide); - } - - break; - - case "ajax": - self.showLoading(slide); - - ajaxLoad = $.ajax( - $.extend({}, slide.opts.ajax.settings, { - url: slide.src, - success: function (data, textStatus) { - if (textStatus === "success") { - self.setContent(slide, data); - } - }, - error: function (jqXHR, textStatus) { - if (jqXHR && textStatus !== "abort") { - self.setError(slide); - } - } - }) - ); - - $slide.one("onReset", function () { - ajaxLoad.abort(); - }); - - break; - - default: - self.setError(slide); - - break; - } - - return true; - }, - - // Use thumbnail image, if possible - // ================================ - - setImage: function (slide) { - var self = this, - ghost; - - // Check if need to show loading icon - setTimeout(function () { - var $img = slide.$image; - - if (!self.isClosing && slide.isLoading && (!$img || !$img.length || !$img[0].complete) && !slide.hasError) { - self.showLoading(slide); - } - }, 50); - - //Check if image has srcset - self.checkSrcset(slide); - - // This will be wrapper containing both ghost and actual image - slide.$content = $('
') - .addClass("fancybox-is-hidden") - .appendTo(slide.$slide.addClass("fancybox-slide--image")); - - // If we have a thumbnail, we can display it while actual image is loading - // Users will not stare at black screen and actual image will appear gradually - if (slide.opts.preload !== false && slide.opts.width && slide.opts.height && slide.thumb) { - slide.width = slide.opts.width; - slide.height = slide.opts.height; - - ghost = document.createElement("img"); - - ghost.onerror = function () { - $(this).remove(); - - slide.$ghost = null; - }; - - ghost.onload = function () { - self.afterLoad(slide); - }; - - slide.$ghost = $(ghost) - .addClass("fancybox-image") - .appendTo(slide.$content) - .attr("src", slide.thumb); - } - - // Start loading actual image - self.setBigImage(slide); - }, - - // Check if image has srcset and get the source - // ============================================ - checkSrcset: function (slide) { - var srcset = slide.opts.srcset || slide.opts.image.srcset, - found, - temp, - pxRatio, - windowWidth; - - // If we have "srcset", then we need to find first matching "src" value. - // This is necessary, because when you set an src attribute, the browser will preload the image - // before any javascript or even CSS is applied. - if (srcset) { - pxRatio = window.devicePixelRatio || 1; - windowWidth = window.innerWidth * pxRatio; - - temp = srcset.split(",").map(function (el) { - var ret = {}; - - el.trim() - .split(/\s+/) - .forEach(function (el, i) { - var value = parseInt(el.substring(0, el.length - 1), 10); - - if (i === 0) { - return (ret.url = el); - } - - if (value) { - ret.value = value; - ret.postfix = el[el.length - 1]; - } - }); - - return ret; - }); - - // Sort by value - temp.sort(function (a, b) { - return a.value - b.value; - }); - - // Ok, now we have an array of all srcset values - for (var j = 0; j < temp.length; j++) { - var el = temp[j]; - - if ((el.postfix === "w" && el.value >= windowWidth) || (el.postfix === "x" && el.value >= pxRatio)) { - found = el; - break; - } - } - - // If not found, take the last one - if (!found && temp.length) { - found = temp[temp.length - 1]; - } - - if (found) { - slide.src = found.url; - - // If we have default width/height values, we can calculate height for matching source - if (slide.width && slide.height && found.postfix == "w") { - slide.height = (slide.width / slide.height) * found.value; - slide.width = found.value; - } - - slide.opts.srcset = srcset; - } - } - }, - - // Create full-size image - // ====================== - - setBigImage: function (slide) { - var self = this, - img = document.createElement("img"), - $img = $(img); - - slide.$image = $img - .one("error", function () { - self.setError(slide); - }) - .one("load", function () { - var sizes; - - if (!slide.$ghost) { - self.resolveImageSlideSize(slide, this.naturalWidth, this.naturalHeight); - - self.afterLoad(slide); - } - - if (self.isClosing) { - return; - } - - if (slide.opts.srcset) { - sizes = slide.opts.sizes; - - if (!sizes || sizes === "auto") { - sizes = - (slide.width / slide.height > 1 && $W.width() / $W.height() > 1 ? "100" : Math.round((slide.width / slide.height) * 100)) + - "vw"; - } - - $img.attr("sizes", sizes).attr("srcset", slide.opts.srcset); - } - - // Hide temporary image after some delay - if (slide.$ghost) { - setTimeout(function () { - if (slide.$ghost && !self.isClosing) { - slide.$ghost.hide(); - } - }, Math.min(300, Math.max(1000, slide.height / 1600))); - } - - self.hideLoading(slide); - }) - .addClass("fancybox-image") - .attr("src", slide.src) - .appendTo(slide.$content); - - if ((img.complete || img.readyState == "complete") && $img.naturalWidth && $img.naturalHeight) { - $img.trigger("load"); - } else if (img.error) { - $img.trigger("error"); - } - }, - - // Computes the slide size from image size and maxWidth/maxHeight - // ============================================================== - - resolveImageSlideSize: function (slide, imgWidth, imgHeight) { - var maxWidth = parseInt(slide.opts.width, 10), - maxHeight = parseInt(slide.opts.height, 10); - - // Sets the default values from the image - slide.width = imgWidth; - slide.height = imgHeight; - - if (maxWidth > 0) { - slide.width = maxWidth; - slide.height = Math.floor((maxWidth * imgHeight) / imgWidth); - } - - if (maxHeight > 0) { - slide.width = Math.floor((maxHeight * imgWidth) / imgHeight); - slide.height = maxHeight; - } - }, - - // Create iframe wrapper, iframe and bindings - // ========================================== - - setIframe: function (slide) { - var self = this, - opts = slide.opts.iframe, - $slide = slide.$slide, - $iframe; - - slide.$content = $('
') - .css(opts.css) - .appendTo($slide); - - $slide.addClass("fancybox-slide--" + slide.contentType); - - slide.$iframe = $iframe = $(opts.tpl.replace(/\{rnd\}/g, new Date().getTime())) - .attr(opts.attr) - .appendTo(slide.$content); - - if (opts.preload) { - self.showLoading(slide); - - // Unfortunately, it is not always possible to determine if iframe is successfully loaded - // (due to browser security policy) - - $iframe.on("load.fb error.fb", function (e) { - this.isReady = 1; - - slide.$slide.trigger("refresh"); - - self.afterLoad(slide); - }); - - // Recalculate iframe content size - // =============================== - - $slide.on("refresh.fb", function () { - var $content = slide.$content, - frameWidth = opts.css.width, - frameHeight = opts.css.height, - $contents, - $body; - - if ($iframe[0].isReady !== 1) { - return; - } - - try { - $contents = $iframe.contents(); - $body = $contents.find("body"); - } catch (ignore) {} - - // Calculate content dimensions, if it is accessible - if ($body && $body.length && $body.children().length) { - // Avoid scrolling to top (if multiple instances) - $slide.css("overflow", "visible"); - - $content.css({ - width: "100%", - "max-width": "100%", - height: "9999px" - }); - - if (frameWidth === undefined) { - frameWidth = Math.ceil(Math.max($body[0].clientWidth, $body.outerWidth(true))); - } - - $content.css("width", frameWidth ? frameWidth : "").css("max-width", ""); - - if (frameHeight === undefined) { - frameHeight = Math.ceil(Math.max($body[0].clientHeight, $body.outerHeight(true))); - } - - $content.css("height", frameHeight ? frameHeight : ""); - - $slide.css("overflow", "auto"); - } - - $content.removeClass("fancybox-is-hidden"); - }); - } else { - self.afterLoad(slide); - } - - $iframe.attr("src", slide.src); - - // Remove iframe if closing or changing gallery item - $slide.one("onReset", function () { - // This helps IE not to throw errors when closing - try { - $(this) - .find("iframe") - .hide() - .unbind() - .attr("src", "//about:blank"); - } catch (ignore) {} - - $(this) - .off("refresh.fb") - .empty(); - - slide.isLoaded = false; - slide.isRevealed = false; - }); - }, - - // Wrap and append content to the slide - // ====================================== - - setContent: function (slide, content) { - var self = this; - - if (self.isClosing) { - return; - } - - self.hideLoading(slide); - - if (slide.$content) { - $.fancybox.stop(slide.$content); - } - - slide.$slide.empty(); - - // If content is a jQuery object, then it will be moved to the slide. - // The placeholder is created so we will know where to put it back. - if (isQuery(content) && content.parent().length) { - // Make sure content is not already moved to fancyBox - if (content.hasClass("fancybox-content") || content.parent().hasClass("fancybox-content")) { - content.parents(".fancybox-slide").trigger("onReset"); - } - - // Create temporary element marking original place of the content - slide.$placeholder = $("
") - .hide() - .insertAfter(content); - - // Make sure content is visible - content.css("display", "inline-block"); - } else if (!slide.hasError) { - // If content is just a plain text, try to convert it to html - if ($.type(content) === "string") { - content = $("
") - .append($.trim(content)) - .contents(); - } - - // If "filter" option is provided, then filter content - if (slide.opts.filter) { - content = $("
") - .html(content) - .find(slide.opts.filter); - } - } - - slide.$slide.one("onReset", function () { - // Pause all html5 video/audio - $(this) - .find("video,audio") - .trigger("pause"); - - // Put content back - if (slide.$placeholder) { - slide.$placeholder.after(content.removeClass("fancybox-content").hide()).remove(); - - slide.$placeholder = null; - } - - // Remove custom close button - if (slide.$smallBtn) { - slide.$smallBtn.remove(); - - slide.$smallBtn = null; - } - - // Remove content and mark slide as not loaded - if (!slide.hasError) { - $(this).empty(); - - slide.isLoaded = false; - slide.isRevealed = false; - } - }); - - $(content).appendTo(slide.$slide); - - if ($(content).is("video,audio")) { - $(content).addClass("fancybox-video"); - - $(content).wrap("
"); - - slide.contentType = "video"; - - slide.opts.width = slide.opts.width || $(content).attr("width"); - slide.opts.height = slide.opts.height || $(content).attr("height"); - } - - slide.$content = slide.$slide - .children() - .filter("div,form,main,video,audio,article,.fancybox-content") - .first(); - - slide.$content.siblings().hide(); - - // Re-check if there is a valid content - // (in some cases, ajax response can contain various elements or plain text) - if (!slide.$content.length) { - slide.$content = slide.$slide - .wrapInner("
") - .children() - .first(); - } - - slide.$content.addClass("fancybox-content"); - - slide.$slide.addClass("fancybox-slide--" + slide.contentType); - - self.afterLoad(slide); - }, - - // Display error message - // ===================== - - setError: function (slide) { - slide.hasError = true; - - slide.$slide - .trigger("onReset") - .removeClass("fancybox-slide--" + slide.contentType) - .addClass("fancybox-slide--error"); - - slide.contentType = "html"; - - this.setContent(slide, this.translate(slide, slide.opts.errorTpl)); - - if (slide.pos === this.currPos) { - this.isAnimating = false; - } - }, - - // Show loading icon inside the slide - // ================================== - - showLoading: function (slide) { - var self = this; - - slide = slide || self.current; - - if (slide && !slide.$spinner) { - slide.$spinner = $(self.translate(self, self.opts.spinnerTpl)) - .appendTo(slide.$slide) - .hide() - .fadeIn("fast"); - } - }, - - // Remove loading icon from the slide - // ================================== - - hideLoading: function (slide) { - var self = this; - - slide = slide || self.current; - - if (slide && slide.$spinner) { - slide.$spinner.stop().remove(); - - delete slide.$spinner; - } - }, - - // Adjustments after slide content has been loaded - // =============================================== - - afterLoad: function (slide) { - var self = this; - - if (self.isClosing) { - return; - } - - slide.isLoading = false; - slide.isLoaded = true; - - self.trigger("afterLoad", slide); - - self.hideLoading(slide); - - // Add small close button - if (slide.opts.smallBtn && (!slide.$smallBtn || !slide.$smallBtn.length)) { - slide.$smallBtn = $(self.translate(slide, slide.opts.btnTpl.smallBtn)).appendTo(slide.$content); - } - - // Disable right click - if (slide.opts.protect && slide.$content && !slide.hasError) { - slide.$content.on("contextmenu.fb", function (e) { - if (e.button == 2) { - e.preventDefault(); - } - - return true; - }); - - // Add fake element on top of the image - // This makes a bit harder for user to select image - if (slide.type === "image") { - $('
').appendTo(slide.$content); - } - } - - self.adjustCaption(slide); - - self.adjustLayout(slide); - - if (slide.pos === self.currPos) { - self.updateCursor(); - } - - self.revealContent(slide); - }, - - // Prevent caption overlap, - // fix css inconsistency across browsers - // ===================================== - - adjustCaption: function (slide) { - var self = this, - current = slide || self.current, - caption = current.opts.caption, - preventOverlap = current.opts.preventCaptionOverlap, - $caption = self.$refs.caption, - $clone, - captionH = false; - - $caption.toggleClass("fancybox-caption--separate", preventOverlap); - - if (preventOverlap && caption && caption.length) { - if (current.pos !== self.currPos) { - $clone = $caption.clone().appendTo($caption.parent()); - - $clone - .children() - .eq(0) - .empty() - .html(caption); - - captionH = $clone.outerHeight(true); - - $clone.empty().remove(); - } else if (self.$caption) { - captionH = self.$caption.outerHeight(true); - } - - current.$slide.css("padding-bottom", captionH || ""); - } - }, - - // Simple hack to fix inconsistency across browsers, described here (affects Edge, too): - // https://bugzilla.mozilla.org/show_bug.cgi?id=748518 - // ==================================================================================== - - adjustLayout: function (slide) { - var self = this, - current = slide || self.current, - scrollHeight, - marginBottom, - inlinePadding, - actualPadding; - - if (current.isLoaded && current.opts.disableLayoutFix !== true) { - current.$content.css("margin-bottom", ""); - - // If we would always set margin-bottom for the content, - // then it would potentially break vertical align - if (current.$content.outerHeight() > current.$slide.height() + 0.5) { - inlinePadding = current.$slide[0].style["padding-bottom"]; - actualPadding = current.$slide.css("padding-bottom"); - - if (parseFloat(actualPadding) > 0) { - scrollHeight = current.$slide[0].scrollHeight; - - current.$slide.css("padding-bottom", 0); - - if (Math.abs(scrollHeight - current.$slide[0].scrollHeight) < 1) { - marginBottom = actualPadding; - } - - current.$slide.css("padding-bottom", inlinePadding); - } - } - - current.$content.css("margin-bottom", marginBottom); - } - }, - - // Make content visible - // This method is called right after content has been loaded or - // user navigates gallery and transition should start - // ============================================================ - - revealContent: function (slide) { - var self = this, - $slide = slide.$slide, - end = false, - start = false, - isMoved = self.isMoved(slide), - isRevealed = slide.isRevealed, - effect, - effectClassName, - duration, - opacity; - - slide.isRevealed = true; - - effect = slide.opts[self.firstRun ? "animationEffect" : "transitionEffect"]; - duration = slide.opts[self.firstRun ? "animationDuration" : "transitionDuration"]; - - duration = parseInt(slide.forcedDuration === undefined ? duration : slide.forcedDuration, 10); - - if (isMoved || slide.pos !== self.currPos || !duration) { - effect = false; - } - - // Check if can zoom - if (effect === "zoom") { - if (slide.pos === self.currPos && duration && slide.type === "image" && !slide.hasError && (start = self.getThumbPos(slide))) { - end = self.getFitPos(slide); - } else { - effect = "fade"; - } - } - - // Zoom animation - // ============== - if (effect === "zoom") { - self.isAnimating = true; - - end.scaleX = end.width / start.width; - end.scaleY = end.height / start.height; - - // Check if we need to animate opacity - opacity = slide.opts.zoomOpacity; - - if (opacity == "auto") { - opacity = Math.abs(slide.width / slide.height - start.width / start.height) > 0.1; - } - - if (opacity) { - start.opacity = 0.1; - end.opacity = 1; - } - - // Draw image at start position - $.fancybox.setTranslate(slide.$content.removeClass("fancybox-is-hidden"), start); - - forceRedraw(slide.$content); - - // Start animation - $.fancybox.animate(slide.$content, end, duration, function () { - self.isAnimating = false; - - self.complete(); - }); - - return; - } - - self.updateSlide(slide); - - // Simply show content if no effect - // ================================ - if (!effect) { - slide.$content.removeClass("fancybox-is-hidden"); - - if (!isRevealed && isMoved && slide.type === "image" && !slide.hasError) { - slide.$content.hide().fadeIn("fast"); - } - - if (slide.pos === self.currPos) { - self.complete(); - } - - return; - } - - // Prepare for CSS transiton - // ========================= - $.fancybox.stop($slide); - - //effectClassName = "fancybox-animated fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-fx-" + effect; - effectClassName = "fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-animated fancybox-fx-" + effect; - - $slide.addClass(effectClassName).removeClass("fancybox-slide--current"); //.addClass(effectClassName); - - slide.$content.removeClass("fancybox-is-hidden"); - - // Force reflow - forceRedraw($slide); - - if (slide.type !== "image") { - slide.$content.hide().show(0); - } - - $.fancybox.animate( - $slide, - "fancybox-slide--current", - duration, - function () { - $slide.removeClass(effectClassName).css({ - transform: "", - opacity: "" - }); - - if (slide.pos === self.currPos) { - self.complete(); - } - }, - true - ); - }, - - // Check if we can and have to zoom from thumbnail - //================================================ - - getThumbPos: function (slide) { - var rez = false, - $thumb = slide.$thumb, - thumbPos, - btw, - brw, - bbw, - blw; - - if (!$thumb || !inViewport($thumb[0])) { - return false; - } - - thumbPos = $.fancybox.getTranslate($thumb); - - btw = parseFloat($thumb.css("border-top-width") || 0); - brw = parseFloat($thumb.css("border-right-width") || 0); - bbw = parseFloat($thumb.css("border-bottom-width") || 0); - blw = parseFloat($thumb.css("border-left-width") || 0); - - rez = { - top: thumbPos.top + btw, - left: thumbPos.left + blw, - width: thumbPos.width - brw - blw, - height: thumbPos.height - btw - bbw, - scaleX: 1, - scaleY: 1 - }; - - return thumbPos.width > 0 && thumbPos.height > 0 ? rez : false; - }, - - // Final adjustments after current gallery item is moved to position - // and it`s content is loaded - // ================================================================== - - complete: function () { - var self = this, - current = self.current, - slides = {}, - $el; - - if (self.isMoved() || !current.isLoaded) { - return; - } - - if (!current.isComplete) { - current.isComplete = true; - - current.$slide.siblings().trigger("onReset"); - - self.preload("inline"); - - // Trigger any CSS transiton inside the slide - forceRedraw(current.$slide); - - current.$slide.addClass("fancybox-slide--complete"); - - // Remove unnecessary slides - $.each(self.slides, function (key, slide) { - if (slide.pos >= self.currPos - 1 && slide.pos <= self.currPos + 1) { - slides[slide.pos] = slide; - } else if (slide) { - $.fancybox.stop(slide.$slide); - - slide.$slide.off().remove(); - } - }); - - self.slides = slides; - } - - self.isAnimating = false; - - self.updateCursor(); - - self.trigger("afterShow"); - - // Autoplay first html5 video/audio - if (!!current.opts.video.autoStart) { - current.$slide - .find("video,audio") - .filter(":visible:first") - .trigger("play") - .one("ended", function () { - if (Document.exitFullscreen) { - Document.exitFullscreen(); - } else if (this.webkitExitFullscreen) { - this.webkitExitFullscreen(); - } - - self.next(); - }); - } - - // Try to focus on the first focusable element - if (current.opts.autoFocus && current.contentType === "html") { - // Look for the first input with autofocus attribute - $el = current.$content.find("input[autofocus]:enabled:visible:first"); - - if ($el.length) { - $el.trigger("focus"); - } else { - self.focus(null, true); - } - } - - // Avoid jumping - current.$slide.scrollTop(0).scrollLeft(0); - }, - - // Preload next and previous slides - // ================================ - - preload: function (type) { - var self = this, - prev, - next; - - if (self.group.length < 2) { - return; - } - - next = self.slides[self.currPos + 1]; - prev = self.slides[self.currPos - 1]; - - if (prev && prev.type === type) { - self.loadSlide(prev); - } - - if (next && next.type === type) { - self.loadSlide(next); - } - }, - - // Try to find and focus on the first focusable element - // ==================================================== - - focus: function (e, firstRun) { - var self = this, - focusableStr = [ - "a[href]", - "area[href]", - 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', - "select:not([disabled]):not([aria-hidden])", - "textarea:not([disabled]):not([aria-hidden])", - "button:not([disabled]):not([aria-hidden])", - "iframe", - "object", - "embed", - "video", - "audio", - "[contenteditable]", - '[tabindex]:not([tabindex^="-"])' - ].join(","), - focusableItems, - focusedItemIndex; - - if (self.isClosing) { - return; - } - - if (e || !self.current || !self.current.isComplete) { - // Focus on any element inside fancybox - focusableItems = self.$refs.container.find("*:visible"); - } else { - // Focus inside current slide - focusableItems = self.current.$slide.find("*:visible" + (firstRun ? ":not(.fancybox-close-small)" : "")); - } - - focusableItems = focusableItems.filter(focusableStr).filter(function () { - return $(this).css("visibility") !== "hidden" && !$(this).hasClass("disabled"); - }); - - if (focusableItems.length) { - focusedItemIndex = focusableItems.index(document.activeElement); - - if (e && e.shiftKey) { - // Back tab - if (focusedItemIndex < 0 || focusedItemIndex == 0) { - e.preventDefault(); - - focusableItems.eq(focusableItems.length - 1).trigger("focus"); - } - } else { - // Outside or Forward tab - if (focusedItemIndex < 0 || focusedItemIndex == focusableItems.length - 1) { - if (e) { - e.preventDefault(); - } - - focusableItems.eq(0).trigger("focus"); - } - } - } else { - self.$refs.container.trigger("focus"); - } - }, - - // Activates current instance - brings container to the front and enables keyboard, - // notifies other instances about deactivating - // ================================================================================= - - activate: function () { - var self = this; - - // Deactivate all instances - $(".fancybox-container").each(function () { - var instance = $(this).data("FancyBox"); - - // Skip self and closing instances - if (instance && instance.id !== self.id && !instance.isClosing) { - instance.trigger("onDeactivate"); - - instance.removeEvents(); - - instance.isVisible = false; - } - }); - - self.isVisible = true; - - if (self.current || self.isIdle) { - self.update(); - - self.updateControls(); - } - - self.trigger("onActivate"); - - self.addEvents(); - }, - - // Start closing procedure - // This will start "zoom-out" animation if needed and clean everything up afterwards - // ================================================================================= - - close: function (e, d) { - var self = this, - current = self.current, - effect, - duration, - $content, - domRect, - opacity, - start, - end; - - var done = function () { - self.cleanUp(e); - }; - - if (self.isClosing) { - return false; - } - - self.isClosing = true; - - // If beforeClose callback prevents closing, make sure content is centered - if (self.trigger("beforeClose", e) === false) { - self.isClosing = false; - - requestAFrame(function () { - self.update(); - }); - - return false; - } - - // Remove all events - // If there are multiple instances, they will be set again by "activate" method - self.removeEvents(); - - $content = current.$content; - effect = current.opts.animationEffect; - duration = $.isNumeric(d) ? d : effect ? current.opts.animationDuration : 0; - - current.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"); - - if (e !== true) { - $.fancybox.stop(current.$slide); - } else { - effect = false; - } - - // Remove other slides - current.$slide - .siblings() - .trigger("onReset") - .remove(); - - // Trigger animations - if (duration) { - self.$refs.container - .removeClass("fancybox-is-open") - .addClass("fancybox-is-closing") - .css("transition-duration", duration + "ms"); - } - - // Clean up - self.hideLoading(current); - - self.hideControls(true); - - self.updateCursor(); - - // Check if possible to zoom-out - if ( - effect === "zoom" && - !($content && duration && current.type === "image" && !self.isMoved() && !current.hasError && (end = self.getThumbPos(current))) - ) { - effect = "fade"; - } - - if (effect === "zoom") { - $.fancybox.stop($content); - - domRect = $.fancybox.getTranslate($content); - - start = { - top: domRect.top, - left: domRect.left, - scaleX: domRect.width / end.width, - scaleY: domRect.height / end.height, - width: end.width, - height: end.height - }; - - // Check if we need to animate opacity - opacity = current.opts.zoomOpacity; - - if (opacity == "auto") { - opacity = Math.abs(current.width / current.height - end.width / end.height) > 0.1; - } - - if (opacity) { - end.opacity = 0; - } - - $.fancybox.setTranslate($content, start); - - forceRedraw($content); - - $.fancybox.animate($content, end, duration, done); - - return true; - } - - if (effect && duration) { - $.fancybox.animate( - current.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"), - "fancybox-animated fancybox-fx-" + effect, - duration, - done - ); - } else { - // If skip animation - if (e === true) { - setTimeout(done, duration); - } else { - done(); - } - } - - return true; - }, - - // Final adjustments after removing the instance - // ============================================= - - cleanUp: function (e) { - var self = this, - instance, - $focus = self.current.opts.$orig, - x, - y; - - self.current.$slide.trigger("onReset"); - - self.$refs.container.empty().remove(); - - self.trigger("afterClose", e); - - // Place back focus - if (!!self.current.opts.backFocus) { - if (!$focus || !$focus.length || !$focus.is(":visible")) { - $focus = self.$trigger; - } - - if ($focus && $focus.length) { - x = window.scrollX; - y = window.scrollY; - - $focus.trigger("focus"); - - $("html, body") - .scrollTop(y) - .scrollLeft(x); - } - } - - self.current = null; - - // Check if there are other instances - instance = $.fancybox.getInstance(); - - if (instance) { - instance.activate(); - } else { - $("body").removeClass("fancybox-active compensate-for-scrollbar"); - - $("#fancybox-style-noscroll").remove(); - } - }, - - // Call callback and trigger an event - // ================================== - - trigger: function (name, slide) { - var args = Array.prototype.slice.call(arguments, 1), - self = this, - obj = slide && slide.opts ? slide : self.current, - rez; - - if (obj) { - args.unshift(obj); - } else { - obj = self; - } - - args.unshift(self); - - if ($.isFunction(obj.opts[name])) { - rez = obj.opts[name].apply(obj, args); - } - - if (rez === false) { - return rez; - } - - if (name === "afterClose" || !self.$refs) { - $D.trigger(name + ".fb", args); - } else { - self.$refs.container.trigger(name + ".fb", args); - } - }, - - // Update infobar values, navigation button states and reveal caption - // ================================================================== - - updateControls: function () { - var self = this, - current = self.current, - index = current.index, - $container = self.$refs.container, - $caption = self.$refs.caption, - caption = current.opts.caption; - - // Recalculate content dimensions - current.$slide.trigger("refresh"); - - // Set caption - if (caption && caption.length) { - self.$caption = $caption; - - $caption - .children() - .eq(0) - .html(caption); - } else { - self.$caption = null; - } - - if (!self.hasHiddenControls && !self.isIdle) { - self.showControls(); - } - - // Update info and navigation elements - $container.find("[data-fancybox-count]").html(self.group.length); - $container.find("[data-fancybox-index]").html(index + 1); - - $container.find("[data-fancybox-prev]").prop("disabled", !current.opts.loop && index <= 0); - $container.find("[data-fancybox-next]").prop("disabled", !current.opts.loop && index >= self.group.length - 1); - - if (current.type === "image") { - // Re-enable buttons; update download button source - $container - .find("[data-fancybox-zoom]") - .show() - .end() - .find("[data-fancybox-download]") - .attr("href", current.opts.image.src || current.src) - .show(); - } else if (current.opts.toolbar) { - $container.find("[data-fancybox-download],[data-fancybox-zoom]").hide(); - } - - // Make sure focus is not on disabled button/element - if ($(document.activeElement).is(":hidden,[disabled]")) { - self.$refs.container.trigger("focus"); - } - }, - - // Hide toolbar and caption - // ======================== - - hideControls: function (andCaption) { - var self = this, - arr = ["infobar", "toolbar", "nav"]; - - if (andCaption || !self.current.opts.preventCaptionOverlap) { - arr.push("caption"); - } - - this.$refs.container.removeClass( - arr - .map(function (i) { - return "fancybox-show-" + i; - }) - .join(" ") - ); - - this.hasHiddenControls = true; - }, - - showControls: function () { - var self = this, - opts = self.current ? self.current.opts : self.opts, - $container = self.$refs.container; - - self.hasHiddenControls = false; - self.idleSecondsCounter = 0; - - $container - .toggleClass("fancybox-show-toolbar", !!(opts.toolbar && opts.buttons)) - .toggleClass("fancybox-show-infobar", !!(opts.infobar && self.group.length > 1)) - .toggleClass("fancybox-show-caption", !!self.$caption) - .toggleClass("fancybox-show-nav", !!(opts.arrows && self.group.length > 1)) - .toggleClass("fancybox-is-modal", !!opts.modal); - }, - - // Toggle toolbar and caption - // ========================== - - toggleControls: function () { - if (this.hasHiddenControls) { - this.showControls(); - } else { - this.hideControls(); - } - } - }); - - $.fancybox = { - version: "{fancybox-version}", - defaults: defaults, - - // Get current instance and execute a command. - // - // Examples of usage: - // - // $instance = $.fancybox.getInstance(); - // $.fancybox.getInstance().jumpTo( 1 ); - // $.fancybox.getInstance( 'jumpTo', 1 ); - // $.fancybox.getInstance( function() { - // console.info( this.currIndex ); - // }); - // ====================================================== - - getInstance: function (command) { - var instance = $('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"), - args = Array.prototype.slice.call(arguments, 1); - - if (instance instanceof FancyBox) { - if ($.type(command) === "string") { - instance[command].apply(instance, args); - } else if ($.type(command) === "function") { - command.apply(instance, args); - } - - return instance; - } - - return false; - }, - - // Create new instance - // =================== - - open: function (items, opts, index) { - return new FancyBox(items, opts, index); - }, - - // Close current or all instances - // ============================== - - close: function (all) { - var instance = this.getInstance(); - - if (instance) { - instance.close(); - - // Try to find and close next instance - if (all === true) { - this.close(all); - } - } - }, - - // Close all instances and unbind all events - // ========================================= - - destroy: function () { - this.close(true); - - $D.add("body").off("click.fb-start", "**"); - }, - - // Try to detect mobile devices - // ============================ - - isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), - - // Detect if 'translate3d' support is available - // ============================================ - - use3d: (function () { - var div = document.createElement("div"); - - return ( - window.getComputedStyle && - window.getComputedStyle(div) && - window.getComputedStyle(div).getPropertyValue("transform") && - !(document.documentMode && document.documentMode < 11) - ); - })(), - - // Helper function to get current visual state of an element - // returns array[ top, left, horizontal-scale, vertical-scale, opacity ] - // ===================================================================== - - getTranslate: function ($el) { - var domRect; - - if (!$el || !$el.length) { - return false; - } - - domRect = $el[0].getBoundingClientRect(); - - return { - top: domRect.top || 0, - left: domRect.left || 0, - width: domRect.width, - height: domRect.height, - opacity: parseFloat($el.css("opacity")) - }; - }, - - // Shortcut for setting "translate3d" properties for element - // Can set be used to set opacity, too - // ======================================================== - - setTranslate: function ($el, props) { - var str = "", - css = {}; - - if (!$el || !props) { - return; - } - - if (props.left !== undefined || props.top !== undefined) { - str = - (props.left === undefined ? $el.position().left : props.left) + - "px, " + - (props.top === undefined ? $el.position().top : props.top) + - "px"; - - if (this.use3d) { - str = "translate3d(" + str + ", 0px)"; - } else { - str = "translate(" + str + ")"; - } - } - - if (props.scaleX !== undefined && props.scaleY !== undefined) { - str += " scale(" + props.scaleX + ", " + props.scaleY + ")"; - } else if (props.scaleX !== undefined) { - str += " scaleX(" + props.scaleX + ")"; - } - - if (str.length) { - css.transform = str; - } - - if (props.opacity !== undefined) { - css.opacity = props.opacity; - } - - if (props.width !== undefined) { - css.width = props.width; - } - - if (props.height !== undefined) { - css.height = props.height; - } - - return $el.css(css); - }, - - // Simple CSS transition handler - // ============================= - - animate: function ($el, to, duration, callback, leaveAnimationName) { - var self = this, - from; - - if ($.isFunction(duration)) { - callback = duration; - duration = null; - } - - self.stop($el); - - from = self.getTranslate($el); - - $el.on(transitionEnd, function (e) { - // Skip events from child elements and z-index change - if (e && e.originalEvent && (!$el.is(e.originalEvent.target) || e.originalEvent.propertyName == "z-index")) { - return; - } - - self.stop($el); - - if ($.isNumeric(duration)) { - $el.css("transition-duration", ""); - } - - if ($.isPlainObject(to)) { - if (to.scaleX !== undefined && to.scaleY !== undefined) { - self.setTranslate($el, { - top: to.top, - left: to.left, - width: from.width * to.scaleX, - height: from.height * to.scaleY, - scaleX: 1, - scaleY: 1 - }); - } - } else if (leaveAnimationName !== true) { - $el.removeClass(to); - } - - if ($.isFunction(callback)) { - callback(e); - } - }); - - if ($.isNumeric(duration)) { - $el.css("transition-duration", duration + "ms"); - } - - // Start animation by changing CSS properties or class name - if ($.isPlainObject(to)) { - if (to.scaleX !== undefined && to.scaleY !== undefined) { - delete to.width; - delete to.height; - - if ($el.parent().hasClass("fancybox-slide--image")) { - $el.parent().addClass("fancybox-is-scaling"); - } - } - - $.fancybox.setTranslate($el, to); - } else { - $el.addClass(to); - } - - // Make sure that `transitionend` callback gets fired - $el.data( - "timer", - setTimeout(function () { - $el.trigger(transitionEnd); - }, duration + 33) - ); - }, - - stop: function ($el, callCallback) { - if ($el && $el.length) { - clearTimeout($el.data("timer")); - - if (callCallback) { - $el.trigger(transitionEnd); - } - - $el.off(transitionEnd).css("transition-duration", ""); - - $el.parent().removeClass("fancybox-is-scaling"); - } - } - }; - - // Default click handler for "fancyboxed" links - // ============================================ - - function _run(e, opts) { - var items = [], - index = 0, - $target, - value, - instance; - - // Avoid opening multiple times - if (e && e.isDefaultPrevented()) { - return; - } - - e.preventDefault(); - - opts = opts || {}; - - if (e && e.data) { - opts = mergeOpts(e.data.options, opts); - } - - $target = opts.$target || $(e.currentTarget).trigger("blur"); - instance = $.fancybox.getInstance(); - - if (instance && instance.$trigger && instance.$trigger.is($target)) { - return; - } - - if (opts.selector) { - items = $(opts.selector); - } else { - // Get all related items and find index for clicked one - value = $target.attr("data-fancybox") || ""; - - if (value) { - items = e.data ? e.data.items : []; - items = items.length ? items.filter('[data-fancybox="' + value + '"]') : $('[data-fancybox="' + value + '"]'); - } else { - items = [$target]; - } - } - - index = $(items).index($target); - - // Sometimes current item can not be found - if (index < 0) { - index = 0; - } - - instance = $.fancybox.open(items, opts, index); - - // Save last active element - instance.$trigger = $target; - } - - // Create a jQuery plugin - // ====================== - - $.fn.fancybox = function (options) { - var selector; - - options = options || {}; - selector = options.selector || false; - - if (selector) { - // Use body element instead of document so it executes first - $("body") - .off("click.fb-start", selector) - .on("click.fb-start", selector, { - options: options - }, _run); - } else { - this.off("click.fb-start").on( - "click.fb-start", { - items: this, - options: options - }, - _run - ); - } - - return this; - }; - - // Self initializing plugin for all elements having `data-fancybox` attribute - // ========================================================================== - - $D.on("click.fb-start", "[data-fancybox]", _run); - - // Enable "trigger elements" - // ========================= - - $D.on("click.fb-start", "[data-fancybox-trigger]", function (e) { - $('[data-fancybox="' + $(this).attr("data-fancybox-trigger") + '"]') - .eq($(this).attr("data-fancybox-index") || 0) - .trigger("click.fb-start", { - $trigger: $(this) - }); - }); - - // Track focus event for better accessibility styling - // ================================================== - (function () { - var buttonStr = ".fancybox-button", - focusStr = "fancybox-focus", - $pressed = null; - - $D.on("mousedown mouseup focus blur", buttonStr, function (e) { - switch (e.type) { - case "mousedown": - $pressed = $(this); - break; - case "mouseup": - $pressed = null; - break; - case "focusin": - $(buttonStr).removeClass(focusStr); - - if (!$(this).is($pressed) && !$(this).is("[disabled]")) { - $(this).addClass(focusStr); - } - break; - case "focusout": - $(buttonStr).removeClass(focusStr); - break; - } - }); - })(); -})(window, document, jQuery); \ No newline at end of file diff --git a/assets/js/highlight.js b/assets/js/highlight.js index 4370be46..b897ec47 100644 --- a/assets/js/highlight.js +++ b/assets/js/highlight.js @@ -1,1326 +1,5491 @@ /* - Highlight.js 10.6.0 (eb122d3b) + Highlight.js 10.7.2 (00233d63) License: BSD-3-Clause - Copyright (c) 2006-2020, Ivan Sagalaev + Copyright (c) 2006-2021, Ivan Sagalaev */ -var hljs=function(){"use strict";function e(t){ -return t instanceof Map?t.clear=t.delete=t.set=()=>{ -throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{ -throw Error("set is read-only") -}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{var s=t[n] -;"object"!=typeof s||Object.isFrozen(s)||e(s)})),t}var t=e,n=e;t.default=n -;class s{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data} -ignoreMatch(){this.ignore=!0}}function r(e){ -return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") -}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] -;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const i=e=>!!e.kind -;class o{constructor(e,t){ -this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ -this.buffer+=r(e)}openNode(e){if(!i(e))return;let t=e.kind -;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){ -i(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ -this.buffer+=``}}class l{constructor(){this.rootNode={ -children:[]},this.stack=[this.rootNode]}get top(){ -return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ -this.top.children.push(e)}openNode(e){const t={kind:e,children:[]} -;this.add(t),this.stack.push(t)}closeNode(){ -if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ -for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} -walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ -return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), -t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ -"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ -l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e} -addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} -addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root -;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){ -return new o(this,this.options).value()}finalize(){return!0}}function u(e){ -return e?"string"==typeof e?e:e.source:null} -const g="[a-zA-Z]\\w*",d="[a-zA-Z_]\\w*",h="\\b\\d+(\\.\\d+)?",f="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",p="\\b(0b[01]+)",m={ -begin:"\\\\[\\s\\S]",relevance:0},b={className:"string",begin:"'",end:"'", -illegal:"\\n",contains:[m]},x={className:"string",begin:'"',end:'"', -illegal:"\\n",contains:[m]},E={ -begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ -},v=(e,t,n={})=>{const s=a({className:"comment",begin:e,end:t,contains:[]},n) -;return s.contains.push(E),s.contains.push({className:"doctag", -begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),s -},w=v("//","$"),N=v("/\\*","\\*/"),y=v("#","$");var R=Object.freeze({ -__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:g,UNDERSCORE_IDENT_RE:d, -NUMBER_RE:h,C_NUMBER_RE:f,BINARY_NUMBER_RE:p, -RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", -SHEBANG:(e={})=>{const t=/^#![ ]*\// -;return e.binary&&(e.begin=((...e)=>e.map((e=>u(e))).join(""))(t,/.*\b/,e.binary,/\b.*/)), -a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{ -0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:m,APOS_STRING_MODE:b, -QUOTE_STRING_MODE:x,PHRASAL_WORDS_MODE:E,COMMENT:v,C_LINE_COMMENT_MODE:w, -C_BLOCK_COMMENT_MODE:N,HASH_COMMENT_MODE:y,NUMBER_MODE:{className:"number", -begin:h,relevance:0},C_NUMBER_MODE:{className:"number",begin:f,relevance:0}, -BINARY_NUMBER_MODE:{className:"number",begin:p,relevance:0},CSS_NUMBER_MODE:{ -className:"number", -begin:h+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", -relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp", -begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[m,{begin:/\[/,end:/\]/, -relevance:0,contains:[m]}]}]},TITLE_MODE:{className:"title",begin:g,relevance:0 -},UNDERSCORE_TITLE_MODE:{className:"title",begin:d,relevance:0},METHOD_GUARD:{ -begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ -"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ -t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function _(e,t){ -"."===e.input[e.index-1]&&t.ignoreMatch()}function k(e,t){ -t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", -e.__beforeBegin=_,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, -void 0===e.relevance&&(e.relevance=0))}function O(e,t){ -Array.isArray(e.illegal)&&(e.illegal=((...e)=>"("+e.map((e=>u(e))).join("|")+")")(...e.illegal)) -}function M(e,t){if(e.match){ -if(e.begin||e.end)throw Error("begin & end are not supported with match") -;e.begin=e.match,delete e.match}}function A(e,t){ -void 0===e.relevance&&(e.relevance=1)} -const L=["of","and","for","in","not","or","if","then","parent","list","value"] -;function B(e,t,n="keyword"){const s={} -;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{ -Object.assign(s,B(e[n],t,n))})),s;function r(e,n){ -t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|") -;s[n[0]]=[e,I(n[0],n[1])]}))}}function I(e,t){ -return t?Number(t):(e=>L.includes(e.toLowerCase()))(e)?0:1} -function T(e,{plugins:t}){function n(t,n){ -return RegExp(u(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class s{ -constructor(){ -this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} -addRule(e,t){ -t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), -this.matchAt+=(e=>RegExp(e.toString()+"|").exec("").length-1)(e)+1}compile(){ -0===this.regexes.length&&(this.exec=()=>null) -;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(((e,t="|")=>{ -const n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;let s=0,r="" -;for(let a=0;a0&&(r+=t),r+="(";o.length>0;){const e=n.exec(o);if(null==e){r+=o;break} -r+=o.substring(0,e.index), -o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+i):(r+=e[0], -"("===e[0]&&s++)}r+=")"}return r})(e),!0),this.lastIndex=0}exec(e){ -this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e) -;if(!t)return null -;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),s=this.matchIndexes[n] -;return t.splice(0,n),Object.assign(t,s)}}class r{constructor(){ -this.rules=[],this.multiRegexes=[], -this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ -if(this.multiRegexes[e])return this.multiRegexes[e];const t=new s -;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), -t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ -return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ -this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ -const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex -;let n=t.exec(e) -;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ -const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} -return n&&(this.regexIndex+=n.position+1, -this.regexIndex===this.count&&this.considerAll()),n}} -if(e.compilerExtensions||(e.compilerExtensions=[]), -e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") -;return e.classNameAliases=a(e.classNameAliases||{}),function t(s,i){const o=s -;if(s.compiled)return o -;[M].forEach((e=>e(s,i))),e.compilerExtensions.forEach((e=>e(s,i))), -s.__beforeBegin=null,[k,O,A].forEach((e=>e(s,i))),s.compiled=!0;let l=null -;if("object"==typeof s.keywords&&(l=s.keywords.$pattern, -delete s.keywords.$pattern), -s.keywords&&(s.keywords=B(s.keywords,e.case_insensitive)), -s.lexemes&&l)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ") -;return l=l||s.lexemes||/\w+/, -o.keywordPatternRe=n(l,!0),i&&(s.begin||(s.begin=/\B|\b/), -o.beginRe=n(s.begin),s.endSameAsBegin&&(s.end=s.begin), -s.end||s.endsWithParent||(s.end=/\B|\b/), -s.end&&(o.endRe=n(s.end)),o.terminatorEnd=u(s.end)||"", -s.endsWithParent&&i.terminatorEnd&&(o.terminatorEnd+=(s.end?"|":"")+i.terminatorEnd)), -s.illegal&&(o.illegalRe=n(s.illegal)), -s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>a(e,{ -variants:null},t)))),e.cachedVariants?e.cachedVariants:j(e)?a(e,{ -starts:e.starts?a(e.starts):null -}):Object.isFrozen(e)?a(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{t(e,o) -})),s.starts&&t(s.starts,i),o.matcher=(e=>{const t=new r -;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" -}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" -}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(o),o}(e)}function j(e){ -return!!e&&(e.endsWithParent||j(e.starts))}function S(e){const t={ -props:["language","code","autodetect"],data:()=>({detectedLanguage:"", -unknownLanguage:!1}),computed:{className(){ -return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){ -if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`), -this.unknownLanguage=!0,r(this.code);let t={} -;return this.autoDetect?(t=e.highlightAuto(this.code), -this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals), -this.detectedLanguage=this.language),t.value},autoDetect(){ -return!(this.language&&(e=this.autodetect,!e&&""!==e));var e}, -ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{ -class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{ -Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const P={ -"after:highlightBlock":({block:e,result:t,text:n})=>{const s=C(e) -;if(!s.length)return;const a=document.createElement("div") -;a.innerHTML=t.value,t.value=((e,t,n)=>{let s=0,a="";const i=[];function o(){ -return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function c(e){ -a+=""}function u(e){("start"===e.event?l:c)(e.node)} -for(;e.length||t.length;){let t=o() -;if(a+=r(n.substring(s,t[0].offset)),s=t[0].offset,t===e){i.reverse().forEach(c) -;do{u(t.splice(0,1)[0]),t=o()}while(t===e&&t.length&&t[0].offset===s) -;i.reverse().forEach(l) -}else"start"===t[0].event?i.push(t[0].node):i.pop(),u(t.splice(0,1)[0])} -return a+r(n.substr(s))})(s,C(a),n)}};function D(e){ -return e.nodeName.toLowerCase()}function C(e){const t=[];return function e(n,s){ -for(let r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?s+=r.nodeValue.length:1===r.nodeType&&(t.push({ -event:"start",offset:s,node:r}),s=e(r,s),D(r).match(/br|hr|img|input/)||t.push({ -event:"stop",offset:s,node:r}));return s}(e,0),t}const H=e=>{console.error(e) -},U=(e,...t)=>{console.log("WARN: "+e,...t)},$=(e,t)=>{ -console.log(`Deprecated as of ${e}. ${t}`)},z=r,K=a,G=Symbol("nomatch") -;return(e=>{const n=Object.create(null),r=Object.create(null),a=[];let i=!0 -;const o=/(^(<[^>]+>|\t|)+|\n)/gm,l="Could not find the language '{}', did you forget to load/include a language module?",u={ -disableAutodetect:!0,name:"Plain text",contains:[]};let g={ -noHighlightRe:/^(no-?highlight)$/i, -languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", -tabReplace:null,useBR:!1,languages:null,__emitter:c};function d(e){ -return g.noHighlightRe.test(e)}function h(e,t,n,s){const r={code:t,language:e} -;M("before:highlight",r);const a=r.result?r.result:f(r.language,r.code,n,s) -;return a.code=r.code,M("after:highlight",a),a}function f(e,t,r,o){const c=t -;function u(e,t){const n=w.case_insensitive?t[0].toLowerCase():t[0] -;return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]} -function d(){null!=R.subLanguage?(()=>{if(""===M)return;let e=null -;if("string"==typeof R.subLanguage){ -if(!n[R.subLanguage])return void O.addText(M) -;e=f(R.subLanguage,M,!0,k[R.subLanguage]),k[R.subLanguage]=e.top -}else e=p(M,R.subLanguage.length?R.subLanguage:null) -;R.relevance>0&&(A+=e.relevance),O.addSublanguage(e.emitter,e.language) -})():(()=>{if(!R.keywords)return void O.addText(M);let e=0 -;R.keywordPatternRe.lastIndex=0;let t=R.keywordPatternRe.exec(M),n="";for(;t;){ -n+=M.substring(e,t.index);const s=u(R,t);if(s){const[e,r]=s -;O.addText(n),n="",A+=r;const a=w.classNameAliases[e]||e;O.addKeyword(t[0],a) -}else n+=t[0];e=R.keywordPatternRe.lastIndex,t=R.keywordPatternRe.exec(M)} -n+=M.substr(e),O.addText(n)})(),M=""}function h(e){ -return e.className&&O.openNode(w.classNameAliases[e.className]||e.className), -R=Object.create(e,{parent:{value:R}}),R}function m(e,t,n){let r=((e,t)=>{ -const n=e&&e.exec(t);return n&&0===n.index})(e.endRe,n);if(r){if(e["on:end"]){ -const n=new s(e);e["on:end"](t,n),n.ignore&&(r=!1)}if(r){ -for(;e.endsParent&&e.parent;)e=e.parent;return e}} -if(e.endsWithParent)return m(e.parent,t,n)}function b(e){ -return 0===R.matcher.regexIndex?(M+=e[0],1):(I=!0,0)}function x(e){ -const t=e[0],n=c.substr(e.index),s=m(R,e,n);if(!s)return G;const r=R -;r.skip?M+=t:(r.returnEnd||r.excludeEnd||(M+=t),d(),r.excludeEnd&&(M=t));do{ -R.className&&O.closeNode(),R.skip||R.subLanguage||(A+=R.relevance),R=R.parent -}while(R!==s.parent) -;return s.starts&&(s.endSameAsBegin&&(s.starts.endRe=s.endRe), -h(s.starts)),r.returnEnd?0:t.length}let E={};function v(t,n){const a=n&&n[0] -;if(M+=t,null==a)return d(),0 -;if("begin"===E.type&&"end"===n.type&&E.index===n.index&&""===a){ -if(M+=c.slice(n.index,n.index+1),!i){const t=Error("0 width match regex") -;throw t.languageName=e,t.badRule=E.rule,t}return 1} -if(E=n,"begin"===n.type)return function(e){ -const t=e[0],n=e.rule,r=new s(n),a=[n.__beforeBegin,n["on:begin"]] -;for(const n of a)if(n&&(n(e,r),r.ignore))return b(t) -;return n&&n.endSameAsBegin&&(n.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")), -n.skip?M+=t:(n.excludeBegin&&(M+=t), -d(),n.returnBegin||n.excludeBegin||(M=t)),h(n),n.returnBegin?0:t.length}(n) -;if("illegal"===n.type&&!r){ -const e=Error('Illegal lexeme "'+a+'" for mode "'+(R.className||"")+'"') -;throw e.mode=R,e}if("end"===n.type){const e=x(n);if(e!==G)return e} -if("illegal"===n.type&&""===a)return 1 -;if(B>1e5&&B>3*n.index)throw Error("potential infinite loop, way more iterations than matches") -;return M+=a,a.length}const w=_(e) -;if(!w)throw H(l.replace("{}",e)),Error('Unknown language: "'+e+'"') -;const N=T(w,{plugins:a});let y="",R=o||N;const k={},O=new g.__emitter(g);(()=>{ -const e=[];for(let t=R;t!==w;t=t.parent)t.className&&e.unshift(t.className) -;e.forEach((e=>O.openNode(e)))})();let M="",A=0,L=0,B=0,I=!1;try{ -for(R.matcher.considerAll();;){ -B++,I?I=!1:R.matcher.considerAll(),R.matcher.lastIndex=L -;const e=R.matcher.exec(c);if(!e)break;const t=v(c.substring(L,e.index),e) -;L=e.index+t}return v(c.substr(L)),O.closeAllNodes(),O.finalize(),y=O.toHTML(),{ -relevance:Math.floor(A),value:y,language:e,illegal:!1,emitter:O,top:R}}catch(t){ -if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{ -msg:t.message,context:c.slice(L-100,L+100),mode:t.mode},sofar:y,relevance:0, -value:z(c),emitter:O};if(i)return{illegal:!1,relevance:0,value:z(c),emitter:O, -language:e,top:R,errorRaised:t};throw t}}function p(e,t){ -t=t||g.languages||Object.keys(n);const s=(e=>{const t={relevance:0, -emitter:new g.__emitter(g),value:z(e),illegal:!1,top:u} -;return t.emitter.addText(e),t})(e),r=t.filter(_).filter(O).map((t=>f(t,e,!1))) -;r.unshift(s);const a=r.sort(((e,t)=>{ -if(e.relevance!==t.relevance)return t.relevance-e.relevance -;if(e.language&&t.language){if(_(e.language).supersetOf===t.language)return 1 -;if(_(t.language).supersetOf===e.language)return-1}return 0})),[i,o]=a,l=i -;return l.second_best=o,l}const m={"before:highlightBlock":({block:e})=>{ -g.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")) -},"after:highlightBlock":({result:e})=>{ -g.useBR&&(e.value=e.value.replace(/\n/g,"
"))}},b=/^(<[^>]+>|\t)+/gm,x={ -"after:highlightBlock":({result:e})=>{ -g.tabReplace&&(e.value=e.value.replace(b,(e=>e.replace(/\t/g,g.tabReplace))))}} -;function E(e){let t=null;const n=(e=>{let t=e.className+" " -;t+=e.parentNode?e.parentNode.className:"";const n=g.languageDetectRe.exec(t) -;if(n){const t=_(n[1]) -;return t||(U(l.replace("{}",n[1])),U("Falling back to no-highlight mode for this block.",e)), -t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>d(e)||_(e)))})(e) -;if(d(n))return;M("before:highlightBlock",{block:e,language:n}),t=e -;const s=t.textContent,a=n?h(n,s,!0):p(s);M("after:highlightBlock",{block:e, -result:a,text:s}),e.innerHTML=a.value,((e,t,n)=>{const s=t?r[t]:n -;e.classList.add("hljs"),s&&e.classList.add(s)})(e,n,a.language),e.result={ -language:a.language,re:a.relevance,relavance:a.relevance -},a.second_best&&(e.second_best={language:a.second_best.language, -re:a.second_best.relevance,relavance:a.second_best.relevance})}const v=()=>{ -v.called||(v.called=!0, -$("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."), -document.querySelectorAll("pre code").forEach(E))};let w=!1,N=!1;function y(){ -N?document.querySelectorAll("pre code").forEach(E):w=!0}function _(e){ -return e=(e||"").toLowerCase(),n[e]||n[r[e]]}function k(e,{languageName:t}){ -"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e]=t}))}function O(e){const t=_(e) -;return t&&!t.disableAutodetect}function M(e,t){const n=e;a.forEach((e=>{ -e[n]&&e[n](t)}))} -"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ -N=!0,w&&y()}),!1),Object.assign(e,{highlight:h,highlightAuto:p,highlightAll:y, -fixMarkup:e=>{ -return $("10.2.0","fixMarkup will be removed entirely in v11.0"),$("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"), -t=e, -g.tabReplace||g.useBR?t.replace(o,(e=>"\n"===e?g.useBR?"
":e:g.tabReplace?e.replace(/\t/g,g.tabReplace):e)):t -;var t},highlightBlock:E,configure:e=>{ -e.useBR&&($("10.3.0","'useBR' will be removed entirely in v11.0"), -$("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")), -g=K(g,e)},initHighlighting:v,initHighlightingOnLoad:()=>{ -$("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."), -w=!0},registerLanguage:(t,s)=>{let r=null;try{r=s(e)}catch(e){ -if(H("Language definition for '{}' could not be registered.".replace("{}",t)), -!i)throw e;H(e),r=u} -r.name||(r.name=t),n[t]=r,r.rawDefinition=s.bind(null,e),r.aliases&&k(r.aliases,{ -languageName:t})},listLanguages:()=>Object.keys(n),getLanguage:_, -registerAliases:k,requireLanguage:e=>{ -$("10.4.0","requireLanguage will be removed entirely in v11."), -$("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844") -;const t=_(e);if(t)return t -;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))}, -autoDetection:O,inherit:K,addPlugin:e=>{a.push(e)},vuePlugin:S(e).VuePlugin -}),e.debugMode=()=>{i=!1},e.safeMode=()=>{i=!0},e.versionString="10.6.0" -;for(const e in R)"object"==typeof R[e]&&t(R[e]) -;return Object.assign(e,R),e.addPlugin(m),e.addPlugin(P),e.addPlugin(x),e})({}) -}();"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); -hljs.registerLanguage("apache",(()=>{"use strict";return e=>{const n={ -className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/} -;return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0, -contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/, -contains:[n,{className:"number",begin:/:\d{1,5}/ -},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute", -begin:/\w+/,relevance:0,keywords:{ -nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername" -},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"}, -contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable", -begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}] -},n,{className:"number",begin:/\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}} +var hljs = function() { + "use strict"; + + function e(t) { + return t instanceof Map ? t.clear = t.delete = t.set = () => { + throw Error("map is read-only") + } : t instanceof Set && (t.add = t.clear = t.delete = () => { + throw Error("set is read-only") + }), Object.freeze(t), Object.getOwnPropertyNames(t).forEach((n => { + var i = t[n]; + "object" != typeof i || Object.isFrozen(i) || e(i) + })), t + } + var t = e, + n = e; + t.default = n; + class i { + constructor(e) { + void 0 === e.data && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1 + } + ignoreMatch() { + this.isMatchIgnored = !0 + } + } + + function s(e) { + return e.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'") + } + + function a(e, ...t) { + const n = Object.create(null); + for (const t in e) n[t] = e[t]; + return t.forEach((e => { + for (const t in e) n[t] = e[t] + })), n + } + const r = e => !!e.kind; + class l { + constructor(e, t) { + this.buffer = "", this.classPrefix = t.classPrefix, e.walk(this) + } + addText(e) { + this.buffer += s(e) + } + openNode(e) { + if (!r(e)) return; + let t = e.kind; + e.sublanguage || (t = `${this.classPrefix}${t}`), this.span(t) + } + closeNode(e) { + r(e) && (this.buffer += "
") + } + value() { + return this.buffer + } + span(e) { + this.buffer += `` + } + } + class o { + constructor() { + this.rootNode = { + children: [] + }, this.stack = [this.rootNode] + } + get top() { + return this.stack[this.stack.length - 1] + } + get root() { + return this.rootNode + } + add(e) { + this.top.children.push(e) + } + openNode(e) { + const t = { + kind: e, + children: [] + }; + this.add(t), this.stack.push(t) + } + closeNode() { + if (this.stack.length > 1) return this.stack.pop() + } + closeAllNodes() { + for (; this.closeNode();); + } + toJSON() { + return JSON.stringify(this.rootNode, null, 4) + } + walk(e) { + return this.constructor._walk(e, this.rootNode) + } + static _walk(e, t) { + return "string" == typeof t ? e.addText(t) : t.children && (e.openNode(t), t.children.forEach((t => this._walk(e, t))), e.closeNode(t)), e + } + static _collapse(e) { + "string" != typeof e && e.children && (e.children.every((e => "string" == typeof e)) ? e.children = [e.children.join("")] : e.children.forEach((e => { + o._collapse(e) + }))) + } + } + class c extends o { + constructor(e) { + super(), this.options = e + } + addKeyword(e, t) { + "" !== e && (this.openNode(t), this.addText(e), this.closeNode()) + } + addText(e) { + "" !== e && this.add(e) + } + addSublanguage(e, t) { + const n = e.root; + n.kind = t, n.sublanguage = !0, this.add(n) + } + toHTML() { + return new l(this, this.options).value() + } + finalize() { + return !0 + } + } + + function g(e) { + return e ? "string" == typeof e ? e : e.source : null + } + const u = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./, + h = "[a-zA-Z]\\w*", + d = "[a-zA-Z_]\\w*", + f = "\\b\\d+(\\.\\d+)?", + p = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", + m = "\\b(0b[01]+)", + b = { + begin: "\\\\[\\s\\S]", + relevance: 0 + }, + E = { + className: "string", + begin: "'", + end: "'", + illegal: "\\n", + contains: [b] + }, + x = { + className: "string", + begin: '"', + end: '"', + illegal: "\\n", + contains: [b] + }, + v = { + begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ + }, + w = (e, t, n = {}) => { + const i = a({ + className: "comment", + begin: e, + end: t, + contains: [] + }, n); + return i.contains.push(v), i.contains.push({ + className: "doctag", + begin: "(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):", + relevance: 0 + }), i + }, + y = w("//", "$"), + N = w("/\\*", "\\*/"), + R = w("#", "$"); + var _ = Object.freeze({ + __proto__: null, + MATCH_NOTHING_RE: /\b\B/, + IDENT_RE: h, + UNDERSCORE_IDENT_RE: d, + NUMBER_RE: f, + C_NUMBER_RE: p, + BINARY_NUMBER_RE: m, + RE_STARTERS_RE: "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", + SHEBANG: (e = {}) => { + const t = /^#![ ]*\//; + return e.binary && (e.begin = ((...e) => e.map((e => g(e))).join(""))(t, /.*\b/, e.binary, /\b.*/)), + a({ + className: "meta", + begin: t, + end: /$/, + relevance: 0, + "on:begin": (e, t) => { + 0 !== e.index && t.ignoreMatch() + } + }, e) + }, + BACKSLASH_ESCAPE: b, + APOS_STRING_MODE: E, + QUOTE_STRING_MODE: x, + PHRASAL_WORDS_MODE: v, + COMMENT: w, + C_LINE_COMMENT_MODE: y, + C_BLOCK_COMMENT_MODE: N, + HASH_COMMENT_MODE: R, + NUMBER_MODE: { + className: "number", + begin: f, + relevance: 0 + }, + C_NUMBER_MODE: { + className: "number", + begin: p, + relevance: 0 + }, + BINARY_NUMBER_MODE: { + className: "number", + begin: m, + relevance: 0 + }, + CSS_NUMBER_MODE: { + className: "number", + begin: f + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", + relevance: 0 + }, + REGEXP_MODE: { + begin: /(?=\/[^/\n]*\/)/, + contains: [{ + className: "regexp", + begin: /\//, + end: /\/[gimuy]*/, + illegal: /\n/, + contains: [b, { + begin: /\[/, + end: /\]/, + relevance: 0, + contains: [b] + }] + }] + }, + TITLE_MODE: { + className: "title", + begin: h, + relevance: 0 + }, + UNDERSCORE_TITLE_MODE: { + className: "title", + begin: d, + relevance: 0 + }, + METHOD_GUARD: { + begin: "\\.\\s*[a-zA-Z_]\\w*", + relevance: 0 + }, + END_SAME_AS_BEGIN: e => Object.assign(e, { + "on:begin": (e, t) => { + t.data._beginMatch = e[1] + }, + "on:end": (e, t) => { + t.data._beginMatch !== e[1] && t.ignoreMatch() + } + }) + }); + + function k(e, t) { + "." === e.input[e.index - 1] && t.ignoreMatch() + } + + function M(e, t) { + t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = k, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, void 0 === e.relevance && (e.relevance = 0)) + } + + function O(e, t) { + Array.isArray(e.illegal) && (e.illegal = ((...e) => "(" + e.map((e => g(e))).join("|") + ")")(...e.illegal)) + } + + function A(e, t) { + if (e.match) { + if (e.begin || e.end) throw Error("begin & end are not supported with match"); + e.begin = e.match, delete e.match + } + } + + function L(e, t) { + void 0 === e.relevance && (e.relevance = 1) + } + const I = ["of", "and", "for", "in", "not", "or", "if", "then", "parent", "list", "value"]; + + function j(e, t, n = "keyword") { + const i = {}; + return "string" == typeof e ? s(n, e.split(" ")) : Array.isArray(e) ? s(n, e) : Object.keys(e).forEach((n => { + Object.assign(i, j(e[n], t, n)) + })), i; + + function s(e, n) { + t && (n = n.map((e => e.toLowerCase()))), n.forEach((t => { + const n = t.split("|"); + i[n[0]] = [e, B(n[0], n[1])] + })) + } + } + + function B(e, t) { + return t ? Number(t) : (e => I.includes(e.toLowerCase()))(e) ? 0 : 1 + } + + function T(e, { + plugins: t + }) { + function n(t, n) { + return RegExp(g(t), "m" + (e.case_insensitive ? "i" : "") + (n ? "g" : "")) + } + class i { + constructor() { + this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0 + } + addRule(e, t) { + t.position = this.position++, this.matchIndexes[this.matchAt] = t, this.regexes.push([t, e]), + this.matchAt += (e => RegExp(e.toString() + "|").exec("").length - 1)(e) + 1 + } + compile() { + 0 === this.regexes.length && (this.exec = () => null); + const e = this.regexes.map((e => e[1])); + this.matcherRe = n(((e, t = "|") => { + let n = 0; + return e.map((e => { + n += 1; + const t = n; + let i = g(e), + s = ""; + for (; i.length > 0;) { + const e = u.exec(i); + if (!e) { + s += i; + break + } + s += i.substring(0, e.index), i = i.substring(e.index + e[0].length), "\\" === e[0][0] && e[1] ? s += "\\" + (Number(e[1]) + t) : (s += e[0], "(" === e[0] && n++) + } + return s + })).map((e => `(${e})`)).join(t) + })(e), !0), this.lastIndex = 0 + } + exec(e) { + this.matcherRe.lastIndex = this.lastIndex; + const t = this.matcherRe.exec(e); + if (!t) return null; + const n = t.findIndex(((e, t) => t > 0 && void 0 !== e)), + i = this.matchIndexes[n]; + return t.splice(0, n), Object.assign(t, i) + } + } + class s { + constructor() { + this.rules = [], this.multiRegexes = [], + this.count = 0, this.lastIndex = 0, this.regexIndex = 0 + } + getMatcher(e) { + if (this.multiRegexes[e]) return this.multiRegexes[e]; + const t = new i; + return this.rules.slice(e).forEach((([e, n]) => t.addRule(e, n))), + t.compile(), this.multiRegexes[e] = t, t + } + resumingScanAtSamePosition() { + return 0 !== this.regexIndex + } + considerAll() { + this.regexIndex = 0 + } + addRule(e, t) { + this.rules.push([e, t]), "begin" === t.type && this.count++ + } + exec(e) { + const t = this.getMatcher(this.regexIndex); + t.lastIndex = this.lastIndex; + let n = t.exec(e); + if (this.resumingScanAtSamePosition()) + if (n && n.index === this.lastIndex); + else { + const t = this.getMatcher(0); + t.lastIndex = this.lastIndex + 1, n = t.exec(e) + } + return n && (this.regexIndex += n.position + 1, this.regexIndex === this.count && this.considerAll()), n + } + } + if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation."); + return e.classNameAliases = a(e.classNameAliases || {}), + function t(i, r) { + const l = i; + if (i.isCompiled) return l; + [A].forEach((e => e(i, r))), e.compilerExtensions.forEach((e => e(i, r))), + i.__beforeBegin = null, [M, O, L].forEach((e => e(i, r))), i.isCompiled = !0; + let o = null; + if ("object" == typeof i.keywords && (o = i.keywords.$pattern, delete i.keywords.$pattern), i.keywords && (i.keywords = j(i.keywords, e.case_insensitive)), i.lexemes && o) throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) "); + return o = o || i.lexemes || /\w+/, + l.keywordPatternRe = n(o, !0), r && (i.begin || (i.begin = /\B|\b/), l.beginRe = n(i.begin), i.endSameAsBegin && (i.end = i.begin), i.end || i.endsWithParent || (i.end = /\B|\b/), i.end && (l.endRe = n(i.end)), l.terminatorEnd = g(i.end) || "", i.endsWithParent && r.terminatorEnd && (l.terminatorEnd += (i.end ? "|" : "") + r.terminatorEnd)), + i.illegal && (l.illegalRe = n(i.illegal)), + i.contains || (i.contains = []), i.contains = [].concat(...i.contains.map((e => (e => (e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map((t => a(e, { + variants: null + }, t)))), e.cachedVariants ? e.cachedVariants : S(e) ? a(e, { + starts: e.starts ? a(e.starts) : null + }) : Object.isFrozen(e) ? a(e) : e))("self" === e ? i : e)))), i.contains.forEach((e => { + t(e, l) + })), i.starts && t(i.starts, r), l.matcher = (e => { + const t = new s; + return e.contains.forEach((e => t.addRule(e.begin, { + rule: e, + type: "begin" + }))), e.terminatorEnd && t.addRule(e.terminatorEnd, { + type: "end" + }), e.illegal && t.addRule(e.illegal, { + type: "illegal" + }), t + })(l), l + }(e) + } + + function S(e) { + return !!e && (e.endsWithParent || S(e.starts)) + } + + function P(e) { + const t = { + props: ["language", "code", "autodetect"], + data: () => ({ + detectedLanguage: "", + unknownLanguage: !1 + }), + computed: { + className() { + return this.unknownLanguage ? "" : "hljs " + this.detectedLanguage + }, + highlighted() { + if (!this.autoDetect && !e.getLanguage(this.language)) return console.warn(`The language "${this.language}" you specified could not be found.`), + this.unknownLanguage = !0, s(this.code); + let t = {}; + return this.autoDetect ? (t = e.highlightAuto(this.code), this.detectedLanguage = t.language) : (t = e.highlight(this.language, this.code, this.ignoreIllegals), this.detectedLanguage = this.language), t.value + }, + autoDetect() { + return !(this.language && (e = this.autodetect, !e && "" !== e)); + var e + }, + ignoreIllegals: () => !0 + }, + render(e) { + return e("pre", {}, [e("code", { + class: this.className, + domProps: { + innerHTML: this.highlighted + } + })]) + } + }; + return { + Component: t, + VuePlugin: { + install(e) { + e.component("highlightjs", t) + } + } + } + } + const D = { + "after:highlightElement": ({ + el: e, + result: t, + text: n + }) => { + const i = H(e); + if (!i.length) return; + const a = document.createElement("div"); + a.innerHTML = t.value, t.value = ((e, t, n) => { + let i = 0, + a = ""; + const r = []; + + function l() { + return e.length && t.length ? e[0].offset !== t[0].offset ? e[0].offset < t[0].offset ? e : t : "start" === t[0].event ? e : t : e.length ? e : t + } + + function o(e) { + a += "<" + C(e) + [].map.call(e.attributes, (function(e) { + return " " + e.nodeName + '="' + s(e.value) + '"' + })).join("") + ">" + } + + function c(e) { + a += "" + } + + function g(e) { + ("start" === e.event ? o : c)(e.node) + } + for (; e.length || t.length;) { + let t = l(); + if (a += s(n.substring(i, t[0].offset)), i = t[0].offset, t === e) { + r.reverse().forEach(c); + do { + g(t.splice(0, 1)[0]), t = l() + } while (t === e && t.length && t[0].offset === i); + r.reverse().forEach(o) + } else "start" === t[0].event ? r.push(t[0].node) : r.pop(), g(t.splice(0, 1)[0]) + } + return a + s(n.substr(i)) + })(i, H(a), n) + } + }; + + function C(e) { + return e.nodeName.toLowerCase() + } + + function H(e) { + const t = []; + return function e(n, i) { + for (let s = n.firstChild; s; s = s.nextSibling) 3 === s.nodeType ? i += s.nodeValue.length : 1 === s.nodeType && (t.push({ + event: "start", + offset: i, + node: s + }), i = e(s, i), C(s).match(/br|hr|img|input/) || t.push({ + event: "stop", + offset: i, + node: s + })); + return i + }(e, 0), t + } + const $ = {}, + U = e => { + console.error(e) + }, + z = (e, ...t) => { + console.log("WARN: " + e, ...t) + }, + K = (e, t) => { + $[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), $[`${e}/${t}`] = !0) + }, + G = s, + V = a, + W = Symbol("nomatch"); + return (e => { + const n = Object.create(null), + s = Object.create(null), + a = []; + let r = !0; + const l = /(^(<[^>]+>|\t|)+|\n)/gm, + o = "Could not find the language '{}', did you forget to load/include a language module?", + g = { + disableAutodetect: !0, + name: "Plain text", + contains: [] + }; + let u = { + noHighlightRe: /^(no-?highlight)$/i, + languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i, + classPrefix: "hljs-", + tabReplace: null, + useBR: !1, + languages: null, + __emitter: c + }; + + function h(e) { + return u.noHighlightRe.test(e) + } + + function d(e, t, n, i) { + let s = "", + a = ""; + "object" == typeof t ? (s = e, n = t.ignoreIllegals, a = t.language, i = void 0) : (K("10.7.0", "highlight(lang, code, ...args) has been deprecated."), K("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), a = e, s = t); + const r = { + code: s, + language: a + }; + M("before:highlight", r); + const l = r.result ? r.result : f(r.language, r.code, n, i); + return l.code = r.code, M("after:highlight", l), l + } + + function f(e, t, s, l) { + function c(e, t) { + const n = v.case_insensitive ? t[0].toLowerCase() : t[0]; + return Object.prototype.hasOwnProperty.call(e.keywords, n) && e.keywords[n] + } + + function g() { + null != R.subLanguage ? (() => { + if ("" === M) return; + let e = null; + if ("string" == typeof R.subLanguage) { + if (!n[R.subLanguage]) return void k.addText(M); + e = f(R.subLanguage, M, !0, _[R.subLanguage]), _[R.subLanguage] = e.top + } else e = p(M, R.subLanguage.length ? R.subLanguage : null); + R.relevance > 0 && (O += e.relevance), k.addSublanguage(e.emitter, e.language) + })() : (() => { + if (!R.keywords) return void k.addText(M); + let e = 0; + R.keywordPatternRe.lastIndex = 0; + let t = R.keywordPatternRe.exec(M), + n = ""; + for (; t;) { + n += M.substring(e, t.index); + const i = c(R, t); + if (i) { + const [e, s] = i; + if (k.addText(n), n = "", O += s, e.startsWith("_")) n += t[0]; + else { + const n = v.classNameAliases[e] || e; + k.addKeyword(t[0], n) + } + } else n += t[0]; + e = R.keywordPatternRe.lastIndex, t = R.keywordPatternRe.exec(M) + } + n += M.substr(e), k.addText(n) + })(), M = "" + } + + function h(e) { + return e.className && k.openNode(v.classNameAliases[e.className] || e.className), + R = Object.create(e, { + parent: { + value: R + } + }), R + } + + function d(e, t, n) { + let s = ((e, t) => { + const n = e && e.exec(t); + return n && 0 === n.index + })(e.endRe, n); + if (s) { + if (e["on:end"]) { + const n = new i(e); + e["on:end"](t, n), n.isMatchIgnored && (s = !1) + } + if (s) { + for (; e.endsParent && e.parent;) e = e.parent; + return e + } + } + if (e.endsWithParent) return d(e.parent, t, n) + } + + function m(e) { + return 0 === R.matcher.regexIndex ? (M += e[0], 1) : (I = !0, 0) + } + + function b(e) { + const n = e[0], + i = t.substr(e.index), + s = d(R, e, i); + if (!s) return W; + const a = R; + a.skip ? M += n : (a.returnEnd || a.excludeEnd || (M += n), g(), a.excludeEnd && (M = n)); + do { + R.className && k.closeNode(), R.skip || R.subLanguage || (O += R.relevance), R = R.parent + } while (R !== s.parent); + return s.starts && (s.endSameAsBegin && (s.starts.endRe = s.endRe), h(s.starts)), a.returnEnd ? 0 : n.length + } + let E = {}; + + function x(n, a) { + const l = a && a[0]; + if (M += n, null == l) return g(), 0; + if ("begin" === E.type && "end" === a.type && E.index === a.index && "" === l) { + if (M += t.slice(a.index, a.index + 1), !r) { + const t = Error("0 width match regex"); + throw t.languageName = e, t.badRule = E.rule, t + } + return 1 + } + if (E = a, "begin" === a.type) return function(e) { + const t = e[0], + n = e.rule, + s = new i(n), + a = [n.__beforeBegin, n["on:begin"]]; + for (const n of a) + if (n && (n(e, s), s.isMatchIgnored)) return m(t); + return n && n.endSameAsBegin && (n.endRe = RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "m")), + n.skip ? M += t : (n.excludeBegin && (M += t), g(), n.returnBegin || n.excludeBegin || (M = t)), h(n), n.returnBegin ? 0 : t.length + }(a); + if ("illegal" === a.type && !s) { + const e = Error('Illegal lexeme "' + l + '" for mode "' + (R.className || "") + '"'); + throw e.mode = R, e + } + if ("end" === a.type) { + const e = b(a); + if (e !== W) return e + } + if ("illegal" === a.type && "" === l) return 1; + if (L > 1e5 && L > 3 * a.index) throw Error("potential infinite loop, way more iterations than matches"); + return M += l, l.length + } + const v = N(e); + if (!v) throw U(o.replace("{}", e)), Error('Unknown language: "' + e + '"'); + const w = T(v, { + plugins: a + }); + let y = "", + R = l || w; + const _ = {}, + k = new u.__emitter(u); + (() => { + const e = []; + for (let t = R; t !== v; t = t.parent) t.className && e.unshift(t.className); + e.forEach((e => k.openNode(e))) + })(); + let M = "", + O = 0, + A = 0, + L = 0, + I = !1; + try { + for (R.matcher.considerAll();;) { + L++, I ? I = !1 : R.matcher.considerAll(), R.matcher.lastIndex = A; + const e = R.matcher.exec(t); + if (!e) break; + const n = x(t.substring(A, e.index), e); + A = e.index + n + } + return x(t.substr(A)), k.closeAllNodes(), k.finalize(), y = k.toHTML(), { + relevance: Math.floor(O), + value: y, + language: e, + illegal: !1, + emitter: k, + top: R + } + } catch (n) { + if (n.message && n.message.includes("Illegal")) return { + illegal: !0, + illegalBy: { + msg: n.message, + context: t.slice(A - 100, A + 100), + mode: n.mode + }, + sofar: y, + relevance: 0, + value: G(t), + emitter: k + }; + if (r) return { + illegal: !1, + relevance: 0, + value: G(t), + emitter: k, + language: e, + top: R, + errorRaised: n + }; + throw n + } + } + + function p(e, t) { + t = t || u.languages || Object.keys(n); + const i = (e => { + const t = { + relevance: 0, + emitter: new u.__emitter(u), + value: G(e), + illegal: !1, + top: g + }; + return t.emitter.addText(e), t + })(e), + s = t.filter(N).filter(k).map((t => f(t, e, !1))); + s.unshift(i); + const a = s.sort(((e, t) => { + if (e.relevance !== t.relevance) return t.relevance - e.relevance; + if (e.language && t.language) { + if (N(e.language).supersetOf === t.language) return 1; + if (N(t.language).supersetOf === e.language) return -1 + } + return 0 + })), + [r, l] = a, + o = r; + return o.second_best = l, o + } + const m = { + "before:highlightElement": ({ + el: e + }) => { + u.useBR && (e.innerHTML = e.innerHTML.replace(/\n/g, "").replace(//g, "\n")) + }, + "after:highlightElement": ({ + result: e + }) => { + u.useBR && (e.value = e.value.replace(/\n/g, "
")) + } + }, + b = /^(<[^>]+>|\t)+/gm, + E = { + "after:highlightElement": ({ + result: e + }) => { + u.tabReplace && (e.value = e.value.replace(b, (e => e.replace(/\t/g, u.tabReplace)))) + } + }; + + function x(e) { + let t = null; + const n = (e => { + let t = e.className + " "; + t += e.parentNode ? e.parentNode.className : ""; + const n = u.languageDetectRe.exec(t); + if (n) { + const t = N(n[1]); + return t || (z(o.replace("{}", n[1])), z("Falling back to no-highlight mode for this block.", e)), + t ? n[1] : "no-highlight" + } + return t.split(/\s+/).find((e => h(e) || N(e))) + })(e); + if (h(n)) return; + M("before:highlightElement", { + el: e, + language: n + }), t = e; + const i = t.textContent, + a = n ? d(i, { + language: n, + ignoreIllegals: !0 + }) : p(i); + M("after:highlightElement", { + el: e, + result: a, + text: i + }), e.innerHTML = a.value, ((e, t, n) => { + const i = t ? s[t] : n; + e.classList.add("hljs"), i && e.classList.add(i) + })(e, n, a.language), e.result = { + language: a.language, + re: a.relevance, + relavance: a.relevance + }, a.second_best && (e.second_best = { + language: a.second_best.language, + re: a.second_best.relevance, + relavance: a.second_best.relevance + }) + } + const v = () => { + v.called || (v.called = !0, K("10.6.0", "initHighlighting() is deprecated. Use highlightAll() instead."), document.querySelectorAll("pre code").forEach(x)) + }; + let w = !1; + + function y() { + "loading" !== document.readyState ? document.querySelectorAll("pre code").forEach(x) : w = !0 + } + + function N(e) { + return e = (e || "").toLowerCase(), n[e] || n[s[e]] + } + + function R(e, { + languageName: t + }) { + "string" == typeof e && (e = [e]), e.forEach((e => { + s[e.toLowerCase()] = t + })) + } + + function k(e) { + const t = N(e); + return t && !t.disableAutodetect + } + + function M(e, t) { + const n = e; + a.forEach((e => { + e[n] && e[n](t) + })) + } + "undefined" != typeof window && window.addEventListener && window.addEventListener("DOMContentLoaded", (() => { + w && y() + }), !1), Object.assign(e, { + highlight: d, + highlightAuto: p, + highlightAll: y, + fixMarkup: e => { + return K("10.2.0", "fixMarkup will be removed entirely in v11.0"), K("10.2.0", "Please see https://github.com/highlightjs/highlight.js/issues/2534"), + t = e, + u.tabReplace || u.useBR ? t.replace(l, (e => "\n" === e ? u.useBR ? "
" : e : u.tabReplace ? e.replace(/\t/g, u.tabReplace) : e)) : t; + var t + }, + highlightElement: x, + highlightBlock: e => (K("10.7.0", "highlightBlock will be removed entirely in v12.0"), K("10.7.0", "Please use highlightElement now."), x(e)), + configure: e => { + e.useBR && (K("10.3.0", "'useBR' will be removed entirely in v11.0"), K("10.3.0", "Please see https://github.com/highlightjs/highlight.js/issues/2559")), + u = V(u, e) + }, + initHighlighting: v, + initHighlightingOnLoad: () => { + K("10.6.0", "initHighlightingOnLoad() is deprecated. Use highlightAll() instead."), + w = !0 + }, + registerLanguage: (t, i) => { + let s = null; + try { + s = i(e) + } catch (e) { + if (U("Language definition for '{}' could not be registered.".replace("{}", t)), !r) throw e; + U(e), s = g + } + s.name || (s.name = t), n[t] = s, s.rawDefinition = i.bind(null, e), s.aliases && R(s.aliases, { + languageName: t + }) + }, + unregisterLanguage: e => { + delete n[e]; + for (const t of Object.keys(s)) s[t] === e && delete s[t] + }, + listLanguages: () => Object.keys(n), + getLanguage: N, + registerAliases: R, + requireLanguage: e => { + K("10.4.0", "requireLanguage will be removed entirely in v11."), + K("10.4.0", "Please see https://github.com/highlightjs/highlight.js/pull/2844"); + const t = N(e); + if (t) return t; + throw Error("The '{}' language is required, but not loaded.".replace("{}", e)) + }, + autoDetection: k, + inherit: V, + addPlugin: e => { + (e => { + e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = t => { + e["before:highlightBlock"](Object.assign({ + block: t.el + }, t)) + }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = t => { + e["after:highlightBlock"](Object.assign({ + block: t.el + }, t)) + }) + })(e), a.push(e) + }, + vuePlugin: P(e).VuePlugin + }), e.debugMode = () => { + r = !1 + }, e.safeMode = () => { + r = !0 + }, e.versionString = "10.7.2"; + for (const e in _) "object" == typeof _[e] && t(_[e]); + return Object.assign(e, _), e.addPlugin(m), e.addPlugin(D), e.addPlugin(E), e + })({}) +}(); +"object" == typeof exports && "undefined" != typeof module && (module.exports = hljs); +hljs.registerLanguage("apache", (() => { + "use strict"; + return e => { + const n = { + className: "number", + begin: /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/ + }; + return { + name: "Apache config", + aliases: ["apacheconf"], + case_insensitive: !0, + contains: [e.HASH_COMMENT_MODE, { + className: "section", + begin: /<\/?/, + end: />/, + contains: [n, { + className: "number", + begin: /:\d{1,5}/ + }, e.inherit(e.QUOTE_STRING_MODE, { + relevance: 0 + })] + }, { + className: "attribute", + begin: /\w+/, + relevance: 0, + keywords: { + nomarkup: "order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername" + }, + starts: { + end: /$/, + relevance: 0, + keywords: { + literal: "on off all deny allow" + }, + contains: [{ + className: "meta", + begin: /\s\[/, + end: /\]$/ + }, { + className: "variable", + begin: /[\$%]\{/, + end: /\}/, + contains: ["self", { + className: "number", + begin: /[$%]\d+/ + }] + }, n, { + className: "number", + begin: /\d+/ + }, e.QUOTE_STRING_MODE] + } + }], + illegal: /\S/ + } + } })()); -hljs.registerLanguage("bash",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(s=e)?"string"==typeof s?s:s.source:null;var s -})).join("")}return s=>{const n={},t={begin:/\$\{/,end:/\}/,contains:["self",{ -begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{ -begin:e(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},t]});const a={ -className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},i={ -begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/, -end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, -contains:[s.BACKSLASH_ESCAPE,n,a]};a.contains.push(c);const o={begin:/\$\(\(/, -end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,n] -},r=s.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 -}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, -contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ -name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/, -keyword:"if then else elif fi for while in do done case esac function", -literal:"true false", -built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp" -},contains:[r,s.SHEBANG(),l,o,s.HASH_COMMENT_MODE,i,c,{className:"",begin:/\\"/ -},{className:"string",begin:/'/,end:/'/},n]}}})()); -hljs.registerLanguage("c",(()=>{"use strict";function e(e){ -return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") -}return t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] -}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",i={ -className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string", -variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", -contains:[t.BACKSLASH_ESCAPE]},{ -begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", -end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ -begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ -className:"number",variants:[{begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" -},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ -"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" -},contains:[{begin:/\\\n/,relevance:0},t.inherit(s,{className:"meta-string"}),{ -className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" -},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, -relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ -keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", -built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", -literal:"true false nullptr NULL"},m=[c,i,n,t.C_BLOCK_COMMENT_MODE,o,s],p={ -variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ -beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ -begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), -relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, -contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, -returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, -end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,s,o,i,{ -begin:/\(/,end:/\)/,keywords:u,relevance:0, -contains:["self",n,t.C_BLOCK_COMMENT_MODE,s,o,i]}] -},i,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["c","h"],keywords:u, -disableAutodetect:!0,illegal:"",keywords:u,contains:["self",i]},{begin:t.IDENT_RE+"::",keywords:u},{ -className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, -contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ -preprocessor:c,strings:s,keywords:u}}}})()); -hljs.registerLanguage("coffeescript",(()=>{"use strict" -;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;return r=>{const t={ -keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"], -e=>!i.includes(e))),literal:n.concat(["yes","no","on","off"]), -built_in:a.concat(["npm","print"])};var i;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={ -className:"subst",begin:/#\{/,end:/\}/,keywords:t -},c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?", -relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/, -contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE] -},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/, -contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///", -end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", -relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s -},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{ -begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c -;const l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={ -className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/, -end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript", -aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/, -contains:c.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{ -className:"function",begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0, -contains:[l,g]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function", -begin:d,end:"[-=]>",returnBegin:!0,contains:[g]}]},{className:"class", -beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{ -beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l] -},{begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}})()); -hljs.registerLanguage("cpp",(()=>{"use strict";function e(e){ -return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") -}return t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] -}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",i={ -className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},s={className:"string", -variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", -contains:[t.BACKSLASH_ESCAPE]},{ -begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", -end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ -begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ -className:"number",variants:[{begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" -},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ -"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" -},contains:[{begin:/\\\n/,relevance:0},t.inherit(s,{className:"meta-string"}),{ -className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" -},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, -relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ -keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", -built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", -literal:"true false nullptr NULL"},m=[c,i,n,t.C_BLOCK_COMMENT_MODE,o,s],p={ -variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ -beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ -begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), -relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>.]/, -contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, -returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, -end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,s,o,i,{ -begin:/\(/,end:/\)/,keywords:u,relevance:0, -contains:["self",n,t.C_BLOCK_COMMENT_MODE,s,o,i]}] -},i,n,t.C_BLOCK_COMMENT_MODE,c]};return{name:"C++", -aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:u,illegal:"",keywords:u,contains:["self",i]},{begin:t.IDENT_RE+"::",keywords:u},{ -className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, -contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ -preprocessor:c,strings:s,keywords:u}}}})()); -hljs.registerLanguage("csharp",(()=>{"use strict";return e=>{var n={ -keyword:["abstract","as","base","break","case","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]), -built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","unit","ushort"], -literal:["default","false","null","true"]},a=e.inherit(e.TITLE_MODE,{ -begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{ -begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}] -},t=e.inherit(s,{illegal:/\n/}),r={className:"subst",begin:/\{/,end:/\}/, -keywords:n},l=e.inherit(r,{illegal:/\n/}),c={className:"string",begin:/\$"/, -end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/ -},e.BACKSLASH_ESCAPE,l]},o={className:"string",begin:/\$@"/,end:'"',contains:[{ -begin:/\{\{/},{begin:/\}\}/},{begin:'""'},r]},d=e.inherit(o,{illegal:/\n/, -contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},l]}) -;r.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE], -l.contains=[d,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{ -illegal:/\n/})];var g={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},a] -},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={ -begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"], -keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0, -contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{ -begin:"\x3c!--|--\x3e"},{begin:""}]}] -}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#", -end:"$",keywords:{ -"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum" -}},g,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/, -illegal:/[^\s:,]/,contains:[{beginKeywords:"where class" -},a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace", -relevance:0,end:/[{;=]/,illegal:/[^\s:]/, -contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ -beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, -contains:[a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta", -begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{ -className:"meta-string",begin:/"/,end:/"/}]},{ -beginKeywords:"new return throw await else",relevance:0},{className:"function", -begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0, -end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{ -beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", -relevance:0},{begin:e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0, -contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/, -excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0, -contains:[g,i,e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}})()); -hljs.registerLanguage("css",(()=>{"use strict" -;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],r=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse() -;return n=>{const a=(e=>({IMPORTANT:{className:"meta",begin:"!important"}, -HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, -ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/, -illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]} -}))(n),l=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS", -case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"}, -classNameAliases:{keyframePosition:"selector-tag"}, -contains:[n.C_BLOCK_COMMENT_MODE,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/ -},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0 -},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0 -},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{ -begin:":("+i.join("|")+")"},{begin:"::("+o.join("|")+")"}]},{ -className:"attribute",begin:"\\b("+r.join("|")+")\\b"},{begin:":",end:"[;}]", -contains:[a.HEXCOLOR,a.IMPORTANT,n.CSS_NUMBER_MODE,...l,{ -begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri" -},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}] -},{className:"built_in",begin:/[\w-]+(?=\()/}]},{ -begin:(s=/@/,((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(?=",s,")")), -end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword", -begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0, -relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only", -attribute:t.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute" -},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag", -begin:"\\b("+e.join("|")+")\\b"}]};var s}})()); -hljs.registerLanguage("diff",(()=>{"use strict";return e=>({name:"Diff", -aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{ -begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{ -begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /, -end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/ -},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{ -begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{ -className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, -end:/$/}]})})()); -hljs.registerLanguage("go",(()=>{"use strict";return e=>{const n={ -keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune", -literal:"true false iota nil", -built_in:"append cap close complex copy imag len make new panic print println real recover delete" -};return{name:"Go",aliases:["golang"],keywords:n,illegal:"{"use strict";function e(...e){ -return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("")}return n=>{const a="HTTP/(2|1\\.[01])",s=[{className:"attribute", -begin:e("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{ -className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]} -},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{ -name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+a+" \\d{3})", -end:/$/,contains:[{className:"meta",begin:a},{className:"number", -begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:s}},{ -begin:"(?=^[A-Z]+ (.*?) "+a+"$)",end:/$/,contains:[{className:"string", -begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:a},{ -className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:s} -}]}}})()); -hljs.registerLanguage("ini",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(...n){ -return n.map((n=>e(n))).join("")}return s=>{const a={className:"number", -relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:s.NUMBER_RE}] -},i=s.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const t={ -className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/ -}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={ -className:"string",contains:[s.BACKSLASH_ESCAPE],variants:[{begin:"'''", -end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"' -},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,a,"self"], -relevance:0 -},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")" -;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, -contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{ -begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr", -starts:{end:/$/,contains:[i,c,r,t,l,a]}}]}}})()); -hljs.registerLanguage("java",(()=>{"use strict" -;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ -className:"number",variants:[{ -begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ -begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ -begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ -begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], -relevance:0};return e=>{ -var n="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s={ -className:"meta",begin:"@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*", -contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};const r=a;return{ -name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/, -contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/, -relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{ -begin:/import java\.[a-z]+\./,keywords:"import",relevance:2 -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{ -className:"class",beginKeywords:"class interface enum",end:/[{;=]/, -excludeEnd:!0,relevance:1,keywords:"class interface enum",illegal:/[:"\[\]]/, -contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ -beginKeywords:"new throw return else",relevance:0},{className:"class", -begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0, -end:/[{;=]/,keywords:n,contains:[{beginKeywords:"record"},{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, -keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function", -begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(", -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, -keywords:n,relevance:0, -contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,s]}}})()); -hljs.registerLanguage("javascript",(()=>{"use strict" -;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;function r(e){return t("(?=",e,")")}function t(...e){return e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return i=>{ -const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, -isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,s=e.input[a] -;"<"!==s?">"===s&&(((e,{after:n})=>{const a="", -returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ -begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 -},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:A}]}] -},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ -variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, -end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, -contains:["self"]}]}],relevance:0},{className:"function", -beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, -contains:["self",i.inherit(i.TITLE_MODE,{begin:c}),p],illegal:/%/},{ -beginKeywords:"while if switch catch for"},{className:"function", -begin:i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", -returnBegin:!0,contains:[p,i.inherit(i.TITLE_MODE,{begin:c})]},{variants:[{ -begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", -beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ -beginKeywords:"extends"},i.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, -end:/[{;]/,excludeEnd:!0,contains:[i.inherit(i.TITLE_MODE,{begin:c}),"self",p] -},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", -contains:[i.inherit(i.TITLE_MODE,{begin:c}),{begin:/\(\)/},p]},{begin:/\$[(.]/}] -}}})()); -hljs.registerLanguage("json",(()=>{"use strict";return n=>{const e={ -literal:"true false null" -},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],a=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],l={ -end:",",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:e},t={begin:/\{/, -end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/, -contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(l,{begin:/:/ -})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(l)], -illegal:"\\S"};return a.push(t,s),i.forEach((n=>{a.push(n)})),{name:"JSON", -contains:a,keywords:e,illegal:"\\S"}}})()); -hljs.registerLanguage("kotlin",(()=>{"use strict" -;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ -className:"number",variants:[{ -begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ -begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ -begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ -begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], -relevance:0};return e=>{const n={ -keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", -built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing", -literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@" -},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},t={ -className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string", -variants:[{begin:'"""',end:'"""(?=[^"])',contains:[t,s]},{begin:"'",end:"'", -illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/, -contains:[e.BACKSLASH_ESCAPE,t,s]}]};s.contains.push(r);const l={ -className:"meta", -begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?" -},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/, -end:/\)/,contains:[e.inherit(r,{className:"meta-string"})]}] -},o=a,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),E={ -variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/, -contains:[]}]},d=E;return d.variants[1].contains=[E],E.variants[1].contains=[d], -{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{ -relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}] -}),e.C_LINE_COMMENT_MODE,b,{className:"keyword", -begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol", -begin:/@\w+/}]}},i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$", -returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://, -keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/, -endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/, -endsWithParent:!0,contains:[E,e.C_LINE_COMMENT_MODE,b],relevance:0 -},e.C_LINE_COMMENT_MODE,b,l,c,r,e.C_NUMBER_MODE]},b]},{className:"class", -beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0, -illegal:"extends implements",contains:[{ -beginKeywords:"public protected internal private constructor" -},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0, -excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/, -excludeBegin:!0,returnEnd:!0},l,c]},r,{className:"meta",begin:"^#!/usr/bin/env", -end:"$",illegal:"\n"},o]}}})()); -hljs.registerLanguage("less",(()=>{"use strict" -;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],n=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse(),r=i.concat(o) -;return a=>{const s=(e=>({IMPORTANT:{className:"meta",begin:"!important"}, -HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, -ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/, -illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]} -}))(a),l=r,d="([\\w-]+|@\\{[\\w-]+\\})",c=[],g=[],b=e=>({className:"string", -begin:"~?"+e+".*?"+e}),m=(e,t,i)=>({className:e,begin:t,relevance:i}),u={ -$pattern:/[a-z-]+/,keyword:"and or not only",attribute:t.join(" ")},p={ -begin:"\\(",end:"\\)",contains:g,keywords:u,relevance:0} -;g.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,b("'"),b('"'),a.CSS_NUMBER_MODE,{ -begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]", -excludeEnd:!0} -},s.HEXCOLOR,p,m("variable","@@?[\\w-]+",10),m("variable","@\\{[\\w-]+\\}"),m("built_in","~?`[^`]*?`"),{ -className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0 -},s.IMPORTANT);const f=g.concat({begin:/\{/,end:/\}/,contains:c}),h={ -beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not" -}].concat(g)},w={begin:d+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0, -contains:[{begin:/-(webkit|moz|ms|o)-/},{className:"attribute", -begin:"\\b("+n.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0, -illegal:"[<=$]",relevance:0,contains:g}}]},v={className:"keyword", -begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", -starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:g,relevance:0}},y={ -className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{ -begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:f}},k={variants:[{ -begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:d,end:/\{/}],returnBegin:!0, -returnEnd:!0,illegal:"[<='$\"]",relevance:0, -contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,h,m("keyword","all\\b"),m("variable","@\\{[\\w-]+\\}"),{ -begin:"\\b("+e.join("|")+")\\b",className:"selector-tag" -},m("selector-tag",d+"%?",0),m("selector-id","#"+d),m("selector-class","\\."+d,0),m("selector-tag","&",0),s.ATTRIBUTE_SELECTOR_MODE,{ -className:"selector-pseudo",begin:":("+i.join("|")+")"},{ -className:"selector-pseudo",begin:"::("+o.join("|")+")"},{begin:"\\(",end:"\\)", -contains:f},{begin:"!important"}]},E={begin:`[\\w-]+:(:)?(${l.join("|")})`, -returnBegin:!0,contains:[k]} -;return c.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,v,y,E,w,k),{ -name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:c}}})()); -hljs.registerLanguage("lua",(()=>{"use strict";return e=>{ -const t="\\[=*\\[",a="\\]=*\\]",n={begin:t,end:a,contains:["self"] -},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n], -relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE, -literal:"true false nil", -keyword:"and break do else elseif end for goto if in local not or repeat return then until while", -built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" -},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)", -contains:[e.inherit(e.TITLE_MODE,{ -begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params", -begin:"\\(",endsWithParent:!0,contains:o}].concat(o) -},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string", -begin:t,end:a,contains:[n],relevance:5}])}}})()); -hljs.registerLanguage("makefile",(()=>{"use strict";return e=>{const i={ -className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)", -contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} -function a(...n){return n.map((n=>e(n))).join("")}function s(...n){ -return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ -const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),i={ -className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/, -contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] -},c=e.inherit(r,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{ -className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{ -className:"meta-string"}),m={endsWithParent:!0,illegal:/`]+/}]}] -}]};return{name:"HTML, XML", -aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], -case_insensitive:!0,contains:[{className:"meta",begin://, -relevance:10,contains:[r,g,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta", -begin://,contains:[r,c,g,l]}]}]},e.COMMENT(//,{ -relevance:10}),{begin://,relevance:10},i,{ -className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag", -begin:/)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{ -end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", -begin:/)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{ -end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ -className:"tag",begin:/<>|<\/>/},{className:"tag", -begin:a(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name", -begin:t,relevance:0,starts:m}]},{className:"tag",begin:a(/<\//,n(a(t,/>/))), -contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0}]}]}} +hljs.registerLanguage("bash", (() => { + "use strict"; + + function e(...e) { + return e.map((e => { + return (s = e) ? "string" == typeof s ? s : s.source : null; + var s + })).join("") + } + return s => { + const n = {}, + t = { + begin: /\$\{/, + end: /\}/, + contains: ["self", { + begin: /:-/, + contains: [n] + }] + }; + Object.assign(n, { + className: "variable", + variants: [{ + begin: e(/\$[\w\d#@][\w\d_]*/, "(?![\\w\\d])(?![$])") + }, t] + }); + const a = { + className: "subst", + begin: /\$\(/, + end: /\)/, + contains: [s.BACKSLASH_ESCAPE] + }, + i = { + begin: /<<-?\s*(?=\w+)/, + starts: { + contains: [s.END_SAME_AS_BEGIN({ + begin: /(\w+)/, + end: /(\w+)/, + className: "string" + })] + } + }, + c = { + className: "string", + begin: /"/, + end: /"/, + contains: [s.BACKSLASH_ESCAPE, n, a] + }; + a.contains.push(c); + const o = { + begin: /\$\(\(/, + end: /\)\)/, + contains: [{ + begin: /\d+#[0-9a-f]+/, + className: "number" + }, s.NUMBER_MODE, n] + }, + r = s.SHEBANG({ + binary: "(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)", + relevance: 10 + }), + l = { + className: "function", + begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/, + returnBegin: !0, + contains: [s.inherit(s.TITLE_MODE, { + begin: /\w[\w\d_]*/ + })], + relevance: 0 + }; + return { + name: "Bash", + aliases: ["sh", "zsh"], + keywords: { + $pattern: /\b[a-z._-]+\b/, + keyword: "if then else elif fi for while in do done case esac function", + literal: "true false", + built_in: "break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp" + }, + contains: [r, s.SHEBANG(), l, o, s.HASH_COMMENT_MODE, i, c, { + className: "", + begin: /\\"/ + }, { + className: "string", + begin: /'/, + end: /'/ + }, n] + } + } })()); -hljs.registerLanguage("markdown",(()=>{"use strict";function n(...n){ -return n.map((n=>{return(e=n)?"string"==typeof e?e:e.source:null;var e -})).join("")}return e=>{const a={begin:/<\/?[A-Za-z_]/,end:">", -subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0 -},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, -relevance:2},{begin:n(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), -relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ -begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{ -className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, -returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", -excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", -end:"\\]",excludeBegin:!0,excludeEnd:!0}]},s={className:"strong",contains:[], -variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},c={ -className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{ -begin:/_(?!_)/,end:/_/,relevance:0}]};s.contains.push(c),c.contains.push(s) -;let t=[a,i] -;return s.contains=s.contains.concat(t),c.contains=c.contains.concat(t), -t=t.concat(s,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ -className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:t},{ -begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", -contains:t}]}]},a,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", -end:"\\s+",excludeEnd:!0},s,c,{className:"quote",begin:"^>\\s+",contains:t, -end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ -begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ -begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", -contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ -begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ -className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ -className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})()); -hljs.registerLanguage("nginx",(()=>{"use strict";return e=>{const n={ -className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/\}/},{ -begin:/[$@]/+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{ -$pattern:"[a-z/_]+", -literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" -},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string", -contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/ -}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n] -},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^", -end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{ -begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number", -begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{ -className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{ -name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{ -begin:e.UNDERSCORE_IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\{/,contains:[{ -className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{ -begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|\\{",returnBegin:!0,contains:[{ -className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}], -illegal:"[^\\s\\}]"}}})()); -hljs.registerLanguage("objectivec",(()=>{"use strict";return e=>{ -const n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n, -keyword:"@interface @class @protocol @implementation"};return{ -name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"], -keywords:{$pattern:n, -keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN", -literal:"false true FALSE TRUE nil YES NO NULL", -built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once" -},illegal:"/,end:/$/, -illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ -className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:/(\{|$)/, -excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{ -begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}})()); -hljs.registerLanguage("perl",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(...n){ -return n.map((n=>e(n))).join("")}function t(...n){ -return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ -const r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/, -keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0" -},i={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},a={begin:/->\{/, -end:/\}/},o={variants:[{begin:/\$\d/},{ -begin:n(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])") -},{begin:/[$%@][^\s\w{]/,relevance:0}] -},c=[e.BACKSLASH_ESCAPE,i,o],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],l=(e,t,s="\\1")=>{ -const i="\\1"===s?s:n(s,t) -;return n(n("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,i,/(?:\\.|[^\\\/])*?/,s,r) -},d=(e,t,s)=>n(n("(?:",e,")"),t,/(?:\\.|[^\\\/])*?/,s,r),p=[o,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{ -endsWithParent:!0}),a,{className:"string",contains:c,variants:[{ -begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[", -end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{ -begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">", -relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'", -contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`", -contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{ -begin:"-?\\w+\\s*=>",relevance:0}]},{className:"number", -begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", -relevance:0},{ -begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*", -keywords:"split return print reverse grep",relevance:0, -contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{ -begin:l("s|tr|y",t(...g))},{begin:l("s|tr|y","\\(","\\)")},{ -begin:l("s|tr|y","\\[","\\]")},{begin:l("s|tr|y","\\{","\\}")}],relevance:2},{ -className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{ -begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",t(...g),/\1/)},{ -begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{ -begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub", -end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{ -begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$", -subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}] -}];return i.contains=p,a.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:s, -contains:p}}})()); -hljs.registerLanguage("php",(()=>{"use strict";return e=>{const r={ -className:"variable", -begin:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?![A-Za-z0-9])(?![$])"},t={ -className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{ -begin:/\?>/}]},a={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/, -end:/\}/}]},n=e.inherit(e.APOS_STRING_MODE,{illegal:null -}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null, -contains:e.QUOTE_STRING_MODE.contains.concat(a)}),o=e.END_SAME_AS_BEGIN({ -begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/, -contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l={className:"string", -contains:[e.BACKSLASH_ESCAPE,t],variants:[e.inherit(n,{begin:"b'",end:"'" -}),e.inherit(i,{begin:'b"',end:'"'}),i,n,o]},c={ -variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},s={ -keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 new object or private protected public real return string switch throw trait try unset use var void while xor yield", -literal:"false null true", -built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass" -};return{aliases:["php","php3","php4","php5","php6","php7","php8"], -case_insensitive:!0,keywords:s, -contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t] -}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}] -}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0, -keywords:"__halt_compiler"}),t,{className:"keyword",begin:/\$this\b/},r,{ -begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function", -relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0, -illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{begin:"=>"},{ -className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0, -keywords:s,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,c]}]},{className:"class", -beginKeywords:"class interface",relevance:0,end:/\{/,excludeEnd:!0, -illegal:/[:($"]/,contains:[{beginKeywords:"extends implements" -},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";", -illegal:/[.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use", -relevance:0,end:";",contains:[e.UNDERSCORE_TITLE_MODE]},l,c]}}})()); -hljs.registerLanguage("php-template",(()=>{"use strict";return n=>({ -name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/, -subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"', -end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{ -illegal:null,className:null,contains:null,skip:!0 -}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null, -skip:!0})]}]})})()); -hljs.registerLanguage("plaintext",(()=>{"use strict";return t=>({ -name:"Plain text",aliases:["text","txt"],disableAutodetect:!0})})()); -hljs.registerLanguage("properties",(()=>{"use strict";return e=>{ -var n="[ \\t\\f]*",a=n+"[:=]"+n,t="("+a+"|[ \\t\\f]+)",r="([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",s="([^\\\\:= \\t\\f\\n]|\\\\.)+",i={ -end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{ -begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties", -case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT("^\\s*[!#]","$"),{ -returnBegin:!0,variants:[{begin:r+a,relevance:1},{begin:r+"[ \\t\\f]+", -relevance:0}],contains:[{className:"attr",begin:r,endsParent:!0,relevance:0}], -starts:i},{begin:s+t,returnBegin:!0,relevance:0,contains:[{className:"meta", -begin:s,endsParent:!0,relevance:0}],starts:i},{className:"attr",relevance:0, -begin:s+n+"$"}]}}})()); -hljs.registerLanguage("python",(()=>{"use strict";return e=>{const n={ -keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"], -built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], -literal:["__debug__","Ellipsis","False","None","NotImplemented","True"]},a={ -className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/, -end:/\}/,keywords:n,illegal:/#/},i={begin:/\{\{/,relevance:0},r={ -className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, -contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ -begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, -end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([uU]|[rR])'/,end:/'/, -relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ -begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, -end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, -contains:[e.BACKSLASH_ESCAPE,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, -contains:[e.BACKSLASH_ESCAPE,i,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},t="[0-9](_?[0-9])*",l=`(\\b(${t}))?\\.(${t})|\\b(${t})\\.`,b={ -className:"number",relevance:0,variants:[{ -begin:`(\\b(${t})|(${l}))[eE][+-]?(${t})[jJ]?\\b`},{begin:`(${l})[jJ]?`},{ -begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{ -begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{ -begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${t})[jJ]\\b`}]},o={ -className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{ -begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n, -contains:["self",a,b,r,e.HASH_COMMENT_MODE]}]};return s.contains=[r,b,a],{ -name:"Python",aliases:["py","gyp","ipython"],keywords:n, -illegal:/(<\/|->|\?)|=>/,contains:[a,b,{begin:/\bself\b/},{beginKeywords:"if", -relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function", -beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/, -illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,o,{begin:/->/, -endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/, -end:/(?=#)|$/,contains:[b,o,r]},{begin:/\b(print|exec)\(/}]}}})()); -hljs.registerLanguage("python-repl",(()=>{"use strict";return s=>({ -aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$", -subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{ -begin:/^\.\.\.(?=[ ]|$)/}]}]})})()); -hljs.registerLanguage("r",(()=>{"use strict";function e(...e){return e.map((e=>{ -return(a=e)?"string"==typeof a?a:a.source:null;var a})).join("")}return a=>{ -const n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/;return{name:"R", -illegal:/->/,keywords:{$pattern:n, -keyword:"function if in break next repeat else for while", -literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10", -built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm" -},compilerExtensions:[(a,n)=>{if(!a.beforeMatch)return -;if(a.starts)throw Error("beforeMatch cannot be used with starts") -;const i=Object.assign({},a);Object.keys(a).forEach((e=>{delete a[e] -})),a.begin=e(i.beforeMatch,e("(?=",i.begin,")")),a.starts={relevance:0, -contains:[Object.assign(i,{endsParent:!0})]},a.relevance=0,delete i.beforeMatch -}],contains:[a.COMMENT(/#'/,/$/,{contains:[{className:"doctag", -begin:"@examples",starts:{contains:[{begin:/\n/},{begin:/#'\s*(?=@[a-zA-Z]+)/, -endsParent:!0},{begin:/#'/,end:/$/,excludeBegin:!0}]}},{className:"doctag", -begin:"@param",end:/$/,contains:[{className:"variable",variants:[{begin:n},{ -begin:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{className:"doctag", -begin:/@[a-zA-Z]+/},{className:"meta-keyword",begin:/\\[a-zA-Z]+/}] -}),a.HASH_COMMENT_MODE,{className:"string",contains:[a.BACKSLASH_ESCAPE], -variants:[a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/ -}),a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/ -}),a.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/ -}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/ -}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/ -}),a.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"', -relevance:0},{begin:"'",end:"'",relevance:0}]},{className:"number",relevance:0, -beforeMatch:/([^a-zA-Z0-9._])/,variants:[{ -match:/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/},{ -match:/0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/},{ -match:/(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/}]},{begin:"%",end:"%"},{ -begin:e(/[a-zA-Z][a-zA-Z_0-9]*/,"\\s+<-\\s+")},{begin:"`",end:"`",contains:[{ -begin:/\\./}]}]}}})()); -hljs.registerLanguage("ruby",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("")}return n=>{ -const a="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i={ -keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__", -built_in:"proc lambda",literal:"true false nil"},s={className:"doctag", -begin:"@[A-Za-z]+"},r={begin:"#<",end:">"},b=[n.COMMENT("#","$",{contains:[s] -}),n.COMMENT("^=begin","^=end",{contains:[s],relevance:10 -}),n.COMMENT("^__END__","\\n$")],c={className:"subst",begin:/#\{/,end:/\}/, -keywords:i},t={className:"string",contains:[n.BACKSLASH_ESCAPE,c],variants:[{ -begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/, -end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{ -begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/, -end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{ -begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{ -begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{ -begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{ -begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{ -begin:/<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/,returnBegin:!0,contains:[{ -begin:/<<[-~]?'?/},n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, -contains:[n.BACKSLASH_ESCAPE,c]})]}]},g="[0-9](_?[0-9])*",d={className:"number", -relevance:0,variants:[{ -begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{ -begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" -},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ -begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ -begin:"\\b0(_?[0-7])+r?i?\\b"}]},l={className:"params",begin:"\\(",end:"\\)", -endsParent:!0,keywords:i},o=[t,{className:"class",beginKeywords:"class module", -end:"$|;",illegal:/=/,contains:[n.inherit(n.TITLE_MODE,{ -begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{ -begin:"("+n.IDENT_RE+"::)?"+n.IDENT_RE,relevance:0}]}].concat(b)},{ -className:"function",begin:e(/def\s*/,(_=a+"\\s*(\\(|;|$)",e("(?=",_,")"))), -relevance:0,keywords:"def",end:"$|;",contains:[n.inherit(n.TITLE_MODE,{begin:a -}),l].concat(b)},{begin:n.IDENT_RE+"::"},{className:"symbol", -begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol", -begin:":(?!\\s)",contains:[t,{begin:a}],relevance:0},d,{className:"variable", -begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ -className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:i},{ -begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{ -className:"regexp",contains:[n.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{ -begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(", -end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}] -}].concat(r,b),relevance:0}].concat(r,b);var _;c.contains=o,l.contains=o -;const E=[{begin:/^\s*=>/,starts:{end:"$",contains:o}},{className:"meta", -begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", -starts:{end:"$",contains:o}}];return b.unshift(r),{name:"Ruby", -aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/, -contains:[n.SHEBANG({binary:"ruby"})].concat(E).concat(b).concat(o)}}})()); -hljs.registerLanguage("rust",(()=>{"use strict";return e=>{ -const n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!" -;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?", -keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield", -literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}})()); -hljs.registerLanguage("scss",(()=>{"use strict" -;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],r=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],o=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse() -;return a=>{const n=(e=>({IMPORTANT:{className:"meta",begin:"!important"}, -HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, -ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/, -illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]} -}))(a),l=r,s=i,d="@[a-z-]+",c={className:"variable", -begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"};return{name:"SCSS",case_insensitive:!0, -illegal:"[=/|']",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{ -className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ -className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0 -},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag", -begin:"\\b("+e.join("|")+")\\b",relevance:0},{className:"selector-pseudo", -begin:":("+s.join("|")+")"},{className:"selector-pseudo", -begin:"::("+l.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[a.CSS_NUMBER_MODE] -},{className:"attribute",begin:"\\b("+o.join("|")+")\\b"},{ -begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" -},{begin:":",end:";", -contains:[c,n.HEXCOLOR,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,n.IMPORTANT] -},{begin:"@(page|font-face)",lexemes:d,keywords:"@page @font-face"},{begin:"@", -end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/, -keyword:"and or not only",attribute:t.join(" ")},contains:[{begin:d, -className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute" -},c,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,n.HEXCOLOR,a.CSS_NUMBER_MODE]}]}} +hljs.registerLanguage("c", (() => { + "use strict"; + + function e(e) { + return ((...e) => e.map((e => (e => e ? "string" == typeof e ? e : e.source : null)(e))).join(""))("(", e, ")?") + } + return t => { + const n = t.COMMENT("//", "$", { + contains: [{ + begin: /\\\n/ + }] + }), + r = "[a-zA-Z_]\\w*::", + a = "(decltype\\(auto\\)|" + e(r) + "[a-zA-Z_]\\w*" + e("<[^<>]+>") + ")", + i = { + className: "keyword", + begin: "\\b[a-z\\d_]*_t\\b" + }, + s = { + className: "string", + variants: [{ + begin: '(u8?|U|L)?"', + end: '"', + illegal: "\\n", + contains: [t.BACKSLASH_ESCAPE] + }, { + begin: "(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", + end: "'", + illegal: "." + }, t.END_SAME_AS_BEGIN({ + begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/, + end: /\)([^()\\ ]{0,16})"/ + })] + }, + o = { + className: "number", + variants: [{ + begin: "\\b(0b[01']+)" + }, { + begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" + }, { + begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" + }], + relevance: 0 + }, + c = { + className: "meta", + begin: /#\s*[a-z]+\b/, + end: /$/, + keywords: { + "meta-keyword": "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" + }, + contains: [{ + begin: /\\\n/, + relevance: 0 + }, t.inherit(s, { + className: "meta-string" + }), { + className: "meta-string", + begin: /<.*?>/ + }, n, t.C_BLOCK_COMMENT_MODE] + }, + l = { + className: "title", + begin: e(r) + t.IDENT_RE, + relevance: 0 + }, + d = e(r) + t.IDENT_RE + "\\s*\\(", + u = { + keyword: "int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", + built_in: "std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", + literal: "true false nullptr NULL" + }, + m = [c, i, n, t.C_BLOCK_COMMENT_MODE, o, s], + p = { + variants: [{ + begin: /=/, + end: /;/ + }, { + begin: /\(/, + end: /\)/ + }, { + beginKeywords: "new throw return else", + end: /;/ + }], + keywords: u, + contains: m.concat([{ + begin: /\(/, + end: /\)/, + keywords: u, + contains: m.concat(["self"]), + relevance: 0 + }]), + relevance: 0 + }, + _ = { + className: "function", + begin: "(" + a + "[\\*&\\s]+)+" + d, + returnBegin: !0, + end: /[{;=]/, + excludeEnd: !0, + keywords: u, + illegal: /[^\w\s\*&:<>.]/, + contains: [{ + begin: "decltype\\(auto\\)", + keywords: u, + relevance: 0 + }, { + begin: d, + returnBegin: !0, + contains: [l], + relevance: 0 + }, { + className: "params", + begin: /\(/, + end: /\)/, + keywords: u, + relevance: 0, + contains: [n, t.C_BLOCK_COMMENT_MODE, s, o, i, { + begin: /\(/, + end: /\)/, + keywords: u, + relevance: 0, + contains: ["self", n, t.C_BLOCK_COMMENT_MODE, s, o, i] + }] + }, i, n, t.C_BLOCK_COMMENT_MODE, c] + }; + return { + name: "C", + aliases: ["h"], + keywords: u, + disableAutodetect: !0, + illegal: "", + keywords: u, + contains: ["self", i] + }, { + begin: t.IDENT_RE + "::", + keywords: u + }, { + className: "class", + beginKeywords: "enum class struct union", + end: /[{;:<>=]/, + contains: [{ + beginKeywords: "final class struct" + }, t.TITLE_MODE] + }]), + exports: { + preprocessor: c, + strings: s, + keywords: u + } + } + } +})()); +hljs.registerLanguage("coffeescript", (() => { + "use strict"; + const e = ["as", "in", "of", "if", "for", "while", "finally", "var", "new", "function", "do", "return", "void", "else", "break", "catch", "instanceof", "with", "throw", "case", "default", "try", "switch", "continue", "typeof", "delete", "let", "yield", "const", "class", "debugger", "async", "await", "static", "import", "from", "export", "extends"], + n = ["true", "false", "null", "undefined", "NaN", "Infinity"], + a = [].concat(["setInterval", "setTimeout", "clearInterval", "clearTimeout", "require", "exports", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "unescape"], ["arguments", "this", "super", "console", "window", "document", "localStorage", "module", "global"], ["Intl", "DataView", "Number", "Math", "Date", "String", "RegExp", "Object", "Function", "Boolean", "Error", "Symbol", "Set", "Map", "WeakSet", "WeakMap", "Proxy", "Reflect", "JSON", "Promise", "Float64Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Float32Array", "Array", "Uint8Array", "Uint8ClampedArray", "ArrayBuffer", "BigInt64Array", "BigUint64Array", "BigInt"], ["EvalError", "InternalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError"]); + return r => { + const t = { + keyword: e.concat(["then", "unless", "until", "loop", "by", "when", "and", "or", "is", "isnt", "not"]).filter((i = ["var", "const", "let", "function", "static"], e => !i.includes(e))), + literal: n.concat(["yes", "no", "on", "off"]), + built_in: a.concat(["npm", "print"]) + }; + var i; + const s = "[A-Za-z$_][0-9A-Za-z$_]*", + o = { + className: "subst", + begin: /#\{/, + end: /\}/, + keywords: t + }, + c = [r.BINARY_NUMBER_MODE, r.inherit(r.C_NUMBER_MODE, { + starts: { + end: "(\\s*/)?", + relevance: 0 + } + }), { + className: "string", + variants: [{ + begin: /'''/, + end: /'''/, + contains: [r.BACKSLASH_ESCAPE] + }, { + begin: /'/, + end: /'/, + contains: [r.BACKSLASH_ESCAPE] + }, { + begin: /"""/, + end: /"""/, + contains: [r.BACKSLASH_ESCAPE, o] + }, { + begin: /"/, + end: /"/, + contains: [r.BACKSLASH_ESCAPE, o] + }] + }, { + className: "regexp", + variants: [{ + begin: "///", + end: "///", + contains: [o, r.HASH_COMMENT_MODE] + }, { + begin: "//[gim]{0,3}(?=\\W)", + relevance: 0 + }, { + begin: /\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/ + }] + }, { + begin: "@" + s + }, { + subLanguage: "javascript", + excludeBegin: !0, + excludeEnd: !0, + variants: [{ + begin: "```", + end: "```" + }, { + begin: "`", + end: "`" + }] + }]; + o.contains = c; + const l = r.inherit(r.TITLE_MODE, { + begin: s + }), + d = "(\\(.*\\)\\s*)?\\B[-=]>", + g = { + className: "params", + begin: "\\([^\\(]", + returnBegin: !0, + contains: [{ + begin: /\(/, + end: /\)/, + keywords: t, + contains: ["self"].concat(c) + }] + }; + return { + name: "CoffeeScript", + aliases: ["coffee", "cson", "iced"], + keywords: t, + illegal: /\/\*/, + contains: c.concat([r.COMMENT("###", "###"), r.HASH_COMMENT_MODE, { + className: "function", + begin: "^\\s*" + s + "\\s*=\\s*" + d, + end: "[-=]>", + returnBegin: !0, + contains: [l, g] + }, { + begin: /[:\(,=]\s*/, + relevance: 0, + contains: [{ + className: "function", + begin: d, + end: "[-=]>", + returnBegin: !0, + contains: [g] + }] + }, { + className: "class", + beginKeywords: "class", + end: "$", + illegal: /[:="\[\]]/, + contains: [{ + beginKeywords: "extends", + endsWithParent: !0, + illegal: /[:="\[\]]/, + contains: [l] + }, l] + }, { + begin: s + ":", + end: ":", + returnBegin: !0, + returnEnd: !0, + relevance: 0 + }]) + } + } +})()); +hljs.registerLanguage("cpp", (() => { + "use strict"; + + function e(e) { + return t("(", e, ")?") + } + + function t(...e) { + return e.map((e => { + return (t = e) ? "string" == typeof t ? t : t.source : null; + var t + })).join("") + } + return n => { + const r = n.COMMENT("//", "$", { + contains: [{ + begin: /\\\n/ + }] + }), + a = "[a-zA-Z_]\\w*::", + i = "(decltype\\(auto\\)|" + e(a) + "[a-zA-Z_]\\w*" + e("<[^<>]+>") + ")", + s = { + className: "keyword", + begin: "\\b[a-z\\d_]*_t\\b" + }, + c = { + className: "string", + variants: [{ + begin: '(u8?|U|L)?"', + end: '"', + illegal: "\\n", + contains: [n.BACKSLASH_ESCAPE] + }, { + begin: "(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", + end: "'", + illegal: "." + }, n.END_SAME_AS_BEGIN({ + begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/, + end: /\)([^()\\ ]{0,16})"/ + })] + }, + o = { + className: "number", + variants: [{ + begin: "\\b(0b[01']+)" + }, { + begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" + }, { + begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" + }], + relevance: 0 + }, + l = { + className: "meta", + begin: /#\s*[a-z]+\b/, + end: /$/, + keywords: { + "meta-keyword": "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" + }, + contains: [{ + begin: /\\\n/, + relevance: 0 + }, n.inherit(c, { + className: "meta-string" + }), { + className: "meta-string", + begin: /<.*?>/ + }, r, n.C_BLOCK_COMMENT_MODE] + }, + d = { + className: "title", + begin: e(a) + n.IDENT_RE, + relevance: 0 + }, + u = e(a) + n.IDENT_RE + "\\s*\\(", + m = { + keyword: "int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", + built_in: "_Bool _Complex _Imaginary", + _relevance_hints: ["asin", "atan2", "atan", "calloc", "ceil", "cosh", "cos", "exit", "exp", "fabs", "floor", "fmod", "fprintf", "fputs", "free", "frexp", "auto_ptr", "deque", "list", "queue", "stack", "vector", "map", "set", "pair", "bitset", "multiset", "multimap", "unordered_set", "fscanf", "future", "isalnum", "isalpha", "iscntrl", "isdigit", "isgraph", "islower", "isprint", "ispunct", "isspace", "isupper", "isxdigit", "tolower", "toupper", "labs", "ldexp", "log10", "log", "malloc", "realloc", "memchr", "memcmp", "memcpy", "memset", "modf", "pow", "printf", "putchar", "puts", "scanf", "sinh", "sin", "snprintf", "sprintf", "sqrt", "sscanf", "strcat", "strchr", "strcmp", "strcpy", "strcspn", "strlen", "strncat", "strncmp", "strncpy", "strpbrk", "strrchr", "strspn", "strstr", "tanh", "tan", "unordered_map", "unordered_multiset", "unordered_multimap", "priority_queue", "make_pair", "array", "shared_ptr", "abort", "terminate", "abs", "acos", "vfprintf", "vprintf", "vsprintf", "endl", "initializer_list", "unique_ptr", "complex", "imaginary", "std", "string", "wstring", "cin", "cout", "cerr", "clog", "stdin", "stdout", "stderr", "stringstream", "istringstream", "ostringstream"], + literal: "true false nullptr NULL" + }, + p = { + className: "function.dispatch", + relevance: 0, + keywords: m, + begin: t(/\b/, /(?!decltype)/, /(?!if)/, /(?!for)/, /(?!while)/, n.IDENT_RE, (_ = /\s*\(/, t("(?=", _, ")"))) + }; + var _; + const g = [p, l, s, r, n.C_BLOCK_COMMENT_MODE, o, c], + b = { + variants: [{ + begin: /=/, + end: /;/ + }, { + begin: /\(/, + end: /\)/ + }, { + beginKeywords: "new throw return else", + end: /;/ + }], + keywords: m, + contains: g.concat([{ + begin: /\(/, + end: /\)/, + keywords: m, + contains: g.concat(["self"]), + relevance: 0 + }]), + relevance: 0 + }, + f = { + className: "function", + begin: "(" + i + "[\\*&\\s]+)+" + u, + returnBegin: !0, + end: /[{;=]/, + excludeEnd: !0, + keywords: m, + illegal: /[^\w\s\*&:<>.]/, + contains: [{ + begin: "decltype\\(auto\\)", + keywords: m, + relevance: 0 + }, { + begin: u, + returnBegin: !0, + contains: [d], + relevance: 0 + }, { + begin: /::/, + relevance: 0 + }, { + begin: /:/, + endsWithParent: !0, + contains: [c, o] + }, { + className: "params", + begin: /\(/, + end: /\)/, + keywords: m, + relevance: 0, + contains: [r, n.C_BLOCK_COMMENT_MODE, c, o, s, { + begin: /\(/, + end: /\)/, + keywords: m, + relevance: 0, + contains: ["self", r, n.C_BLOCK_COMMENT_MODE, c, o, s] + }] + }, s, r, n.C_BLOCK_COMMENT_MODE, l] + }; + return { + name: "C++", + aliases: ["cc", "c++", "h++", "hpp", "hh", "hxx", "cxx"], + keywords: m, + illegal: "", + keywords: m, + contains: ["self", s] + }, { + begin: n.IDENT_RE + "::", + keywords: m + }, { + className: "class", + beginKeywords: "enum class struct union", + end: /[{;:<>=]/, + contains: [{ + beginKeywords: "final class struct" + }, n.TITLE_MODE] + }]), + exports: { + preprocessor: l, + strings: c, + keywords: m + } + } + } +})()); +hljs.registerLanguage("csharp", (() => { + "use strict"; + return e => { + const n = { + keyword: ["abstract", "as", "base", "break", "case", "class", "const", "continue", "do", "else", "event", "explicit", "extern", "finally", "fixed", "for", "foreach", "goto", "if", "implicit", "in", "interface", "internal", "is", "lock", "namespace", "new", "operator", "out", "override", "params", "private", "protected", "public", "readonly", "record", "ref", "return", "sealed", "sizeof", "stackalloc", "static", "struct", "switch", "this", "throw", "try", "typeof", "unchecked", "unsafe", "using", "virtual", "void", "volatile", "while"].concat(["add", "alias", "and", "ascending", "async", "await", "by", "descending", "equals", "from", "get", "global", "group", "init", "into", "join", "let", "nameof", "not", "notnull", "on", "or", "orderby", "partial", "remove", "select", "set", "unmanaged", "value|0", "var", "when", "where", "with", "yield"]), + built_in: ["bool", "byte", "char", "decimal", "delegate", "double", "dynamic", "enum", "float", "int", "long", "nint", "nuint", "object", "sbyte", "short", "string", "ulong", "uint", "ushort"], + literal: ["default", "false", "null", "true"] + }, + a = e.inherit(e.TITLE_MODE, { + begin: "[a-zA-Z](\\.?\\w)*" + }), + i = { + className: "number", + variants: [{ + begin: "\\b(0b[01']+)" + }, { + begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)" + }, { + begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" + }], + relevance: 0 + }, + s = { + className: "string", + begin: '@"', + end: '"', + contains: [{ + begin: '""' + }] + }, + t = e.inherit(s, { + illegal: /\n/ + }), + r = { + className: "subst", + begin: /\{/, + end: /\}/, + keywords: n + }, + l = e.inherit(r, { + illegal: /\n/ + }), + c = { + className: "string", + begin: /\$"/, + end: '"', + illegal: /\n/, + contains: [{ + begin: /\{\{/ + }, { + begin: /\}\}/ + }, e.BACKSLASH_ESCAPE, l] + }, + o = { + className: "string", + begin: /\$@"/, + end: '"', + contains: [{ + begin: /\{\{/ + }, { + begin: /\}\}/ + }, { + begin: '""' + }, r] + }, + d = e.inherit(o, { + illegal: /\n/, + contains: [{ + begin: /\{\{/ + }, { + begin: /\}\}/ + }, { + begin: '""' + }, l] + }); + r.contains = [o, c, s, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, i, e.C_BLOCK_COMMENT_MODE], + l.contains = [d, c, t, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, i, e.inherit(e.C_BLOCK_COMMENT_MODE, { + illegal: /\n/ + })]; + const g = { + variants: [o, c, s, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + }, + E = { + begin: "<", + end: ">", + contains: [{ + beginKeywords: "in out" + }, a] + }, + _ = e.IDENT_RE + "(<" + e.IDENT_RE + "(\\s*,\\s*" + e.IDENT_RE + ")*>)?(\\[\\])?", + b = { + begin: "@" + e.IDENT_RE, + relevance: 0 + }; + return { + name: "C#", + aliases: ["cs", "c#"], + keywords: n, + illegal: /::/, + contains: [e.COMMENT("///", "$", { + returnBegin: !0, + contains: [{ + className: "doctag", + variants: [{ + begin: "///", + relevance: 0 + }, { + begin: "\x3c!--|--\x3e" + }, { + begin: "" + }] + }] + }), e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, { + className: "meta", + begin: "#", + end: "$", + keywords: { + "meta-keyword": "if else elif endif define undef warning error line region endregion pragma checksum" + } + }, g, i, { + beginKeywords: "class interface", + relevance: 0, + end: /[{;=]/, + illegal: /[^\s:,]/, + contains: [{ + beginKeywords: "where class" + }, a, E, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + beginKeywords: "namespace", + relevance: 0, + end: /[{;=]/, + illegal: /[^\s:]/, + contains: [a, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + beginKeywords: "record", + relevance: 0, + end: /[{;=]/, + illegal: /[^\s:]/, + contains: [a, E, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + className: "meta", + begin: "^\\s*\\[", + excludeBegin: !0, + end: "\\]", + excludeEnd: !0, + contains: [{ + className: "meta-string", + begin: /"/, + end: /"/ + }] + }, { + beginKeywords: "new return throw await else", + relevance: 0 + }, { + className: "function", + begin: "(" + _ + "\\s+)+" + e.IDENT_RE + "\\s*(<.+>\\s*)?\\(", + returnBegin: !0, + end: /\s*[{;=]/, + excludeEnd: !0, + keywords: n, + contains: [{ + beginKeywords: "public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", + relevance: 0 + }, { + begin: e.IDENT_RE + "\\s*(<.+>\\s*)?\\(", + returnBegin: !0, + contains: [e.TITLE_MODE, E], + relevance: 0 + }, { + className: "params", + begin: /\(/, + end: /\)/, + excludeBegin: !0, + excludeEnd: !0, + keywords: n, + relevance: 0, + contains: [g, i, e.C_BLOCK_COMMENT_MODE] + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, b] + } + } +})()); +hljs.registerLanguage("css", (() => { + "use strict"; + const e = ["a", "abbr", "address", "article", "aside", "audio", "b", "blockquote", "body", "button", "canvas", "caption", "cite", "code", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "mark", "menu", "nav", "object", "ol", "p", "q", "quote", "samp", "section", "span", "strong", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "ul", "var", "video"], + t = ["any-hover", "any-pointer", "aspect-ratio", "color", "color-gamut", "color-index", "device-aspect-ratio", "device-height", "device-width", "display-mode", "forced-colors", "grid", "height", "hover", "inverted-colors", "monochrome", "orientation", "overflow-block", "overflow-inline", "pointer", "prefers-color-scheme", "prefers-contrast", "prefers-reduced-motion", "prefers-reduced-transparency", "resolution", "scan", "scripting", "update", "width", "min-width", "max-width", "min-height", "max-height"], + i = ["active", "any-link", "blank", "checked", "current", "default", "defined", "dir", "disabled", "drop", "empty", "enabled", "first", "first-child", "first-of-type", "fullscreen", "future", "focus", "focus-visible", "focus-within", "has", "host", "host-context", "hover", "indeterminate", "in-range", "invalid", "is", "lang", "last-child", "last-of-type", "left", "link", "local-link", "not", "nth-child", "nth-col", "nth-last-child", "nth-last-col", "nth-last-of-type", "nth-of-type", "only-child", "only-of-type", "optional", "out-of-range", "past", "placeholder-shown", "read-only", "read-write", "required", "right", "root", "scope", "target", "target-within", "user-invalid", "valid", "visited", "where"], + o = ["after", "backdrop", "before", "cue", "cue-region", "first-letter", "first-line", "grammar-error", "marker", "part", "placeholder", "selection", "slotted", "spelling-error"], + r = ["align-content", "align-items", "align-self", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "auto", "backface-visibility", "background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "clear", "clip", "clip-path", "color", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "content", "counter-increment", "counter-reset", "cursor", "direction", "display", "empty-cells", "filter", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "font", "font-display", "font-family", "font-feature-settings", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-smoothing", "font-stretch", "font-style", "font-variant", "font-variant-ligatures", "font-variation-settings", "font-weight", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "ime-mode", "inherit", "initial", "justify-content", "left", "letter-spacing", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "marks", "mask", "max-height", "max-width", "min-height", "min-width", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "none", "normal", "object-fit", "object-position", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "page-break-after", "page-break-before", "page-break-inside", "perspective", "perspective-origin", "pointer-events", "position", "quotes", "resize", "right", "src", "tab-size", "table-layout", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-style", "text-indent", "text-overflow", "text-rendering", "text-shadow", "text-transform", "text-underline-position", "top", "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", "white-space", "widows", "width", "word-break", "word-spacing", "word-wrap", "z-index"].reverse(); + return n => { + const a = (e => ({ + IMPORTANT: { + className: "meta", + begin: "!important" + }, + HEXCOLOR: { + className: "number", + begin: "#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})" + }, + ATTRIBUTE_SELECTOR_MODE: { + className: "selector-attr", + begin: /\[/, + end: /\]/, + illegal: "$", + contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + } + }))(n), + l = [n.APOS_STRING_MODE, n.QUOTE_STRING_MODE]; + return { + name: "CSS", + case_insensitive: !0, + illegal: /[=|'\$]/, + keywords: { + keyframePosition: "from to" + }, + classNameAliases: { + keyframePosition: "selector-tag" + }, + contains: [n.C_BLOCK_COMMENT_MODE, { + begin: /-(webkit|moz|ms|o)-(?=[a-z])/ + }, n.CSS_NUMBER_MODE, { + className: "selector-id", + begin: /#[A-Za-z0-9_-]+/, + relevance: 0 + }, { + className: "selector-class", + begin: "\\.[a-zA-Z-][a-zA-Z0-9_-]*", + relevance: 0 + }, a.ATTRIBUTE_SELECTOR_MODE, { + className: "selector-pseudo", + variants: [{ + begin: ":(" + i.join("|") + ")" + }, { + begin: "::(" + o.join("|") + ")" + }] + }, { + className: "attribute", + begin: "\\b(" + r.join("|") + ")\\b" + }, { + begin: ":", + end: "[;}]", + contains: [a.HEXCOLOR, a.IMPORTANT, n.CSS_NUMBER_MODE, ...l, { + begin: /(url|data-uri)\(/, + end: /\)/, + relevance: 0, + keywords: { + built_in: "url data-uri" + }, + contains: [{ + className: "string", + begin: /[^)]/, + endsWithParent: !0, + excludeEnd: !0 + }] + }, { + className: "built_in", + begin: /[\w-]+(?=\()/ + }] + }, { + begin: (s = /@/, ((...e) => e.map((e => (e => e ? "string" == typeof e ? e : e.source : null)(e))).join(""))("(?=", s, ")")), + end: "[{;]", + relevance: 0, + illegal: /:/, + contains: [{ + className: "keyword", + begin: /@-?\w[\w]*(-\w+)*/ + }, { + begin: /\s/, + endsWithParent: !0, + excludeEnd: !0, + relevance: 0, + keywords: { + $pattern: /[a-z-]+/, + keyword: "and or not only", + attribute: t.join(" ") + }, + contains: [{ + begin: /[a-z-]+(?=:)/, + className: "attribute" + }, ...l, n.CSS_NUMBER_MODE] + }] + }, { + className: "selector-tag", + begin: "\\b(" + e.join("|") + ")\\b" + }] + }; + var s + } +})()); +hljs.registerLanguage("diff", (() => { + "use strict"; + return e => ({ + name: "Diff", + aliases: ["patch"], + contains: [{ + className: "meta", + relevance: 10, + variants: [{ + begin: /^@@ +-\d+,\d+ +\+\d+,\d+ +@@/ + }, { + begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/ + }, { + begin: /^--- +\d+,\d+ +----$/ + }] + }, { + className: "comment", + variants: [{ + begin: /Index: /, + end: /$/ + }, { + begin: /^index/, + end: /$/ + }, { + begin: /={3,}/, + end: /$/ + }, { + begin: /^-{3}/, + end: /$/ + }, { + begin: /^\*{3} /, + end: /$/ + }, { + begin: /^\+{3}/, + end: /$/ + }, { + begin: /^\*{15}$/ + }, { + begin: /^diff --git/, + end: /$/ + }] + }, { + className: "addition", + begin: /^\+/, + end: /$/ + }, { + className: "deletion", + begin: /^-/, + end: /$/ + }, { + className: "addition", + begin: /^!/, + end: /$/ + }] + }) +})()); +hljs.registerLanguage("go", (() => { + "use strict"; + return e => { + const n = { + keyword: "break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune", + literal: "true false iota nil", + built_in: "append cap close complex copy imag len make new panic print println real recover delete" + }; + return { + name: "Go", + aliases: ["golang"], + keywords: n, + illegal: " { + "use strict"; + + function e(...e) { + return e.map((e => { + return (n = e) ? "string" == typeof n ? n : n.source : null; + var n + })).join("") + } + return n => { + const a = "HTTP/(2|1\\.[01])", + s = { + className: "attribute", + begin: e("^", /[A-Za-z][A-Za-z0-9-]*/, "(?=\\:\\s)"), + starts: { + contains: [{ + className: "punctuation", + begin: /: /, + relevance: 0, + starts: { + end: "$", + relevance: 0 + } + }] + } + }, + t = [s, { + begin: "\\n\\n", + starts: { + subLanguage: [], + endsWithParent: !0 + } + }]; + return { + name: "HTTP", + aliases: ["https"], + illegal: /\S/, + contains: [{ + begin: "^(?=" + a + " \\d{3})", + end: /$/, + contains: [{ + className: "meta", + begin: a + }, { + className: "number", + begin: "\\b\\d{3}\\b" + }], + starts: { + end: /\b\B/, + illegal: /\S/, + contains: t + } + }, { + begin: "(?=^[A-Z]+ (.*?) " + a + "$)", + end: /$/, + contains: [{ + className: "string", + begin: " ", + end: " ", + excludeBegin: !0, + excludeEnd: !0 + }, { + className: "meta", + begin: a + }, { + className: "keyword", + begin: "[A-Z]+" + }], + starts: { + end: /\b\B/, + illegal: /\S/, + contains: t + } + }, n.inherit(s, { + relevance: 0 + })] + } + } +})()); +hljs.registerLanguage("ini", (() => { + "use strict"; + + function e(e) { + return e ? "string" == typeof e ? e : e.source : null + } + + function n(...n) { + return n.map((n => e(n))).join("") + } + return s => { + const a = { + className: "number", + relevance: 0, + variants: [{ + begin: /([+-]+)?[\d]+_[\d_]+/ + }, { + begin: s.NUMBER_RE + }] + }, + i = s.COMMENT(); + i.variants = [{ + begin: /;/, + end: /$/ + }, { + begin: /#/, + end: /$/ + }]; + const t = { + className: "variable", + variants: [{ + begin: /\$[\w\d"][\w\d_]*/ + }, { + begin: /\$\{(.*?)\}/ + }] + }, + r = { + className: "literal", + begin: /\bon|off|true|false|yes|no\b/ + }, + l = { + className: "string", + contains: [s.BACKSLASH_ESCAPE], + variants: [{ + begin: "'''", + end: "'''", + relevance: 10 + }, { + begin: '"""', + end: '"""', + relevance: 10 + }, { + begin: '"', + end: '"' + }, { + begin: "'", + end: "'" + }] + }, + c = { + begin: /\[/, + end: /\]/, + contains: [i, r, t, l, a, "self"], + relevance: 0 + }, + g = "(" + [/[A-Za-z0-9_-]+/, /"(\\"|[^"])*"/, /'[^']*'/].map((n => e(n))).join("|") + ")"; + return { + name: "TOML, also INI", + aliases: ["toml"], + case_insensitive: !0, + illegal: /\S/, + contains: [i, { + className: "section", + begin: /\[+/, + end: /\]+/ + }, { + begin: n(g, "(\\s*\\.\\s*", g, ")*", n("(?=", /\s*=\s*[^#\s]/, ")")), + className: "attr", + starts: { + end: /$/, + contains: [i, c, r, t, l, a] + } + }] + } + } +})()); +hljs.registerLanguage("java", (() => { + "use strict"; + var e = "\\.([0-9](_*[0-9])*)", + n = "[0-9a-fA-F](_*[0-9a-fA-F])*", + a = { + className: "number", + variants: [{ + begin: `(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` + }, { + begin: `\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)` + }, { + begin: `(${e})[fFdD]?\\b` + }, { + begin: "\\b([0-9](_*[0-9])*)[fFdD]\\b" + }, { + begin: `\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` + }, { + begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" + }, { + begin: `\\b0[xX](${n})[lL]?\\b` + }, { + begin: "\\b0(_*[0-7])*[lL]?\\b" + }, { + begin: "\\b0[bB][01](_*[01])*[lL]?\\b" + }], + relevance: 0 + }; + return e => { + var n = "false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do", + s = { + className: "meta", + begin: "@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*", + contains: [{ + begin: /\(/, + end: /\)/, + contains: ["self"] + }] + }; + const r = a; + return { + name: "Java", + aliases: ["jsp"], + keywords: n, + illegal: /<\/|#/, + contains: [e.COMMENT("/\\*\\*", "\\*/", { + relevance: 0, + contains: [{ + begin: /\w+@/, + relevance: 0 + }, { + className: "doctag", + begin: "@[A-Za-z]+" + }] + }), { + begin: /import java\.[a-z]+\./, + keywords: "import", + relevance: 2 + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, { + className: "class", + beginKeywords: "class interface enum", + end: /[{;=]/, + excludeEnd: !0, + relevance: 1, + keywords: "class interface enum", + illegal: /[:"\[\]]/, + contains: [{ + beginKeywords: "extends implements" + }, e.UNDERSCORE_TITLE_MODE] + }, { + beginKeywords: "new throw return else", + relevance: 0 + }, { + className: "class", + begin: "record\\s+" + e.UNDERSCORE_IDENT_RE + "\\s*\\(", + returnBegin: !0, + excludeEnd: !0, + end: /[{;=]/, + keywords: n, + contains: [{ + beginKeywords: "record" + }, { + begin: e.UNDERSCORE_IDENT_RE + "\\s*\\(", + returnBegin: !0, + relevance: 0, + contains: [e.UNDERSCORE_TITLE_MODE] + }, { + className: "params", + begin: /\(/, + end: /\)/, + keywords: n, + relevance: 0, + contains: [e.C_BLOCK_COMMENT_MODE] + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + className: "function", + begin: "([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+" + e.UNDERSCORE_IDENT_RE + "\\s*\\(", + returnBegin: !0, + end: /[{;=]/, + excludeEnd: !0, + keywords: n, + contains: [{ + begin: e.UNDERSCORE_IDENT_RE + "\\s*\\(", + returnBegin: !0, + relevance: 0, + contains: [e.UNDERSCORE_TITLE_MODE] + }, { + className: "params", + begin: /\(/, + end: /\)/, + keywords: n, + relevance: 0, + contains: [s, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, r, e.C_BLOCK_COMMENT_MODE] + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, r, s] + } + } +})()); +hljs.registerLanguage("javascript", (() => { + "use strict"; + const e = "[A-Za-z$_][0-9A-Za-z$_]*", + n = ["as", "in", "of", "if", "for", "while", "finally", "var", "new", "function", "do", "return", "void", "else", "break", "catch", "instanceof", "with", "throw", "case", "default", "try", "switch", "continue", "typeof", "delete", "let", "yield", "const", "class", "debugger", "async", "await", "static", "import", "from", "export", "extends"], + a = ["true", "false", "null", "undefined", "NaN", "Infinity"], + s = [].concat(["setInterval", "setTimeout", "clearInterval", "clearTimeout", "require", "exports", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "unescape"], ["arguments", "this", "super", "console", "window", "document", "localStorage", "module", "global"], ["Intl", "DataView", "Number", "Math", "Date", "String", "RegExp", "Object", "Function", "Boolean", "Error", "Symbol", "Set", "Map", "WeakSet", "WeakMap", "Proxy", "Reflect", "JSON", "Promise", "Float64Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Float32Array", "Array", "Uint8Array", "Uint8ClampedArray", "ArrayBuffer", "BigInt64Array", "BigUint64Array", "BigInt"], ["EvalError", "InternalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError"]); + + function r(e) { + return t("(?=", e, ")") + } + + function t(...e) { + return e.map((e => { + return (n = e) ? "string" == typeof n ? n : n.source : null; + var n + })).join("") + } + return i => { + const c = e, + o = { + begin: /<[A-Za-z0-9\\._:-]+/, + end: /\/[A-Za-z0-9\\._:-]+>|\/>/, + isTrulyOpeningTag: (e, n) => { + const a = e[0].length + e.index, + s = e.input[a]; + "<" !== s ? ">" === s && (((e, { + after: n + }) => { + const a = "", + returnBegin: !0, + end: "\\s*=>", + contains: [{ + className: "params", + variants: [{ + begin: i.UNDERSCORE_IDENT_RE, + relevance: 0 + }, { + className: null, + begin: /\(\s*\)/, + skip: !0 + }, { + begin: /\(/, + end: /\)/, + excludeBegin: !0, + excludeEnd: !0, + keywords: l, + contains: f + }] + }] + }, { + begin: /,/, + relevance: 0 + }, { + className: "", + begin: /\s/, + end: /\s*/, + skip: !0 + }, { + variants: [{ + begin: "<>", + end: "" + }, { + begin: o.begin, + "on:begin": o.isTrulyOpeningTag, + end: o.end + }], + subLanguage: "xml", + contains: [{ + begin: o.begin, + end: o.end, + skip: !0, + contains: ["self"] + }] + }], + relevance: 0 + }, { + className: "function", + beginKeywords: "function", + end: /[{;]/, + excludeEnd: !0, + keywords: l, + contains: ["self", i.inherit(i.TITLE_MODE, { + begin: c + }), p], + illegal: /%/ + }, { + beginKeywords: "while if switch catch for" + }, { + className: "function", + begin: i.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", + returnBegin: !0, + contains: [p, i.inherit(i.TITLE_MODE, { + begin: c + })] + }, { + variants: [{ + begin: "\\." + c + }, { + begin: "\\$" + c + }], + relevance: 0 + }, { + className: "class", + beginKeywords: "class", + end: /[{;=]/, + excludeEnd: !0, + illegal: /[:"[\]]/, + contains: [{ + beginKeywords: "extends" + }, i.UNDERSCORE_TITLE_MODE] + }, { + begin: /\b(?=constructor)/, + end: /[{;]/, + excludeEnd: !0, + contains: [i.inherit(i.TITLE_MODE, { + begin: c + }), "self", p] + }, { + begin: "(get|set)\\s+(?=" + c + "\\()", + end: /\{/, + keywords: "get set", + contains: [i.inherit(i.TITLE_MODE, { + begin: c + }), { + begin: /\(\)/ + }, p] + }, { + begin: /\$[(.]/ + }] + } + } +})()); +hljs.registerLanguage("json", (() => { + "use strict"; + return n => { + const e = { + literal: "true false null" + }, + i = [n.C_LINE_COMMENT_MODE, n.C_BLOCK_COMMENT_MODE], + a = [n.QUOTE_STRING_MODE, n.C_NUMBER_MODE], + l = { + end: ",", + endsWithParent: !0, + excludeEnd: !0, + contains: a, + keywords: e + }, + t = { + begin: /\{/, + end: /\}/, + contains: [{ + className: "attr", + begin: /"/, + end: /"/, + contains: [n.BACKSLASH_ESCAPE], + illegal: "\\n" + }, n.inherit(l, { + begin: /:/ + })].concat(i), + illegal: "\\S" + }, + s = { + begin: "\\[", + end: "\\]", + contains: [n.inherit(l)], + illegal: "\\S" + }; + return a.push(t, s), i.forEach((n => { + a.push(n) + })), { + name: "JSON", + contains: a, + keywords: e, + illegal: "\\S" + } + } +})()); +hljs.registerLanguage("kotlin", (() => { + "use strict"; + var e = "\\.([0-9](_*[0-9])*)", + n = "[0-9a-fA-F](_*[0-9a-fA-F])*", + a = { + className: "number", + variants: [{ + begin: `(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` + }, { + begin: `\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)` + }, { + begin: `(${e})[fFdD]?\\b` + }, { + begin: "\\b([0-9](_*[0-9])*)[fFdD]\\b" + }, { + begin: `\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` + }, { + begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" + }, { + begin: `\\b0[xX](${n})[lL]?\\b` + }, { + begin: "\\b0(_*[0-7])*[lL]?\\b" + }, { + begin: "\\b0[bB][01](_*[01])*[lL]?\\b" + }], + relevance: 0 + }; + return e => { + const n = { + keyword: "abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", + built_in: "Byte Short Char Int Long Boolean Float Double Void Unit Nothing", + literal: "true false null" + }, + i = { + className: "symbol", + begin: e.UNDERSCORE_IDENT_RE + "@" + }, + s = { + className: "subst", + begin: /\$\{/, + end: /\}/, + contains: [e.C_NUMBER_MODE] + }, + t = { + className: "variable", + begin: "\\$" + e.UNDERSCORE_IDENT_RE + }, + r = { + className: "string", + variants: [{ + begin: '"""', + end: '"""(?=[^"])', + contains: [t, s] + }, { + begin: "'", + end: "'", + illegal: /\n/, + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: '"', + end: '"', + illegal: /\n/, + contains: [e.BACKSLASH_ESCAPE, t, s] + }] + }; + s.contains.push(r); + const l = { + className: "meta", + begin: "@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*" + e.UNDERSCORE_IDENT_RE + ")?" + }, + c = { + className: "meta", + begin: "@" + e.UNDERSCORE_IDENT_RE, + contains: [{ + begin: /\(/, + end: /\)/, + contains: [e.inherit(r, { + className: "meta-string" + })] + }] + }, + o = a, + b = e.COMMENT("/\\*", "\\*/", { + contains: [e.C_BLOCK_COMMENT_MODE] + }), + E = { + variants: [{ + className: "type", + begin: e.UNDERSCORE_IDENT_RE + }, { + begin: /\(/, + end: /\)/, + contains: [] + }] + }, + d = E; + return d.variants[1].contains = [E], E.variants[1].contains = [d], { + name: "Kotlin", + aliases: ["kt", "kts"], + keywords: n, + contains: [e.COMMENT("/\\*\\*", "\\*/", { + relevance: 0, + contains: [{ + className: "doctag", + begin: "@[A-Za-z]+" + }] + }), e.C_LINE_COMMENT_MODE, b, { + className: "keyword", + begin: /\b(break|continue|return|this)\b/, + starts: { + contains: [{ + className: "symbol", + begin: /@\w+/ + }] + } + }, i, l, c, { + className: "function", + beginKeywords: "fun", + end: "[(]|$", + returnBegin: !0, + excludeEnd: !0, + keywords: n, + relevance: 5, + contains: [{ + begin: e.UNDERSCORE_IDENT_RE + "\\s*\\(", + returnBegin: !0, + relevance: 0, + contains: [e.UNDERSCORE_TITLE_MODE] + }, { + className: "type", + begin: //, + keywords: "reified", + relevance: 0 + }, { + className: "params", + begin: /\(/, + end: /\)/, + endsParent: !0, + keywords: n, + relevance: 0, + contains: [{ + begin: /:/, + end: /[=,\/]/, + endsWithParent: !0, + contains: [E, e.C_LINE_COMMENT_MODE, b], + relevance: 0 + }, e.C_LINE_COMMENT_MODE, b, l, c, r, e.C_NUMBER_MODE] + }, b] + }, { + className: "class", + beginKeywords: "class interface trait", + end: /[:\{(]|$/, + excludeEnd: !0, + illegal: "extends implements", + contains: [{ + beginKeywords: "public protected internal private constructor" + }, e.UNDERSCORE_TITLE_MODE, { + className: "type", + begin: //, + excludeBegin: !0, + excludeEnd: !0, + relevance: 0 + }, { + className: "type", + begin: /[,:]\s*/, + end: /[<\(,]|$/, + excludeBegin: !0, + returnEnd: !0 + }, l, c] + }, r, { + className: "meta", + begin: "^#!/usr/bin/env", + end: "$", + illegal: "\n" + }, o] + } + } +})()); +hljs.registerLanguage("less", (() => { + "use strict"; + const e = ["a", "abbr", "address", "article", "aside", "audio", "b", "blockquote", "body", "button", "canvas", "caption", "cite", "code", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "mark", "menu", "nav", "object", "ol", "p", "q", "quote", "samp", "section", "span", "strong", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "ul", "var", "video"], + t = ["any-hover", "any-pointer", "aspect-ratio", "color", "color-gamut", "color-index", "device-aspect-ratio", "device-height", "device-width", "display-mode", "forced-colors", "grid", "height", "hover", "inverted-colors", "monochrome", "orientation", "overflow-block", "overflow-inline", "pointer", "prefers-color-scheme", "prefers-contrast", "prefers-reduced-motion", "prefers-reduced-transparency", "resolution", "scan", "scripting", "update", "width", "min-width", "max-width", "min-height", "max-height"], + i = ["active", "any-link", "blank", "checked", "current", "default", "defined", "dir", "disabled", "drop", "empty", "enabled", "first", "first-child", "first-of-type", "fullscreen", "future", "focus", "focus-visible", "focus-within", "has", "host", "host-context", "hover", "indeterminate", "in-range", "invalid", "is", "lang", "last-child", "last-of-type", "left", "link", "local-link", "not", "nth-child", "nth-col", "nth-last-child", "nth-last-col", "nth-last-of-type", "nth-of-type", "only-child", "only-of-type", "optional", "out-of-range", "past", "placeholder-shown", "read-only", "read-write", "required", "right", "root", "scope", "target", "target-within", "user-invalid", "valid", "visited", "where"], + o = ["after", "backdrop", "before", "cue", "cue-region", "first-letter", "first-line", "grammar-error", "marker", "part", "placeholder", "selection", "slotted", "spelling-error"], + n = ["align-content", "align-items", "align-self", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "auto", "backface-visibility", "background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "clear", "clip", "clip-path", "color", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "content", "counter-increment", "counter-reset", "cursor", "direction", "display", "empty-cells", "filter", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "font", "font-display", "font-family", "font-feature-settings", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-smoothing", "font-stretch", "font-style", "font-variant", "font-variant-ligatures", "font-variation-settings", "font-weight", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "ime-mode", "inherit", "initial", "justify-content", "left", "letter-spacing", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "marks", "mask", "max-height", "max-width", "min-height", "min-width", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "none", "normal", "object-fit", "object-position", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "page-break-after", "page-break-before", "page-break-inside", "perspective", "perspective-origin", "pointer-events", "position", "quotes", "resize", "right", "src", "tab-size", "table-layout", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-style", "text-indent", "text-overflow", "text-rendering", "text-shadow", "text-transform", "text-underline-position", "top", "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", "white-space", "widows", "width", "word-break", "word-spacing", "word-wrap", "z-index"].reverse(), + r = i.concat(o); + return a => { + const s = (e => ({ + IMPORTANT: { + className: "meta", + begin: "!important" + }, + HEXCOLOR: { + className: "number", + begin: "#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})" + }, + ATTRIBUTE_SELECTOR_MODE: { + className: "selector-attr", + begin: /\[/, + end: /\]/, + illegal: "$", + contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + } + }))(a), + l = r, + d = "([\\w-]+|@\\{[\\w-]+\\})", + c = [], + g = [], + b = e => ({ + className: "string", + begin: "~?" + e + ".*?" + e + }), + m = (e, t, i) => ({ + className: e, + begin: t, + relevance: i + }), + u = { + $pattern: /[a-z-]+/, + keyword: "and or not only", + attribute: t.join(" ") + }, + p = { + begin: "\\(", + end: "\\)", + contains: g, + keywords: u, + relevance: 0 + }; + g.push(a.C_LINE_COMMENT_MODE, a.C_BLOCK_COMMENT_MODE, b("'"), b('"'), a.CSS_NUMBER_MODE, { + begin: "(url|data-uri)\\(", + starts: { + className: "string", + end: "[\\)\\n]", + excludeEnd: !0 + } + }, s.HEXCOLOR, p, m("variable", "@@?[\\w-]+", 10), m("variable", "@\\{[\\w-]+\\}"), m("built_in", "~?`[^`]*?`"), { + className: "attribute", + begin: "[\\w-]+\\s*:", + end: ":", + returnBegin: !0, + excludeEnd: !0 + }, s.IMPORTANT); + const f = g.concat({ + begin: /\{/, + end: /\}/, + contains: c + }), + h = { + beginKeywords: "when", + endsWithParent: !0, + contains: [{ + beginKeywords: "and not" + }].concat(g) + }, + w = { + begin: d + "\\s*:", + returnBegin: !0, + end: /[;}]/, + relevance: 0, + contains: [{ + begin: /-(webkit|moz|ms|o)-/ + }, { + className: "attribute", + begin: "\\b(" + n.join("|") + ")\\b", + end: /(?=:)/, + starts: { + endsWithParent: !0, + illegal: "[<=$]", + relevance: 0, + contains: g + } + }] + }, + v = { + className: "keyword", + begin: "@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", + starts: { + end: "[;{}]", + keywords: u, + returnEnd: !0, + contains: g, + relevance: 0 + } + }, + y = { + className: "variable", + variants: [{ + begin: "@[\\w-]+\\s*:", + relevance: 15 + }, { + begin: "@[\\w-]+" + }], + starts: { + end: "[;}]", + returnEnd: !0, + contains: f + } + }, + k = { + variants: [{ + begin: "[\\.#:&\\[>]", + end: "[;{}]" + }, { + begin: d, + end: /\{/ + }], + returnBegin: !0, + returnEnd: !0, + illegal: "[<='$\"]", + relevance: 0, + contains: [a.C_LINE_COMMENT_MODE, a.C_BLOCK_COMMENT_MODE, h, m("keyword", "all\\b"), m("variable", "@\\{[\\w-]+\\}"), { + begin: "\\b(" + e.join("|") + ")\\b", + className: "selector-tag" + }, m("selector-tag", d + "%?", 0), m("selector-id", "#" + d), m("selector-class", "\\." + d, 0), m("selector-tag", "&", 0), s.ATTRIBUTE_SELECTOR_MODE, { + className: "selector-pseudo", + begin: ":(" + i.join("|") + ")" + }, { + className: "selector-pseudo", + begin: "::(" + o.join("|") + ")" + }, { + begin: "\\(", + end: "\\)", + contains: f + }, { + begin: "!important" + }] + }, + E = { + begin: `[\\w-]+:(:)?(${l.join("|")})`, + returnBegin: !0, + contains: [k] + }; + return c.push(a.C_LINE_COMMENT_MODE, a.C_BLOCK_COMMENT_MODE, v, y, E, w, k), { + name: "Less", + case_insensitive: !0, + illegal: "[=>'/<($\"]", + contains: c + } + } +})()); +hljs.registerLanguage("lua", (() => { + "use strict"; + return e => { + const t = "\\[=*\\[", + a = "\\]=*\\]", + n = { + begin: t, + end: a, + contains: ["self"] + }, + o = [e.COMMENT("--(?!\\[=*\\[)", "$"), e.COMMENT("--\\[=*\\[", a, { + contains: [n], + relevance: 10 + })]; + return { + name: "Lua", + keywords: { + $pattern: e.UNDERSCORE_IDENT_RE, + literal: "true false nil", + keyword: "and break do else elseif end for goto if in local not or repeat return then until while", + built_in: "_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" + }, + contains: o.concat([{ + className: "function", + beginKeywords: "function", + end: "\\)", + contains: [e.inherit(e.TITLE_MODE, { + begin: "([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*" + }), { + className: "params", + begin: "\\(", + endsWithParent: !0, + contains: o + }].concat(o) + }, e.C_NUMBER_MODE, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, { + className: "string", + begin: t, + end: a, + contains: [n], + relevance: 5 + }]) + } + } +})()); +hljs.registerLanguage("makefile", (() => { + "use strict"; + return e => { + const i = { + className: "variable", + variants: [{ + begin: "\\$\\(" + e.UNDERSCORE_IDENT_RE + "\\)", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: /\$[@% { + "use strict"; + + function e(e) { + return e ? "string" == typeof e ? e : e.source : null + } + + function n(e) { + return a("(?=", e, ")") + } + + function a(...n) { + return n.map((n => e(n))).join("") + } + + function s(...n) { + return "(" + n.map((n => e(n))).join("|") + ")" + } + return e => { + const t = a(/[A-Z_]/, a("(", /[A-Z0-9_.-]*:/, ")?"), /[A-Z0-9_.-]*/), + i = { + className: "symbol", + begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/ + }, + r = { + begin: /\s/, + contains: [{ + className: "meta-keyword", + begin: /#?[a-z_][a-z1-9_-]+/, + illegal: /\n/ + }] + }, + c = e.inherit(r, { + begin: /\(/, + end: /\)/ + }), + l = e.inherit(e.APOS_STRING_MODE, { + className: "meta-string" + }), + g = e.inherit(e.QUOTE_STRING_MODE, { + className: "meta-string" + }), + m = { + endsWithParent: !0, + illegal: /`]+/ + }] + }] + }] + }; + return { + name: "HTML, XML", + aliases: ["html", "xhtml", "rss", "atom", "xjb", "xsd", "xsl", "plist", "wsf", "svg"], + case_insensitive: !0, + contains: [{ + className: "meta", + begin: //, + relevance: 10, + contains: [r, g, l, c, { + begin: /\[/, + end: /\]/, + contains: [{ + className: "meta", + begin: //, + contains: [r, c, g, l] + }] + }] + }, e.COMMENT(//, { + relevance: 10 + }), { + begin: //, + relevance: 10 + }, i, { + className: "meta", + begin: /<\?xml/, + end: /\?>/, + relevance: 10 + }, { + className: "tag", + begin: /)/, + end: />/, + keywords: { + name: "style" + }, + contains: [m], + starts: { + end: /<\/style>/, + returnEnd: !0, + subLanguage: ["css", "xml"] + } + }, { + className: "tag", + begin: /)/, + end: />/, + keywords: { + name: "script" + }, + contains: [m], + starts: { + end: /<\/script>/, + returnEnd: !0, + subLanguage: ["javascript", "handlebars", "xml"] + } + }, { + className: "tag", + begin: /<>|<\/>/ + }, { + className: "tag", + begin: a(//, />/, /\s/)))), + end: /\/?>/, + contains: [{ + className: "name", + begin: t, + relevance: 0, + starts: m + }] + }, { + className: "tag", + begin: a(/<\//, n(a(t, />/))), + contains: [{ + className: "name", + begin: t, + relevance: 0 + }, { + begin: />/, + relevance: 0, + endsParent: !0 + }] + }] + } + } +})()); +hljs.registerLanguage("markdown", (() => { + "use strict"; + + function n(...n) { + return n.map((n => { + return (e = n) ? "string" == typeof e ? e : e.source : null; + var e + })).join("") + } + return e => { + const a = { + begin: /<\/?[A-Za-z_]/, + end: ">", + subLanguage: "xml", + relevance: 0 + }, + i = { + variants: [{ + begin: /\[.+?\]\[.*?\]/, + relevance: 0 + }, { + begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, + relevance: 2 + }, { + begin: n(/\[.+?\]\(/, /[A-Za-z][A-Za-z0-9+.-]*/, /:\/\/.*?\)/), + relevance: 2 + }, { + begin: /\[.+?\]\([./?&#].*?\)/, + relevance: 1 + }, { + begin: /\[.+?\]\(.*?\)/, + relevance: 0 + }], + returnBegin: !0, + contains: [{ + className: "string", + relevance: 0, + begin: "\\[", + end: "\\]", + excludeBegin: !0, + returnEnd: !0 + }, { + className: "link", + relevance: 0, + begin: "\\]\\(", + end: "\\)", + excludeBegin: !0, + excludeEnd: !0 + }, { + className: "symbol", + relevance: 0, + begin: "\\]\\[", + end: "\\]", + excludeBegin: !0, + excludeEnd: !0 + }] + }, + s = { + className: "strong", + contains: [], + variants: [{ + begin: /_{2}/, + end: /_{2}/ + }, { + begin: /\*{2}/, + end: /\*{2}/ + }] + }, + c = { + className: "emphasis", + contains: [], + variants: [{ + begin: /\*(?!\*)/, + end: /\*/ + }, { + begin: /_(?!_)/, + end: /_/, + relevance: 0 + }] + }; + s.contains.push(c), c.contains.push(s); + let t = [a, i]; + return s.contains = s.contains.concat(t), c.contains = c.contains.concat(t), + t = t.concat(s, c), { + name: "Markdown", + aliases: ["md", "mkdown", "mkd"], + contains: [{ + className: "section", + variants: [{ + begin: "^#{1,6}", + end: "$", + contains: t + }, { + begin: "(?=^.+?\\n[=-]{2,}$)", + contains: [{ + begin: "^[=-]*$" + }, { + begin: "^", + end: "\\n", + contains: t + }] + }] + }, a, { + className: "bullet", + begin: "^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", + end: "\\s+", + excludeEnd: !0 + }, s, c, { + className: "quote", + begin: "^>\\s+", + contains: t, + end: "$" + }, { + className: "code", + variants: [{ + begin: "(`{3,})[^`](.|\\n)*?\\1`*[ ]*" + }, { + begin: "(~{3,})[^~](.|\\n)*?\\1~*[ ]*" + }, { + begin: "```", + end: "```+[ ]*$" + }, { + begin: "~~~", + end: "~~~+[ ]*$" + }, { + begin: "`.+?`" + }, { + begin: "(?=^( {4}|\\t))", + contains: [{ + begin: "^( {4}|\\t)", + end: "(\\n)$" + }], + relevance: 0 + }] + }, { + begin: "^[-\\*]{3,}", + end: "$" + }, i, { + begin: /^\[[^\n]+\]:/, + returnBegin: !0, + contains: [{ + className: "symbol", + begin: /\[/, + end: /\]/, + excludeBegin: !0, + excludeEnd: !0 + }, { + className: "link", + begin: /:\s*/, + end: /$/, + excludeBegin: !0 + }] + }] + } + } +})()); +hljs.registerLanguage("nginx", (() => { + "use strict"; + return e => { + const n = { + className: "variable", + variants: [{ + begin: /\$\d+/ + }, { + begin: /\$\{/, + end: /\}/ + }, { + begin: /[$@]/ + e.UNDERSCORE_IDENT_RE + }] + }, + a = { + endsWithParent: !0, + keywords: { + $pattern: "[a-z/_]+", + literal: "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" + }, + relevance: 0, + illegal: "=>", + contains: [e.HASH_COMMENT_MODE, { + className: "string", + contains: [e.BACKSLASH_ESCAPE, n], + variants: [{ + begin: /"/, + end: /"/ + }, { + begin: /'/, + end: /'/ + }] + }, { + begin: "([a-z]+):/", + end: "\\s", + endsWithParent: !0, + excludeEnd: !0, + contains: [n] + }, { + className: "regexp", + contains: [e.BACKSLASH_ESCAPE, n], + variants: [{ + begin: "\\s\\^", + end: "\\s|\\{|;", + returnEnd: !0 + }, { + begin: "~\\*?\\s+", + end: "\\s|\\{|;", + returnEnd: !0 + }, { + begin: "\\*(\\.[a-z\\-]+)+" + }, { + begin: "([a-z\\-]+\\.)+\\*" + }] + }, { + className: "number", + begin: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b" + }, { + className: "number", + begin: "\\b\\d+[kKmMgGdshdwy]*\\b", + relevance: 0 + }, n] + }; + return { + name: "Nginx config", + aliases: ["nginxconf"], + contains: [e.HASH_COMMENT_MODE, { + begin: e.UNDERSCORE_IDENT_RE + "\\s+\\{", + returnBegin: !0, + end: /\{/, + contains: [{ + className: "section", + begin: e.UNDERSCORE_IDENT_RE + }], + relevance: 0 + }, { + begin: e.UNDERSCORE_IDENT_RE + "\\s", + end: ";|\\{", + returnBegin: !0, + contains: [{ + className: "attribute", + begin: e.UNDERSCORE_IDENT_RE, + starts: a + }], + relevance: 0 + }], + illegal: "[^\\s\\}]" + } + } +})()); +hljs.registerLanguage("objectivec", (() => { + "use strict"; + return e => { + const n = /[a-zA-Z@][a-zA-Z0-9_]*/, + _ = { + $pattern: n, + keyword: "@interface @class @protocol @implementation" + }; + return { + name: "Objective-C", + aliases: ["mm", "objc", "obj-c", "obj-c++", "objective-c++"], + keywords: { + $pattern: n, + keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN", + literal: "false true FALSE TRUE nil YES NO NULL", + built_in: "BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once" + }, + illegal: "/, + end: /$/, + illegal: "\\n" + }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE] + }, { + className: "class", + begin: "(" + _.keyword.split(" ").join("|") + ")\\b", + end: /(\{|$)/, + excludeEnd: !0, + keywords: _, + contains: [e.UNDERSCORE_TITLE_MODE] + }, { + begin: "\\." + e.UNDERSCORE_IDENT_RE, + relevance: 0 + }] + } + } +})()); +hljs.registerLanguage("perl", (() => { + "use strict"; + + function e(e) { + return e ? "string" == typeof e ? e : e.source : null + } + + function n(...n) { + return n.map((n => e(n))).join("") + } + + function t(...n) { + return "(" + n.map((n => e(n))).join("|") + ")" + } + return e => { + const r = /[dualxmsipngr]{0,12}/, + s = { + $pattern: /[\w.]+/, + keyword: "abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0" + }, + i = { + className: "subst", + begin: "[$@]\\{", + end: "\\}", + keywords: s + }, + a = { + begin: /->\{/, + end: /\}/ + }, + o = { + variants: [{ + begin: /\$\d/ + }, { + begin: n(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/, "(?![A-Za-z])(?![@$%])") + }, { + begin: /[$%@][^\s\w{]/, + relevance: 0 + }] + }, + c = [e.BACKSLASH_ESCAPE, i, o], + g = [/!/, /\//, /\|/, /\?/, /'/, /"/, /#/], + l = (e, t, s = "\\1") => { + const i = "\\1" === s ? s : n(s, t); + return n(n("(?:", e, ")"), t, /(?:\\.|[^\\\/])*?/, i, /(?:\\.|[^\\\/])*?/, s, r) + }, + d = (e, t, s) => n(n("(?:", e, ")"), t, /(?:\\.|[^\\\/])*?/, s, r), + p = [o, e.HASH_COMMENT_MODE, e.COMMENT(/^=\w/, /=cut/, { + endsWithParent: !0 + }), a, { + className: "string", + contains: c, + variants: [{ + begin: "q[qwxr]?\\s*\\(", + end: "\\)", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*\\[", + end: "\\]", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*\\{", + end: "\\}", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*\\|", + end: "\\|", + relevance: 5 + }, { + begin: "q[qwxr]?\\s*<", + end: ">", + relevance: 5 + }, { + begin: "qw\\s+q", + end: "q", + relevance: 5 + }, { + begin: "'", + end: "'", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: '"', + end: '"' + }, { + begin: "`", + end: "`", + contains: [e.BACKSLASH_ESCAPE] + }, { + begin: /\{\w+\}/, + relevance: 0 + }, { + begin: "-?\\w+\\s*=>", + relevance: 0 + }] + }, { + className: "number", + begin: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", + relevance: 0 + }, { + begin: "(\\/\\/|" + e.RE_STARTERS_RE + "|\\b(split|return|print|reverse|grep)\\b)\\s*", + keywords: "split return print reverse grep", + relevance: 0, + contains: [e.HASH_COMMENT_MODE, { + className: "regexp", + variants: [{ + begin: l("s|tr|y", t(...g)) + }, { + begin: l("s|tr|y", "\\(", "\\)") + }, { + begin: l("s|tr|y", "\\[", "\\]") + }, { + begin: l("s|tr|y", "\\{", "\\}") + }], + relevance: 2 + }, { + className: "regexp", + variants: [{ + begin: /(m|qr)\/\//, + relevance: 0 + }, { + begin: d("(?:m|qr)?", /\//, /\//) + }, { + begin: d("m|qr", t(...g), /\1/) + }, { + begin: d("m|qr", /\(/, /\)/) + }, { + begin: d("m|qr", /\[/, /\]/) + }, { + begin: d("m|qr", /\{/, /\}/) + }] + }] + }, { + className: "function", + beginKeywords: "sub", + end: "(\\s*\\(.*?\\))?[;{]", + excludeEnd: !0, + relevance: 5, + contains: [e.TITLE_MODE] + }, { + begin: "-\\w\\b", + relevance: 0 + }, { + begin: "^__DATA__$", + end: "^__END__$", + subLanguage: "mojolicious", + contains: [{ + begin: "^@@.*", + end: "$", + className: "comment" + }] + }]; + return i.contains = p, a.contains = p, { + name: "Perl", + aliases: ["pl", "pm"], + keywords: s, + contains: p + } + } +})()); +hljs.registerLanguage("php", (() => { + "use strict"; + return e => { + const r = { + className: "variable", + begin: "\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?![A-Za-z0-9])(?![$])" + }, + t = { + className: "meta", + variants: [{ + begin: /<\?php/, + relevance: 10 + }, { + begin: /<\?[=]?/ + }, { + begin: /\?>/ + }] + }, + a = { + className: "subst", + variants: [{ + begin: /\$\w+/ + }, { + begin: /\{\$/, + end: /\}/ + }] + }, + n = e.inherit(e.APOS_STRING_MODE, { + illegal: null + }), + i = e.inherit(e.QUOTE_STRING_MODE, { + illegal: null, + contains: e.QUOTE_STRING_MODE.contains.concat(a) + }), + o = e.END_SAME_AS_BEGIN({ + begin: /<<<[ \t]*(\w+)\n/, + end: /[ \t]*(\w+)\b/, + contains: e.QUOTE_STRING_MODE.contains.concat(a) + }), + l = { + className: "string", + contains: [e.BACKSLASH_ESCAPE, t], + variants: [e.inherit(n, { + begin: "b'", + end: "'" + }), e.inherit(i, { + begin: 'b"', + end: '"' + }), i, n, o] + }, + s = { + className: "number", + variants: [{ + begin: "\\b0b[01]+(?:_[01]+)*\\b" + }, { + begin: "\\b0o[0-7]+(?:_[0-7]+)*\\b" + }, { + begin: "\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b" + }, { + begin: "(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?" + }], + relevance: 0 + }, + c = { + keyword: "__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile enum eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 mixed new object or private protected public real return string switch throw trait try unset use var void while xor yield", + literal: "false null true", + built_in: "Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException UnhandledMatchError ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Stringable Throwable Traversable WeakReference WeakMap Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass" + }; + return { + aliases: ["php3", "php4", "php5", "php6", "php7", "php8"], + case_insensitive: !0, + keywords: c, + contains: [e.HASH_COMMENT_MODE, e.COMMENT("//", "$", { + contains: [t] + }), e.COMMENT("/\\*", "\\*/", { + contains: [{ + className: "doctag", + begin: "@[A-Za-z]+" + }] + }), e.COMMENT("__halt_compiler.+?;", !1, { + endsWithParent: !0, + keywords: "__halt_compiler" + }), t, { + className: "keyword", + begin: /\$this\b/ + }, r, { + begin: /(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ + }, { + className: "function", + relevance: 0, + beginKeywords: "fn function", + end: /[;{]/, + excludeEnd: !0, + illegal: "[$%\\[]", + contains: [{ + beginKeywords: "use" + }, e.UNDERSCORE_TITLE_MODE, { + begin: "=>", + endsParent: !0 + }, { + className: "params", + begin: "\\(", + end: "\\)", + excludeBegin: !0, + excludeEnd: !0, + keywords: c, + contains: ["self", r, e.C_BLOCK_COMMENT_MODE, l, s] + }] + }, { + className: "class", + variants: [{ + beginKeywords: "enum", + illegal: /[($"]/ + }, { + beginKeywords: "class interface trait", + illegal: /[:($"]/ + }], + relevance: 0, + end: /\{/, + excludeEnd: !0, + contains: [{ + beginKeywords: "extends implements" + }, e.UNDERSCORE_TITLE_MODE] + }, { + beginKeywords: "namespace", + relevance: 0, + end: ";", + illegal: /[.']/, + contains: [e.UNDERSCORE_TITLE_MODE] + }, { + beginKeywords: "use", + relevance: 0, + end: ";", + contains: [e.UNDERSCORE_TITLE_MODE] + }, l, s] + } + } +})()); +hljs.registerLanguage("php-template", (() => { + "use strict"; + return n => ({ + name: "PHP template", + subLanguage: "xml", + contains: [{ + begin: /<\?(php|=)?/, + end: /\?>/, + subLanguage: "php", + contains: [{ + begin: "/\\*", + end: "\\*/", + skip: !0 + }, { + begin: 'b"', + end: '"', + skip: !0 + }, { + begin: "b'", + end: "'", + skip: !0 + }, n.inherit(n.APOS_STRING_MODE, { + illegal: null, + className: null, + contains: null, + skip: !0 + }), n.inherit(n.QUOTE_STRING_MODE, { + illegal: null, + className: null, + contains: null, + skip: !0 + })] + }] + }) +})()); +hljs.registerLanguage("plaintext", (() => { + "use strict"; + return t => ({ + name: "Plain text", + aliases: ["text", "txt"], + disableAutodetect: !0 + }) +})()); +hljs.registerLanguage("properties", (() => { + "use strict"; + return e => { + var n = "[ \\t\\f]*", + a = n + "[:=]" + n, + t = "(" + a + "|[ \\t\\f]+)", + r = "([^\\\\\\W:= \\t\\f\\n]|\\\\.)+", + s = "([^\\\\:= \\t\\f\\n]|\\\\.)+", + i = { + end: t, + relevance: 0, + starts: { + className: "string", + end: /$/, + relevance: 0, + contains: [{ + begin: "\\\\\\\\" + }, { + begin: "\\\\\\n" + }] + } + }; + return { + name: ".properties", + case_insensitive: !0, + illegal: /\S/, + contains: [e.COMMENT("^\\s*[!#]", "$"), { + returnBegin: !0, + variants: [{ + begin: r + a, + relevance: 1 + }, { + begin: r + "[ \\t\\f]+", + relevance: 0 + }], + contains: [{ + className: "attr", + begin: r, + endsParent: !0, + relevance: 0 + }], + starts: i + }, { + begin: s + t, + returnBegin: !0, + relevance: 0, + contains: [{ + className: "meta", + begin: s, + endsParent: !0, + relevance: 0 + }], + starts: i + }, { + className: "attr", + relevance: 0, + begin: s + n + "$" + }] + } + } +})()); +hljs.registerLanguage("python", (() => { + "use strict"; + return e => { + const n = { + $pattern: /[A-Za-z]\w+|__\w+__/, + keyword: ["and", "as", "assert", "async", "await", "break", "class", "continue", "def", "del", "elif", "else", "except", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "nonlocal|10", "not", "or", "pass", "raise", "return", "try", "while", "with", "yield"], + built_in: ["__import__", "abs", "all", "any", "ascii", "bin", "bool", "breakpoint", "bytearray", "bytes", "callable", "chr", "classmethod", "compile", "complex", "delattr", "dict", "dir", "divmod", "enumerate", "eval", "exec", "filter", "float", "format", "frozenset", "getattr", "globals", "hasattr", "hash", "help", "hex", "id", "input", "int", "isinstance", "issubclass", "iter", "len", "list", "locals", "map", "max", "memoryview", "min", "next", "object", "oct", "open", "ord", "pow", "print", "property", "range", "repr", "reversed", "round", "set", "setattr", "slice", "sorted", "staticmethod", "str", "sum", "super", "tuple", "type", "vars", "zip"], + literal: ["__debug__", "Ellipsis", "False", "None", "NotImplemented", "True"], + type: ["Any", "Callable", "Coroutine", "Dict", "List", "Literal", "Generic", "Optional", "Sequence", "Set", "Tuple", "Type", "Union"] + }, + a = { + className: "meta", + begin: /^(>>>|\.\.\.) / + }, + i = { + className: "subst", + begin: /\{/, + end: /\}/, + keywords: n, + illegal: /#/ + }, + s = { + begin: /\{\{/, + relevance: 0 + }, + t = { + className: "string", + contains: [e.BACKSLASH_ESCAPE], + variants: [{ + begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/, + end: /'''/, + contains: [e.BACKSLASH_ESCAPE, a], + relevance: 10 + }, { + begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/, + end: /"""/, + contains: [e.BACKSLASH_ESCAPE, a], + relevance: 10 + }, { + begin: /([fF][rR]|[rR][fF]|[fF])'''/, + end: /'''/, + contains: [e.BACKSLASH_ESCAPE, a, s, i] + }, { + begin: /([fF][rR]|[rR][fF]|[fF])"""/, + end: /"""/, + contains: [e.BACKSLASH_ESCAPE, a, s, i] + }, { + begin: /([uU]|[rR])'/, + end: /'/, + relevance: 10 + }, { + begin: /([uU]|[rR])"/, + end: /"/, + relevance: 10 + }, { + begin: /([bB]|[bB][rR]|[rR][bB])'/, + end: /'/ + }, { + begin: /([bB]|[bB][rR]|[rR][bB])"/, + end: /"/ + }, { + begin: /([fF][rR]|[rR][fF]|[fF])'/, + end: /'/, + contains: [e.BACKSLASH_ESCAPE, s, i] + }, { + begin: /([fF][rR]|[rR][fF]|[fF])"/, + end: /"/, + contains: [e.BACKSLASH_ESCAPE, s, i] + }, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + }, + r = "[0-9](_?[0-9])*", + l = `(\\b(${r}))?\\.(${r})|\\b(${r})\\.`, + b = { + className: "number", + relevance: 0, + variants: [{ + begin: `(\\b(${r})|(${l}))[eE][+-]?(${r})[jJ]?\\b` + }, { + begin: `(${l})[jJ]?` + }, { + begin: "\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b" + }, { + begin: "\\b0[bB](_?[01])+[lL]?\\b" + }, { + begin: "\\b0[oO](_?[0-7])+[lL]?\\b" + }, { + begin: "\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b" + }, { + begin: `\\b(${r})[jJ]\\b` + }] + }, + o = { + className: "comment", + begin: (d = /# type:/, ((...e) => e.map((e => (e => e ? "string" == typeof e ? e : e.source : null)(e))).join(""))("(?=", d, ")")), + end: /$/, + keywords: n, + contains: [{ + begin: /# type:/ + }, { + begin: /#/, + end: /\b\B/, + endsWithParent: !0 + }] + }, + c = { + className: "params", + variants: [{ + className: "", + begin: /\(\s*\)/, + skip: !0 + }, { + begin: /\(/, + end: /\)/, + excludeBegin: !0, + excludeEnd: !0, + keywords: n, + contains: ["self", a, b, t, e.HASH_COMMENT_MODE] + }] + }; + var d; + return i.contains = [t, b, a], { + name: "Python", + aliases: ["py", "gyp", "ipython"], + keywords: n, + illegal: /(<\/|->|\?)|=>/, + contains: [a, b, { + begin: /\bself\b/ + }, { + beginKeywords: "if", + relevance: 0 + }, t, o, e.HASH_COMMENT_MODE, { + variants: [{ + className: "function", + beginKeywords: "def" + }, { + className: "class", + beginKeywords: "class" + }], + end: /:/, + illegal: /[${=;\n,]/, + contains: [e.UNDERSCORE_TITLE_MODE, c, { + begin: /->/, + endsWithParent: !0, + keywords: n + }] + }, { + className: "meta", + begin: /^[\t ]*@/, + end: /(?=#)|$/, + contains: [b, c, t] + }] + } + } +})()); +hljs.registerLanguage("python-repl", (() => { + "use strict"; + return s => ({ + aliases: ["pycon"], + contains: [{ + className: "meta", + starts: { + end: / |$/, + starts: { + end: "$", + subLanguage: "python" + } + }, + variants: [{ + begin: /^>>>(?=[ ]|$)/ + }, { + begin: /^\.\.\.(?=[ ]|$)/ + }] + }] + }) +})()); +hljs.registerLanguage("r", (() => { + "use strict"; + + function e(...e) { + return e.map((e => { + return (a = e) ? "string" == typeof a ? a : a.source : null; + var a + })).join("") + } + return a => { + const n = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/; + return { + name: "R", + illegal: /->/, + keywords: { + $pattern: n, + keyword: "function if in break next repeat else for while", + literal: "NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10", + built_in: "LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm" + }, + compilerExtensions: [(a, n) => { + if (!a.beforeMatch) return; + if (a.starts) throw Error("beforeMatch cannot be used with starts"); + const i = Object.assign({}, a); + Object.keys(a).forEach((e => { + delete a[e] + })), a.begin = e(i.beforeMatch, e("(?=", i.begin, ")")), a.starts = { + relevance: 0, + contains: [Object.assign(i, { + endsParent: !0 + })] + }, a.relevance = 0, delete i.beforeMatch + }], + contains: [a.COMMENT(/#'/, /$/, { + contains: [{ + className: "doctag", + begin: "@examples", + starts: { + contains: [{ + begin: /\n/ + }, { + begin: /#'\s*(?=@[a-zA-Z]+)/, + endsParent: !0 + }, { + begin: /#'/, + end: /$/, + excludeBegin: !0 + }] + } + }, { + className: "doctag", + begin: "@param", + end: /$/, + contains: [{ + className: "variable", + variants: [{ + begin: n + }, { + begin: /`(?:\\.|[^`\\])+`/ + }], + endsParent: !0 + }] + }, { + className: "doctag", + begin: /@[a-zA-Z]+/ + }, { + className: "meta-keyword", + begin: /\\[a-zA-Z]+/ + }] + }), a.HASH_COMMENT_MODE, { + className: "string", + contains: [a.BACKSLASH_ESCAPE], + variants: [a.END_SAME_AS_BEGIN({ + begin: /[rR]"(-*)\(/, + end: /\)(-*)"/ + }), a.END_SAME_AS_BEGIN({ + begin: /[rR]"(-*)\{/, + end: /\}(-*)"/ + }), a.END_SAME_AS_BEGIN({ + begin: /[rR]"(-*)\[/, + end: /\](-*)"/ + }), a.END_SAME_AS_BEGIN({ + begin: /[rR]'(-*)\(/, + end: /\)(-*)'/ + }), a.END_SAME_AS_BEGIN({ + begin: /[rR]'(-*)\{/, + end: /\}(-*)'/ + }), a.END_SAME_AS_BEGIN({ + begin: /[rR]'(-*)\[/, + end: /\](-*)'/ + }), { + begin: '"', + end: '"', + relevance: 0 + }, { + begin: "'", + end: "'", + relevance: 0 + }] + }, { + className: "number", + relevance: 0, + beforeMatch: /([^a-zA-Z0-9._])/, + variants: [{ + match: /0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/ + }, { + match: /0[xX][0-9a-fA-F]+([pP][+-]?\d+)?[Li]?/ + }, { + match: /(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?[Li]?/ + }] + }, { + begin: "%", + end: "%" + }, { + begin: e(/[a-zA-Z][a-zA-Z_0-9]*/, "\\s+<-\\s+") + }, { + begin: "`", + end: "`", + contains: [{ + begin: /\\./ + }] + }] + } + } +})()); +hljs.registerLanguage("ruby", (() => { + "use strict"; + + function e(...e) { + return e.map((e => { + return (n = e) ? "string" == typeof n ? n : n.source : null; + var n + })).join("") + } + return n => { + const a = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)", + i = { + keyword: "and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__", + built_in: "proc lambda", + literal: "true false nil" + }, + s = { + className: "doctag", + begin: "@[A-Za-z]+" + }, + r = { + begin: "#<", + end: ">" + }, + b = [n.COMMENT("#", "$", { + contains: [s] + }), n.COMMENT("^=begin", "^=end", { + contains: [s], + relevance: 10 + }), n.COMMENT("^__END__", "\\n$")], + c = { + className: "subst", + begin: /#\{/, + end: /\}/, + keywords: i + }, + t = { + className: "string", + contains: [n.BACKSLASH_ESCAPE, c], + variants: [{ + begin: /'/, + end: /'/ + }, { + begin: /"/, + end: /"/ + }, { + begin: /`/, + end: /`/ + }, { + begin: /%[qQwWx]?\(/, + end: /\)/ + }, { + begin: /%[qQwWx]?\[/, + end: /\]/ + }, { + begin: /%[qQwWx]?\{/, + end: /\}/ + }, { + begin: /%[qQwWx]?/ + }, { + begin: /%[qQwWx]?\//, + end: /\// + }, { + begin: /%[qQwWx]?%/, + end: /%/ + }, { + begin: /%[qQwWx]?-/, + end: /-/ + }, { + begin: /%[qQwWx]?\|/, + end: /\|/ + }, { + begin: /\B\?(\\\d{1,3})/ + }, { + begin: /\B\?(\\x[A-Fa-f0-9]{1,2})/ + }, { + begin: /\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/ + }, { + begin: /\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/ + }, { + begin: /\B\?\\(c|C-)[\x20-\x7e]/ + }, { + begin: /\B\?\\?\S/ + }, { + begin: /<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/, + returnBegin: !0, + contains: [{ + begin: /<<[-~]?'?/ + }, n.END_SAME_AS_BEGIN({ + begin: /(\w+)/, + end: /(\w+)/, + contains: [n.BACKSLASH_ESCAPE, c] + })] + }] + }, + g = "[0-9](_?[0-9])*", + d = { + className: "number", + relevance: 0, + variants: [{ + begin: `\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b` + }, { + begin: "\\b0[dD][0-9](_?[0-9])*r?i?\\b" + }, { + begin: "\\b0[bB][0-1](_?[0-1])*r?i?\\b" + }, { + begin: "\\b0[oO][0-7](_?[0-7])*r?i?\\b" + }, { + begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b" + }, { + begin: "\\b0(_?[0-7])+r?i?\\b" + }] + }, + l = { + className: "params", + begin: "\\(", + end: "\\)", + endsParent: !0, + keywords: i + }, + o = [t, { + className: "class", + beginKeywords: "class module", + end: "$|;", + illegal: /=/, + contains: [n.inherit(n.TITLE_MODE, { + begin: "[A-Za-z_]\\w*(::\\w+)*(\\?|!)?" + }), { + begin: "<\\s*", + contains: [{ + begin: "(" + n.IDENT_RE + "::)?" + n.IDENT_RE, + relevance: 0 + }] + }].concat(b) + }, { + className: "function", + begin: e(/def\s+/, (_ = a + "\\s*(\\(|;|$)", e("(?=", _, ")"))), + relevance: 0, + keywords: "def", + end: "$|;", + contains: [n.inherit(n.TITLE_MODE, { + begin: a + }), l].concat(b) + }, { + begin: n.IDENT_RE + "::" + }, { + className: "symbol", + begin: n.UNDERSCORE_IDENT_RE + "(!|\\?)?:", + relevance: 0 + }, { + className: "symbol", + begin: ":(?!\\s)", + contains: [t, { + begin: a + }], + relevance: 0 + }, d, { + className: "variable", + begin: "(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])" + }, { + className: "params", + begin: /\|/, + end: /\|/, + relevance: 0, + keywords: i + }, { + begin: "(" + n.RE_STARTERS_RE + "|unless)\\s*", + keywords: "unless", + contains: [{ + className: "regexp", + contains: [n.BACKSLASH_ESCAPE, c], + illegal: /\n/, + variants: [{ + begin: "/", + end: "/[a-z]*" + }, { + begin: /%r\{/, + end: /\}[a-z]*/ + }, { + begin: "%r\\(", + end: "\\)[a-z]*" + }, { + begin: "%r!", + end: "![a-z]*" + }, { + begin: "%r\\[", + end: "\\][a-z]*" + }] + }].concat(r, b), + relevance: 0 + }].concat(r, b); + var _; + c.contains = o, l.contains = o; + const E = [{ + begin: /^\s*=>/, + starts: { + end: "$", + contains: o + } + }, { + className: "meta", + begin: "^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", + starts: { + end: "$", + contains: o + } + }]; + return b.unshift(r), { + name: "Ruby", + aliases: ["rb", "gemspec", "podspec", "thor", "irb"], + keywords: i, + illegal: /\/\*/, + contains: [n.SHEBANG({ + binary: "ruby" + })].concat(E).concat(b).concat(o) + } + } +})()); +hljs.registerLanguage("rust", (() => { + "use strict"; + return e => { + const n = "([ui](8|16|32|64|128|size)|f(32|64))?", + t = "drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!"; + return { + name: "Rust", + aliases: ["rs"], + keywords: { + $pattern: e.IDENT_RE + "!?", + keyword: "abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield", + literal: "true false Some None Ok Err", + built_in: t + }, + illegal: "" + }] + } + } +})()); +hljs.registerLanguage("scss", (() => { + "use strict"; + const e = ["a", "abbr", "address", "article", "aside", "audio", "b", "blockquote", "body", "button", "canvas", "caption", "cite", "code", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "mark", "menu", "nav", "object", "ol", "p", "q", "quote", "samp", "section", "span", "strong", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "ul", "var", "video"], + t = ["any-hover", "any-pointer", "aspect-ratio", "color", "color-gamut", "color-index", "device-aspect-ratio", "device-height", "device-width", "display-mode", "forced-colors", "grid", "height", "hover", "inverted-colors", "monochrome", "orientation", "overflow-block", "overflow-inline", "pointer", "prefers-color-scheme", "prefers-contrast", "prefers-reduced-motion", "prefers-reduced-transparency", "resolution", "scan", "scripting", "update", "width", "min-width", "max-width", "min-height", "max-height"], + i = ["active", "any-link", "blank", "checked", "current", "default", "defined", "dir", "disabled", "drop", "empty", "enabled", "first", "first-child", "first-of-type", "fullscreen", "future", "focus", "focus-visible", "focus-within", "has", "host", "host-context", "hover", "indeterminate", "in-range", "invalid", "is", "lang", "last-child", "last-of-type", "left", "link", "local-link", "not", "nth-child", "nth-col", "nth-last-child", "nth-last-col", "nth-last-of-type", "nth-of-type", "only-child", "only-of-type", "optional", "out-of-range", "past", "placeholder-shown", "read-only", "read-write", "required", "right", "root", "scope", "target", "target-within", "user-invalid", "valid", "visited", "where"], + o = ["after", "backdrop", "before", "cue", "cue-region", "first-letter", "first-line", "grammar-error", "marker", "part", "placeholder", "selection", "slotted", "spelling-error"], + r = ["align-content", "align-items", "align-self", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "auto", "backface-visibility", "background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "clear", "clip", "clip-path", "color", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "content", "counter-increment", "counter-reset", "cursor", "direction", "display", "empty-cells", "filter", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "font", "font-display", "font-family", "font-feature-settings", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-smoothing", "font-stretch", "font-style", "font-variant", "font-variant-ligatures", "font-variation-settings", "font-weight", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "ime-mode", "inherit", "initial", "justify-content", "left", "letter-spacing", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "marks", "mask", "max-height", "max-width", "min-height", "min-width", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "none", "normal", "object-fit", "object-position", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "page-break-after", "page-break-before", "page-break-inside", "perspective", "perspective-origin", "pointer-events", "position", "quotes", "resize", "right", "src", "tab-size", "table-layout", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-style", "text-indent", "text-overflow", "text-rendering", "text-shadow", "text-transform", "text-underline-position", "top", "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", "white-space", "widows", "width", "word-break", "word-spacing", "word-wrap", "z-index"].reverse(); + return a => { + const n = (e => ({ + IMPORTANT: { + className: "meta", + begin: "!important" + }, + HEXCOLOR: { + className: "number", + begin: "#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})" + }, + ATTRIBUTE_SELECTOR_MODE: { + className: "selector-attr", + begin: /\[/, + end: /\]/, + illegal: "$", + contains: [e.APOS_STRING_MODE, e.QUOTE_STRING_MODE] + } + }))(a), + l = o, + s = i, + d = "@[a-z-]+", + c = { + className: "variable", + begin: "(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b" + }; + return { + name: "SCSS", + case_insensitive: !0, + illegal: "[=/|']", + contains: [a.C_LINE_COMMENT_MODE, a.C_BLOCK_COMMENT_MODE, { + className: "selector-id", + begin: "#[A-Za-z0-9_-]+", + relevance: 0 + }, { + className: "selector-class", + begin: "\\.[A-Za-z0-9_-]+", + relevance: 0 + }, n.ATTRIBUTE_SELECTOR_MODE, { + className: "selector-tag", + begin: "\\b(" + e.join("|") + ")\\b", + relevance: 0 + }, { + className: "selector-pseudo", + begin: ":(" + s.join("|") + ")" + }, { + className: "selector-pseudo", + begin: "::(" + l.join("|") + ")" + }, c, { + begin: /\(/, + end: /\)/, + contains: [a.CSS_NUMBER_MODE] + }, { + className: "attribute", + begin: "\\b(" + r.join("|") + ")\\b" + }, { + begin: "\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" + }, { + begin: ":", + end: ";", + contains: [c, n.HEXCOLOR, a.CSS_NUMBER_MODE, a.QUOTE_STRING_MODE, a.APOS_STRING_MODE, n.IMPORTANT] + }, { + begin: "@(page|font-face)", + lexemes: d, + keywords: "@page @font-face" + }, { + begin: "@", + end: "[{;]", + returnBegin: !0, + keywords: { + $pattern: /[a-z-]+/, + keyword: "and or not only", + attribute: t.join(" ") + }, + contains: [{ + begin: d, + className: "keyword" + }, { + begin: /[a-z-]+(?=:)/, + className: "attribute" + }, c, a.QUOTE_STRING_MODE, a.APOS_STRING_MODE, n.HEXCOLOR, a.CSS_NUMBER_MODE] + }] + } + } +})()); +hljs.registerLanguage("shell", (() => { + "use strict"; + return s => ({ + name: "Shell Session", + aliases: ["console"], + contains: [{ + className: "meta", + begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/, + starts: { + end: /[^\\](?=\s*$)/, + subLanguage: "bash" + } + }] + }) +})()); +hljs.registerLanguage("sql", (() => { + "use strict"; + + function e(e) { + return e ? "string" == typeof e ? e : e.source : null + } + + function r(...r) { + return r.map((r => e(r))).join("") + } + + function t(...r) { + return "(" + r.map((r => e(r))).join("|") + ")" + } + return e => { + const n = e.COMMENT("--", "$"), + a = ["true", "false", "unknown"], + i = ["bigint", "binary", "blob", "boolean", "char", "character", "clob", "date", "dec", "decfloat", "decimal", "float", "int", "integer", "interval", "nchar", "nclob", "national", "numeric", "real", "row", "smallint", "time", "timestamp", "varchar", "varying", "varbinary"], + s = ["abs", "acos", "array_agg", "asin", "atan", "avg", "cast", "ceil", "ceiling", "coalesce", "corr", "cos", "cosh", "count", "covar_pop", "covar_samp", "cume_dist", "dense_rank", "deref", "element", "exp", "extract", "first_value", "floor", "json_array", "json_arrayagg", "json_exists", "json_object", "json_objectagg", "json_query", "json_table", "json_table_primitive", "json_value", "lag", "last_value", "lead", "listagg", "ln", "log", "log10", "lower", "max", "min", "mod", "nth_value", "ntile", "nullif", "percent_rank", "percentile_cont", "percentile_disc", "position", "position_regex", "power", "rank", "regr_avgx", "regr_avgy", "regr_count", "regr_intercept", "regr_r2", "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "row_number", "sin", "sinh", "sqrt", "stddev_pop", "stddev_samp", "substring", "substring_regex", "sum", "tan", "tanh", "translate", "translate_regex", "treat", "trim", "trim_array", "unnest", "upper", "value_of", "var_pop", "var_samp", "width_bucket"], + o = ["create table", "insert into", "primary key", "foreign key", "not null", "alter table", "add constraint", "grouping sets", "on overflow", "character set", "respect nulls", "ignore nulls", "nulls first", "nulls last", "depth first", "breadth first"], + c = s, + l = ["abs", "acos", "all", "allocate", "alter", "and", "any", "are", "array", "array_agg", "array_max_cardinality", "as", "asensitive", "asin", "asymmetric", "at", "atan", "atomic", "authorization", "avg", "begin", "begin_frame", "begin_partition", "between", "bigint", "binary", "blob", "boolean", "both", "by", "call", "called", "cardinality", "cascaded", "case", "cast", "ceil", "ceiling", "char", "char_length", "character", "character_length", "check", "classifier", "clob", "close", "coalesce", "collate", "collect", "column", "commit", "condition", "connect", "constraint", "contains", "convert", "copy", "corr", "corresponding", "cos", "cosh", "count", "covar_pop", "covar_samp", "create", "cross", "cube", "cume_dist", "current", "current_catalog", "current_date", "current_default_transform_group", "current_path", "current_role", "current_row", "current_schema", "current_time", "current_timestamp", "current_path", "current_role", "current_transform_group_for_type", "current_user", "cursor", "cycle", "date", "day", "deallocate", "dec", "decimal", "decfloat", "declare", "default", "define", "delete", "dense_rank", "deref", "describe", "deterministic", "disconnect", "distinct", "double", "drop", "dynamic", "each", "element", "else", "empty", "end", "end_frame", "end_partition", "end-exec", "equals", "escape", "every", "except", "exec", "execute", "exists", "exp", "external", "extract", "false", "fetch", "filter", "first_value", "float", "floor", "for", "foreign", "frame_row", "free", "from", "full", "function", "fusion", "get", "global", "grant", "group", "grouping", "groups", "having", "hold", "hour", "identity", "in", "indicator", "initial", "inner", "inout", "insensitive", "insert", "int", "integer", "intersect", "intersection", "interval", "into", "is", "join", "json_array", "json_arrayagg", "json_exists", "json_object", "json_objectagg", "json_query", "json_table", "json_table_primitive", "json_value", "lag", "language", "large", "last_value", "lateral", "lead", "leading", "left", "like", "like_regex", "listagg", "ln", "local", "localtime", "localtimestamp", "log", "log10", "lower", "match", "match_number", "match_recognize", "matches", "max", "member", "merge", "method", "min", "minute", "mod", "modifies", "module", "month", "multiset", "national", "natural", "nchar", "nclob", "new", "no", "none", "normalize", "not", "nth_value", "ntile", "null", "nullif", "numeric", "octet_length", "occurrences_regex", "of", "offset", "old", "omit", "on", "one", "only", "open", "or", "order", "out", "outer", "over", "overlaps", "overlay", "parameter", "partition", "pattern", "per", "percent", "percent_rank", "percentile_cont", "percentile_disc", "period", "portion", "position", "position_regex", "power", "precedes", "precision", "prepare", "primary", "procedure", "ptf", "range", "rank", "reads", "real", "recursive", "ref", "references", "referencing", "regr_avgx", "regr_avgy", "regr_count", "regr_intercept", "regr_r2", "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "release", "result", "return", "returns", "revoke", "right", "rollback", "rollup", "row", "row_number", "rows", "running", "savepoint", "scope", "scroll", "search", "second", "seek", "select", "sensitive", "session_user", "set", "show", "similar", "sin", "sinh", "skip", "smallint", "some", "specific", "specifictype", "sql", "sqlexception", "sqlstate", "sqlwarning", "sqrt", "start", "static", "stddev_pop", "stddev_samp", "submultiset", "subset", "substring", "substring_regex", "succeeds", "sum", "symmetric", "system", "system_time", "system_user", "table", "tablesample", "tan", "tanh", "then", "time", "timestamp", "timezone_hour", "timezone_minute", "to", "trailing", "translate", "translate_regex", "translation", "treat", "trigger", "trim", "trim_array", "true", "truncate", "uescape", "union", "unique", "unknown", "unnest", "update ", "upper", "user", "using", "value", "values", "value_of", "var_pop", "var_samp", "varbinary", "varchar", "varying", "versioning", "when", "whenever", "where", "width_bucket", "window", "with", "within", "without", "year", "add", "asc", "collation", "desc", "final", "first", "last", "view"].filter((e => !s.includes(e))), + u = { + begin: r(/\b/, t(...c), /\s*\(/), + keywords: { + built_in: c + } + }; + return { + name: "SQL", + case_insensitive: !0, + illegal: /[{}]|<\//, + keywords: { + $pattern: /\b[\w\.]+/, + keyword: ((e, { + exceptions: r, + when: t + } = {}) => { + const n = t; + return r = r || [], e.map((e => e.match(/\|\d+$/) || r.includes(e) ? e : n(e) ? e + "|0" : e)) + })(l, { + when: e => e.length < 3 + }), + literal: a, + type: i, + built_in: ["current_catalog", "current_date", "current_default_transform_group", "current_path", "current_role", "current_schema", "current_transform_group_for_type", "current_user", "session_user", "system_time", "system_user", "current_time", "localtime", "current_timestamp", "localtimestamp"] + }, + contains: [{ + begin: t(...o), + keywords: { + $pattern: /[\w\.]+/, + keyword: l.concat(o), + literal: a, + type: i + } + }, { + className: "type", + begin: t("double precision", "large object", "with timezone", "without timezone") + }, u, { + className: "variable", + begin: /@[a-z0-9]+/ + }, { + className: "string", + variants: [{ + begin: /'/, + end: /'/, + contains: [{ + begin: /''/ + }] + }] + }, { + begin: /"/, + end: /"/, + contains: [{ + begin: /""/ + }] + }, e.C_NUMBER_MODE, e.C_BLOCK_COMMENT_MODE, n, { + className: "operator", + begin: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, + relevance: 0 + }] + } + } +})()); +hljs.registerLanguage("swift", (() => { + "use strict"; + + function e(e) { + return e ? "string" == typeof e ? e : e.source : null + } + + function n(e) { + return a("(?=", e, ")") + } + + function a(...n) { + return n.map((n => e(n))).join("") + } + + function t(...n) { + return "(" + n.map((n => e(n))).join("|") + ")" + } + const i = e => a(/\b/, e, /\w$/.test(e) ? /\b/ : /\B/), + s = ["Protocol", "Type"].map(i), + u = ["init", "self"].map(i), + c = ["Any", "Self"], + r = ["associatedtype", "async", "await", /as\?/, /as!/, "as", "break", "case", "catch", "class", "continue", "convenience", "default", "defer", "deinit", "didSet", "do", "dynamic", "else", "enum", "extension", "fallthrough", /fileprivate\(set\)/, "fileprivate", "final", "for", "func", "get", "guard", "if", "import", "indirect", "infix", /init\?/, /init!/, "inout", /internal\(set\)/, "internal", "in", "is", "lazy", "let", "mutating", "nonmutating", /open\(set\)/, "open", "operator", "optional", "override", "postfix", "precedencegroup", "prefix", /private\(set\)/, "private", "protocol", /public\(set\)/, "public", "repeat", "required", "rethrows", "return", "set", "some", "static", "struct", "subscript", "super", "switch", "throws", "throw", /try\?/, /try!/, "try", "typealias", /unowned\(safe\)/, /unowned\(unsafe\)/, "unowned", "var", "weak", "where", "while", "willSet"], + o = ["false", "nil", "true"], + l = ["assignment", "associativity", "higherThan", "left", "lowerThan", "none", "right"], + m = ["#colorLiteral", "#column", "#dsohandle", "#else", "#elseif", "#endif", "#error", "#file", "#fileID", "#fileLiteral", "#filePath", "#function", "#if", "#imageLiteral", "#keyPath", "#line", "#selector", "#sourceLocation", "#warn_unqualified_access", "#warning"], + d = ["abs", "all", "any", "assert", "assertionFailure", "debugPrint", "dump", "fatalError", "getVaList", "isKnownUniquelyReferenced", "max", "min", "numericCast", "pointwiseMax", "pointwiseMin", "precondition", "preconditionFailure", "print", "readLine", "repeatElement", "sequence", "stride", "swap", "swift_unboxFromSwiftValueWithType", "transcode", "type", "unsafeBitCast", "unsafeDowncast", "withExtendedLifetime", "withUnsafeMutablePointer", "withUnsafePointer", "withVaList", "withoutActuallyEscaping", "zip"], + p = t(/[/=\-+!*%<>&|^~?]/, /[\u00A1-\u00A7]/, /[\u00A9\u00AB]/, /[\u00AC\u00AE]/, /[\u00B0\u00B1]/, /[\u00B6\u00BB\u00BF\u00D7\u00F7]/, /[\u2016-\u2017]/, /[\u2020-\u2027]/, /[\u2030-\u203E]/, /[\u2041-\u2053]/, /[\u2055-\u205E]/, /[\u2190-\u23FF]/, /[\u2500-\u2775]/, /[\u2794-\u2BFF]/, /[\u2E00-\u2E7F]/, /[\u3001-\u3003]/, /[\u3008-\u3020]/, /[\u3030]/), + F = t(p, /[\u0300-\u036F]/, /[\u1DC0-\u1DFF]/, /[\u20D0-\u20FF]/, /[\uFE00-\uFE0F]/, /[\uFE20-\uFE2F]/), + b = a(p, F, "*"), + h = t(/[a-zA-Z_]/, /[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/, /[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/, /[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/, /[\u1E00-\u1FFF]/, /[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/, /[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/, /[\u2C00-\u2DFF\u2E80-\u2FFF]/, /[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/, /[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/, /[\uFE47-\uFEFE\uFF00-\uFFFD]/), + f = t(h, /\d/, /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/), + w = a(h, f, "*"), + y = a(/[A-Z]/, f, "*"), + g = ["autoclosure", a(/convention\(/, t("swift", "block", "c"), /\)/), "discardableResult", "dynamicCallable", "dynamicMemberLookup", "escaping", "frozen", "GKInspectable", "IBAction", "IBDesignable", "IBInspectable", "IBOutlet", "IBSegueAction", "inlinable", "main", "nonobjc", "NSApplicationMain", "NSCopying", "NSManaged", a(/objc\(/, w, /\)/), "objc", "objcMembers", "propertyWrapper", "requires_stored_property_inits", "testable", "UIApplicationMain", "unknown", "usableFromInline"], + E = ["iOS", "iOSApplicationExtension", "macOS", "macOSApplicationExtension", "macCatalyst", "macCatalystApplicationExtension", "watchOS", "watchOSApplicationExtension", "tvOS", "tvOSApplicationExtension", "swift"]; + return e => { + const p = { + match: /\s+/, + relevance: 0 + }, + h = e.COMMENT("/\\*", "\\*/", { + contains: ["self"] + }), + v = [e.C_LINE_COMMENT_MODE, h], + N = { + className: "keyword", + begin: a(/\./, n(t(...s, ...u))), + end: t(...s, ...u), + excludeBegin: !0 + }, + A = { + match: a(/\./, t(...r)), + relevance: 0 + }, + C = r.filter((e => "string" == typeof e)).concat(["_|0"]), + _ = { + variants: [{ + className: "keyword", + match: t(...r.filter((e => "string" != typeof e)).concat(c).map(i), ...u) + }] + }, + D = { + $pattern: t(/\b\w+/, /#\w+/), + keyword: C.concat(m), + literal: o + }, + B = [N, A, _], + k = [{ + match: a(/\./, t(...d)), + relevance: 0 + }, { + className: "built_in", + match: a(/\b/, t(...d), /(?=\()/) + }], + M = { + match: /->/, + relevance: 0 + }, + S = [M, { + className: "operator", + relevance: 0, + variants: [{ + match: b + }, { + match: `\\.(\\.|${F})+` + }] + }], + x = "([0-9a-fA-F]_*)+", + I = { + className: "number", + relevance: 0, + variants: [{ + match: "\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b" + }, { + match: `\\b0x(${x})(\\.(${x}))?([pP][+-]?(([0-9]_*)+))?\\b` + }, { + match: /\b0o([0-7]_*)+\b/ + }, { + match: /\b0b([01]_*)+\b/ + }] + }, + O = (e = "") => ({ + className: "subst", + variants: [{ + match: a(/\\/, e, /[0\\tnr"']/) + }, { + match: a(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) + }] + }), + T = (e = "") => ({ + className: "subst", + match: a(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/) + }), + L = (e = "") => ({ + className: "subst", + label: "interpol", + begin: a(/\\/, e, /\(/), + end: /\)/ + }), + P = (e = "") => ({ + begin: a(e, /"""/), + end: a(/"""/, e), + contains: [O(e), T(e), L(e)] + }), + $ = (e = "") => ({ + begin: a(e, /"/), + end: a(/"/, e), + contains: [O(e), L(e)] + }), + K = { + className: "string", + variants: [P(), P("#"), P("##"), P("###"), $(), $("#"), $("##"), $("###")] + }, + j = { + match: a(/`/, w, /`/) + }, + z = [j, { + className: "variable", + match: /\$\d+/ + }, { + className: "variable", + match: `\\$${f}+` + }], + q = [{ + match: /(@|#)available/, + className: "keyword", + starts: { + contains: [{ + begin: /\(/, + end: /\)/, + keywords: E, + contains: [...S, I, K] + }] + } + }, { + className: "keyword", + match: a(/@/, t(...g)) + }, { + className: "meta", + match: a(/@/, w) + }], + U = { + match: n(/\b[A-Z]/), + relevance: 0, + contains: [{ + className: "type", + match: a(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/, f, "+") + }, { + className: "type", + match: y, + relevance: 0 + }, { + match: /[?!]+/, + relevance: 0 + }, { + match: /\.\.\./, + relevance: 0 + }, { + match: a(/\s+&\s+/, n(y)), + relevance: 0 + }] + }, + Z = { + begin: //, + keywords: D, + contains: [...v, ...B, ...q, M, U] + }; + U.contains.push(Z); + const G = { + begin: /\(/, + end: /\)/, + relevance: 0, + keywords: D, + contains: ["self", { + match: a(w, /\s*:/), + keywords: "_|0", + relevance: 0 + }, ...v, ...B, ...k, ...S, I, K, ...z, ...q, U] + }, + H = { + beginKeywords: "func", + contains: [{ + className: "title", + match: t(j.match, w, b), + endsParent: !0, + relevance: 0 + }, p] + }, + R = { + begin: //, + contains: [...v, U] + }, + V = { + begin: /\(/, + end: /\)/, + keywords: D, + contains: [{ + begin: t(n(a(w, /\s*:/)), n(a(w, /\s+/, w, /\s*:/))), + end: /:/, + relevance: 0, + contains: [{ + className: "keyword", + match: /\b_\b/ + }, { + className: "params", + match: w + }] + }, ...v, ...B, ...S, I, K, ...q, U, G], + endsParent: !0, + illegal: /["']/ + }, + W = { + className: "function", + match: n(/\bfunc\b/), + contains: [H, R, V, p], + illegal: [/\[/, /%/] + }, + X = { + className: "function", + match: /\b(subscript|init[?!]?)\s*(?=[<(])/, + keywords: { + keyword: "subscript init init? init!", + $pattern: /\w+[?!]?/ + }, + contains: [R, V, p], + illegal: /\[|%/ + }, + J = { + beginKeywords: "operator", + end: e.MATCH_NOTHING_RE, + contains: [{ + className: "title", + match: b, + endsParent: !0, + relevance: 0 + }] + }, + Q = { + beginKeywords: "precedencegroup", + end: e.MATCH_NOTHING_RE, + contains: [{ + className: "title", + match: y, + relevance: 0 + }, { + begin: /{/, + end: /}/, + relevance: 0, + endsParent: !0, + keywords: [...l, ...o], + contains: [U] + }] + }; + for (const e of K.variants) { + const n = e.contains.find((e => "interpol" === e.label)); + n.keywords = D; + const a = [...B, ...k, ...S, I, K, ...z]; + n.contains = [...a, { + begin: /\(/, + end: /\)/, + contains: ["self", ...a] + }] + } + return { + name: "Swift", + keywords: D, + contains: [...v, W, X, { + className: "class", + beginKeywords: "struct protocol class extension enum", + end: "\\{", + excludeEnd: !0, + keywords: D, + contains: [e.inherit(e.TITLE_MODE, { + begin: /[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/ + }), ...B] + }, J, Q, { + beginKeywords: "import", + end: /$/, + contains: [...v], + relevance: 0 + }, ...B, ...k, ...S, I, K, ...z, ...q, U, G] + } + } +})()); +hljs.registerLanguage("typescript", (() => { + "use strict"; + const e = "[A-Za-z$_][0-9A-Za-z$_]*", + n = ["as", "in", "of", "if", "for", "while", "finally", "var", "new", "function", "do", "return", "void", "else", "break", "catch", "instanceof", "with", "throw", "case", "default", "try", "switch", "continue", "typeof", "delete", "let", "yield", "const", "class", "debugger", "async", "await", "static", "import", "from", "export", "extends"], + a = ["true", "false", "null", "undefined", "NaN", "Infinity"], + s = [].concat(["setInterval", "setTimeout", "clearInterval", "clearTimeout", "require", "exports", "eval", "isFinite", "isNaN", "parseFloat", "parseInt", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "escape", "unescape"], ["arguments", "this", "super", "console", "window", "document", "localStorage", "module", "global"], ["Intl", "DataView", "Number", "Math", "Date", "String", "RegExp", "Object", "Function", "Boolean", "Error", "Symbol", "Set", "Map", "WeakSet", "WeakMap", "Proxy", "Reflect", "JSON", "Promise", "Float64Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Float32Array", "Array", "Uint8Array", "Uint8ClampedArray", "ArrayBuffer", "BigInt64Array", "BigUint64Array", "BigInt"], ["EvalError", "InternalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError"]); + + function t(e) { + return r("(?=", e, ")") + } + + function r(...e) { + return e.map((e => { + return (n = e) ? "string" == typeof n ? n : n.source : null; + var n + })).join("") + } + return i => { + const c = { + $pattern: e, + keyword: n.concat(["type", "namespace", "typedef", "interface", "public", "private", "protected", "implements", "declare", "abstract", "readonly"]), + literal: a, + built_in: s.concat(["any", "void", "number", "boolean", "string", "object", "never", "enum"]) + }, + o = { + className: "meta", + begin: "@[A-Za-z$_][0-9A-Za-z$_]*" + }, + l = (e, n, a) => { + const s = e.contains.findIndex((e => e.label === n)); + if (-1 === s) throw Error("can not find mode to replace"); + e.contains.splice(s, 1, a) + }, + b = (i => { + const c = e, + o = { + begin: /<[A-Za-z0-9\\._:-]+/, + end: /\/[A-Za-z0-9\\._:-]+>|\/>/, + isTrulyOpeningTag: (e, n) => { + const a = e[0].length + e.index, + s = e.input[a]; + "<" !== s ? ">" === s && (((e, { + after: n + }) => { + const a = "", + returnBegin: !0, + end: "\\s*=>", + contains: [{ + className: "params", + variants: [{ + begin: i.UNDERSCORE_IDENT_RE, + relevance: 0 + }, { + className: null, + begin: /\(\s*\)/, + skip: !0 + }, { + begin: /\(/, + end: /\)/, + excludeBegin: !0, + excludeEnd: !0, + keywords: l, + contains: f + }] + }] + }, { + begin: /,/, + relevance: 0 + }, { + className: "", + begin: /\s/, + end: /\s*/, + skip: !0 + }, { + variants: [{ + begin: "<>", + end: "" + }, { + begin: o.begin, + "on:begin": o.isTrulyOpeningTag, + end: o.end + }], + subLanguage: "xml", + contains: [{ + begin: o.begin, + end: o.end, + skip: !0, + contains: ["self"] + }] + }], + relevance: 0 + }, { + className: "function", + beginKeywords: "function", + end: /[{;]/, + excludeEnd: !0, + keywords: l, + contains: ["self", i.inherit(i.TITLE_MODE, { + begin: c + }), A], + illegal: /%/ + }, { + beginKeywords: "while if switch catch for" + }, { + className: "function", + begin: i.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", + returnBegin: !0, + contains: [A, i.inherit(i.TITLE_MODE, { + begin: c + })] + }, { + variants: [{ + begin: "\\." + c + }, { + begin: "\\$" + c + }], + relevance: 0 + }, { + className: "class", + beginKeywords: "class", + end: /[{;=]/, + excludeEnd: !0, + illegal: /[:"[\]]/, + contains: [{ + beginKeywords: "extends" + }, i.UNDERSCORE_TITLE_MODE] + }, { + begin: /\b(?=constructor)/, + end: /[{;]/, + excludeEnd: !0, + contains: [i.inherit(i.TITLE_MODE, { + begin: c + }), "self", A] + }, { + begin: "(get|set)\\s+(?=" + c + "\\()", + end: /\{/, + keywords: "get set", + contains: [i.inherit(i.TITLE_MODE, { + begin: c + }), { + begin: /\(\)/ + }, A] + }, { + begin: /\$[(.]/ + }] + } + })(i); + return Object.assign(b.keywords, c), b.exports.PARAMS_CONTAINS.push(o), b.contains = b.contains.concat([o, { + beginKeywords: "namespace", + end: /\{/, + excludeEnd: !0 + }, { + beginKeywords: "interface", + end: /\{/, + excludeEnd: !0, + keywords: "interface extends" + }]), l(b, "shebang", i.SHEBANG()), l(b, "use_strict", { + className: "meta", + relevance: 10, + begin: /^\s*['"]use strict['"]/ + }), b.contains.find((e => "function" === e.className)).relevance = 0, Object.assign(b, { + name: "TypeScript", + aliases: ["ts", "tsx"] + }), b + } +})()); +hljs.registerLanguage("vbnet", (() => { + "use strict"; + + function e(e) { + return e ? "string" == typeof e ? e : e.source : null + } + + function n(...n) { + return n.map((n => e(n))).join("") + } + + function t(...n) { + return "(" + n.map((n => e(n))).join("|") + ")" + } + return e => { + const a = /\d{1,2}\/\d{1,2}\/\d{4}/, + i = /\d{4}-\d{1,2}-\d{1,2}/, + s = /(\d|1[012])(:\d+){0,2} *(AM|PM)/, + r = /\d{1,2}(:\d{1,2}){1,2}/, + o = { + className: "literal", + variants: [{ + begin: n(/# */, t(i, a), / *#/) + }, { + begin: n(/# */, r, / *#/) + }, { + begin: n(/# */, s, / *#/) + }, { + begin: n(/# */, t(i, a), / +/, t(s, r), / *#/) + }] + }, + l = e.COMMENT(/'''/, /$/, { + contains: [{ + className: "doctag", + begin: /<\/?/, + end: />/ + }] + }), + c = e.COMMENT(null, /$/, { + variants: [{ + begin: /'/ + }, { + begin: /([\t ]|^)REM(?=\s)/ + }] + }); + return { + name: "Visual Basic .NET", + aliases: ["vb"], + case_insensitive: !0, + classNameAliases: { + label: "symbol" + }, + keywords: { + keyword: "addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield", + built_in: "addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort", + type: "boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort", + literal: "true false nothing" + }, + illegal: "//|\\{|\\}|endif|gosub|variant|wend|^\\$ ", + contains: [{ + className: "string", + begin: /"(""|[^/n])"C\b/ + }, { + className: "string", + begin: /"/, + end: /"/, + illegal: /\n/, + contains: [{ + begin: /""/ + }] + }, o, { + className: "number", + relevance: 0, + variants: [{ + begin: /\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/ + }, { + begin: /\b\d[\d_]*((U?[SIL])|[%&])?/ + }, { + begin: /&H[\dA-F_]+((U?[SIL])|[%&])?/ + }, { + begin: /&O[0-7_]+((U?[SIL])|[%&])?/ + }, { + begin: /&B[01_]+((U?[SIL])|[%&])?/ + }] + }, { + className: "label", + begin: /^\w+:/ + }, l, c, { + className: "meta", + begin: /[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/, + end: /$/, + keywords: { + "meta-keyword": "const disable else elseif enable end externalsource if region then" + }, + contains: [c] + }] + } + } +})()); +hljs.registerLanguage("yaml", (() => { + "use strict"; + return e => { + var n = "true false yes no null", + a = "[\\w#;/?:@&=+$,.~*'()[\\]]+", + s = { + className: "string", + relevance: 0, + variants: [{ + begin: /'/, + end: /'/ + }, { + begin: /"/, + end: /"/ + }, { + begin: /\S+/ + }], + contains: [e.BACKSLASH_ESCAPE, { + className: "template-variable", + variants: [{ + begin: /\{\{/, + end: /\}\}/ + }, { + begin: /%\{/, + end: /\}/ + }] + }] + }, + i = e.inherit(s, { + variants: [{ + begin: /'/, + end: /'/ + }, { + begin: /"/, + end: /"/ + }, { + begin: /[^\s,{}[\]]+/ + }] + }), + l = { + end: ",", + endsWithParent: !0, + excludeEnd: !0, + keywords: n, + relevance: 0 + }, + t = { + begin: /\{/, + end: /\}/, + contains: [l], + illegal: "\\n", + relevance: 0 + }, + g = { + begin: "\\[", + end: "\\]", + contains: [l], + illegal: "\\n", + relevance: 0 + }, + b = [{ + className: "attr", + variants: [{ + begin: "\\w[\\w :\\/.-]*:(?=[ \t]|$)" + }, { + begin: '"\\w[\\w :\\/.-]*":(?=[ \t]|$)' + }, { + begin: "'\\w[\\w :\\/.-]*':(?=[ \t]|$)" + }] + }, { + className: "meta", + begin: "^---\\s*$", + relevance: 10 + }, { + className: "string", + begin: "[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*" + }, { + begin: "<%[%=-]?", + end: "[%-]?%>", + subLanguage: "ruby", + excludeBegin: !0, + excludeEnd: !0, + relevance: 0 + }, { + className: "type", + begin: "!\\w+!" + a + }, { + className: "type", + begin: "!<" + a + ">" + }, { + className: "type", + begin: "!" + a + }, { + className: "type", + begin: "!!" + a + }, { + className: "meta", + begin: "&" + e.UNDERSCORE_IDENT_RE + "$" + }, { + className: "meta", + begin: "\\*" + e.UNDERSCORE_IDENT_RE + "$" + }, { + className: "bullet", + begin: "-(?=[ ]|$)", + relevance: 0 + }, e.HASH_COMMENT_MODE, { + beginKeywords: n, + keywords: { + literal: n + } + }, { + className: "number", + begin: "\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" + }, { + className: "number", + begin: e.C_NUMBER_RE + "\\b", + relevance: 0 + }, t, g, s], + r = [...b]; + return r.pop(), r.push(i), l.contains = r, { + name: "YAML", + case_insensitive: !0, + aliases: ["yml"], + contains: b + } + } })()); -hljs.registerLanguage("shell",(()=>{"use strict";return s=>({ -name:"Shell Session",aliases:["console"],contains:[{className:"meta", -begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,starts:{end:/[^\\](?=\s*$)/, -subLanguage:"bash"}}]})})()); -hljs.registerLanguage("sql",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function r(...r){ -return r.map((r=>e(r))).join("")}function t(...r){ -return"("+r.map((r=>e(r))).join("|")+")"}return e=>{ -const n=e.COMMENT("--","$"),a=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],s=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],c=s,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!s.includes(e))),u={ -begin:r(/\b/,t(...c),/\s*\(/),keywords:{built_in:c}};return{name:"SQL", -case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/, -keyword:((e,{exceptions:r,when:t}={})=>{const n=t -;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) -})(l,{when:e=>e.length<3}),literal:a,type:i, -built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] -},contains:[{begin:t(...o),keywords:{$pattern:/[\w\.]+/,keyword:l.concat(o), -literal:a,type:i}},{className:"type", -begin:t("double precision","large object","with timezone","without timezone") -},u,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ -begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ -begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator", -begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})()); -hljs.registerLanguage("swift",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} -function a(...n){return n.map((n=>e(n))).join("")}function t(...n){ -return"("+n.map((n=>e(n))).join("|")+")"} -const i=e=>a(/\b/,e,/\w$/.test(e)?/\b/:/\B/),s=["Protocol","Type"].map(i),u=["init","self"].map(i),c=["Any","Self"],r=["associatedtype",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],o=["false","nil","true"],l=["assignment","associativity","higherThan","left","lowerThan","none","right"],m=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],d=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=t(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),F=t(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=a(p,F,"*"),h=t(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),f=t(h,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),w=a(h,f,"*"),y=a(/[A-Z]/,f,"*"),g=["autoclosure",a(/convention\(/,t("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",a(/objc\(/,w,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","testable","UIApplicationMain","unknown","usableFromInline"],E=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"] -;return e=>{const p={match:/\s+/,relevance:0},h=e.COMMENT("/\\*","\\*/",{ -contains:["self"]}),v=[e.C_LINE_COMMENT_MODE,h],N={className:"keyword", -begin:a(/\./,n(t(...s,...u))),end:t(...s,...u),excludeBegin:!0},A={ -match:a(/\./,t(...r)),relevance:0 -},C=r.filter((e=>"string"==typeof e)).concat(["_|0"]),_={variants:[{ -className:"keyword", -match:t(...r.filter((e=>"string"!=typeof e)).concat(c).map(i),...u)}]},D={ -$pattern:t(/\b\w+/,/#\w+/),keyword:C.concat(m),literal:o},B=[N,A,_],k=[{ -match:a(/\./,t(...d)),relevance:0},{className:"built_in", -match:a(/\b/,t(...d),/(?=\()/)}],M={match:/->/,relevance:0},S=[M,{ -className:"operator",relevance:0,variants:[{match:b},{match:`\\.(\\.|${F})+`}] -}],x="([0-9a-fA-F]_*)+",I={className:"number",relevance:0,variants:[{ -match:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{ -match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(([0-9]_*)+))?\\b`},{ -match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(e="")=>({ -className:"subst",variants:[{match:a(/\\/,e,/[0\\tnr"']/)},{ -match:a(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),T=(e="")=>({className:"subst", -match:a(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),L=(e="")=>({className:"subst", -label:"interpol",begin:a(/\\/,e,/\(/),end:/\)/}),P=(e="")=>({begin:a(e,/"""/), -end:a(/"""/,e),contains:[O(e),T(e),L(e)]}),$=(e="")=>({begin:a(e,/"/), -end:a(/"/,e),contains:[O(e),L(e)]}),K={className:"string", -variants:[P(),P("#"),P("##"),P("###"),$(),$("#"),$("##"),$("###")]},j={ -match:a(/`/,w,/`/)},z=[j,{className:"variable",match:/\$\d+/},{ -className:"variable",match:`\\$${f}+`}],q=[{match:/(@|#)available/, -className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:E, -contains:[...S,I,K]}]}},{className:"keyword",match:a(/@/,t(...g))},{ -className:"meta",match:a(/@/,w)}],U={match:n(/\b[A-Z]/),relevance:0,contains:[{ -className:"type", -match:a(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,f,"+") -},{className:"type",match:y,relevance:0},{match:/[?!]+/,relevance:0},{ -match:/\.\.\./,relevance:0},{match:a(/\s+&\s+/,n(y)),relevance:0}]},Z={ -begin://,keywords:D,contains:[...v,...B,...q,M,U]};U.contains.push(Z) -;const G={begin:/\(/,end:/\)/,relevance:0,keywords:D,contains:["self",{ -match:a(w,/\s*:/),keywords:"_|0",relevance:0 -},...v,...B,...k,...S,I,K,...z,...q,U]},H={beginKeywords:"func",contains:[{ -className:"title",match:t(j.match,w,b),endsParent:!0,relevance:0},p]},R={ -begin://,contains:[...v,U]},V={begin:/\(/,end:/\)/,keywords:D, -contains:[{begin:t(n(a(w,/\s*:/)),n(a(w,/\s+/,w,/\s*:/))),end:/:/,relevance:0, -contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:w}] -},...v,...B,...S,I,K,...q,U,G],endsParent:!0,illegal:/["']/},W={ -className:"function",match:n(/\bfunc\b/),contains:[H,R,V,p],illegal:[/\[/,/%/] -},X={className:"function",match:/\b(subscript|init[?!]?)\s*(?=[<(])/,keywords:{ -keyword:"subscript init init? init!",$pattern:/\w+[?!]?/},contains:[R,V,p], -illegal:/\[|%/},J={beginKeywords:"operator",end:e.MATCH_NOTHING_RE,contains:[{ -className:"title",match:b,endsParent:!0,relevance:0}]},Q={ -beginKeywords:"precedencegroup",end:e.MATCH_NOTHING_RE,contains:[{ -className:"title",match:y,relevance:0},{begin:/{/,end:/}/,relevance:0, -endsParent:!0,keywords:[...l,...o],contains:[U]}]};for(const e of K.variants){ -const n=e.contains.find((e=>"interpol"===e.label));n.keywords=D -;const a=[...B,...k,...S,I,K,...z];n.contains=[...a,{begin:/\(/,end:/\)/, -contains:["self",...a]}]}return{name:"Swift",keywords:D,contains:[...v,W,X,{ -className:"class",beginKeywords:"struct protocol class extension enum", -end:"\\{",excludeEnd:!0,keywords:D,contains:[e.inherit(e.TITLE_MODE,{ -begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...B]},J,Q,{ -beginKeywords:"import",end:/$/,contains:[...v],relevance:0 -},...B,...k,...S,I,K,...z,...q,U,G]}}})()); -hljs.registerLanguage("typescript",(()=>{"use strict" -;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;function t(e){return r("(?=",e,")")}function r(...e){return e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return i=>{ -const c={$pattern:e, -keyword:n.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]), -literal:a, -built_in:s.concat(["any","void","number","boolean","string","object","never","enum"]) -},o={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},l=(e,n,a)=>{ -const s=e.contains.findIndex((e=>e.label===n)) -;if(-1===s)throw Error("can not find mode to replace");e.contains.splice(s,1,a) -},b=(i=>{const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/, -end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ -const a=e[0].length+e.index,s=e.input[a];"<"!==s?">"===s&&(((e,{after:n})=>{ -const a="", -returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ -begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 -},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:f}]}] -},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ -variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, -end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, -contains:["self"]}]}],relevance:0},{className:"function", -beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, -contains:["self",i.inherit(i.TITLE_MODE,{begin:c}),A],illegal:/%/},{ -beginKeywords:"while if switch catch for"},{className:"function", -begin:i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", -returnBegin:!0,contains:[A,i.inherit(i.TITLE_MODE,{begin:c})]},{variants:[{ -begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", -beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ -beginKeywords:"extends"},i.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, -end:/[{;]/,excludeEnd:!0,contains:[i.inherit(i.TITLE_MODE,{begin:c}),"self",A] -},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", -contains:[i.inherit(i.TITLE_MODE,{begin:c}),{begin:/\(\)/},A]},{begin:/\$[(.]/}] -}})(i) -;return Object.assign(b.keywords,c),b.exports.PARAMS_CONTAINS.push(o),b.contains=b.contains.concat([o,{ -beginKeywords:"namespace",end:/\{/,excludeEnd:!0},{beginKeywords:"interface", -end:/\{/,excludeEnd:!0,keywords:"interface extends" -}]),l(b,"shebang",i.SHEBANG()),l(b,"use_strict",{className:"meta",relevance:10, -begin:/^\s*['"]use strict['"]/ -}),b.contains.find((e=>"function"===e.className)).relevance=0,Object.assign(b,{ -name:"TypeScript",aliases:["ts"]}),b}})()); -hljs.registerLanguage("vbnet",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(...n){ -return n.map((n=>e(n))).join("")}function t(...n){ -return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ -const a=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,r=/\d{1,2}(:\d{1,2}){1,2}/,o={ -className:"literal",variants:[{begin:n(/# */,t(i,a),/ *#/)},{ -begin:n(/# */,r,/ *#/)},{begin:n(/# */,s,/ *#/)},{ -begin:n(/# */,t(i,a),/ +/,t(s,r),/ *#/)}]},l=e.COMMENT(/'''/,/$/,{contains:[{ -className:"doctag",begin:/<\/?/,end:/>/}]}),c=e.COMMENT(null,/$/,{variants:[{ -begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET", -aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{ -keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield", -built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort", -type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort", -literal:"true false nothing"}, -illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[{ -className:"string",begin:/"(""|[^/n])"C\b/},{className:"string",begin:/"/, -end:/"/,illegal:/\n/,contains:[{begin:/""/}]},o,{className:"number",relevance:0, -variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/ -},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{ -begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},{ -className:"label",begin:/^\w+:/},l,c,{className:"meta", -begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/, -end:/$/,keywords:{ -"meta-keyword":"const disable else elseif enable end externalsource if region then" -},contains:[c]}]}}})()); -hljs.registerLanguage("yaml",(()=>{"use strict";return e=>{ -var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={ -className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ -},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", -variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(s,{ -variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={ -end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},t={begin:/\{/, -end:/\}/,contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]", -contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{ -begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{ -begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$", -relevance:10},{className:"string", -begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ -begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, -relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type", -begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a -},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", -begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", -relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ -className:"number", -begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" -},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},t,g,s],r=[...b] -;return r.pop(),r.push(i),l.contains=r,{name:"YAML",case_insensitive:!0, -aliases:["yml","YAML"],contains:b}}})()); \ No newline at end of file diff --git a/assets/js/main.js b/assets/js/main.js index 39f8af2b..ab1a5a25 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,49 +1,295 @@ -// Flyout Menu Functions -var toggles = { - ".search-toggle": "#search-input", - ".lang-toggle": "#lang-menu", - ".share-toggle": "#share-menu", - ".nav-toggle": "#site-nav-menu" -}; +var initPhotoSwipeFromDOM = function(gallerySelector) { + var images = document.querySelectorAll('.content-body .gallery a'); + for (i = 0; i < images.length; i++) { + const img = new Image(); + img.src = images[i].getAttribute('href'); + images[i].setAttribute("data-size", img.width+'x'+img.height); + } + // parse slide data (url, title, size ...) from DOM elements + // (children of gallerySelector) + var parseThumbnailElements = function(el) { + var thumbElements = el.querySelectorAll('.gallery'), + numNodes = thumbElements.length, + items = [], + figureEl, + linkEl, + size, + item; + + for(var i = 0; i < numNodes; i++) { + + figureEl = thumbElements[i]; //
element + // include only element nodes + if(figureEl.nodeType !== 1) { + continue; + } + + linkEl = figureEl.children[0]; // element + + size = linkEl.getAttribute('data-size').split('x'); + + // create slide object + item = { + src: linkEl.getAttribute('href'), + w: parseInt(size[0], 10), + h: parseInt(size[1], 10) + }; + + + + if(figureEl.children.length > 1) { + //
content + item.title = figureEl.children[1].innerHTML; + } + + if(linkEl.children.length > 0) { + // thumbnail element, retrieving thumbnail url + item.msrc = linkEl.children[0].getAttribute('src'); + } + + item.el = figureEl; // save link to element for getThumbBoundsFn + items.push(item); + } + + return items; + }; + + // find nearest parent element + var closest = function closest(el, fn) { + return el && ( fn(el) ? el : closest(el.parentNode, fn) ); + }; + + // triggers when user clicks on thumbnail + var onThumbnailsClick = function(e) { + e = e || window.event; + + var eTarget = e.target || e.srcElement; + + // find root element of slide + var clickedListItem = closest(eTarget, function(el) { + return (el.tagName && el.tagName.toUpperCase() === 'FIGURE'); + }); + + if(!clickedListItem) { + return; + } + + // find index of clicked item by looping through all child nodes + // alternatively, you may define index via data- attribute + var clickedGallery = clickedListItem.parentNode, + childNodes = clickedListItem.parentNode.querySelectorAll('figure'), + numChildNodes = childNodes.length, + nodeIndex = 0, + index; + + for (var i = 0; i < numChildNodes; i++) { + if(childNodes[i].nodeType !== 1) { + continue; + } + + if(childNodes[i] === clickedListItem) { + index = nodeIndex; + break; + } + nodeIndex++; + } + + + + if(index >= 0) { + // open PhotoSwipe if valid index found + openPhotoSwipe( index, clickedGallery ); + } + return false; + }; + + // parse picture index and gallery index from URL (#&pid=1&gid=2) + var photoswipeParseHash = function() { + var hash = window.location.hash.substring(1), + params = {}; + + if(hash.length < 5) { + return params; + } + + var vars = hash.split('&'); + for (var i = 0; i < vars.length; i++) { + if(!vars[i]) { + continue; + } + var pair = vars[i].split('='); + if(pair.length < 2) { + continue; + } + params[pair[0]] = pair[1]; + } + + if(params.gid) { + params.gid = parseInt(params.gid, 10); + } + + return params; + }; -$.each(toggles, function(toggle, menu) { - $(toggle).on("click", function() { - if ($(menu).hasClass("active")) { - $(".menu").removeClass("active"); - $("#wrapper").removeClass("overlay"); + var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) { + var pswpElement = document.querySelectorAll('.pswp')[0], + gallery, + options, + items; + + items = parseThumbnailElements(galleryElement); + + // define options (if needed) + options = { + + // define gallery index (for URL) + galleryUID: galleryElement.getAttribute('data-pswp-uid'), + + getThumbBoundsFn: function(index) { + // See Options -> getThumbBoundsFn section of documentation for more info + var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail + pageYScroll = window.pageYOffset || document.documentElement.scrollTop, + rect = thumbnail.getBoundingClientRect(); + + return {x:rect.left, y:rect.top + pageYScroll, w:rect.width}; + } + }; + + // PhotoSwipe opened from URL + if(fromURL) { + if(options.galleryPIDs) { + // parse real index when custom PIDs are used + // http://photoswipe.com/documentation/faq.html#custom-pid-in-url + for(var j = 0; j < items.length; j++) { + if(items[j].pid == index) { + options.index = j; + break; + } + } + } else { + // in URL indexes start from 1 + options.index = parseInt(index, 10) - 1; + } } else { - $("#wrapper").addClass("overlay"); - $(".menu").not($(menu + ".menu")).removeClass("active"); - $(menu).addClass("active"); - if (menu == "#search-input") {$("#search-results").toggleClass("active");} + options.index = parseInt(index, 10); } - }); -}); -// Click anywhere outside a flyout to close -$(document).on("click", function(e) { - if ($(e.target).is(".lang-toggle, .lang-toggle span, #lang-menu, .share-toggle, .share-toggle i, #share-menu, .search-toggle, .search-toggle i, #search-input, #search-results .mini-post, .nav-toggle, .nav-toggle i, #site-nav") === false) { - $(".menu").removeClass("active"); - $("#wrapper").removeClass('overlay'); + // exit if index not found + if( isNaN(options.index) ) { + return; + } + + if(disableAnimation) { + options.showAnimationDuration = 0; + } + + // Pass data to PhotoSwipe and initialize it + gallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options); + gallery.init(); + }; + + // loop through all gallery elements and bind events + var galleryElements = document.querySelectorAll( gallerySelector ); + + for(var i = 0, l = galleryElements.length; i < l; i++) { + galleryElements[i].setAttribute('data-pswp-uid', i+1); + galleryElements[i].onclick = onThumbnailsClick; + } + + // Parse URL and open gallery if it contains #&pid=3&gid=1 + var hashData = photoswipeParseHash(); + if(hashData.pid && hashData.gid) { + openPhotoSwipe( hashData.pid , galleryElements[ hashData.gid - 1 ], true, true ); + } +}; + +// execute above function +initPhotoSwipeFromDOM('.content-body'); + +const menus = [ + { button: "search-button", menu: "search" }, + { button: "lang-button", menu: "lang-menu" }, + { button: "share-button", menu: "share-menu"}, + { button: "nav-button", menu: "site-nav"} +]; + +function closeMenus(openMenu) { + for (const {button, menu} of menus) { + if (menu != openMenu) { + document.getElementById(menu).classList.remove('active'); + } + } +} + +for (const {button, menu} of menus) { + var buttons = document.getElementsByClassName(button); + for (let i = 0; i < buttons.length; i++) { + buttons[i].onclick = function() { + var toggles = document.querySelectorAll('.toggle:not(.nav-button)'); + var menuClasses = document.getElementById(menu).classList; + var wrapperClasses = document.getElementById("wrapper").classList; + if (menuClasses.contains('active')) { + menuClasses.remove('active'); + wrapperClasses.remove('overlay'); + for (let t = 0; t < toggles.length; t++) { + toggles[t].classList.remove('active'); + toggles[t].classList.remove('inactive'); + } + } else { + menuClasses.add('active'); + wrapperClasses.add('overlay'); + for (let t = 0; t < toggles.length; t++) { + if (toggles[t].classList.contains(button)) { + toggles[t].classList.remove('inactive'); + toggles[t].classList.add('active'); + } else { + toggles[t].classList.remove('active'); + toggles[t].classList.add('inactive'); + } + } + if (menu == "search") { + document.getElementById("search-input").focus(); + } + } + closeMenus(menu); + }; + } +} + + +document.onclick = function(e){ + var path = e.composedPath().includes(document.getElementById('site-header')); + if (!path) { + document.getElementById("wrapper").classList.remove('overlay'); + closeMenus(); + } +}; + +document.addEventListener("keydown", (e) => { + var wrapper = document.getElementById("wrapper").classList; + if (e.key === "Escape" && wrapper.contains("overlay")) { + wrapper.remove('overlay'); + closeMenus(); } }); -// Check to see if the window is top if not then display button -$(window).scroll(function() { - if ($(this).scrollTop()) { - $('#back-to-top').fadeIn(); +var backToTop = document.getElementById("back-to-top"); + +window.onscroll = function () { + if (window.scrollY == 0) { + backToTop.classList.remove('active'); } else { - $('#back-to-top').fadeOut(); + backToTop.classList.add('active'); } -}); +}; -// Click event to scroll to top -$('#back-to-top').click(function() { - $('html, body').animate({scrollTop: 0}, 1000); - return false; -}); +backToTop.onclick = function(){ + window.scroll({ + top: 0, + behavior: 'smooth' + }); +}; -// Search var idx = null; // Lunr index var resultDetails = []; // Will hold the data for the search results (titles and summaries) var $searchResults; // The element on the page holding search results @@ -76,7 +322,10 @@ window.onload = function () { idx = lunr(function () { this.ref('ref'); this.field('title'); - this.field('data'); + this.field('timestamp'); + this.field('author'); + this.field('readtime'); + this.field('date'); this.field('description'); this.field('body'); @@ -86,18 +335,21 @@ window.onload = function () { this.add(doc); resultDetails[doc.ref] = { 'title': doc.title, + 'timestamp': doc.timestamp, + 'author': doc.author, + 'readtime': doc.readtime, 'date': doc.date, 'description': doc.description, }; }, this); }); } else { - $searchResults.innerHTML = ''; + $searchResults.innerHTML = '

Error loading search results...

'; } }; request.onerror = function() { - $searchResults.innerHTML = '

Error loading search results...

'; + $searchResults.innerHTML = '

Error loading search results...

'; }; // Send the request to load the JSON @@ -119,7 +371,7 @@ function registerSearchHandler() { if ($searchInput.value == '') { $searchResults.innerHTML = ''; } - } + }; } function renderSearchResults(results) { @@ -128,7 +380,7 @@ function renderSearchResults(results) { if (results.length > 0) { results.forEach(function(result) { // Create result item - container.innerHTML += ''; + container.innerHTML += ''; }); // Remove any existing content so results aren't continually added as the user types @@ -138,7 +390,7 @@ function renderSearchResults(results) { ); } } else { - $searchResults.innerHTML = '

No Results Found...

'; + $searchResults.innerHTML = '

Results Not Found...

'; } // Render the list diff --git a/assets/js/photoswipe-ui-default.js b/assets/js/photoswipe-ui-default.js new file mode 100644 index 00000000..f3733e1b --- /dev/null +++ b/assets/js/photoswipe-ui-default.js @@ -0,0 +1,861 @@ +/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08 +* http://photoswipe.com +* Copyright (c) 2019 Dmitry Semenov; */ +/** +* +* UI on top of main sliding area (caption, arrows, close button, etc.). +* Built just using public methods/properties of PhotoSwipe. +* +*/ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define(factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.PhotoSwipeUI_Default = factory(); + } +})(this, function () { + + 'use strict'; + + + +var PhotoSwipeUI_Default = + function(pswp, framework) { + + var ui = this; + var _overlayUIUpdated = false, + _controlsVisible = true, + _fullscrenAPI, + _controls, + _captionContainer, + _fakeCaptionContainer, + _indexIndicator, + _shareButton, + _shareModal, + _shareModalHidden = true, + _initalCloseOnScrollValue, + _isIdle, + _listen, + + _loadingIndicator, + _loadingIndicatorHidden, + _loadingIndicatorTimeout, + + _galleryHasOneSlide, + + _options, + _defaultUIOptions = { + barsSize: {top:44, bottom:'auto'}, + closeElClasses: ['item', 'caption', 'zoom-wrap', 'ui', 'top-bar'], + timeToIdle: 4000, + timeToIdleOutside: 1000, + loadingIndicatorDelay: 1000, // 2s + + addCaptionHTMLFn: function(item, captionEl /*, isFake */) { + if(!item.title) { + captionEl.children[0].innerHTML = ''; + return false; + } + captionEl.children[0].innerHTML = item.title; + return true; + }, + + closeEl:true, + captionEl: true, + fullscreenEl: true, + zoomEl: true, + shareEl: true, + counterEl: true, + arrowEl: true, + preloaderEl: true, + + tapToClose: false, + tapToToggleControls: true, + + clickToCloseNonZoomable: true, + + shareButtons: [ + {id:'facebook', label:'Share on Facebook', url:'https://www.facebook.com/sharer/sharer.php?u={{url}}'}, + {id:'twitter', label:'Tweet', url:'https://twitter.com/intent/tweet?text={{text}}&url={{url}}'}, + {id:'pinterest', label:'Pin it', url:'http://www.pinterest.com/pin/create/button/'+ + '?url={{url}}&media={{image_url}}&description={{text}}'}, + {id:'download', label:'Download image', url:'{{raw_image_url}}', download:true} + ], + getImageURLForShare: function( /* shareButtonData */ ) { + return pswp.currItem.src || ''; + }, + getPageURLForShare: function( /* shareButtonData */ ) { + return window.location.href; + }, + getTextForShare: function( /* shareButtonData */ ) { + return pswp.currItem.title || ''; + }, + + indexIndicatorSep: ' / ', + fitControlsWidth: 1200 + + }, + _blockControlsTap, + _blockControlsTapTimeout; + + + + var _onControlsTap = function(e) { + if(_blockControlsTap) { + return true; + } + + + e = e || window.event; + + if(_options.timeToIdle && _options.mouseUsed && !_isIdle) { + // reset idle timer + _onIdleMouseMove(); + } + + + var target = e.target || e.srcElement, + uiElement, + clickedClass = target.getAttribute('class') || '', + found; + + for(var i = 0; i < _uiElements.length; i++) { + uiElement = _uiElements[i]; + if(uiElement.onTap && clickedClass.indexOf('pswp__' + uiElement.name ) > -1 ) { + uiElement.onTap(); + found = true; + + } + } + + if(found) { + if(e.stopPropagation) { + e.stopPropagation(); + } + _blockControlsTap = true; + + // Some versions of Android don't prevent ghost click event + // when preventDefault() was called on touchstart and/or touchend. + // + // This happens on v4.3, 4.2, 4.1, + // older versions strangely work correctly, + // but just in case we add delay on all of them) + var tapDelay = framework.features.isOldAndroid ? 600 : 30; + _blockControlsTapTimeout = setTimeout(function() { + _blockControlsTap = false; + }, tapDelay); + } + + }, + _fitControlsInViewport = function() { + return !pswp.likelyTouchDevice || _options.mouseUsed || screen.width > _options.fitControlsWidth; + }, + _togglePswpClass = function(el, cName, add) { + framework[ (add ? 'add' : 'remove') + 'Class' ](el, 'pswp__' + cName); + }, + + // add class when there is just one item in the gallery + // (by default it hides left/right arrows and 1ofX counter) + _countNumItems = function() { + var hasOneSlide = (_options.getNumItemsFn() === 1); + + if(hasOneSlide !== _galleryHasOneSlide) { + _togglePswpClass(_controls, 'ui--one-slide', hasOneSlide); + _galleryHasOneSlide = hasOneSlide; + } + }, + _toggleShareModalClass = function() { + _togglePswpClass(_shareModal, 'share-modal--hidden', _shareModalHidden); + }, + _toggleShareModal = function() { + + _shareModalHidden = !_shareModalHidden; + + + if(!_shareModalHidden) { + _toggleShareModalClass(); + setTimeout(function() { + if(!_shareModalHidden) { + framework.addClass(_shareModal, 'pswp__share-modal--fade-in'); + } + }, 30); + } else { + framework.removeClass(_shareModal, 'pswp__share-modal--fade-in'); + setTimeout(function() { + if(_shareModalHidden) { + _toggleShareModalClass(); + } + }, 300); + } + + if(!_shareModalHidden) { + _updateShareURLs(); + } + return false; + }, + + _openWindowPopup = function(e) { + e = e || window.event; + var target = e.target || e.srcElement; + + pswp.shout('shareLinkClick', e, target); + + if(!target.href) { + return false; + } + + if( target.hasAttribute('download') ) { + return true; + } + + window.open(target.href, 'pswp_share', 'scrollbars=yes,resizable=yes,toolbar=no,'+ + 'location=yes,width=550,height=420,top=100,left=' + + (window.screen ? Math.round(screen.width / 2 - 275) : 100) ); + + if(!_shareModalHidden) { + _toggleShareModal(); + } + + return false; + }, + _updateShareURLs = function() { + var shareButtonOut = '', + shareButtonData, + shareURL, + image_url, + page_url, + share_text; + + for(var i = 0; i < _options.shareButtons.length; i++) { + shareButtonData = _options.shareButtons[i]; + + image_url = _options.getImageURLForShare(shareButtonData); + page_url = _options.getPageURLForShare(shareButtonData); + share_text = _options.getTextForShare(shareButtonData); + + shareURL = shareButtonData.url.replace('{{url}}', encodeURIComponent(page_url) ) + .replace('{{image_url}}', encodeURIComponent(image_url) ) + .replace('{{raw_image_url}}', image_url ) + .replace('{{text}}', encodeURIComponent(share_text) ); + + shareButtonOut += '' + + shareButtonData.label + ''; + + if(_options.parseShareButtonOut) { + shareButtonOut = _options.parseShareButtonOut(shareButtonData, shareButtonOut); + } + } + _shareModal.children[0].innerHTML = shareButtonOut; + _shareModal.children[0].onclick = _openWindowPopup; + + }, + _hasCloseClass = function(target) { + for(var i = 0; i < _options.closeElClasses.length; i++) { + if( framework.hasClass(target, 'pswp__' + _options.closeElClasses[i]) ) { + return true; + } + } + }, + _idleInterval, + _idleTimer, + _idleIncrement = 0, + _onIdleMouseMove = function() { + clearTimeout(_idleTimer); + _idleIncrement = 0; + if(_isIdle) { + ui.setIdle(false); + } + }, + _onMouseLeaveWindow = function(e) { + e = e ? e : window.event; + var from = e.relatedTarget || e.toElement; + if (!from || from.nodeName === 'HTML') { + clearTimeout(_idleTimer); + _idleTimer = setTimeout(function() { + ui.setIdle(true); + }, _options.timeToIdleOutside); + } + }, + _setupFullscreenAPI = function() { + if(_options.fullscreenEl && !framework.features.isOldAndroid) { + if(!_fullscrenAPI) { + _fullscrenAPI = ui.getFullscreenAPI(); + } + if(_fullscrenAPI) { + framework.bind(document, _fullscrenAPI.eventK, ui.updateFullscreen); + ui.updateFullscreen(); + framework.addClass(pswp.template, 'pswp--supports-fs'); + } else { + framework.removeClass(pswp.template, 'pswp--supports-fs'); + } + } + }, + _setupLoadingIndicator = function() { + // Setup loading indicator + if(_options.preloaderEl) { + + _toggleLoadingIndicator(true); + + _listen('beforeChange', function() { + + clearTimeout(_loadingIndicatorTimeout); + + // display loading indicator with delay + _loadingIndicatorTimeout = setTimeout(function() { + + if(pswp.currItem && pswp.currItem.loading) { + + if( !pswp.allowProgressiveImg() || (pswp.currItem.img && !pswp.currItem.img.naturalWidth) ) { + // show preloader if progressive loading is not enabled, + // or image width is not defined yet (because of slow connection) + _toggleLoadingIndicator(false); + // items-controller.js function allowProgressiveImg + } + + } else { + _toggleLoadingIndicator(true); // hide preloader + } + + }, _options.loadingIndicatorDelay); + + }); + _listen('imageLoadComplete', function(index, item) { + if(pswp.currItem === item) { + _toggleLoadingIndicator(true); + } + }); + + } + }, + _toggleLoadingIndicator = function(hide) { + if( _loadingIndicatorHidden !== hide ) { + _togglePswpClass(_loadingIndicator, 'preloader--active', !hide); + _loadingIndicatorHidden = hide; + } + }, + _applyNavBarGaps = function(item) { + var gap = item.vGap; + + if( _fitControlsInViewport() ) { + + var bars = _options.barsSize; + if(_options.captionEl && bars.bottom === 'auto') { + if(!_fakeCaptionContainer) { + _fakeCaptionContainer = framework.createEl('pswp__caption pswp__caption--fake'); + _fakeCaptionContainer.appendChild( framework.createEl('pswp__caption__center') ); + _controls.insertBefore(_fakeCaptionContainer, _captionContainer); + framework.addClass(_controls, 'pswp__ui--fit'); + } + if( _options.addCaptionHTMLFn(item, _fakeCaptionContainer, true) ) { + + var captionSize = _fakeCaptionContainer.clientHeight; + gap.bottom = parseInt(captionSize,10) || 44; + } else { + gap.bottom = bars.top; // if no caption, set size of bottom gap to size of top + } + } else { + gap.bottom = bars.bottom === 'auto' ? 0 : bars.bottom; + } + + // height of top bar is static, no need to calculate it + gap.top = bars.top; + } else { + gap.top = gap.bottom = 0; + } + }, + _setupIdle = function() { + // Hide controls when mouse is used + if(_options.timeToIdle) { + _listen('mouseUsed', function() { + + framework.bind(document, 'mousemove', _onIdleMouseMove); + framework.bind(document, 'mouseout', _onMouseLeaveWindow); + + _idleInterval = setInterval(function() { + _idleIncrement++; + if(_idleIncrement === 2) { + ui.setIdle(true); + } + }, _options.timeToIdle / 2); + }); + } + }, + _setupHidingControlsDuringGestures = function() { + + // Hide controls on vertical drag + _listen('onVerticalDrag', function(now) { + if(_controlsVisible && now < 0.95) { + ui.hideControls(); + } else if(!_controlsVisible && now >= 0.95) { + ui.showControls(); + } + }); + + // Hide controls when pinching to close + var pinchControlsHidden; + _listen('onPinchClose' , function(now) { + if(_controlsVisible && now < 0.9) { + ui.hideControls(); + pinchControlsHidden = true; + } else if(pinchControlsHidden && !_controlsVisible && now > 0.9) { + ui.showControls(); + } + }); + + _listen('zoomGestureEnded', function() { + pinchControlsHidden = false; + if(pinchControlsHidden && !_controlsVisible) { + ui.showControls(); + } + }); + + }; + + + + var _uiElements = [ + { + name: 'caption', + option: 'captionEl', + onInit: function(el) { + _captionContainer = el; + } + }, + { + name: 'share-modal', + option: 'shareEl', + onInit: function(el) { + _shareModal = el; + }, + onTap: function() { + _toggleShareModal(); + } + }, + { + name: 'button--share', + option: 'shareEl', + onInit: function(el) { + _shareButton = el; + }, + onTap: function() { + _toggleShareModal(); + } + }, + { + name: 'button--zoom', + option: 'zoomEl', + onTap: pswp.toggleDesktopZoom + }, + { + name: 'counter', + option: 'counterEl', + onInit: function(el) { + _indexIndicator = el; + } + }, + { + name: 'button--close', + option: 'closeEl', + onTap: pswp.close + }, + { + name: 'button--arrow--left', + option: 'arrowEl', + onTap: pswp.prev + }, + { + name: 'button--arrow--right', + option: 'arrowEl', + onTap: pswp.next + }, + { + name: 'button--fs', + option: 'fullscreenEl', + onTap: function() { + if(_fullscrenAPI.isFullscreen()) { + _fullscrenAPI.exit(); + } else { + _fullscrenAPI.enter(); + } + } + }, + { + name: 'preloader', + option: 'preloaderEl', + onInit: function(el) { + _loadingIndicator = el; + } + } + + ]; + + var _setupUIElements = function() { + var item, + classAttr, + uiElement; + + var loopThroughChildElements = function(sChildren) { + if(!sChildren) { + return; + } + + var l = sChildren.length; + for(var i = 0; i < l; i++) { + item = sChildren[i]; + classAttr = item.className; + + for(var a = 0; a < _uiElements.length; a++) { + uiElement = _uiElements[a]; + + if(classAttr.indexOf('pswp__' + uiElement.name) > -1 ) { + + if( _options[uiElement.option] ) { // if element is not disabled from options + + framework.removeClass(item, 'pswp__element--disabled'); + if(uiElement.onInit) { + uiElement.onInit(item); + } + + //item.style.display = 'block'; + } else { + framework.addClass(item, 'pswp__element--disabled'); + //item.style.display = 'none'; + } + } + } + } + }; + loopThroughChildElements(_controls.children); + + var topBar = framework.getChildByClass(_controls, 'pswp__top-bar'); + if(topBar) { + loopThroughChildElements( topBar.children ); + } + }; + + + + + ui.init = function() { + + // extend options + framework.extend(pswp.options, _defaultUIOptions, true); + + // create local link for fast access + _options = pswp.options; + + // find pswp__ui element + _controls = framework.getChildByClass(pswp.scrollWrap, 'pswp__ui'); + + // create local link + _listen = pswp.listen; + + + _setupHidingControlsDuringGestures(); + + // update controls when slides change + _listen('beforeChange', ui.update); + + // toggle zoom on double-tap + _listen('doubleTap', function(point) { + var initialZoomLevel = pswp.currItem.initialZoomLevel; + if(pswp.getZoomLevel() !== initialZoomLevel) { + pswp.zoomTo(initialZoomLevel, point, 333); + } else { + pswp.zoomTo(_options.getDoubleTapZoom(false, pswp.currItem), point, 333); + } + }); + + // Allow text selection in caption + _listen('preventDragEvent', function(e, isDown, preventObj) { + var t = e.target || e.srcElement; + if( + t && + t.getAttribute('class') && e.type.indexOf('mouse') > -1 && + ( t.getAttribute('class').indexOf('__caption') > 0 || (/(SMALL|STRONG|EM)/i).test(t.tagName) ) + ) { + preventObj.prevent = false; + } + }); + + // bind events for UI + _listen('bindEvents', function() { + framework.bind(_controls, 'pswpTap click', _onControlsTap); + framework.bind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap); + + if(!pswp.likelyTouchDevice) { + framework.bind(pswp.scrollWrap, 'mouseover', ui.onMouseOver); + } + }); + + // unbind events for UI + _listen('unbindEvents', function() { + if(!_shareModalHidden) { + _toggleShareModal(); + } + + if(_idleInterval) { + clearInterval(_idleInterval); + } + framework.unbind(document, 'mouseout', _onMouseLeaveWindow); + framework.unbind(document, 'mousemove', _onIdleMouseMove); + framework.unbind(_controls, 'pswpTap click', _onControlsTap); + framework.unbind(pswp.scrollWrap, 'pswpTap', ui.onGlobalTap); + framework.unbind(pswp.scrollWrap, 'mouseover', ui.onMouseOver); + + if(_fullscrenAPI) { + framework.unbind(document, _fullscrenAPI.eventK, ui.updateFullscreen); + if(_fullscrenAPI.isFullscreen()) { + _options.hideAnimationDuration = 0; + _fullscrenAPI.exit(); + } + _fullscrenAPI = null; + } + }); + + + // clean up things when gallery is destroyed + _listen('destroy', function() { + if(_options.captionEl) { + if(_fakeCaptionContainer) { + _controls.removeChild(_fakeCaptionContainer); + } + framework.removeClass(_captionContainer, 'pswp__caption--empty'); + } + + if(_shareModal) { + _shareModal.children[0].onclick = null; + } + framework.removeClass(_controls, 'pswp__ui--over-close'); + framework.addClass( _controls, 'pswp__ui--hidden'); + ui.setIdle(false); + }); + + + if(!_options.showAnimationDuration) { + framework.removeClass( _controls, 'pswp__ui--hidden'); + } + _listen('initialZoomIn', function() { + if(_options.showAnimationDuration) { + framework.removeClass( _controls, 'pswp__ui--hidden'); + } + }); + _listen('initialZoomOut', function() { + framework.addClass( _controls, 'pswp__ui--hidden'); + }); + + _listen('parseVerticalMargin', _applyNavBarGaps); + + _setupUIElements(); + + if(_options.shareEl && _shareButton && _shareModal) { + _shareModalHidden = true; + } + + _countNumItems(); + + _setupIdle(); + + _setupFullscreenAPI(); + + _setupLoadingIndicator(); + }; + + ui.setIdle = function(isIdle) { + _isIdle = isIdle; + _togglePswpClass(_controls, 'ui--idle', isIdle); + }; + + ui.update = function() { + // Don't update UI if it's hidden + if(_controlsVisible && pswp.currItem) { + + ui.updateIndexIndicator(); + + if(_options.captionEl) { + _options.addCaptionHTMLFn(pswp.currItem, _captionContainer); + + _togglePswpClass(_captionContainer, 'caption--empty', !pswp.currItem.title); + } + + _overlayUIUpdated = true; + + } else { + _overlayUIUpdated = false; + } + + if(!_shareModalHidden) { + _toggleShareModal(); + } + + _countNumItems(); + }; + + ui.updateFullscreen = function(e) { + + if(e) { + // some browsers change window scroll position during the fullscreen + // so PhotoSwipe updates it just in case + setTimeout(function() { + pswp.setScrollOffset( 0, framework.getScrollY() ); + }, 50); + } + + // toogle pswp--fs class on root element + framework[ (_fullscrenAPI.isFullscreen() ? 'add' : 'remove') + 'Class' ](pswp.template, 'pswp--fs'); + }; + + ui.updateIndexIndicator = function() { + if(_options.counterEl) { + _indexIndicator.innerHTML = (pswp.getCurrentIndex()+1) + + _options.indexIndicatorSep + + _options.getNumItemsFn(); + } + }; + + ui.onGlobalTap = function(e) { + e = e || window.event; + var target = e.target || e.srcElement; + + if(_blockControlsTap) { + return; + } + + if(e.detail && e.detail.pointerType === 'mouse') { + + // close gallery if clicked outside of the image + if(_hasCloseClass(target)) { + pswp.close(); + return; + } + + if(framework.hasClass(target, 'pswp__img')) { + if(pswp.getZoomLevel() === 1 && pswp.getZoomLevel() <= pswp.currItem.fitRatio) { + if(_options.clickToCloseNonZoomable) { + pswp.close(); + } + } else { + pswp.toggleDesktopZoom(e.detail.releasePoint); + } + } + + } else { + + // tap anywhere (except buttons) to toggle visibility of controls + if(_options.tapToToggleControls) { + if(_controlsVisible) { + ui.hideControls(); + } else { + ui.showControls(); + } + } + + // tap to close gallery + if(_options.tapToClose && (framework.hasClass(target, 'pswp__img') || _hasCloseClass(target)) ) { + pswp.close(); + return; + } + + } + }; + ui.onMouseOver = function(e) { + e = e || window.event; + var target = e.target || e.srcElement; + + // add class when mouse is over an element that should close the gallery + _togglePswpClass(_controls, 'ui--over-close', _hasCloseClass(target)); + }; + + ui.hideControls = function() { + framework.addClass(_controls,'pswp__ui--hidden'); + _controlsVisible = false; + }; + + ui.showControls = function() { + _controlsVisible = true; + if(!_overlayUIUpdated) { + ui.update(); + } + framework.removeClass(_controls,'pswp__ui--hidden'); + }; + + ui.supportsFullscreen = function() { + var d = document; + return !!(d.exitFullscreen || d.mozCancelFullScreen || d.webkitExitFullscreen || d.msExitFullscreen); + }; + + ui.getFullscreenAPI = function() { + var dE = document.documentElement, + api, + tF = 'fullscreenchange'; + + if (dE.requestFullscreen) { + api = { + enterK: 'requestFullscreen', + exitK: 'exitFullscreen', + elementK: 'fullscreenElement', + eventK: tF + }; + + } else if(dE.mozRequestFullScreen ) { + api = { + enterK: 'mozRequestFullScreen', + exitK: 'mozCancelFullScreen', + elementK: 'mozFullScreenElement', + eventK: 'moz' + tF + }; + + + + } else if(dE.webkitRequestFullscreen) { + api = { + enterK: 'webkitRequestFullscreen', + exitK: 'webkitExitFullscreen', + elementK: 'webkitFullscreenElement', + eventK: 'webkit' + tF + }; + + } else if(dE.msRequestFullscreen) { + api = { + enterK: 'msRequestFullscreen', + exitK: 'msExitFullscreen', + elementK: 'msFullscreenElement', + eventK: 'MSFullscreenChange' + }; + } + + if(api) { + api.enter = function() { + // disable close-on-scroll in fullscreen + _initalCloseOnScrollValue = _options.closeOnScroll; + _options.closeOnScroll = false; + + if(this.enterK === 'webkitRequestFullscreen') { + pswp.template[this.enterK]( Element.ALLOW_KEYBOARD_INPUT ); + } else { + return pswp.template[this.enterK](); + } + }; + api.exit = function() { + _options.closeOnScroll = _initalCloseOnScrollValue; + + return document[this.exitK](); + + }; + api.isFullscreen = function() { return document[this.elementK]; }; + } + + return api; + }; + + + +}; +return PhotoSwipeUI_Default; + + +}); diff --git a/assets/js/photoswipe.js b/assets/js/photoswipe.js new file mode 100644 index 00000000..467c1cec --- /dev/null +++ b/assets/js/photoswipe.js @@ -0,0 +1,3734 @@ +/*! PhotoSwipe - v4.1.3 - 2019-01-08 +* http://photoswipe.com +* Copyright (c) 2019 Dmitry Semenov; */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define(factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + root.PhotoSwipe = factory(); + } +})(this, function () { + + 'use strict'; + var PhotoSwipe = function(template, UiClass, items, options){ + +/*>>framework-bridge*/ +/** + * + * Set of generic functions used by gallery. + * + * You're free to modify anything here as long as functionality is kept. + * + */ +var framework = { + features: null, + bind: function(target, type, listener, unbind) { + var methodName = (unbind ? 'remove' : 'add') + 'EventListener'; + type = type.split(' '); + for(var i = 0; i < type.length; i++) { + if(type[i]) { + target[methodName]( type[i], listener, false); + } + } + }, + isArray: function(obj) { + return (obj instanceof Array); + }, + createEl: function(classes, tag) { + var el = document.createElement(tag || 'div'); + if(classes) { + el.className = classes; + } + return el; + }, + getScrollY: function() { + var yOffset = window.pageYOffset; + return yOffset !== undefined ? yOffset : document.documentElement.scrollTop; + }, + unbind: function(target, type, listener) { + framework.bind(target,type,listener,true); + }, + removeClass: function(el, className) { + var reg = new RegExp('(\\s|^)' + className + '(\\s|$)'); + el.className = el.className.replace(reg, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); + }, + addClass: function(el, className) { + if( !framework.hasClass(el,className) ) { + el.className += (el.className ? ' ' : '') + className; + } + }, + hasClass: function(el, className) { + return el.className && new RegExp('(^|\\s)' + className + '(\\s|$)').test(el.className); + }, + getChildByClass: function(parentEl, childClassName) { + var node = parentEl.firstChild; + while(node) { + if( framework.hasClass(node, childClassName) ) { + return node; + } + node = node.nextSibling; + } + }, + arraySearch: function(array, value, key) { + var i = array.length; + while(i--) { + if(array[i][key] === value) { + return i; + } + } + return -1; + }, + extend: function(o1, o2, preventOverwrite) { + for (var prop in o2) { + if (o2.hasOwnProperty(prop)) { + if(preventOverwrite && o1.hasOwnProperty(prop)) { + continue; + } + o1[prop] = o2[prop]; + } + } + }, + easing: { + sine: { + out: function(k) { + return Math.sin(k * (Math.PI / 2)); + }, + inOut: function(k) { + return - (Math.cos(Math.PI * k) - 1) / 2; + } + }, + cubic: { + out: function(k) { + return --k * k * k + 1; + } + } + /* + elastic: { + out: function ( k ) { + + var s, a = 0.1, p = 0.4; + if ( k === 0 ) return 0; + if ( k === 1 ) return 1; + if ( !a || a < 1 ) { a = 1; s = p / 4; } + else s = p * Math.asin( 1 / a ) / ( 2 * Math.PI ); + return ( a * Math.pow( 2, - 10 * k) * Math.sin( ( k - s ) * ( 2 * Math.PI ) / p ) + 1 ); + + }, + }, + back: { + out: function ( k ) { + var s = 1.70158; + return --k * k * ( ( s + 1 ) * k + s ) + 1; + } + } + */ + }, + + /** + * + * @return {object} + * + * { + * raf : request animation frame function + * caf : cancel animation frame function + * transfrom : transform property key (with vendor), or null if not supported + * oldIE : IE8 or below + * } + * + */ + detectFeatures: function() { + if(framework.features) { + return framework.features; + } + var helperEl = framework.createEl(), + helperStyle = helperEl.style, + vendor = '', + features = {}; + + // IE8 and below + features.oldIE = document.all && !document.addEventListener; + + features.touch = 'ontouchstart' in window; + + if(window.requestAnimationFrame) { + features.raf = window.requestAnimationFrame; + features.caf = window.cancelAnimationFrame; + } + + features.pointerEvent = !!(window.PointerEvent) || navigator.msPointerEnabled; + + // fix false-positive detection of old Android in new IE + // (IE11 ua string contains "Android 4.0") + + if(!features.pointerEvent) { + + var ua = navigator.userAgent; + + // Detect if device is iPhone or iPod and if it's older than iOS 8 + // http://stackoverflow.com/a/14223920 + // + // This detection is made because of buggy top/bottom toolbars + // that don't trigger window.resize event. + // For more info refer to _isFixedPosition variable in core.js + + if (/iP(hone|od)/.test(navigator.platform)) { + var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); + if(v && v.length > 0) { + v = parseInt(v[1], 10); + if(v >= 1 && v < 8 ) { + features.isOldIOSPhone = true; + } + } + } + + // Detect old Android (before KitKat) + // due to bugs related to position:fixed + // http://stackoverflow.com/questions/7184573/pick-up-the-android-version-in-the-browser-by-javascript + + var match = ua.match(/Android\s([0-9\.]*)/); + var androidversion = match ? match[1] : 0; + androidversion = parseFloat(androidversion); + if(androidversion >= 1 ) { + if(androidversion < 4.4) { + features.isOldAndroid = true; // for fixed position bug & performance + } + features.androidVersion = androidversion; // for touchend bug + } + features.isMobileOpera = /opera mini|opera mobi/i.test(ua); + + // p.s. yes, yes, UA sniffing is bad, propose your solution for above bugs. + } + + var styleChecks = ['transform', 'perspective', 'animationName'], + vendors = ['', 'webkit','Moz','ms','O'], + styleCheckItem, + styleName; + + for(var i = 0; i < 4; i++) { + vendor = vendors[i]; + + for(var a = 0; a < 3; a++) { + styleCheckItem = styleChecks[a]; + + // uppercase first letter of property name, if vendor is present + styleName = vendor + (vendor ? + styleCheckItem.charAt(0).toUpperCase() + styleCheckItem.slice(1) : + styleCheckItem); + + if(!features[styleCheckItem] && styleName in helperStyle ) { + features[styleCheckItem] = styleName; + } + } + + if(vendor && !features.raf) { + vendor = vendor.toLowerCase(); + features.raf = window[vendor+'RequestAnimationFrame']; + if(features.raf) { + features.caf = window[vendor+'CancelAnimationFrame'] || + window[vendor+'CancelRequestAnimationFrame']; + } + } + } + + if(!features.raf) { + var lastTime = 0; + features.raf = function(fn) { + var currTime = new Date().getTime(); + var timeToCall = Math.max(0, 16 - (currTime - lastTime)); + var id = window.setTimeout(function() { fn(currTime + timeToCall); }, timeToCall); + lastTime = currTime + timeToCall; + return id; + }; + features.caf = function(id) { clearTimeout(id); }; + } + + // Detect SVG support + features.svg = !!document.createElementNS && + !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect; + + framework.features = features; + + return features; + } +}; + +framework.detectFeatures(); + +// Override addEventListener for old versions of IE +if(framework.features.oldIE) { + + framework.bind = function(target, type, listener, unbind) { + + type = type.split(' '); + + var methodName = (unbind ? 'detach' : 'attach') + 'Event', + evName, + _handleEv = function() { + listener.handleEvent.call(listener); + }; + + for(var i = 0; i < type.length; i++) { + evName = type[i]; + if(evName) { + + if(typeof listener === 'object' && listener.handleEvent) { + if(!unbind) { + listener['oldIE' + evName] = _handleEv; + } else { + if(!listener['oldIE' + evName]) { + return false; + } + } + + target[methodName]( 'on' + evName, listener['oldIE' + evName]); + } else { + target[methodName]( 'on' + evName, listener); + } + + } + } + }; + +} + +/*>>framework-bridge*/ + +/*>>core*/ +//function(template, UiClass, items, options) + +var self = this; + +/** + * Static vars, don't change unless you know what you're doing. + */ +var DOUBLE_TAP_RADIUS = 25, + NUM_HOLDERS = 3; + +/** + * Options + */ +var _options = { + allowPanToNext:true, + spacing: 0.12, + bgOpacity: 1, + mouseUsed: false, + loop: true, + pinchToClose: true, + closeOnScroll: true, + closeOnVerticalDrag: true, + verticalDragRange: 0.75, + hideAnimationDuration: 333, + showAnimationDuration: 333, + showHideOpacity: false, + focus: true, + escKey: true, + arrowKeys: true, + mainScrollEndFriction: 0.35, + panEndFriction: 0.35, + isClickableElement: function(el) { + return el.tagName === 'A'; + }, + getDoubleTapZoom: function(isMouseClick, item) { + if(isMouseClick) { + return 1; + } else { + return item.initialZoomLevel < 0.7 ? 1 : 1.33; + } + }, + maxSpreadZoom: 1.33, + modal: true, + + // not fully implemented yet + scaleMode: 'fit' // TODO +}; +framework.extend(_options, options); + + +/** + * Private helper variables & functions + */ + +var _getEmptyPoint = function() { + return {x:0,y:0}; + }; + +var _isOpen, + _isDestroying, + _closedByScroll, + _currentItemIndex, + _containerStyle, + _containerShiftIndex, + _currPanDist = _getEmptyPoint(), + _startPanOffset = _getEmptyPoint(), + _panOffset = _getEmptyPoint(), + _upMoveEvents, // drag move, drag end & drag cancel events array + _downEvents, // drag start events array + _globalEventHandlers, + _viewportSize = {}, + _currZoomLevel, + _startZoomLevel, + _translatePrefix, + _translateSufix, + _updateSizeInterval, + _itemsNeedUpdate, + _currPositionIndex = 0, + _offset = {}, + _slideSize = _getEmptyPoint(), // size of slide area, including spacing + _itemHolders, + _prevItemIndex, + _indexDiff = 0, // difference of indexes since last content update + _dragStartEvent, + _dragMoveEvent, + _dragEndEvent, + _dragCancelEvent, + _transformKey, + _pointerEventEnabled, + _isFixedPosition = true, + _likelyTouchDevice, + _modules = [], + _requestAF, + _cancelAF, + _initalClassName, + _initalWindowScrollY, + _oldIE, + _currentWindowScrollY, + _features, + _windowVisibleSize = {}, + _renderMaxResolution = false, + _orientationChangeTimeout, + + + // Registers PhotoSWipe module (History, Controller ...) + _registerModule = function(name, module) { + framework.extend(self, module.publicMethods); + _modules.push(name); + }, + + _getLoopedId = function(index) { + var numSlides = _getNumItems(); + if(index > numSlides - 1) { + return index - numSlides; + } else if(index < 0) { + return numSlides + index; + } + return index; + }, + + // Micro bind/trigger + _listeners = {}, + _listen = function(name, fn) { + if(!_listeners[name]) { + _listeners[name] = []; + } + return _listeners[name].push(fn); + }, + _shout = function(name) { + var listeners = _listeners[name]; + + if(listeners) { + var args = Array.prototype.slice.call(arguments); + args.shift(); + + for(var i = 0; i < listeners.length; i++) { + listeners[i].apply(self, args); + } + } + }, + + _getCurrentTime = function() { + return new Date().getTime(); + }, + _applyBgOpacity = function(opacity) { + _bgOpacity = opacity; + self.bg.style.opacity = opacity * _options.bgOpacity; + }, + + _applyZoomTransform = function(styleObj,x,y,zoom,item) { + if(!_renderMaxResolution || (item && item !== self.currItem) ) { + zoom = zoom / (item ? item.fitRatio : self.currItem.fitRatio); + } + + styleObj[_transformKey] = _translatePrefix + x + 'px, ' + y + 'px' + _translateSufix + ' scale(' + zoom + ')'; + }, + _applyCurrentZoomPan = function( allowRenderResolution ) { + if(_currZoomElementStyle) { + + if(allowRenderResolution) { + if(_currZoomLevel > self.currItem.fitRatio) { + if(!_renderMaxResolution) { + _setImageSize(self.currItem, false, true); + _renderMaxResolution = true; + } + } else { + if(_renderMaxResolution) { + _setImageSize(self.currItem); + _renderMaxResolution = false; + } + } + } + + + _applyZoomTransform(_currZoomElementStyle, _panOffset.x, _panOffset.y, _currZoomLevel); + } + }, + _applyZoomPanToItem = function(item) { + if(item.container) { + + _applyZoomTransform(item.container.style, + item.initialPosition.x, + item.initialPosition.y, + item.initialZoomLevel, + item); + } + }, + _setTranslateX = function(x, elStyle) { + elStyle[_transformKey] = _translatePrefix + x + 'px, 0px' + _translateSufix; + }, + _moveMainScroll = function(x, dragging) { + + if(!_options.loop && dragging) { + var newSlideIndexOffset = _currentItemIndex + (_slideSize.x * _currPositionIndex - x) / _slideSize.x, + delta = Math.round(x - _mainScrollPos.x); + + if( (newSlideIndexOffset < 0 && delta > 0) || + (newSlideIndexOffset >= _getNumItems() - 1 && delta < 0) ) { + x = _mainScrollPos.x + delta * _options.mainScrollEndFriction; + } + } + + _mainScrollPos.x = x; + _setTranslateX(x, _containerStyle); + }, + _calculatePanOffset = function(axis, zoomLevel) { + var m = _midZoomPoint[axis] - _offset[axis]; + return _startPanOffset[axis] + _currPanDist[axis] + m - m * ( zoomLevel / _startZoomLevel ); + }, + + _equalizePoints = function(p1, p2) { + p1.x = p2.x; + p1.y = p2.y; + if(p2.id) { + p1.id = p2.id; + } + }, + _roundPoint = function(p) { + p.x = Math.round(p.x); + p.y = Math.round(p.y); + }, + + _mouseMoveTimeout = null, + _onFirstMouseMove = function() { + // Wait until mouse move event is fired at least twice during 100ms + // We do this, because some mobile browsers trigger it on touchstart + if(_mouseMoveTimeout ) { + framework.unbind(document, 'mousemove', _onFirstMouseMove); + framework.addClass(template, 'pswp--has_mouse'); + _options.mouseUsed = true; + _shout('mouseUsed'); + } + _mouseMoveTimeout = setTimeout(function() { + _mouseMoveTimeout = null; + }, 100); + }, + + _bindEvents = function() { + framework.bind(document, 'keydown', self); + + if(_features.transform) { + // don't bind click event in browsers that don't support transform (mostly IE8) + framework.bind(self.scrollWrap, 'click', self); + } + + + if(!_options.mouseUsed) { + framework.bind(document, 'mousemove', _onFirstMouseMove); + } + + framework.bind(window, 'resize scroll orientationchange', self); + + _shout('bindEvents'); + }, + + _unbindEvents = function() { + framework.unbind(window, 'resize scroll orientationchange', self); + framework.unbind(window, 'scroll', _globalEventHandlers.scroll); + framework.unbind(document, 'keydown', self); + framework.unbind(document, 'mousemove', _onFirstMouseMove); + + if(_features.transform) { + framework.unbind(self.scrollWrap, 'click', self); + } + + if(_isDragging) { + framework.unbind(window, _upMoveEvents, self); + } + + clearTimeout(_orientationChangeTimeout); + + _shout('unbindEvents'); + }, + + _calculatePanBounds = function(zoomLevel, update) { + var bounds = _calculateItemSize( self.currItem, _viewportSize, zoomLevel ); + if(update) { + _currPanBounds = bounds; + } + return bounds; + }, + + _getMinZoomLevel = function(item) { + if(!item) { + item = self.currItem; + } + return item.initialZoomLevel; + }, + _getMaxZoomLevel = function(item) { + if(!item) { + item = self.currItem; + } + return item.w > 0 ? _options.maxSpreadZoom : 1; + }, + + // Return true if offset is out of the bounds + _modifyDestPanOffset = function(axis, destPanBounds, destPanOffset, destZoomLevel) { + if(destZoomLevel === self.currItem.initialZoomLevel) { + destPanOffset[axis] = self.currItem.initialPosition[axis]; + return true; + } else { + destPanOffset[axis] = _calculatePanOffset(axis, destZoomLevel); + + if(destPanOffset[axis] > destPanBounds.min[axis]) { + destPanOffset[axis] = destPanBounds.min[axis]; + return true; + } else if(destPanOffset[axis] < destPanBounds.max[axis] ) { + destPanOffset[axis] = destPanBounds.max[axis]; + return true; + } + } + return false; + }, + + _setupTransforms = function() { + + if(_transformKey) { + // setup 3d transforms + var allow3dTransform = _features.perspective && !_likelyTouchDevice; + _translatePrefix = 'translate' + (allow3dTransform ? '3d(' : '('); + _translateSufix = _features.perspective ? ', 0px)' : ')'; + return; + } + + // Override zoom/pan/move functions in case old browser is used (most likely IE) + // (so they use left/top/width/height, instead of CSS transform) + + _transformKey = 'left'; + framework.addClass(template, 'pswp--ie'); + + _setTranslateX = function(x, elStyle) { + elStyle.left = x + 'px'; + }; + _applyZoomPanToItem = function(item) { + + var zoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio, + s = item.container.style, + w = zoomRatio * item.w, + h = zoomRatio * item.h; + + s.width = w + 'px'; + s.height = h + 'px'; + s.left = item.initialPosition.x + 'px'; + s.top = item.initialPosition.y + 'px'; + + }; + _applyCurrentZoomPan = function() { + if(_currZoomElementStyle) { + + var s = _currZoomElementStyle, + item = self.currItem, + zoomRatio = item.fitRatio > 1 ? 1 : item.fitRatio, + w = zoomRatio * item.w, + h = zoomRatio * item.h; + + s.width = w + 'px'; + s.height = h + 'px'; + + + s.left = _panOffset.x + 'px'; + s.top = _panOffset.y + 'px'; + } + + }; + }, + + _onKeyDown = function(e) { + var keydownAction = ''; + if(_options.escKey && e.keyCode === 27) { + keydownAction = 'close'; + } else if(_options.arrowKeys) { + if(e.keyCode === 37) { + keydownAction = 'prev'; + } else if(e.keyCode === 39) { + keydownAction = 'next'; + } + } + + if(keydownAction) { + // don't do anything if special key pressed to prevent from overriding default browser actions + // e.g. in Chrome on Mac cmd+arrow-left returns to previous page + if( !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey ) { + if(e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + self[keydownAction](); + } + } + }, + + _onGlobalClick = function(e) { + if(!e) { + return; + } + + // don't allow click event to pass through when triggering after drag or some other gesture + if(_moved || _zoomStarted || _mainScrollAnimating || _verticalDragInitiated) { + e.preventDefault(); + e.stopPropagation(); + } + }, + + _updatePageScrollOffset = function() { + self.setScrollOffset(0, framework.getScrollY()); + }; + + + + + + + +// Micro animation engine +var _animations = {}, + _numAnimations = 0, + _stopAnimation = function(name) { + if(_animations[name]) { + if(_animations[name].raf) { + _cancelAF( _animations[name].raf ); + } + _numAnimations--; + delete _animations[name]; + } + }, + _registerStartAnimation = function(name) { + if(_animations[name]) { + _stopAnimation(name); + } + if(!_animations[name]) { + _numAnimations++; + _animations[name] = {}; + } + }, + _stopAllAnimations = function() { + for (var prop in _animations) { + + if( _animations.hasOwnProperty( prop ) ) { + _stopAnimation(prop); + } + + } + }, + _animateProp = function(name, b, endProp, d, easingFn, onUpdate, onComplete) { + var startAnimTime = _getCurrentTime(), t; + _registerStartAnimation(name); + + var animloop = function(){ + if ( _animations[name] ) { + + t = _getCurrentTime() - startAnimTime; // time diff + //b - beginning (start prop) + //d - anim duration + + if ( t >= d ) { + _stopAnimation(name); + onUpdate(endProp); + if(onComplete) { + onComplete(); + } + return; + } + onUpdate( (endProp - b) * easingFn(t/d) + b ); + + _animations[name].raf = _requestAF(animloop); + } + }; + animloop(); + }; + + + +var publicMethods = { + + // make a few local variables and functions public + shout: _shout, + listen: _listen, + viewportSize: _viewportSize, + options: _options, + + isMainScrollAnimating: function() { + return _mainScrollAnimating; + }, + getZoomLevel: function() { + return _currZoomLevel; + }, + getCurrentIndex: function() { + return _currentItemIndex; + }, + isDragging: function() { + return _isDragging; + }, + isZooming: function() { + return _isZooming; + }, + setScrollOffset: function(x,y) { + _offset.x = x; + _currentWindowScrollY = _offset.y = y; + _shout('updateScrollOffset', _offset); + }, + applyZoomPan: function(zoomLevel,panX,panY,allowRenderResolution) { + _panOffset.x = panX; + _panOffset.y = panY; + _currZoomLevel = zoomLevel; + _applyCurrentZoomPan( allowRenderResolution ); + }, + + init: function() { + + if(_isOpen || _isDestroying) { + return; + } + + var i; + + self.framework = framework; // basic functionality + self.template = template; // root DOM element of PhotoSwipe + self.bg = framework.getChildByClass(template, 'pswp__bg'); + + _initalClassName = template.className; + _isOpen = true; + + _features = framework.detectFeatures(); + _requestAF = _features.raf; + _cancelAF = _features.caf; + _transformKey = _features.transform; + _oldIE = _features.oldIE; + + self.scrollWrap = framework.getChildByClass(template, 'pswp__scroll-wrap'); + self.container = framework.getChildByClass(self.scrollWrap, 'pswp__container'); + + _containerStyle = self.container.style; // for fast access + + // Objects that hold slides (there are only 3 in DOM) + self.itemHolders = _itemHolders = [ + {el:self.container.children[0] , wrap:0, index: -1}, + {el:self.container.children[1] , wrap:0, index: -1}, + {el:self.container.children[2] , wrap:0, index: -1} + ]; + + // hide nearby item holders until initial zoom animation finishes (to avoid extra Paints) + _itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'none'; + + _setupTransforms(); + + // Setup global events + _globalEventHandlers = { + resize: self.updateSize, + + // Fixes: iOS 10.3 resize event + // does not update scrollWrap.clientWidth instantly after resize + // https://github.com/dimsemenov/PhotoSwipe/issues/1315 + orientationchange: function() { + clearTimeout(_orientationChangeTimeout); + _orientationChangeTimeout = setTimeout(function() { + if(_viewportSize.x !== self.scrollWrap.clientWidth) { + self.updateSize(); + } + }, 500); + }, + scroll: _updatePageScrollOffset, + keydown: _onKeyDown, + click: _onGlobalClick + }; + + // disable show/hide effects on old browsers that don't support CSS animations or transforms, + // old IOS, Android and Opera mobile. Blackberry seems to work fine, even older models. + var oldPhone = _features.isOldIOSPhone || _features.isOldAndroid || _features.isMobileOpera; + if(!_features.animationName || !_features.transform || oldPhone) { + _options.showAnimationDuration = _options.hideAnimationDuration = 0; + } + + // init modules + for(i = 0; i < _modules.length; i++) { + self['init' + _modules[i]](); + } + + // init + if(UiClass) { + var ui = self.ui = new UiClass(self, framework); + ui.init(); + } + + _shout('firstUpdate'); + _currentItemIndex = _currentItemIndex || _options.index || 0; + // validate index + if( isNaN(_currentItemIndex) || _currentItemIndex < 0 || _currentItemIndex >= _getNumItems() ) { + _currentItemIndex = 0; + } + self.currItem = _getItemAt( _currentItemIndex ); + + + if(_features.isOldIOSPhone || _features.isOldAndroid) { + _isFixedPosition = false; + } + + template.setAttribute('aria-hidden', 'false'); + if(_options.modal) { + if(!_isFixedPosition) { + template.style.position = 'absolute'; + template.style.top = framework.getScrollY() + 'px'; + } else { + template.style.position = 'fixed'; + } + } + + if(_currentWindowScrollY === undefined) { + _shout('initialLayout'); + _currentWindowScrollY = _initalWindowScrollY = framework.getScrollY(); + } + + // add classes to root element of PhotoSwipe + var rootClasses = 'pswp--open '; + if(_options.mainClass) { + rootClasses += _options.mainClass + ' '; + } + if(_options.showHideOpacity) { + rootClasses += 'pswp--animate_opacity '; + } + rootClasses += _likelyTouchDevice ? 'pswp--touch' : 'pswp--notouch'; + rootClasses += _features.animationName ? ' pswp--css_animation' : ''; + rootClasses += _features.svg ? ' pswp--svg' : ''; + framework.addClass(template, rootClasses); + + self.updateSize(); + + // initial update + _containerShiftIndex = -1; + _indexDiff = null; + for(i = 0; i < NUM_HOLDERS; i++) { + _setTranslateX( (i+_containerShiftIndex) * _slideSize.x, _itemHolders[i].el.style); + } + + if(!_oldIE) { + framework.bind(self.scrollWrap, _downEvents, self); // no dragging for old IE + } + + _listen('initialZoomInEnd', function() { + self.setContent(_itemHolders[0], _currentItemIndex-1); + self.setContent(_itemHolders[2], _currentItemIndex+1); + + _itemHolders[0].el.style.display = _itemHolders[2].el.style.display = 'block'; + + if(_options.focus) { + // focus causes layout, + // which causes lag during the animation, + // that's why we delay it untill the initial zoom transition ends + template.focus(); + } + + + _bindEvents(); + }); + + // set content for center slide (first time) + self.setContent(_itemHolders[1], _currentItemIndex); + + self.updateCurrItem(); + + _shout('afterInit'); + + if(!_isFixedPosition) { + + // On all versions of iOS lower than 8.0, we check size of viewport every second. + // + // This is done to detect when Safari top & bottom bars appear, + // as this action doesn't trigger any events (like resize). + // + // On iOS8 they fixed this. + // + // 10 Nov 2014: iOS 7 usage ~40%. iOS 8 usage 56%. + + _updateSizeInterval = setInterval(function() { + if(!_numAnimations && !_isDragging && !_isZooming && (_currZoomLevel === self.currItem.initialZoomLevel) ) { + self.updateSize(); + } + }, 1000); + } + + framework.addClass(template, 'pswp--visible'); + }, + + // Close the gallery, then destroy it + close: function() { + if(!_isOpen) { + return; + } + + _isOpen = false; + _isDestroying = true; + _shout('close'); + _unbindEvents(); + + _showOrHide(self.currItem, null, true, self.destroy); + }, + + // destroys the gallery (unbinds events, cleans up intervals and timeouts to avoid memory leaks) + destroy: function() { + _shout('destroy'); + + if(_showOrHideTimeout) { + clearTimeout(_showOrHideTimeout); + } + + template.setAttribute('aria-hidden', 'true'); + template.className = _initalClassName; + + if(_updateSizeInterval) { + clearInterval(_updateSizeInterval); + } + + framework.unbind(self.scrollWrap, _downEvents, self); + + // we unbind scroll event at the end, as closing animation may depend on it + framework.unbind(window, 'scroll', self); + + _stopDragUpdateLoop(); + + _stopAllAnimations(); + + _listeners = null; + }, + + /** + * Pan image to position + * @param {Number} x + * @param {Number} y + * @param {Boolean} force Will ignore bounds if set to true. + */ + panTo: function(x,y,force) { + if(!force) { + if(x > _currPanBounds.min.x) { + x = _currPanBounds.min.x; + } else if(x < _currPanBounds.max.x) { + x = _currPanBounds.max.x; + } + + if(y > _currPanBounds.min.y) { + y = _currPanBounds.min.y; + } else if(y < _currPanBounds.max.y) { + y = _currPanBounds.max.y; + } + } + + _panOffset.x = x; + _panOffset.y = y; + _applyCurrentZoomPan(); + }, + + handleEvent: function (e) { + e = e || window.event; + if(_globalEventHandlers[e.type]) { + _globalEventHandlers[e.type](e); + } + }, + + + goTo: function(index) { + + index = _getLoopedId(index); + + var diff = index - _currentItemIndex; + _indexDiff = diff; + + _currentItemIndex = index; + self.currItem = _getItemAt( _currentItemIndex ); + _currPositionIndex -= diff; + + _moveMainScroll(_slideSize.x * _currPositionIndex); + + + _stopAllAnimations(); + _mainScrollAnimating = false; + + self.updateCurrItem(); + }, + next: function() { + self.goTo( _currentItemIndex + 1); + }, + prev: function() { + self.goTo( _currentItemIndex - 1); + }, + + // update current zoom/pan objects + updateCurrZoomItem: function(emulateSetContent) { + if(emulateSetContent) { + _shout('beforeChange', 0); + } + + // itemHolder[1] is middle (current) item + if(_itemHolders[1].el.children.length) { + var zoomElement = _itemHolders[1].el.children[0]; + if( framework.hasClass(zoomElement, 'pswp__zoom-wrap') ) { + _currZoomElementStyle = zoomElement.style; + } else { + _currZoomElementStyle = null; + } + } else { + _currZoomElementStyle = null; + } + + _currPanBounds = self.currItem.bounds; + _startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel; + + _panOffset.x = _currPanBounds.center.x; + _panOffset.y = _currPanBounds.center.y; + + if(emulateSetContent) { + _shout('afterChange'); + } + }, + + + invalidateCurrItems: function() { + _itemsNeedUpdate = true; + for(var i = 0; i < NUM_HOLDERS; i++) { + if( _itemHolders[i].item ) { + _itemHolders[i].item.needsUpdate = true; + } + } + }, + + updateCurrItem: function(beforeAnimation) { + + if(_indexDiff === 0) { + return; + } + + var diffAbs = Math.abs(_indexDiff), + tempHolder; + + if(beforeAnimation && diffAbs < 2) { + return; + } + + + self.currItem = _getItemAt( _currentItemIndex ); + _renderMaxResolution = false; + + _shout('beforeChange', _indexDiff); + + if(diffAbs >= NUM_HOLDERS) { + _containerShiftIndex += _indexDiff + (_indexDiff > 0 ? -NUM_HOLDERS : NUM_HOLDERS); + diffAbs = NUM_HOLDERS; + } + for(var i = 0; i < diffAbs; i++) { + if(_indexDiff > 0) { + tempHolder = _itemHolders.shift(); + _itemHolders[NUM_HOLDERS-1] = tempHolder; // move first to last + + _containerShiftIndex++; + _setTranslateX( (_containerShiftIndex+2) * _slideSize.x, tempHolder.el.style); + self.setContent(tempHolder, _currentItemIndex - diffAbs + i + 1 + 1); + } else { + tempHolder = _itemHolders.pop(); + _itemHolders.unshift( tempHolder ); // move last to first + + _containerShiftIndex--; + _setTranslateX( _containerShiftIndex * _slideSize.x, tempHolder.el.style); + self.setContent(tempHolder, _currentItemIndex + diffAbs - i - 1 - 1); + } + + } + + // reset zoom/pan on previous item + if(_currZoomElementStyle && Math.abs(_indexDiff) === 1) { + + var prevItem = _getItemAt(_prevItemIndex); + if(prevItem.initialZoomLevel !== _currZoomLevel) { + _calculateItemSize(prevItem , _viewportSize ); + _setImageSize(prevItem); + _applyZoomPanToItem( prevItem ); + } + + } + + // reset diff after update + _indexDiff = 0; + + self.updateCurrZoomItem(); + + _prevItemIndex = _currentItemIndex; + + _shout('afterChange'); + + }, + + + + updateSize: function(force) { + + if(!_isFixedPosition && _options.modal) { + var windowScrollY = framework.getScrollY(); + if(_currentWindowScrollY !== windowScrollY) { + template.style.top = windowScrollY + 'px'; + _currentWindowScrollY = windowScrollY; + } + if(!force && _windowVisibleSize.x === window.innerWidth && _windowVisibleSize.y === window.innerHeight) { + return; + } + _windowVisibleSize.x = window.innerWidth; + _windowVisibleSize.y = window.innerHeight; + + //template.style.width = _windowVisibleSize.x + 'px'; + template.style.height = _windowVisibleSize.y + 'px'; + } + + + + _viewportSize.x = self.scrollWrap.clientWidth; + _viewportSize.y = self.scrollWrap.clientHeight; + + _updatePageScrollOffset(); + + _slideSize.x = _viewportSize.x + Math.round(_viewportSize.x * _options.spacing); + _slideSize.y = _viewportSize.y; + + _moveMainScroll(_slideSize.x * _currPositionIndex); + + _shout('beforeResize'); // even may be used for example to switch image sources + + + // don't re-calculate size on inital size update + if(_containerShiftIndex !== undefined) { + + var holder, + item, + hIndex; + + for(var i = 0; i < NUM_HOLDERS; i++) { + holder = _itemHolders[i]; + _setTranslateX( (i+_containerShiftIndex) * _slideSize.x, holder.el.style); + + hIndex = _currentItemIndex+i-1; + + if(_options.loop && _getNumItems() > 2) { + hIndex = _getLoopedId(hIndex); + } + + // update zoom level on items and refresh source (if needsUpdate) + item = _getItemAt( hIndex ); + + // re-render gallery item if `needsUpdate`, + // or doesn't have `bounds` (entirely new slide object) + if( item && (_itemsNeedUpdate || item.needsUpdate || !item.bounds) ) { + + self.cleanSlide( item ); + + self.setContent( holder, hIndex ); + + // if "center" slide + if(i === 1) { + self.currItem = item; + self.updateCurrZoomItem(true); + } + + item.needsUpdate = false; + + } else if(holder.index === -1 && hIndex >= 0) { + // add content first time + self.setContent( holder, hIndex ); + } + if(item && item.container) { + _calculateItemSize(item, _viewportSize); + _setImageSize(item); + _applyZoomPanToItem( item ); + } + + } + _itemsNeedUpdate = false; + } + + _startZoomLevel = _currZoomLevel = self.currItem.initialZoomLevel; + _currPanBounds = self.currItem.bounds; + + if(_currPanBounds) { + _panOffset.x = _currPanBounds.center.x; + _panOffset.y = _currPanBounds.center.y; + _applyCurrentZoomPan( true ); + } + + _shout('resize'); + }, + + // Zoom current item to + zoomTo: function(destZoomLevel, centerPoint, speed, easingFn, updateFn) { + /* + if(destZoomLevel === 'fit') { + destZoomLevel = self.currItem.fitRatio; + } else if(destZoomLevel === 'fill') { + destZoomLevel = self.currItem.fillRatio; + } + */ + + if(centerPoint) { + _startZoomLevel = _currZoomLevel; + _midZoomPoint.x = Math.abs(centerPoint.x) - _panOffset.x ; + _midZoomPoint.y = Math.abs(centerPoint.y) - _panOffset.y ; + _equalizePoints(_startPanOffset, _panOffset); + } + + var destPanBounds = _calculatePanBounds(destZoomLevel, false), + destPanOffset = {}; + + _modifyDestPanOffset('x', destPanBounds, destPanOffset, destZoomLevel); + _modifyDestPanOffset('y', destPanBounds, destPanOffset, destZoomLevel); + + var initialZoomLevel = _currZoomLevel; + var initialPanOffset = { + x: _panOffset.x, + y: _panOffset.y + }; + + _roundPoint(destPanOffset); + + var onUpdate = function(now) { + if(now === 1) { + _currZoomLevel = destZoomLevel; + _panOffset.x = destPanOffset.x; + _panOffset.y = destPanOffset.y; + } else { + _currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel; + _panOffset.x = (destPanOffset.x - initialPanOffset.x) * now + initialPanOffset.x; + _panOffset.y = (destPanOffset.y - initialPanOffset.y) * now + initialPanOffset.y; + } + + if(updateFn) { + updateFn(now); + } + + _applyCurrentZoomPan( now === 1 ); + }; + + if(speed) { + _animateProp('customZoomTo', 0, 1, speed, easingFn || framework.easing.sine.inOut, onUpdate); + } else { + onUpdate(1); + } + } + + +}; + + +/*>>core*/ + +/*>>gestures*/ +/** + * Mouse/touch/pointer event handlers. + * + * separated from @core.js for readability + */ + +var MIN_SWIPE_DISTANCE = 30, + DIRECTION_CHECK_OFFSET = 10; // amount of pixels to drag to determine direction of swipe + +var _gestureStartTime, + _gestureCheckSpeedTime, + + // pool of objects that are used during dragging of zooming + p = {}, // first point + p2 = {}, // second point (for zoom gesture) + delta = {}, + _currPoint = {}, + _startPoint = {}, + _currPointers = [], + _startMainScrollPos = {}, + _releaseAnimData, + _posPoints = [], // array of points during dragging, used to determine type of gesture + _tempPoint = {}, + + _isZoomingIn, + _verticalDragInitiated, + _oldAndroidTouchEndTimeout, + _currZoomedItemIndex = 0, + _centerPoint = _getEmptyPoint(), + _lastReleaseTime = 0, + _isDragging, // at least one pointer is down + _isMultitouch, // at least two _pointers are down + _zoomStarted, // zoom level changed during zoom gesture + _moved, + _dragAnimFrame, + _mainScrollShifted, + _currentPoints, // array of current touch points + _isZooming, + _currPointsDistance, + _startPointsDistance, + _currPanBounds, + _mainScrollPos = _getEmptyPoint(), + _currZoomElementStyle, + _mainScrollAnimating, // true, if animation after swipe gesture is running + _midZoomPoint = _getEmptyPoint(), + _currCenterPoint = _getEmptyPoint(), + _direction, + _isFirstMove, + _opacityChanged, + _bgOpacity, + _wasOverInitialZoom, + + _isEqualPoints = function(p1, p2) { + return p1.x === p2.x && p1.y === p2.y; + }, + _isNearbyPoints = function(touch0, touch1) { + return Math.abs(touch0.x - touch1.x) < DOUBLE_TAP_RADIUS && Math.abs(touch0.y - touch1.y) < DOUBLE_TAP_RADIUS; + }, + _calculatePointsDistance = function(p1, p2) { + _tempPoint.x = Math.abs( p1.x - p2.x ); + _tempPoint.y = Math.abs( p1.y - p2.y ); + return Math.sqrt(_tempPoint.x * _tempPoint.x + _tempPoint.y * _tempPoint.y); + }, + _stopDragUpdateLoop = function() { + if(_dragAnimFrame) { + _cancelAF(_dragAnimFrame); + _dragAnimFrame = null; + } + }, + _dragUpdateLoop = function() { + if(_isDragging) { + _dragAnimFrame = _requestAF(_dragUpdateLoop); + _renderMovement(); + } + }, + _canPan = function() { + return !(_options.scaleMode === 'fit' && _currZoomLevel === self.currItem.initialZoomLevel); + }, + + // find the closest parent DOM element + _closestElement = function(el, fn) { + if(!el || el === document) { + return false; + } + + // don't search elements above pswp__scroll-wrap + if(el.getAttribute('class') && el.getAttribute('class').indexOf('pswp__scroll-wrap') > -1 ) { + return false; + } + + if( fn(el) ) { + return el; + } + + return _closestElement(el.parentNode, fn); + }, + + _preventObj = {}, + _preventDefaultEventBehaviour = function(e, isDown) { + _preventObj.prevent = !_closestElement(e.target, _options.isClickableElement); + + _shout('preventDragEvent', e, isDown, _preventObj); + return _preventObj.prevent; + + }, + _convertTouchToPoint = function(touch, p) { + p.x = touch.pageX; + p.y = touch.pageY; + p.id = touch.identifier; + return p; + }, + _findCenterOfPoints = function(p1, p2, pCenter) { + pCenter.x = (p1.x + p2.x) * 0.5; + pCenter.y = (p1.y + p2.y) * 0.5; + }, + _pushPosPoint = function(time, x, y) { + if(time - _gestureCheckSpeedTime > 50) { + var o = _posPoints.length > 2 ? _posPoints.shift() : {}; + o.x = x; + o.y = y; + _posPoints.push(o); + _gestureCheckSpeedTime = time; + } + }, + + _calculateVerticalDragOpacityRatio = function() { + var yOffset = _panOffset.y - self.currItem.initialPosition.y; // difference between initial and current position + return 1 - Math.abs( yOffset / (_viewportSize.y / 2) ); + }, + + + // points pool, reused during touch events + _ePoint1 = {}, + _ePoint2 = {}, + _tempPointsArr = [], + _tempCounter, + _getTouchPoints = function(e) { + // clean up previous points, without recreating array + while(_tempPointsArr.length > 0) { + _tempPointsArr.pop(); + } + + if(!_pointerEventEnabled) { + if(e.type.indexOf('touch') > -1) { + + if(e.touches && e.touches.length > 0) { + _tempPointsArr[0] = _convertTouchToPoint(e.touches[0], _ePoint1); + if(e.touches.length > 1) { + _tempPointsArr[1] = _convertTouchToPoint(e.touches[1], _ePoint2); + } + } + + } else { + _ePoint1.x = e.pageX; + _ePoint1.y = e.pageY; + _ePoint1.id = ''; + _tempPointsArr[0] = _ePoint1;//_ePoint1; + } + } else { + _tempCounter = 0; + // we can use forEach, as pointer events are supported only in modern browsers + _currPointers.forEach(function(p) { + if(_tempCounter === 0) { + _tempPointsArr[0] = p; + } else if(_tempCounter === 1) { + _tempPointsArr[1] = p; + } + _tempCounter++; + + }); + } + return _tempPointsArr; + }, + + _panOrMoveMainScroll = function(axis, delta) { + + var panFriction, + overDiff = 0, + newOffset = _panOffset[axis] + delta[axis], + startOverDiff, + dir = delta[axis] > 0, + newMainScrollPosition = _mainScrollPos.x + delta.x, + mainScrollDiff = _mainScrollPos.x - _startMainScrollPos.x, + newPanPos, + newMainScrollPos; + + // calculate fdistance over the bounds and friction + if(newOffset > _currPanBounds.min[axis] || newOffset < _currPanBounds.max[axis]) { + panFriction = _options.panEndFriction; + // Linear increasing of friction, so at 1/4 of viewport it's at max value. + // Looks not as nice as was expected. Left for history. + // panFriction = (1 - (_panOffset[axis] + delta[axis] + panBounds.min[axis]) / (_viewportSize[axis] / 4) ); + } else { + panFriction = 1; + } + + newOffset = _panOffset[axis] + delta[axis] * panFriction; + + // move main scroll or start panning + if(_options.allowPanToNext || _currZoomLevel === self.currItem.initialZoomLevel) { + + + if(!_currZoomElementStyle) { + + newMainScrollPos = newMainScrollPosition; + + } else if(_direction === 'h' && axis === 'x' && !_zoomStarted ) { + + if(dir) { + if(newOffset > _currPanBounds.min[axis]) { + panFriction = _options.panEndFriction; + overDiff = _currPanBounds.min[axis] - newOffset; + startOverDiff = _currPanBounds.min[axis] - _startPanOffset[axis]; + } + + // drag right + if( (startOverDiff <= 0 || mainScrollDiff < 0) && _getNumItems() > 1 ) { + newMainScrollPos = newMainScrollPosition; + if(mainScrollDiff < 0 && newMainScrollPosition > _startMainScrollPos.x) { + newMainScrollPos = _startMainScrollPos.x; + } + } else { + if(_currPanBounds.min.x !== _currPanBounds.max.x) { + newPanPos = newOffset; + } + + } + + } else { + + if(newOffset < _currPanBounds.max[axis] ) { + panFriction =_options.panEndFriction; + overDiff = newOffset - _currPanBounds.max[axis]; + startOverDiff = _startPanOffset[axis] - _currPanBounds.max[axis]; + } + + if( (startOverDiff <= 0 || mainScrollDiff > 0) && _getNumItems() > 1 ) { + newMainScrollPos = newMainScrollPosition; + + if(mainScrollDiff > 0 && newMainScrollPosition < _startMainScrollPos.x) { + newMainScrollPos = _startMainScrollPos.x; + } + + } else { + if(_currPanBounds.min.x !== _currPanBounds.max.x) { + newPanPos = newOffset; + } + } + + } + + + // + } + + if(axis === 'x') { + + if(newMainScrollPos !== undefined) { + _moveMainScroll(newMainScrollPos, true); + if(newMainScrollPos === _startMainScrollPos.x) { + _mainScrollShifted = false; + } else { + _mainScrollShifted = true; + } + } + + if(_currPanBounds.min.x !== _currPanBounds.max.x) { + if(newPanPos !== undefined) { + _panOffset.x = newPanPos; + } else if(!_mainScrollShifted) { + _panOffset.x += delta.x * panFriction; + } + } + + return newMainScrollPos !== undefined; + } + + } + + if(!_mainScrollAnimating) { + + if(!_mainScrollShifted) { + if(_currZoomLevel > self.currItem.fitRatio) { + _panOffset[axis] += delta[axis] * panFriction; + + } + } + + + } + + }, + + // Pointerdown/touchstart/mousedown handler + _onDragStart = function(e) { + + // Allow dragging only via left mouse button. + // As this handler is not added in IE8 - we ignore e.which + // + // http://www.quirksmode.org/js/events_properties.html + // https://developer.mozilla.org/en-US/docs/Web/API/event.button + if(e.type === 'mousedown' && e.button > 0 ) { + return; + } + + if(_initialZoomRunning) { + e.preventDefault(); + return; + } + + if(_oldAndroidTouchEndTimeout && e.type === 'mousedown') { + return; + } + + if(_preventDefaultEventBehaviour(e, true)) { + e.preventDefault(); + } + + + + _shout('pointerDown'); + + if(_pointerEventEnabled) { + var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id'); + if(pointerIndex < 0) { + pointerIndex = _currPointers.length; + } + _currPointers[pointerIndex] = {x:e.pageX, y:e.pageY, id: e.pointerId}; + } + + + + var startPointsList = _getTouchPoints(e), + numPoints = startPointsList.length; + + _currentPoints = null; + + _stopAllAnimations(); + + // init drag + if(!_isDragging || numPoints === 1) { + + + + _isDragging = _isFirstMove = true; + framework.bind(window, _upMoveEvents, self); + + _isZoomingIn = + _wasOverInitialZoom = + _opacityChanged = + _verticalDragInitiated = + _mainScrollShifted = + _moved = + _isMultitouch = + _zoomStarted = false; + + _direction = null; + + _shout('firstTouchStart', startPointsList); + + _equalizePoints(_startPanOffset, _panOffset); + + _currPanDist.x = _currPanDist.y = 0; + _equalizePoints(_currPoint, startPointsList[0]); + _equalizePoints(_startPoint, _currPoint); + + //_equalizePoints(_startMainScrollPos, _mainScrollPos); + _startMainScrollPos.x = _slideSize.x * _currPositionIndex; + + _posPoints = [{ + x: _currPoint.x, + y: _currPoint.y + }]; + + _gestureCheckSpeedTime = _gestureStartTime = _getCurrentTime(); + + //_mainScrollAnimationEnd(true); + _calculatePanBounds( _currZoomLevel, true ); + + // Start rendering + _stopDragUpdateLoop(); + _dragUpdateLoop(); + + } + + // init zoom + if(!_isZooming && numPoints > 1 && !_mainScrollAnimating && !_mainScrollShifted) { + _startZoomLevel = _currZoomLevel; + _zoomStarted = false; // true if zoom changed at least once + + _isZooming = _isMultitouch = true; + _currPanDist.y = _currPanDist.x = 0; + + _equalizePoints(_startPanOffset, _panOffset); + + _equalizePoints(p, startPointsList[0]); + _equalizePoints(p2, startPointsList[1]); + + _findCenterOfPoints(p, p2, _currCenterPoint); + + _midZoomPoint.x = Math.abs(_currCenterPoint.x) - _panOffset.x; + _midZoomPoint.y = Math.abs(_currCenterPoint.y) - _panOffset.y; + _currPointsDistance = _startPointsDistance = _calculatePointsDistance(p, p2); + } + + + }, + + // Pointermove/touchmove/mousemove handler + _onDragMove = function(e) { + + e.preventDefault(); + + if(_pointerEventEnabled) { + var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id'); + if(pointerIndex > -1) { + var p = _currPointers[pointerIndex]; + p.x = e.pageX; + p.y = e.pageY; + } + } + + if(_isDragging) { + var touchesList = _getTouchPoints(e); + if(!_direction && !_moved && !_isZooming) { + + if(_mainScrollPos.x !== _slideSize.x * _currPositionIndex) { + // if main scroll position is shifted – direction is always horizontal + _direction = 'h'; + } else { + var diff = Math.abs(touchesList[0].x - _currPoint.x) - Math.abs(touchesList[0].y - _currPoint.y); + // check the direction of movement + if(Math.abs(diff) >= DIRECTION_CHECK_OFFSET) { + _direction = diff > 0 ? 'h' : 'v'; + _currentPoints = touchesList; + } + } + + } else { + _currentPoints = touchesList; + } + } + }, + // + _renderMovement = function() { + + if(!_currentPoints) { + return; + } + + var numPoints = _currentPoints.length; + + if(numPoints === 0) { + return; + } + + _equalizePoints(p, _currentPoints[0]); + + delta.x = p.x - _currPoint.x; + delta.y = p.y - _currPoint.y; + + if(_isZooming && numPoints > 1) { + // Handle behaviour for more than 1 point + + _currPoint.x = p.x; + _currPoint.y = p.y; + + // check if one of two points changed + if( !delta.x && !delta.y && _isEqualPoints(_currentPoints[1], p2) ) { + return; + } + + _equalizePoints(p2, _currentPoints[1]); + + + if(!_zoomStarted) { + _zoomStarted = true; + _shout('zoomGestureStarted'); + } + + // Distance between two points + var pointsDistance = _calculatePointsDistance(p,p2); + + var zoomLevel = _calculateZoomLevel(pointsDistance); + + // slightly over the of initial zoom level + if(zoomLevel > self.currItem.initialZoomLevel + self.currItem.initialZoomLevel / 15) { + _wasOverInitialZoom = true; + } + + // Apply the friction if zoom level is out of the bounds + var zoomFriction = 1, + minZoomLevel = _getMinZoomLevel(), + maxZoomLevel = _getMaxZoomLevel(); + + if ( zoomLevel < minZoomLevel ) { + + if(_options.pinchToClose && !_wasOverInitialZoom && _startZoomLevel <= self.currItem.initialZoomLevel) { + // fade out background if zooming out + var minusDiff = minZoomLevel - zoomLevel; + var percent = 1 - minusDiff / (minZoomLevel / 1.2); + + _applyBgOpacity(percent); + _shout('onPinchClose', percent); + _opacityChanged = true; + } else { + zoomFriction = (minZoomLevel - zoomLevel) / minZoomLevel; + if(zoomFriction > 1) { + zoomFriction = 1; + } + zoomLevel = minZoomLevel - zoomFriction * (minZoomLevel / 3); + } + + } else if ( zoomLevel > maxZoomLevel ) { + // 1.5 - extra zoom level above the max. E.g. if max is x6, real max 6 + 1.5 = 7.5 + zoomFriction = (zoomLevel - maxZoomLevel) / ( minZoomLevel * 6 ); + if(zoomFriction > 1) { + zoomFriction = 1; + } + zoomLevel = maxZoomLevel + zoomFriction * minZoomLevel; + } + + if(zoomFriction < 0) { + zoomFriction = 0; + } + + // distance between touch points after friction is applied + _currPointsDistance = pointsDistance; + + // _centerPoint - The point in the middle of two pointers + _findCenterOfPoints(p, p2, _centerPoint); + + // paning with two pointers pressed + _currPanDist.x += _centerPoint.x - _currCenterPoint.x; + _currPanDist.y += _centerPoint.y - _currCenterPoint.y; + _equalizePoints(_currCenterPoint, _centerPoint); + + _panOffset.x = _calculatePanOffset('x', zoomLevel); + _panOffset.y = _calculatePanOffset('y', zoomLevel); + + _isZoomingIn = zoomLevel > _currZoomLevel; + _currZoomLevel = zoomLevel; + _applyCurrentZoomPan(); + + } else { + + // handle behaviour for one point (dragging or panning) + + if(!_direction) { + return; + } + + if(_isFirstMove) { + _isFirstMove = false; + + // subtract drag distance that was used during the detection direction + + if( Math.abs(delta.x) >= DIRECTION_CHECK_OFFSET) { + delta.x -= _currentPoints[0].x - _startPoint.x; + } + + if( Math.abs(delta.y) >= DIRECTION_CHECK_OFFSET) { + delta.y -= _currentPoints[0].y - _startPoint.y; + } + } + + _currPoint.x = p.x; + _currPoint.y = p.y; + + // do nothing if pointers position hasn't changed + if(delta.x === 0 && delta.y === 0) { + return; + } + + if(_direction === 'v' && _options.closeOnVerticalDrag) { + if(!_canPan()) { + _currPanDist.y += delta.y; + _panOffset.y += delta.y; + + var opacityRatio = _calculateVerticalDragOpacityRatio(); + + _verticalDragInitiated = true; + _shout('onVerticalDrag', opacityRatio); + + _applyBgOpacity(opacityRatio); + _applyCurrentZoomPan(); + return ; + } + } + + _pushPosPoint(_getCurrentTime(), p.x, p.y); + + _moved = true; + _currPanBounds = self.currItem.bounds; + + var mainScrollChanged = _panOrMoveMainScroll('x', delta); + if(!mainScrollChanged) { + _panOrMoveMainScroll('y', delta); + + _roundPoint(_panOffset); + _applyCurrentZoomPan(); + } + + } + + }, + + // Pointerup/pointercancel/touchend/touchcancel/mouseup event handler + _onDragRelease = function(e) { + + if(_features.isOldAndroid ) { + + if(_oldAndroidTouchEndTimeout && e.type === 'mouseup') { + return; + } + + // on Android (v4.1, 4.2, 4.3 & possibly older) + // ghost mousedown/up event isn't preventable via e.preventDefault, + // which causes fake mousedown event + // so we block mousedown/up for 600ms + if( e.type.indexOf('touch') > -1 ) { + clearTimeout(_oldAndroidTouchEndTimeout); + _oldAndroidTouchEndTimeout = setTimeout(function() { + _oldAndroidTouchEndTimeout = 0; + }, 600); + } + + } + + _shout('pointerUp'); + + if(_preventDefaultEventBehaviour(e, false)) { + e.preventDefault(); + } + + var releasePoint; + + if(_pointerEventEnabled) { + var pointerIndex = framework.arraySearch(_currPointers, e.pointerId, 'id'); + + if(pointerIndex > -1) { + releasePoint = _currPointers.splice(pointerIndex, 1)[0]; + + if(navigator.msPointerEnabled) { + var MSPOINTER_TYPES = { + 4: 'mouse', // event.MSPOINTER_TYPE_MOUSE + 2: 'touch', // event.MSPOINTER_TYPE_TOUCH + 3: 'pen' // event.MSPOINTER_TYPE_PEN + }; + releasePoint.type = MSPOINTER_TYPES[e.pointerType]; + + if(!releasePoint.type) { + releasePoint.type = e.pointerType || 'mouse'; + } + } else { + releasePoint.type = e.pointerType || 'mouse'; + } + + } + } + + var touchList = _getTouchPoints(e), + gestureType, + numPoints = touchList.length; + + if(e.type === 'mouseup') { + numPoints = 0; + } + + // Do nothing if there were 3 touch points or more + if(numPoints === 2) { + _currentPoints = null; + return true; + } + + // if second pointer released + if(numPoints === 1) { + _equalizePoints(_startPoint, touchList[0]); + } + + + // pointer hasn't moved, send "tap release" point + if(numPoints === 0 && !_direction && !_mainScrollAnimating) { + if(!releasePoint) { + if(e.type === 'mouseup') { + releasePoint = {x: e.pageX, y: e.pageY, type:'mouse'}; + } else if(e.changedTouches && e.changedTouches[0]) { + releasePoint = {x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY, type:'touch'}; + } + } + + _shout('touchRelease', e, releasePoint); + } + + // Difference in time between releasing of two last touch points (zoom gesture) + var releaseTimeDiff = -1; + + // Gesture completed, no pointers left + if(numPoints === 0) { + _isDragging = false; + framework.unbind(window, _upMoveEvents, self); + + _stopDragUpdateLoop(); + + if(_isZooming) { + // Two points released at the same time + releaseTimeDiff = 0; + } else if(_lastReleaseTime !== -1) { + releaseTimeDiff = _getCurrentTime() - _lastReleaseTime; + } + } + _lastReleaseTime = numPoints === 1 ? _getCurrentTime() : -1; + + if(releaseTimeDiff !== -1 && releaseTimeDiff < 150) { + gestureType = 'zoom'; + } else { + gestureType = 'swipe'; + } + + if(_isZooming && numPoints < 2) { + _isZooming = false; + + // Only second point released + if(numPoints === 1) { + gestureType = 'zoomPointerUp'; + } + _shout('zoomGestureEnded'); + } + + _currentPoints = null; + if(!_moved && !_zoomStarted && !_mainScrollAnimating && !_verticalDragInitiated) { + // nothing to animate + return; + } + + _stopAllAnimations(); + + + if(!_releaseAnimData) { + _releaseAnimData = _initDragReleaseAnimationData(); + } + + _releaseAnimData.calculateSwipeSpeed('x'); + + + if(_verticalDragInitiated) { + + var opacityRatio = _calculateVerticalDragOpacityRatio(); + + if(opacityRatio < _options.verticalDragRange) { + self.close(); + } else { + var initalPanY = _panOffset.y, + initialBgOpacity = _bgOpacity; + + _animateProp('verticalDrag', 0, 1, 300, framework.easing.cubic.out, function(now) { + + _panOffset.y = (self.currItem.initialPosition.y - initalPanY) * now + initalPanY; + + _applyBgOpacity( (1 - initialBgOpacity) * now + initialBgOpacity ); + _applyCurrentZoomPan(); + }); + + _shout('onVerticalDrag', 1); + } + + return; + } + + + // main scroll + if( (_mainScrollShifted || _mainScrollAnimating) && numPoints === 0) { + var itemChanged = _finishSwipeMainScrollGesture(gestureType, _releaseAnimData); + if(itemChanged) { + return; + } + gestureType = 'zoomPointerUp'; + } + + // prevent zoom/pan animation when main scroll animation runs + if(_mainScrollAnimating) { + return; + } + + // Complete simple zoom gesture (reset zoom level if it's out of the bounds) + if(gestureType !== 'swipe') { + _completeZoomGesture(); + return; + } + + // Complete pan gesture if main scroll is not shifted, and it's possible to pan current image + if(!_mainScrollShifted && _currZoomLevel > self.currItem.fitRatio) { + _completePanGesture(_releaseAnimData); + } + }, + + + // Returns object with data about gesture + // It's created only once and then reused + _initDragReleaseAnimationData = function() { + // temp local vars + var lastFlickDuration, + tempReleasePos; + + // s = this + var s = { + lastFlickOffset: {}, + lastFlickDist: {}, + lastFlickSpeed: {}, + slowDownRatio: {}, + slowDownRatioReverse: {}, + speedDecelerationRatio: {}, + speedDecelerationRatioAbs: {}, + distanceOffset: {}, + backAnimDestination: {}, + backAnimStarted: {}, + calculateSwipeSpeed: function(axis) { + + + if( _posPoints.length > 1) { + lastFlickDuration = _getCurrentTime() - _gestureCheckSpeedTime + 50; + tempReleasePos = _posPoints[_posPoints.length-2][axis]; + } else { + lastFlickDuration = _getCurrentTime() - _gestureStartTime; // total gesture duration + tempReleasePos = _startPoint[axis]; + } + s.lastFlickOffset[axis] = _currPoint[axis] - tempReleasePos; + s.lastFlickDist[axis] = Math.abs(s.lastFlickOffset[axis]); + if(s.lastFlickDist[axis] > 20) { + s.lastFlickSpeed[axis] = s.lastFlickOffset[axis] / lastFlickDuration; + } else { + s.lastFlickSpeed[axis] = 0; + } + if( Math.abs(s.lastFlickSpeed[axis]) < 0.1 ) { + s.lastFlickSpeed[axis] = 0; + } + + s.slowDownRatio[axis] = 0.95; + s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis]; + s.speedDecelerationRatio[axis] = 1; + }, + + calculateOverBoundsAnimOffset: function(axis, speed) { + if(!s.backAnimStarted[axis]) { + + if(_panOffset[axis] > _currPanBounds.min[axis]) { + s.backAnimDestination[axis] = _currPanBounds.min[axis]; + + } else if(_panOffset[axis] < _currPanBounds.max[axis]) { + s.backAnimDestination[axis] = _currPanBounds.max[axis]; + } + + if(s.backAnimDestination[axis] !== undefined) { + s.slowDownRatio[axis] = 0.7; + s.slowDownRatioReverse[axis] = 1 - s.slowDownRatio[axis]; + if(s.speedDecelerationRatioAbs[axis] < 0.05) { + + s.lastFlickSpeed[axis] = 0; + s.backAnimStarted[axis] = true; + + _animateProp('bounceZoomPan'+axis,_panOffset[axis], + s.backAnimDestination[axis], + speed || 300, + framework.easing.sine.out, + function(pos) { + _panOffset[axis] = pos; + _applyCurrentZoomPan(); + } + ); + + } + } + } + }, + + // Reduces the speed by slowDownRatio (per 10ms) + calculateAnimOffset: function(axis) { + if(!s.backAnimStarted[axis]) { + s.speedDecelerationRatio[axis] = s.speedDecelerationRatio[axis] * (s.slowDownRatio[axis] + + s.slowDownRatioReverse[axis] - + s.slowDownRatioReverse[axis] * s.timeDiff / 10); + + s.speedDecelerationRatioAbs[axis] = Math.abs(s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis]); + s.distanceOffset[axis] = s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis] * s.timeDiff; + _panOffset[axis] += s.distanceOffset[axis]; + + } + }, + + panAnimLoop: function() { + if ( _animations.zoomPan ) { + _animations.zoomPan.raf = _requestAF(s.panAnimLoop); + + s.now = _getCurrentTime(); + s.timeDiff = s.now - s.lastNow; + s.lastNow = s.now; + + s.calculateAnimOffset('x'); + s.calculateAnimOffset('y'); + + _applyCurrentZoomPan(); + + s.calculateOverBoundsAnimOffset('x'); + s.calculateOverBoundsAnimOffset('y'); + + + if (s.speedDecelerationRatioAbs.x < 0.05 && s.speedDecelerationRatioAbs.y < 0.05) { + + // round pan position + _panOffset.x = Math.round(_panOffset.x); + _panOffset.y = Math.round(_panOffset.y); + _applyCurrentZoomPan(); + + _stopAnimation('zoomPan'); + return; + } + } + + } + }; + return s; + }, + + _completePanGesture = function(animData) { + // calculate swipe speed for Y axis (paanning) + animData.calculateSwipeSpeed('y'); + + _currPanBounds = self.currItem.bounds; + + animData.backAnimDestination = {}; + animData.backAnimStarted = {}; + + // Avoid acceleration animation if speed is too low + if(Math.abs(animData.lastFlickSpeed.x) <= 0.05 && Math.abs(animData.lastFlickSpeed.y) <= 0.05 ) { + animData.speedDecelerationRatioAbs.x = animData.speedDecelerationRatioAbs.y = 0; + + // Run pan drag release animation. E.g. if you drag image and release finger without momentum. + animData.calculateOverBoundsAnimOffset('x'); + animData.calculateOverBoundsAnimOffset('y'); + return true; + } + + // Animation loop that controls the acceleration after pan gesture ends + _registerStartAnimation('zoomPan'); + animData.lastNow = _getCurrentTime(); + animData.panAnimLoop(); + }, + + + _finishSwipeMainScrollGesture = function(gestureType, _releaseAnimData) { + var itemChanged; + if(!_mainScrollAnimating) { + _currZoomedItemIndex = _currentItemIndex; + } + + + + var itemsDiff; + + if(gestureType === 'swipe') { + var totalShiftDist = _currPoint.x - _startPoint.x, + isFastLastFlick = _releaseAnimData.lastFlickDist.x < 10; + + // if container is shifted for more than MIN_SWIPE_DISTANCE, + // and last flick gesture was in right direction + if(totalShiftDist > MIN_SWIPE_DISTANCE && + (isFastLastFlick || _releaseAnimData.lastFlickOffset.x > 20) ) { + // go to prev item + itemsDiff = -1; + } else if(totalShiftDist < -MIN_SWIPE_DISTANCE && + (isFastLastFlick || _releaseAnimData.lastFlickOffset.x < -20) ) { + // go to next item + itemsDiff = 1; + } + } + + var nextCircle; + + if(itemsDiff) { + + _currentItemIndex += itemsDiff; + + if(_currentItemIndex < 0) { + _currentItemIndex = _options.loop ? _getNumItems()-1 : 0; + nextCircle = true; + } else if(_currentItemIndex >= _getNumItems()) { + _currentItemIndex = _options.loop ? 0 : _getNumItems()-1; + nextCircle = true; + } + + if(!nextCircle || _options.loop) { + _indexDiff += itemsDiff; + _currPositionIndex -= itemsDiff; + itemChanged = true; + } + + + + } + + var animateToX = _slideSize.x * _currPositionIndex; + var animateToDist = Math.abs( animateToX - _mainScrollPos.x ); + var finishAnimDuration; + + + if(!itemChanged && animateToX > _mainScrollPos.x !== _releaseAnimData.lastFlickSpeed.x > 0) { + // "return to current" duration, e.g. when dragging from slide 0 to -1 + finishAnimDuration = 333; + } else { + finishAnimDuration = Math.abs(_releaseAnimData.lastFlickSpeed.x) > 0 ? + animateToDist / Math.abs(_releaseAnimData.lastFlickSpeed.x) : + 333; + + finishAnimDuration = Math.min(finishAnimDuration, 400); + finishAnimDuration = Math.max(finishAnimDuration, 250); + } + + if(_currZoomedItemIndex === _currentItemIndex) { + itemChanged = false; + } + + _mainScrollAnimating = true; + + _shout('mainScrollAnimStart'); + + _animateProp('mainScroll', _mainScrollPos.x, animateToX, finishAnimDuration, framework.easing.cubic.out, + _moveMainScroll, + function() { + _stopAllAnimations(); + _mainScrollAnimating = false; + _currZoomedItemIndex = -1; + + if(itemChanged || _currZoomedItemIndex !== _currentItemIndex) { + self.updateCurrItem(); + } + + _shout('mainScrollAnimComplete'); + } + ); + + if(itemChanged) { + self.updateCurrItem(true); + } + + return itemChanged; + }, + + _calculateZoomLevel = function(touchesDistance) { + return 1 / _startPointsDistance * touchesDistance * _startZoomLevel; + }, + + // Resets zoom if it's out of bounds + _completeZoomGesture = function() { + var destZoomLevel = _currZoomLevel, + minZoomLevel = _getMinZoomLevel(), + maxZoomLevel = _getMaxZoomLevel(); + + if ( _currZoomLevel < minZoomLevel ) { + destZoomLevel = minZoomLevel; + } else if ( _currZoomLevel > maxZoomLevel ) { + destZoomLevel = maxZoomLevel; + } + + var destOpacity = 1, + onUpdate, + initialOpacity = _bgOpacity; + + if(_opacityChanged && !_isZoomingIn && !_wasOverInitialZoom && _currZoomLevel < minZoomLevel) { + //_closedByScroll = true; + self.close(); + return true; + } + + if(_opacityChanged) { + onUpdate = function(now) { + _applyBgOpacity( (destOpacity - initialOpacity) * now + initialOpacity ); + }; + } + + self.zoomTo(destZoomLevel, 0, 200, framework.easing.cubic.out, onUpdate); + return true; + }; + + +_registerModule('Gestures', { + publicMethods: { + + initGestures: function() { + + // helper function that builds touch/pointer/mouse events + var addEventNames = function(pref, down, move, up, cancel) { + _dragStartEvent = pref + down; + _dragMoveEvent = pref + move; + _dragEndEvent = pref + up; + if(cancel) { + _dragCancelEvent = pref + cancel; + } else { + _dragCancelEvent = ''; + } + }; + + _pointerEventEnabled = _features.pointerEvent; + if(_pointerEventEnabled && _features.touch) { + // we don't need touch events, if browser supports pointer events + _features.touch = false; + } + + if(_pointerEventEnabled) { + if(navigator.msPointerEnabled) { + // IE10 pointer events are case-sensitive + addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); + } else { + addEventNames('pointer', 'down', 'move', 'up', 'cancel'); + } + } else if(_features.touch) { + addEventNames('touch', 'start', 'move', 'end', 'cancel'); + _likelyTouchDevice = true; + } else { + addEventNames('mouse', 'down', 'move', 'up'); + } + + _upMoveEvents = _dragMoveEvent + ' ' + _dragEndEvent + ' ' + _dragCancelEvent; + _downEvents = _dragStartEvent; + + if(_pointerEventEnabled && !_likelyTouchDevice) { + _likelyTouchDevice = (navigator.maxTouchPoints > 1) || (navigator.msMaxTouchPoints > 1); + } + // make variable public + self.likelyTouchDevice = _likelyTouchDevice; + + _globalEventHandlers[_dragStartEvent] = _onDragStart; + _globalEventHandlers[_dragMoveEvent] = _onDragMove; + _globalEventHandlers[_dragEndEvent] = _onDragRelease; // the Kraken + + if(_dragCancelEvent) { + _globalEventHandlers[_dragCancelEvent] = _globalEventHandlers[_dragEndEvent]; + } + + // Bind mouse events on device with detected hardware touch support, in case it supports multiple types of input. + if(_features.touch) { + _downEvents += ' mousedown'; + _upMoveEvents += ' mousemove mouseup'; + _globalEventHandlers.mousedown = _globalEventHandlers[_dragStartEvent]; + _globalEventHandlers.mousemove = _globalEventHandlers[_dragMoveEvent]; + _globalEventHandlers.mouseup = _globalEventHandlers[_dragEndEvent]; + } + + if(!_likelyTouchDevice) { + // don't allow pan to next slide from zoomed state on Desktop + _options.allowPanToNext = false; + } + } + + } +}); + + +/*>>gestures*/ + +/*>>show-hide-transition*/ +/** + * show-hide-transition.js: + * + * Manages initial opening or closing transition. + * + * If you're not planning to use transition for gallery at all, + * you may set options hideAnimationDuration and showAnimationDuration to 0, + * and just delete startAnimation function. + * + */ + + +var _showOrHideTimeout, + _showOrHide = function(item, img, out, completeFn) { + + if(_showOrHideTimeout) { + clearTimeout(_showOrHideTimeout); + } + + _initialZoomRunning = true; + _initialContentSet = true; + + // dimensions of small thumbnail {x:,y:,w:}. + // Height is optional, as calculated based on large image. + var thumbBounds; + if(item.initialLayout) { + thumbBounds = item.initialLayout; + item.initialLayout = null; + } else { + thumbBounds = _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex); + } + + var duration = out ? _options.hideAnimationDuration : _options.showAnimationDuration; + + var onComplete = function() { + _stopAnimation('initialZoom'); + if(!out) { + _applyBgOpacity(1); + if(img) { + img.style.display = 'block'; + } + framework.addClass(template, 'pswp--animated-in'); + _shout('initialZoom' + (out ? 'OutEnd' : 'InEnd')); + } else { + self.template.removeAttribute('style'); + self.bg.removeAttribute('style'); + } + + if(completeFn) { + completeFn(); + } + _initialZoomRunning = false; + }; + + // if bounds aren't provided, just open gallery without animation + if(!duration || !thumbBounds || thumbBounds.x === undefined) { + + _shout('initialZoom' + (out ? 'Out' : 'In') ); + + _currZoomLevel = item.initialZoomLevel; + _equalizePoints(_panOffset, item.initialPosition ); + _applyCurrentZoomPan(); + + template.style.opacity = out ? 0 : 1; + _applyBgOpacity(1); + + if(duration) { + setTimeout(function() { + onComplete(); + }, duration); + } else { + onComplete(); + } + + return; + } + + var startAnimation = function() { + var closeWithRaf = _closedByScroll, + fadeEverything = !self.currItem.src || self.currItem.loadError || _options.showHideOpacity; + + // apply hw-acceleration to image + if(item.miniImg) { + item.miniImg.style.webkitBackfaceVisibility = 'hidden'; + } + + if(!out) { + _currZoomLevel = thumbBounds.w / item.w; + _panOffset.x = thumbBounds.x; + _panOffset.y = thumbBounds.y - _initalWindowScrollY; + + self[fadeEverything ? 'template' : 'bg'].style.opacity = 0.001; + _applyCurrentZoomPan(); + } + + _registerStartAnimation('initialZoom'); + + if(out && !closeWithRaf) { + framework.removeClass(template, 'pswp--animated-in'); + } + + if(fadeEverything) { + if(out) { + framework[ (closeWithRaf ? 'remove' : 'add') + 'Class' ](template, 'pswp--animate_opacity'); + } else { + setTimeout(function() { + framework.addClass(template, 'pswp--animate_opacity'); + }, 30); + } + } + + _showOrHideTimeout = setTimeout(function() { + + _shout('initialZoom' + (out ? 'Out' : 'In') ); + + + if(!out) { + + // "in" animation always uses CSS transitions (instead of rAF). + // CSS transition work faster here, + // as developer may also want to animate other things, + // like ui on top of sliding area, which can be animated just via CSS + + _currZoomLevel = item.initialZoomLevel; + _equalizePoints(_panOffset, item.initialPosition ); + _applyCurrentZoomPan(); + _applyBgOpacity(1); + + if(fadeEverything) { + template.style.opacity = 1; + } else { + _applyBgOpacity(1); + } + + _showOrHideTimeout = setTimeout(onComplete, duration + 20); + } else { + + // "out" animation uses rAF only when PhotoSwipe is closed by browser scroll, to recalculate position + var destZoomLevel = thumbBounds.w / item.w, + initialPanOffset = { + x: _panOffset.x, + y: _panOffset.y + }, + initialZoomLevel = _currZoomLevel, + initalBgOpacity = _bgOpacity, + onUpdate = function(now) { + + if(now === 1) { + _currZoomLevel = destZoomLevel; + _panOffset.x = thumbBounds.x; + _panOffset.y = thumbBounds.y - _currentWindowScrollY; + } else { + _currZoomLevel = (destZoomLevel - initialZoomLevel) * now + initialZoomLevel; + _panOffset.x = (thumbBounds.x - initialPanOffset.x) * now + initialPanOffset.x; + _panOffset.y = (thumbBounds.y - _currentWindowScrollY - initialPanOffset.y) * now + initialPanOffset.y; + } + + _applyCurrentZoomPan(); + if(fadeEverything) { + template.style.opacity = 1 - now; + } else { + _applyBgOpacity( initalBgOpacity - now * initalBgOpacity ); + } + }; + + if(closeWithRaf) { + _animateProp('initialZoom', 0, 1, duration, framework.easing.cubic.out, onUpdate, onComplete); + } else { + onUpdate(1); + _showOrHideTimeout = setTimeout(onComplete, duration + 20); + } + } + + }, out ? 25 : 90); // Main purpose of this delay is to give browser time to paint and + // create composite layers of PhotoSwipe UI parts (background, controls, caption, arrows). + // Which avoids lag at the beginning of scale transition. + }; + startAnimation(); + + + }; + +/*>>show-hide-transition*/ + +/*>>items-controller*/ +/** +* +* Controller manages gallery items, their dimensions, and their content. +* +*/ + +var _items, + _tempPanAreaSize = {}, + _imagesToAppendPool = [], + _initialContentSet, + _initialZoomRunning, + _controllerDefaultOptions = { + index: 0, + errorMsg: '
The image could not be loaded.
', + forceProgressiveLoading: false, // TODO + preload: [1,1], + getNumItemsFn: function() { + return _items.length; + } + }; + + +var _getItemAt, + _getNumItems, + _initialIsLoop, + _getZeroBounds = function() { + return { + center:{x:0,y:0}, + max:{x:0,y:0}, + min:{x:0,y:0} + }; + }, + _calculateSingleItemPanBounds = function(item, realPanElementW, realPanElementH ) { + var bounds = item.bounds; + + // position of element when it's centered + bounds.center.x = Math.round((_tempPanAreaSize.x - realPanElementW) / 2); + bounds.center.y = Math.round((_tempPanAreaSize.y - realPanElementH) / 2) + item.vGap.top; + + // maximum pan position + bounds.max.x = (realPanElementW > _tempPanAreaSize.x) ? + Math.round(_tempPanAreaSize.x - realPanElementW) : + bounds.center.x; + + bounds.max.y = (realPanElementH > _tempPanAreaSize.y) ? + Math.round(_tempPanAreaSize.y - realPanElementH) + item.vGap.top : + bounds.center.y; + + // minimum pan position + bounds.min.x = (realPanElementW > _tempPanAreaSize.x) ? 0 : bounds.center.x; + bounds.min.y = (realPanElementH > _tempPanAreaSize.y) ? item.vGap.top : bounds.center.y; + }, + _calculateItemSize = function(item, viewportSize, zoomLevel) { + + if (item.src && !item.loadError) { + var isInitial = !zoomLevel; + + if(isInitial) { + if(!item.vGap) { + item.vGap = {top:0,bottom:0}; + } + // allows overriding vertical margin for individual items + _shout('parseVerticalMargin', item); + } + + + _tempPanAreaSize.x = viewportSize.x; + _tempPanAreaSize.y = viewportSize.y - item.vGap.top - item.vGap.bottom; + + if (isInitial) { + var hRatio = _tempPanAreaSize.x / item.w; + var vRatio = _tempPanAreaSize.y / item.h; + + item.fitRatio = hRatio < vRatio ? hRatio : vRatio; + //item.fillRatio = hRatio > vRatio ? hRatio : vRatio; + + var scaleMode = _options.scaleMode; + + if (scaleMode === 'orig') { + zoomLevel = 1; + } else if (scaleMode === 'fit') { + zoomLevel = item.fitRatio; + } + + if (zoomLevel > 1) { + zoomLevel = 1; + } + + item.initialZoomLevel = zoomLevel; + + if(!item.bounds) { + // reuse bounds object + item.bounds = _getZeroBounds(); + } + } + + if(!zoomLevel) { + return; + } + + _calculateSingleItemPanBounds(item, item.w * zoomLevel, item.h * zoomLevel); + + if (isInitial && zoomLevel === item.initialZoomLevel) { + item.initialPosition = item.bounds.center; + } + + return item.bounds; + } else { + item.w = item.h = 0; + item.initialZoomLevel = item.fitRatio = 1; + item.bounds = _getZeroBounds(); + item.initialPosition = item.bounds.center; + + // if it's not image, we return zero bounds (content is not zoomable) + return item.bounds; + } + + }, + + + + + _appendImage = function(index, item, baseDiv, img, preventAnimation, keepPlaceholder) { + + + if(item.loadError) { + return; + } + + if(img) { + + item.imageAppended = true; + _setImageSize(item, img, (item === self.currItem && _renderMaxResolution) ); + + baseDiv.appendChild(img); + + if(keepPlaceholder) { + setTimeout(function() { + if(item && item.loaded && item.placeholder) { + item.placeholder.style.display = 'none'; + item.placeholder = null; + } + }, 500); + } + } + }, + + + + _preloadImage = function(item) { + item.loading = true; + item.loaded = false; + var img = item.img = framework.createEl('pswp__img', 'img'); + var onComplete = function() { + item.loading = false; + item.loaded = true; + + if(item.loadComplete) { + item.loadComplete(item); + } else { + item.img = null; // no need to store image object + } + img.onload = img.onerror = null; + img = null; + }; + img.onload = onComplete; + img.onerror = function() { + item.loadError = true; + onComplete(); + }; + + img.src = item.src;// + '?a=' + Math.random(); + + return img; + }, + _checkForError = function(item, cleanUp) { + if(item.src && item.loadError && item.container) { + + if(cleanUp) { + item.container.innerHTML = ''; + } + + item.container.innerHTML = _options.errorMsg.replace('%url%', item.src ); + return true; + + } + }, + _setImageSize = function(item, img, maxRes) { + if(!item.src) { + return; + } + + if(!img) { + img = item.container.lastChild; + } + + var w = maxRes ? item.w : Math.round(item.w * item.fitRatio), + h = maxRes ? item.h : Math.round(item.h * item.fitRatio); + + if(item.placeholder && !item.loaded) { + item.placeholder.style.width = w + 'px'; + item.placeholder.style.height = h + 'px'; + } + + img.style.width = w + 'px'; + img.style.height = h + 'px'; + }, + _appendImagesPool = function() { + + if(_imagesToAppendPool.length) { + var poolItem; + + for(var i = 0; i < _imagesToAppendPool.length; i++) { + poolItem = _imagesToAppendPool[i]; + if( poolItem.holder.index === poolItem.index ) { + _appendImage(poolItem.index, poolItem.item, poolItem.baseDiv, poolItem.img, false, poolItem.clearPlaceholder); + } + } + _imagesToAppendPool = []; + } + }; + + + +_registerModule('Controller', { + + publicMethods: { + + lazyLoadItem: function(index) { + index = _getLoopedId(index); + var item = _getItemAt(index); + + if(!item || ((item.loaded || item.loading) && !_itemsNeedUpdate)) { + return; + } + + _shout('gettingData', index, item); + + if (!item.src) { + return; + } + + _preloadImage(item); + }, + initController: function() { + framework.extend(_options, _controllerDefaultOptions, true); + self.items = _items = items; + _getItemAt = self.getItemAt; + _getNumItems = _options.getNumItemsFn; //self.getNumItems; + + + + _initialIsLoop = _options.loop; + if(_getNumItems() < 3) { + _options.loop = false; // disable loop if less then 3 items + } + + _listen('beforeChange', function(diff) { + + var p = _options.preload, + isNext = diff === null ? true : (diff >= 0), + preloadBefore = Math.min(p[0], _getNumItems() ), + preloadAfter = Math.min(p[1], _getNumItems() ), + i; + + + for(i = 1; i <= (isNext ? preloadAfter : preloadBefore); i++) { + self.lazyLoadItem(_currentItemIndex+i); + } + for(i = 1; i <= (isNext ? preloadBefore : preloadAfter); i++) { + self.lazyLoadItem(_currentItemIndex-i); + } + }); + + _listen('initialLayout', function() { + self.currItem.initialLayout = _options.getThumbBoundsFn && _options.getThumbBoundsFn(_currentItemIndex); + }); + + _listen('mainScrollAnimComplete', _appendImagesPool); + _listen('initialZoomInEnd', _appendImagesPool); + + + + _listen('destroy', function() { + var item; + for(var i = 0; i < _items.length; i++) { + item = _items[i]; + // remove reference to DOM elements, for GC + if(item.container) { + item.container = null; + } + if(item.placeholder) { + item.placeholder = null; + } + if(item.img) { + item.img = null; + } + if(item.preloader) { + item.preloader = null; + } + if(item.loadError) { + item.loaded = item.loadError = false; + } + } + _imagesToAppendPool = null; + }); + }, + + + getItemAt: function(index) { + if (index >= 0) { + return _items[index] !== undefined ? _items[index] : false; + } + return false; + }, + + allowProgressiveImg: function() { + // 1. Progressive image loading isn't working on webkit/blink + // when hw-acceleration (e.g. translateZ) is applied to IMG element. + // That's why in PhotoSwipe parent element gets zoom transform, not image itself. + // + // 2. Progressive image loading sometimes blinks in webkit/blink when applying animation to parent element. + // That's why it's disabled on touch devices (mainly because of swipe transition) + // + // 3. Progressive image loading sometimes doesn't work in IE (up to 11). + + // Don't allow progressive loading on non-large touch devices + return _options.forceProgressiveLoading || !_likelyTouchDevice || _options.mouseUsed || screen.width > 1200; + // 1200 - to eliminate touch devices with large screen (like Chromebook Pixel) + }, + + setContent: function(holder, index) { + + if(_options.loop) { + index = _getLoopedId(index); + } + + var prevItem = self.getItemAt(holder.index); + if(prevItem) { + prevItem.container = null; + } + + var item = self.getItemAt(index), + img; + + if(!item) { + holder.el.innerHTML = ''; + return; + } + + // allow to override data + _shout('gettingData', index, item); + + holder.index = index; + holder.item = item; + + // base container DIV is created only once for each of 3 holders + var baseDiv = item.container = framework.createEl('pswp__zoom-wrap'); + + + + if(!item.src && item.html) { + if(item.html.tagName) { + baseDiv.appendChild(item.html); + } else { + baseDiv.innerHTML = item.html; + } + } + + _checkForError(item); + + _calculateItemSize(item, _viewportSize); + + if(item.src && !item.loadError && !item.loaded) { + + item.loadComplete = function(item) { + + // gallery closed before image finished loading + if(!_isOpen) { + return; + } + + // check if holder hasn't changed while image was loading + if(holder && holder.index === index ) { + if( _checkForError(item, true) ) { + item.loadComplete = item.img = null; + _calculateItemSize(item, _viewportSize); + _applyZoomPanToItem(item); + + if(holder.index === _currentItemIndex) { + // recalculate dimensions + self.updateCurrZoomItem(); + } + return; + } + if( !item.imageAppended ) { + if(_features.transform && (_mainScrollAnimating || _initialZoomRunning) ) { + _imagesToAppendPool.push({ + item:item, + baseDiv:baseDiv, + img:item.img, + index:index, + holder:holder, + clearPlaceholder:true + }); + } else { + _appendImage(index, item, baseDiv, item.img, _mainScrollAnimating || _initialZoomRunning, true); + } + } else { + // remove preloader & mini-img + if(!_initialZoomRunning && item.placeholder) { + item.placeholder.style.display = 'none'; + item.placeholder = null; + } + } + } + + item.loadComplete = null; + item.img = null; // no need to store image element after it's added + + _shout('imageLoadComplete', index, item); + }; + + if(framework.features.transform) { + + var placeholderClassName = 'pswp__img pswp__img--placeholder'; + placeholderClassName += (item.msrc ? '' : ' pswp__img--placeholder--blank'); + + var placeholder = framework.createEl(placeholderClassName, item.msrc ? 'img' : ''); + if(item.msrc) { + placeholder.src = item.msrc; + } + + _setImageSize(item, placeholder); + + baseDiv.appendChild(placeholder); + item.placeholder = placeholder; + + } + + + + + if(!item.loading) { + _preloadImage(item); + } + + + if( self.allowProgressiveImg() ) { + // just append image + if(!_initialContentSet && _features.transform) { + _imagesToAppendPool.push({ + item:item, + baseDiv:baseDiv, + img:item.img, + index:index, + holder:holder + }); + } else { + _appendImage(index, item, baseDiv, item.img, true, true); + } + } + + } else if(item.src && !item.loadError) { + // image object is created every time, due to bugs of image loading & delay when switching images + img = framework.createEl('pswp__img', 'img'); + img.style.opacity = 1; + img.src = item.src; + _setImageSize(item, img); + _appendImage(index, item, baseDiv, img, true); + } + + + if(!_initialContentSet && index === _currentItemIndex) { + _currZoomElementStyle = baseDiv.style; + _showOrHide(item, (img ||item.img) ); + } else { + _applyZoomPanToItem(item); + } + + holder.el.innerHTML = ''; + holder.el.appendChild(baseDiv); + }, + + cleanSlide: function( item ) { + if(item.img ) { + item.img.onload = item.img.onerror = null; + } + item.loaded = item.loading = item.img = item.imageAppended = false; + } + + } +}); + +/*>>items-controller*/ + +/*>>tap*/ +/** + * tap.js: + * + * Displatches tap and double-tap events. + * + */ + +var tapTimer, + tapReleasePoint = {}, + _dispatchTapEvent = function(origEvent, releasePoint, pointerType) { + var e = document.createEvent( 'CustomEvent' ), + eDetail = { + origEvent:origEvent, + target:origEvent.target, + releasePoint: releasePoint, + pointerType:pointerType || 'touch' + }; + + e.initCustomEvent( 'pswpTap', true, true, eDetail ); + origEvent.target.dispatchEvent(e); + }; + +_registerModule('Tap', { + publicMethods: { + initTap: function() { + _listen('firstTouchStart', self.onTapStart); + _listen('touchRelease', self.onTapRelease); + _listen('destroy', function() { + tapReleasePoint = {}; + tapTimer = null; + }); + }, + onTapStart: function(touchList) { + if(touchList.length > 1) { + clearTimeout(tapTimer); + tapTimer = null; + } + }, + onTapRelease: function(e, releasePoint) { + if(!releasePoint) { + return; + } + + if(!_moved && !_isMultitouch && !_numAnimations) { + var p0 = releasePoint; + if(tapTimer) { + clearTimeout(tapTimer); + tapTimer = null; + + // Check if taped on the same place + if ( _isNearbyPoints(p0, tapReleasePoint) ) { + _shout('doubleTap', p0); + return; + } + } + + if(releasePoint.type === 'mouse') { + _dispatchTapEvent(e, releasePoint, 'mouse'); + return; + } + + var clickedTagName = e.target.tagName.toUpperCase(); + // avoid double tap delay on buttons and elements that have class pswp__single-tap + if(clickedTagName === 'BUTTON' || framework.hasClass(e.target, 'pswp__single-tap') ) { + _dispatchTapEvent(e, releasePoint); + return; + } + + _equalizePoints(tapReleasePoint, p0); + + tapTimer = setTimeout(function() { + _dispatchTapEvent(e, releasePoint); + tapTimer = null; + }, 300); + } + } + } +}); + +/*>>tap*/ + +/*>>desktop-zoom*/ +/** + * + * desktop-zoom.js: + * + * - Binds mousewheel event for paning zoomed image. + * - Manages "dragging", "zoomed-in", "zoom-out" classes. + * (which are used for cursors and zoom icon) + * - Adds toggleDesktopZoom function. + * + */ + +var _wheelDelta; + +_registerModule('DesktopZoom', { + + publicMethods: { + + initDesktopZoom: function() { + + if(_oldIE) { + // no zoom for old IE (<=8) + return; + } + + if(_likelyTouchDevice) { + // if detected hardware touch support, we wait until mouse is used, + // and only then apply desktop-zoom features + _listen('mouseUsed', function() { + self.setupDesktopZoom(); + }); + } else { + self.setupDesktopZoom(true); + } + + }, + + setupDesktopZoom: function(onInit) { + + _wheelDelta = {}; + + var events = 'wheel mousewheel DOMMouseScroll'; + + _listen('bindEvents', function() { + framework.bind(template, events, self.handleMouseWheel); + }); + + _listen('unbindEvents', function() { + if(_wheelDelta) { + framework.unbind(template, events, self.handleMouseWheel); + } + }); + + self.mouseZoomedIn = false; + + var hasDraggingClass, + updateZoomable = function() { + if(self.mouseZoomedIn) { + framework.removeClass(template, 'pswp--zoomed-in'); + self.mouseZoomedIn = false; + } + if(_currZoomLevel < 1) { + framework.addClass(template, 'pswp--zoom-allowed'); + } else { + framework.removeClass(template, 'pswp--zoom-allowed'); + } + removeDraggingClass(); + }, + removeDraggingClass = function() { + if(hasDraggingClass) { + framework.removeClass(template, 'pswp--dragging'); + hasDraggingClass = false; + } + }; + + _listen('resize' , updateZoomable); + _listen('afterChange' , updateZoomable); + _listen('pointerDown', function() { + if(self.mouseZoomedIn) { + hasDraggingClass = true; + framework.addClass(template, 'pswp--dragging'); + } + }); + _listen('pointerUp', removeDraggingClass); + + if(!onInit) { + updateZoomable(); + } + + }, + + handleMouseWheel: function(e) { + + if(_currZoomLevel <= self.currItem.fitRatio) { + if( _options.modal ) { + + if (!_options.closeOnScroll || _numAnimations || _isDragging) { + e.preventDefault(); + } else if(_transformKey && Math.abs(e.deltaY) > 2) { + // close PhotoSwipe + // if browser supports transforms & scroll changed enough + _closedByScroll = true; + self.close(); + } + + } + return true; + } + + // allow just one event to fire + e.stopPropagation(); + + // https://developer.mozilla.org/en-US/docs/Web/Events/wheel + _wheelDelta.x = 0; + + if('deltaX' in e) { + if(e.deltaMode === 1 /* DOM_DELTA_LINE */) { + // 18 - average line height + _wheelDelta.x = e.deltaX * 18; + _wheelDelta.y = e.deltaY * 18; + } else { + _wheelDelta.x = e.deltaX; + _wheelDelta.y = e.deltaY; + } + } else if('wheelDelta' in e) { + if(e.wheelDeltaX) { + _wheelDelta.x = -0.16 * e.wheelDeltaX; + } + if(e.wheelDeltaY) { + _wheelDelta.y = -0.16 * e.wheelDeltaY; + } else { + _wheelDelta.y = -0.16 * e.wheelDelta; + } + } else if('detail' in e) { + _wheelDelta.y = e.detail; + } else { + return; + } + + _calculatePanBounds(_currZoomLevel, true); + + var newPanX = _panOffset.x - _wheelDelta.x, + newPanY = _panOffset.y - _wheelDelta.y; + + // only prevent scrolling in nonmodal mode when not at edges + if (_options.modal || + ( + newPanX <= _currPanBounds.min.x && newPanX >= _currPanBounds.max.x && + newPanY <= _currPanBounds.min.y && newPanY >= _currPanBounds.max.y + ) ) { + e.preventDefault(); + } + + // TODO: use rAF instead of mousewheel? + self.panTo(newPanX, newPanY); + }, + + toggleDesktopZoom: function(centerPoint) { + centerPoint = centerPoint || {x:_viewportSize.x/2 + _offset.x, y:_viewportSize.y/2 + _offset.y }; + + var doubleTapZoomLevel = _options.getDoubleTapZoom(true, self.currItem); + var zoomOut = _currZoomLevel === doubleTapZoomLevel; + + self.mouseZoomedIn = !zoomOut; + + self.zoomTo(zoomOut ? self.currItem.initialZoomLevel : doubleTapZoomLevel, centerPoint, 333); + framework[ (!zoomOut ? 'add' : 'remove') + 'Class'](template, 'pswp--zoomed-in'); + } + + } +}); + + +/*>>desktop-zoom*/ + +/*>>history*/ +/** + * + * history.js: + * + * - Back button to close gallery. + * + * - Unique URL for each slide: example.com/&pid=1&gid=3 + * (where PID is picture index, and GID and gallery index) + * + * - Switch URL when slides change. + * + */ + + +var _historyDefaultOptions = { + history: true, + galleryUID: 1 +}; + +var _historyUpdateTimeout, + _hashChangeTimeout, + _hashAnimCheckTimeout, + _hashChangedByScript, + _hashChangedByHistory, + _hashReseted, + _initialHash, + _historyChanged, + _closedFromURL, + _urlChangedOnce, + _windowLoc, + + _supportsPushState, + + _getHash = function() { + return _windowLoc.hash.substring(1); + }, + _cleanHistoryTimeouts = function() { + + if(_historyUpdateTimeout) { + clearTimeout(_historyUpdateTimeout); + } + + if(_hashAnimCheckTimeout) { + clearTimeout(_hashAnimCheckTimeout); + } + }, + + // pid - Picture index + // gid - Gallery index + _parseItemIndexFromURL = function() { + var hash = _getHash(), + params = {}; + + if(hash.length < 5) { // pid=1 + return params; + } + + var i, vars = hash.split('&'); + for (i = 0; i < vars.length; i++) { + if(!vars[i]) { + continue; + } + var pair = vars[i].split('='); + if(pair.length < 2) { + continue; + } + params[pair[0]] = pair[1]; + } + if(_options.galleryPIDs) { + // detect custom pid in hash and search for it among the items collection + var searchfor = params.pid; + params.pid = 0; // if custom pid cannot be found, fallback to the first item + for(i = 0; i < _items.length; i++) { + if(_items[i].pid === searchfor) { + params.pid = i; + break; + } + } + } else { + params.pid = parseInt(params.pid,10)-1; + } + if( params.pid < 0 ) { + params.pid = 0; + } + return params; + }, + _updateHash = function() { + + if(_hashAnimCheckTimeout) { + clearTimeout(_hashAnimCheckTimeout); + } + + + if(_numAnimations || _isDragging) { + // changing browser URL forces layout/paint in some browsers, which causes noticable lag during animation + // that's why we update hash only when no animations running + _hashAnimCheckTimeout = setTimeout(_updateHash, 500); + return; + } + + if(_hashChangedByScript) { + clearTimeout(_hashChangeTimeout); + } else { + _hashChangedByScript = true; + } + + + var pid = (_currentItemIndex + 1); + var item = _getItemAt( _currentItemIndex ); + if(item.hasOwnProperty('pid')) { + // carry forward any custom pid assigned to the item + pid = item.pid; + } + var newHash = _initialHash + '&' + 'gid=' + _options.galleryUID + '&' + 'pid=' + pid; + + if(!_historyChanged) { + if(_windowLoc.hash.indexOf(newHash) === -1) { + _urlChangedOnce = true; + } + // first time - add new hisory record, then just replace + } + + var newURL = _windowLoc.href.split('#')[0] + '#' + newHash; + + if( _supportsPushState ) { + + if('#' + newHash !== window.location.hash) { + history[_historyChanged ? 'replaceState' : 'pushState']('', document.title, newURL); + } + + } else { + if(_historyChanged) { + _windowLoc.replace( newURL ); + } else { + _windowLoc.hash = newHash; + } + } + + + + _historyChanged = true; + _hashChangeTimeout = setTimeout(function() { + _hashChangedByScript = false; + }, 60); + }; + + + + + +_registerModule('History', { + + + + publicMethods: { + initHistory: function() { + + framework.extend(_options, _historyDefaultOptions, true); + + if( !_options.history ) { + return; + } + + + _windowLoc = window.location; + _urlChangedOnce = false; + _closedFromURL = false; + _historyChanged = false; + _initialHash = _getHash(); + _supportsPushState = ('pushState' in history); + + + if(_initialHash.indexOf('gid=') > -1) { + _initialHash = _initialHash.split('&gid=')[0]; + _initialHash = _initialHash.split('?gid=')[0]; + } + + + _listen('afterChange', self.updateURL); + _listen('unbindEvents', function() { + framework.unbind(window, 'hashchange', self.onHashChange); + }); + + + var returnToOriginal = function() { + _hashReseted = true; + if(!_closedFromURL) { + + if(_urlChangedOnce) { + history.back(); + } else { + + if(_initialHash) { + _windowLoc.hash = _initialHash; + } else { + if (_supportsPushState) { + + // remove hash from url without refreshing it or scrolling to top + history.pushState('', document.title, _windowLoc.pathname + _windowLoc.search ); + } else { + _windowLoc.hash = ''; + } + } + } + + } + + _cleanHistoryTimeouts(); + }; + + + _listen('unbindEvents', function() { + if(_closedByScroll) { + // if PhotoSwipe is closed by scroll, we go "back" before the closing animation starts + // this is done to keep the scroll position + returnToOriginal(); + } + }); + _listen('destroy', function() { + if(!_hashReseted) { + returnToOriginal(); + } + }); + _listen('firstUpdate', function() { + _currentItemIndex = _parseItemIndexFromURL().pid; + }); + + + + + var index = _initialHash.indexOf('pid='); + if(index > -1) { + _initialHash = _initialHash.substring(0, index); + if(_initialHash.slice(-1) === '&') { + _initialHash = _initialHash.slice(0, -1); + } + } + + + setTimeout(function() { + if(_isOpen) { // hasn't destroyed yet + framework.bind(window, 'hashchange', self.onHashChange); + } + }, 40); + + }, + onHashChange: function() { + + if(_getHash() === _initialHash) { + + _closedFromURL = true; + self.close(); + return; + } + if(!_hashChangedByScript) { + + _hashChangedByHistory = true; + self.goTo( _parseItemIndexFromURL().pid ); + _hashChangedByHistory = false; + } + + }, + updateURL: function() { + + // Delay the update of URL, to avoid lag during transition, + // and to not to trigger actions like "refresh page sound" or "blinking favicon" to often + + _cleanHistoryTimeouts(); + + + if(_hashChangedByHistory) { + return; + } + + if(!_historyChanged) { + _updateHash(); // first time + } else { + _historyUpdateTimeout = setTimeout(_updateHash, 800); + } + } + + } +}); + + +/*>>history*/ + framework.extend(self, publicMethods); }; + return PhotoSwipe; +}); \ No newline at end of file diff --git a/assets/js/staticman.js b/assets/js/staticman.js index 871c35d0..5651d25c 100644 --- a/assets/js/staticman.js +++ b/assets/js/staticman.js @@ -1,10 +1,10 @@ (function() { - let form = document.querySelector('.new-comment'); + let form = document.querySelector('#comment-form'); if (form) { form.addEventListener('submit', function () { form.classList.add('loading'); - form.querySelector('input[type="submit"]:enabled').classList.add('hidden'); // hide "submit" - form.querySelector('input[type="submit"]:disabled').classList.remove('hidden'); // show "submitted" + form.querySelector('input[type="submit"]:enabled').setAttribute("hidden", true); // hide "submit" + form.querySelector('input[type="submit"]:disabled').setAttribute("hidden", false); // show "submitted" // Construct form action URL form JS to avoid spam let api = '{{ .api }}'; @@ -59,36 +59,32 @@ function formError(err) { console.log(err); - showAlert('failed'); + showAlert('failure'); form.classList.remove('loading'); } function showAlert(msg) { if (msg == 'success') { - form.querySelector('.submit-notice').classList.add('submit-success') - form.querySelector('.submit-success').classList.remove('hidden'); // show submit success message - form.querySelector('.submit-failed').classList.add('hidden'); // hide submit failed message + form.querySelector('.success').setAttribute("hidden", false); // show submit success message + form.querySelector('.failed').setAttribute("hidden", true); // hide submit failed message } else { - form.querySelector('.submit-notice').classList.add('submit-failed') - form.querySelector('.submit-success').classList.add('hidden'); // hide submit success message - form.querySelector('.submit-failed').classList.remove('hidden'); // show submit failed message + form.querySelector('.success').setAttribute("hidden", true); // hide submit success message + form.querySelector('.failed').setAttribute("hidden", false); // show submit failed message } - form.querySelector('input[type="submit"]:enabled').classList.remove('hidden'); // show "submit" - form.querySelector('input[type="submit"]:disabled').classList.add('hidden'); // hide "submitted" + form.querySelector('input[type="submit"]:enabled').setAttribute("hidden", false); // show "submit" + form.querySelector('input[type="submit"]:disabled').setAttribute("hidden", true); // hide "submitted" } // empty all text & hidden fields but not options function clearForm() { resetReplyTarget(); - form.querySelector('.submit-notice').classList.remove('.submit-success'); // IE10 compatibility - form.querySelector('.submit-notice').classList.remove('.submit-failed'); - form.querySelector('.submit-success').classList.add('hidden'); // hide submission status - form.querySelector('.submit-failed').classList.add('hidden'); // hide submission status + form.querySelector('.success').setAttribute("hidden", true); // hide submission status + form.querySelector('.failed').setAttribute("hidden", true); // hide submission status } function resetReplyTarget() { form.querySelector('.reply-notice .reply-name').innerText = ''; - form.querySelector('.reply-notice').classList.add('hidden'); // hide reply target display + form.querySelector('.reply-notice').setAttribute("hidden", true); // hide reply target display // empty all hidden fields whose name starts from "reply" Array.from(form.elements).filter(e => e.name.indexOf('fields[reply') === 0).forEach(e => e.value = ''); } @@ -114,7 +110,7 @@ }); // handle removal of reply target when '×' is pressed - form.querySelector('.reply-close-btn').addEventListener('click', resetReplyTarget); + form.querySelector('.close-btn').addEventListener('click', resetReplyTarget); // clear form when reset button is clicked form.querySelector('input[type="reset"]').addEventListener('click', clearForm); diff --git a/assets/js/util.js b/assets/js/util.js index 86e8a7bc..b806ff87 100644 --- a/assets/js/util.js +++ b/assets/js/util.js @@ -21,40 +21,50 @@ } }()); -// Place any jQuery/helper plugins in here. +var tables = document.querySelectorAll('table'); -(function($) { +function closeRows(openTable,openRow) { + var rows = openTable.querySelectorAll('tr'); + for (let r = 0; r < rows.length; r++) { + if (r !== openRow) { + rows[r].classList.remove('active'); + } + } +} - $('table tr td:first-child').on('click touch', function() { - $(this).parent().toggleClass('active'); - $(this).parent().siblings().removeClass('active'); - }) +for (let t = 0; t < tables.length; t++) { + var rows = tables[t].querySelectorAll('tr'); + for (let r = 0; r < rows.length; r++) { + rows[r].onclick = function() { + this.classList.toggle('active'); + closeRows(tables[t],r); + }; + } +} - var tables = document.getElementsByTagName('table'); - for (i = 0; i < tables.length; i++) { - var headers = tables[i].getElementsByTagName('th'), - rows = tables[i].getElementsByTagName('tr'), - header = []; - for (h = 0; h < headers.length; h++) { - header.push(headers[h].textContent); - } - for (r = 0; r < rows.length; r++) { - var cells = rows[r].getElementsByTagName('td'); - for (c = 0; c < cells.length; c++) { - if (cells[c].getAttribute('data-header') == undefined && header[c] !== undefined) { - cells[c].setAttribute('data-header', header[c]); - } - if (cells[c].innerHTML.trim() == 'Yes') { - cells[c].innerHTML = ''; - } - if (cells[c].innerHTML.trim() == 'Free') { - cells[c].innerHTML = ''; - } - if (cells[c].innerHTML.trim() == 'No') { - cells[c].innerHTML = ''; - } +var tables = document.getElementsByTagName('table'); +for (i = 0; i < tables.length; i++) { + var headers = tables[i].getElementsByTagName('th'), + rows = tables[i].getElementsByTagName('tr'), + header = []; + for (h = 0; h < headers.length; h++) { + header.push(headers[h].textContent); + } + for (r = 0; r < rows.length; r++) { + var cells = rows[r].getElementsByTagName('td'); + for (c = 0; c < cells.length; c++) { + if (cells[c].getAttribute('data-header') == undefined && header[c] !== undefined) { + cells[c].setAttribute('data-header', header[c]); + } + if (cells[c].innerHTML.trim() == 'Yes') { + cells[c].innerHTML = ''; + } + if (cells[c].innerHTML.trim() == 'Free') { + cells[c].innerHTML = ''; + } + if (cells[c].innerHTML.trim() == 'No') { + cells[c].innerHTML = ''; } } } - -})(jQuery); +} diff --git a/assets/scss/_user.scss b/assets/scss/_user.scss new file mode 100644 index 00000000..e69de29b diff --git a/assets/scss/abstracts/_breakpoints.scss b/assets/scss/abstracts/_breakpoints.scss new file mode 100644 index 00000000..a9b2dd73 --- /dev/null +++ b/assets/scss/abstracts/_breakpoints.scss @@ -0,0 +1,30 @@ +// ----------------------------------------------------------------------------- +// This file contains all site-wide breakpoints. +// ----------------------------------------------------------------------------- + +$breakpoints: ( + tall: 600px, + mobile-s: 320px, + mobile-m: 375px, + mobile-l: 425px, + tablet-s: 570px, + tablet-l: 768px, + laptop: 1024px, + 1440p: 1440px, + 4k: 2560px +); + +@mixin break($breakpoint, $limit:min) { + @if map-has-key($breakpoints, $breakpoint) { + $value: map-get($breakpoints, $breakpoint); + $param: "min-width"; + @if $breakpoint == tall {$param: $limit+"-height";} + @else {$param: $limit+"-width";} + @media screen and ($param: $value) { + @content + } + } + @else { + @warn "Unknown `#{$breakpoint}` in $breakpoints"; + } +}; diff --git a/assets/scss/abstracts/_fonts.scss b/assets/scss/abstracts/_fonts.scss new file mode 100644 index 00000000..191b7085 --- /dev/null +++ b/assets/scss/abstracts/_fonts.scss @@ -0,0 +1,76 @@ +// ----------------------------------------------------------------------------- +// This file contains fonts. +// ----------------------------------------------------------------------------- + +/* raleway-200 - vietnamese_latin-ext_latin_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Raleway'; + font-weight: 200; + src: local('Raleway'), + url('../webfonts/raleway-v22-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-200.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/raleway-v22-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-200.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + +/* raleway-regular - vietnamese_latin-ext_latin_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Raleway'; + font-weight: 400; + src: local('Raleway'), + url('../webfonts/raleway-v22-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/raleway-v22-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + +/* raleway-700 - vietnamese_latin-ext_latin_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Raleway'; + font-weight: 700; + src: local('Raleway'), + url('../webfonts/raleway-v22-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/raleway-v22-vietnamese_latin-ext_latin_cyrillic-ext_cyrillic-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + +/* roboto-100 - latin */ +@font-face { + font-family: 'Raleway'; + font-weight: 200; + src: local('Roboto'), + url('../webfonts/roboto-v27-latin-100.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/roboto-v27-latin-100.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + unicode-range: U+30-39; +} + +/* roboto-regular - latin */ +@font-face { + font-family: 'Raleway'; + font-weight: 400; + src: local('Roboto'), + url('../webfonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/roboto-v27-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + unicode-range: U+30-39; +} + +/* roboto-700 - latin */ +@font-face { + font-family: 'Raleway'; + font-weight: 700; + src: local('Roboto'), + url('../webfonts/roboto-v27-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/roboto-v27-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ + unicode-range: U+30-39; +} + +/* source-sans-pro-regular - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Source Sans Pro'; + src: local(''), + url('../webfonts/source-sans-pro-v14-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/source-sans-pro-v14-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} + +/* roboto-mono-regular - vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic */ +@font-face { + font-family: 'Roboto Mono'; + src: local(''), + url('../webfonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ + url('../webfonts/roboto-mono-v13-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ +} diff --git a/assets/scss/abstracts/_functions.scss b/assets/scss/abstracts/_functions.scss new file mode 100644 index 00000000..358e63d3 --- /dev/null +++ b/assets/scss/abstracts/_functions.scss @@ -0,0 +1,3 @@ +// ----------------------------------------------------------------------------- +// This file contains all site-wide functions. +// ----------------------------------------------------------------------------- diff --git a/assets/scss/abstracts/_index.scss b/assets/scss/abstracts/_index.scss new file mode 100644 index 00000000..428f8869 --- /dev/null +++ b/assets/scss/abstracts/_index.scss @@ -0,0 +1,5 @@ +@forward 'fonts'; +@forward 'functions'; +@forward 'mixins'; +@forward 'breakpoints'; +@forward 'variables'; diff --git a/assets/scss/abstracts/_mixins.scss b/assets/scss/abstracts/_mixins.scss new file mode 100644 index 00000000..a5e942d9 --- /dev/null +++ b/assets/scss/abstracts/_mixins.scss @@ -0,0 +1,28 @@ +// ----------------------------------------------------------------------------- +// This file contains all site-wide mixins. +// ----------------------------------------------------------------------------- + +@mixin prefix($property, $value, $vendors:null ) { + $prefixes: ('webkit', 'moz', 'ms', 'o'); + @if ($vendors) { + @each $vendor in $vendors { + @if index($prefixes, $vendor){ + -#{$vendor}-#{$property}: #{$value}; + } + } + #{$property}: #{$value}; + } + @else { + @each $prefix in $prefixes { + -#{$prefix}-#{$property}: #{$value}; + } + #{$property}: #{$value}; + } +} + +@mixin display-flex { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} diff --git a/assets/scss/abstracts/_variables.scss b/assets/scss/abstracts/_variables.scss new file mode 100644 index 00000000..71c5a439 --- /dev/null +++ b/assets/scss/abstracts/_variables.scss @@ -0,0 +1,42 @@ +// ----------------------------------------------------------------------------- +// This file contains all site-wide variables. +// ----------------------------------------------------------------------------- + +/* Font */ + +$header-font: "Raleway", Helvetica, sans-serif; +$body-font: "Source Sans Pro", Helvetica, sans-serif; +$code-font: "Courier New", monospace; +$fa-free-font: "Font Awesome 5 Free"; +$fa-brands-font: "Font Awesome 5 Brands"; +$header-color: hsl(0, 1%, 23%); +$accent-color: hsl(175, 60%, 45%); +$accent-hover: hsla(175, 60%, 45%, 0.25); +$warning-color: hsl(332, 60%, 45%); +$warning-hover: hsla(332, 60%, 45%, 0.25); +$gray: hsl(0, 0%, 67%); +$dark-gray: hsl(210, 13%, 50%); +$light-gray: hsl(0, 0%, 96%); + +/* Background & Border */ + +$white: hsl(0, 0%, 100%); +$black: hsl(0, 0%, 0%); +$border-color: hsla(0, 0%, 63%, 0.3); +$input-color: hsla(0, 0%, 63%, 0.07); +$active-color: hsla(175, 60%, 45%, 0.05); +$primary-border: 1px solid $border-color; +$secondary-border: 1px dotted hsla(0, 0%, 63%, 0.7); +$cellborder-color: hsl(0, 0%, 88%); +$headerbg-color: hsl(0, 0%, 93%); + +/* Other */ + +$avatar-size: 3.75em; +$hover: 0.2s ease-in-out; +$hover-slow: 0.35s ease-in-out; +$shadow-1: 0 3px 6px hsla(0, 0%, 0%, 0.16), 0 3px 6px hsla(0, 0% , 0%, 0.23); +$shadow-2: 0 10px 20px hsla(0, 0%, 0%, 0.19), 0 6px 6px hsla(0, 0%, 0%, 0.23); +$shadow-3: 0 14px 28px hsla(0, 0%, 0%, 0.25), 0 10px 10px hsla(0, 0%, 0%, 0.22); +$shadow-4: 0 19px 38px hsla(0, 0%, 0%, 0.30), 0 15px 12px hsla(0, 0%, 0% ,0.22); +$shadow-scroll: inset 0 0 6px hsla(0, 0%, 0%, 0.3); diff --git a/assets/scss/base/_base.scss b/assets/scss/base/_base.scss new file mode 100644 index 00000000..0e2670e1 --- /dev/null +++ b/assets/scss/base/_base.scss @@ -0,0 +1,350 @@ +// ----------------------------------------------------------------------------- +// This file contains base styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +/* Box Model */ + +*, +*::before, +*::after { + box-sizing: border-box; +} + +/* Selection Highlights */ + +::-moz-selection { + background: $accent-color; + color: $white; +} + +::selection { + background: hsl(175, 60%, 45%); + color: white; +} + +/* +* Remove the gap between audio, canvas, iframes, +* images, videos and the bottom of their containers: +*/ + +audio, +canvas, +iframe, +img, +svg, +video { + vertical-align: middle; + max-width: 100%; +} + +hr { + border: none; + background-color: rgba(0,0,0,0.1); + height: 1px; +} + + +/* Form Elements */ + +::placeholder { + color: $gray; + opacity: 1; + text-transform: capitalize; +} + +fieldset { + border: 1px solid $accent-color; + margin-bottom: 1rem; +} + +legend { + color: $white; + background: $accent-color; + padding: 0 1rem; +} + +label { + color: $header-color; + cursor: pointer; + display: block; + font-weight: 700; + margin-top: 0.5rem; +} + +input, +select, +textarea { + background: $input-color; + border: $primary-border; + margin: 0.5rem 0; + outline: 0; + padding: 0.5rem 1rem; + width: 100%; + transition: border-color $hover; + &:hover { + border-color: $accent-color; + } + &:focus, + &:active { + border: 1px solid $accent-color; + } +} + +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; + margin: 0 1rem; + position: relative; + width: fit-content; + &:before { + transition: transform .4s cubic-bezier(.45,1.8,.5,.75); + content: ""; + position: absolute; + z-index: 1; + } + &:checked { + &:before { + transform: scale(1) + } + } + &:after { + content: ""; + position: absolute; + top: -0.1rem; + left: -0.1rem; + width: 1.25rem; + height: 1.25rem; + background: #fff; + border: 2px solid $border-color; + } +} + +input[type="radio"] { + &:before { + border-radius: 50%; + top: 0.15rem; + left: 0.15rem; + width: 0.8rem; + height: 0.8rem; + transform: scale(0); + background: $accent-color; + } + &:after { + border-radius: 50%; + } +} + +input[type="checkbox"] { + &:before { + border: 2px solid $accent-color; + width: 0.5rem; + height: 0.8rem; + left: 0.25rem; + border-top-style: none; + border-left-style: none; + transform: rotate(35deg) scale(0); + } + &:checked { + &:before { + transform: rotate(35deg) scale(1); + } + } +} + +textarea { + resize: vertical; +} + +button, .button, +input[type="submit"], +input[type="reset"], +input[type="button"] { + background-color: transparent; + border: $primary-border; + color: $header-color; + cursor: pointer; + font-family: $header-font; + font-weight: 700; + letter-spacing: 0.25rem; + margin: auto; + min-width: 10rem; + padding: 1rem 2rem; + transition: background-color $hover, border $hover, color $hover; + text-transform: uppercase; + &:hover { + border: 1px solid $accent-color; + color: $accent-color; + &:active { + background-color: $active-color; + } + } +} + +/* Figure Elements */ + +figure { + width: fit-content; + max-width: 100%; +} + +figcaption { + font-size: 0.9rem; + padding: 0.5rem 1rem; + width: fit-content; + max-width: 75%; +} + +.art { + border: 0.5rem solid black; + background: white; + box-shadow: 0 10px 5px -5px rgba(0, 0, 0, 0.5), inset 0 0 10px 0 rgba(0,0,0,0.8); + a { + display: grid; + margin: 3rem; + position: relative; + &:before { + content: ''; + display: block; + position: absolute; + width: 100%; + height: 100%; + box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.8) inset; + } + } + ~ figcaption { + box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.3); + margin: 1.5rem auto 0 auto; + } +} + +/* Table Elements */ + +table { + background-color: $white; + border-collapse: collapse; + margin: 0 auto; + table-layout: fixed; + width: 100%; + @include break(tablet-l) { + display: block; + overflow-x: auto; + } + caption { + text-align: left; + } +} + +thead, tfoot { + background-color: $headerbg-color; + @include break(tablet-l, max) { + display: none; + } +} + +tr { + transition: $hover; + @include break(tablet-l, max) { + border: 1px solid $border-color; + display: block; + } + @include break(tablet-l) { + &:hover { + background-color: $accent-hover; + } + &:nth-child(even) { + background-color: $light-gray; + &:hover { + background-color: $accent-hover; + } + } + } + & + tr { + margin-top: .625rem; + } + td:first-child::after { + border: 2px solid $accent-color; + border-top-style: none; + border-left-style: none; + content: ""; + float: right; + position: relative; + top: 0.25rem; + height: 0.8rem; + width: 0.8rem; + transform: rotate(45deg) scale(1); + transition: all $hover; + @include break(tablet-l) { + display: none; + } + } + &.active td { + &:first-child::after { + top: 0.6rem; + transform: rotate(45deg) scale(-1); + } + &:not(:first-child) { + opacity: 1; + position: relative; + transition: all $hover; + z-index: auto; + } + } +} + +th, td { + padding: 0.5rem 1rem; + @include break(tablet-l) { + text-align: center; + } +} + +th { + text-transform: uppercase; +} + +td { + border-bottom: 1px solid $border-color; + display: flex; + justify-content: space-between; + @include break(tablet-l,max) { + &:last-child { + border-bottom: 0; + } + } + @include break(tablet-l) { + display: table-cell; + &[align="left"] {text-align: left;} + &[align="center"] {text-align: center;} + &[align="right"] {text-align: right;} + } + &:hover { + background-color: $accent-hover; + } + &:before { + color: $dark-gray; // TODO: Check Color + content: attr(data-header); + font-weight: bold; + max-width: 45%; + text-transform: uppercase; + @include break(tablet-l) { + display: none; + } + } + &:first-child { + text-align: left; + @include break(tablet-l, max) { + background-color: $headerbg-color; + } + } + &:not(:first-child) { + transition: none; + @include break(tablet-l, max) { + opacity: 0; + position: absolute; + z-index: -1; + } + } + +} diff --git a/assets/scss/base/_helpers.scss b/assets/scss/base/_helpers.scss new file mode 100644 index 00000000..def8dfdf --- /dev/null +++ b/assets/scss/base/_helpers.scss @@ -0,0 +1,214 @@ +// ----------------------------------------------------------------------------- +// This file contains helper classes. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +/* Browser Upgrade Prompt */ + +.browserupgrade { + margin: 0.2em 0; + background: $gray; + color: $black; + padding: 0.2em 0; +} + +/* Hide Visually and from Screen Readers */ + +.hidden, +[hidden] { + display: none !important; +} + +/* Hide Visually and from Screen Readers, but Maintain Layout */ +.invisible { + visibility: hidden; +} + +/* Hide Visually, but Maintain for Screen Readers */ + +.sr-only { + border: 0; + clip: rect(0, 0, 0, 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + white-space: nowrap; + width: 1px; + + /* Allow Element to be Focusable via Keyboard */ + + &.focusable:active, + &.focusable:focus { + clip: auto; + height: auto; + margin: 0; + overflow: visible; + position: static; + white-space: inherit; + width: auto; + } +} + +/* ========================================================================== +Print styles. +========================================================================== */ + +@media print { + *, + *::before, + *::after { + background: $white !important; + color: $black !important; + box-shadow: none !important; + text-shadow: none !important; + } + + a, + a:visited { + text-decoration: underline; + } + + a[href]::after { + content: " (" attr(href) ")"; + } + + abbr[title]::after { + content: " (" attr(title) ")"; + } + + /* Hide Non-Content Links */ + a[href^="#"]::after, + a[href^="javascript:"]::after { + content: ""; + } + + pre { + white-space: pre-wrap !important; + } + + pre, + blockquote { + border: $primary-border; + page-break-inside: avoid; + } + + thead { + display: table-header-group; + } + + tr, + img { + page-break-inside: avoid; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } +} + +/* ========================================================================== +Brand Styles | name, color(hsl), unicode, font[opt], weight[opt] +https://brandcolors.net/ => https://htmlcolors.com/hex-to-hsl +========================================================================== */ + +$brands: ( + (twitter, hsl(203, 89%, 53%), "\f099"), + (facebook, hsl(214, 89%, 52%), "\f09a"), + (linkedin, hsl(201, 100%, 35%), "\f08c"), + (pinterest, hsl(351, 100%, 45%), "\f0d2"), + (reddit, hsl(16, 100%, 50%), "\f281"), + (vk, hsl(213, 35%, 41%), "\f189"), + (email, hsl(0, 0%, 27%), "\f0e0", $fa-free-font, 900) +); + +@each $name, $color, $icon, $font-family, $font-weight in $brands { + .#{$name} { + background-color: $color; + @if $font-weight { + font-weight: $font-weight; + } + &:hover { + background-color: darken($color, 10%); + } + &::before { + @if $font-family { + font-family: $font-family; + } @else { + font-family: $fa-brands-font; + } + content: $icon; + } + } +} + +/* ========================================================================== +Clip Masks | https://bennettfeely.com/clippy/ +========================================================================== */ + +/* name, clip mask */ + +$masks: ( + (triangle, polygon(0 100%, 100% 100%, 50% 0)), + (trapezoid, polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%)), + (parallelogram, polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%)), + (rhombus, polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)), + (pentagon, polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)), + (hexagon, polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)), + (heptagon, polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)), + (octagon, polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)), + (nonagon, polygon(50% 0%, 83% 12%, 100% 43%, 94% 78%, 68% 100%, 32% 100%, 6% 78%, 0% 43%, 17% 12%)), + (decagon, polygon(50% 0%, 80% 10%, 100% 35%, 100% 70%, 80% 90%, 50% 100%, 20% 90%, 0% 70%, 0% 35%, 20% 10%)), + (bevel, polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%)), + (rabbet, polygon(0% 15%, 15% 15%, 15% 0%, 85% 0%, 85% 15%, 100% 15%, 100% 85%, 85% 85%, 85% 100%, 15% 100%, 15% 85%, 0% 85%)), + (left-arrow, polygon(40% 0%, 40% 20%, 100% 20%, 100% 80%, 40% 80%, 40% 100%, 0% 50%)), + (right-arrow, polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)), + (left-point, polygon(25% 0%, 100% 1%, 100% 100%, 25% 100%, 0% 50%)), + (right-point, polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)), + (left-cheveron, polygon(100% 0%, 75% 50%, 100% 100%, 25% 100%, 0% 50%, 25% 0%)), + (right-cheveron, polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)), + (star, polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)), + (cross, polygon(10% 25%, 35% 25%, 35% 0%, 65% 0%, 65% 25%, 90% 25%, 90% 50%, 65% 50%, 65% 100%, 35% 100%, 35% 50%, 10% 50%)), + (message, polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%)), + (close, polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%)), + (circle, circle(50% at 50% 50%)), + (vertical-ellipse, ellipse(25% 40% at 50% 50%)), + (horizontal-ellipse, ellipse(40% 25% at 50% 50%)) +); + +@each $name, $clip in $masks { + .#{$name} { + @include prefix(clip-path, $clip, webkit); + } +} + +/* ========================================================================== +Helpers +========================================================================== */ + +.uppercase { + text-transform: uppercase; +} + +.stretchV { + height: 100%; +} + +.stretchH { + width: 100%; +} + +.cover { + object-fit: cover; + width: 100%; +} diff --git a/assets/scss/base/_index.scss b/assets/scss/base/_index.scss new file mode 100644 index 00000000..64bb25d8 --- /dev/null +++ b/assets/scss/base/_index.scss @@ -0,0 +1,3 @@ +@forward 'base'; +@forward 'typography'; +@forward 'helpers'; diff --git a/assets/scss/base/_typography.scss b/assets/scss/base/_typography.scss new file mode 100644 index 00000000..240625c3 --- /dev/null +++ b/assets/scss/base/_typography.scss @@ -0,0 +1,136 @@ +// ----------------------------------------------------------------------------- +// This file contains typography styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +html { + font-size: 100%; +} + +body { + color: $black; + font-family: $body-font; + font-size: 1.125rem; + line-height: 1.5; + ::-webkit-scrollbar { + height: 14px; + width: 14px; + } + ::-webkit-scrollbar-thumb { + background-clip: padding-box; + background-color: $gray; + border: 4px solid rgba(0, 0, 0, 0); + } +} + +p { + letter-spacing: 0.05rem; + margin-bottom: 1rem; + margin-top: 1rem; + text-indent: 2rem; +} + +a { + color: inherit; + border-bottom: $secondary-border; + text-decoration: none; + transition: border-bottom-color $hover, color $hover; + &:hover { + border-bottom-color: transparent; + color: $accent-color; + } + &.image { + border-bottom: 0; + } +} + +h1, +h2, +h3, +h4, +h5, +h6 { + color: $header-color; + font-family: $header-font; + letter-spacing: 0.25rem; + text-transform: uppercase; + a { + border-bottom: 0; + } +} + +h1, .h1 { + font-size: 4rem; + font-weight: 700; + margin-top: 3rem; + margin-bottom: 3rem; +} + +h2, .h2 { + font-size: 3rem; + font-weight: 200; + margin-top: 2rem; + margin-bottom: 2rem; +} + +h3, .h3 { + font-size: 2rem; + font-weight: 700; + margin-bottom: 1rem; + margin-top: 4rem; +} + +h4, .h4, +h5, +h6 { + font-size: 1.5rem; + font-weight: 700; + margin-bottom: 1rem; + margin-top: 3rem; +} + +blockquote { + border-left: 4px solid $accent-color; + font-style: italic; + margin-left: 2rem; + padding: 0.5rem 2rem; + cite { + color: $black; + display: block; + font-style: normal; + font-weight: bold; + margin: 0.5rem 0 0 0; + &:before { + margin-right: 0.25rem; + content: "—"; + } + } +} + +cite { + color: $gray; +} + +code, kbd, samp { + border: $primary-border; + font-family: $code-font; + font-size: 0.9rem; + margin: 0.25rem; + padding: 0.25rem; + overflow-x: auto; +} + +pre { + display: table; + table-layout: fixed; + line-height: 1.25; + width: 100%; + white-space: pre-wrap; + code { + border-left: 4px solid $accent-color; + display: block; + padding: 1rem; + white-space: pre; + } +} diff --git a/assets/scss/components/_back-to-top.scss b/assets/scss/components/_back-to-top.scss new file mode 100644 index 00000000..e2fd4c3d --- /dev/null +++ b/assets/scss/components/_back-to-top.scss @@ -0,0 +1,19 @@ +@use 'abstracts' as *; + +#back-to-top { + bottom: 15px; + color: $gray; + cursor: pointer; + opacity: 0; + position: fixed; + right: 15px; + border: 0; + transition: color $hover, transform $hover, opacity $hover; + &:hover { + color: $accent-color !important; + transform: translateY(-10px); + } + &.active { + opacity: 1; + } +} diff --git a/assets/scss/components/_content.scss b/assets/scss/components/_content.scss new file mode 100644 index 00000000..ce998a59 --- /dev/null +++ b/assets/scss/components/_content.scss @@ -0,0 +1,148 @@ +@use 'abstracts' as *; + +.content { + background: $white; + flex-direction: column; + hyphens: auto; + margin: 0 5% 1rem 5%; + padding: 2rem 1rem; + word-wrap: break-word; + @include break(tablet-l) { + padding: 2rem 4rem; + margin: 0 auto 1rem auto; + } + @include break(laptop) { + margin: 0 0 1rem 0; + } + &.mini { + width: 100%; + margin: 0 auto 1rem auto; + } +} + +.content-header { + @include display-flex; + flex-direction: column; + flex-wrap: wrap; + text-align: center; + @include break(tablet-l) { + justify-content: space-between; + text-align: left; + flex-direction: row; + &.mini { + flex-direction: column; + } + } + p { + margin: 0; + text-indent: 0; + } + div { + @include break(tablet-l, max) { + padding: 1rem; + } + &:last-of-type { + border-bottom: $primary-border; + } + } +} + +.content-summary { + padding: 1rem 0; + @include break(tablet-l) { + border-bottom: $primary-border; + flex-grow: 1; + flex-basis: 0; + padding: 2rem; + } + &.mini { + padding: 1rem; + text-align: left; + } +} + +.content-title { + font-size: 2rem; + margin: 0 0 1rem 0; + &.mini { + margin: 0 0 0.5rem 0; + font-size: 0.8rem; + } +} + +.content-meta { + @include break(tablet-l) { + border-left: $primary-border; + @include display-flex; + flex-basis: 12rem; + flex-direction: column; + justify-content: center; + padding: 0 2rem; + text-align: right; + &.mini { + text-align: left; + } + } +} + +.content-date { + font-weight: 700; + &.mini { + font-size: 1rem; + font-weight: 400; + } +} + +.content-body { + padding: 1rem; + @include break(tablet-l) { + padding: 1rem 4rem; + } +} + +.image { // TODO: Ratios?!?!?! + display: grid; + flex-basis: 100%; + overflow: hidden; + padding-bottom: 30%; + place-items: center; + position: relative; + &[style]:before { + content: ""; + position: absolute; + background-image: var(--bg-image); + background-size: 100% 100%; + width: 100%; + height: 100%; + @include prefix(filter, blur(8px), webkit); + @include prefix(transform, scale(1.1), (webkit, ms)); + } + img { + position: absolute; + max-height: 100%; + transition: transform $hover-slow; + z-index: 1; + &:hover { + @include prefix(transform, scale(1.05), (webkit, ms)); + } + } +} + +.content-footer { + @include display-flex; + flex-direction: column; + padding: 2rem; + @include break(tablet-l) { + flex-direction: row; + } + .categories, .tags { + justify-content: center; + li { + flex-grow: 0; + } + } +} + +.post { + padding: 0; +} diff --git a/assets/scss/components/_index.scss b/assets/scss/components/_index.scss new file mode 100644 index 00000000..244cb957 --- /dev/null +++ b/assets/scss/components/_index.scss @@ -0,0 +1,9 @@ +@forward 'navbar'; +@forward 'share-btn'; +@forward 'social-icons'; +@forward 'content'; +@forward 'stats'; +@forward 'pagination'; +@forward 'staticman-form'; +@forward 'staticman-comments'; +@forward 'back-to-top'; diff --git a/assets/scss/components/_navbar.scss b/assets/scss/components/_navbar.scss new file mode 100644 index 00000000..560ed31d --- /dev/null +++ b/assets/scss/components/_navbar.scss @@ -0,0 +1 @@ +@use 'abstracts' as *; diff --git a/assets/scss/components/_pagination.scss b/assets/scss/components/_pagination.scss new file mode 100644 index 00000000..975b2f78 --- /dev/null +++ b/assets/scss/components/_pagination.scss @@ -0,0 +1,48 @@ +// ----------------------------------------------------------------------------- +// This file contains pagination styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +.pagination { + @include display-flex; + justify-content: space-around; + align-items: center; + margin: 0 auto; + padding: 1em; + max-width: 55em; + .button { + margin: 1em; + width: 50%; + } +} + +.left, +.right { + font-size: 1rem; + @include break(mobile-l, max) { + display: none; + } + @include break(mobile-l) { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + &::before { + font-family: $fa-free-font; + font-weight: 900; + text-decoration: inherit; + } +} + +.left::before { + content: "\f053"; + float: left; + padding-right: 0.5em; +} + +.right::before { + content: "\f054"; + float: right; + padding-left: 0.5em; +} diff --git a/assets/scss/components/_share-btn.scss b/assets/scss/components/_share-btn.scss new file mode 100644 index 00000000..9ddadf37 --- /dev/null +++ b/assets/scss/components/_share-btn.scss @@ -0,0 +1,35 @@ +@use 'abstracts' as *; + +.share-btn { + color: $white; + box-shadow: $shadow-1; + font-size: 2rem; + margin: 0.5rem 1rem; + text-align: center; + position: relative; + top: 0px; + transition: $hover; + &:hover { + box-shadow: $shadow-2; + color: $white; + top: -2px; + } + &:active { + box-shadow: none; + color: darken($white, 10%); + top: 2px; + } +} + +#social-share { + display: flex; + padding: 0.5rem 0; + a { + border-radius: 100%; + display:inline-block; + font-size: 1rem; + line-height: 2.5rem; + margin: 0 0.25rem; + width: 2.5rem; + } +} diff --git a/assets/scss/components/_social-icons.scss b/assets/scss/components/_social-icons.scss new file mode 100644 index 00000000..0a74cdd6 --- /dev/null +++ b/assets/scss/components/_social-icons.scss @@ -0,0 +1,17 @@ +@use 'abstracts' as *; + +.social-icons { + @include display-flex; + flex-wrap: wrap; + justify-content: center; + padding-left: 0; + li { + list-style-type: none; + margin: 0 0.5rem; + width: 1rem; + } + a { + opacity: 0.6; // TODO: Color? + border: 0; + } +} diff --git a/assets/scss/components/_staticman-comments.scss b/assets/scss/components/_staticman-comments.scss new file mode 100644 index 00000000..cd71200c --- /dev/null +++ b/assets/scss/components/_staticman-comments.scss @@ -0,0 +1,58 @@ +@use 'abstracts' as *; + +.comment { + margin-bottom: 1rem; + p { + font-size: unset; + opacity: unset; + } +} + +.comment-reply { + margin-left: $avatar-size/2; +} + +.comment-header { + align-items: center; + font-family: $header-font; + background: $headerbg-color; + @include display-flex; + @include break(mobile-m, max) { + border-radius: 50px 0 0 50px; + } +} + +.comment-meta { + align-items: center; + @include display-flex; + flex-grow: 1; + @include break(mobile-m, max) { + flex-direction: column; + } +} + +.comment-avatar { + height: $avatar-size; + @include break(mobile-m, max) { + border-radius: 100%; + margin: 1rem; + } +} + +.comment-author { + border-right: $primary-border; + font-size: 1rem; + margin: 0 1rem; + padding-right: 1rem; +} + +.comment-date { + font-weight: 200; + @include break(mobile-m) { + border: 0; + } +} + +.comment-reply-btn { + margin: 0 1rem; +} diff --git a/assets/scss/components/_staticman-form.scss b/assets/scss/components/_staticman-form.scss new file mode 100644 index 00000000..5303c157 --- /dev/null +++ b/assets/scss/components/_staticman-form.scss @@ -0,0 +1,58 @@ +@use 'abstracts' as *; + +.comments { + display: block; + text-align: initial; +} + +.comment-form.loading { + opacity: 0.5; +} + +.reply-notice { //TODO: Fix - it's ugly + @include display-flex; +} + +.reply-name { + font-weight: 400; + &::before { + content: "\f3e5"; + font-family: $fa-free-font; + font-size: 1.25rem; + font-weight: 700; + margin-right: .5rem; + } +} + +.close-btn { + border: 0; + font-size: 1rem; + height: 0; + margin: 0 0 0 0.25rem; + min-width: 0; + padding: 0; + &:hover { + border: 0; + } +} + +.form-buttons { + @include display-flex; + margin-top: 1rem; + .button { + margin: 0 0.25rem; + @include break(tablet-l) { + margin: 0 1rem; + } + } +} + +.success { + background: $accent-hover; + border: 1px solid $accent-color; +} + +.failed { + background: $warning-hover; + border: 1px solid $warning-color; +} diff --git a/assets/scss/components/_stats.scss b/assets/scss/components/_stats.scss new file mode 100644 index 00000000..68c72eed --- /dev/null +++ b/assets/scss/components/_stats.scss @@ -0,0 +1,73 @@ +@use 'abstracts' as *; + +.categories, .tags { + @include display-flex; + flex-wrap: wrap; + list-style: none; + justify-items: start; + margin: 0; + padding: 0; + width: 50%; + &::before { + font-family: $fa-free-font; + font-weight: 900; + width: 40px; + padding-right: 1em; + margin-right: 1em; + border-right: $primary-border; + @include break(mobile-m) { + padding-right: 0; + margin-right: 0; + border-right: 0; + border-bottom: $primary-border; + flex: 100%; + height: fit-content; + text-align: center; + } + } + li { + flex-grow: 1; + margin: 0.25rem; + } + a { + @include display-flex; + border: 0; + border-radius: 2rem; + color: $white; + display: flex; + font-family: $header-font; + font-size: 0.8em; + letter-spacing: 0.2rem; + justify-content: space-between; + padding: 0.25rem 1rem; + text-transform: uppercase; + span { + flex-grow: 1; + text-align: right; + } + } +} + +.categories { + &::before { + color: $accent-color; + content: "\f07b"; + } + a { + background: $accent-color; + } +} + +.tags { + &::before { + color: $dark-gray; + content: "\f02c"; + } + a { + background: $dark-gray; + } +} + +.count { + margin-left: 10px; +} diff --git a/assets/scss/layout/_footer.scss b/assets/scss/layout/_footer.scss new file mode 100644 index 00000000..174fbd9e --- /dev/null +++ b/assets/scss/layout/_footer.scss @@ -0,0 +1,67 @@ +// ----------------------------------------------------------------------------- +// This file contains footer layout styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +section { + align-items: center; + @include display-flex; + flex-direction: column; + padding: 1rem; + text-align: center; + p { + font-size: 0.9rem; + opacity: 0.6; + text-indent: 0; + } + h1 { + font-size: 1.5rem; + margin: 1rem 0; + } +} + +footer section { + border-top: $primary-border; + margin-top: 3em; + padding-top: 3em; +} + +#recent-posts { + align-items: unset; + @include display-flex; + flex-direction: row; + flex-wrap: wrap; + h1 { + flex-basis: 100%; + } + article { + flex-basis: 100%; + @include break(tablet-s) { + flex-basis: 49%; + } + @include break(laptop) { + flex-basis: 100%; + } + } +} + +.copyright { + color: $gray; + font-size: 0.8rem; + text-transform: uppercase; +} + +#back-to-top { + bottom: 15px; + color: $gray; + display: none; + position: fixed; + right: 15px; + border: 0; + transition: color $hover, transform $hover; + &:hover { + color: $accent-color !important; + transform: translateY(-10px); + } +} diff --git a/assets/scss/layout/_header.scss b/assets/scss/layout/_header.scss new file mode 100644 index 00000000..c83257d1 --- /dev/null +++ b/assets/scss/layout/_header.scss @@ -0,0 +1,236 @@ +// ----------------------------------------------------------------------------- +// This file contains header layout styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +menu { + margin: 0; + padding: 0; +} + +.site-header { + display: grid; + position: fixed; + top: 0; + width: 100%; + z-index: 10000; +} + +.navbar { + align-items: center; + background-color: $white; + border-top: 4px solid $accent-color; + box-shadow: $shadow-2; + @include display-flex; + flex-wrap: wrap; + height: 4rem; + button { + border: 0; + border-left: $primary-border; + font-weight: 400; + margin: 0; + min-width: unset; + &:hover { + border-left: $primary-border; + } + } +} + +.nav-title { + font-size: 1rem; + margin: 0 0 0 1rem; + @include break (mobile-m) { + font-size: 1.25rem; + } + @include break(laptop,max) { + flex-grow: 1; + } + @include break(laptop) { + min-width: 18rem; + } + img { + max-height: 3.25rem; + } +} + +.flyout-menu { + background-color: $white; + @include display-flex; + flex-direction: column; + height: 100%; + overflow-y: auto; + position: fixed; + top: 4rem; + right: -12rem; + transition: right $hover-slow; + width: 12rem; + z-index: 100; + &.active { + box-shadow: $shadow-2; + right: 0; + } +} + +.nav-menu { + @include break(laptop, max) { + button { + border: 0; + border-bottom: $primary-border; + text-align: left; + &:hover { + border: 0; + border-bottom: $primary-border; + } + } + .nav-buttons { + flex-direction: column-reverse; + } + } + @include break(laptop) { + align-items: center; + background-color: unset; + flex-direction: row; + flex-grow: 1; + white-space: nowrap; + overflow: auto; + position: static; + .nav-link { + border-bottom: 0; + border-left: $primary-border; + padding: 0 1rem; + &:hover { + border-bottom: 0; + } + } + &.active { + box-shadow: unset; + } + } +} + +.nav-link { + border-bottom: $primary-border; + font-family: $header-font; + font-size: 0.8rem; + letter-spacing: 0.25rem; + text-transform: uppercase; + padding: 1rem; + transition: color $hover; + &:hover { + border-bottom: $primary-border; + } + i { + display: inline-block; + font-style: normal; + letter-spacing: 0; + width: 2rem; + } +} + +.nav-buttons { + display: flex; +} + +.toggle { + height: 4rem; + padding: 0; + text-transform: uppercase; + transform: scaleX(1); + transition: $hover; + width: 4rem; + i { + font-size: 1.5rem; + } + &.active { + display: block; + color: $accent-color; + } + &.inactive { + transform: scaleX(0); + width: 0; + } + &:not(.active) { + @include break(mobile-l, max) { + &:nth-last-child(n+2) { + display: none; + } + } + @include break(tablet-s, max) { + &:nth-last-child(n+3) { + display: none; + } + } + } + &.nav-button { + @include break(laptop) { + display: none; + } + } +} + +.no-lang { + cursor: not-allowed; + opacity: 0.25; +} + +.search-box { + align-items: center; + @include display-flex; + flex-direction: column; + height: 0; + margin: 1rem 0.5rem; + opacity: 0; + transform: scaleX(0); + transition: opacity $hover-slow, transform $hover-slow; + z-index: -1; + @include break(laptop) { + width: 57rem; + margin: 1rem auto; + } + &.active { + height: auto; + opacity: 1; + transform: scaleX(1); + z-index: 100; + } +} + +.search-input { + background-color: $white; + box-shadow: $shadow-3; + @include break(mobile-l) { + width: 20rem; + } +} + +.search-results { + padding: 1rem; + max-height: calc(100vh - 9rem); + width: 100%; + overflow-y: auto; + .post { + border: 2px solid $white; + box-shadow: $shadow-2; + margin-bottom: 1.5rem; + transition: all $hover-slow; + p, time { + color: $header-color; + } + &:hover { + border-color: $accent-color; + box-shadow: $shadow-3; + p, time { + color: $header-color; + } + } + @include break(tablet-l, max) { + .content-header { + padding: 1rem; + } + } + .content-header, .content-meta { + border-bottom: 0; + } + } +} diff --git a/assets/scss/layout/_index.scss b/assets/scss/layout/_index.scss new file mode 100644 index 00000000..9aac2efb --- /dev/null +++ b/assets/scss/layout/_index.scss @@ -0,0 +1,5 @@ +@forward 'header'; +@forward 'intro'; +@forward 'main'; +@forward 'footer'; +@forward 'mods'; diff --git a/assets/scss/layout/_intro.scss b/assets/scss/layout/_intro.scss new file mode 100644 index 00000000..2628ac6f --- /dev/null +++ b/assets/scss/layout/_intro.scss @@ -0,0 +1,5 @@ +// ----------------------------------------------------------------------------- +// This file contains intro layout styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; diff --git a/assets/scss/layout/_main.scss b/assets/scss/layout/_main.scss new file mode 100644 index 00000000..2879ba18 --- /dev/null +++ b/assets/scss/layout/_main.scss @@ -0,0 +1,40 @@ +// ----------------------------------------------------------------------------- +// This file contains main layout styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +html { + background: #ddd; +} + +$areas: (intro, main, footer); +@each $area in $areas { + #site-#{$area} { + grid-area: $area; + } +} + +#wrapper { + display: grid; + grid-template-areas: "intro" "main" "footer"; + justify-items: center; + margin: 5rem auto; + @include break(laptop, max) { + max-width: 55rem; + } + @include break(laptop) { + column-gap: 2.5rem; + grid-template-areas: "intro main" "footer main" "blank main"; + grid-template-columns: 1fr 2fr; + max-width: 80rem; + padding: 0 1rem; + } +} + +.overlay { + opacity: 0.25; + height: 100%; + z-index: 10; + pointer-events:none; +} diff --git a/assets/scss/layout/_mods.scss b/assets/scss/layout/_mods.scss new file mode 100644 index 00000000..38cbc075 --- /dev/null +++ b/assets/scss/layout/_mods.scss @@ -0,0 +1,12 @@ +// ----------------------------------------------------------------------------- +// This file contains modified layout styles. +// ----------------------------------------------------------------------------- + +@use 'abstracts' as *; + +.hidden-single-column { + display: none; + @include break(tablet-l) { + @include display-flex; + } +} diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 2db91e8d..e70b79e7 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -4,1782 +4,17 @@ * Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) * * Slimmed/Cleaned/Modernized for use with Hugo-Future-Imperfect Hugo Theme +* HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ * gohugo.io | @pacollins */ -/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */ +@charset 'utf-8'; -/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */ -/* - * What follows is the result of much research on cross-browser styling. - * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, - * Kroc Camen, and the H5BP dev community and team. - */ - -/* ========================================================================== - Variables - ========================================================================== */ - -/* Font */ - -$header-font: "Raleway", Helvetica, sans-serif; -$body-font: "Source Sans Pro", Helvetica, sans-serif; -$code-font: "Courier New", monospace; -$fa-free-font: "Font Awesome 5 Free"; -$fa-brands-font: "Font Awesome 5 Brands"; -$header-color: hsl(0, 1%, 23%); -$accent-color: hsl(175, 60%, 45%); -$accent-hover: hsla(175, 60%, 45%, 0.25); -$warning-color: hsl(332, 60%, 45%); -$warning-hover: hsla(332, 60%, 45%, 0.25); -$utility-gray: hsl(0, 0%, 67%); -$utility-gray-2: hsl(210, 13%, 50%); -$utility-white: hsl(0, 0%, 96%); - -/* Background & Border */ - -$white: hsl(0, 0%, 100%); -$black: hsl(0, 0%, 0%); -$border-color: hsla(0, 0%, 63%, 0.3); -$input-color: hsla(0, 0%, 63%, 0.07); -$active-color: hsla(175, 60%, 45%, 0.05); -$primary-border: 1px solid $border-color; -$secondary-border: 1px dotted hsla(0, 0%, 63%, 0.7); -$cellborder-color: hsl(0, 0%, 88%); -$headerbg-color: hsl(0, 0%, 93%); - -/* Other */ - -$avatar-size: 3.75em; -$hover: 0.2s ease-in-out; -$hover-slow: 0.35s ease-in-out; -$shadow-1: 0 3px 6px hsla(0, 0%, 0%, 0.16), 0 3px 6px hsla(0, 0% , 0%, 0.23); -$shadow-2: 0 10px 20px hsla(0, 0%, 0%, 0.19), 0 6px 6px hsla(0, 0%, 0%, 0.23); -$shadow-3: 0 14px 28px hsla(0, 0%, 0%, 0.25), 0 10px 10px hsla(0, 0%, 0%, 0.22); -$shadow-4: 0 19px 38px hsla(0, 0%, 0%, 0.30), 0 15px 12px hsla(0, 0%, 0% ,0.22); -$shadow-scroll: inset 0 0 6px hsla(0, 0%, 0%, 0.3); - -/* Maps */ - -// name, color(hsl), unicode, font[opt], weight[opt] -$brands: ( - (twitter, hsl(197, 100%, 47%), "\f099"), - (facebook, hsl(221, 44%, 41%), "\f09a"), - (linkedin, hsl(201, 100%, 35%), "\f08c"), - (pinterest, hsl(357, 70%, 46%), "\f0d2"), - (reddit, hsl(20, 100%, 50%), "\f281"), - (email, hsl(0, 0%, 27%), "\f0e0", $fa-free-font, 900) -); - -/* Thanks to https://bennettfeely.com/clippy/ for $masks */ - -// name, clip mask -$masks: ( - (triangle, polygon(0 100%, 100% 100%, 50% 0)), - (trapezoid, polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%)), - (parallelogram, polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%)), - (rhombus, polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)), - (pentagon, polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)), - (hexagon, polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)), - (heptagon, polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)), - (octagon, polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)), - (nonagon, polygon(50% 0%, 83% 12%, 100% 43%, 94% 78%, 68% 100%, 32% 100%, 6% 78%, 0% 43%, 17% 12%)), - (decagon, polygon(50% 0%, 80% 10%, 100% 35%, 100% 70%, 80% 90%, 50% 100%, 20% 90%, 0% 70%, 0% 35%, 20% 10%)), - (bevel, polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%)), - (rabbet, polygon(0% 15%, 15% 15%, 15% 0%, 85% 0%, 85% 15%, 100% 15%, 100% 85%, 85% 85%, 85% 100%, 15% 100%, 15% 85%, 0% 85%)), - (left-arrow, polygon(40% 0%, 40% 20%, 100% 20%, 100% 80%, 40% 80%, 40% 100%, 0% 50%)), - (right-arrow, polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)), - (left-point, polygon(25% 0%, 100% 1%, 100% 100%, 25% 100%, 0% 50%)), - (right-point, polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)), - (left-cheveron, polygon(100% 0%, 75% 50%, 100% 100%, 25% 100%, 0% 50%, 25% 0%)), - (right-cheveron, polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)), - (star, polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)), - (cross, polygon(10% 25%, 35% 25%, 35% 0%, 65% 0%, 65% 25%, 90% 25%, 90% 50%, 65% 50%, 65% 100%, 35% 100%, 35% 50%, 10% 50%)), - (message, polygon(0% 0%, 100% 0%, 100% 75%, 75% 75%, 75% 100%, 50% 75%, 0% 75%)), - (close, polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%)), - (circle, circle(50% at 50% 50%)), - (vertical-ellipse, ellipse(25% 40% at 50% 50%)), - (horizontal-ellipse, ellipse(40% 25% at 50% 50%)) -); - -/* ========================================================================== - Mixins - ========================================================================== */ - -@mixin prefix($property, $value, $vendors:null ) { - $prefixes: ('webkit', 'moz', 'ms', 'o'); - @if ($vendors) { - @each $vendor in $vendors { - @if index($prefixes, $vendor){ - -#{$vendor}-#{$property}: #{$value}; - } - } - #{$property}: #{$value}; - } - @else { - @each $prefix in $prefixes { - -#{$prefix}-#{$property}: #{$value}; - } - #{$property}: #{$value}; - } -} - -@mixin display-flex { - display: -webkit-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; -} - -/* ========================================================================== - Breakpoints - ========================================================================== */ - -@mixin for-mobile-m-up { - @media (min-width: 320px) { - @content; - } -} - -@mixin for-mobile-l-up { - @media (min-width: 375px) { - @content; - } -} - -@mixin for-tall { - @media (min-height: 600px) { - @content; - } -} - -@mixin for-tablet-up { - @media (min-width: 425px) { - @content; - } -} - -@mixin for-laptop-up { - @media (min-width: 768px) { - @content; - } -} - -@mixin for-desktop-up { - @media (min-width: 1024px) { - @content; - } -} - -@mixin for-big-desktop-up { - @media (min-width: 1440px) { - @content; - } -} - -@mixin for-bigger-desktop-up { - @media (min-width: 1800px) { - @content; - } -} - -/* ========================================================================== - Base styles: opinionated defaults - ========================================================================== */ - -html { - color: $header-color; - font-size: 1em; - line-height: 1.4; -} - -/* -* Remove text-shadow in selection highlight: -* https://twitter.com/miketaylr/status/12228805301 -* -* Vendor-prefixed and regular ::selection selectors cannot be combined: -* https://stackoverflow.com/a/16982510/7133471 -* -* Customize the background color to match your design. -*/ - -::-moz-selection { - background: $accent-color; - text-shadow: none; -} - -::selection { - background: $accent-color; - text-shadow: none; -} - -/* -* A better looking default horizontal rule -*/ - -hr { - display: block; - height: 1px; - border: 0; - border-top: 1px solid hsl(0, 0%, 80%); // 2 Color - margin: 1em 0; - padding: 0; -} - -/* -* Remove the gap between audio, canvas, iframes, -* images, videos and the bottom of their containers: -* https://github.com/h5bp/html5-boilerplate/issues/440 -*/ - -audio, -canvas, -iframe, -img, -svg, -video { - vertical-align: middle; - max-width: 100%; -} - -/* -* Remove default fieldset styles. -*/ - -fieldset { - border: 0; - margin: 0; - padding: 0; -} - -/* -* Allow only vertical resizing of textareas. -*/ - -textarea { - resize: vertical; -} - -/* ========================================================================== - Browser Upgrade Prompt - ========================================================================== */ - -.browserupgrade { - margin: 0.2em 0; - background: $utility-gray; - color: $black; - padding: 0.2em 0; -} - -/* ========================================================================== - Theme Basic Tag Styles - ========================================================================== */ - -body { - background: $utility-white; - margin-top: 3.5em; - max-width: 100vw; - -ms-overflow-style: scrollbar; -} - -/* Box Model */ - -*, -*::before, -*::after { - box-sizing: border-box; -} - -/* Type */ - -body, -input, -select, -textarea { - color: hsl(0, 0%, 20%); - font-family: $body-font; - line-height: 1.75em; -} - -a { - border-bottom: $secondary-border; - color: inherit; - text-decoration: none; - transition: border-bottom-color $hover, color $hover; - &:hover { - border-bottom-color: transparent; - color: $accent-color; - } -} - -h1, -h2, -h3, -h4, -h5, -h6 { - color: $header-color; - font-family: $header-font; - letter-spacing: 0.25em; - line-height: 1.65; - text-transform: uppercase; - a { - border-bottom: 0; - } -} - -blockquote { - border-left: 4px solid $border-color; - font-style: italic; - margin: 0 2em; - padding: 0.5em 0 0.5em 2em; -} - -code { - border: $primary-border; - font-family: $code-font; - font-size: 0.9em; - margin: 0 0.25em; - padding: 0.25em 0.65em; - overflow-x: auto; - &::-webkit-scrollbar { - height: 0.25em; - } - &::-webkit-scrollbar-track { - -webkit-box-shadow: $shadow-scroll; - } - &::-webkit-scrollbar-thumb { - background-color: $utility-gray; - outline: 1px solid $utility-gray-2; - } -} - -pre { - display: table; - font-family: $code-font; - font-size: 0.9em; - table-layout: fixed; - line-height: 1.25; - width: 100%; - code { - display: block; - padding: 1em 1.5em; - overflow-x: auto; - } -} - -hr { - border: 0; - border-bottom: $primary-border; - margin: 2em 0; -} - -cite { - margin: 1em 0; - sup { - left: .5em - } -} - -input[type="submit"], -input[type="reset"], -input[type="button"], -.button { - background-color: transparent; - border: $primary-border; - color: $header-color; - cursor: pointer; - display: inline-block; - font-family: $header-font; - font-size: 0.6em; - font-weight: 800; - height: 4.8125em; - letter-spacing: 0.25em; - line-height: 4.8125em; - margin: auto; - padding: 0 2em; - transition: background-color $hover, border $hover, color $hover; - text-align: center; - text-transform: uppercase; - width: fit-content; - &:hover { - border: 1px solid $accent-color; - color: $accent-color !important; - &:active { - background-color: $active-color; - } - } -} - -label { - color: $header-color; - display: block; - font-size: 0.9em; - font-weight: 700; -} - -input, -select, -textarea { - background: $input-color; - border: $primary-border; - outline: 0; - margin: 0.25em 0; - padding: 0 1em; - width: 100%; - transition: border-color $hover; - &:hover { - border-color: $accent-color; - } - &:focus, - &:active { - border: 1px solid $accent-color; - } -} - -input, -select { - height: 2.75em; -} - -textarea { - height: 5em; -} - -::-webkit-input-placeholder, -:-moz-placeholder, -::-moz-placeholder, -:-ms-input-placeholder, -.formerize-placeholder { - color: $utility-gray; - opacity: 1; -} - -table { - background-color: $white; - box-shadow: $shadow-1; - margin: 1em auto; - width: 75%; - @include for-laptop-up { - width: 90%; - } - > thead { - display: none; - @include for-laptop-up { - background-color: $headerbg-color; - display: table-header-group; - } - } - > tbody { - > tr { - border-bottom: 1px solid $utility-white; - text-align: center; - transition: $hover; - @include for-laptop-up { - &:nth-child(even) { - background-color: $utility-white; - } - &:hover { - background-color: $accent-hover; - } - } - > td { - display: block; - @include for-laptop-up { - display: table-cell; - } - &[data-header]::before { - color: $utility-gray-2; - content: attr(data-header); - float: left; - font-size: inherit; - font-weight: bold; - margin-right: 1em; - @include for-laptop-up { - display: none; - } - } - &:first-child { - background-color: $headerbg-color; - font-weight: bold; - text-align: left; - @include for-laptop-up { - background-color: unset; - text-align: center; - } - &::after { - content: "\f078"; - float: right; - font-family: $fa-free-font; - font-weight: 900; - text-decoration: inherit; - transition: all $hover; - @include for-laptop-up { - display: none; - } - } - } - &:not(:first-child) { - border-bottom: 1px solid $utility-white; - opacity: 0; - position: absolute; - text-align: right; - transition: none; - z-index: -1; - @include for-laptop-up { - border: 0; - opacity: 1; - position: relative; - text-align: center; - z-index: 0; - } - } - @include for-laptop-up { - &[align="left"] { - text-align: left; - } - &[align="center"] { - text-align: center; - } - &[align="right"] { - text-align: right; - } - } - } - &.active > td { - &:first-child { - &::after { - transform: rotateX(180deg); - } - } - &:not(:first-child) { - opacity: 1; - position: relative; - transition: all $hover; - z-index: auto; - } - &:last-child { - border-bottom: 0; - } - } - } - } - > tfoot { - display: none; - @include for-laptop-up { - display: table-footer-group; - } - } - > thead > tr > th, - > tbody > tr > th, - > tfoot > tr > th, - > thead > tr > td, - > tbody > tr > td, - > tfoot > tr > td { - border: 0; - padding: 0.5em; - } -} - -figure { - background: $white; - box-shadow: $shadow-1; - margin: 10px auto; - max-width: 85%; - padding: 0.5em 0.5em 0 0.5em; - width: fit-content; - a { - border: 0; - } - img { - max-width: 100%; - } -} - -figcaption { - color: $utility-gray; - font-size: 0.8em; - font-style: italic; - text-align: center; -} - -/* ========================================================================== - Classes - ========================================================================== */ - -.post { - background: $white; - margin: 1.5em auto; - padding: 1em; - max-width: 55em; - > header { - border-bottom: $primary-border; - margin: -1em -1em 0 -1em; - text-align: center; - @include prefix(word-break, break-word, ms); - @include for-laptop-up { - @include display-flex; - justify-content: space-between; - text-align: left; - } - div { - padding-bottom: 1em; - @include for-laptop-up { - padding: 1.5em; - } - } - p { - margin: -1em 0 0 0; - } - } - > div > p, - > p { - text-align: justify; - } - footer { - @include display-flex; - flex-direction: column; - .button { - margin: 1em auto; - width: 100%; - } - } -} - -.image { - border: 0; - display: grid; - place-items: center; - margin: 0 -1em 1em -1em; - overflow: hidden; - padding-bottom: 33%; - @include prefix(transform, perspective(1000px), (webkit, ms)); - img { - position: absolute; - max-height: 100%; - transition: transform $hover-slow; - &.stretchV { - height: 100%; - } - &.stretchH { - width: 100%; - } - &.cover { - object-fit: cover; - width: 100%; - } - } - &[style]::before { - content: ""; - position: absolute; - background-image: var(--bg-image); - background-size: 100% 100%; - height: 100%; - width: 100%; - @include prefix(filter, blur(8px), webkit); - @include prefix(transform, scale(1.1), (webkit, ms)); - } - &:hover { - img { - @include prefix(transform, scale(1.05), (webkit, ms)); - } - } -} - -.title { - font-size: 1.1em; - width: 100%; - @include for-laptop-up { - width: 75%; - } -} - -.meta { - @include display-flex; - font-family: $header-font; - font-size: 0.6em; - letter-spacing: 0.25em; - text-transform: uppercase; - flex-direction: column; - justify-content: center; - width: 100%; - @include for-laptop-up { - border-left: $primary-border; - text-align: right; - width: 25%; - } - time { - font-size: 1.2em; - font-weight: 800; - } -} - -.stats { - @include display-flex; - flex-direction: column; - @include for-mobile-l-up { - flex-direction: row; - justify-content: space-around; - } - ul { - @include display-flex; - flex-wrap: wrap; - margin: 1em 0 0 0; - padding: 0; - font-family: $fa-free-font; - font-weight: 900; - list-style: none; - @include for-mobile-l-up { - max-width: 50%; - justify-content: center; - } - &::before { - width: 40px; - padding-right: 1em; - margin-right: 1em; - border-right: $primary-border; - @include for-mobile-l-up { - padding-right: 0; - margin-right: 0; - border-right: 0; - border-bottom: $primary-border; - flex: 100%; - height: fit-content; - text-align: center; - } - } - li { // Fix Wrap Small - font-family: $header-font; - font-size: 0.6em; - font-weight: 400; - letter-spacing: 0.25em; - text-transform: uppercase; - &:not(:first-child) { - margin-left: 1em; - } - a { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - } - } -} - -/*.stats { - ul { - &:hover, - &:focus, - &:active { - li { - visibility: visible; - opacity: 1; - line-height: 1; - margin: 1em; - width: auto; - } - } - li { - visibility: visible; - line-height: 0; - margin: 0; - width: 0; - opacity: 0; - transition: visibility 0s, opacity 0.5s linear, line-height 0.5s linear, margin 0.5s linear, width 0.5s linear; - text-transform: uppercase; - &:nth-child(-n + 3) { - visibility: visible; - opacity: 1; - width: auto; - line-height: 1; - margin: 1em; - } - a { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - } - } -}*/ - -.categories::before { - content: "\f07b"; -} - -.tags::before { - content: "\f02c"; -} - -/* Pagination */ - -.pagination { - @include display-flex; - justify-content: space-around; - align-items: center; - margin: 1.5em auto; - padding: 1em; - max-width: 55em; - .button { - margin: 1em; - width: 50%; - } -} - -.left, -.right { - span { - display: none; - @include for-tablet-up { - display: block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - } - &::before { - font-family: $fa-free-font; - font-weight: 900; - text-decoration: inherit; - } -} - -.left::before { - content: "\f053"; - float: left; - padding-right: 0.5em; -} - -.right::before { - content: "\f054"; - float: right; - padding-left: 0.5em; -} - -.nav { - border: 0; - border-left: $primary-border; - font-family: $header-font; - font-size: 0.7em; - font-weight: 400; - letter-spacing: 0.25em; - margin: 0; - padding: 0 1.5em; - text-transform: uppercase; -} - -.flyout-menu { - background-color: $white; - border-left: $primary-border; - height: 100%; - margin-top: 3.5em; - overflow-y: auto; - padding: 0; - position: fixed; - top: 0; - transition: $hover-slow; - z-index: 20; - &.active { - box-shadow: $shadow-2; - right: 0 !important; - a { - border-left: 0; - } - } - h1 { - font-size: 1em; - } -} - -.link { - border-bottom: $secondary-border; - display: block; - flex-basis: 100%; - order: 2; - &:hover { - border-bottom: $secondary-border; - } - @include for-desktop-up { - border-bottom: none; - display: inline; - order: 0; - &:hover { - border-bottom: 0; - } - &:first-of-type { - border: 0; - } - } -} - -.nav-title { - align-items: center; - @include display-flex; - flex-grow: 1; - margin: 0; - a { - border: 0; - font-size: 0.35em; - font-weight: 800; - margin-left: 1.5em; - opacity: 1; - padding: 0; - img { - height: 4.8em; - width: 12.6em; - } - } - @include for-desktop-up { - flex-grow: 0; - &::after { - background: $border-color; - content: ""; - display: block; - height: 56px; - margin-left: 1.5em; - width: 1px; - } - a { - min-width: 12.5em; - img { - margin-top: -0.2em; - } - } - } -} - -.share-toggle, -.search-toggle { - display: none; - @include for-tablet-up { - display: block; - text-align: center; - width: 61px; - i { - vertical-align: middle; - } - } -} - -.nav-toggle { - text-align: center; - width: 61px; - @include for-desktop-up { - display: none; - } - i { - vertical-align: middle; - } -} - -.search-input { - background-color: $white; - box-shadow: $shadow-3; - height: 0px; - opacity: 0; - transition: $hover-slow; - width: 300px; - z-index: -1; - &.active { - opacity: 1; - height: 50px; - z-index: 0; - } -} - -.search-results { - @include display-flex; - opacity: 0; - line-height: 1.75em; - transition: $hover-slow; - z-index: -1; - &.active { - opacity: 1; - z-index: 0; - } - flex-direction: column; - align-items: center; - max-height: calc(100vh - 9.4em); - overflow-y: auto; - margin-top: 1em; - padding-bottom: 1em; - width: 100%; - .mini-post { - box-shadow: $shadow-2; - width: 90%; - @include for-tablet-up { - width: 75%; - } - @include for-laptop-up { - width: 50% - } - a { - border-bottom: 0; - &:hover { - color:inherit; - box-shadow: $shadow-3; - transition: box-shadow $hover; - } - } - header { - @include for-laptop-up { - @include display-flex; - align-items: center; - border-bottom: $primary-border; - h2 { - flex-grow: 1; - font-size: 1em; - } - } - } - main { - padding: 0 1.25em .1em; - } - } -} - -.mini-post { - background: $white; - border: $primary-border; - @include display-flex; - flex-direction: column; - margin-bottom: 1em; - width: 100%; - @include for-laptop-up { - width: 49%; - } - @include for-desktop-up { - width: 100%; - } - header { - min-height: 4em; - padding: 0.5em 1.25em; - position: relative; - @include for-laptop-up { - border-top: $primary-border; - } - @include for-desktop-up { - border: 0; - } - h2 { - font-size: 0.7em; - } - time { - font-family: $header-font; - font-size: 0.6em; - letter-spacing: 0.25em; - text-transform: uppercase; - } - } - .image { - margin: 0; - } -} - -.count { - float: right; -} - -.copyright { - color: $utility-gray; - font-family: $header-font; - font-size: 0.5em; - font-weight: 400; - letter-spacing: 0.25em; - text-align: center; - text-transform: uppercase; -} - -.socnet-icons { - @include display-flex; - flex-wrap: wrap; - justify-content: center; - padding-left: 0; - li { - margin: 0 0.5em; - min-width: 20px; - list-style-type: none; - a { - opacity: 0.6; - border: none; - } - } -} - -/* ========================================================================== - IDs and Grid - ========================================================================== */ - -#site-header { - background-color: $white; - border-bottom: $primary-border; - box-shadow: $shadow-2; - height: 3.5em; - line-height: 3.5em; - position: fixed; - margin-bottom: 3.5em; - top: 0; - width: 100%; - z-index: 10000; -} - -#site-nav { - align-items: center; - @include display-flex; - justify-content: space-between; - .flyout-menu { - right: -177px; - width: 177px; - @include for-desktop-up { - background-color: unset; - border: none; - flex-grow: 1; - height: auto; - margin: 0; - overflow: auto; - position: static; - transition: none; - white-space: nowrap; - &::-webkit-scrollbar { - height: 0.25em; - } - &::-webkit-scrollbar-track { - -webkit-box-shadow: $shadow-scroll; - } - &::-webkit-scrollbar-thumb { - background-color: $utility-gray; - outline: 1px solid $utility-gray-2; - } - } - &.active { - flex-wrap: wrap; - @include for-desktop-up { - box-shadow: none; - } - } - .search-toggle { - display: inline-flex; - flex-basis: 100%; - order: 1; - } - .share-toggle, .search-toggle { - display: block; - flex-basis: 100%; - order: 3; - @include for-tablet-up { - display: none; - } - } - } -} - -#search { - @include display-flex; - align-items: center; - flex-direction: column; - padding: 0; -} - -#lang-menu { - &.flyout-menu { - right: -177px; - width: 177px; - a { - border-left: 0; - } - .link { - border-bottom: $secondary-border; - display: block; - } - .no-lang { - cursor: not-allowed; - opacity: 0.25; - span { - &:hover { - box-shadow: none; - } - } - } - } -} - -#share-menu { - @include display-flex; - flex-direction: column; - justify-content: flex-start; - text-align: center; - &.flyout-menu { - width: 177px; - right: -177px; - padding: 1em; - h1 { - font-size: 0.9em; - } - h1, - a { - margin: 0.25em 0.25em; - @include for-tall { - margin: 0 0.25em 0.75em 0; - } - } - a p { - visibility: hidden; - } - .share-btn { - height: 50px; - i { - font-size: 1.5em; - } - } - } -} - -#site-intro { - grid-area: intro; - align-items: center; - @include display-flex; - flex-direction: column; - margin-top: 0.5em; - padding: 1em; - text-align: center; - a { - border: 0; - } - p { - opacity: 0.6; - } - header { - h1 { - font-size: 1.25em; - margin-bottom: 0; - } - } - main { - p { - font-size: 0.7em; - letter-spacing: 0.25em; - line-height: 2.5; - margin-bottom: 0; - text-transform: uppercase; - } - } -} - -#site-sidebar { - grid-area: sidebar; - header h1 { - font-size: 1em; - } - > * { - border-top: $primary-border; - margin: 3em 2em 0 2em; - padding-top: 3em; - } - > *:first-child { - @include for-desktop-up { - margin-top: 0; - } - } - ul { - font-family: $header-font; - font-size: 0.9em; - letter-spacing: 0.25em; - line-height: 1.65; - text-transform: uppercase; - list-style: none; - padding: 0; - } - footer { - margin: auto; - width: max-content; - } -} - -#categories { -} - -#recent-posts { - @include display-flex; - flex-wrap: wrap; - justify-content: space-between; - > header { - -webkit-box-flex: 1; - @include prefix(flex, 1 1 100%, (ms, webkit)); - } -} - -#mini-bio { - p { - opacity: 0.65; - font-size: 0.9em; - padding: 0; - } -} - -#site-main { - grid-area: main; -} - -#site-footer { - grid-area: footer; - border-top: $primary-border; - margin: 3em 2em; - padding-top: 3em; -} - -#back-to-top { - bottom: 15px; - color: $utility-gray; - display: none; - position: fixed; - right: 15px; - border: 0; - transition: color $hover, transform $hover; - &:hover { - color: $accent-color !important; - transform: translateY(-10px); - } -} - -#socnet-share { - @include display-flex; - flex-wrap: wrap; - justify-content: space-between; - margin: 1em 1em 0 0; - @include for-laptop-up { - justify-content: flex-start; - } - a { - margin-bottom: 0.5em; - padding: 0.5em; - width: 4em; - @include for-laptop-up { - margin-right: 0.25em; - } - i { - font-size: 1em; - } - } - p { - display: none; - } -} - -#wrapper { - display: -ms-grid; - display: grid; - grid-template-areas: - "intro" - "main" - "sidebar" - "footer"; - grid-template-rows: auto 1fr auto auto; - margin: 0 auto; - max-width: 90em; - min-height: 100vh; - transition: opacity $hover-slow; - @include for-desktop-up { - grid-template-areas: - "intro main" - "sidebar main" - "footer main" - "blank main"; - grid-template-columns: 22em 1fr; - grid-template-rows: auto auto auto 1fr; - padding: 0 2.5em; - } - &.overlay { - opacity: 0.25; - } -} - -/* ========================================================================== - Add-Ons - ========================================================================== */ - -/* reCaptcha */ - -.g-recaptcha { - @include prefix(transform, scale(0.955), (webkit, ms)); - @include prefix(transform-origin, 0 0, (webkit, ms)); - margin: -0.25em 0 0.25em 0; - width: 0; -} - -/* Staticman Comments - Form */ - -.new-comment { - &.loading { - opacity: 0.5; - } - .reply-notice { - .comment-avatar { - width: 2em; - height: 2em; - margin: 0 0.6em; - } - .reply-close-btn { - padding: unset; - border: none; - vertical-align: top; - font-size: 1em; - line-height: 0; - height: 0; - &:hover { - border: none; - } - } - .reply-name { - vertical-align: middle; - &::before { - font-family: $fa-free-font; - font-weight: 900; - content: "\f3e5"; - margin-right: .5em; - width: 20px; - } - } - } -} - -.submit-success { - border: 1px solid $accent-color; - background: $accent-hover; -} -.submit-failed { - border: 1px solid $warning-color; - background: $warning-hover; -} - -/* Staticman Comments - Content */ - -.comment { - header { - @include display-flex; - background: $headerbg-color; - align-items: center; - border-radius: 50px 0 0 50px; - @include for-mobile-l-up { - border-radius: 0; - } - div { - @include display-flex; - flex-direction: column; - flex-grow: 1; - align-items: center; - @include for-mobile-l-up { - flex-direction: row; - } - } - } - &.comment-reply { - margin-left: $avatar-size/2; - @include for-mobile-l-up { - margin-left: $avatar-size; - } - } -} - -.comment-author-container { - @include display-flex; - flex-direction: column; - align-items: center; - text-align: center; - @include for-mobile-l-up { - align-items: flex-start; - flex-grow: 1; - } - @include for-laptop-up { - flex-direction: row; - align-items: center; - } -} - -.comment-avatar { - margin: 0 0 0 1em; - width: $avatar-size; - height: $avatar-size; - flex-grow: 0; - @include for-mobile-l-up { - margin: 0 .5em 0 0; - &.circle { - @include prefix(clip-path, none, webkit); - } - } -} - -.comment-author { - font-size: 0.9em; - margin: 0; - @include for-laptop-up { - margin-right: .5em; - padding-right: .5em; - border-right: $primary-border; - } -} - -.comment-reply-btn { - border: 0; - &::before { - font-family: $fa-free-font; - font-weight: 900; - content: "\f3e5"; - margin-right: .5em; - width: 20px; - } - @include for-mobile-l-up { - margin-right: 1.5em; - } -} - -.comment-content { - margin: 1em; -} - -/* TODO: Assess Value - .reply-target { - font-size: 0.9em; - border: 0; - &::before { - font-family: $fa-free-font; - font-weight: 900; - content: "\f3e5"; - margin-right: .5em; - width: 20px; - } - } -*/ - -/* Image Masks */ - -@each $name, $clip in $masks { - .#{$name} { - @include prefix(clip-path, $clip, webkit); - } -} - -/* Share Button */ - -.share-btn { - font-size: 1.5em; - border-radius: 4px; - box-shadow: $shadow-1; - letter-spacing: 0; - color: $white; - text-align: center; - transition: background-color $hover; - &:active { - position: relative; - top: 2px; - box-shadow: none; - color: darken($white, 10%); - } - &:hover { - color: $white; - } -} - -/* Share Branding */ - -@each $name, $color, $icon, $font-family, $font-weight in $brands { - .#{$name} { - background-color: $color; - @if $font-weight { - font-weight: $font-weight; - } - &:hover { - background-color: darken($color, 10%); - } - &::before { - @if $font-family { - font-family: $font-family; - } @else { - font-family: $fa-brands-font; - } - content: $icon; - } - } -} - -/* Hide Single Column */ - -.hidden-single-column { - display: none; - @include for-laptop-up { - @include display-flex; - } -} - -/* ========================================================================== - Helper classes - ========================================================================== */ - -/* - * Hide visually and from screen readers - */ - -.hidden, -[hidden] { - display: none !important; -} - -/* - * Hide only visually, but have it available for screen readers: - * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility - * - * 1. For long content, line feeds are not interpreted as spaces and small width - * causes content to wrap 1 word per line: - * https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe - */ - -.sr-only { - border: 0; - clip: rect(0, 0, 0, 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - white-space: nowrap; - width: 1px; - /* 1 */ -} - -/* - * Extends the .sr-only class to allow the element - * to be focusable when navigated to via the keyboard: - * https://www.drupal.org/node/897638 - */ - -.sr-only.focusable:active, -.sr-only.focusable:focus { - clip: auto; - height: auto; - margin: 0; - overflow: visible; - position: static; - white-space: inherit; - width: auto; -} - -/* - * Hide visually and from screen readers, but maintain layout - */ - -.invisible { - visibility: hidden; -} - -/* - * Clearfix: contain floats - * - * For modern browsers - * 1. The space content is one way to avoid an Opera bug when the - * `contenteditable` attribute is included anywhere else in the document. - * Otherwise it causes space to appear at the top and bottom of elements - * that receive the `clearfix` class. - * 2. The use of `table` rather than `block` is only necessary if using - * `:before` to contain the top-margins of child elements. - */ - -.clearfix::before, -.clearfix::after { - content: " "; - display: table; -} - -.clearfix::after { - clear: both; -} - -/* ========================================================================== - EXAMPLE Media Queries for Responsive Design. - These examples override the primary ('mobile first') styles. - Modify as content requires. - ========================================================================== */ - -@media only screen and (min-width: 35em) { - /* Style adjustments for viewports that meet the condition */ -} - -@media print, - (-webkit-min-device-pixel-ratio: 1.25), - (min-resolution: 1.25dppx), - (min-resolution: 120dpi) { - /* Style adjustments for high resolution devices */ -} - -/* ========================================================================== - Print styles. - Inlined to avoid the additional HTTP request: - https://www.phpied.com/delay-loading-your-print-css/ - ========================================================================== */ - -@media print { - *, - *::before, - *::after { - background: $white !important; - color: $black !important; - /* Black prints faster */ - box-shadow: none !important; - text-shadow: none !important; - } - - a, - a:visited { - text-decoration: underline; - } - - a[href]::after { - content: " (" attr(href) ")"; - } - - abbr[title]::after { - content: " (" attr(title) ")"; - } - - /* - * Don't show links that are fragment identifiers, - * or use the `javascript:` pseudo protocol - */ - a[href^="#"]::after, - a[href^="javascript:"]::after { - content: ""; - } - - pre { - white-space: pre-wrap !important; - } - - pre, - blockquote { - border: $primary-border; - page-break-inside: avoid; - } - - /* - * Printing Tables: - * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables - */ - thead { - display: table-header-group; - } - - tr, - img { - page-break-inside: avoid; - } - - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - - h2, - h3 { - page-break-after: avoid; - } -} +@use 'vendors/normalize'; +@use 'abstracts'; +@use 'base'; +@use 'components'; +@use 'layout'; +@use 'vendors'; +@use 'vendors-ext'; +@use 'user'; diff --git a/assets/scss/themes/_dark.scss b/assets/scss/themes/_dark.scss new file mode 100644 index 00000000..e69de29b diff --git a/assets/scss/themes/_default.scss b/assets/scss/themes/_default.scss new file mode 100644 index 00000000..e69de29b diff --git a/assets/scss/vendors-ext/_index.scss b/assets/scss/vendors-ext/_index.scss new file mode 100644 index 00000000..debb8cbe --- /dev/null +++ b/assets/scss/vendors-ext/_index.scss @@ -0,0 +1,2 @@ +@use 'recaptcha'; +@use 'photoswipe'; diff --git a/assets/scss/vendors-ext/_photoswipe.scss b/assets/scss/vendors-ext/_photoswipe.scss new file mode 100644 index 00000000..950fbbe1 --- /dev/null +++ b/assets/scss/vendors-ext/_photoswipe.scss @@ -0,0 +1,9 @@ +.pswp { + z-index: 10000; + button { + min-width: unset; + &:hover { + border: unset; + } + } +} diff --git a/assets/scss/vendors-ext/_recaptcha.scss b/assets/scss/vendors-ext/_recaptcha.scss new file mode 100644 index 00000000..c7e212c6 --- /dev/null +++ b/assets/scss/vendors-ext/_recaptcha.scss @@ -0,0 +1,8 @@ +@use 'abstracts' as *; + +.g-recaptcha { + @include prefix(transform, scale(0.955), (webkit, ms)); + @include prefix(transform-origin, 0 0, (webkit, ms)); + margin: -0.25em 0 0.25em 0; + width: 0; +} diff --git a/assets/scss/vendors/_index.scss b/assets/scss/vendors/_index.scss new file mode 100644 index 00000000..cfb20f3a --- /dev/null +++ b/assets/scss/vendors/_index.scss @@ -0,0 +1,4 @@ +@forward "academicons"; +@forward "photoswipe/photoswipe"; +@forward "photoswipe/default-skin"; +@forward "fontawesome"; diff --git a/assets/css/academicons.css b/assets/scss/vendors/academicons.css similarity index 52% rename from assets/css/academicons.css rename to assets/scss/vendors/academicons.css index 1f10cdb2..36f89058 100644 --- a/assets/css/academicons.css +++ b/assets/scss/vendors/academicons.css @@ -1,369 +1,688 @@ /* - * Academicons 1.8.6 by James Walsh (https://github.com/jpswalsh) and Katja Bercic (https://github.com/katjabercic) - * Fonts generated using the IcoMoon app - http://icomoon.io/app + * Academicons 1.9.1 by James Walsh (https://github.com/jpswalsh) and Katja Bercic (https://github.com/katjabercic) + * Fonts generated using FontForge - https://fontforge.org * Square icons designed to be used alongside Font Awesome square icons - https://fortawesome.github.io/Font-Awesome/ * Licenses - Font: SIL OFL 1.1, CSS: MIT License */ + @font-face { - font-family: 'Academicons'; - src:url('../webfonts/academicons.eot?v=1.8.6'); - src:url('../webfonts/academicons.eot?v=1.8.6') format('embedded-opentype'), - url('../webfonts/academicons.ttf?v=1.8.6') format('truetype'), - url('../webfonts/academicons.woff?v=1.8.6') format('woff'), - url('../webfonts/academicons.svg?v=1.8.6#academicons') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'Academicons'; + font-style: normal; + font-weight: 400; + font-display: block; + src: url('../webfonts/academicons.woff') format('woff'); } + .ai { - display:inline-block; - font:normal normal normal 14px/1 Academicons; - font-size:inherit; - text-rendering:auto; - -webkit-font-smoothing:antialiased; - -moz-osx-font-smoothing:grayscale; -} + font-family: 'Academicons'; + font-weight: 400; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; +} + .ai-academia:before { content: "\e9af"; } + .ai-academia-square:before { content: "\e93d"; } + .ai-acclaim:before { content: "\e92e"; } + .ai-acclaim-square:before { content: "\e93a"; } + .ai-acm:before { content: "\e93c"; } + .ai-acm-square:before { content: "\e95d"; } + .ai-acmdl:before { content: "\e96a"; } + .ai-acmdl-square:before { content: "\e9d3"; } + .ai-ads:before { content: "\e9cb"; } + .ai-ads-square:before { content: "\e94a"; } + +.ai-africarxiv:before { + content: "\e91b"; +} + +.ai-africarxiv-square:before { + content: "\e90b"; +} + .ai-arxiv:before { content: "\e974"; } + .ai-arxiv-square:before { content: "\e9a6"; } + .ai-biorxiv:before { content: "\e9a2"; } + .ai-biorxiv-square:before { content: "\e98b"; } + .ai-ceur:before { content: "\e96d"; } + .ai-ceur-square:before { content: "\e92f"; } + +.ai-ciencia-vitae:before { + content: "\e912"; +} + +.ai-ciencia-vitae-square:before { + content: "\e913"; +} + +.ai-closed-access:before { + content: "\e942"; +} + +.ai-closed-access-square:before { + content: "\e943"; +} + +.ai-conversation:before { + content: "\e94c"; +} + +.ai-conversation-square:before { + content: "\e915"; +} + .ai-coursera:before { content: "\e95f"; } + .ai-coursera-square:before { content: "\e97f"; } + +.ai-crossref:before { + content: "\e918"; +} + +.ai-crossref-square:before { + content: "\e919"; +} + .ai-cv:before { content: "\e9a5"; } + .ai-cv-square:before { content: "\e90a"; } + +.ai-datacite:before { + content: "\e91c"; +} + +.ai-datacite-square:before { + content: "\e91d"; +} + .ai-dataverse:before { content: "\e9f7"; } + .ai-dataverse-square:before { content: "\e9e4"; } + .ai-dblp:before { content: "\e94f"; } + .ai-dblp-square:before { content: "\e93f"; } + .ai-depsy:before { content: "\e97a"; } + .ai-depsy-square:before { content: "\e94b"; } + .ai-doi:before { content: "\e97e"; } + .ai-doi-square:before { content: "\e98f"; } + .ai-dryad:before { content: "\e97c"; } + .ai-dryad-square:before { content: "\e98c"; } + +.ai-elsevier:before { + content: "\e961"; +} + +.ai-elsevier-square:before { + content: "\e910"; +} + .ai-figshare:before { content: "\e981"; } + .ai-figshare-square:before { content: "\e9e7"; } + .ai-google-scholar:before { content: "\e9d4"; } + .ai-google-scholar-square:before { content: "\e9f9"; } + +.ai-hal:before { + content: "\e92c"; +} + +.ai-hal-square:before { + content: "\e92d"; +} + +.ai-hypothesis:before { + content: "\e95a"; +} + +.ai-hypothesis-square:before { + content: "\e95b"; +} + .ai-ideas-repec:before { content: "\e9ed"; } + .ai-ideas-repec-square:before { content: "\e9f8"; } + .ai-ieee:before { content: "\e929"; } + .ai-ieee-square:before { content: "\e9b9"; } + .ai-impactstory:before { content: "\e9cf"; } + .ai-impactstory-square:before { content: "\e9aa"; } + +.ai-inaturalist:before { + content: "\e900"; +} + +.ai-inaturalist-square:before { + content: "\e901"; +} + +.ai-inpn:before { + content: "\e902"; +} + +.ai-inpn-square:before { + content: "\e903"; +} + .ai-inspire:before { content: "\e9e9"; } + .ai-inspire-square:before { content: "\e9fe"; } + +.ai-isidore:before { + content: "\e936"; +} + +.ai-isidore-square:before { + content: "\e954"; +} + +.ai-jstor:before { + content: "\e938"; +} + +.ai-jstor-square:before { + content: "\e944"; +} + .ai-lattes:before { content: "\e9b3"; } + .ai-lattes-square:before { content: "\e99c"; } + .ai-mathoverflow:before { content: "\e9f6"; } + .ai-mathoverflow-square:before { content: "\e97b"; } + .ai-mendeley:before { content: "\e9f0"; } + .ai-mendeley-square:before { content: "\e9f3"; } + +.ai-moodle:before { + content: "\e907"; +} + +.ai-moodle-square:before { + content: "\e908"; +} + +.ai-nakala:before { + content: "\e940"; +} + +.ai-nakala-square:before { + content: "\e941"; +} + +.ai-obp:before { + content: "\e92a"; +} + +.ai-obp-square:before { + content: "\e92b"; +} + .ai-open-access:before { content: "\e939"; } + .ai-open-access-square:before { content: "\e9f4"; } + +.ai-open-data:before { + content: "\e966"; +} + +.ai-open-data-square:before { + content: "\e967"; +} + +.ai-open-materials:before { + content: "\e968"; +} + +.ai-open-materials-square:before { + content: "\e969"; +} + +.ai-openedition:before { + content: "\e946"; +} + +.ai-openedition-square:before { + content: "\e947"; +} + .ai-orcid:before { content: "\e9d9"; } + .ai-orcid-square:before { content: "\e9c3"; } + .ai-osf:before { content: "\e9ef"; } + .ai-osf-square:before { content: "\e931"; } + .ai-overleaf:before { content: "\e914"; } + .ai-overleaf-square:before { content: "\e98d"; } + .ai-philpapers:before { content: "\e98a"; } + .ai-philpapers-square:before { content: "\e96f"; } + .ai-piazza:before { content: "\e99a"; } + .ai-piazza-square:before { content: "\e90c"; } + +.ai-preregistered:before { + content: "\e906"; +} + +.ai-preregistered-square:before { + content: "\e96b"; +} + +.ai-protocols:before { + content: "\e952"; +} + +.ai-protocols-square:before { + content: "\e953"; +} + +.ai-psyarxiv:before { + content: "\e90e"; +} + +.ai-psyarxiv-square:before { + content: "\e90f"; +} + .ai-publons:before { content: "\e937"; } + .ai-publons-square:before { content: "\e94e"; } + .ai-pubmed:before { content: "\e99f"; } + .ai-pubmed-square:before { content: "\e97d"; } + +.ai-pubpeer:before { + content: "\e922"; +} + +.ai-pubpeer-square:before { + content: "\e923"; +} + .ai-researcherid:before { content: "\e91a"; } + .ai-researcherid-square:before { content: "\e95c"; } + .ai-researchgate:before { content: "\e95e"; } + .ai-researchgate-square:before { content: "\e99e"; } + +.ai-ror:before { + content: "\e948"; +} + +.ai-ror-square:before { + content: "\e949"; +} + +.ai-sci-hub:before { + content: "\e959"; +} + +.ai-sci-hub-square:before { + content: "\e905"; +} + .ai-scirate:before { content: "\e98e"; } + .ai-scirate-square:before { content: "\e99d"; } + +.ai-scopus:before { + content: "\e91e"; +} + +.ai-scopus-square:before { + content: "\e91f"; +} + .ai-semantic-scholar:before { content: "\e96e"; } + .ai-semantic-scholar-square:before { content: "\e96c"; } + .ai-springer:before { content: "\e928"; } + .ai-springer-square:before { content: "\e99b"; } + +.ai-ssrn:before { + content: "\e916"; +} + +.ai-ssrn-square:before { + content: "\e917"; +} + +.ai-stackoverflow:before { + content: "\e920"; +} + +.ai-stackoverflow-square:before { + content: "\e921"; +} + +.ai-zenodo:before { + content: "\e911"; +} + .ai-zotero:before { content: "\e962"; } + .ai-zotero-square:before { content: "\e932"; } + /* Duplication of the FontAwesome style classes using 'ai' in place of 'fa'. */ + .ai-lg { - font-size: 1.33333333em; + font-size: 1.33333em; line-height: 0.75em; - vertical-align: -15%; + vertical-align: -.0667em; +} + +.ai-xs { + font-size: .75em; } + +.ai-sm { + font-size: .875em; +} + +.ai-1x { + font-size: 1em; +} + .ai-2x { font-size: 2em; } + .ai-3x { font-size: 3em; } + .ai-4x { font-size: 4em; } + .ai-5x { font-size: 5em; } + +.ai-6x { + font-size: 6em; +} + +.ai-7x { + font-size: 7em; +} + +.ai-8x { + font-size: 8em; +} + +.ai-9x { + font-size: 9em; +} + +.ai-10x { + font-size: 10em; +} + .ai-fw { - width: 1.28571429em; text-align: center; + width: 1.25em; } + .ai-ul { - padding-left: 0; - margin-left: 2.14285714em; list-style-type: none; + margin-left: 2.5em; + padding-left: 0; } -.ai-ul > li { + +.ai-ul>li { position: relative; } + .ai-li { + left: -2em; position: absolute; - left: -2.14285714em; - width: 2.14285714em; - top: 0.14285714em; text-align: center; + width: 2em; + line-height: inherit; } -.ai-li.fa-lg { - left: -1.85714286em; -} + .ai-border { - padding: .2em .25em .15em; - border: solid 0.08em #eeeeee; + border: solid 0.08em #eee; border-radius: .1em; + padding: .2em .25em .15em; } + .ai-pull-left { float: left; } + .ai-pull-right { float: right; } -.ai.fa-pull-left { + +.ai.ai-pull-left { margin-right: .3em; } -.ai.fa-pull-right { - margin-left: .3em; -} -/* - * Repeat of the FontAwesome style classes to prevent override if academicons.css - * is called after font-awesome.css. - */ -.fa-lg { - font-size: 1.33333333em; - line-height: 0.75em; - vertical-align: -15%; -} -.fa-2x { - font-size: 2em; -} -.fa-3x { - font-size: 3em; -} -.fa-4x { - font-size: 4em; -} -.fa-5x { - font-size: 5em; -} -.fa-fw { - width: 1.28571429em; - text-align: center; -} -.fa-ul { - padding-left: 0; - margin-left: 2.14285714em; - list-style-type: none; + +.ai.ai-pull-right { + margin-right: .3em; } -.fa-ul > li { + +.ai-stack { + display: inline-block; + height: 2em; + line-height: 2em; position: relative; + vertical-align: middle; + width: 2.5em; } -.fa-li { + +.ai-stack-1x, +.ai-stack-2x { + left: 0; position: absolute; - left: -2.14285714em; - width: 2.14285714em; - top: 0.14285714em; text-align: center; + width: 100%; } -.fa-li.fa-lg { - left: -1.85714286em; -} -.fa-border { - padding: .2em .25em .15em; - border: solid 0.08em #eeeeee; - border-radius: .1em; -} -.fa-pull-left { - float: left; -} -.fa-pull-right { - float: right; + +.ai-stack-1x { + line-height: inherit; } -.fa.fa-pull-left { - margin-right: .3em; + +.ai-stack-2x { + font-size: 2em; } -.fa.fa-pull-right { - margin-left: .3em; + +.ai-inverse { + color: #fff; } diff --git a/assets/css/dark.css b/assets/scss/vendors/dark.css similarity index 77% rename from assets/css/dark.css rename to assets/scss/vendors/dark.css index b4724f5f..6e8a18d4 100644 --- a/assets/css/dark.css +++ b/assets/scss/vendors/dark.css @@ -1,13 +1,10 @@ /* - -Dark style from softwaremaniacs.org (c) Ivan Sagalaev - + Dark style from softwaremaniacs.org (c) Ivan Sagalaev + https://raw.githubusercontent.com/highlightjs/highlight.js/main/src/styles/dark.css */ .hljs { - display: block; - overflow-x: auto; - padding: 0.5em; + color: #ddd; background: #444; } @@ -19,9 +16,9 @@ Dark style from softwaremaniacs.org (c) Ivan Sagalaev + Maintainer: @highlightjs/core-team + Website: https://highlightjs.org/ + License: see project LICENSE + Touched: 2021 + https://raw.githubusercontent.com/highlightjs/highlight.js/main/src/styles/default.css +*/ -Original highlight.js style (c) Ivan Sagalaev +/* +This is left on purpose making default.css the single file that can be lifted +as-is from the repository directly without the need for a build step +Typically this "required" baseline CSS is added by `makestuff.js` during build. */ - -.hljs { +pre code.hljs { display: block; overflow-x: auto; - padding: 0.5em; - background: #F0F0F0; + padding: 1em; } +code.hljs { + padding: 3px 5px; +} +/* end baseline CSS */ + +.hljs { + background: #F0F0F0; + color: #444; +} /* Base color: saturation 0; */ -.hljs, .hljs-subst { - color: #444; + /* default */ } +/* purposely ignored */ +.hljs-formula, +.hljs-attr, +.hljs-property, +.hljs-params {} + .hljs-comment { color: #888888; } +.hljs-tag, +.hljs-punctuation { + color: #444a; +} + +.hljs-tag .hljs-name, +.hljs-tag .hljs-attr { + color: #444; +} + .hljs-keyword, .hljs-attribute, .hljs-selector-tag, -.hljs-meta-keyword, +.hljs-meta .hljs-keyword, + .hljs-doctag, .hljs-name { font-weight: bold; @@ -58,11 +93,11 @@ Original highlight.js style (c) Ivan Sagalaev .hljs-template-variable, .hljs-link, .hljs-selector-attr, +.hljs-operator, .hljs-selector-pseudo { color: #BC6060; } - /* Language color: hue: 90; */ .hljs-literal { @@ -83,7 +118,7 @@ Original highlight.js style (c) Ivan Sagalaev color: #1f7199; } -.hljs-meta-string { +.hljs-meta .hljs-string { color: #4d99bf; } diff --git a/assets/css/fontawesome.css b/assets/scss/vendors/fontawesome.css similarity index 51% rename from assets/css/fontawesome.css rename to assets/scss/vendors/fontawesome.css index bca4744d..7300ffe8 100644 --- a/assets/css/fontawesome.css +++ b/assets/scss/vendors/fontawesome.css @@ -1,7 +1,8 @@ /*! - * Font Awesome Free 5.10.1 by @fontawesome - https://fontawesome.com + * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ + .fa, .fas, .far, @@ -14,145 +15,184 @@ font-style: normal; font-variant: normal; text-rendering: auto; - line-height: 1; } + line-height: 1; +} .fa-lg { font-size: 1.33333em; line-height: 0.75em; - vertical-align: -.0667em; } + vertical-align: -.0667em; +} .fa-xs { - font-size: .75em; } + font-size: .75em; +} .fa-sm { - font-size: .875em; } + font-size: .875em; +} .fa-1x { - font-size: 1em; } + font-size: 1em; +} .fa-2x { - font-size: 2em; } + font-size: 2em; +} .fa-3x { - font-size: 3em; } + font-size: 3em; +} .fa-4x { - font-size: 4em; } + font-size: 4em; +} .fa-5x { - font-size: 5em; } + font-size: 5em; +} .fa-6x { - font-size: 6em; } + font-size: 6em; +} .fa-7x { - font-size: 7em; } + font-size: 7em; +} .fa-8x { - font-size: 8em; } + font-size: 8em; +} .fa-9x { - font-size: 9em; } + font-size: 9em; +} .fa-10x { - font-size: 10em; } + font-size: 10em; +} .fa-fw { text-align: center; - width: 1.25em; } + width: 1.25em; +} .fa-ul { list-style-type: none; margin-left: 2.5em; - padding-left: 0; } - .fa-ul > li { - position: relative; } + padding-left: 0; +} + +.fa-ul>li { + position: relative; +} .fa-li { left: -2em; position: absolute; text-align: center; width: 2em; - line-height: inherit; } + line-height: inherit; +} .fa-border { border: solid 0.08em #eee; border-radius: .1em; - padding: .2em .25em .15em; } + padding: .2em .25em .15em; +} .fa-pull-left { - float: left; } + float: left; +} .fa-pull-right { - float: right; } + float: right; +} .fa.fa-pull-left, .fas.fa-pull-left, .far.fa-pull-left, .fal.fa-pull-left, .fab.fa-pull-left { - margin-right: .3em; } + margin-right: .3em; +} .fa.fa-pull-right, .fas.fa-pull-right, .far.fa-pull-right, .fal.fa-pull-right, .fab.fa-pull-right { - margin-left: .3em; } + margin-left: .3em; +} .fa-spin { -webkit-animation: fa-spin 2s infinite linear; - animation: fa-spin 2s infinite linear; } + animation: fa-spin 2s infinite linear; +} .fa-pulse { -webkit-animation: fa-spin 1s infinite steps(8); - animation: fa-spin 1s infinite steps(8); } + animation: fa-spin 1s infinite steps(8); +} @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); - transform: rotate(0deg); } + transform: rotate(0deg); + } 100% { -webkit-transform: rotate(360deg); - transform: rotate(360deg); } } + transform: rotate(360deg); + } +} @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); - transform: rotate(0deg); } + transform: rotate(0deg); + } 100% { -webkit-transform: rotate(360deg); - transform: rotate(360deg); } } + transform: rotate(360deg); + } +} .fa-rotate-90 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; -webkit-transform: rotate(90deg); - transform: rotate(90deg); } + transform: rotate(90deg); +} .fa-rotate-180 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; -webkit-transform: rotate(180deg); - transform: rotate(180deg); } + transform: rotate(180deg); +} .fa-rotate-270 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; -webkit-transform: rotate(270deg); - transform: rotate(270deg); } + transform: rotate(270deg); +} .fa-flip-horizontal { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; -webkit-transform: scale(-1, 1); - transform: scale(-1, 1); } + transform: scale(-1, 1); +} .fa-flip-vertical { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; -webkit-transform: scale(1, -1); - transform: scale(1, -1); } + transform: scale(1, -1); +} -.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { +.fa-flip-both, +.fa-flip-horizontal.fa-flip-vertical { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; -webkit-transform: scale(-1, -1); - transform: scale(-1, -1); } + transform: scale(-1, -1); +} :root .fa-rotate-90, :root .fa-rotate-180, @@ -161,7 +201,8 @@ :root .fa-flip-vertical, :root .fa-flip-both { -webkit-filter: none; - filter: none; } + filter: none; +} .fa-stack { display: inline-block; @@ -169,4180 +210,5867 @@ line-height: 2em; position: relative; vertical-align: middle; - width: 2.5em; } + width: 2.5em; +} .fa-stack-1x, .fa-stack-2x { left: 0; position: absolute; text-align: center; - width: 100%; } + width: 100%; +} .fa-stack-1x { - line-height: inherit; } + line-height: inherit; +} .fa-stack-2x { - font-size: 2em; } + font-size: 2em; +} .fa-inverse { - color: #fff; } + color: #fff; +} /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ + .fa-500px:before { - content: "\f26e"; } + content: "\f26e"; +} .fa-accessible-icon:before { - content: "\f368"; } + content: "\f368"; +} .fa-accusoft:before { - content: "\f369"; } + content: "\f369"; +} .fa-acquisitions-incorporated:before { - content: "\f6af"; } + content: "\f6af"; +} .fa-ad:before { - content: "\f641"; } + content: "\f641"; +} .fa-address-book:before { - content: "\f2b9"; } + content: "\f2b9"; +} .fa-address-card:before { - content: "\f2bb"; } + content: "\f2bb"; +} .fa-adjust:before { - content: "\f042"; } + content: "\f042"; +} .fa-adn:before { - content: "\f170"; } - -.fa-adobe:before { - content: "\f778"; } + content: "\f170"; +} .fa-adversal:before { - content: "\f36a"; } + content: "\f36a"; +} .fa-affiliatetheme:before { - content: "\f36b"; } + content: "\f36b"; +} .fa-air-freshener:before { - content: "\f5d0"; } + content: "\f5d0"; +} .fa-airbnb:before { - content: "\f834"; } + content: "\f834"; +} .fa-algolia:before { - content: "\f36c"; } + content: "\f36c"; +} .fa-align-center:before { - content: "\f037"; } + content: "\f037"; +} .fa-align-justify:before { - content: "\f039"; } + content: "\f039"; +} .fa-align-left:before { - content: "\f036"; } + content: "\f036"; +} .fa-align-right:before { - content: "\f038"; } + content: "\f038"; +} .fa-alipay:before { - content: "\f642"; } + content: "\f642"; +} .fa-allergies:before { - content: "\f461"; } + content: "\f461"; +} .fa-amazon:before { - content: "\f270"; } + content: "\f270"; +} .fa-amazon-pay:before { - content: "\f42c"; } + content: "\f42c"; +} .fa-ambulance:before { - content: "\f0f9"; } + content: "\f0f9"; +} .fa-american-sign-language-interpreting:before { - content: "\f2a3"; } + content: "\f2a3"; +} .fa-amilia:before { - content: "\f36d"; } + content: "\f36d"; +} .fa-anchor:before { - content: "\f13d"; } + content: "\f13d"; +} .fa-android:before { - content: "\f17b"; } + content: "\f17b"; +} .fa-angellist:before { - content: "\f209"; } + content: "\f209"; +} .fa-angle-double-down:before { - content: "\f103"; } + content: "\f103"; +} .fa-angle-double-left:before { - content: "\f100"; } + content: "\f100"; +} .fa-angle-double-right:before { - content: "\f101"; } + content: "\f101"; +} .fa-angle-double-up:before { - content: "\f102"; } + content: "\f102"; +} .fa-angle-down:before { - content: "\f107"; } + content: "\f107"; +} .fa-angle-left:before { - content: "\f104"; } + content: "\f104"; +} .fa-angle-right:before { - content: "\f105"; } + content: "\f105"; +} .fa-angle-up:before { - content: "\f106"; } + content: "\f106"; +} .fa-angry:before { - content: "\f556"; } + content: "\f556"; +} .fa-angrycreative:before { - content: "\f36e"; } + content: "\f36e"; +} .fa-angular:before { - content: "\f420"; } + content: "\f420"; +} .fa-ankh:before { - content: "\f644"; } + content: "\f644"; +} .fa-app-store:before { - content: "\f36f"; } + content: "\f36f"; +} .fa-app-store-ios:before { - content: "\f370"; } + content: "\f370"; +} .fa-apper:before { - content: "\f371"; } + content: "\f371"; +} .fa-apple:before { - content: "\f179"; } + content: "\f179"; +} .fa-apple-alt:before { - content: "\f5d1"; } + content: "\f5d1"; +} .fa-apple-pay:before { - content: "\f415"; } + content: "\f415"; +} .fa-archive:before { - content: "\f187"; } + content: "\f187"; +} .fa-archway:before { - content: "\f557"; } + content: "\f557"; +} .fa-arrow-alt-circle-down:before { - content: "\f358"; } + content: "\f358"; +} .fa-arrow-alt-circle-left:before { - content: "\f359"; } + content: "\f359"; +} .fa-arrow-alt-circle-right:before { - content: "\f35a"; } + content: "\f35a"; +} .fa-arrow-alt-circle-up:before { - content: "\f35b"; } + content: "\f35b"; +} .fa-arrow-circle-down:before { - content: "\f0ab"; } + content: "\f0ab"; +} .fa-arrow-circle-left:before { - content: "\f0a8"; } + content: "\f0a8"; +} .fa-arrow-circle-right:before { - content: "\f0a9"; } + content: "\f0a9"; +} .fa-arrow-circle-up:before { - content: "\f0aa"; } + content: "\f0aa"; +} .fa-arrow-down:before { - content: "\f063"; } + content: "\f063"; +} .fa-arrow-left:before { - content: "\f060"; } + content: "\f060"; +} .fa-arrow-right:before { - content: "\f061"; } + content: "\f061"; +} .fa-arrow-up:before { - content: "\f062"; } + content: "\f062"; +} .fa-arrows-alt:before { - content: "\f0b2"; } + content: "\f0b2"; +} .fa-arrows-alt-h:before { - content: "\f337"; } + content: "\f337"; +} .fa-arrows-alt-v:before { - content: "\f338"; } + content: "\f338"; +} .fa-artstation:before { - content: "\f77a"; } + content: "\f77a"; +} .fa-assistive-listening-systems:before { - content: "\f2a2"; } + content: "\f2a2"; +} .fa-asterisk:before { - content: "\f069"; } + content: "\f069"; +} .fa-asymmetrik:before { - content: "\f372"; } + content: "\f372"; +} .fa-at:before { - content: "\f1fa"; } + content: "\f1fa"; +} .fa-atlas:before { - content: "\f558"; } + content: "\f558"; +} .fa-atlassian:before { - content: "\f77b"; } + content: "\f77b"; +} .fa-atom:before { - content: "\f5d2"; } + content: "\f5d2"; +} .fa-audible:before { - content: "\f373"; } + content: "\f373"; +} .fa-audio-description:before { - content: "\f29e"; } + content: "\f29e"; +} .fa-autoprefixer:before { - content: "\f41c"; } + content: "\f41c"; +} .fa-avianex:before { - content: "\f374"; } + content: "\f374"; +} .fa-aviato:before { - content: "\f421"; } + content: "\f421"; +} .fa-award:before { - content: "\f559"; } + content: "\f559"; +} .fa-aws:before { - content: "\f375"; } + content: "\f375"; +} .fa-baby:before { - content: "\f77c"; } + content: "\f77c"; +} .fa-baby-carriage:before { - content: "\f77d"; } + content: "\f77d"; +} .fa-backspace:before { - content: "\f55a"; } + content: "\f55a"; +} .fa-backward:before { - content: "\f04a"; } + content: "\f04a"; +} .fa-bacon:before { - content: "\f7e5"; } + content: "\f7e5"; +} + +.fa-bacteria:before { + content: "\e059"; +} + +.fa-bacterium:before { + content: "\e05a"; +} + +.fa-bahai:before { + content: "\f666"; +} .fa-balance-scale:before { - content: "\f24e"; } + content: "\f24e"; +} .fa-balance-scale-left:before { - content: "\f515"; } + content: "\f515"; +} .fa-balance-scale-right:before { - content: "\f516"; } + content: "\f516"; +} .fa-ban:before { - content: "\f05e"; } + content: "\f05e"; +} .fa-band-aid:before { - content: "\f462"; } + content: "\f462"; +} .fa-bandcamp:before { - content: "\f2d5"; } + content: "\f2d5"; +} .fa-barcode:before { - content: "\f02a"; } + content: "\f02a"; +} .fa-bars:before { - content: "\f0c9"; } + content: "\f0c9"; +} .fa-baseball-ball:before { - content: "\f433"; } + content: "\f433"; +} .fa-basketball-ball:before { - content: "\f434"; } + content: "\f434"; +} .fa-bath:before { - content: "\f2cd"; } + content: "\f2cd"; +} .fa-battery-empty:before { - content: "\f244"; } + content: "\f244"; +} .fa-battery-full:before { - content: "\f240"; } + content: "\f240"; +} .fa-battery-half:before { - content: "\f242"; } + content: "\f242"; +} .fa-battery-quarter:before { - content: "\f243"; } + content: "\f243"; +} .fa-battery-three-quarters:before { - content: "\f241"; } + content: "\f241"; +} .fa-battle-net:before { - content: "\f835"; } + content: "\f835"; +} .fa-bed:before { - content: "\f236"; } + content: "\f236"; +} .fa-beer:before { - content: "\f0fc"; } + content: "\f0fc"; +} .fa-behance:before { - content: "\f1b4"; } + content: "\f1b4"; +} .fa-behance-square:before { - content: "\f1b5"; } + content: "\f1b5"; +} .fa-bell:before { - content: "\f0f3"; } + content: "\f0f3"; +} .fa-bell-slash:before { - content: "\f1f6"; } + content: "\f1f6"; +} .fa-bezier-curve:before { - content: "\f55b"; } + content: "\f55b"; +} .fa-bible:before { - content: "\f647"; } + content: "\f647"; +} .fa-bicycle:before { - content: "\f206"; } + content: "\f206"; +} .fa-biking:before { - content: "\f84a"; } + content: "\f84a"; +} .fa-bimobject:before { - content: "\f378"; } + content: "\f378"; +} .fa-binoculars:before { - content: "\f1e5"; } + content: "\f1e5"; +} .fa-biohazard:before { - content: "\f780"; } + content: "\f780"; +} .fa-birthday-cake:before { - content: "\f1fd"; } + content: "\f1fd"; +} .fa-bitbucket:before { - content: "\f171"; } + content: "\f171"; +} .fa-bitcoin:before { - content: "\f379"; } + content: "\f379"; +} .fa-bity:before { - content: "\f37a"; } + content: "\f37a"; +} .fa-black-tie:before { - content: "\f27e"; } + content: "\f27e"; +} .fa-blackberry:before { - content: "\f37b"; } + content: "\f37b"; +} .fa-blender:before { - content: "\f517"; } + content: "\f517"; +} .fa-blender-phone:before { - content: "\f6b6"; } + content: "\f6b6"; +} .fa-blind:before { - content: "\f29d"; } + content: "\f29d"; +} .fa-blog:before { - content: "\f781"; } + content: "\f781"; +} .fa-blogger:before { - content: "\f37c"; } + content: "\f37c"; +} .fa-blogger-b:before { - content: "\f37d"; } + content: "\f37d"; +} .fa-bluetooth:before { - content: "\f293"; } + content: "\f293"; +} .fa-bluetooth-b:before { - content: "\f294"; } + content: "\f294"; +} .fa-bold:before { - content: "\f032"; } + content: "\f032"; +} .fa-bolt:before { - content: "\f0e7"; } + content: "\f0e7"; +} .fa-bomb:before { - content: "\f1e2"; } + content: "\f1e2"; +} .fa-bone:before { - content: "\f5d7"; } + content: "\f5d7"; +} .fa-bong:before { - content: "\f55c"; } + content: "\f55c"; +} .fa-book:before { - content: "\f02d"; } + content: "\f02d"; +} .fa-book-dead:before { - content: "\f6b7"; } + content: "\f6b7"; +} .fa-book-medical:before { - content: "\f7e6"; } + content: "\f7e6"; +} .fa-book-open:before { - content: "\f518"; } + content: "\f518"; +} .fa-book-reader:before { - content: "\f5da"; } + content: "\f5da"; +} .fa-bookmark:before { - content: "\f02e"; } + content: "\f02e"; +} .fa-bootstrap:before { - content: "\f836"; } + content: "\f836"; +} .fa-border-all:before { - content: "\f84c"; } + content: "\f84c"; +} .fa-border-none:before { - content: "\f850"; } + content: "\f850"; +} .fa-border-style:before { - content: "\f853"; } + content: "\f853"; +} .fa-bowling-ball:before { - content: "\f436"; } + content: "\f436"; +} .fa-box:before { - content: "\f466"; } + content: "\f466"; +} .fa-box-open:before { - content: "\f49e"; } + content: "\f49e"; +} + +.fa-box-tissue:before { + content: "\e05b"; +} .fa-boxes:before { - content: "\f468"; } + content: "\f468"; +} .fa-braille:before { - content: "\f2a1"; } + content: "\f2a1"; +} .fa-brain:before { - content: "\f5dc"; } + content: "\f5dc"; +} .fa-bread-slice:before { - content: "\f7ec"; } + content: "\f7ec"; +} .fa-briefcase:before { - content: "\f0b1"; } + content: "\f0b1"; +} .fa-briefcase-medical:before { - content: "\f469"; } + content: "\f469"; +} .fa-broadcast-tower:before { - content: "\f519"; } + content: "\f519"; +} .fa-broom:before { - content: "\f51a"; } + content: "\f51a"; +} .fa-brush:before { - content: "\f55d"; } + content: "\f55d"; +} .fa-btc:before { - content: "\f15a"; } + content: "\f15a"; +} .fa-buffer:before { - content: "\f837"; } + content: "\f837"; +} .fa-bug:before { - content: "\f188"; } + content: "\f188"; +} .fa-building:before { - content: "\f1ad"; } + content: "\f1ad"; +} .fa-bullhorn:before { - content: "\f0a1"; } + content: "\f0a1"; +} .fa-bullseye:before { - content: "\f140"; } + content: "\f140"; +} .fa-burn:before { - content: "\f46a"; } + content: "\f46a"; +} .fa-buromobelexperte:before { - content: "\f37f"; } + content: "\f37f"; +} .fa-bus:before { - content: "\f207"; } + content: "\f207"; +} .fa-bus-alt:before { - content: "\f55e"; } + content: "\f55e"; +} .fa-business-time:before { - content: "\f64a"; } + content: "\f64a"; +} + +.fa-buy-n-large:before { + content: "\f8a6"; +} .fa-buysellads:before { - content: "\f20d"; } + content: "\f20d"; +} .fa-calculator:before { - content: "\f1ec"; } + content: "\f1ec"; +} .fa-calendar:before { - content: "\f133"; } + content: "\f133"; +} .fa-calendar-alt:before { - content: "\f073"; } + content: "\f073"; +} .fa-calendar-check:before { - content: "\f274"; } + content: "\f274"; +} .fa-calendar-day:before { - content: "\f783"; } + content: "\f783"; +} .fa-calendar-minus:before { - content: "\f272"; } + content: "\f272"; +} .fa-calendar-plus:before { - content: "\f271"; } + content: "\f271"; +} .fa-calendar-times:before { - content: "\f273"; } + content: "\f273"; +} .fa-calendar-week:before { - content: "\f784"; } + content: "\f784"; +} .fa-camera:before { - content: "\f030"; } + content: "\f030"; +} .fa-camera-retro:before { - content: "\f083"; } + content: "\f083"; +} .fa-campground:before { - content: "\f6bb"; } + content: "\f6bb"; +} .fa-canadian-maple-leaf:before { - content: "\f785"; } + content: "\f785"; +} .fa-candy-cane:before { - content: "\f786"; } + content: "\f786"; +} .fa-cannabis:before { - content: "\f55f"; } + content: "\f55f"; +} .fa-capsules:before { - content: "\f46b"; } + content: "\f46b"; +} .fa-car:before { - content: "\f1b9"; } + content: "\f1b9"; +} .fa-car-alt:before { - content: "\f5de"; } + content: "\f5de"; +} .fa-car-battery:before { - content: "\f5df"; } + content: "\f5df"; +} .fa-car-crash:before { - content: "\f5e1"; } + content: "\f5e1"; +} .fa-car-side:before { - content: "\f5e4"; } + content: "\f5e4"; +} + +.fa-caravan:before { + content: "\f8ff"; +} .fa-caret-down:before { - content: "\f0d7"; } + content: "\f0d7"; +} .fa-caret-left:before { - content: "\f0d9"; } + content: "\f0d9"; +} .fa-caret-right:before { - content: "\f0da"; } + content: "\f0da"; +} .fa-caret-square-down:before { - content: "\f150"; } + content: "\f150"; +} .fa-caret-square-left:before { - content: "\f191"; } + content: "\f191"; +} .fa-caret-square-right:before { - content: "\f152"; } + content: "\f152"; +} .fa-caret-square-up:before { - content: "\f151"; } + content: "\f151"; +} .fa-caret-up:before { - content: "\f0d8"; } + content: "\f0d8"; +} .fa-carrot:before { - content: "\f787"; } + content: "\f787"; +} .fa-cart-arrow-down:before { - content: "\f218"; } + content: "\f218"; +} .fa-cart-plus:before { - content: "\f217"; } + content: "\f217"; +} .fa-cash-register:before { - content: "\f788"; } + content: "\f788"; +} .fa-cat:before { - content: "\f6be"; } + content: "\f6be"; +} .fa-cc-amazon-pay:before { - content: "\f42d"; } + content: "\f42d"; +} .fa-cc-amex:before { - content: "\f1f3"; } + content: "\f1f3"; +} .fa-cc-apple-pay:before { - content: "\f416"; } + content: "\f416"; +} .fa-cc-diners-club:before { - content: "\f24c"; } + content: "\f24c"; +} .fa-cc-discover:before { - content: "\f1f2"; } + content: "\f1f2"; +} .fa-cc-jcb:before { - content: "\f24b"; } + content: "\f24b"; +} .fa-cc-mastercard:before { - content: "\f1f1"; } + content: "\f1f1"; +} .fa-cc-paypal:before { - content: "\f1f4"; } + content: "\f1f4"; +} .fa-cc-stripe:before { - content: "\f1f5"; } + content: "\f1f5"; +} .fa-cc-visa:before { - content: "\f1f0"; } + content: "\f1f0"; +} .fa-centercode:before { - content: "\f380"; } + content: "\f380"; +} .fa-centos:before { - content: "\f789"; } + content: "\f789"; +} .fa-certificate:before { - content: "\f0a3"; } + content: "\f0a3"; +} .fa-chair:before { - content: "\f6c0"; } + content: "\f6c0"; +} .fa-chalkboard:before { - content: "\f51b"; } + content: "\f51b"; +} .fa-chalkboard-teacher:before { - content: "\f51c"; } + content: "\f51c"; +} .fa-charging-station:before { - content: "\f5e7"; } + content: "\f5e7"; +} .fa-chart-area:before { - content: "\f1fe"; } + content: "\f1fe"; +} .fa-chart-bar:before { - content: "\f080"; } + content: "\f080"; +} .fa-chart-line:before { - content: "\f201"; } + content: "\f201"; +} .fa-chart-pie:before { - content: "\f200"; } + content: "\f200"; +} .fa-check:before { - content: "\f00c"; } + content: "\f00c"; +} .fa-check-circle:before { - content: "\f058"; } + content: "\f058"; +} .fa-check-double:before { - content: "\f560"; } + content: "\f560"; +} .fa-check-square:before { - content: "\f14a"; } + content: "\f14a"; +} .fa-cheese:before { - content: "\f7ef"; } + content: "\f7ef"; +} .fa-chess:before { - content: "\f439"; } + content: "\f439"; +} .fa-chess-bishop:before { - content: "\f43a"; } + content: "\f43a"; +} .fa-chess-board:before { - content: "\f43c"; } + content: "\f43c"; +} .fa-chess-king:before { - content: "\f43f"; } + content: "\f43f"; +} .fa-chess-knight:before { - content: "\f441"; } + content: "\f441"; +} .fa-chess-pawn:before { - content: "\f443"; } + content: "\f443"; +} .fa-chess-queen:before { - content: "\f445"; } + content: "\f445"; +} .fa-chess-rook:before { - content: "\f447"; } + content: "\f447"; +} .fa-chevron-circle-down:before { - content: "\f13a"; } + content: "\f13a"; +} .fa-chevron-circle-left:before { - content: "\f137"; } + content: "\f137"; +} .fa-chevron-circle-right:before { - content: "\f138"; } + content: "\f138"; +} .fa-chevron-circle-up:before { - content: "\f139"; } + content: "\f139"; +} .fa-chevron-down:before { - content: "\f078"; } + content: "\f078"; +} .fa-chevron-left:before { - content: "\f053"; } + content: "\f053"; +} .fa-chevron-right:before { - content: "\f054"; } + content: "\f054"; +} .fa-chevron-up:before { - content: "\f077"; } + content: "\f077"; +} .fa-child:before { - content: "\f1ae"; } + content: "\f1ae"; +} .fa-chrome:before { - content: "\f268"; } + content: "\f268"; +} .fa-chromecast:before { - content: "\f838"; } + content: "\f838"; +} .fa-church:before { - content: "\f51d"; } + content: "\f51d"; +} .fa-circle:before { - content: "\f111"; } + content: "\f111"; +} .fa-circle-notch:before { - content: "\f1ce"; } + content: "\f1ce"; +} .fa-city:before { - content: "\f64f"; } + content: "\f64f"; +} .fa-clinic-medical:before { - content: "\f7f2"; } + content: "\f7f2"; +} .fa-clipboard:before { - content: "\f328"; } + content: "\f328"; +} .fa-clipboard-check:before { - content: "\f46c"; } + content: "\f46c"; +} .fa-clipboard-list:before { - content: "\f46d"; } + content: "\f46d"; +} .fa-clock:before { - content: "\f017"; } + content: "\f017"; +} .fa-clone:before { - content: "\f24d"; } + content: "\f24d"; +} .fa-closed-captioning:before { - content: "\f20a"; } + content: "\f20a"; +} .fa-cloud:before { - content: "\f0c2"; } + content: "\f0c2"; +} .fa-cloud-download-alt:before { - content: "\f381"; } + content: "\f381"; +} .fa-cloud-meatball:before { - content: "\f73b"; } + content: "\f73b"; +} .fa-cloud-moon:before { - content: "\f6c3"; } + content: "\f6c3"; +} .fa-cloud-moon-rain:before { - content: "\f73c"; } + content: "\f73c"; +} .fa-cloud-rain:before { - content: "\f73d"; } + content: "\f73d"; +} .fa-cloud-showers-heavy:before { - content: "\f740"; } + content: "\f740"; +} .fa-cloud-sun:before { - content: "\f6c4"; } + content: "\f6c4"; +} .fa-cloud-sun-rain:before { - content: "\f743"; } + content: "\f743"; +} .fa-cloud-upload-alt:before { - content: "\f382"; } + content: "\f382"; +} + +.fa-cloudflare:before { + content: "\e07d"; +} .fa-cloudscale:before { - content: "\f383"; } + content: "\f383"; +} .fa-cloudsmith:before { - content: "\f384"; } + content: "\f384"; +} .fa-cloudversify:before { - content: "\f385"; } + content: "\f385"; +} .fa-cocktail:before { - content: "\f561"; } + content: "\f561"; +} .fa-code:before { - content: "\f121"; } + content: "\f121"; +} .fa-code-branch:before { - content: "\f126"; } + content: "\f126"; +} .fa-codepen:before { - content: "\f1cb"; } + content: "\f1cb"; +} .fa-codiepie:before { - content: "\f284"; } + content: "\f284"; +} .fa-coffee:before { - content: "\f0f4"; } + content: "\f0f4"; +} .fa-cog:before { - content: "\f013"; } + content: "\f013"; +} .fa-cogs:before { - content: "\f085"; } + content: "\f085"; +} .fa-coins:before { - content: "\f51e"; } + content: "\f51e"; +} .fa-columns:before { - content: "\f0db"; } + content: "\f0db"; +} .fa-comment:before { - content: "\f075"; } + content: "\f075"; +} .fa-comment-alt:before { - content: "\f27a"; } + content: "\f27a"; +} .fa-comment-dollar:before { - content: "\f651"; } + content: "\f651"; +} .fa-comment-dots:before { - content: "\f4ad"; } + content: "\f4ad"; +} .fa-comment-medical:before { - content: "\f7f5"; } + content: "\f7f5"; +} .fa-comment-slash:before { - content: "\f4b3"; } + content: "\f4b3"; +} .fa-comments:before { - content: "\f086"; } + content: "\f086"; +} .fa-comments-dollar:before { - content: "\f653"; } + content: "\f653"; +} .fa-compact-disc:before { - content: "\f51f"; } + content: "\f51f"; +} .fa-compass:before { - content: "\f14e"; } + content: "\f14e"; +} .fa-compress:before { - content: "\f066"; } + content: "\f066"; +} + +.fa-compress-alt:before { + content: "\f422"; +} .fa-compress-arrows-alt:before { - content: "\f78c"; } + content: "\f78c"; +} .fa-concierge-bell:before { - content: "\f562"; } + content: "\f562"; +} .fa-confluence:before { - content: "\f78d"; } + content: "\f78d"; +} .fa-connectdevelop:before { - content: "\f20e"; } + content: "\f20e"; +} .fa-contao:before { - content: "\f26d"; } + content: "\f26d"; +} .fa-cookie:before { - content: "\f563"; } + content: "\f563"; +} .fa-cookie-bite:before { - content: "\f564"; } + content: "\f564"; +} .fa-copy:before { - content: "\f0c5"; } + content: "\f0c5"; +} .fa-copyright:before { - content: "\f1f9"; } + content: "\f1f9"; +} .fa-cotton-bureau:before { - content: "\f89e"; } + content: "\f89e"; +} .fa-couch:before { - content: "\f4b8"; } + content: "\f4b8"; +} .fa-cpanel:before { - content: "\f388"; } + content: "\f388"; +} .fa-creative-commons:before { - content: "\f25e"; } + content: "\f25e"; +} .fa-creative-commons-by:before { - content: "\f4e7"; } + content: "\f4e7"; +} .fa-creative-commons-nc:before { - content: "\f4e8"; } + content: "\f4e8"; +} .fa-creative-commons-nc-eu:before { - content: "\f4e9"; } + content: "\f4e9"; +} .fa-creative-commons-nc-jp:before { - content: "\f4ea"; } + content: "\f4ea"; +} .fa-creative-commons-nd:before { - content: "\f4eb"; } + content: "\f4eb"; +} .fa-creative-commons-pd:before { - content: "\f4ec"; } + content: "\f4ec"; +} .fa-creative-commons-pd-alt:before { - content: "\f4ed"; } + content: "\f4ed"; +} .fa-creative-commons-remix:before { - content: "\f4ee"; } + content: "\f4ee"; +} .fa-creative-commons-sa:before { - content: "\f4ef"; } + content: "\f4ef"; +} .fa-creative-commons-sampling:before { - content: "\f4f0"; } + content: "\f4f0"; +} .fa-creative-commons-sampling-plus:before { - content: "\f4f1"; } + content: "\f4f1"; +} .fa-creative-commons-share:before { - content: "\f4f2"; } + content: "\f4f2"; +} .fa-creative-commons-zero:before { - content: "\f4f3"; } + content: "\f4f3"; +} .fa-credit-card:before { - content: "\f09d"; } + content: "\f09d"; +} .fa-critical-role:before { - content: "\f6c9"; } + content: "\f6c9"; +} .fa-crop:before { - content: "\f125"; } + content: "\f125"; +} .fa-crop-alt:before { - content: "\f565"; } + content: "\f565"; +} .fa-cross:before { - content: "\f654"; } + content: "\f654"; +} .fa-crosshairs:before { - content: "\f05b"; } + content: "\f05b"; +} .fa-crow:before { - content: "\f520"; } + content: "\f520"; +} .fa-crown:before { - content: "\f521"; } + content: "\f521"; +} .fa-crutch:before { - content: "\f7f7"; } + content: "\f7f7"; +} .fa-css3:before { - content: "\f13c"; } + content: "\f13c"; +} .fa-css3-alt:before { - content: "\f38b"; } + content: "\f38b"; +} .fa-cube:before { - content: "\f1b2"; } + content: "\f1b2"; +} .fa-cubes:before { - content: "\f1b3"; } + content: "\f1b3"; +} .fa-cut:before { - content: "\f0c4"; } + content: "\f0c4"; +} .fa-cuttlefish:before { - content: "\f38c"; } + content: "\f38c"; +} .fa-d-and-d:before { - content: "\f38d"; } + content: "\f38d"; +} .fa-d-and-d-beyond:before { - content: "\f6ca"; } + content: "\f6ca"; +} + +.fa-dailymotion:before { + content: "\e052"; +} .fa-dashcube:before { - content: "\f210"; } + content: "\f210"; +} .fa-database:before { - content: "\f1c0"; } + content: "\f1c0"; +} .fa-deaf:before { - content: "\f2a4"; } + content: "\f2a4"; +} + +.fa-deezer:before { + content: "\e077"; +} .fa-delicious:before { - content: "\f1a5"; } + content: "\f1a5"; +} .fa-democrat:before { - content: "\f747"; } + content: "\f747"; +} .fa-deploydog:before { - content: "\f38e"; } + content: "\f38e"; +} .fa-deskpro:before { - content: "\f38f"; } + content: "\f38f"; +} .fa-desktop:before { - content: "\f108"; } + content: "\f108"; +} .fa-dev:before { - content: "\f6cc"; } + content: "\f6cc"; +} .fa-deviantart:before { - content: "\f1bd"; } + content: "\f1bd"; +} .fa-dharmachakra:before { - content: "\f655"; } + content: "\f655"; +} .fa-dhl:before { - content: "\f790"; } + content: "\f790"; +} .fa-diagnoses:before { - content: "\f470"; } + content: "\f470"; +} .fa-diaspora:before { - content: "\f791"; } + content: "\f791"; +} .fa-dice:before { - content: "\f522"; } + content: "\f522"; +} .fa-dice-d20:before { - content: "\f6cf"; } + content: "\f6cf"; +} .fa-dice-d6:before { - content: "\f6d1"; } + content: "\f6d1"; +} .fa-dice-five:before { - content: "\f523"; } + content: "\f523"; +} .fa-dice-four:before { - content: "\f524"; } + content: "\f524"; +} .fa-dice-one:before { - content: "\f525"; } + content: "\f525"; +} .fa-dice-six:before { - content: "\f526"; } + content: "\f526"; +} .fa-dice-three:before { - content: "\f527"; } + content: "\f527"; +} .fa-dice-two:before { - content: "\f528"; } + content: "\f528"; +} .fa-digg:before { - content: "\f1a6"; } + content: "\f1a6"; +} .fa-digital-ocean:before { - content: "\f391"; } + content: "\f391"; +} .fa-digital-tachograph:before { - content: "\f566"; } + content: "\f566"; +} .fa-directions:before { - content: "\f5eb"; } + content: "\f5eb"; +} .fa-discord:before { - content: "\f392"; } + content: "\f392"; +} .fa-discourse:before { - content: "\f393"; } + content: "\f393"; +} + +.fa-disease:before { + content: "\f7fa"; +} .fa-divide:before { - content: "\f529"; } + content: "\f529"; +} .fa-dizzy:before { - content: "\f567"; } + content: "\f567"; +} .fa-dna:before { - content: "\f471"; } + content: "\f471"; +} .fa-dochub:before { - content: "\f394"; } + content: "\f394"; +} .fa-docker:before { - content: "\f395"; } + content: "\f395"; +} .fa-dog:before { - content: "\f6d3"; } + content: "\f6d3"; +} .fa-dollar-sign:before { - content: "\f155"; } + content: "\f155"; +} .fa-dolly:before { - content: "\f472"; } + content: "\f472"; +} .fa-dolly-flatbed:before { - content: "\f474"; } + content: "\f474"; +} .fa-donate:before { - content: "\f4b9"; } + content: "\f4b9"; +} .fa-door-closed:before { - content: "\f52a"; } + content: "\f52a"; +} .fa-door-open:before { - content: "\f52b"; } + content: "\f52b"; +} .fa-dot-circle:before { - content: "\f192"; } + content: "\f192"; +} .fa-dove:before { - content: "\f4ba"; } + content: "\f4ba"; +} .fa-download:before { - content: "\f019"; } + content: "\f019"; +} .fa-draft2digital:before { - content: "\f396"; } + content: "\f396"; +} .fa-drafting-compass:before { - content: "\f568"; } + content: "\f568"; +} .fa-dragon:before { - content: "\f6d5"; } + content: "\f6d5"; +} .fa-draw-polygon:before { - content: "\f5ee"; } + content: "\f5ee"; +} .fa-dribbble:before { - content: "\f17d"; } + content: "\f17d"; +} .fa-dribbble-square:before { - content: "\f397"; } + content: "\f397"; +} .fa-dropbox:before { - content: "\f16b"; } + content: "\f16b"; +} .fa-drum:before { - content: "\f569"; } + content: "\f569"; +} .fa-drum-steelpan:before { - content: "\f56a"; } + content: "\f56a"; +} .fa-drumstick-bite:before { - content: "\f6d7"; } + content: "\f6d7"; +} .fa-drupal:before { - content: "\f1a9"; } + content: "\f1a9"; +} .fa-dumbbell:before { - content: "\f44b"; } + content: "\f44b"; +} .fa-dumpster:before { - content: "\f793"; } + content: "\f793"; +} .fa-dumpster-fire:before { - content: "\f794"; } + content: "\f794"; +} .fa-dungeon:before { - content: "\f6d9"; } + content: "\f6d9"; +} .fa-dyalog:before { - content: "\f399"; } + content: "\f399"; +} .fa-earlybirds:before { - content: "\f39a"; } + content: "\f39a"; +} .fa-ebay:before { - content: "\f4f4"; } + content: "\f4f4"; +} .fa-edge:before { - content: "\f282"; } + content: "\f282"; +} + +.fa-edge-legacy:before { + content: "\e078"; +} .fa-edit:before { - content: "\f044"; } + content: "\f044"; +} .fa-egg:before { - content: "\f7fb"; } + content: "\f7fb"; +} .fa-eject:before { - content: "\f052"; } + content: "\f052"; +} .fa-elementor:before { - content: "\f430"; } + content: "\f430"; +} .fa-ellipsis-h:before { - content: "\f141"; } + content: "\f141"; +} .fa-ellipsis-v:before { - content: "\f142"; } + content: "\f142"; +} .fa-ello:before { - content: "\f5f1"; } + content: "\f5f1"; +} .fa-ember:before { - content: "\f423"; } + content: "\f423"; +} .fa-empire:before { - content: "\f1d1"; } + content: "\f1d1"; +} .fa-envelope:before { - content: "\f0e0"; } + content: "\f0e0"; +} .fa-envelope-open:before { - content: "\f2b6"; } + content: "\f2b6"; +} .fa-envelope-open-text:before { - content: "\f658"; } + content: "\f658"; +} .fa-envelope-square:before { - content: "\f199"; } + content: "\f199"; +} .fa-envira:before { - content: "\f299"; } + content: "\f299"; +} .fa-equals:before { - content: "\f52c"; } + content: "\f52c"; +} .fa-eraser:before { - content: "\f12d"; } + content: "\f12d"; +} .fa-erlang:before { - content: "\f39d"; } + content: "\f39d"; +} .fa-ethereum:before { - content: "\f42e"; } + content: "\f42e"; +} .fa-ethernet:before { - content: "\f796"; } + content: "\f796"; +} .fa-etsy:before { - content: "\f2d7"; } + content: "\f2d7"; +} .fa-euro-sign:before { - content: "\f153"; } + content: "\f153"; +} .fa-evernote:before { - content: "\f839"; } + content: "\f839"; +} .fa-exchange-alt:before { - content: "\f362"; } + content: "\f362"; +} .fa-exclamation:before { - content: "\f12a"; } + content: "\f12a"; +} .fa-exclamation-circle:before { - content: "\f06a"; } + content: "\f06a"; +} .fa-exclamation-triangle:before { - content: "\f071"; } + content: "\f071"; +} .fa-expand:before { - content: "\f065"; } + content: "\f065"; +} + +.fa-expand-alt:before { + content: "\f424"; +} .fa-expand-arrows-alt:before { - content: "\f31e"; } + content: "\f31e"; +} .fa-expeditedssl:before { - content: "\f23e"; } + content: "\f23e"; +} .fa-external-link-alt:before { - content: "\f35d"; } + content: "\f35d"; +} .fa-external-link-square-alt:before { - content: "\f360"; } + content: "\f360"; +} .fa-eye:before { - content: "\f06e"; } + content: "\f06e"; +} .fa-eye-dropper:before { - content: "\f1fb"; } + content: "\f1fb"; +} .fa-eye-slash:before { - content: "\f070"; } + content: "\f070"; +} .fa-facebook:before { - content: "\f09a"; } + content: "\f09a"; +} .fa-facebook-f:before { - content: "\f39e"; } + content: "\f39e"; +} .fa-facebook-messenger:before { - content: "\f39f"; } + content: "\f39f"; +} .fa-facebook-square:before { - content: "\f082"; } + content: "\f082"; +} .fa-fan:before { - content: "\f863"; } + content: "\f863"; +} .fa-fantasy-flight-games:before { - content: "\f6dc"; } + content: "\f6dc"; +} .fa-fast-backward:before { - content: "\f049"; } + content: "\f049"; +} .fa-fast-forward:before { - content: "\f050"; } + content: "\f050"; +} + +.fa-faucet:before { + content: "\e005"; +} .fa-fax:before { - content: "\f1ac"; } + content: "\f1ac"; +} .fa-feather:before { - content: "\f52d"; } + content: "\f52d"; +} .fa-feather-alt:before { - content: "\f56b"; } + content: "\f56b"; +} .fa-fedex:before { - content: "\f797"; } + content: "\f797"; +} .fa-fedora:before { - content: "\f798"; } + content: "\f798"; +} .fa-female:before { - content: "\f182"; } + content: "\f182"; +} .fa-fighter-jet:before { - content: "\f0fb"; } + content: "\f0fb"; +} .fa-figma:before { - content: "\f799"; } + content: "\f799"; +} .fa-file:before { - content: "\f15b"; } + content: "\f15b"; +} .fa-file-alt:before { - content: "\f15c"; } + content: "\f15c"; +} .fa-file-archive:before { - content: "\f1c6"; } + content: "\f1c6"; +} .fa-file-audio:before { - content: "\f1c7"; } + content: "\f1c7"; +} .fa-file-code:before { - content: "\f1c9"; } + content: "\f1c9"; +} .fa-file-contract:before { - content: "\f56c"; } + content: "\f56c"; +} .fa-file-csv:before { - content: "\f6dd"; } + content: "\f6dd"; +} .fa-file-download:before { - content: "\f56d"; } + content: "\f56d"; +} .fa-file-excel:before { - content: "\f1c3"; } + content: "\f1c3"; +} .fa-file-export:before { - content: "\f56e"; } + content: "\f56e"; +} .fa-file-image:before { - content: "\f1c5"; } + content: "\f1c5"; +} .fa-file-import:before { - content: "\f56f"; } + content: "\f56f"; +} .fa-file-invoice:before { - content: "\f570"; } + content: "\f570"; +} .fa-file-invoice-dollar:before { - content: "\f571"; } + content: "\f571"; +} .fa-file-medical:before { - content: "\f477"; } + content: "\f477"; +} .fa-file-medical-alt:before { - content: "\f478"; } + content: "\f478"; +} .fa-file-pdf:before { - content: "\f1c1"; } + content: "\f1c1"; +} .fa-file-powerpoint:before { - content: "\f1c4"; } + content: "\f1c4"; +} .fa-file-prescription:before { - content: "\f572"; } + content: "\f572"; +} .fa-file-signature:before { - content: "\f573"; } + content: "\f573"; +} .fa-file-upload:before { - content: "\f574"; } + content: "\f574"; +} .fa-file-video:before { - content: "\f1c8"; } + content: "\f1c8"; +} .fa-file-word:before { - content: "\f1c2"; } + content: "\f1c2"; +} .fa-fill:before { - content: "\f575"; } + content: "\f575"; +} .fa-fill-drip:before { - content: "\f576"; } + content: "\f576"; +} .fa-film:before { - content: "\f008"; } + content: "\f008"; +} .fa-filter:before { - content: "\f0b0"; } + content: "\f0b0"; +} .fa-fingerprint:before { - content: "\f577"; } + content: "\f577"; +} .fa-fire:before { - content: "\f06d"; } + content: "\f06d"; +} .fa-fire-alt:before { - content: "\f7e4"; } + content: "\f7e4"; +} .fa-fire-extinguisher:before { - content: "\f134"; } + content: "\f134"; +} .fa-firefox:before { - content: "\f269"; } + content: "\f269"; +} + +.fa-firefox-browser:before { + content: "\e007"; +} .fa-first-aid:before { - content: "\f479"; } + content: "\f479"; +} .fa-first-order:before { - content: "\f2b0"; } + content: "\f2b0"; +} .fa-first-order-alt:before { - content: "\f50a"; } + content: "\f50a"; +} .fa-firstdraft:before { - content: "\f3a1"; } + content: "\f3a1"; +} .fa-fish:before { - content: "\f578"; } + content: "\f578"; +} .fa-fist-raised:before { - content: "\f6de"; } + content: "\f6de"; +} .fa-flag:before { - content: "\f024"; } + content: "\f024"; +} .fa-flag-checkered:before { - content: "\f11e"; } + content: "\f11e"; +} .fa-flag-usa:before { - content: "\f74d"; } + content: "\f74d"; +} .fa-flask:before { - content: "\f0c3"; } + content: "\f0c3"; +} .fa-flickr:before { - content: "\f16e"; } + content: "\f16e"; +} .fa-flipboard:before { - content: "\f44d"; } + content: "\f44d"; +} .fa-flushed:before { - content: "\f579"; } + content: "\f579"; +} .fa-fly:before { - content: "\f417"; } + content: "\f417"; +} .fa-folder:before { - content: "\f07b"; } + content: "\f07b"; +} .fa-folder-minus:before { - content: "\f65d"; } + content: "\f65d"; +} .fa-folder-open:before { - content: "\f07c"; } + content: "\f07c"; +} .fa-folder-plus:before { - content: "\f65e"; } + content: "\f65e"; +} .fa-font:before { - content: "\f031"; } + content: "\f031"; +} .fa-font-awesome:before { - content: "\f2b4"; } + content: "\f2b4"; +} .fa-font-awesome-alt:before { - content: "\f35c"; } + content: "\f35c"; +} .fa-font-awesome-flag:before { - content: "\f425"; } + content: "\f425"; +} .fa-font-awesome-logo-full:before { - content: "\f4e6"; } + content: "\f4e6"; +} .fa-fonticons:before { - content: "\f280"; } + content: "\f280"; +} .fa-fonticons-fi:before { - content: "\f3a2"; } + content: "\f3a2"; +} .fa-football-ball:before { - content: "\f44e"; } + content: "\f44e"; +} .fa-fort-awesome:before { - content: "\f286"; } + content: "\f286"; +} .fa-fort-awesome-alt:before { - content: "\f3a3"; } + content: "\f3a3"; +} .fa-forumbee:before { - content: "\f211"; } + content: "\f211"; +} .fa-forward:before { - content: "\f04e"; } + content: "\f04e"; +} .fa-foursquare:before { - content: "\f180"; } + content: "\f180"; +} .fa-free-code-camp:before { - content: "\f2c5"; } + content: "\f2c5"; +} .fa-freebsd:before { - content: "\f3a4"; } + content: "\f3a4"; +} .fa-frog:before { - content: "\f52e"; } + content: "\f52e"; +} .fa-frown:before { - content: "\f119"; } + content: "\f119"; +} .fa-frown-open:before { - content: "\f57a"; } + content: "\f57a"; +} .fa-fulcrum:before { - content: "\f50b"; } + content: "\f50b"; +} .fa-funnel-dollar:before { - content: "\f662"; } + content: "\f662"; +} .fa-futbol:before { - content: "\f1e3"; } + content: "\f1e3"; +} .fa-galactic-republic:before { - content: "\f50c"; } + content: "\f50c"; +} .fa-galactic-senate:before { - content: "\f50d"; } + content: "\f50d"; +} .fa-gamepad:before { - content: "\f11b"; } + content: "\f11b"; +} .fa-gas-pump:before { - content: "\f52f"; } + content: "\f52f"; +} .fa-gavel:before { - content: "\f0e3"; } + content: "\f0e3"; +} .fa-gem:before { - content: "\f3a5"; } + content: "\f3a5"; +} .fa-genderless:before { - content: "\f22d"; } + content: "\f22d"; +} .fa-get-pocket:before { - content: "\f265"; } + content: "\f265"; +} .fa-gg:before { - content: "\f260"; } + content: "\f260"; +} .fa-gg-circle:before { - content: "\f261"; } + content: "\f261"; +} .fa-ghost:before { - content: "\f6e2"; } + content: "\f6e2"; +} .fa-gift:before { - content: "\f06b"; } + content: "\f06b"; +} .fa-gifts:before { - content: "\f79c"; } + content: "\f79c"; +} .fa-git:before { - content: "\f1d3"; } + content: "\f1d3"; +} .fa-git-alt:before { - content: "\f841"; } + content: "\f841"; +} .fa-git-square:before { - content: "\f1d2"; } + content: "\f1d2"; +} .fa-github:before { - content: "\f09b"; } + content: "\f09b"; +} .fa-github-alt:before { - content: "\f113"; } + content: "\f113"; +} .fa-github-square:before { - content: "\f092"; } + content: "\f092"; +} .fa-gitkraken:before { - content: "\f3a6"; } + content: "\f3a6"; +} .fa-gitlab:before { - content: "\f296"; } + content: "\f296"; +} .fa-gitter:before { - content: "\f426"; } + content: "\f426"; +} .fa-glass-cheers:before { - content: "\f79f"; } + content: "\f79f"; +} .fa-glass-martini:before { - content: "\f000"; } + content: "\f000"; +} .fa-glass-martini-alt:before { - content: "\f57b"; } + content: "\f57b"; +} .fa-glass-whiskey:before { - content: "\f7a0"; } + content: "\f7a0"; +} .fa-glasses:before { - content: "\f530"; } + content: "\f530"; +} .fa-glide:before { - content: "\f2a5"; } + content: "\f2a5"; +} .fa-glide-g:before { - content: "\f2a6"; } + content: "\f2a6"; +} .fa-globe:before { - content: "\f0ac"; } + content: "\f0ac"; +} .fa-globe-africa:before { - content: "\f57c"; } + content: "\f57c"; +} .fa-globe-americas:before { - content: "\f57d"; } + content: "\f57d"; +} .fa-globe-asia:before { - content: "\f57e"; } + content: "\f57e"; +} .fa-globe-europe:before { - content: "\f7a2"; } + content: "\f7a2"; +} .fa-gofore:before { - content: "\f3a7"; } + content: "\f3a7"; +} .fa-golf-ball:before { - content: "\f450"; } + content: "\f450"; +} .fa-goodreads:before { - content: "\f3a8"; } + content: "\f3a8"; +} .fa-goodreads-g:before { - content: "\f3a9"; } + content: "\f3a9"; +} .fa-google:before { - content: "\f1a0"; } + content: "\f1a0"; +} .fa-google-drive:before { - content: "\f3aa"; } + content: "\f3aa"; +} + +.fa-google-pay:before { + content: "\e079"; +} .fa-google-play:before { - content: "\f3ab"; } + content: "\f3ab"; +} .fa-google-plus:before { - content: "\f2b3"; } + content: "\f2b3"; +} .fa-google-plus-g:before { - content: "\f0d5"; } + content: "\f0d5"; +} .fa-google-plus-square:before { - content: "\f0d4"; } + content: "\f0d4"; +} .fa-google-wallet:before { - content: "\f1ee"; } + content: "\f1ee"; +} .fa-gopuram:before { - content: "\f664"; } + content: "\f664"; +} .fa-graduation-cap:before { - content: "\f19d"; } + content: "\f19d"; +} .fa-gratipay:before { - content: "\f184"; } + content: "\f184"; +} .fa-grav:before { - content: "\f2d6"; } + content: "\f2d6"; +} .fa-greater-than:before { - content: "\f531"; } + content: "\f531"; +} .fa-greater-than-equal:before { - content: "\f532"; } + content: "\f532"; +} .fa-grimace:before { - content: "\f57f"; } + content: "\f57f"; +} .fa-grin:before { - content: "\f580"; } + content: "\f580"; +} .fa-grin-alt:before { - content: "\f581"; } + content: "\f581"; +} .fa-grin-beam:before { - content: "\f582"; } + content: "\f582"; +} .fa-grin-beam-sweat:before { - content: "\f583"; } + content: "\f583"; +} .fa-grin-hearts:before { - content: "\f584"; } + content: "\f584"; +} .fa-grin-squint:before { - content: "\f585"; } + content: "\f585"; +} .fa-grin-squint-tears:before { - content: "\f586"; } + content: "\f586"; +} .fa-grin-stars:before { - content: "\f587"; } + content: "\f587"; +} .fa-grin-tears:before { - content: "\f588"; } + content: "\f588"; +} .fa-grin-tongue:before { - content: "\f589"; } + content: "\f589"; +} .fa-grin-tongue-squint:before { - content: "\f58a"; } + content: "\f58a"; +} .fa-grin-tongue-wink:before { - content: "\f58b"; } + content: "\f58b"; +} .fa-grin-wink:before { - content: "\f58c"; } + content: "\f58c"; +} .fa-grip-horizontal:before { - content: "\f58d"; } + content: "\f58d"; +} .fa-grip-lines:before { - content: "\f7a4"; } + content: "\f7a4"; +} .fa-grip-lines-vertical:before { - content: "\f7a5"; } + content: "\f7a5"; +} .fa-grip-vertical:before { - content: "\f58e"; } + content: "\f58e"; +} .fa-gripfire:before { - content: "\f3ac"; } + content: "\f3ac"; +} .fa-grunt:before { - content: "\f3ad"; } + content: "\f3ad"; +} + +.fa-guilded:before { + content: "\e07e"; +} .fa-guitar:before { - content: "\f7a6"; } + content: "\f7a6"; +} .fa-gulp:before { - content: "\f3ae"; } + content: "\f3ae"; +} .fa-h-square:before { - content: "\f0fd"; } + content: "\f0fd"; +} .fa-hacker-news:before { - content: "\f1d4"; } + content: "\f1d4"; +} .fa-hacker-news-square:before { - content: "\f3af"; } + content: "\f3af"; +} .fa-hackerrank:before { - content: "\f5f7"; } + content: "\f5f7"; +} .fa-hamburger:before { - content: "\f805"; } + content: "\f805"; +} .fa-hammer:before { - content: "\f6e3"; } + content: "\f6e3"; +} .fa-hamsa:before { - content: "\f665"; } + content: "\f665"; +} .fa-hand-holding:before { - content: "\f4bd"; } + content: "\f4bd"; +} .fa-hand-holding-heart:before { - content: "\f4be"; } + content: "\f4be"; +} + +.fa-hand-holding-medical:before { + content: "\e05c"; +} .fa-hand-holding-usd:before { - content: "\f4c0"; } + content: "\f4c0"; +} + +.fa-hand-holding-water:before { + content: "\f4c1"; +} .fa-hand-lizard:before { - content: "\f258"; } + content: "\f258"; +} .fa-hand-middle-finger:before { - content: "\f806"; } + content: "\f806"; +} .fa-hand-paper:before { - content: "\f256"; } + content: "\f256"; +} .fa-hand-peace:before { - content: "\f25b"; } + content: "\f25b"; +} .fa-hand-point-down:before { - content: "\f0a7"; } + content: "\f0a7"; +} .fa-hand-point-left:before { - content: "\f0a5"; } + content: "\f0a5"; +} .fa-hand-point-right:before { - content: "\f0a4"; } + content: "\f0a4"; +} .fa-hand-point-up:before { - content: "\f0a6"; } + content: "\f0a6"; +} .fa-hand-pointer:before { - content: "\f25a"; } + content: "\f25a"; +} .fa-hand-rock:before { - content: "\f255"; } + content: "\f255"; +} .fa-hand-scissors:before { - content: "\f257"; } + content: "\f257"; +} + +.fa-hand-sparkles:before { + content: "\e05d"; +} .fa-hand-spock:before { - content: "\f259"; } + content: "\f259"; +} .fa-hands:before { - content: "\f4c2"; } + content: "\f4c2"; +} .fa-hands-helping:before { - content: "\f4c4"; } + content: "\f4c4"; +} + +.fa-hands-wash:before { + content: "\e05e"; +} .fa-handshake:before { - content: "\f2b5"; } + content: "\f2b5"; +} + +.fa-handshake-alt-slash:before { + content: "\e05f"; +} + +.fa-handshake-slash:before { + content: "\e060"; +} .fa-hanukiah:before { - content: "\f6e6"; } + content: "\f6e6"; +} .fa-hard-hat:before { - content: "\f807"; } + content: "\f807"; +} .fa-hashtag:before { - content: "\f292"; } + content: "\f292"; +} -.fa-hat-wizard:before { - content: "\f6e8"; } +.fa-hat-cowboy:before { + content: "\f8c0"; +} -.fa-haykal:before { - content: "\f666"; } +.fa-hat-cowboy-side:before { + content: "\f8c1"; +} + +.fa-hat-wizard:before { + content: "\f6e8"; +} .fa-hdd:before { - content: "\f0a0"; } + content: "\f0a0"; +} + +.fa-head-side-cough:before { + content: "\e061"; +} + +.fa-head-side-cough-slash:before { + content: "\e062"; +} + +.fa-head-side-mask:before { + content: "\e063"; +} + +.fa-head-side-virus:before { + content: "\e064"; +} .fa-heading:before { - content: "\f1dc"; } + content: "\f1dc"; +} .fa-headphones:before { - content: "\f025"; } + content: "\f025"; +} .fa-headphones-alt:before { - content: "\f58f"; } + content: "\f58f"; +} .fa-headset:before { - content: "\f590"; } + content: "\f590"; +} .fa-heart:before { - content: "\f004"; } + content: "\f004"; +} .fa-heart-broken:before { - content: "\f7a9"; } + content: "\f7a9"; +} .fa-heartbeat:before { - content: "\f21e"; } + content: "\f21e"; +} .fa-helicopter:before { - content: "\f533"; } + content: "\f533"; +} .fa-highlighter:before { - content: "\f591"; } + content: "\f591"; +} .fa-hiking:before { - content: "\f6ec"; } + content: "\f6ec"; +} .fa-hippo:before { - content: "\f6ed"; } + content: "\f6ed"; +} .fa-hips:before { - content: "\f452"; } + content: "\f452"; +} .fa-hire-a-helper:before { - content: "\f3b0"; } + content: "\f3b0"; +} .fa-history:before { - content: "\f1da"; } + content: "\f1da"; +} + +.fa-hive:before { + content: "\e07f"; +} .fa-hockey-puck:before { - content: "\f453"; } + content: "\f453"; +} .fa-holly-berry:before { - content: "\f7aa"; } + content: "\f7aa"; +} .fa-home:before { - content: "\f015"; } + content: "\f015"; +} .fa-hooli:before { - content: "\f427"; } + content: "\f427"; +} .fa-hornbill:before { - content: "\f592"; } + content: "\f592"; +} .fa-horse:before { - content: "\f6f0"; } + content: "\f6f0"; +} .fa-horse-head:before { - content: "\f7ab"; } + content: "\f7ab"; +} .fa-hospital:before { - content: "\f0f8"; } + content: "\f0f8"; +} .fa-hospital-alt:before { - content: "\f47d"; } + content: "\f47d"; +} .fa-hospital-symbol:before { - content: "\f47e"; } + content: "\f47e"; +} + +.fa-hospital-user:before { + content: "\f80d"; +} .fa-hot-tub:before { - content: "\f593"; } + content: "\f593"; +} .fa-hotdog:before { - content: "\f80f"; } + content: "\f80f"; +} .fa-hotel:before { - content: "\f594"; } + content: "\f594"; +} .fa-hotjar:before { - content: "\f3b1"; } + content: "\f3b1"; +} .fa-hourglass:before { - content: "\f254"; } + content: "\f254"; +} .fa-hourglass-end:before { - content: "\f253"; } + content: "\f253"; +} .fa-hourglass-half:before { - content: "\f252"; } + content: "\f252"; +} .fa-hourglass-start:before { - content: "\f251"; } + content: "\f251"; +} .fa-house-damage:before { - content: "\f6f1"; } + content: "\f6f1"; +} + +.fa-house-user:before { + content: "\e065"; +} .fa-houzz:before { - content: "\f27c"; } + content: "\f27c"; +} .fa-hryvnia:before { - content: "\f6f2"; } + content: "\f6f2"; +} .fa-html5:before { - content: "\f13b"; } + content: "\f13b"; +} .fa-hubspot:before { - content: "\f3b2"; } + content: "\f3b2"; +} .fa-i-cursor:before { - content: "\f246"; } + content: "\f246"; +} .fa-ice-cream:before { - content: "\f810"; } + content: "\f810"; +} .fa-icicles:before { - content: "\f7ad"; } + content: "\f7ad"; +} .fa-icons:before { - content: "\f86d"; } + content: "\f86d"; +} .fa-id-badge:before { - content: "\f2c1"; } + content: "\f2c1"; +} .fa-id-card:before { - content: "\f2c2"; } + content: "\f2c2"; +} .fa-id-card-alt:before { - content: "\f47f"; } + content: "\f47f"; +} + +.fa-ideal:before { + content: "\e013"; +} .fa-igloo:before { - content: "\f7ae"; } + content: "\f7ae"; +} .fa-image:before { - content: "\f03e"; } + content: "\f03e"; +} .fa-images:before { - content: "\f302"; } + content: "\f302"; +} .fa-imdb:before { - content: "\f2d8"; } + content: "\f2d8"; +} .fa-inbox:before { - content: "\f01c"; } + content: "\f01c"; +} .fa-indent:before { - content: "\f03c"; } + content: "\f03c"; +} .fa-industry:before { - content: "\f275"; } + content: "\f275"; +} .fa-infinity:before { - content: "\f534"; } + content: "\f534"; +} .fa-info:before { - content: "\f129"; } + content: "\f129"; +} .fa-info-circle:before { - content: "\f05a"; } + content: "\f05a"; +} + +.fa-innosoft:before { + content: "\e080"; +} .fa-instagram:before { - content: "\f16d"; } + content: "\f16d"; +} + +.fa-instagram-square:before { + content: "\e055"; +} + +.fa-instalod:before { + content: "\e081"; +} .fa-intercom:before { - content: "\f7af"; } + content: "\f7af"; +} .fa-internet-explorer:before { - content: "\f26b"; } + content: "\f26b"; +} .fa-invision:before { - content: "\f7b0"; } + content: "\f7b0"; +} .fa-ioxhost:before { - content: "\f208"; } + content: "\f208"; +} .fa-italic:before { - content: "\f033"; } + content: "\f033"; +} .fa-itch-io:before { - content: "\f83a"; } + content: "\f83a"; +} .fa-itunes:before { - content: "\f3b4"; } + content: "\f3b4"; +} .fa-itunes-note:before { - content: "\f3b5"; } + content: "\f3b5"; +} .fa-java:before { - content: "\f4e4"; } + content: "\f4e4"; +} .fa-jedi:before { - content: "\f669"; } + content: "\f669"; +} .fa-jedi-order:before { - content: "\f50e"; } + content: "\f50e"; +} .fa-jenkins:before { - content: "\f3b6"; } + content: "\f3b6"; +} .fa-jira:before { - content: "\f7b1"; } + content: "\f7b1"; +} .fa-joget:before { - content: "\f3b7"; } + content: "\f3b7"; +} .fa-joint:before { - content: "\f595"; } + content: "\f595"; +} .fa-joomla:before { - content: "\f1aa"; } + content: "\f1aa"; +} .fa-journal-whills:before { - content: "\f66a"; } + content: "\f66a"; +} .fa-js:before { - content: "\f3b8"; } + content: "\f3b8"; +} .fa-js-square:before { - content: "\f3b9"; } + content: "\f3b9"; +} .fa-jsfiddle:before { - content: "\f1cc"; } + content: "\f1cc"; +} .fa-kaaba:before { - content: "\f66b"; } + content: "\f66b"; +} .fa-kaggle:before { - content: "\f5fa"; } + content: "\f5fa"; +} .fa-key:before { - content: "\f084"; } + content: "\f084"; +} .fa-keybase:before { - content: "\f4f5"; } + content: "\f4f5"; +} .fa-keyboard:before { - content: "\f11c"; } + content: "\f11c"; +} .fa-keycdn:before { - content: "\f3ba"; } + content: "\f3ba"; +} .fa-khanda:before { - content: "\f66d"; } + content: "\f66d"; +} .fa-kickstarter:before { - content: "\f3bb"; } + content: "\f3bb"; +} .fa-kickstarter-k:before { - content: "\f3bc"; } + content: "\f3bc"; +} .fa-kiss:before { - content: "\f596"; } + content: "\f596"; +} .fa-kiss-beam:before { - content: "\f597"; } + content: "\f597"; +} .fa-kiss-wink-heart:before { - content: "\f598"; } + content: "\f598"; +} .fa-kiwi-bird:before { - content: "\f535"; } + content: "\f535"; +} .fa-korvue:before { - content: "\f42f"; } + content: "\f42f"; +} .fa-landmark:before { - content: "\f66f"; } + content: "\f66f"; +} .fa-language:before { - content: "\f1ab"; } + content: "\f1ab"; +} .fa-laptop:before { - content: "\f109"; } + content: "\f109"; +} .fa-laptop-code:before { - content: "\f5fc"; } + content: "\f5fc"; +} + +.fa-laptop-house:before { + content: "\e066"; +} .fa-laptop-medical:before { - content: "\f812"; } + content: "\f812"; +} .fa-laravel:before { - content: "\f3bd"; } + content: "\f3bd"; +} .fa-lastfm:before { - content: "\f202"; } + content: "\f202"; +} .fa-lastfm-square:before { - content: "\f203"; } + content: "\f203"; +} .fa-laugh:before { - content: "\f599"; } + content: "\f599"; +} .fa-laugh-beam:before { - content: "\f59a"; } + content: "\f59a"; +} .fa-laugh-squint:before { - content: "\f59b"; } + content: "\f59b"; +} .fa-laugh-wink:before { - content: "\f59c"; } + content: "\f59c"; +} .fa-layer-group:before { - content: "\f5fd"; } + content: "\f5fd"; +} .fa-leaf:before { - content: "\f06c"; } + content: "\f06c"; +} .fa-leanpub:before { - content: "\f212"; } + content: "\f212"; +} .fa-lemon:before { - content: "\f094"; } + content: "\f094"; +} .fa-less:before { - content: "\f41d"; } + content: "\f41d"; +} .fa-less-than:before { - content: "\f536"; } + content: "\f536"; +} .fa-less-than-equal:before { - content: "\f537"; } + content: "\f537"; +} .fa-level-down-alt:before { - content: "\f3be"; } + content: "\f3be"; +} .fa-level-up-alt:before { - content: "\f3bf"; } + content: "\f3bf"; +} .fa-life-ring:before { - content: "\f1cd"; } + content: "\f1cd"; +} .fa-lightbulb:before { - content: "\f0eb"; } + content: "\f0eb"; +} .fa-line:before { - content: "\f3c0"; } + content: "\f3c0"; +} .fa-link:before { - content: "\f0c1"; } + content: "\f0c1"; +} .fa-linkedin:before { - content: "\f08c"; } + content: "\f08c"; +} .fa-linkedin-in:before { - content: "\f0e1"; } + content: "\f0e1"; +} .fa-linode:before { - content: "\f2b8"; } + content: "\f2b8"; +} .fa-linux:before { - content: "\f17c"; } + content: "\f17c"; +} .fa-lira-sign:before { - content: "\f195"; } + content: "\f195"; +} .fa-list:before { - content: "\f03a"; } + content: "\f03a"; +} .fa-list-alt:before { - content: "\f022"; } + content: "\f022"; +} .fa-list-ol:before { - content: "\f0cb"; } + content: "\f0cb"; +} .fa-list-ul:before { - content: "\f0ca"; } + content: "\f0ca"; +} .fa-location-arrow:before { - content: "\f124"; } + content: "\f124"; +} .fa-lock:before { - content: "\f023"; } + content: "\f023"; +} .fa-lock-open:before { - content: "\f3c1"; } + content: "\f3c1"; +} .fa-long-arrow-alt-down:before { - content: "\f309"; } + content: "\f309"; +} .fa-long-arrow-alt-left:before { - content: "\f30a"; } + content: "\f30a"; +} .fa-long-arrow-alt-right:before { - content: "\f30b"; } + content: "\f30b"; +} .fa-long-arrow-alt-up:before { - content: "\f30c"; } + content: "\f30c"; +} .fa-low-vision:before { - content: "\f2a8"; } + content: "\f2a8"; +} .fa-luggage-cart:before { - content: "\f59d"; } + content: "\f59d"; +} + +.fa-lungs:before { + content: "\f604"; +} + +.fa-lungs-virus:before { + content: "\e067"; +} .fa-lyft:before { - content: "\f3c3"; } + content: "\f3c3"; +} .fa-magento:before { - content: "\f3c4"; } + content: "\f3c4"; +} .fa-magic:before { - content: "\f0d0"; } + content: "\f0d0"; +} .fa-magnet:before { - content: "\f076"; } + content: "\f076"; +} .fa-mail-bulk:before { - content: "\f674"; } + content: "\f674"; +} .fa-mailchimp:before { - content: "\f59e"; } + content: "\f59e"; +} .fa-male:before { - content: "\f183"; } + content: "\f183"; +} .fa-mandalorian:before { - content: "\f50f"; } + content: "\f50f"; +} .fa-map:before { - content: "\f279"; } + content: "\f279"; +} .fa-map-marked:before { - content: "\f59f"; } + content: "\f59f"; +} .fa-map-marked-alt:before { - content: "\f5a0"; } + content: "\f5a0"; +} .fa-map-marker:before { - content: "\f041"; } + content: "\f041"; +} .fa-map-marker-alt:before { - content: "\f3c5"; } + content: "\f3c5"; +} .fa-map-pin:before { - content: "\f276"; } + content: "\f276"; +} .fa-map-signs:before { - content: "\f277"; } + content: "\f277"; +} .fa-markdown:before { - content: "\f60f"; } + content: "\f60f"; +} .fa-marker:before { - content: "\f5a1"; } + content: "\f5a1"; +} .fa-mars:before { - content: "\f222"; } + content: "\f222"; +} .fa-mars-double:before { - content: "\f227"; } + content: "\f227"; +} .fa-mars-stroke:before { - content: "\f229"; } + content: "\f229"; +} .fa-mars-stroke-h:before { - content: "\f22b"; } + content: "\f22b"; +} .fa-mars-stroke-v:before { - content: "\f22a"; } + content: "\f22a"; +} .fa-mask:before { - content: "\f6fa"; } + content: "\f6fa"; +} .fa-mastodon:before { - content: "\f4f6"; } + content: "\f4f6"; +} .fa-maxcdn:before { - content: "\f136"; } + content: "\f136"; +} + +.fa-mdb:before { + content: "\f8ca"; +} .fa-medal:before { - content: "\f5a2"; } + content: "\f5a2"; +} .fa-medapps:before { - content: "\f3c6"; } + content: "\f3c6"; +} .fa-medium:before { - content: "\f23a"; } + content: "\f23a"; +} .fa-medium-m:before { - content: "\f3c7"; } + content: "\f3c7"; +} .fa-medkit:before { - content: "\f0fa"; } + content: "\f0fa"; +} .fa-medrt:before { - content: "\f3c8"; } + content: "\f3c8"; +} .fa-meetup:before { - content: "\f2e0"; } + content: "\f2e0"; +} .fa-megaport:before { - content: "\f5a3"; } + content: "\f5a3"; +} .fa-meh:before { - content: "\f11a"; } + content: "\f11a"; +} .fa-meh-blank:before { - content: "\f5a4"; } + content: "\f5a4"; +} .fa-meh-rolling-eyes:before { - content: "\f5a5"; } + content: "\f5a5"; +} .fa-memory:before { - content: "\f538"; } + content: "\f538"; +} .fa-mendeley:before { - content: "\f7b3"; } + content: "\f7b3"; +} .fa-menorah:before { - content: "\f676"; } + content: "\f676"; +} .fa-mercury:before { - content: "\f223"; } + content: "\f223"; +} .fa-meteor:before { - content: "\f753"; } + content: "\f753"; +} + +.fa-microblog:before { + content: "\e01a"; +} .fa-microchip:before { - content: "\f2db"; } + content: "\f2db"; +} .fa-microphone:before { - content: "\f130"; } + content: "\f130"; +} .fa-microphone-alt:before { - content: "\f3c9"; } + content: "\f3c9"; +} .fa-microphone-alt-slash:before { - content: "\f539"; } + content: "\f539"; +} .fa-microphone-slash:before { - content: "\f131"; } + content: "\f131"; +} .fa-microscope:before { - content: "\f610"; } + content: "\f610"; +} .fa-microsoft:before { - content: "\f3ca"; } + content: "\f3ca"; +} .fa-minus:before { - content: "\f068"; } + content: "\f068"; +} .fa-minus-circle:before { - content: "\f056"; } + content: "\f056"; +} .fa-minus-square:before { - content: "\f146"; } + content: "\f146"; +} .fa-mitten:before { - content: "\f7b5"; } + content: "\f7b5"; +} .fa-mix:before { - content: "\f3cb"; } + content: "\f3cb"; +} .fa-mixcloud:before { - content: "\f289"; } + content: "\f289"; +} + +.fa-mixer:before { + content: "\e056"; +} .fa-mizuni:before { - content: "\f3cc"; } + content: "\f3cc"; +} .fa-mobile:before { - content: "\f10b"; } + content: "\f10b"; +} .fa-mobile-alt:before { - content: "\f3cd"; } + content: "\f3cd"; +} .fa-modx:before { - content: "\f285"; } + content: "\f285"; +} .fa-monero:before { - content: "\f3d0"; } + content: "\f3d0"; +} .fa-money-bill:before { - content: "\f0d6"; } + content: "\f0d6"; +} .fa-money-bill-alt:before { - content: "\f3d1"; } + content: "\f3d1"; +} .fa-money-bill-wave:before { - content: "\f53a"; } + content: "\f53a"; +} .fa-money-bill-wave-alt:before { - content: "\f53b"; } + content: "\f53b"; +} .fa-money-check:before { - content: "\f53c"; } + content: "\f53c"; +} .fa-money-check-alt:before { - content: "\f53d"; } + content: "\f53d"; +} .fa-monument:before { - content: "\f5a6"; } + content: "\f5a6"; +} .fa-moon:before { - content: "\f186"; } + content: "\f186"; +} .fa-mortar-pestle:before { - content: "\f5a7"; } + content: "\f5a7"; +} .fa-mosque:before { - content: "\f678"; } + content: "\f678"; +} .fa-motorcycle:before { - content: "\f21c"; } + content: "\f21c"; +} .fa-mountain:before { - content: "\f6fc"; } + content: "\f6fc"; +} + +.fa-mouse:before { + content: "\f8cc"; +} .fa-mouse-pointer:before { - content: "\f245"; } + content: "\f245"; +} .fa-mug-hot:before { - content: "\f7b6"; } + content: "\f7b6"; +} .fa-music:before { - content: "\f001"; } + content: "\f001"; +} .fa-napster:before { - content: "\f3d2"; } + content: "\f3d2"; +} .fa-neos:before { - content: "\f612"; } + content: "\f612"; +} .fa-network-wired:before { - content: "\f6ff"; } + content: "\f6ff"; +} .fa-neuter:before { - content: "\f22c"; } + content: "\f22c"; +} .fa-newspaper:before { - content: "\f1ea"; } + content: "\f1ea"; +} .fa-nimblr:before { - content: "\f5a8"; } + content: "\f5a8"; +} .fa-node:before { - content: "\f419"; } + content: "\f419"; +} .fa-node-js:before { - content: "\f3d3"; } + content: "\f3d3"; +} .fa-not-equal:before { - content: "\f53e"; } + content: "\f53e"; +} .fa-notes-medical:before { - content: "\f481"; } + content: "\f481"; +} .fa-npm:before { - content: "\f3d4"; } + content: "\f3d4"; +} .fa-ns8:before { - content: "\f3d5"; } + content: "\f3d5"; +} .fa-nutritionix:before { - content: "\f3d6"; } + content: "\f3d6"; +} .fa-object-group:before { - content: "\f247"; } + content: "\f247"; +} .fa-object-ungroup:before { - content: "\f248"; } + content: "\f248"; +} + +.fa-octopus-deploy:before { + content: "\e082"; +} .fa-odnoklassniki:before { - content: "\f263"; } + content: "\f263"; +} .fa-odnoklassniki-square:before { - content: "\f264"; } + content: "\f264"; +} .fa-oil-can:before { - content: "\f613"; } + content: "\f613"; +} .fa-old-republic:before { - content: "\f510"; } + content: "\f510"; +} .fa-om:before { - content: "\f679"; } + content: "\f679"; +} .fa-opencart:before { - content: "\f23d"; } + content: "\f23d"; +} .fa-openid:before { - content: "\f19b"; } + content: "\f19b"; +} .fa-opera:before { - content: "\f26a"; } + content: "\f26a"; +} .fa-optin-monster:before { - content: "\f23c"; } + content: "\f23c"; +} + +.fa-orcid:before { + content: "\f8d2"; +} .fa-osi:before { - content: "\f41a"; } + content: "\f41a"; +} .fa-otter:before { - content: "\f700"; } + content: "\f700"; +} .fa-outdent:before { - content: "\f03b"; } + content: "\f03b"; +} .fa-page4:before { - content: "\f3d7"; } + content: "\f3d7"; +} .fa-pagelines:before { - content: "\f18c"; } + content: "\f18c"; +} .fa-pager:before { - content: "\f815"; } + content: "\f815"; +} .fa-paint-brush:before { - content: "\f1fc"; } + content: "\f1fc"; +} .fa-paint-roller:before { - content: "\f5aa"; } + content: "\f5aa"; +} .fa-palette:before { - content: "\f53f"; } + content: "\f53f"; +} .fa-palfed:before { - content: "\f3d8"; } + content: "\f3d8"; +} .fa-pallet:before { - content: "\f482"; } + content: "\f482"; +} .fa-paper-plane:before { - content: "\f1d8"; } + content: "\f1d8"; +} .fa-paperclip:before { - content: "\f0c6"; } + content: "\f0c6"; +} .fa-parachute-box:before { - content: "\f4cd"; } + content: "\f4cd"; +} .fa-paragraph:before { - content: "\f1dd"; } + content: "\f1dd"; +} .fa-parking:before { - content: "\f540"; } + content: "\f540"; +} .fa-passport:before { - content: "\f5ab"; } + content: "\f5ab"; +} .fa-pastafarianism:before { - content: "\f67b"; } + content: "\f67b"; +} .fa-paste:before { - content: "\f0ea"; } + content: "\f0ea"; +} .fa-patreon:before { - content: "\f3d9"; } + content: "\f3d9"; +} .fa-pause:before { - content: "\f04c"; } + content: "\f04c"; +} .fa-pause-circle:before { - content: "\f28b"; } + content: "\f28b"; +} .fa-paw:before { - content: "\f1b0"; } + content: "\f1b0"; +} .fa-paypal:before { - content: "\f1ed"; } + content: "\f1ed"; +} .fa-peace:before { - content: "\f67c"; } + content: "\f67c"; +} .fa-pen:before { - content: "\f304"; } + content: "\f304"; +} .fa-pen-alt:before { - content: "\f305"; } + content: "\f305"; +} .fa-pen-fancy:before { - content: "\f5ac"; } + content: "\f5ac"; +} .fa-pen-nib:before { - content: "\f5ad"; } + content: "\f5ad"; +} .fa-pen-square:before { - content: "\f14b"; } + content: "\f14b"; +} .fa-pencil-alt:before { - content: "\f303"; } + content: "\f303"; +} .fa-pencil-ruler:before { - content: "\f5ae"; } + content: "\f5ae"; +} .fa-penny-arcade:before { - content: "\f704"; } + content: "\f704"; +} + +.fa-people-arrows:before { + content: "\e068"; +} .fa-people-carry:before { - content: "\f4ce"; } + content: "\f4ce"; +} .fa-pepper-hot:before { - content: "\f816"; } + content: "\f816"; +} + +.fa-perbyte:before { + content: "\e083"; +} .fa-percent:before { - content: "\f295"; } + content: "\f295"; +} .fa-percentage:before { - content: "\f541"; } + content: "\f541"; +} .fa-periscope:before { - content: "\f3da"; } + content: "\f3da"; +} .fa-person-booth:before { - content: "\f756"; } + content: "\f756"; +} .fa-phabricator:before { - content: "\f3db"; } + content: "\f3db"; +} .fa-phoenix-framework:before { - content: "\f3dc"; } + content: "\f3dc"; +} .fa-phoenix-squadron:before { - content: "\f511"; } + content: "\f511"; +} .fa-phone:before { - content: "\f095"; } + content: "\f095"; +} .fa-phone-alt:before { - content: "\f879"; } + content: "\f879"; +} .fa-phone-slash:before { - content: "\f3dd"; } + content: "\f3dd"; +} .fa-phone-square:before { - content: "\f098"; } + content: "\f098"; +} .fa-phone-square-alt:before { - content: "\f87b"; } + content: "\f87b"; +} .fa-phone-volume:before { - content: "\f2a0"; } + content: "\f2a0"; +} .fa-photo-video:before { - content: "\f87c"; } + content: "\f87c"; +} .fa-php:before { - content: "\f457"; } + content: "\f457"; +} .fa-pied-piper:before { - content: "\f2ae"; } + content: "\f2ae"; +} .fa-pied-piper-alt:before { - content: "\f1a8"; } + content: "\f1a8"; +} .fa-pied-piper-hat:before { - content: "\f4e5"; } + content: "\f4e5"; +} .fa-pied-piper-pp:before { - content: "\f1a7"; } + content: "\f1a7"; +} + +.fa-pied-piper-square:before { + content: "\e01e"; +} .fa-piggy-bank:before { - content: "\f4d3"; } + content: "\f4d3"; +} .fa-pills:before { - content: "\f484"; } + content: "\f484"; +} .fa-pinterest:before { - content: "\f0d2"; } + content: "\f0d2"; +} .fa-pinterest-p:before { - content: "\f231"; } + content: "\f231"; +} .fa-pinterest-square:before { - content: "\f0d3"; } + content: "\f0d3"; +} .fa-pizza-slice:before { - content: "\f818"; } + content: "\f818"; +} .fa-place-of-worship:before { - content: "\f67f"; } + content: "\f67f"; +} .fa-plane:before { - content: "\f072"; } + content: "\f072"; +} .fa-plane-arrival:before { - content: "\f5af"; } + content: "\f5af"; +} .fa-plane-departure:before { - content: "\f5b0"; } + content: "\f5b0"; +} + +.fa-plane-slash:before { + content: "\e069"; +} .fa-play:before { - content: "\f04b"; } + content: "\f04b"; +} .fa-play-circle:before { - content: "\f144"; } + content: "\f144"; +} .fa-playstation:before { - content: "\f3df"; } + content: "\f3df"; +} .fa-plug:before { - content: "\f1e6"; } + content: "\f1e6"; +} .fa-plus:before { - content: "\f067"; } + content: "\f067"; +} .fa-plus-circle:before { - content: "\f055"; } + content: "\f055"; +} .fa-plus-square:before { - content: "\f0fe"; } + content: "\f0fe"; +} .fa-podcast:before { - content: "\f2ce"; } + content: "\f2ce"; +} .fa-poll:before { - content: "\f681"; } + content: "\f681"; +} .fa-poll-h:before { - content: "\f682"; } + content: "\f682"; +} .fa-poo:before { - content: "\f2fe"; } + content: "\f2fe"; +} .fa-poo-storm:before { - content: "\f75a"; } + content: "\f75a"; +} .fa-poop:before { - content: "\f619"; } + content: "\f619"; +} .fa-portrait:before { - content: "\f3e0"; } + content: "\f3e0"; +} .fa-pound-sign:before { - content: "\f154"; } + content: "\f154"; +} .fa-power-off:before { - content: "\f011"; } + content: "\f011"; +} .fa-pray:before { - content: "\f683"; } + content: "\f683"; +} .fa-praying-hands:before { - content: "\f684"; } + content: "\f684"; +} .fa-prescription:before { - content: "\f5b1"; } + content: "\f5b1"; +} .fa-prescription-bottle:before { - content: "\f485"; } + content: "\f485"; +} .fa-prescription-bottle-alt:before { - content: "\f486"; } + content: "\f486"; +} .fa-print:before { - content: "\f02f"; } + content: "\f02f"; +} .fa-procedures:before { - content: "\f487"; } + content: "\f487"; +} .fa-product-hunt:before { - content: "\f288"; } + content: "\f288"; +} .fa-project-diagram:before { - content: "\f542"; } + content: "\f542"; +} + +.fa-pump-medical:before { + content: "\e06a"; +} + +.fa-pump-soap:before { + content: "\e06b"; +} .fa-pushed:before { - content: "\f3e1"; } + content: "\f3e1"; +} .fa-puzzle-piece:before { - content: "\f12e"; } + content: "\f12e"; +} .fa-python:before { - content: "\f3e2"; } + content: "\f3e2"; +} .fa-qq:before { - content: "\f1d6"; } + content: "\f1d6"; +} .fa-qrcode:before { - content: "\f029"; } + content: "\f029"; +} .fa-question:before { - content: "\f128"; } + content: "\f128"; +} .fa-question-circle:before { - content: "\f059"; } + content: "\f059"; +} .fa-quidditch:before { - content: "\f458"; } + content: "\f458"; +} .fa-quinscape:before { - content: "\f459"; } + content: "\f459"; +} .fa-quora:before { - content: "\f2c4"; } + content: "\f2c4"; +} .fa-quote-left:before { - content: "\f10d"; } + content: "\f10d"; +} .fa-quote-right:before { - content: "\f10e"; } + content: "\f10e"; +} .fa-quran:before { - content: "\f687"; } + content: "\f687"; +} .fa-r-project:before { - content: "\f4f7"; } + content: "\f4f7"; +} .fa-radiation:before { - content: "\f7b9"; } + content: "\f7b9"; +} .fa-radiation-alt:before { - content: "\f7ba"; } + content: "\f7ba"; +} .fa-rainbow:before { - content: "\f75b"; } + content: "\f75b"; +} .fa-random:before { - content: "\f074"; } + content: "\f074"; +} .fa-raspberry-pi:before { - content: "\f7bb"; } + content: "\f7bb"; +} .fa-ravelry:before { - content: "\f2d9"; } + content: "\f2d9"; +} .fa-react:before { - content: "\f41b"; } + content: "\f41b"; +} .fa-reacteurope:before { - content: "\f75d"; } + content: "\f75d"; +} .fa-readme:before { - content: "\f4d5"; } + content: "\f4d5"; +} .fa-rebel:before { - content: "\f1d0"; } + content: "\f1d0"; +} .fa-receipt:before { - content: "\f543"; } + content: "\f543"; +} + +.fa-record-vinyl:before { + content: "\f8d9"; +} .fa-recycle:before { - content: "\f1b8"; } + content: "\f1b8"; +} .fa-red-river:before { - content: "\f3e3"; } + content: "\f3e3"; +} .fa-reddit:before { - content: "\f1a1"; } + content: "\f1a1"; +} .fa-reddit-alien:before { - content: "\f281"; } + content: "\f281"; +} .fa-reddit-square:before { - content: "\f1a2"; } + content: "\f1a2"; +} .fa-redhat:before { - content: "\f7bc"; } + content: "\f7bc"; +} .fa-redo:before { - content: "\f01e"; } + content: "\f01e"; +} .fa-redo-alt:before { - content: "\f2f9"; } + content: "\f2f9"; +} .fa-registered:before { - content: "\f25d"; } + content: "\f25d"; +} .fa-remove-format:before { - content: "\f87d"; } + content: "\f87d"; +} .fa-renren:before { - content: "\f18b"; } + content: "\f18b"; +} .fa-reply:before { - content: "\f3e5"; } + content: "\f3e5"; +} .fa-reply-all:before { - content: "\f122"; } + content: "\f122"; +} .fa-replyd:before { - content: "\f3e6"; } + content: "\f3e6"; +} .fa-republican:before { - content: "\f75e"; } + content: "\f75e"; +} .fa-researchgate:before { - content: "\f4f8"; } + content: "\f4f8"; +} .fa-resolving:before { - content: "\f3e7"; } + content: "\f3e7"; +} .fa-restroom:before { - content: "\f7bd"; } + content: "\f7bd"; +} .fa-retweet:before { - content: "\f079"; } + content: "\f079"; +} .fa-rev:before { - content: "\f5b2"; } + content: "\f5b2"; +} .fa-ribbon:before { - content: "\f4d6"; } + content: "\f4d6"; +} .fa-ring:before { - content: "\f70b"; } + content: "\f70b"; +} .fa-road:before { - content: "\f018"; } + content: "\f018"; +} .fa-robot:before { - content: "\f544"; } + content: "\f544"; +} .fa-rocket:before { - content: "\f135"; } + content: "\f135"; +} .fa-rocketchat:before { - content: "\f3e8"; } + content: "\f3e8"; +} .fa-rockrms:before { - content: "\f3e9"; } + content: "\f3e9"; +} .fa-route:before { - content: "\f4d7"; } + content: "\f4d7"; +} .fa-rss:before { - content: "\f09e"; } + content: "\f09e"; +} .fa-rss-square:before { - content: "\f143"; } + content: "\f143"; +} .fa-ruble-sign:before { - content: "\f158"; } + content: "\f158"; +} .fa-ruler:before { - content: "\f545"; } + content: "\f545"; +} .fa-ruler-combined:before { - content: "\f546"; } + content: "\f546"; +} .fa-ruler-horizontal:before { - content: "\f547"; } + content: "\f547"; +} .fa-ruler-vertical:before { - content: "\f548"; } + content: "\f548"; +} .fa-running:before { - content: "\f70c"; } + content: "\f70c"; +} .fa-rupee-sign:before { - content: "\f156"; } + content: "\f156"; +} + +.fa-rust:before { + content: "\e07a"; +} .fa-sad-cry:before { - content: "\f5b3"; } + content: "\f5b3"; +} .fa-sad-tear:before { - content: "\f5b4"; } + content: "\f5b4"; +} .fa-safari:before { - content: "\f267"; } + content: "\f267"; +} .fa-salesforce:before { - content: "\f83b"; } + content: "\f83b"; +} .fa-sass:before { - content: "\f41e"; } + content: "\f41e"; +} .fa-satellite:before { - content: "\f7bf"; } + content: "\f7bf"; +} .fa-satellite-dish:before { - content: "\f7c0"; } + content: "\f7c0"; +} .fa-save:before { - content: "\f0c7"; } + content: "\f0c7"; +} .fa-schlix:before { - content: "\f3ea"; } + content: "\f3ea"; +} .fa-school:before { - content: "\f549"; } + content: "\f549"; +} .fa-screwdriver:before { - content: "\f54a"; } + content: "\f54a"; +} .fa-scribd:before { - content: "\f28a"; } + content: "\f28a"; +} .fa-scroll:before { - content: "\f70e"; } + content: "\f70e"; +} .fa-sd-card:before { - content: "\f7c2"; } + content: "\f7c2"; +} .fa-search:before { - content: "\f002"; } + content: "\f002"; +} .fa-search-dollar:before { - content: "\f688"; } + content: "\f688"; +} .fa-search-location:before { - content: "\f689"; } + content: "\f689"; +} .fa-search-minus:before { - content: "\f010"; } + content: "\f010"; +} .fa-search-plus:before { - content: "\f00e"; } + content: "\f00e"; +} .fa-searchengin:before { - content: "\f3eb"; } + content: "\f3eb"; +} .fa-seedling:before { - content: "\f4d8"; } + content: "\f4d8"; +} .fa-sellcast:before { - content: "\f2da"; } + content: "\f2da"; +} .fa-sellsy:before { - content: "\f213"; } + content: "\f213"; +} .fa-server:before { - content: "\f233"; } + content: "\f233"; +} .fa-servicestack:before { - content: "\f3ec"; } + content: "\f3ec"; +} .fa-shapes:before { - content: "\f61f"; } + content: "\f61f"; +} .fa-share:before { - content: "\f064"; } + content: "\f064"; +} .fa-share-alt:before { - content: "\f1e0"; } + content: "\f1e0"; +} .fa-share-alt-square:before { - content: "\f1e1"; } + content: "\f1e1"; +} .fa-share-square:before { - content: "\f14d"; } + content: "\f14d"; +} .fa-shekel-sign:before { - content: "\f20b"; } + content: "\f20b"; +} .fa-shield-alt:before { - content: "\f3ed"; } + content: "\f3ed"; +} + +.fa-shield-virus:before { + content: "\e06c"; +} .fa-ship:before { - content: "\f21a"; } + content: "\f21a"; +} .fa-shipping-fast:before { - content: "\f48b"; } + content: "\f48b"; +} .fa-shirtsinbulk:before { - content: "\f214"; } + content: "\f214"; +} .fa-shoe-prints:before { - content: "\f54b"; } + content: "\f54b"; +} + +.fa-shopify:before { + content: "\e057"; +} .fa-shopping-bag:before { - content: "\f290"; } + content: "\f290"; +} .fa-shopping-basket:before { - content: "\f291"; } + content: "\f291"; +} .fa-shopping-cart:before { - content: "\f07a"; } + content: "\f07a"; +} .fa-shopware:before { - content: "\f5b5"; } + content: "\f5b5"; +} .fa-shower:before { - content: "\f2cc"; } + content: "\f2cc"; +} .fa-shuttle-van:before { - content: "\f5b6"; } + content: "\f5b6"; +} .fa-sign:before { - content: "\f4d9"; } + content: "\f4d9"; +} .fa-sign-in-alt:before { - content: "\f2f6"; } + content: "\f2f6"; +} .fa-sign-language:before { - content: "\f2a7"; } + content: "\f2a7"; +} .fa-sign-out-alt:before { - content: "\f2f5"; } + content: "\f2f5"; +} .fa-signal:before { - content: "\f012"; } + content: "\f012"; +} .fa-signature:before { - content: "\f5b7"; } + content: "\f5b7"; +} .fa-sim-card:before { - content: "\f7c4"; } + content: "\f7c4"; +} .fa-simplybuilt:before { - content: "\f215"; } + content: "\f215"; +} + +.fa-sink:before { + content: "\e06d"; +} .fa-sistrix:before { - content: "\f3ee"; } + content: "\f3ee"; +} .fa-sitemap:before { - content: "\f0e8"; } + content: "\f0e8"; +} .fa-sith:before { - content: "\f512"; } + content: "\f512"; +} .fa-skating:before { - content: "\f7c5"; } + content: "\f7c5"; +} .fa-sketch:before { - content: "\f7c6"; } + content: "\f7c6"; +} .fa-skiing:before { - content: "\f7c9"; } + content: "\f7c9"; +} .fa-skiing-nordic:before { - content: "\f7ca"; } + content: "\f7ca"; +} .fa-skull:before { - content: "\f54c"; } + content: "\f54c"; +} .fa-skull-crossbones:before { - content: "\f714"; } + content: "\f714"; +} .fa-skyatlas:before { - content: "\f216"; } + content: "\f216"; +} .fa-skype:before { - content: "\f17e"; } + content: "\f17e"; +} .fa-slack:before { - content: "\f198"; } + content: "\f198"; +} .fa-slack-hash:before { - content: "\f3ef"; } + content: "\f3ef"; +} .fa-slash:before { - content: "\f715"; } + content: "\f715"; +} .fa-sleigh:before { - content: "\f7cc"; } + content: "\f7cc"; +} .fa-sliders-h:before { - content: "\f1de"; } + content: "\f1de"; +} .fa-slideshare:before { - content: "\f1e7"; } + content: "\f1e7"; +} .fa-smile:before { - content: "\f118"; } + content: "\f118"; +} .fa-smile-beam:before { - content: "\f5b8"; } + content: "\f5b8"; +} .fa-smile-wink:before { - content: "\f4da"; } + content: "\f4da"; +} .fa-smog:before { - content: "\f75f"; } + content: "\f75f"; +} .fa-smoking:before { - content: "\f48d"; } + content: "\f48d"; +} .fa-smoking-ban:before { - content: "\f54d"; } + content: "\f54d"; +} .fa-sms:before { - content: "\f7cd"; } + content: "\f7cd"; +} .fa-snapchat:before { - content: "\f2ab"; } + content: "\f2ab"; +} .fa-snapchat-ghost:before { - content: "\f2ac"; } + content: "\f2ac"; +} .fa-snapchat-square:before { - content: "\f2ad"; } + content: "\f2ad"; +} .fa-snowboarding:before { - content: "\f7ce"; } + content: "\f7ce"; +} .fa-snowflake:before { - content: "\f2dc"; } + content: "\f2dc"; +} .fa-snowman:before { - content: "\f7d0"; } + content: "\f7d0"; +} .fa-snowplow:before { - content: "\f7d2"; } + content: "\f7d2"; +} + +.fa-soap:before { + content: "\e06e"; +} .fa-socks:before { - content: "\f696"; } + content: "\f696"; +} .fa-solar-panel:before { - content: "\f5ba"; } + content: "\f5ba"; +} .fa-sort:before { - content: "\f0dc"; } + content: "\f0dc"; +} .fa-sort-alpha-down:before { - content: "\f15d"; } + content: "\f15d"; +} .fa-sort-alpha-down-alt:before { - content: "\f881"; } + content: "\f881"; +} .fa-sort-alpha-up:before { - content: "\f15e"; } + content: "\f15e"; +} .fa-sort-alpha-up-alt:before { - content: "\f882"; } + content: "\f882"; +} .fa-sort-amount-down:before { - content: "\f160"; } + content: "\f160"; +} .fa-sort-amount-down-alt:before { - content: "\f884"; } + content: "\f884"; +} .fa-sort-amount-up:before { - content: "\f161"; } + content: "\f161"; +} .fa-sort-amount-up-alt:before { - content: "\f885"; } + content: "\f885"; +} .fa-sort-down:before { - content: "\f0dd"; } + content: "\f0dd"; +} .fa-sort-numeric-down:before { - content: "\f162"; } + content: "\f162"; +} .fa-sort-numeric-down-alt:before { - content: "\f886"; } + content: "\f886"; +} .fa-sort-numeric-up:before { - content: "\f163"; } + content: "\f163"; +} .fa-sort-numeric-up-alt:before { - content: "\f887"; } + content: "\f887"; +} .fa-sort-up:before { - content: "\f0de"; } + content: "\f0de"; +} .fa-soundcloud:before { - content: "\f1be"; } + content: "\f1be"; +} .fa-sourcetree:before { - content: "\f7d3"; } + content: "\f7d3"; +} .fa-spa:before { - content: "\f5bb"; } + content: "\f5bb"; +} .fa-space-shuttle:before { - content: "\f197"; } + content: "\f197"; +} .fa-speakap:before { - content: "\f3f3"; } + content: "\f3f3"; +} .fa-speaker-deck:before { - content: "\f83c"; } + content: "\f83c"; +} .fa-spell-check:before { - content: "\f891"; } + content: "\f891"; +} .fa-spider:before { - content: "\f717"; } + content: "\f717"; +} .fa-spinner:before { - content: "\f110"; } + content: "\f110"; +} .fa-splotch:before { - content: "\f5bc"; } + content: "\f5bc"; +} .fa-spotify:before { - content: "\f1bc"; } + content: "\f1bc"; +} .fa-spray-can:before { - content: "\f5bd"; } + content: "\f5bd"; +} .fa-square:before { - content: "\f0c8"; } + content: "\f0c8"; +} .fa-square-full:before { - content: "\f45c"; } + content: "\f45c"; +} .fa-square-root-alt:before { - content: "\f698"; } + content: "\f698"; +} .fa-squarespace:before { - content: "\f5be"; } + content: "\f5be"; +} .fa-stack-exchange:before { - content: "\f18d"; } + content: "\f18d"; +} .fa-stack-overflow:before { - content: "\f16c"; } + content: "\f16c"; +} .fa-stackpath:before { - content: "\f842"; } + content: "\f842"; +} .fa-stamp:before { - content: "\f5bf"; } + content: "\f5bf"; +} .fa-star:before { - content: "\f005"; } + content: "\f005"; +} .fa-star-and-crescent:before { - content: "\f699"; } + content: "\f699"; +} .fa-star-half:before { - content: "\f089"; } + content: "\f089"; +} .fa-star-half-alt:before { - content: "\f5c0"; } + content: "\f5c0"; +} .fa-star-of-david:before { - content: "\f69a"; } + content: "\f69a"; +} .fa-star-of-life:before { - content: "\f621"; } + content: "\f621"; +} .fa-staylinked:before { - content: "\f3f5"; } + content: "\f3f5"; +} .fa-steam:before { - content: "\f1b6"; } + content: "\f1b6"; +} .fa-steam-square:before { - content: "\f1b7"; } + content: "\f1b7"; +} .fa-steam-symbol:before { - content: "\f3f6"; } + content: "\f3f6"; +} .fa-step-backward:before { - content: "\f048"; } + content: "\f048"; +} .fa-step-forward:before { - content: "\f051"; } + content: "\f051"; +} .fa-stethoscope:before { - content: "\f0f1"; } + content: "\f0f1"; +} .fa-sticker-mule:before { - content: "\f3f7"; } + content: "\f3f7"; +} .fa-sticky-note:before { - content: "\f249"; } + content: "\f249"; +} .fa-stop:before { - content: "\f04d"; } + content: "\f04d"; +} .fa-stop-circle:before { - content: "\f28d"; } + content: "\f28d"; +} .fa-stopwatch:before { - content: "\f2f2"; } + content: "\f2f2"; +} + +.fa-stopwatch-20:before { + content: "\e06f"; +} .fa-store:before { - content: "\f54e"; } + content: "\f54e"; +} .fa-store-alt:before { - content: "\f54f"; } + content: "\f54f"; +} + +.fa-store-alt-slash:before { + content: "\e070"; +} + +.fa-store-slash:before { + content: "\e071"; +} .fa-strava:before { - content: "\f428"; } + content: "\f428"; +} .fa-stream:before { - content: "\f550"; } + content: "\f550"; +} .fa-street-view:before { - content: "\f21d"; } + content: "\f21d"; +} .fa-strikethrough:before { - content: "\f0cc"; } + content: "\f0cc"; +} .fa-stripe:before { - content: "\f429"; } + content: "\f429"; +} .fa-stripe-s:before { - content: "\f42a"; } + content: "\f42a"; +} .fa-stroopwafel:before { - content: "\f551"; } + content: "\f551"; +} .fa-studiovinari:before { - content: "\f3f8"; } + content: "\f3f8"; +} .fa-stumbleupon:before { - content: "\f1a4"; } + content: "\f1a4"; +} .fa-stumbleupon-circle:before { - content: "\f1a3"; } + content: "\f1a3"; +} .fa-subscript:before { - content: "\f12c"; } + content: "\f12c"; +} .fa-subway:before { - content: "\f239"; } + content: "\f239"; +} .fa-suitcase:before { - content: "\f0f2"; } + content: "\f0f2"; +} .fa-suitcase-rolling:before { - content: "\f5c1"; } + content: "\f5c1"; +} .fa-sun:before { - content: "\f185"; } + content: "\f185"; +} .fa-superpowers:before { - content: "\f2dd"; } + content: "\f2dd"; +} .fa-superscript:before { - content: "\f12b"; } + content: "\f12b"; +} .fa-supple:before { - content: "\f3f9"; } + content: "\f3f9"; +} .fa-surprise:before { - content: "\f5c2"; } + content: "\f5c2"; +} .fa-suse:before { - content: "\f7d6"; } + content: "\f7d6"; +} .fa-swatchbook:before { - content: "\f5c3"; } + content: "\f5c3"; +} + +.fa-swift:before { + content: "\f8e1"; +} .fa-swimmer:before { - content: "\f5c4"; } + content: "\f5c4"; +} .fa-swimming-pool:before { - content: "\f5c5"; } + content: "\f5c5"; +} .fa-symfony:before { - content: "\f83d"; } + content: "\f83d"; +} .fa-synagogue:before { - content: "\f69b"; } + content: "\f69b"; +} .fa-sync:before { - content: "\f021"; } + content: "\f021"; +} .fa-sync-alt:before { - content: "\f2f1"; } + content: "\f2f1"; +} .fa-syringe:before { - content: "\f48e"; } + content: "\f48e"; +} .fa-table:before { - content: "\f0ce"; } + content: "\f0ce"; +} .fa-table-tennis:before { - content: "\f45d"; } + content: "\f45d"; +} .fa-tablet:before { - content: "\f10a"; } + content: "\f10a"; +} .fa-tablet-alt:before { - content: "\f3fa"; } + content: "\f3fa"; +} .fa-tablets:before { - content: "\f490"; } + content: "\f490"; +} .fa-tachometer-alt:before { - content: "\f3fd"; } + content: "\f3fd"; +} .fa-tag:before { - content: "\f02b"; } + content: "\f02b"; +} .fa-tags:before { - content: "\f02c"; } + content: "\f02c"; +} .fa-tape:before { - content: "\f4db"; } + content: "\f4db"; +} .fa-tasks:before { - content: "\f0ae"; } + content: "\f0ae"; +} .fa-taxi:before { - content: "\f1ba"; } + content: "\f1ba"; +} .fa-teamspeak:before { - content: "\f4f9"; } + content: "\f4f9"; +} .fa-teeth:before { - content: "\f62e"; } + content: "\f62e"; +} .fa-teeth-open:before { - content: "\f62f"; } + content: "\f62f"; +} .fa-telegram:before { - content: "\f2c6"; } + content: "\f2c6"; +} .fa-telegram-plane:before { - content: "\f3fe"; } + content: "\f3fe"; +} .fa-temperature-high:before { - content: "\f769"; } + content: "\f769"; +} .fa-temperature-low:before { - content: "\f76b"; } + content: "\f76b"; +} .fa-tencent-weibo:before { - content: "\f1d5"; } + content: "\f1d5"; +} .fa-tenge:before { - content: "\f7d7"; } + content: "\f7d7"; +} .fa-terminal:before { - content: "\f120"; } + content: "\f120"; +} .fa-text-height:before { - content: "\f034"; } + content: "\f034"; +} .fa-text-width:before { - content: "\f035"; } + content: "\f035"; +} .fa-th:before { - content: "\f00a"; } + content: "\f00a"; +} .fa-th-large:before { - content: "\f009"; } + content: "\f009"; +} .fa-th-list:before { - content: "\f00b"; } + content: "\f00b"; +} .fa-the-red-yeti:before { - content: "\f69d"; } + content: "\f69d"; +} .fa-theater-masks:before { - content: "\f630"; } + content: "\f630"; +} .fa-themeco:before { - content: "\f5c6"; } + content: "\f5c6"; +} .fa-themeisle:before { - content: "\f2b2"; } + content: "\f2b2"; +} .fa-thermometer:before { - content: "\f491"; } + content: "\f491"; +} .fa-thermometer-empty:before { - content: "\f2cb"; } + content: "\f2cb"; +} .fa-thermometer-full:before { - content: "\f2c7"; } + content: "\f2c7"; +} .fa-thermometer-half:before { - content: "\f2c9"; } + content: "\f2c9"; +} .fa-thermometer-quarter:before { - content: "\f2ca"; } + content: "\f2ca"; +} .fa-thermometer-three-quarters:before { - content: "\f2c8"; } + content: "\f2c8"; +} .fa-think-peaks:before { - content: "\f731"; } + content: "\f731"; +} .fa-thumbs-down:before { - content: "\f165"; } + content: "\f165"; +} .fa-thumbs-up:before { - content: "\f164"; } + content: "\f164"; +} .fa-thumbtack:before { - content: "\f08d"; } + content: "\f08d"; +} .fa-ticket-alt:before { - content: "\f3ff"; } + content: "\f3ff"; +} + +.fa-tiktok:before { + content: "\e07b"; +} .fa-times:before { - content: "\f00d"; } + content: "\f00d"; +} .fa-times-circle:before { - content: "\f057"; } + content: "\f057"; +} .fa-tint:before { - content: "\f043"; } + content: "\f043"; +} .fa-tint-slash:before { - content: "\f5c7"; } + content: "\f5c7"; +} .fa-tired:before { - content: "\f5c8"; } + content: "\f5c8"; +} .fa-toggle-off:before { - content: "\f204"; } + content: "\f204"; +} .fa-toggle-on:before { - content: "\f205"; } + content: "\f205"; +} .fa-toilet:before { - content: "\f7d8"; } + content: "\f7d8"; +} .fa-toilet-paper:before { - content: "\f71e"; } + content: "\f71e"; +} + +.fa-toilet-paper-slash:before { + content: "\e072"; +} .fa-toolbox:before { - content: "\f552"; } + content: "\f552"; +} .fa-tools:before { - content: "\f7d9"; } + content: "\f7d9"; +} .fa-tooth:before { - content: "\f5c9"; } + content: "\f5c9"; +} .fa-torah:before { - content: "\f6a0"; } + content: "\f6a0"; +} .fa-torii-gate:before { - content: "\f6a1"; } + content: "\f6a1"; +} .fa-tractor:before { - content: "\f722"; } + content: "\f722"; +} .fa-trade-federation:before { - content: "\f513"; } + content: "\f513"; +} .fa-trademark:before { - content: "\f25c"; } + content: "\f25c"; +} .fa-traffic-light:before { - content: "\f637"; } + content: "\f637"; +} + +.fa-trailer:before { + content: "\e041"; +} .fa-train:before { - content: "\f238"; } + content: "\f238"; +} .fa-tram:before { - content: "\f7da"; } + content: "\f7da"; +} .fa-transgender:before { - content: "\f224"; } + content: "\f224"; +} .fa-transgender-alt:before { - content: "\f225"; } + content: "\f225"; +} .fa-trash:before { - content: "\f1f8"; } + content: "\f1f8"; +} .fa-trash-alt:before { - content: "\f2ed"; } + content: "\f2ed"; +} .fa-trash-restore:before { - content: "\f829"; } + content: "\f829"; +} .fa-trash-restore-alt:before { - content: "\f82a"; } + content: "\f82a"; +} .fa-tree:before { - content: "\f1bb"; } + content: "\f1bb"; +} .fa-trello:before { - content: "\f181"; } + content: "\f181"; +} .fa-tripadvisor:before { - content: "\f262"; } + content: "\f262"; +} .fa-trophy:before { - content: "\f091"; } + content: "\f091"; +} .fa-truck:before { - content: "\f0d1"; } + content: "\f0d1"; +} .fa-truck-loading:before { - content: "\f4de"; } + content: "\f4de"; +} .fa-truck-monster:before { - content: "\f63b"; } + content: "\f63b"; +} .fa-truck-moving:before { - content: "\f4df"; } + content: "\f4df"; +} .fa-truck-pickup:before { - content: "\f63c"; } + content: "\f63c"; +} .fa-tshirt:before { - content: "\f553"; } + content: "\f553"; +} .fa-tty:before { - content: "\f1e4"; } + content: "\f1e4"; +} .fa-tumblr:before { - content: "\f173"; } + content: "\f173"; +} .fa-tumblr-square:before { - content: "\f174"; } + content: "\f174"; +} .fa-tv:before { - content: "\f26c"; } + content: "\f26c"; +} .fa-twitch:before { - content: "\f1e8"; } + content: "\f1e8"; +} .fa-twitter:before { - content: "\f099"; } + content: "\f099"; +} .fa-twitter-square:before { - content: "\f081"; } + content: "\f081"; +} .fa-typo3:before { - content: "\f42b"; } + content: "\f42b"; +} .fa-uber:before { - content: "\f402"; } + content: "\f402"; +} .fa-ubuntu:before { - content: "\f7df"; } + content: "\f7df"; +} .fa-uikit:before { - content: "\f403"; } + content: "\f403"; +} + +.fa-umbraco:before { + content: "\f8e8"; +} .fa-umbrella:before { - content: "\f0e9"; } + content: "\f0e9"; +} .fa-umbrella-beach:before { - content: "\f5ca"; } + content: "\f5ca"; +} + +.fa-uncharted:before { + content: "\e084"; +} .fa-underline:before { - content: "\f0cd"; } + content: "\f0cd"; +} .fa-undo:before { - content: "\f0e2"; } + content: "\f0e2"; +} .fa-undo-alt:before { - content: "\f2ea"; } + content: "\f2ea"; +} .fa-uniregistry:before { - content: "\f404"; } + content: "\f404"; +} + +.fa-unity:before { + content: "\e049"; +} .fa-universal-access:before { - content: "\f29a"; } + content: "\f29a"; +} .fa-university:before { - content: "\f19c"; } + content: "\f19c"; +} .fa-unlink:before { - content: "\f127"; } + content: "\f127"; +} .fa-unlock:before { - content: "\f09c"; } + content: "\f09c"; +} .fa-unlock-alt:before { - content: "\f13e"; } + content: "\f13e"; +} + +.fa-unsplash:before { + content: "\e07c"; +} .fa-untappd:before { - content: "\f405"; } + content: "\f405"; +} .fa-upload:before { - content: "\f093"; } + content: "\f093"; +} .fa-ups:before { - content: "\f7e0"; } + content: "\f7e0"; +} .fa-usb:before { - content: "\f287"; } + content: "\f287"; +} .fa-user:before { - content: "\f007"; } + content: "\f007"; +} .fa-user-alt:before { - content: "\f406"; } + content: "\f406"; +} .fa-user-alt-slash:before { - content: "\f4fa"; } + content: "\f4fa"; +} .fa-user-astronaut:before { - content: "\f4fb"; } + content: "\f4fb"; +} .fa-user-check:before { - content: "\f4fc"; } + content: "\f4fc"; +} .fa-user-circle:before { - content: "\f2bd"; } + content: "\f2bd"; +} .fa-user-clock:before { - content: "\f4fd"; } + content: "\f4fd"; +} .fa-user-cog:before { - content: "\f4fe"; } + content: "\f4fe"; +} .fa-user-edit:before { - content: "\f4ff"; } + content: "\f4ff"; +} .fa-user-friends:before { - content: "\f500"; } + content: "\f500"; +} .fa-user-graduate:before { - content: "\f501"; } + content: "\f501"; +} .fa-user-injured:before { - content: "\f728"; } + content: "\f728"; +} .fa-user-lock:before { - content: "\f502"; } + content: "\f502"; +} .fa-user-md:before { - content: "\f0f0"; } + content: "\f0f0"; +} .fa-user-minus:before { - content: "\f503"; } + content: "\f503"; +} .fa-user-ninja:before { - content: "\f504"; } + content: "\f504"; +} .fa-user-nurse:before { - content: "\f82f"; } + content: "\f82f"; +} .fa-user-plus:before { - content: "\f234"; } + content: "\f234"; +} .fa-user-secret:before { - content: "\f21b"; } + content: "\f21b"; +} .fa-user-shield:before { - content: "\f505"; } + content: "\f505"; +} .fa-user-slash:before { - content: "\f506"; } + content: "\f506"; +} .fa-user-tag:before { - content: "\f507"; } + content: "\f507"; +} .fa-user-tie:before { - content: "\f508"; } + content: "\f508"; +} .fa-user-times:before { - content: "\f235"; } + content: "\f235"; +} .fa-users:before { - content: "\f0c0"; } + content: "\f0c0"; +} .fa-users-cog:before { - content: "\f509"; } + content: "\f509"; +} + +.fa-users-slash:before { + content: "\e073"; +} .fa-usps:before { - content: "\f7e1"; } + content: "\f7e1"; +} .fa-ussunnah:before { - content: "\f407"; } + content: "\f407"; +} .fa-utensil-spoon:before { - content: "\f2e5"; } + content: "\f2e5"; +} .fa-utensils:before { - content: "\f2e7"; } + content: "\f2e7"; +} .fa-vaadin:before { - content: "\f408"; } + content: "\f408"; +} .fa-vector-square:before { - content: "\f5cb"; } + content: "\f5cb"; +} .fa-venus:before { - content: "\f221"; } + content: "\f221"; +} .fa-venus-double:before { - content: "\f226"; } + content: "\f226"; +} .fa-venus-mars:before { - content: "\f228"; } + content: "\f228"; +} + +.fa-vest:before { + content: "\e085"; +} + +.fa-vest-patches:before { + content: "\e086"; +} .fa-viacoin:before { - content: "\f237"; } + content: "\f237"; +} .fa-viadeo:before { - content: "\f2a9"; } + content: "\f2a9"; +} .fa-viadeo-square:before { - content: "\f2aa"; } + content: "\f2aa"; +} .fa-vial:before { - content: "\f492"; } + content: "\f492"; +} .fa-vials:before { - content: "\f493"; } + content: "\f493"; +} .fa-viber:before { - content: "\f409"; } + content: "\f409"; +} .fa-video:before { - content: "\f03d"; } + content: "\f03d"; +} .fa-video-slash:before { - content: "\f4e2"; } + content: "\f4e2"; +} .fa-vihara:before { - content: "\f6a7"; } + content: "\f6a7"; +} .fa-vimeo:before { - content: "\f40a"; } + content: "\f40a"; +} .fa-vimeo-square:before { - content: "\f194"; } + content: "\f194"; +} .fa-vimeo-v:before { - content: "\f27d"; } + content: "\f27d"; +} .fa-vine:before { - content: "\f1ca"; } + content: "\f1ca"; +} + +.fa-virus:before { + content: "\e074"; +} + +.fa-virus-slash:before { + content: "\e075"; +} + +.fa-viruses:before { + content: "\e076"; +} .fa-vk:before { - content: "\f189"; } + content: "\f189"; +} .fa-vnv:before { - content: "\f40b"; } + content: "\f40b"; +} .fa-voicemail:before { - content: "\f897"; } + content: "\f897"; +} .fa-volleyball-ball:before { - content: "\f45f"; } + content: "\f45f"; +} .fa-volume-down:before { - content: "\f027"; } + content: "\f027"; +} .fa-volume-mute:before { - content: "\f6a9"; } + content: "\f6a9"; +} .fa-volume-off:before { - content: "\f026"; } + content: "\f026"; +} .fa-volume-up:before { - content: "\f028"; } + content: "\f028"; +} .fa-vote-yea:before { - content: "\f772"; } + content: "\f772"; +} .fa-vr-cardboard:before { - content: "\f729"; } + content: "\f729"; +} .fa-vuejs:before { - content: "\f41f"; } + content: "\f41f"; +} .fa-walking:before { - content: "\f554"; } + content: "\f554"; +} .fa-wallet:before { - content: "\f555"; } + content: "\f555"; +} .fa-warehouse:before { - content: "\f494"; } + content: "\f494"; +} + +.fa-watchman-monitoring:before { + content: "\e087"; +} .fa-water:before { - content: "\f773"; } + content: "\f773"; +} .fa-wave-square:before { - content: "\f83e"; } + content: "\f83e"; +} .fa-waze:before { - content: "\f83f"; } + content: "\f83f"; +} .fa-weebly:before { - content: "\f5cc"; } + content: "\f5cc"; +} .fa-weibo:before { - content: "\f18a"; } + content: "\f18a"; +} .fa-weight:before { - content: "\f496"; } + content: "\f496"; +} .fa-weight-hanging:before { - content: "\f5cd"; } + content: "\f5cd"; +} .fa-weixin:before { - content: "\f1d7"; } + content: "\f1d7"; +} .fa-whatsapp:before { - content: "\f232"; } + content: "\f232"; +} .fa-whatsapp-square:before { - content: "\f40c"; } + content: "\f40c"; +} .fa-wheelchair:before { - content: "\f193"; } + content: "\f193"; +} .fa-whmcs:before { - content: "\f40d"; } + content: "\f40d"; +} .fa-wifi:before { - content: "\f1eb"; } + content: "\f1eb"; +} .fa-wikipedia-w:before { - content: "\f266"; } + content: "\f266"; +} .fa-wind:before { - content: "\f72e"; } + content: "\f72e"; +} .fa-window-close:before { - content: "\f410"; } + content: "\f410"; +} .fa-window-maximize:before { - content: "\f2d0"; } + content: "\f2d0"; +} .fa-window-minimize:before { - content: "\f2d1"; } + content: "\f2d1"; +} .fa-window-restore:before { - content: "\f2d2"; } + content: "\f2d2"; +} .fa-windows:before { - content: "\f17a"; } + content: "\f17a"; +} .fa-wine-bottle:before { - content: "\f72f"; } + content: "\f72f"; +} .fa-wine-glass:before { - content: "\f4e3"; } + content: "\f4e3"; +} .fa-wine-glass-alt:before { - content: "\f5ce"; } + content: "\f5ce"; +} .fa-wix:before { - content: "\f5cf"; } + content: "\f5cf"; +} .fa-wizards-of-the-coast:before { - content: "\f730"; } + content: "\f730"; +} + +.fa-wodu:before { + content: "\e088"; +} .fa-wolf-pack-battalion:before { - content: "\f514"; } + content: "\f514"; +} .fa-won-sign:before { - content: "\f159"; } + content: "\f159"; +} .fa-wordpress:before { - content: "\f19a"; } + content: "\f19a"; +} .fa-wordpress-simple:before { - content: "\f411"; } + content: "\f411"; +} .fa-wpbeginner:before { - content: "\f297"; } + content: "\f297"; +} .fa-wpexplorer:before { - content: "\f2de"; } + content: "\f2de"; +} .fa-wpforms:before { - content: "\f298"; } + content: "\f298"; +} .fa-wpressr:before { - content: "\f3e4"; } + content: "\f3e4"; +} .fa-wrench:before { - content: "\f0ad"; } + content: "\f0ad"; +} .fa-x-ray:before { - content: "\f497"; } + content: "\f497"; +} .fa-xbox:before { - content: "\f412"; } + content: "\f412"; +} .fa-xing:before { - content: "\f168"; } + content: "\f168"; +} .fa-xing-square:before { - content: "\f169"; } + content: "\f169"; +} .fa-y-combinator:before { - content: "\f23b"; } + content: "\f23b"; +} .fa-yahoo:before { - content: "\f19e"; } + content: "\f19e"; +} .fa-yammer:before { - content: "\f840"; } + content: "\f840"; +} .fa-yandex:before { - content: "\f413"; } + content: "\f413"; +} .fa-yandex-international:before { - content: "\f414"; } + content: "\f414"; +} .fa-yarn:before { - content: "\f7e3"; } + content: "\f7e3"; +} .fa-yelp:before { - content: "\f1e9"; } + content: "\f1e9"; +} .fa-yen-sign:before { - content: "\f157"; } + content: "\f157"; +} .fa-yin-yang:before { - content: "\f6ad"; } + content: "\f6ad"; +} .fa-yoast:before { - content: "\f2b1"; } + content: "\f2b1"; +} .fa-youtube:before { - content: "\f167"; } + content: "\f167"; +} .fa-youtube-square:before { - content: "\f431"; } + content: "\f431"; +} .fa-zhihu:before { - content: "\f63f"; } + content: "\f63f"; +} .sr-only { border: 0; @@ -4352,45 +6080,55 @@ readers do not read off random characters that represent icons */ overflow: hidden; padding: 0; position: absolute; - width: 1px; } + width: 1px; +} -.sr-only-focusable:active, .sr-only-focusable:focus { +.sr-only-focusable:active, +.sr-only-focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; - width: auto; } + width: auto; +} + @font-face { font-family: 'Font Awesome 5 Brands'; font-style: normal; - font-weight: normal; - font-display: auto; - src: url("../webfonts/fa-brands-400.eot"); - src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); } + font-weight: 400; + font-display: block; + src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"); +} .fab { - font-family: 'Font Awesome 5 Brands'; } + font-family: 'Font Awesome 5 Brands'; + font-weight: 400; +} + @font-face { font-family: 'Font Awesome 5 Free'; font-style: normal; font-weight: 400; - font-display: auto; - src: url("../webfonts/fa-regular-400.eot"); - src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); } + font-display: block; + src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"); +} .far { font-family: 'Font Awesome 5 Free'; - font-weight: 400; } + font-weight: 400; +} + @font-face { font-family: 'Font Awesome 5 Free'; font-style: normal; font-weight: 900; - font-display: auto; - src: url("../webfonts/fa-solid-900.eot"); - src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); } + font-display: block; + src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"); +} .fa, .fas { font-family: 'Font Awesome 5 Free'; - font-weight: 900; } + font-weight: 900; +} diff --git a/assets/css/normalize.css b/assets/scss/vendors/normalize.css similarity index 100% rename from assets/css/normalize.css rename to assets/scss/vendors/normalize.css diff --git a/assets/scss/vendors/photoswipe/default-skin.css b/assets/scss/vendors/photoswipe/default-skin.css new file mode 100644 index 00000000..a9d94dc0 --- /dev/null +++ b/assets/scss/vendors/photoswipe/default-skin.css @@ -0,0 +1,482 @@ +/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */ +/* + + Contents: + + 1. Buttons + 2. Share modal and links + 3. Index indicator ("1 of X" counter) + 4. Caption + 5. Loading indicator + 6. Additional styles (root element, top bar, idle state, hidden state, etc.) + +*/ +/* + + 1. Buttons + + */ +/* + - {{/* Hidden fields */}} - - - - + {{/* Hidden fields */}} + + + + - {{/* User input fields */}} - - - - + {{/* User input fields */}} + + + + - {{/* reCAPTHCA v2 */}} - {{ if and .Site.Params.staticman.recaptcha.siteKey .Site.Params.staticman.recaptcha.encryptedKey }} - {{ with .Site.Params.staticman.recaptcha }} - - -
- {{ end }} - {{ end }} + {{/* reCAPTHCA v2 */}} + {{ if and .Site.Params.staticman.recaptcha.siteKey .Site.Params.staticman.recaptcha.encryptedKey }} + {{ with .Site.Params.staticman.recaptcha }} + + +
+ {{ end }} + {{ end }} - {{/* Start comment form alert messaging */}} -
- - -
+ {{/* Start comment form alert messaging */}} +
+ + +
- {{/* Form buttons */}} - - - - -
+ {{/* Form buttons */}} +
+ + + +
+ {{/* Additional div wrapper for proper consistent margin */}} -
-

{{ i18n "comments" }}

- +

{{ i18n "comments" }}

+
{{- if .Site.Data.comments -}} {{/* $comments collects comment files for the current blog entry */}} {{- $comments := index $.Site.Data.comments $entryId -}} @@ -78,28 +76,26 @@

{{ i18n "comments" }}

{{- $threadID := ._id }} {{- range $comments -}} {{ if or (in ._id $threadID) (in .replyThread $threadID) }} -
+ {{ end }} diff --git a/layouts/_default/contact.html b/layouts/_default/contact.html index d1929bc0..55ec2814 100644 --- a/layouts/_default/contact.html +++ b/layouts/_default/contact.html @@ -1,12 +1,14 @@ {{ define "main" }} -
-
-
-

{{ i18n "contact" }}

- {{ with .Description }}

{{ . }}

{{ end }} +
+
+
+

{{ .Title }}

+ {{ with .Description }} +

{{ . }}

+ {{ end }}
-
+
{{ .Content }}
{{ if .Params.netlify }} @@ -15,25 +17,13 @@

{{ i18n "contact" }}

{{ end }}

{{ i18n "contact_replies" .Params.contactanswertime }}

-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- -
+ + + + + +
+
diff --git a/layouts/_default/content-list.html b/layouts/_default/content-list.html index b6f7961d..1b12e8f9 100644 --- a/layouts/_default/content-list.html +++ b/layouts/_default/content-list.html @@ -1,12 +1,10 @@ -
+
{{ .Render "header" }} -
- {{ .Render "featured" }} +
{{ $.Scratch.Set "summary" ((delimit (findRE "(.|\n)*?

" .Content 1) "") | truncate (default 500 .Site.Params.summary_length) (default "…" .Site.Params.text.truncated ) | replaceRE "&" "&" | safeHTML) }} {{ $.Scratch.Get "summary" }}
-
diff --git a/layouts/_default/header.html b/layouts/_default/header.html index 73780248..648cb208 100644 --- a/layouts/_default/header.html +++ b/layouts/_default/header.html @@ -1,18 +1,14 @@ -
-
- {{ if $.Scratch.Get "h1" }} -

{{ .Title }}

- {{ $.Scratch.Set "h1" false }} - {{ else }} -

{{ .Title }}

- {{ end }} +
+
+

{{ .Title }}

{{ with .Description }} -

{{ . }}

+

{{ . }}

{{ end }}
-
- - {{ with .Params.author }}

{{ . }}

{{ end }} - {{ if .Site.Params.ReadingTime }}

{{ i18n "reading_time" .ReadingTime }}

{{ end }} + + {{ .Render "featured" }}
diff --git a/layouts/_default/index.json.json b/layouts/_default/index.json.json index 9a18c65c..b289e762 100644 --- a/layouts/_default/index.json.json +++ b/layouts/_default/index.json.json @@ -2,9 +2,12 @@ {{- if $index -}}, {{- end -}} { "title": "{{ .Title | plainify }}", - "date": "{{ .Render "date" }}", + "ref": "{{ .RelPermalink | plainify }}", + "timestamp": "{{ .Date }}", + "date": "{{ default (i18n "date_format") | .Date.Format }}", + {{ with .Params.author }}"author": "{{ . | plainify }}",{{ end }} + {{ if .Site.Params.ReadingTime }}"readtime": "{{ i18n "reading_time" .ReadingTime | plainify }}",{{ end }} "description": "{{ .Params.description | plainify }}", - "body": {{ .Content | plainify | jsonify }}, - "ref": "{{ .RelPermalink | plainify }}" + "body": {{ .Content | plainify | jsonify }} } {{- end -}}] diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 3ad0c151..1353a96a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -5,10 +5,10 @@ {{ end }} {{ end }} diff --git a/layouts/_default/photoswipe.html b/layouts/_default/photoswipe.html new file mode 100644 index 00000000..468b1286 --- /dev/null +++ b/layouts/_default/photoswipe.html @@ -0,0 +1,66 @@ + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ed8fef73..073b6fb1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,28 +1,23 @@ {{ define "main" }} -
-
- {{ .Render "header" }} -
- {{ partial "share-buttons" . }} -
-
- {{ .Render "featured" }} - {{ .Content }} -
-
- {{ .Render "stats" }} -
+
+ {{ .Render "header" }} +
+ {{ .Content }}
- {{ if not ( eq .Params.comments false) }} - {{ .Render "comments" }} - {{ end }} +
+ {{ .Render "stats" }} +
+ {{ if not ( eq .Params.comments false) }} + {{ .Render "comments" }} + {{ end }} + {{ .Render "photoswipe" }} {{ end }} diff --git a/layouts/_default/stats.html b/layouts/_default/stats.html index 9e7f9a49..506341ac 100644 --- a/layouts/_default/stats.html +++ b/layouts/_default/stats.html @@ -1,30 +1,28 @@ -
- {{ if .Params.categories }} -
    - {{ with .Params.categories }} - {{ range . }} -
  • {{ . }}
  • - {{ end }} +{{ if .Params.categories }} +
      + {{ with .Params.categories }} + {{ range . }} +
    • {{ . }}
    • {{ end }} -
    - {{ else if .Site.Params.hideEmptyStats }} - {{ else }} -
      -
    • None
    • -
    - {{ end }} - {{ if .Params.tags }} -
      - {{ with .Params.tags }} - {{ range . }} -
    • {{ . }}
    • - {{ end }} + {{ end }} +
    +{{ else if .Site.Params.hideEmptyStats }} +{{ else }} +
      +
    • None
    • +
    +{{ end }} +{{ if .Params.tags }} +
      + {{ with .Params.tags }} + {{ range . }} +
    • {{ . }}
    • {{ end }} -
    - {{ else if .Site.Params.hideEmptyStats }} - {{ else }} -
      -
    • None
    • -
    - {{ end }} -
+ {{ end }} + +{{ else if .Site.Params.hideEmptyStats }} +{{ else }} +
    +
  • None
  • +
+{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 41a0e2c3..21b5fe60 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -18,57 +18,26 @@ {{ end }} {{ with .Site.Params.Social.twitter}}{{ end }} + {{- $assets := resources.Get "assets.json" | unmarshal -}} + {{- $mainCSSOptions := (dict "targetPath" "css/bundle.min.css" "transpiler" "dartsass" "outputStyle" "compressed") -}} {{- if .Site.Params.enableCDN -}} - {{- if .Site.Params.highlightjs -}}{{- end -}} - {{- range .Site.Params.cssFiles -}} - {{- if eq . "default" -}} - - - - - - {{- $mainCSSOptions := (dict "targetPath" "css/main.min.css" "outputStyle" "compressed") -}} - {{- $main := resources.Get "scss/main.scss" | resources.ToCSS $mainCSSOptions | resources.Fingerprint -}} - - {{- if eq (i18n "letter_direction") "RTL" -}} - {{- $rtl := resources.Get "css/rtl.css" | minify -}} - - {{- end -}} - - {{- else }} - - {{- end -}} - {{- end -}} - {{- else -}} - {{- range .Site.Params.cssFiles -}} - {{- if eq . "default" -}} - {{- $cssSlice := slice -}} - {{- if $.Site.Params.highlightjs -}} - {{ with $.Site.Params.highlightjsTheme }} - - {{ else }} - {{- $cssSlice = $cssSlice | append (resources.Get "css/default.css") -}} - {{ end }} - {{- end -}} - {{- $assets := resources.Get "assets.json" | unmarshal -}} - {{- range $assets.styles -}} - {{- $cssSlice = $cssSlice | append (resources.Get . ) -}} - {{- end -}} - {{- $cssSlice = $cssSlice | append (resources.Get "scss/main.scss" | toCSS) -}} - {{- $css := $cssSlice | resources.Concat "css/bundle.css" | minify | fingerprint -}} - - {{- if eq (i18n "letter_direction") "RTL" -}} - {{- $rtl := resources.Get "css/rtl.css" | minify -}} - - {{- end -}} - - {{- else }} - - {{- end -}} - {{- end -}} + {{- if .Site.Params.highlightjs -}}{{- end -}} + {{- range $assets.styles -}} + + {{ end }} + + {{- end -}} + + {{- $styles := resources.Get "scss/main.scss" | resources.ExecuteAsTemplate "bundle.scss" . | toCSS $mainCSSOptions | fingerprint -}} + + {{- if eq (i18n "letter_direction") "RTL" -}} + {{- $rtl := resources.Get "css/rtl.css" | minify -}} + {{- end -}} + {{- .Scratch.Set "Permalink" .Permalink -}} {{- .Scratch.Set "Title" .Title -}} + {{- if .Params.Author -}} {{- .Scratch.Set "Author" .Params.Author -}} {{- else -}} diff --git a/layouts/partials/language-menu.html b/layouts/partials/language-menu.html index f5800b0b..63c6cabb 100644 --- a/layouts/partials/language-menu.html +++ b/layouts/partials/language-menu.html @@ -1,13 +1,13 @@ - - {{ .Site.Language.LanguageName }} ({{ .Site.Language.Lang }}) + + {{ .Site.Language.LanguageName }} {{ if .IsTranslated -}} {{ range .Translations }} - {{ .Language.LanguageName }} ({{ .Site.Language.Lang }}) + {{ .Language.LanguageName }} {{ end }} {{ else }} {{ range .Site.Languages }} {{ if not (eq .Lang $.Site.Language.Lang) }} - {{ .LanguageName }} ({{ .Lang }}) + {{ .LanguageName }} {{ end }} {{ end }} {{ end }} diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index 30495ad7..52a3db0f 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -7,11 +7,13 @@ + + {{ if .Site.Params.meta.svg }} - - {{ end }} +{{ else }} + {{ end }} diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 580544fb..b442f1d3 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,54 +1,39 @@ +{{ $scripts := slice }} +{{- $assets := resources.Get "assets.json" | unmarshal -}} + {{- if .Site.Params.enableCDN -}} {{- if .Site.Params.highlightjs -}} - - {{ with .Site.Params.highlightjsLang }}{{ range . }}{{ end }}{{ end }} - - {{- end -}} - {{- range .Site.Params.jsFiles -}} - {{- if eq . "default" -}} - - - - {{- $jsSlice := slice (resources.Get "js/util.js") (resources.Get "js/main.js" | resources.ExecuteAsTemplate "js/main.js" $.Site) -}} - {{- /* Backwards compatibility for deprecated parameter ".Site.Params.staticman.staticman" */ -}} - {{- if or $.Site.Params.staticman.enabled $.Site.Params.staticman.staticman -}} - {{- $jsSlice = $jsSlice | append (resources.Get "js/staticman.js" | resources.ExecuteAsTemplate "js/staticman.js" $.Site.Params.staticman) -}} - {{- end }} - {{- $js := $jsSlice | resources.Concat "js/bundlecdn.js" | minify | fingerprint -}} - - - {{- else }} - + + {{ with .Site.Params.highlightjsLang }}{{ range . }}{{ end }}{{ end }} + {{- range $assets.scripts -}} + + {{- end -}} + {{- else -}} + {{- if .Site.Params.highlightjs -}} + {{- $scripts = $scripts | append (resources.Get "js/highlight.js") -}} + {{ with .Site.Params.highlightjsLang }}{{ range . }}{{ end }}{{ end }} {{- end -}} {{- end -}} {{- else -}} - {{- if .Site.Params.highlightjs -}} - {{- $hljs := resources.Get "js/highlight.js" -}} - - {{ with .Site.Params.highlightjsLang }}{{ range . }}{{ end }}{{ end }} - - {{- end -}} - {{- range .Site.Params.jsFiles -}} - {{- $jsSlice := slice -}} - {{- if eq . "default" -}} - {{- $assets := resources.Get "assets.json" | unmarshal -}} - {{- range $assets.scripts -}} - {{- $jsSlice = $jsSlice | append (resources.Get . ) -}} - {{- end -}} - {{- $jsSlice = $jsSlice | append (resources.Get "js/main.js" | resources.ExecuteAsTemplate "js/main.js" $.Site) -}} - {{- /* Backwards compatibility for deprecated parameter ".Site.Params.staticman.staticman" */ -}} - {{- if or $.Site.Params.staticman.enabled $.Site.Params.staticman.staticman -}} - {{- $jsSlice = $jsSlice | append (resources.Get "js/staticman.js" | resources.ExecuteAsTemplate "js/staticman.js" $.Site.Params.staticman) -}} - {{- end -}} - {{- $js := $jsSlice | resources.Concat "js/bundle.js" | minify | fingerprint -}} - - - {{- else }} - - {{- end -}} + {{- range $assets.scripts -}} + {{ if not .header }}{{ $scripts = $scripts | append (resources.Get .vendor) }}{{ end }} {{- end -}} {{- end -}} + +{{ if .Site.Params.highlightjs }}{{ end }} + +{{- $scripts = $scripts | append (resources.Get "js/util.js") | append (resources.Get "js/main.js" | resources.ExecuteAsTemplate "js/main.js" $.Site) -}} + +{{- /* Backwards compatibility for deprecated parameter ".Site.Params.staticman.staticman" */ -}} +{{- if or $.Site.Params.staticman.enabled $.Site.Params.staticman.staticman -}} + {{- $scripts = $scripts | append (resources.Get "js/staticman.js" | resources.ExecuteAsTemplate "js/staticman.js" $.Site.Params.staticman) -}} +{{- end -}} + +{{- $scripts = $scripts | resources.Concat "js/bundle.js" | minify | fingerprint -}} + + {{ if and .Site.Params.staticman.recaptcha.siteKey .Site.Params.staticman.recaptcha.encryptedKey }} {{- end -}} + {{- template "_internal/google_analytics_async.html" . -}} diff --git a/layouts/partials/share-buttons.html b/layouts/partials/share-buttons.html index 3af66493..659ac4f6 100644 --- a/layouts/partials/share-buttons.html +++ b/layouts/partials/share-buttons.html @@ -4,29 +4,29 @@ {{ $tags := $.Scratch.Get "Tags" }} {{ range .Site.Params.socialShare }} {{ if eq . "twitter" }} - - {{ else if eq . "facebook" }} - {{ else if eq . "reddit" }} - {{ else if eq . "linkedin" }} - {{ else if eq . "pinterest" }} - {{ else if eq . "email" }} - {{ end }} {{ end }} diff --git a/layouts/partials/site-footer.html b/layouts/partials/site-footer.html index 70c65df0..a269d142 100644 --- a/layouts/partials/site-footer.html +++ b/layouts/partials/site-footer.html @@ -1,14 +1,54 @@ -